search for: settargetoptions

Displaying 20 results from an estimated 25 matches for "settargetoptions".

2018 Apr 19
1
How to set Target/Triple of ExecutionEngine
Hi edaqa, You might need to set your TargetOptions before calling selectTarget. E.g. builder.setTargetOptions(Opts).selectTarget(...); Or you could just let EngineBuilder call selectTarget for you (which is what the no-argument version of EngineBuilder::create does): llvm::ExecutionEngine * ee = builder. setErrorStr( &errStr ). setEngineKind( llvm::EngineKind::JIT ). setTarget...
2018 Apr 19
2
How to set Target/Triple of ExecutionEngine
...I setup my engine/module like this:      llvm::SmallVector<std::string,2> mattrs;      llvm::EngineBuilder builder{ unique_ptr<llvm::Module>(module) };      llvm::ExecutionEngine * ee = builder.         setErrorStr( &errStr ).         setEngineKind( llvm::EngineKind::JIT ).         setTargetOptions( topts ).         create(builder.selectTarget( llvm::Triple(llvm::Triple::normalize(platform::target->triple)), "", "", mattrs ));     module->setDataLayout( ee->getDataLayout() ); Where `module` is my `llvm::Module` with the generated IR code. I'm using the trip...
2018 Apr 19
0
How to set Target/Triple of ExecutionEngine
...: > >      llvm::SmallVector<std::string,2> mattrs; >      llvm::EngineBuilder builder{ unique_ptr<llvm::Module>(module) }; >      llvm::ExecutionEngine * ee = builder. >         setErrorStr( &errStr ). >         setEngineKind( llvm::EngineKind::JIT ). >         setTargetOptions( topts ). >         create(builder.selectTarget( > llvm::Triple(llvm::Triple::normalize(platform::target->triple)), "", "", > mattrs )); > >     module->setDataLayout( ee->getDataLayout() ); > > Where `module` is my `llvm::Module` with the generated...
2013 Jul 18
2
[LLVMdev] LLVM 3.3 JIT code speed
...TargetOptions targetOptions; targetOptions.NoFramePointerElim = true; targetOptions.LessPreciseFPMADOption = true; targetOptions.UnsafeFPMath = true; targetOptions.NoInfsFPMath = true; targetOptions.NoNaNsFPMath = true; targetOptions.GuaranteedTailCallOpt = true; builder.setTargetOptions(targetOptions); TargetMachine* tm = builder.selectTarget(); fJIT = builder.create(tm); if (!fJIT) { return false; } …. Any idea? Thanks. Stéphane Letz
2016 Sep 14
4
setDataLayout segfault
...::getHostCPUName()); engineBuilder.setEngineKind(llvm::EngineKind::JIT); engineBuilder.setOptLevel(llvm::CodeGenOpt::Aggressive); engineBuilder.setErrorStr(&mcjit_error); llvm::TargetOptions targetOptions; targetOptions.AllowFPOpFusion = llvm::FPOpFusion::Fast; engineBuilder.setTargetOptions( targetOptions ); TargetMachine *targetMachine = engineBuilder.selectTarget(); assert(targetMachine && "failed to create target machine"); std::cout << targetMachine->createDataLayout().getStringRepresentation() << "\n"; Mod.get()->setD...
2012 May 08
2
[LLVMdev] 3.1 API Breakage
Trying to get the Pure compiler to work with LLVM 3.1, I've run into a problem. The release notes say: "Target specific options have been moved from global variables to members on the new TargetOptions class, which is local to each TargetMachine." Unfortunately, they don't say anything about how to fix existing source to work around this. In my application I create a JIT
2012 May 08
0
[LLVMdev] 3.1 API Breakage
Hello Albert, > Any help is much appreciated. I believe examples/ExceptionDemo contains sample code which sets TargetOptions flags. In particular, llvm::EngineBuilder class has setTargetOptions() method which does all necessary magic here. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
2013 Jul 18
0
[LLVMdev] LLVM 3.3 JIT code speed
...argetOptions.NoFramePointerElim = true; > targetOptions.LessPreciseFPMADOption = true; > targetOptions.UnsafeFPMath = true; > targetOptions.NoInfsFPMath = true; > targetOptions.NoNaNsFPMath = true; > targetOptions.GuaranteedTailCallOpt = true; > > builder.setTargetOptions(targetOptions); > > TargetMachine* tm = builder.selectTarget(); > > fJIT = builder.create(tm); > if (!fJIT) { > return false; > } > …. > > Any idea? It's hard to say much without seeing the specific IR and the code generated from that I...
2015 Mar 20
2
[LLVMdev] LLVM Exception Handling
...// Build engine with JIT std::unique_ptr<llvm::RTDyldMemoryManager> MemMgr(new llvm::SectionMemoryManager()); std::string err; llvm::EngineBuilder factory(std::move(Mod)); factory.setErrorStr(&err); factory.setEngineKind(llvm::EngineKind::JIT); factory.setTargetOptions(Opts); factory.setMCJITMemoryManager(std::move(MemMgr)); llvm::ExecutionEngine* EE = factory.create(); llvm::sys::DynamicLibrary::AddSymbol("_Z4testv", reinterpret_cast<void*>(test)); EE->finalizeObject(); void* poi = EE->getPointerToFunction(f);...
2016 Jun 11
3
SegFault creating a ExecutionEngine
My code to create an ExecutionEngine is segfaulting: std::string errStr; llvm::ExecutionEngine * ee = llvm::EngineBuilder( unique_ptr<llvm::Module>(module) ) .setErrorStr( &errStr ) //line 1618 .setEngineKind( llvm::EngineKind::JIT ) Where module is a `llvm::Module*`. This is code I'm migrating from 3.3 to 3.8. Since the deletion error is happening during
2016 Sep 14
2
setDataLayout segfault
...Kind(llvm::EngineKind::JIT); >> engineBuilder.setOptLevel(llvm::CodeGenOpt::Aggressive); >> engineBuilder.setErrorStr(&mcjit_error); >> >> llvm::TargetOptions targetOptions; >> targetOptions.AllowFPOpFusion = llvm::FPOpFusion::Fast; >> engineBuilder.setTargetOptions( targetOptions ); >> >> TargetMachine *targetMachine = engineBuilder.selectTarget(); >> >> assert(targetMachine && "failed to create target machine"); >> >> std::cout << >> targetMachine->createDataLayout().getStringReprese...
2013 Jul 18
2
[LLVMdev] LLVM 3.3 JIT code speed
...nterElim = true; >> targetOptions.LessPreciseFPMADOption = true; >> targetOptions.UnsafeFPMath = true; >> targetOptions.NoInfsFPMath = true; >> targetOptions.NoNaNsFPMath = true; >> targetOptions.GuaranteedTailCallOpt = true; >> >> builder.setTargetOptions(targetOptions); >> >> TargetMachine* tm = builder.selectTarget(); >> >> fJIT = builder.create(tm); >> if (!fJIT) { >> return false; >> } >> …. >> >> Any idea? > > It's hard to say much without seeing the...
2016 Jun 23
2
AVX512 instruction generated when JIT compiling for an avx2 architecture
...r.setMCPU(llvm::sys::getHostCPUName()); engineBuilder.setEngineKind(llvm::EngineKind::JIT); engineBuilder.setOptLevel(llvm::CodeGenOpt::Aggressive); engineBuilder.setErrorStr(&mcjit_error); llvm::TargetOptions targetOptions; targetOptions.AllowFPOpFusion = llvm::FPOpFusion::Fast; engineBuilder.setTargetOptions( targetOptions ); TheExecutionEngine = engineBuilder.create(); targetMachine = engineBuilder.selectTarget(); Mod->setDataLayout( targetMachine->createDataLayout() ); TheExecutionEngine->finalizeObject(); // MCJIT fptr_mainFunc_extern = TheExecutionEngine->getPointerToFunction( main...
2016 Jun 23
2
AVX512 instruction generated when JIT compiling for an avx2 architecture
...lder.setEngineKind(llvm::EngineKind::JIT); > engineBuilder.setOptLevel(llvm::CodeGenOpt::Aggressive); > engineBuilder.setErrorStr(&mcjit_error); > > llvm::TargetOptions targetOptions; > targetOptions.AllowFPOpFusion = llvm::FPOpFusion::Fast; > engineBuilder.setTargetOptions( targetOptions ); > > TheExecutionEngine = engineBuilder.create(); > > targetMachine = engineBuilder.selectTarget(); > Mod->setDataLayout( targetMachine->createDataLayout() ); > > TheExecutionEngine->finalizeObject(); // MCJIT > fptr_mainFunc_ex...
2012 May 08
2
[LLVMdev] 3.1 API Breakage
Hi Anton, On 05/08/2012 05:05 PM, Anton Korobeynikov wrote: > I believe examples/ExceptionDemo contains sample code which sets > TargetOptions flags. > In particular, llvm::EngineBuilder class has setTargetOptions() method > which does all necessary magic here. Cool, that's certainly easy enough. :) Thanks, Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr.Graef at t-online.de, ag at muwiinfa.geschichte.uni-mainz.de WWW: http://www.musikinformat...
2016 Mar 09
3
Where is opt spending its time?
I am trying to improve my application's compile-time performance. On a given workload, I take 68 seconds to compile some code. If I disable the LLVM code generation (i.e. I will generate IR instructions, but skip the LLVM optimization and instruction selection steps) then my compile time drops to 3 seconds. If I write out the LLVM IR (just to prove that I am generating it) then my compile
2016 Aug 12
2
Reducing JIT time
Hi, What other options do I have to reduce JIT time for large amount of code? - setting optimization level to none helps a lot - enabling FastISel doesn't seem to help much Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160812/f05d51fb/attachment.html>
2013 Jul 18
0
[LLVMdev] LLVM 3.3 JIT code speed
...nterElim = true; >> targetOptions.LessPreciseFPMADOption = true; >> targetOptions.UnsafeFPMath = true; >> targetOptions.NoInfsFPMath = true; >> targetOptions.NoNaNsFPMath = true; >> targetOptions.GuaranteedTailCallOpt = true; >> >> builder.setTargetOptions(targetOptions); >> >> TargetMachine* tm = builder.selectTarget(); >> >> fJIT = builder.create(tm); >> if (!fJIT) { >> return false; >> } >> .. >> >> Any idea? > > It's hard to say much without seeing the...
2012 Sep 24
0
[LLVMdev] [llvm-commits] Fwd: Re: [PATCH] Fix for bug in JIT exception table allocation
...r; + TargetOptions Options; + Options.JITExceptionHandling = true; TheJIT.reset(EngineBuilder(M).setEngineKind(EngineKind::JIT) .setJITMemoryManager(RJMM) - .setErrorStr(&Error).create()); + .setErrorStr(&Error) + .setTargetOptions(Options).create()); ASSERT_TRUE(TheJIT.get() != NULL) << Error; } @@ -292,6 +299,46 @@ EXPECT_EQ(3, *GPtr); } +// Regression test for a bug. The JITEmitter wasn't checking to verify that +// it hadn't run out of space while generating the DWARF exception information +...
2012 Aug 22
1
[LLVMdev] [PATCH] Fix for bug in JIT exception table allocation (no test yet)
On Aug 21, 2012, at 2:12 PM, Michael Muller <mmuller at enduden.com> wrote: > > Hi, I found a bug in the code that generates exception tables, I've attached > what I think is the correct fix. > > When you run out of space writing to a buffer, the buffer management code > simply stops writing at the end of the buffer. It is the responsibility of > the caller to