LLVM: include/llvm-c/TargetMachine.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19#ifndef LLVM_C_TARGETMACHINE_H
20#define LLVM_C_TARGETMACHINE_H
21
26
28
29
30
31
32
33
34
38
45
55
65
70
76
77
79
81
82
83
84
86
87
88
89
92 char **ErrorMessage);
93
94
96
97
99
100
102
103
105
106
108
109
110
111
112
113
114
115
116
118
119
120
121
124
127 const char *CPU);
128
129
130
131
132
133
136 const char *Features);
137
140 const char *ABI);
141
145
149
153
154
155
156
157
158
159
160
161
164
165
167 LLVMTargetRef T, const char *Triple, const char *CPU, const char *Features,
169
170
171
173
174
176
177
178
179
181
182
183
184
186
187
188
189
191
192
194
195
198
199
202
203
206
207
208
212
213
216
217
218
219
222 const char *Filename,
224 char **ErrorMessage);
225
226
230
231
232
233
235
236
237
239
240
241
243
244
245
247
248
251
252
253
254
255
257
258#endif
#define LLVM_C_EXTERN_C_BEGIN
#define LLVM_C_EXTERN_C_END
static void codegen(const Config &Conf, TargetMachine *TM, AddStreamFn AddStream, unsigned Task, Module &Mod, const ModuleSummaryIndex &CombinedIndex)
static cl::opt< RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Development, "development", "for training")))
#define LLVM_C_ABI
LLVM_C_ABI is the export/visibility macro used to mark symbols declared in llvm-c as exported when bu...
struct LLVMOpaquePassManager * LLVMPassManagerRef
struct LLVMOpaqueMemoryBuffer * LLVMMemoryBufferRef
LLVM uses a polymorphic type hierarchy which C cannot represent, therefore parameters must be passed ...
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
LLVMCodeGenFileType
Definition TargetMachine.h:66
LLVM_C_ABI void LLVMTargetMachineOptionsSetCodeGenOptLevel(LLVMTargetMachineOptionsRef Options, LLVMCodeGenOptLevel Level)
LLVM_C_ABI void LLVMAddAnalysisPasses(LLVMTargetMachineRef T, LLVMPassManagerRef PM)
Adds the target-specific analysis passes to the pass manager.
LLVM_C_ABI char * LLVMGetTargetMachineCPU(LLVMTargetMachineRef T)
Returns the cpu used creating this target machine.
LLVM_C_ABI LLVMTargetRef LLVMGetFirstTarget(void)
Returns the first llvm::Target in the registered targets list.
LLVM_C_ABI void LLVMSetTargetMachineGlobalISelAbort(LLVMTargetMachineRef T, LLVMGlobalISelAbortMode Mode)
Set abort behaviour when global instruction selection fails to lower/select an instruction.
struct LLVMTarget * LLVMTargetRef
Definition TargetMachine.h:37
LLVM_C_ABI void LLVMTargetMachineOptionsSetABI(LLVMTargetMachineOptionsRef Options, const char *ABI)
struct LLVMOpaqueTargetMachine * LLVMTargetMachineRef
Definition TargetMachine.h:36
LLVM_C_ABI LLVMTargetRef LLVMGetTargetMachineTarget(LLVMTargetMachineRef T)
Returns the Target used in a TargetMachine.
LLVM_C_ABI LLVMTargetMachineRef LLVMCreateTargetMachineWithOptions(LLVMTargetRef T, const char *Triple, LLVMTargetMachineOptionsRef Options)
Create a new llvm::TargetMachine.
LLVMCodeModel
Definition TargetMachine.h:56
LLVM_C_ABI LLVMBool LLVMTargetMachineEmitToFile(LLVMTargetMachineRef T, LLVMModuleRef M, const char *Filename, LLVMCodeGenFileType codegen, char **ErrorMessage)
Emits an asm or object file for the given module to the filename.
LLVM_C_ABI void LLVMSetTargetMachineMachineOutliner(LLVMTargetMachineRef T, LLVMBool Enable)
Enable the MachineOutliner pass.
struct LLVMOpaqueTargetMachineOptions * LLVMTargetMachineOptionsRef
Definition TargetMachine.h:35
LLVM_C_ABI LLVMTargetRef LLVMGetTargetFromName(const char *Name)
Finds the target corresponding to the given name and stores it in T.
LLVM_C_ABI void LLVMTargetMachineOptionsSetFeatures(LLVMTargetMachineOptionsRef Options, const char *Features)
Set the list of features for the target machine.
LLVM_C_ABI LLVMBool LLVMTargetHasAsmBackend(LLVMTargetRef T)
Returns if the target as an ASM backend (required for emitting output)
LLVM_C_ABI char * LLVMGetDefaultTargetTriple(void)
Get a triple for the host machine as a string.
LLVM_C_ABI LLVMTargetMachineRef LLVMCreateTargetMachine(LLVMTargetRef T, const char *Triple, const char *CPU, const char *Features, LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, LLVMCodeModel CodeModel)
Creates a new llvm::TargetMachine.
LLVM_C_ABI void LLVMTargetMachineOptionsSetRelocMode(LLVMTargetMachineOptionsRef Options, LLVMRelocMode Reloc)
LLVM_C_ABI LLVMTargetRef LLVMGetNextTarget(LLVMTargetRef T)
Returns the next llvm::Target given a previous one (or null if there's none)
LLVM_C_ABI char * LLVMGetHostCPUFeatures(void)
Get the host CPU's features as a string.
LLVM_C_ABI void LLVMDisposeTargetMachineOptions(LLVMTargetMachineOptionsRef Options)
Dispose of an LLVMTargetMachineOptionsRef instance.
LLVM_C_ABI LLVMBool LLVMTargetHasTargetMachine(LLVMTargetRef T)
Returns if the target has a TargetMachine associated.
LLVM_C_ABI void LLVMSetTargetMachineFastISel(LLVMTargetMachineRef T, LLVMBool Enable)
Enable fast-path instruction selection.
LLVM_C_ABI char * LLVMNormalizeTargetTriple(const char *triple)
Normalize a target triple.
LLVM_C_ABI LLVMBool LLVMGetTargetFromTriple(const char *Triple, LLVMTargetRef *T, char **ErrorMessage)
Finds the target corresponding to the given triple and stores it in T.
LLVM_C_ABI char * LLVMGetTargetMachineTriple(LLVMTargetMachineRef T)
Returns the triple used creating this target machine.
LLVM_C_ABI char * LLVMGetHostCPUName(void)
Get the host CPU as a string.
LLVM_C_ABI void LLVMTargetMachineOptionsSetCPU(LLVMTargetMachineOptionsRef Options, const char *CPU)
LLVM_C_ABI void LLVMSetTargetMachineAsmVerbosity(LLVMTargetMachineRef T, LLVMBool VerboseAsm)
Set the target machine's ASM verbosity.
LLVM_C_ABI void LLVMSetTargetMachineGlobalISel(LLVMTargetMachineRef T, LLVMBool Enable)
Enable global instruction selection.
LLVM_C_ABI void LLVMTargetMachineOptionsSetCodeModel(LLVMTargetMachineOptionsRef Options, LLVMCodeModel CodeModel)
LLVM_C_ABI const char * LLVMGetTargetName(LLVMTargetRef T)
Returns the name of a target.
LLVM_C_ABI LLVMTargetDataRef LLVMCreateTargetDataLayout(LLVMTargetMachineRef T)
Create a DataLayout based on the targetMachine.
LLVMRelocMode
Definition TargetMachine.h:46
LLVMCodeGenOptLevel
Definition TargetMachine.h:39
struct LLVMOpaqueTargetData * LLVMTargetDataRef
LLVMGlobalISelAbortMode
Definition TargetMachine.h:71
LLVM_C_ABI LLVMBool LLVMTargetMachineEmitToMemoryBuffer(LLVMTargetMachineRef T, LLVMModuleRef M, LLVMCodeGenFileType codegen, char **ErrorMessage, LLVMMemoryBufferRef *OutMemBuf)
Compile the LLVM IR stored in M and store the result in OutMemBuf.
LLVM_C_ABI const char * LLVMGetTargetDescription(LLVMTargetRef T)
Returns the description of a target.
LLVM_C_ABI char * LLVMGetTargetMachineFeatureString(LLVMTargetMachineRef T)
Returns the feature string used creating this target machine.
LLVM_C_ABI LLVMBool LLVMTargetHasJIT(LLVMTargetRef T)
Returns if the target has a JIT.
LLVM_C_ABI void LLVMDisposeTargetMachine(LLVMTargetMachineRef T)
Dispose the LLVMTargetMachineRef instance generated by LLVMCreateTargetMachine.
LLVM_C_ABI LLVMTargetMachineOptionsRef LLVMCreateTargetMachineOptions(void)
Create a new set of options for an llvm::TargetMachine.
@ LLVMAssemblyFile
Definition TargetMachine.h:67
@ LLVMObjectFile
Definition TargetMachine.h:68
@ LLVMCodeModelKernel
Definition TargetMachine.h:61
@ LLVMCodeModelTiny
Definition TargetMachine.h:59
@ LLVMCodeModelSmall
Definition TargetMachine.h:60
@ LLVMCodeModelMedium
Definition TargetMachine.h:62
@ LLVMCodeModelJITDefault
Definition TargetMachine.h:58
@ LLVMCodeModelDefault
Definition TargetMachine.h:57
@ LLVMCodeModelLarge
Definition TargetMachine.h:63
@ LLVMRelocPIC
Definition TargetMachine.h:49
@ LLVMRelocDynamicNoPic
Definition TargetMachine.h:50
@ LLVMRelocStatic
Definition TargetMachine.h:48
@ LLVMRelocRWPI
Definition TargetMachine.h:52
@ LLVMRelocROPI
Definition TargetMachine.h:51
@ LLVMRelocROPI_RWPI
Definition TargetMachine.h:53
@ LLVMRelocDefault
Definition TargetMachine.h:47
@ LLVMCodeGenLevelAggressive
Definition TargetMachine.h:43
@ LLVMCodeGenLevelDefault
Definition TargetMachine.h:42
@ LLVMCodeGenLevelNone
Definition TargetMachine.h:40
@ LLVMCodeGenLevelLess
Definition TargetMachine.h:41
@ LLVMGlobalISelAbortDisableWithDiag
Definition TargetMachine.h:74
@ LLVMGlobalISelAbortDisable
Definition TargetMachine.h:73
@ LLVMGlobalISelAbortEnable
Definition TargetMachine.h:72