Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] JIT question: Inner workings of getPointerToFunction()"
2008 May 27
1
[LLVMdev] JIT question: Inner workings of getPointerToFunction()
Hi,
I was just reading through the Kaleidoscope tutorial (which is greatly
written and understandable, thanks! ) hoping to get some glimpse about the
workings of the JIT and the optimizations that are done at run time. I am
curious as to how LLVM's JIT dynamically generates native code from bit code
at run time and runs that code (I think my question is also somewhat more
general in the sense
2012 Aug 06
2
[LLVMdev] Question about llvm JIT
I have a function in llvm ir as follows:
def [2 x [3 x double]] @fun()
{
return [ ... ]; // a [2 x [3 x double]] constant
}
I would like to JIT this function in C.
I first get the void pointer using:
void *FPtr = TheExecutionEngine->getPointerToFunction( func );
Then I need to conver this void pointer to the corresponding C function
pointer
type, and then call the function
2012 Aug 06
0
[LLVMdev] Question about llvm JIT
On Mon, Aug 6, 2012 at 9:35 AM, Peng Cheng <gm4cheng at gmail.com> wrote:
> I have a function in llvm ir as follows:
>
> def [2 x [3 x double]] @fun()
> {
> return [ ... ]; // a [2 x [3 x double]] constant
> }
>
> I would like to JIT this function in C.
>
> I first get the void pointer using:
>
> void *FPtr =
2009 Jul 04
0
[LLVMdev] ModuleProvider materializeFunction
Carter Cheng wrote:
> I have tracing the calls to materializeFunction in the LLVM code in hopes of determining how to properly utilize this function but from my explorations I gather it's just a hook which is called by the JIT system and I would mostly have to do the work myself.
>
> What is the preferred way to inject a llvm:Function which contains basic blocks into the Module +
2010 Feb 17
1
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
On Wed, Feb 17, 2010 at 6:29 AM, Conrado Miranda
<miranda.conrado at gmail.com> wrote:
> First, you have to call llvm-g++ to use the llvm-gcc front end, but it
> doesn't matter here.
I got the compile command from the Kaleidoscope documentation.
> I'd like to suggest that you use pastebin to put your code and the send us
> the link, so that we can download it. The
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
First, you have to call llvm-g++ to use the llvm-gcc front end, but it
doesn't matter here.
I'd like to suggest that you use pastebin to put your code and the send us
the link, so that we can download it. The problem is that TheExecutionEngine
is set to NULL (maybe because of a previous error), but it will be really
better if you use pastebin.
On Wed, Feb 17, 2010 at 6:01 AM, Todd Rovito
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
I am new to llvm so I might be missing a critical step. My system is
Fedora 12 but this also happens in Mac OS X 10.6.2. Here are the
steps I used to compile llvm:
export TARGETS=x86,x86_64,cpp
export INSTALLDIR=/home/rovitotv/llvm
../llvm-2.6/configure --prefix=$INSTALLDIR --enable-bindings=none
--enable-targets=$TARGETS --enable-optimized
--with-llvmgccdir=$INSTALLDIR
2013 Jun 04
0
[LLVMdev] MCJIT and Kaleidoscope Tutorial
Hi Dmitri,
You might want to try replacing the call to JMM->invalidInstructionCache() with a call to TheExecutionEngine->finalizeObject(). If you are getting a non-NULL pointer from getPointerToFunction but it crashes when you try to call it, that is most likely because the memory for the generated code has not been marked as executable. That happens inside finalizeObject, which also
2012 Feb 20
1
[LLVMdev] ARM opcode format
Hello,
So the current JIT will be superseded by the MCJIT completely and no
further development should be expected for the current JIT? In any case, I
am definitely interested in submitting a patch if you could help me by
sending me in the right direction, since I really want this working.
I managed to reproduce this behavior in LLVM 3.0 by modifying llc to read
my .bc file and try to JIT the
2009 Nov 19
0
[LLVMdev] fastcc and ExecutionEngine::getPointerToFunction()
----- Original Message ----
> From: OvermindDL1 <overminddl1 at gmail.com>
> To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
> Sent: Thu, November 19, 2009 6:12:47 AM
> Subject: Re: [LLVMdev] fastcc and ExecutionEngine::getPointerToFunction()
>
> Er... Sending this to the list instead of the parent...
>
> On Thu, Nov 19, 2009 at 4:49 AM, Hans
2009 Nov 20
0
[LLVMdev] fastcc and ExecutionEngine::getPointerToFunction()
Hans Wennborg wrote:
> Yesterday I realised that if a Function has the calling convention set
> to "fast", then it is a bad idea to call it through the function pointer
> one gets from ExecutionEngine::getPointerToFunction().
>
> The problem is that when calling it from my C++ program, the call will
> be made C-style, while the function expects to be called the fastcc
2013 Jun 04
1
[LLVMdev] MCJIT and Kaleidoscope Tutorial
Hi Andrew,
Am 04.06.2013 02:13, schrieb Kaylor, Andrew:
> Hi Dmitri,
>
> You might want to try replacing the call to JMM->invalidInstructionCache() with a call to TheExecutionEngine->finalizeObject(). If you are getting a non-NULL pointer from getPointerToFunction but it crashes when you try to call it, that is most likely because the memory for the generated code has not been
2009 Nov 19
2
[LLVMdev] fastcc and ExecutionEngine::getPointerToFunction()
Yesterday I realised that if a Function has the calling convention set
to "fast", then it is a bad idea to call it through the function pointer
one gets from ExecutionEngine::getPointerToFunction().
The problem is that when calling it from my C++ program, the call will
be made C-style, while the function expects to be called the fastcc way.
Could LLVM either warn the user of this,
2010 May 13
2
[LLVMdev] Handling of thread_local globals by llc -march=cpp
Thanks for the quick reply and fix. Now it just means I have to hunt further in exploring why, in my simple test program, replacing the following line of code:
GlobalVariable* global = new GlobalVariable(*MyModule,
IntegerType::get(getGlobalContext(), 32), false, GlobalValue::ExternalLinkage, 0, "global");
with the following line of code:
GlobalVariable* global = new
2008 Apr 20
0
[LLVMdev] Function materializing in Java
On Apr 18, 2008, at 1:40 PM, Nicolas Geoffray wrote:
> Hi everyone,
>
> I would like to apply the following patch (java-materialize.patch)
> in order to materialize Java functions in vmkit. The current
> implementation is not satisfactory because the materializeFunction
> of a module provider is not supposed to do anything but read the
> bitcode, which is not the case
2009 Nov 19
2
[LLVMdev] fastcc and ExecutionEngine::getPointerToFunction()
Er... Sending this to the list instead of the parent...
On Thu, Nov 19, 2009 at 4:49 AM, Hans Wennborg <hans at hanshq.net> wrote:
> Yesterday I realised that if a Function has the calling convention set
> to "fast", then it is a bad idea to call it through the function pointer
> one gets from ExecutionEngine::getPointerToFunction().
>
> The problem is that when
2009 Oct 31
3
[LLVMdev] Something wrong with my libpthread.so
Hi,all
I tried to run the generated whole-program bitcode of BIND,but I got some
information:
0 lli 0x0000000000feda16
1 lli 0x0000000000fed88f
2 libpthread.so.0 0x0000003df340eee0
3 libc.so.6 0x0000003df28332f5 gsignal + 53
4 libc.so.6 0x0000003df2834b20 abort + 384
5 libc.so.6 0x0000003df282c2fa __assert_fail + 234
6 lli
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
2010 Oct 26
2
[LLVMdev] handle error of getPointerToFunction
Hi!
I have this scenario:
executionEngine->getPointerToFunction fails because a symbol can not be
resolved.
What can I do to catch this error? is an exception thrown? currently the
program simply
exits. returning NULL would be ok too.
-Jochen
2010 Oct 27
0
[LLVMdev] handle error of getPointerToFunction
Can you be more precise about where the error occurs? Depending on
where it is, LLVM may or may not be able to propagate the error
safely.
Reid
On Tue, Oct 26, 2010 at 4:05 PM, Jochen Wilhelmy <j.wilhelmy at arcor.de> wrote:
> Hi!
>
> I have this scenario:
> executionEngine->getPointerToFunction fails because a symbol can not be
> resolved.
>
> What can I do to