28IRSymbolMapper::ManglingOptions
41 return std::move(CachedObject);
51 return make_error<StringError>(
"Target does not support MC emission",
56 auto ObjBuffer = std::make_unique<SmallVectorMemoryBuffer>(
57 std::move(ObjBufferSV), M.getModuleIdentifier() +
"-jitted-objectbuffer",
63 return Obj.takeError();
65 notifyObjectCompiled(M, *ObjBuffer);
66 return std::move(ObjBuffer);
70SimpleCompiler::tryToLoadFromObjectCache(
const Module &M) {
77void SimpleCompiler::notifyObjectCompiled(
const Module &M,
86 JTMB(
std::
move(JTMB)), ObjCache(ObjCache) {}
Module.h This file contains the declarations for the Module class.
This file defines the SmallVector class.
Tagged union holding either a T or a Error.
Context object for machine code objects.
This interface provides simple read-only access to a block of memory, and provides simple methods for...
MemoryBufferRef getMemBufferRef() const
A Module instance is used to store all the information related to an LLVM module.
This is the base ObjectCache type which can be provided to an ExecutionEngine for the purpose of avoi...
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...
virtual void notifyObjectCompiled(const Module *M, MemoryBufferRef Obj)=0
notifyObjectCompiled - Provides a pointer to compiled code for Module M.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
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.
unsigned EmulatedTLS
EmulatedTLS - This flag enables emulated TLS model, using emutls function in the runtime library.
PassManager manages ModulePassManagers.
bool run(Module &M)
run - Execute all of the passes scheduled for execution.
static Expected< OwningBinary< ObjectFile > > createObjectFile(StringRef ObjectPath)
ConcurrentIRCompiler(JITTargetMachineBuilder JTMB, ObjectCache *ObjCache=nullptr)
Expected< std::unique_ptr< MemoryBuffer > > operator()(Module &M) override
A utility class for building TargetMachines for JITs.
Expected< std::unique_ptr< TargetMachine > > createTargetMachine()
Create a TargetMachine.
Simple compile functor: Takes a single IR module and returns an ObjectFile.
std::unique_ptr< MemoryBuffer > CompileResult
Expected< CompileResult > operator()(Module &M) override
Compile a Module to an ObjectFile.
A raw_ostream that writes to an SmallVector or SmallString.
@ C
The default llvm calling convention, compatible with C.
IRSymbolMapper::ManglingOptions irManglingOptionsFromTargetOptions(const TargetOptions &Opts)
This is an optimization pass for GlobalISel generic memory operations.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.