LLVM
15.0.0git
|
#include "llvm-c/Core.h"
#include "llvm-c/TargetMachine.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/CodeGenCWrappers.h"
#include "llvm/Target/TargetMachine.h"
#include <cstring>
Go to the source code of this file.
Functions | |
static TargetMachine * | unwrap (LLVMTargetMachineRef P) |
static Target * | unwrap (LLVMTargetRef P) |
static LLVMTargetMachineRef | wrap (const TargetMachine *P) |
static LLVMTargetRef | wrap (const Target *P) |
LLVMTargetRef | LLVMGetFirstTarget () |
Returns the first llvm::Target in the registered targets list. More... | |
LLVMTargetRef | LLVMGetNextTarget (LLVMTargetRef T) |
Returns the next llvm::Target given a previous one (or null if there's none) More... | |
LLVMTargetRef | LLVMGetTargetFromName (const char *Name) |
Finds the target corresponding to the given name and stores it in T . More... | |
LLVMBool | LLVMGetTargetFromTriple (const char *TripleStr, LLVMTargetRef *T, char **ErrorMessage) |
Finds the target corresponding to the given triple and stores it in T . More... | |
const char * | LLVMGetTargetName (LLVMTargetRef T) |
Returns the name of a target. More... | |
const char * | LLVMGetTargetDescription (LLVMTargetRef T) |
Returns the description of a target. More... | |
LLVMBool | LLVMTargetHasJIT (LLVMTargetRef T) |
Returns if the target has a JIT. More... | |
LLVMBool | LLVMTargetHasTargetMachine (LLVMTargetRef T) |
Returns if the target has a TargetMachine associated. More... | |
LLVMBool | LLVMTargetHasAsmBackend (LLVMTargetRef T) |
Returns if the target as an ASM backend (required for emitting output) More... | |
LLVMTargetMachineRef | LLVMCreateTargetMachine (LLVMTargetRef T, const char *Triple, const char *CPU, const char *Features, LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, LLVMCodeModel CodeModel) |
Creates a new llvm::TargetMachine. More... | |
void | LLVMDisposeTargetMachine (LLVMTargetMachineRef T) |
Dispose the LLVMTargetMachineRef instance generated by LLVMCreateTargetMachine. More... | |
LLVMTargetRef | LLVMGetTargetMachineTarget (LLVMTargetMachineRef T) |
Returns the Target used in a TargetMachine. More... | |
char * | LLVMGetTargetMachineTriple (LLVMTargetMachineRef T) |
Returns the triple used creating this target machine. More... | |
char * | LLVMGetTargetMachineCPU (LLVMTargetMachineRef T) |
Returns the cpu used creating this target machine. More... | |
char * | LLVMGetTargetMachineFeatureString (LLVMTargetMachineRef T) |
Returns the feature string used creating this target machine. More... | |
void | LLVMSetTargetMachineAsmVerbosity (LLVMTargetMachineRef T, LLVMBool VerboseAsm) |
Set the target machine's ASM verbosity. More... | |
LLVMTargetDataRef | LLVMCreateTargetDataLayout (LLVMTargetMachineRef T) |
Create a DataLayout based on the targetMachine. More... | |
static LLVMBool | LLVMTargetMachineEmit (LLVMTargetMachineRef T, LLVMModuleRef M, raw_pwrite_stream &OS, LLVMCodeGenFileType codegen, char **ErrorMessage) |
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. More... | |
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 . More... | |
char * | LLVMGetDefaultTargetTriple (void) |
Get a triple for the host machine as a string. More... | |
char * | LLVMNormalizeTargetTriple (const char *triple) |
Normalize a target triple. More... | |
char * | LLVMGetHostCPUName (void) |
Get the host CPU as a string. More... | |
char * | LLVMGetHostCPUFeatures (void) |
Get the host CPU's features as a string. More... | |
void | LLVMAddAnalysisPasses (LLVMTargetMachineRef T, LLVMPassManagerRef PM) |
Adds the target-specific analysis passes to the pass manager. More... | |
|
static |
Definition at line 181 of file TargetMachineC.cpp.
References llvm::CGFT_AssemblyFile, llvm::CGFT_ObjectFile, codegen, error, llvm::raw_ostream::flush(), LLVMAssemblyFile, M, Mod, pass, llvm::Module::setDataLayout(), T, TM, and llvm::unwrap().
Referenced by LLVMTargetMachineEmitToFile(), and LLVMTargetMachineEmitToMemoryBuffer().
|
static |
Definition at line 30 of file TargetMachineC.cpp.
References P.
|
static |
Definition at line 33 of file TargetMachineC.cpp.
References P.
|
static |
Definition at line 39 of file TargetMachineC.cpp.
References P.
|
static |
Definition at line 36 of file TargetMachineC.cpp.
References P.