Displaying 20 results from an estimated 33 matches for "setmcpu".
2014 Sep 17
2
[LLVMdev] VEX prefixes for JIT in llvm 3.5
...eing emitted any more (vmulsd xmm0, xmm1, blah)
etc.
It's long been on my list of things to investigate anyway as I noticed
llvm didn't emit VZEROUPPER calls either, so I supposed it might not
be a bad thing to disable vex.
That being said, try as I might I can't force avx on
(builder.setMCPU("core-avx-i") and/or
builder.setMAttrs(vector<string>{"+avx"});). We're still using the old
JIT but I just spiked out a move to MCJIT and I still don't see the
VEX instructions.
Was there a deliberate change on the llvm-side to discourage VEX
instructions unless t...
2014 Sep 17
3
[LLVMdev] VEX prefixes for JIT in llvm 3.5
...e actual CPU -
unless I'm missing something? :)
Thanks again,
Matt
On Wed, Sep 17, 2014 at 2:16 PM, Jim Grosbach <grosbach at apple.com> wrote:
> Hi Matt,
>
> I suspect you need to specify the target CPU when you create the JIT. It’s just a method on the builder (e.g., builder.setMCPU(MCPU)). If you want auto-detection based on the host CPU, sys::getHostCPUName() returns a value suitable to be passed directly into the builder.
>
> -Jim
>
>> On Sep 17, 2014, at 11:44 AM, Matt Godbolt <matt at godbolt.org> wrote:
>>
>> Hi guys,
>>
>> I...
2015 May 11
4
[LLVMdev] Set up ExecutionEngine according to actual machine capabilities
...etTriple(llvm::sys::getProcessTriple()
#ifdef _WIN32
+ "-elf"
#endif
);
And my ExecutionEngine with
llvm::EngineBuilder(std::move(module))
.setErrorStr(&err)
.setMCPU(llvm::sys::getHostCPUName())
.create()
This works fine on most machines, however on some virtualized machines this fails because the host CPU name implies AVX, however AVX is in fact disabled, leading to an illegal instruction when running JIT-compile...
2014 Sep 17
2
[LLVMdev] VEX prefixes for JIT in llvm 3.5
...>> Matt
>>
>> On Wed, Sep 17, 2014 at 2:16 PM, Jim Grosbach <grosbach at apple.com> wrote:
>> > Hi Matt,
>> >
>> > I suspect you need to specify the target CPU when you create the JIT.
>> > It’s just a method on the builder (e.g., builder.setMCPU(MCPU)). If you want
>> > auto-detection based on the host CPU, sys::getHostCPUName() returns a value
>> > suitable to be passed directly into the builder.
>> >
>> > -Jim
>> >
>> >> On Sep 17, 2014, at 11:44 AM, Matt Godbolt <matt at godbol...
2013 Jul 18
2
[LLVMdev] LLVM 3.3 JIT code speed
...ny success…
Here is the kind of code we use to allocate the JIT:
EngineBuilder builder(fResult->fModule);
builder.setOptLevel(CodeGenOpt::Aggressive);
builder.setEngineKind(EngineKind::JIT);
builder.setUseMCJIT(true);
builder.setCodeModel(CodeModel::JITDefault);
builder.setMCPU(llvm::sys::getHostCPUName());
TargetOptions targetOptions;
targetOptions.NoFramePointerElim = true;
targetOptions.LessPreciseFPMADOption = true;
targetOptions.UnsafeFPMath = true;
targetOptions.NoInfsFPMath = true;
targetOptions.NoNaNsFPMath = true;
targetOptions.Gu...
2016 Sep 14
4
setDataLayout segfault
...ting the data layout:
int main(int argc, char** argv)
{
llvm::InitializeNativeTarget();
llvm::LLVMContext TheContext;
unique_ptr<Module> Mod(new Module("A",TheContext));
llvm::EngineBuilder engineBuilder(std::move(Mod));
std::string mcjit_error;
engineBuilder.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;
engi...
2014 Sep 18
5
[LLVMdev] VEX prefixes for JIT in llvm 3.5
...PM, Jim Grosbach <grosbach at apple.com>
>>>> wrote:
>>>>
>>>>> Hi Matt,
>>>>>
>>>>> I suspect you need to specify the target CPU when you create the JIT.
>>>>> It’s just a method on the builder (e.g., builder.setMCPU(MCPU)). If
>>>>> you want
>>>>> auto-detection based on the host CPU, sys::getHostCPUName() returns a
>>>>> value
>>>>> suitable to be passed directly into the builder.
>>>>>
>>>>> -Jim
>>>>>
&g...
2013 Nov 12
2
[LLVMdev] Limit loop vectorizer to SSE
On 12 November 2013 15:53, Frank Winter <fwinter at jlab.org> wrote:
> .. forcing the vector size to 4 does not prevent using AVX.
>
Sure. That's more for tests than anything else.
So, there are ways of disabling stuf in Clang, for instance "-mattr=-avx"
or "-target-feature -avx", but I'm not sure how you're doing it in the JIT.
I'm also not sure
2013 Nov 12
0
[LLVMdev] Limit loop vectorizer to SSE
...> "-mattr=-avx" or "-target-feature -avx", but I'm not sure how you're
> doing it in the JIT. I'm also not sure how to set target parameters in
> JIT, you'll have to do that by hand.
>
I don't know that either. I set the CPU via
engineBuilder.setMCPU(llvm::sys::getHostCPUName());
and that figures out all target parameters, I assume.
I would need to still use this, and then disable just the AVX feature.
> cheers,
> --renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/piperma...
2013 Nov 12
3
[LLVMdev] Limit loop vectorizer to SSE
On 12 November 2013 16:05, Frank Winter <fwinter at jlab.org> wrote:
> engineBuilder.setMCPU(llvm::sys::getHostCPUName());
>
Try:
engineBuilder.setMAttrs("-avx");
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131112/4b00aed7/attachment.html>
2013 Jul 18
0
[LLVMdev] LLVM 3.3 JIT code speed
...ode we use to allocate the JIT:
>
> EngineBuilder builder(fResult->fModule);
> builder.setOptLevel(CodeGenOpt::Aggressive);
> builder.setEngineKind(EngineKind::JIT);
> builder.setUseMCJIT(true);
> builder.setCodeModel(CodeModel::JITDefault);
> builder.setMCPU(llvm::sys::getHostCPUName());
>
> TargetOptions targetOptions;
> targetOptions.NoFramePointerElim = true;
> targetOptions.LessPreciseFPMADOption = true;
> targetOptions.UnsafeFPMath = true;
> targetOptions.NoInfsFPMath = true;
> targetOptions.NoNaNsFPMat...
2011 Aug 25
2
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
...=+avx).
> I guess the corresponding code should look like this:
>
> llvm::EngineBuilder engineBuilder(module);
> engineBuilder.setErrorStr(&eeError);
> engineBuilder.setEngineKind(llvm::EngineKind::JIT);
> engineBuilder.setUseMCJIT(true);
> engineBuilder.setMCPU("corei7-avx");
> std::vector<std::string> attrs;
> attrs.push_back("avx");
> engineBuilder.setMAttrs(attrs);
> llvm::ExecutionEngine *ee = engineBuilder.create();
>
> Note that I have just today filed a bug report also related to jitted
&g...
2011 Aug 25
0
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
...ation to use AVX
(llc -mattr=+avx).
I guess the corresponding code should look like this:
llvm::EngineBuilder engineBuilder(module);
engineBuilder.setErrorStr(&eeError);
engineBuilder.setEngineKind(llvm::EngineKind::JIT);
engineBuilder.setUseMCJIT(true);
engineBuilder.setMCPU("corei7-avx");
std::vector<std::string> attrs;
attrs.push_back("avx");
engineBuilder.setMAttrs(attrs);
llvm::ExecutionEngine *ee = engineBuilder.create();
Note that I have just today filed a bug report also related to jitted
AVX: http://llvm.org/bugs/...
2011 Sep 09
3
[LLVMdev] runStaticConstructorsDestructors not calling static destructors
...ng, and passing the compiled module to an ExecutionEngine created as follows:
EE = llvm::EngineBuilder(globalModule)
.setEngineKind(llvm::EngineKind::JIT)
.setErrorStr(&err)
.setOptLevel(llvm::CodeGenOpt::Default)
.setAllocateGVsWithCode(false)
//.setMAttrs("-avx")
.setMCPU("core2")
.create();
EE->DisableLazyCompilation();
After passing in the compiled module, I call:
EE->runStaticConstructorsDestructors(module, false);
Then to test the tear-down of the module, I call:
EE->runStaticConstructorsDestructors(mImpl->module, true);
EE->clear...
2016 Sep 14
2
setDataLayout segfault
...vm::InitializeNativeTarget();
>>
>> llvm::LLVMContext TheContext;
>> unique_ptr<Module> Mod(new Module("A",TheContext));
>>
>> llvm::EngineBuilder engineBuilder(std::move(Mod));
>> std::string mcjit_error;
>>
>> engineBuilder.setMCPU(llvm::sys::getHostCPUName());
>>
>> engineBuilder.setEngineKind(llvm::EngineKind::JIT);
>> engineBuilder.setOptLevel(llvm::CodeGenOpt::Aggressive);
>> engineBuilder.setErrorStr(&mcjit_error);
>>
>> llvm::TargetOptions targetOptions;
>> targetO...
2011 Aug 26
0
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
...esponding code should look like this:
>>
>> llvm::EngineBuilder engineBuilder(module);
>> engineBuilder.setErrorStr(&eeError);
>> engineBuilder.setEngineKind(llvm::EngineKind::JIT);
>> engineBuilder.setUseMCJIT(true);
>> engineBuilder.setMCPU("corei7-avx");
>> std::vector<std::string> attrs;
>> attrs.push_back("avx");
>> engineBuilder.setMAttrs(attrs);
>> llvm::ExecutionEngine *ee = engineBuilder.create();
>>
>> Note that I have just today filed a bug rep...
2013 Jul 18
2
[LLVMdev] LLVM 3.3 JIT code speed
...the JIT:
>>
>> EngineBuilder builder(fResult->fModule);
>> builder.setOptLevel(CodeGenOpt::Aggressive);
>> builder.setEngineKind(EngineKind::JIT);
>> builder.setUseMCJIT(true);
>> builder.setCodeModel(CodeModel::JITDefault);
>> builder.setMCPU(llvm::sys::getHostCPUName());
>>
>> TargetOptions targetOptions;
>> targetOptions.NoFramePointerElim = true;
>> targetOptions.LessPreciseFPMADOption = true;
>> targetOptions.UnsafeFPMath = true;
>> targetOptions.NoInfsFPMath = true;
>> ta...
2011 Aug 25
3
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
I'm trying to wire up some code to use the MC-based JIT; my understanding is that it should be able to JIT AVX code (and that the regular JIT cannot). However, I'm getting the error "Target does not support MC emission!" when I call EngineBuilder::create(). I assume that I'm just not doing something necessary for initialization, but I'm not sure what it would be--I am
2016 Jun 23
2
AVX512 instruction generated when JIT compiling for an avx2 architecture
...5, label %L6
L6: ; preds = %L5
ret void
}
The following code line show how I call the JIT compiler. ('Mod' is
pointing to the module).
llvm::EngineBuilder
engineBuilder(std::move(std::unique_ptr<llvm::Module>(Mod)));
engineBuilder.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.setTarget...
2011 Sep 09
0
[LLVMdev] runStaticConstructorsDestructors not calling static destructors
...EngineKind(llvm::EngineKind::JIT)
> .setErrorStr(&err)
> .setOptLevel(llvm::CodeGenOpt::Default)
> .setAllocateGVsWithCode(false)
> //.setMAttrs("-avx")
> .setMCPU("core2")
> .create();
> EE->DisableLazyCompilation();
>
> After passing in the compiled module, I call:
>
> EE->runStaticConstructorsDestructors(module, false);
>
> Then to test the tear-down of the module, I call:
>
> EE->runS...