Go to the documentation of this file.
28 IRSymbolMapper::ManglingOptions
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);
70 SimpleCompiler::tryToLoadFromObjectCache(
const Module &M) {
77 void SimpleCompiler::notifyObjectCompiled(
const Module &M,
86 JTMB(
std::
move(JTMB)), ObjCache(ObjCache) {}
Expected< std::unique_ptr< MemoryBuffer > > operator()(Module &M) override
A utility class for building TargetMachines for JITs.
This is an optimization pass for GlobalISel generic memory operations.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Expected< std::unique_ptr< TargetMachine > > createTargetMachine()
Create a TargetMachine.
ConcurrentIRCompiler(JITTargetMachineBuilder JTMB, ObjectCache *ObjCache=nullptr)
Context object for machine code objects.
virtual void notifyObjectCompiled(const Module *M, MemoryBufferRef Obj)=0
notifyObjectCompiled - Provides a pointer to compiled code for Module M.
This is the base ObjectCache type which can be provided to an ExecutionEngine for the purpose of avoi...
std::unique_ptr< MemoryBuffer > CompileResult
Tagged union holding either a T or a Error.
This interface provides simple read-only access to a block of memory, and provides simple methods for...
Simple compile functor: Takes a single IR module and returns an ObjectFile.
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...
(vector float) vec_cmpeq(*A, *B) C
unsigned EmulatedTLS
EmulatedTLS - This flag enables emulated TLS model, using emutls function in the runtime library.
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.
IRSymbolMapper::ManglingOptions irManglingOptionsFromTargetOptions(const TargetOptions &Opts)
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
MemoryBufferRef getMemBufferRef() const
static Expected< OwningBinary< ObjectFile > > createObjectFile(StringRef ObjectPath)
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
A Module instance is used to store all the information related to an LLVM module.
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
Expected< CompileResult > operator()(Module &M) override
Compile a Module to an ObjectFile.
PassManager manages ModulePassManagers.
A raw_ostream that writes to an SmallVector or SmallString.
bool run(Module &M)
run - Execute all of the passes scheduled for execution.
const char LLVMTargetMachineRef TM