Initial modifications to MCAssembler and TargetMachine for the MCJIT.

Patch by Olivier Meurant!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109080 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Kleckner
2010-07-22 05:58:53 +00:00
parent a4081238aa
commit c96a82a534
4 changed files with 53 additions and 5 deletions

View File

@@ -669,7 +669,9 @@ public:
MCCodeEmitter &getEmitter() const { return Emitter; }
/// Finish - Do final processing and write the object to the output stream.
void Finish();
/// \arg Writer is used for custom object writer (as the MCJIT does),
/// if not specified it is automatically created from backend.
void Finish(MCObjectWriter *Writer = 0);
// FIXME: This does not belong here.
bool getSubsectionsViaSymbols() const {

View File

@@ -244,6 +244,18 @@ public:
bool = true) {
return true;
}
/// addPassesToEmitMC - Add passes to the specified pass manager to get
/// machine code emitted with the MCJIT. This method returns true if machine
/// code is not supported. It fills the MCContext Ctx pointer which can be
/// used to build custom MCStreamer.
///
virtual bool addPassesToEmitMC(PassManagerBase &PM,
MCContext *&Ctx,
CodeGenOpt::Level OptLevel,
bool DisableVerify = true) {
return true;
}
};
/// LLVMTargetMachine - This class describes a target machine that is
@@ -287,6 +299,16 @@ public:
JITCodeEmitter &MCE,
CodeGenOpt::Level,
bool DisableVerify = true);
/// addPassesToEmitMC - Add passes to the specified pass manager to get
/// machine code emitted with the MCJIT. This method returns true if machine
/// code is not supported. It fills the MCContext Ctx pointer which can be
/// used to build custom MCStreamer.
///
virtual bool addPassesToEmitMC(PassManagerBase &PM,
MCContext *&Ctx,
CodeGenOpt::Level OptLevel,
bool DisableVerify = true);
/// Target-Independent Code Generator Pass Configuration Options.