Go to the documentation of this file.
19 #ifndef LLVM_C_TARGET_H
20 #define LLVM_C_TARGET_H
24 #include "llvm/Config/llvm-config.h"
41 #define LLVM_TARGET(TargetName) \
42 void LLVMInitialize##TargetName##TargetInfo(void);
43 #include "llvm/Config/Targets.def"
46 #define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target(void);
47 #include "llvm/Config/Targets.def"
50 #define LLVM_TARGET(TargetName) \
51 void LLVMInitialize##TargetName##TargetMC(void);
52 #include "llvm/Config/Targets.def"
56 #define LLVM_ASM_PRINTER(TargetName) \
57 void LLVMInitialize##TargetName##AsmPrinter(void);
58 #include "llvm/Config/AsmPrinters.def"
59 #undef LLVM_ASM_PRINTER
62 #define LLVM_ASM_PARSER(TargetName) \
63 void LLVMInitialize##TargetName##AsmParser(void);
64 #include "llvm/Config/AsmParsers.def"
65 #undef LLVM_ASM_PARSER
68 #define LLVM_DISASSEMBLER(TargetName) \
69 void LLVMInitialize##TargetName##Disassembler(void);
70 #include "llvm/Config/Disassemblers.def"
71 #undef LLVM_DISASSEMBLER
77 #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
78 #include "llvm/Config/Targets.def"
86 #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
87 #include "llvm/Config/Targets.def"
95 #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC();
96 #include "llvm/Config/Targets.def"
104 #define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter();
105 #include "llvm/Config/AsmPrinters.def"
106 #undef LLVM_ASM_PRINTER
113 #define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser();
114 #include "llvm/Config/AsmParsers.def"
115 #undef LLVM_ASM_PARSER
122 #define LLVM_DISASSEMBLER(TargetName) \
123 LLVMInitialize##TargetName##Disassembler();
124 #include "llvm/Config/Disassemblers.def"
125 #undef LLVM_DISASSEMBLER
133 #ifdef LLVM_NATIVE_TARGET
134 LLVM_NATIVE_TARGETINFO();
135 LLVM_NATIVE_TARGET();
136 LLVM_NATIVE_TARGETMC();
147 #ifdef LLVM_NATIVE_ASMPARSER
148 LLVM_NATIVE_ASMPARSER();
159 #ifdef LLVM_NATIVE_ASMPRINTER
160 LLVM_NATIVE_ASMPRINTER();
171 #ifdef LLVM_NATIVE_DISASSEMBLER
172 LLVM_NATIVE_DISASSEMBLER();
279 unsigned long long Offset);
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.
static void LLVMInitializeAllTargetInfos(void)
LLVMInitializeAllTargetInfos - The main program should call this function if it wants access to all a...
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
unsigned LLVMElementAtOffset(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned long long Offset)
Computes the structure element that contains the byte offset for a target.
static LLVMBool LLVMInitializeNativeAsmParser(void)
LLVMInitializeNativeTargetAsmParser - The main program should call this function to initialize the pa...
unsigned LLVMCallFrameAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the call frame alignment of a type in bytes for a target.
LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD)
Returns the integer type that is the same size as a pointer on a target.
static void LLVMInitializeAllAsmParsers(void)
LLVMInitializeAllAsmParsers - The main program should call this function if it wants all asm parsers ...
enum 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.
unsigned LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef TD, LLVMValueRef GlobalVar)
Computes the preferred alignment of a global variable in bytes for a target.
struct LLVMOpaqueTargetData * LLVMTargetDataRef
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.
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 void LLVMInitializeAllTargets(void)
LLVMInitializeAllTargets - The main program should call this function if it wants to link in all avai...
static void LLVMInitializeAllTargetMCs(void)
LLVMInitializeAllTargetMCs - The main program should call this function if it wants access to all ava...
static LLVMBool LLVMInitializeNativeTarget(void)
LLVMInitializeNativeTarget - The main program should call this function to initialize the native targ...
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.
static LLVMBool LLVMInitializeNativeDisassembler(void)
LLVMInitializeNativeTargetDisassembler - The main program should call this function to initialize the...
void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL)
Set the data layout for a module.
LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M)
Obtain the data layout for a module.
static void LLVMInitializeAllAsmPrinters(void)
LLVMInitializeAllAsmPrinters - The main program should call this function if it wants all asm printer...
static void LLVMInitializeAllDisassemblers(void)
LLVMInitializeAllDisassemblers - The main program should call this function if it wants all disassemb...
void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef TLI, LLVMPassManagerRef PM)
Adds target library information to a pass manager.
static LLVMBool LLVMInitializeNativeAsmPrinter(void)
LLVMInitializeNativeTargetAsmPrinter - The main program should call this function to initialize the p...
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
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.
#define LLVM_C_EXTERN_C_END
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.
#define LLVM_C_EXTERN_C_BEGIN
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.