Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] How to print machine code of JIT IR"
2012 Dec 21
0
[LLVMdev] How to print machine code of JIT IR
Hi Chia Lun Liu,
On 12/21/12 7:47 AM, ChiaLun wrote:
> I am using LLVM 3.1, and wants to print the machine code of JIT IR
>
> I try the following method
>
> EngineBuilder builder(&ctx.getModule());
> builder.setEngineKind(EngineKind::JIT);
> *
> TargetMachine * tm = builder.selectTarget();
> tm->Options.PrintMachineCode = true;*
> engine =
2013 Jan 07
1
[LLVMdev] Question on using GlobalVariable as function pointer
Hi everyone,
I am trying to have an call instruction that calls global variable
The first thing I do is
gv = new llvm::GlobalVariable( *(tb->getModule()),
fty,
false,GlobalValue::InternalLinkage,0,
"",0,0,0);
fty : i32 ({ i32, [32 x i32] }*)
I get stuck here, the fifth argument is the
2018 Apr 19
2
How to set Target/Triple of ExecutionEngine
I don't know if I'm setting the triple of my execution engine
correctly. This is leading to an issue where a struct `{i8,i64}` is not
getting the same layout as the ABI expects.
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.
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 ).
2018 Apr 19
0
How to set Target/Triple of ExecutionEngine
Taking one step back, I'm not clear I'm even setting the
triple/DataLayout on the module correctly:
module = new llvm::Module( "test", *llvm_context );
module->setTargetTriple( platform::target->triple );
Is that enough to create an appropriate DataLayout for the module? I
don't see anyway to convert a triple to a DataLayout, so I can't call
2012 Dec 26
1
[LLVMdev] Using argument in another module
Hi everyone,
I am building a function that would call a function in another module,
I found this related thread
http://llvm.1065342.n5.nabble.com/Using-a-function-from-another-module-td10506.html
All my functions have prototype
int f(myStruct * c);
here comes my problems
If I have Function* f1,*f2
f2 is in another module, f1 is the function I am building.
Somewhere in f1 , I set
2016 Sep 14
2
setDataLayout segfault
Ok. I can make a copy of the unique_ptr before moving it into the
builder's constructor and use the copy later on. It is confusing to
require a unique_ptr.
Frank
On 09/14/2016 12:11 PM, Frank Winter via llvm-dev wrote:
> I am constructing the engine builder in the following way:
>
> llvm::SMDiagnostic Err;
> unique_ptr<Module> Mod = getLazyIRFileModule("f.ll",
2013 Jul 18
2
[LLVMdev] LLVM 3.3 JIT code speed
Hi,
Our DSL LLVM IR emitted code (optimized with -O3 kind of IR ==> IR passes) runs slower when executed with the LLVM 3.3 JIT, compared to what we had with LLVM 3.1. What could be the reason?
I tried to play with TargetOptions without any success…
Here is the kind of code we use to allocate the JIT:
EngineBuilder builder(fResult->fModule);
2016 Sep 14
4
setDataLayout segfault
I get a segfault with this code when setting 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());
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
2013 Jul 18
0
[LLVMdev] LLVM 3.3 JIT code speed
On Thu, Jul 18, 2013 at 9:07 AM, Stéphane Letz <letz at grame.fr> wrote:
> Hi,
>
> Our DSL LLVM IR emitted code (optimized with -O3 kind of IR ==> IR passes) runs slower when executed with the LLVM 3.3 JIT, compared to what we had with LLVM 3.1. What could be the reason?
>
> I tried to play with TargetOptions without any success…
>
> Here is the kind of code we use to
2012 Oct 04
2
[LLVMdev] Problems of manipulating GEP for struct type
Hi,
I use JIT to execute the following LLVM IR,
------------------------------------------------------------------------------------------------------------
define internal fastcc i32 @L_00008120_(%struct.ThreadContext* %ThreadCtx) {
L_00000000_:
%0 = alloca i32
%1 = alloca i32
%2 = alloca %struct.ThreadContext*, align 4
store %struct.ThreadContext* %ThreadCtx, %struct.ThreadContext**
2013 Jul 18
2
[LLVMdev] LLVM 3.3 JIT code speed
Le 18 juil. 2013 à 19:07, Eli Friedman <eli.friedman at gmail.com> a écrit :
> On Thu, Jul 18, 2013 at 9:07 AM, Stéphane Letz <letz at grame.fr> wrote:
>> Hi,
>>
>> Our DSL LLVM IR emitted code (optimized with -O3 kind of IR ==> IR passes) runs slower when executed with the LLVM 3.3 JIT, compared to what we had with LLVM 3.1. What could be the reason?
>>
2016 May 17
3
External function resolution: MCJIT vs ORC JIT
When using ORC JIT, I'm having trouble with external function resolution (that is, of a function defined in the app, with C linkage).
I add a declaration for the function to my IR, and when I use MCJIT, it finds it and all is well, But when I use ORC JIT (I *think* correctly, at least it closely matches what I see in the tutorial), I get an LLVM error, "Program used external function
2016 Jun 23
2
AVX512 instruction generated when JIT compiling for an avx2 architecture
With LLVM 3.8 the JIT compiler engine generates an AVX512 instruction
although I target an 'avx2' CPU (intel Core I7).
I just downloaded the most recent 3.8 and still it happens.
It happens with this input module:
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
define void @module_cFFEMJ(i64 %lo, i64 %hi, i64 %myId, i1 %ordered, i64
%start, i32* noalias align 32
2016 Jun 23
2
AVX512 instruction generated when JIT compiling for an avx2 architecture
On 06/23/2016 12:56 PM, Craig Topper wrote:
> Can you check what value "getHostCPUName" returned?
getHostCPUName() = skylake
>
> On Thu, Jun 23, 2016 at 9:53 AM, Frank Winter via llvm-dev
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>
> With LLVM 3.8 the JIT compiler engine generates an AVX512
> instruction although I
2012 Oct 03
1
[LLVMdev] Getting dump of native assembly?
I'm using the IRBuilder C++ API to generate LLVM IR code and execute it on-the-fly. I know about Module::dump() to print the IR code, but is there any way to print out the native assembly code (x86 in my case)?
- Paul
2011 Jun 21
1
[LLVMdev] Instantiating a JIT on win64
hi all,
I'm trying to write an LLVM-based interpreter for a small DSL that we have.
The language is very simple (essentially a calculator), but I'd like it to
execute efficiently. I've been following the tutorial, and have the
following code for instantiating an ExecutionEngine:
#include <LLVM\ExecutionEngine\JIT.h>
#include
2016 May 19
2
External function resolution: MCJIT vs ORC JIT
Thanks so much! This seems to do the trick. I would have spun my wheels for a long time before discovering all of this, wow.
Do I even want to know what additional chickens need to be sacrificed to get this to work on Windows?
-- lg
> On May 18, 2016, at 1:52 PM, Lang Hames <lhames at gmail.com> wrote:
>
> Hi Larry,
>
> You're basically there, but you're hitting
2012 Oct 04
0
[LLVMdev] Problems of manipulating GEP for struct type
Hi Chia Lun,
On 04/10/12 07:58, ChiaLun wrote:
> Hi,
>
> I use JIT to execute the following LLVM IR,
>
> ------------------------------------------------------------------------------------------------------------
> define internal fastcc i32 @L_00008120_(%struct.ThreadContext* %ThreadCtx) {
does the caller also specify the fastcc calling convention when calling this?
Ciao,