Displaying 20 results from an estimated 39 matches for "createdatalayout".
2016 Sep 14
4
setDataLayout segfault
...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()->setDataLayout(
targetMachine->createDataLayout().getStringRepresentation() ); // this
segfaults
Mod.get()->setDataLayout( targetMachine->createDataLayout() ); // as
well as this
}
Backtrace:
Using host libthr...
2016 Sep 14
2
setDataLayout segfault
...t; engineBuilder.setTargetOptions( targetOptions );
>>
>> TargetMachine *targetMachine = engineBuilder.selectTarget();
>>
>> assert(targetMachine && "failed to create target machine");
>>
>> std::cout <<
>> targetMachine->createDataLayout().getStringRepresentation() << "\n";
>>
>> Mod.get()->setDataLayout(
>> targetMachine->createDataLayout().getStringRepresentation() ); //
>> this segfaults
>> Mod.get()->setDataLayout( targetMachine->createDataLayout() ); //
>>...
2016 May 05
2
MCJIT - missing DataLayout?
Hi everyone,
I was happily using MCJIT for over a year until yesterday when I created a
function call with an argument of a struct type. That caused a crash in
SelectionDAG around DataLayout::getAlignment().
I remember the noise about the DataLayout started being mandatory. But I
cannot find precise information.
Should I set the DataLayout in every Module created?
Where can I get the
2017 Apr 09
2
Possible stack corruption during call to JITSymbol::getAddress()
...e> TM;
const DataLayout DL;
ObjectLinkingLayer<> ObjectLayer;
IRCompileLayer<decltype(ObjectLayer)> CompileLayer;
public:
typedef decltype(CompileLayer)::ModuleSetHandleT ModuleHandle;
KaleidoscopeJIT()
: TM(EngineBuilder().selectTarget()),
DL(TM->createDataLayout()),
CompileLayer(ObjectLayer, SimpleCompiler(*TM)) {
llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr);
}
TargetMachine &getTargetMachine() { return *TM; }
ModuleHandle addModule(std::unique_ptr<Module> M) {
// Build our symbol resolver...
2016 Mar 23
2
Help with pass manager
...name);
if (!objoutstream) return 1;
legacy::PassManager passmanager;
TargetLibraryInfoImpl TLII(moduletriple);
TargetLibraryInfoWrapperPass *tliwp = new TargetLibraryInfoWrapperPass(TLII);
passmanager.add(tliwp);
module->setDataLayout(tmachine->createDataLayout());
setFunctionAttributes(cpuname, ftrlist, *module);
if (RelaxAll.getNumOccurrences() > 0 &&
FileType != TargetMachine::CGFT_ObjectFile)
errs() << "warning: ignoring -mc-relax-all because filetype != obj";
{
raw_pwrite_s...
2017 Apr 17
2
Possible stack corruption during call to JITSymbol::getAddress()
...ctLayer;
>> IRCompileLayer<decltype(ObjectLayer)> CompileLayer;
>>
>> public:
>> typedef decltype(CompileLayer)::ModuleSetHandleT ModuleHandle;
>>
>> KaleidoscopeJIT()
>> : TM(EngineBuilder().selectTarget()),
>> DL(TM->createDataLayout()),
>> CompileLayer(ObjectLayer, SimpleCompiler(*TM)) {
>> llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr);
>> }
>>
>> TargetMachine &getTargetMachine() { return *TM; }
>>
>> ModuleHandle addModule(std::uniqu...
2017 Apr 20
2
Possible stack corruption during call to JITSymbol::getAddress()
...ayer)> CompileLayer;
>>>>
>>>> public:
>>>> typedef decltype(CompileLayer)::ModuleSetHandleT ModuleHandle;
>>>>
>>>> KaleidoscopeJIT()
>>>> : TM(EngineBuilder().selectTarget()),
>>>> DL(TM->createDataLayout()),
>>>> CompileLayer(ObjectLayer, SimpleCompiler(*TM)) {
>>>> llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr);
>>>> }
>>>>
>>>> TargetMachine &getTargetMachine() { return *TM; }
>>>>...
2017 Aug 24
1
Invalid Signature of orc::RTDyldObjectLinkingLayer::NotifyLoadedFtor
...can however be reproducedthere too:
diff --git a/tools/lli/OrcLazyJIT.h b/tools/lli/OrcLazyJIT.h
index 47a2acc4d7e..41a7c99413b 100644
--- a/tools/lli/OrcLazyJIT.h
+++ b/tools/lli/OrcLazyJIT.h
@@ -62,7 +62,11 @@ public:
bool InlineStubs)
: TM(std::move(TM)), DL(this->TM->createDataLayout()),
CCMgr(std::move(CCMgr)),
- ObjectLayer([]() { return
std::make_shared<SectionMemoryManager>(); }),
+ ObjectLayer([]() { return
std::make_shared<SectionMemoryManager>(); },
+ [this](llvm::orc::RTDyldObjectLinkingLayerBase::ObjHandleT,
+ ...
2016 Mar 24
2
Help with pass manager
...smanager;
>>
>> TargetLibraryInfoImpl TLII(moduletriple);
>>
>> TargetLibraryInfoWrapperPass *tliwp = new TargetLibraryInfoWrapperPass(TLII);
>>
>> passmanager.add(tliwp);
>>
>> module->setDataLayout(tmachine->createDataLayout());
>>
>> setFunctionAttributes(cpuname, ftrlist, *module);
>>
>> if (RelaxAll.getNumOccurrences() > 0 &&
>> FileType != TargetMachine::CGFT_ObjectFile)
>> errs() << "warning: ignoring -mc-relax-all because...
2016 Feb 19
2
target triple in 3.8
...w llvm::DataLayoutPass());
and then the -basicaa and -loop-vectorizer were able to vectorize the
input IR for AVX.
Now, with 3.8 that didn't compile. What I do instead is just setting the
datalayout to the Module (got that from the Kaleido example).
Mod->setDataLayout( targetMachine->createDataLayout() );
I don't add anything to the pass manager anymore, right? Especially I
don't set the target triple..?!
However, the SIMD size doesn't shine through. The debug output of the
loop vectorizer says:
LV: Checking a loop in "main" from module
LV: Loop hints: force=? width=0...
2016 Mar 24
0
Help with pass manager
...> legacy::PassManager passmanager;
>
> TargetLibraryInfoImpl TLII(moduletriple);
>
> TargetLibraryInfoWrapperPass *tliwp = new TargetLibraryInfoWrapperPass(TLII);
>
> passmanager.add(tliwp);
>
> module->setDataLayout(tmachine->createDataLayout());
>
> setFunctionAttributes(cpuname, ftrlist, *module);
>
> if (RelaxAll.getNumOccurrences() > 0 &&
> FileType != TargetMachine::CGFT_ObjectFile)
> errs() << "warning: ignoring -mc-relax-all because filetype != obj";
&...
2016 Mar 24
2
Help with pass manager
...ryInfoImpl TLII(moduletriple);
>>>>
>>>> TargetLibraryInfoWrapperPass *tliwp = new TargetLibraryInfoWrapperPass(TLII);
>>>>
>>>> passmanager.add(tliwp);
>>>>
>>>> module->setDataLayout(tmachine->createDataLayout());
>>>>
>>>> setFunctionAttributes(cpuname, ftrlist, *module);
>>>>
>>>> if (RelaxAll.getNumOccurrences() > 0 &&
>>>> FileType != TargetMachine::CGFT_ObjectFile)
>>>> errs() <<...
2016 May 17
3
External function resolution: MCJIT vs ORC JIT
...TargetMCs();
llvm::InitializeAllAsmPrinters();
llvm::InitializeAllAsmParsers();
llvm::LLVMContext Context;
std::unique_ptr<llvm::TargetMachine> TM (llvm::EngineBuilder().selectTarget());
std::unique_ptr<llvm::DataLayout> DL;
DL.reset (new llvm::DataLayout (TM->createDataLayout()));
std::unique_ptr<llvm::ExecutionEngine> EE;
typedef llvm::orc::ObjectLinkingLayer<> ObjLayerT;
typedef llvm::orc::IRCompileLayer<ObjLayerT> CompileLayerT;
typedef CompileLayerT::ModuleSetHandleT ModuleHandleT;
ObjLayerT Objlayer;
CompileLayerT Compilela...
2016 Jun 23
2
AVX512 instruction generated when JIT compiling for an avx2 architecture
...orStr(&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(
mainFunc_extern );
When calling the function an 'illegal instruction' is raised.
Looking at the assembler reveals an AVX512 instruction which shouldn't
be the...
2016 Mar 24
0
Help with pass manager
...>> TargetLibraryInfoImpl TLII(moduletriple);
>>>
>>> TargetLibraryInfoWrapperPass *tliwp = new TargetLibraryInfoWrapperPass(TLII);
>>>
>>> passmanager.add(tliwp);
>>>
>>> module->setDataLayout(tmachine->createDataLayout());
>>>
>>> setFunctionAttributes(cpuname, ftrlist, *module);
>>>
>>> if (RelaxAll.getNumOccurrences() > 0 &&
>>> FileType != TargetMachine::CGFT_ObjectFile)
>>> errs() << "warning: ignorin...
2016 Mar 24
2
Help with pass manager
...gt;>
>>>>>> TargetLibraryInfoWrapperPass *tliwp = new TargetLibraryInfoWrapperPass(TLII);
>>>>>>
>>>>>> passmanager.add(tliwp);
>>>>>>
>>>>>> module->setDataLayout(tmachine->createDataLayout());
>>>>>>
>>>>>> setFunctionAttributes(cpuname, ftrlist, *module);
>>>>>>
>>>>>> if (RelaxAll.getNumOccurrences() > 0 &&
>>>>>> FileType != TargetMachine::CGFT_ObjectFile)...
2016 Jun 23
2
AVX512 instruction generated when JIT compiling for an avx2 architecture
...ptions;
> 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(
> mainFunc_extern );
>
>
> When calling the function an 'illegal instruction' is raised.
> Looking at the assembler r...
2016 Mar 24
0
Help with pass manager
...iple);
>>>>>
>>>>> TargetLibraryInfoWrapperPass *tliwp = new TargetLibraryInfoWrapperPass(TLII);
>>>>>
>>>>> passmanager.add(tliwp);
>>>>>
>>>>> module->setDataLayout(tmachine->createDataLayout());
>>>>>
>>>>> setFunctionAttributes(cpuname, ftrlist, *module);
>>>>>
>>>>> if (RelaxAll.getNumOccurrences() > 0 &&
>>>>> FileType != TargetMachine::CGFT_ObjectFile)
>>>>>...
2016 Mar 24
2
Help with pass manager
...;> TargetLibraryInfoWrapperPass *tliwp = new TargetLibraryInfoWrapperPass(TLII);
>>>>>>>>
>>>>>>>> passmanager.add(tliwp);
>>>>>>>>
>>>>>>>> module->setDataLayout(tmachine->createDataLayout());
>>>>>>>>
>>>>>>>> setFunctionAttributes(cpuname, ftrlist, *module);
>>>>>>>>
>>>>>>>> if (RelaxAll.getNumOccurrences() > 0 &&
>>>>>>>> Fil...
2016 Mar 24
0
Help with pass manager
...;>>>>> TargetLibraryInfoWrapperPass *tliwp = new TargetLibraryInfoWrapperPass(TLII);
>>>>>>>
>>>>>>> passmanager.add(tliwp);
>>>>>>>
>>>>>>> module->setDataLayout(tmachine->createDataLayout());
>>>>>>>
>>>>>>> setFunctionAttributes(cpuname, ftrlist, *module);
>>>>>>>
>>>>>>> if (RelaxAll.getNumOccurrences() > 0 &&
>>>>>>> FileType != TargetMachi...