Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] MCJIT versus getLazyBitcodeModule?"
2014 Jan 21
2
[LLVMdev] MCJIT versus getLazyBitcodeModule?
This is sounding rather like getLazyBitcodeModule is simply incompatible with MCJIT. Can anybody confirm that this is definitely the case? Is it by design, or by omission, or bug?
Re your option #1 and #2 -- sorry for the newbie questions, but can you point me to docs or code examples for how the linking or object caching should be achieved? If I do either of these rather than seeding my
2014 Jan 21
4
[LLVMdev] MCJIT versus getLazyBitcodeModule?
Thanks for the pointers.
Am I correct in assuming that putting the precompiled bitcode into a second module and linking (or using the object caches) would result in ordinary function calls, but would not be able to inline the functions?
-- lg
On Jan 21, 2014, at 11:55 AM, Kaylor, Andrew <andrew.kaylor at intel.com> wrote:
> I would say that the incompatibility is by design. Not
2014 Jan 10
4
[LLVMdev] Bitcode parsing performance
Hi all, I'm trying to reduce the startup time for my JIT, but I'm running
into the problem that the majority of the time is spent loading the bitcode
for my standard library, and I suspect it's due to debug info. My stdlib
is currently about 2kloc in a number of C++ files; I compile them with
clang -g -emit-llvm, then link them together with llvm-link, call opt -O3
on it, and arrive
2014 Jan 26
2
[LLVMdev] MCJIT versus getLazyBitcodeModule?
Hi Gael, I tried converting to your approach but I had some issues making
sure that all symbols accessed by the jit modules have entries in the
dynamic symbol table.
To be specific, my current approach is to use MCJIT (using an objectcache)
to JIT the runtime module and then let MCJIT handle linking any references
from the jit'd modules; I just experimented with what I think you're doing,
2014 Jan 10
3
[LLVMdev] Bitcode parsing performance
That was likely type information and should mostly be fixed up. It's still
not lazily loaded, but is going to be ridiculously smaller now.
-eric
On Fri Jan 10 2014 at 12:11:52 AM, Sean Silva <chisophugis at gmail.com> wrote:
> This Summer I was working on LTO and Rafael mentioned to me that debug
> info is not lazy loaded, which was the cause for the insane resource usage
> I
2014 Jan 23
2
[LLVMdev] Bitcode parsing performance
Adrian may have handled this recently?
On Jan 13, 2014 3:34 PM, "Manman Ren" <manman.ren at gmail.com> wrote:
> I briefly looked at the bit code files and some types are not uniqued,
> here is one example:
> !3903 = metadata !{i32 786454, metadata !3904, null, metadata !"int64_t",
> i32 198, i64 0, i64 0, i64 0, i32 0, metadata !2258} ; [ DW_TAG_typedef ]
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
all of:
----
// cout << "lsr: " << lsr << "\n";
llvm::MemoryBuffer* mbjit =
llvm::MemoryBuffer::getMemBufferCopy (sr);
------
string lsr = sr.str();
// cout << "lsr: " << lsr << "\n";
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
This segfault occuring only under valgrind,
in shell way, and in gdb way i have
Invalid bitcode signature
simple_scev_dynamic_array: /home/willy/apollo/llvm/include/llvm/Support/ErrorOr.h:258: storage_type *llvm::ErrorOr<llvm::Module *>::getStorage() [T = llvm::Module *]: Assertion `!HasError && "Cannot get value when an error exists!"' failed.
Command terminated by
2011 Feb 24
2
[LLVMdev] Valgrind memcheck errors in llvm
I have ran under valgrind memcheck the process using libLLVM-2.9.so
(rev.126022) and got several errors:
==24227== Invalid read of size 1
==24227== at 0x40274C9: memcpy (mc_replace_strmem.c:497)
==24227== by 0x40D5B84: char* std::string::_S_construct<char
const*>(char const*, char const*, std::allocator<char> const&,
std::forward_iterator_tag) (in
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
Hello Willy,
Here is the dump from one of my bitcode files:
0000000 42 43 c0 de 21 0c 00 00 25 05 00 00 0b 82 20 00
As expected, 0x42 (= B), 0x43 (= C), xc0 and 0xde are in correct order. In
your case, the first byte is read as 37 (= 0x25). I wonder why? When you
check the bytes yourself, you get expected results. When the same bytes are
read from Stream object, you get a different result (maybe
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
I mad the change, and still have the problem.
I investigate more the source code of llvm.
First, I change isRawBitcode function to print the content of the
parameter like this:
original:
http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source.html#l00081
inline bool isRawBitcode(const unsigned char *BufPtr,
const unsigned char *BufEnd) {
// These bytes sort
2013 Jun 03
5
[LLVMdev] MCJIT and Kaleidoscope Tutorial
Hi all,
I tried to modify Kaleidoscope Tutorial (toy.cpp from
llvm/examples/Kaleidoscope/Chapter7, LLVM 3.3 release branch) in order
to use MCJIT instead of JIT. I get segmentation fault when running
toy.cpp with fibonacci example from the tutorial. My modified toy.cpp is
in attachment and still works with JIT (when #define USE_MCJIT line is
commented out).
I read discussions regarding
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
2013 Dec 10
0
[LLVMdev] [RFC] MCJIT usage models
On Dec 9, 2013, at 3:59 PM, Kevin Modzelewski <kmod at dropbox.com> wrote:
> About lazy compilation, I'm still of the opinion that that's better handled
> outside of MCJIT. For the people asking for it, would it be enough to have
> a wrapper around MCJIT that automatically splits modules and adds stubs to
> do lazy compilation?
I think that would be sufficient for me.
2013 Dec 09
3
[LLVMdev] [RFC] MCJIT usage models
Another usage case, slightly different than your #1:
6. Dynamic code generation (not interactive with respect to the source code)
- app generates code IR which is compiled as needed for execution
(important difference: no waiting for a typing human in the loop,
so very different expectations about responsiveness and bottlenecks)
- compilation speed IS critical (because many such
2013 Dec 06
2
[LLVMdev] PTX generation examples?
OK, fine -- an example of MCJIT that sets up for PTX JIT would also be helpful.
On Dec 6, 2013, at 12:32 PM, Eli Bendersky <eliben at google.com> wrote:
>
> You'll have to switch to MCJIT for this purpose. Legacy JIT doesn't emit PTX.
>
> Eli
--
Larry Gritz
lg at larrygritz.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2013 Dec 09
1
[LLVMdev] PTX generation examples?
Ah, that's helpful. I knew that I'd need to end up with PTX as text, not a true binary, but I would have figured that it would come out of MCJIT. Thanks for helping to steer me away from the wrong trail.
OK, one more question: Can anybody clarify the pros and cons of generating the PTX through the standard LLVM distro, versus using the "libnvvm" that comes with the Cuda SDK?
2013 Dec 09
0
[LLVMdev] PTX generation examples?
There is no MCJIT support for PTX at the moment (mainly because PTX does
not have a binary format, and is not machine code per se).
To generate PTX at run-time, you just set up a standard codegen pass
manager like you would like an off-line compiler. The output will be a
string buffer that contains the PTX, which you can load into the CUDA
runtime.
As for determining if PTX support is compiled
2013 Dec 09
0
[LLVMdev] [RFC] MCJIT usage models
Greetings,
Larry Gritz wrote:
> Another usage case, slightly different than your #1:
>
> 6. Dynamic code generation (not interactive with respect to the source code)
> - app generates code IR which is compiled as needed for execution
> (important difference: no waiting for a typing human in the loop,
> so very different expectations about responsiveness and bottlenecks)
2016 Mar 08
3
Deleting function IR after codegen
YES. My use of LLVM involves an app that JITs program after program and will quickly swamp memory if everything is retained. It is crucial to aggressively throw everything away but the functions we still need to execute.
I've been faking it with old JIT (llvm 3.4/3.5) by using a custom subclass of JITMemoryManager that squirrels away the jitted binary code so that when I free the Modules,