45 cl::desc(
"Enable the \"fast\" instruction selector"));
48 cl::desc(
"Show encoding in .s output"));
50 cl::desc(
"Show instruction structure in .s output"));
71 assert(
AsmInfo &&
"MCAsmInfo not initialized. "
72 "Make sure you include the correct TargetSelect.h"
73 "and that InitializeAllTargetMCs() is being invoked!");
147 StartAfter, StopAfter);
191 AsmStreamer.
reset(S);
201 if (MCE == 0 || MAB == 0)
208 AsmStreamer.get()->setAutoInitSections(
true);
239 bool DisableVerify) {
258 bool DisableVerify) {
275 if (MCE == 0 || MAB == 0)
unsigned getAssemblerDialect() const
virtual const TargetLowering * getTargetLowering() const
virtual void addIRPasses()
virtual void InitSections()=0
InitSections - Create the default sections and set the initial one.
void setDisableVerify(bool Disable)
ImmutablePass * createBasicTargetTransformInfoPass(const TargetMachine *TM)
Create a basic TargetTransformInfo analysis pass.
virtual bool addPassesToEmitFile(PassManagerBase &PM, formatted_raw_ostream &Out, CodeGenFileType FileType, bool DisableVerify=true, AnalysisID StartAfter=0, AnalysisID StopAfter=0)
MCStreamer * createNullStreamer(MCContext &Ctx)
ModulePass * createPrintModulePass(raw_ostream *OS, bool DeleteStream=false, const std::string &Banner="")
MCCodeEmitter * createMCCodeEmitter(const MCInstrInfo &II, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI, MCContext &Ctx) const
createMCCodeEmitter - Create a target specific code emitter.
print alias Alias Set Printer
static cl::opt< bool > ShowMCInst("show-mc-inst", cl::Hidden, cl::desc("Show instruction structure in .s output"))
virtual TargetPassConfig * createPassConfig(PassManagerBase &PM)
bool hasMCRelaxAll() const
MCAsmInfo * createMCAsmInfo(const MCRegisterInfo &MRI, StringRef Triple) const
MCCodeGenInfo * createMCCodeGenInfo(StringRef Triple, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) const
const MCAsmInfo * getMCAsmInfo() const
#define llvm_unreachable(msg)
static cl::opt< cl::boolOrDefault > AsmVerbose("asm-verbose", cl::desc("Add comments to directives."), cl::init(cl::BOU_UNSET))
static cl::opt< bool > ShowMCEncoding("show-mc-encoding", cl::Hidden, cl::desc("Show encoding in .s output"))
const MCAsmInfo * AsmInfo
virtual void addMachinePasses()
MCInstPrinter * createMCInstPrinter(unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI) const
bool hasMCSaveTempLabels() const
void setStartStopPasses(AnalysisID Start, AnalysisID Stop)
CodeGenOpt::Level getOptLevel() const
const TargetLoweringObjectFile & getObjFileLowering() const
initializer< Ty > init(const Ty &Val)
void setAllowTemporaryLabels(bool Value)
MCAsmBackend * createMCAsmBackend(const MCRegisterInfo &MRI, StringRef Triple, StringRef CPU) const
virtual bool addPassesToEmitMC(PassManagerBase &PM, MCContext *&Ctx, raw_ostream &OS, bool DisableVerify=true)
MCCodeEmitter - Generic instruction encoding interface.
static bool getAsmVerbosityDefault()
static MCContext * addPassesToGenerateCode(LLVMTargetMachine *TM, PassManagerBase &PM, bool DisableVerify, AnalysisID StartAfter, AnalysisID StopAfter)
addPassesToX helper drives creation and initialization of TargetPassConfig.
virtual bool addInstSelector()
virtual bool addPassesToEmitMachineCode(PassManagerBase &PM, JITCodeEmitter &MCE, bool DisableVerify=true)
virtual void addISelPrepare()
virtual void addCodeGenPrepare()
const Target & TheTarget
TheTarget - The Target that this machine was created for.
virtual bool addCodeEmitter(PassManagerBase &, JITCodeEmitter &)
void addPassesToHandleExceptions()
Add passes to lower exception handling for the code generator.
LLVMTargetMachine(const Target &T, StringRef TargetTriple, StringRef CPU, StringRef FS, TargetOptions Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
static cl::opt< cl::boolOrDefault > EnableFastISelOption("fast-isel", cl::Hidden, cl::desc("Enable the \"fast\" instruction selector"))
virtual const TargetInstrInfo * getInstrInfo() const
const MCContext & getContext() const
AsmPrinter * createAsmPrinter(TargetMachine &TM, MCStreamer &Streamer) const
MCCodeGenInfo * CodeGenInfo
void setFastISel(bool Enable)
virtual void addAnalysisPasses(PassManagerBase &PM)
Register analysis passes for this target with a pass manager.
static bool getVerboseAsm()
const StringRef getTargetTriple() const
cl::opt< std::string > StopAfter("stop-after", cl::desc("Stop compilation after a specific pass"), cl::value_desc("pass-name"), cl::init(""))
cl::opt< std::string > StartAfter("start-after", cl::desc("Resume compilation after a specific pass"), cl::value_desc("pass-name"), cl::init(""))
virtual const TargetRegisterInfo * getRegisterInfo() const
cl::opt< TargetMachine::CodeGenFileType > 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))
bool hasMCUseCFI() const
hasMCUseCFI - Check whether we should use dwarf's .cfi_* directives.
bool hasMCUseLoc() const
hasMCUseLoc - Check whether we should use dwarf's .loc directive.
bool hasMCNoExecStack() const
hasMCNoExecStack - Check whether an executable stack is not needed.
bool hasMCUseDwarfDirectory() const
MCAsmBackend - Generic interface to target specific assembler backends.
MCStreamer * createAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS, bool isVerboseAsm, bool useLoc, bool useCFI, bool useDwarfDirectory, MCInstPrinter *InstPrint, MCCodeEmitter *CE, MCAsmBackend *TAB, bool ShowInst) const
createAsmStreamer - Create a target specific MCStreamer.
const Target & getTarget() const
const MCRegisterInfo & MRI
virtual void reset()
lifetime management