27 IRMaterializationUnit::ManglingOptions
40 return std::move(CachedObject);
50 return make_error<StringError>(
"Target does not support MC emission",
55 auto ObjBuffer = std::make_unique<SmallVectorMemoryBuffer>(
61 return Obj.takeError();
63 notifyObjectCompiled(M, *ObjBuffer);
64 return std::move(ObjBuffer);
68 SimpleCompiler::tryToLoadFromObjectCache(
const Module &M) {
75 void SimpleCompiler::notifyObjectCompiled(
const Module &M,
84 JTMB(
std::move(JTMB)), ObjCache(ObjCache) {}
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
static Expected< OwningBinary< ObjectFile > > createObjectFile(StringRef ObjectPath)
This class represents lattice values for constants.
virtual bool addPassesToEmitMC(PassManagerBase &, MCContext *&, raw_pwrite_stream &, bool=true)
Add passes to the specified pass manager to get machine code emitted with the MCJIT.
A Module instance is used to store all the information related to an LLVM module. ...
virtual std::unique_ptr< MemoryBuffer > getObject(const Module *M)=0
Returns a pointer to a newly allocated MemoryBuffer that contains the object which corresponds with M...
A raw_ostream that writes to an SmallVector or SmallString.
Tagged union holding either a T or a Error.
Simple compile functor: Takes a single IR module and returns an ObjectFile.
Context object for machine code objects.
Expected< CompileResult > operator()(Module &M) override
Compile a Module to an ObjectFile.
PassManager manages ModulePassManagers.
Expected< std::unique_ptr< MemoryBuffer > > operator()(Module &M) override
bool run(Module &M)
run - Execute all of the passes scheduled for execution.
const std::string & getModuleIdentifier() const
Get the module identifier which is, essentially, the name of the module.
virtual void notifyObjectCompiled(const Module *M, MemoryBufferRef Obj)=0
notifyObjectCompiled - Provides a pointer to compiled code for Module M.
ConcurrentIRCompiler(JITTargetMachineBuilder JTMB, ObjectCache *ObjCache=nullptr)
Module.h This file contains the declarations for the Module class.
MemoryBufferRef getMemBufferRef() const
This interface provides simple read-only access to a block of memory, and provides simple methods for...
IRCompiler(IRMaterializationUnit::ManglingOptions MO)
unsigned EmulatedTLS
EmulatedTLS - This flag enables emulated TLS model, using emutls function in the runtime library...
IRMaterializationUnit::ManglingOptions irManglingOptionsFromTargetOptions(const TargetOptions &Opts)
Expected< std::unique_ptr< TargetMachine > > createTargetMachine()
Create a TargetMachine.
This is the base ObjectCache type which can be provided to an ExecutionEngine for the purpose of avoi...
std::unique_ptr< MemoryBuffer > CompileResult
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
A utility class for building TargetMachines for JITs.