Go to the documentation of this file.
69 std::string StringRep =
unwrap(TD)->getStringRepresentation();
70 return strdup(StringRep.c_str());
78 return unwrap(TD)->getPointerSize(0);
82 return unwrap(TD)->getPointerSize(AS);
122 return unwrap(TD)->getPrefTypeAlign(
unwrap(Ty)).value();
128 ->getPreferredAlign(unwrap<GlobalVariable>(
GlobalVar))
133 unsigned long long Offset) {
134 StructType *STy = unwrap<StructType>(StructTy);
135 return unwrap(TD)->getStructLayout(STy)->getElementContainingOffset(
Offset);
140 StructType *STy = unwrap<StructType>(StructTy);
141 return unwrap(TD)->getStructLayout(STy)->getElementOffset(Element);
LLVMTargetDataRef LLVMCreateTargetData(const char *StringRep)
Creates target data from a target layout string.
LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD)
Returns the integer type that is the same size as a pointer on a target.
This is an optimization pass for GlobalISel generic memory operations.
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
LLVMContextRef LLVMGetGlobalContext(void)
Obtain the global context instance.
A parsed version of the target data layout string in and methods for querying it.
unsigned LLVMElementAtOffset(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned long long Offset)
Computes the structure element that contains the byte offset for a target.
struct LLVMOpaquePassRegistry * LLVMPassRegistryRef
unsigned LLVMCallFrameAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the call frame alignment of a type in bytes for a target.
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD)
Returns the integer type that is the same size as a pointer on a target.
void initializeTargetTransformInfoWrapperPassPass(PassRegistry &)
LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef TD)
Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian.
unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the size of a type in bytes for a target.
Implementation of the target library information.
void initializeTargetLibraryInfoWrapperPassPass(PassRegistry &)
unsigned LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef TD, LLVMValueRef GlobalVar)
Computes the preferred alignment of a global variable in bytes for a target.
struct LLVMOpaqueTargetData * LLVMTargetDataRef
(vector float) vec_cmpeq(*A, *B) C
unsigned LLVMPreferredAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the preferred alignment of a type in bytes for a target.
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
Attribute unwrap(LLVMAttributeRef Attr)
struct LLVMOpaqueType * LLVMTypeRef
Each value in the LLVM IR has a type, an LLVMTypeRef.
unsigned LLVMPointerSize(LLVMTargetDataRef TD)
Returns the pointer size in bytes for a target.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
unsigned long long LLVMABISizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the ABI size of a type in bytes for a target.
unsigned LLVMPointerSizeForAS(LLVMTargetDataRef TD, unsigned AS)
Returns the pointer size in bytes for a target for a specified address space.
void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL)
Set the data layout for a module.
LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M)
Obtain the data layout for a module.
void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef TLI, LLVMPassManagerRef PM)
Adds target library information to a pass manager.
unsigned LLVMABIAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the ABI alignment of a type in bytes for a target.
void LLVMDisposeTargetData(LLVMTargetDataRef TD)
Deallocates a TargetData.
LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned AS)
Returns the integer type that is the same size as a pointer on a target.
struct LLVMOpaqueTargetLibraryInfotData * LLVMTargetLibraryInfoRef
struct LLVMOpaquePassManager * LLVMPassManagerRef
LLVMAttributeRef wrap(Attribute Attr)
Class to represent struct types.
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned Element)
Computes the byte offset of the indexed struct element for a target.
void LLVMInitializeTarget(LLVMPassRegistryRef R)
LLVMTypeRef LLVMIntPtrTypeForASInContext(LLVMContextRef C, LLVMTargetDataRef TD, unsigned AS)
Returns the integer type that is the same size as a pointer on a target.
unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the storage size of a type in bytes for a target.
A global registry used in conjunction with static constructors to make pluggable components (like tar...
void initializeTarget(PassRegistry &)
Initialize all passes linked into the CodeGen library.
struct LLVMOpaqueValue * LLVMValueRef
Represents an individual value in LLVM IR.
char * LLVMCopyStringRepOfTargetData(LLVMTargetDataRef TD)
Converts target data to a target layout string.
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.