Displaying 20 results from an estimated 9000 matches similar to: "[LLVMdev] EngineBuilder::setEngineKind(EngineKind::Interpreter) error"
2010 Nov 02
1
[LLVMdev] Forcing the Interpreter segfaults
Hi everyone !
I am very new to LLVM and intent to use it in a research project.
I have a problem with the interpreter: I have a simple compiler that
generates LLVM bitcode, JIT it and execute it, and it works very well.
Now I would like to execute it using the interpreter. And I get a segfault.
Here is the code :
// This code JIT the function and executes it
llvm::InitializeNativeTarget();
2013 May 22
2
[LLVMdev] Static linking of execution engine
Hi,
Am 21.05.13 21:57, schrieb Kaylor, Andrew:
> Yeah, this is a problem with the static constructor getting optimized out. Including "JIT.h" is supposed to fix that.
> Is it possible that the file where you are including "JIT.h" doesn't have any required code in it?
I'm including "JIT.h" directly in the main module, which also uses the
engine. See
2011 Aug 25
0
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
Hi Matt,
I am unsure about MCJIT, but I guess the problem is the same.
Just like when invoking llc, you need to pass the information 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);
2012 Dec 23
1
[LLVMdev] Missing ExecutionEngine EngineKind::MCJIT ?
Greetings, I have a simple C++ EDSL working using the JIT execution engine.
When I upgraded to LLVM 3.2 (effortless upgrade, awesome stuff!) I thought I
would try taking the MCJIT for a spin after having read that the JIT is
considered to be "legacy".
So the changes I made to my code were:
+ #include <llvm/ExecutionEngine/MCJIT.h>
- #include <llvm/ExecutionEngine/JIT.h>
+
2010 Nov 02
2
[LLVMdev] Forcing the Interpreter segfaults
Helps to send to list:
On Tue, Nov 2, 2010 at 1:00 PM, OvermindDL1 <overminddl1 at gmail.com> wrote:
> On Tue, Nov 2, 2010 at 12:51 PM, Salomon Brys <salomon.brys at gmail.com> wrote:
>> Hi everyone !
>> I am very new to LLVM and intent to use it in a research project.
>> I have a problem with the interpreter: I have a simple compiler that
>> generates LLVM
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());
2011 Aug 25
2
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
Hi Ralf,
FYI, old JIT doesn't support AVX at all, no encoding info, etc... The
only way to use AVX+JIT is using MCJIT, which contains the correct
encoding, but unfortunately the framework isn't good yet as the old
one is.
On Thu, Aug 25, 2011 at 10:12 AM, Ralf Karrenberg <Chareos at gmx.de> wrote:
> Hi Matt,
>
> I am unsure about MCJIT, but I guess the problem is the same.
2011 Aug 26
0
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
Ah, now that makes sense. Guess I was a little over-eager with my
bugreport. Thanks! :)
However, I am now running into the same Problem as Matt ("Target does
not support MC emission!").
Best,
Ralf
Am 25.08.2011 19:32, schrieb Bruno Cardoso Lopes:
> Hi Ralf,
>
> FYI, old JIT doesn't support AVX at all, no encoding info, etc... The
> only way to use AVX+JIT is using
2016 Sep 19
3
llvm interpreter does not find function defined by addGlobalMapping
Hi,
I want to use a function defined in c(++)-code from code generated by llvm. For this I use ExecutionEngine.addGlobalMapping(). I started with the JIT execution engine and everything worked, then I switched to the interpreter engine and it stopped working, but only if compiled on a Linux system. More precisely it works if I use
llvm 3.8.1 + gcc (Linux) + JIT
llvm 3.8.0 + mingw-gcc
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",
2010 Nov 02
0
[LLVMdev] Forcing the Interpreter segfaults
In my case, I am working on a posix regular expression library that uses
LLVM to execute a regular expression.
Each regular expression is a very small sets of code and is faster to
interpret than to JIT then execute.
I wanted to JIT only when the regular expression is executed more than 20
times.
The benchmarks I have run show that my library is amzingly fast to execute a
regular expression
2011 Aug 26
2
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
Following along from lli code, if you add a call to InitializeNativeTargetAsmPrinter() during setup, it gets a bit farther and crashes rather than issuing that error. (Rebuilding with debugging symbols now to dig into it further…)
-matt
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x000000010000349e in
2010 Feb 11
2
[LLVMdev] LLVM memory usage?
Hi,
I'm seeing rather high memory usage from LLVM and I'd like to track down
what I'm doing to cause it. My application is a simple web application
server that compiles web pages with embedded script to bitcode and compiles
them with the JIT on demand. I've taken tools/lli.cpp as a starting point
and extended it to load additional modules.
However, if I load successive pages and
2010 Feb 12
0
[LLVMdev] LLVM memory usage?
On Thu, Feb 11, 2010 at 6:53 PM, James Williams <junk at giantblob.com> wrote:
> Hi,
>
> I'm seeing rather high memory usage from LLVM and I'd like to track down
> what I'm doing to cause it. My application is a simple web application
> server that compiles web pages with embedded script to bitcode and compiles
> them with the JIT on demand. I've taken
2011 Dec 29
2
[LLVMdev] How to free memory of JIT'd function
Hi,
I'm testing how to free memory of a JIT'd function.
I thought ExecutionEngine::freeMachineCodeForFunction() and
Function::eraseFromParent()
would work and did a test with the following sample code.
But I found that the memory usage of the process is constantly growing as
the while loop goes.
Could someone shed light on this please?
Here is the code.
int main(int argc, char **argv) {
2015 Mar 20
2
[LLVMdev] LLVM Exception Handling
Hi,
I am trying to implement a scenario similar to running ExceptionDemo.cpp
with parameter -1 (where the JITed code calls the C++ function which throws
an exception)
Different from the given example I am using IRParser instead of IRBuilder.
I can successfully catch the exception in Linux but the program crashes in
Mac and Windows.
The code is similar to as follows:
### The test.cpp :
2011 Aug 31
0
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
Hi Matt, hi Bruno,
I am still struggling to use AVX via MCJIT on TOT... did you succeed yet?
I seem to be unable to even get lli to run some code with the
"use-mcjit" flag.
I attached a test case that works fine for "lli y.bc" but exits with an
error for "lli -use-mcjit y.bc":
"LLVM ERROR: Unknown object format"
If I call InitializeAllTargetMCs() before
2012 Jan 05
0
[LLVMdev] How to free memory of JIT'd function
Hi,
I put the sample code and a brief analysis using Valgrind to GitHub
in order to make my problem clear.
https://github.com/naosuke/how-to-free-memory-of-JIT-function
The Valgrind heap profiler indicates memory leaking but I don't get
what is wrong with the way to free memory.
If someone could please offer some advice/suggestion on this, I would
really appreciate it.
Best,
Naosuke
On
2012 Aug 07
1
[LLVMdev] Target does not support MC emission
With the following call:
llvm::ExecutionEngine* engine;
llvm::EngineBuilder builder( module );
builder.setEngineKind( llvm::EngineKind::Either ); // it will use JIT if
available
builder.setUseMCJIT ( true );
engine = builder.create();
These calls are successful in windows. But when I try in Linux (Ubuntu),
the create() function fails with the error message:
Target does not support MC emission
2012 Jan 10
1
[LLVMdev] How to free memory of JIT'd function
There may be another explanation, but I've seen this sort of issues before: LLVM uses several object pools (associated w/ LLVM context and JIT engine), and often objects from these pools are leaked, or the pools grow infinitely due to implementation bugs.
These are not an ordinary memory leaks, as destroying the LLVM context and/or JIT engine will successfully reclaim all the memory. The