Displaying 20 results from an estimated 500 matches similar to: "ORC - which example code?"
2019 Sep 19
3
"corrupted size vs. prev_size" when calling ExecutionSession::lookup()
Hi, I wrote a compiler that generate IR code and run it on the JIT, and
there randomly crashed due to "corrupted size vs. prev_size" depends on the
IR code generated from the source code.
Here's how I created the JIT:
llvm::InitializeNativeTarget();
llvm::InitializeNativeTargetAsmPrinter();
llvm::InitializeNativeTargetAsmParser();
// create jit
llvm::orc::ExecutionSession
2017 Aug 06
2
Compile issues with LLVM ORC JIT
I tree to compile the LLVM ORC JIT examples. But I'm stuck in some
problems I can't solve my own.
First at all I compile with C++14 enabled with latest stable LLVM and
clang, this means 4.0.1. I get the following error. Do I missed some
specific compile option?
Compilation looks like this here.
|CompilingcontribJIT.cpp
PWD:/home/ikuehl/projects-llvm/TurboLisp/domainEngineer
2017 Apr 09
2
Possible stack corruption during call to JITSymbol::getAddress()
Firstly, apologies if this is not the right place to be asking this
question--feel free to point me in the correct direction. I could be doing
something wrong here but stackoverflow didn't feel like the correct place
for this since there's so little there about LLVM ORC.
Basically, I have a reproduction case (below) where if I throw an exception
before I call JITSymbol::getAddress()
2017 Apr 17
2
Possible stack corruption during call to JITSymbol::getAddress()
Hi David,
This looks like bad eh-frame data due to a failure to fix up the frame
descriptor entries:
<debug: adding frame> EHFrameAddr: 0x7feae5827000, EHFrameLoadAddr:
0x00000000e5827000, EHFrameSize: 60
==64588==ERROR: AddressSanitizer: SEGV on unknown address 0x7feae5827020
(pc 0x7feae886d970 bp 0x000000000001 sp 0x7ffca10e75f8 T0)
Eyeballing the code in RuntimeDyldELF (vs
2017 Apr 20
2
Possible stack corruption during call to JITSymbol::getAddress()
Hi David,
Thanks very much for that. I'll continue to dig in as time permits, and
I'll update the bug report with my progress once it's filed.
Cheers,
Lang.
On Mon, Apr 17, 2017 at 6:42 PM, David Lurton <dlurton at gmail.com> wrote:
> Thanks Lang. I think I'll go the bug creation route. I have an email out
> to llvm-admin requesting an account on bugs.llvm.org.
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
2017 May 01
1
Possible stack corruption during call to JITSymbol::getAddress()
Hi David,
Sorry to hear. Has anyone followed up with you yet?
I've continued to dig in to this in my spare time and I've found the issue.
It's a use-after-free, rather than any sort of memory smashing. ORC is
currently failing to deregister the EH-frame section when the JIT is torn
down (but *is* deallocating the memory for it). Normally that's not
disastrous (though it does
2016 Apr 01
2
Kaleidoscope on Windows - bug maybe found?
To try to find out why it was crashing, I followed the trail of function
calls:
C:\llvm\examples\Kaleidoscope\Orc\initial\toy.cpp
auto ExprSymbol = J.findUnmangledSymbol("__anon_expr");
JITSymbol findUnmangledSymbol(const std::string Name) {
return findSymbol(mangle(Name));
}
JITSymbol findSymbol(const std::string &Name) {
return CompileLayer.findSymbol(Name,
2017 Nov 14
1
OrcJIT + CUDA Prototype for Cling
Hi Lang,
thank You very much. I've used Your code and the creating of the object
file works. I think the problem is after creating the object file. When
I link the object file with ld I get an executable, which is working right.
After changing the clang and llvm libraries from the package control
version (.deb) to a own compiled version with debug options, I get an
assert() fault.
In
void
2015 Mar 13
4
[LLVMdev] Thoughts about ExecutionEngine/MCJIT interface
Hi,
I think ExecutionEngine as a common interface for both Interpreter and
MCJIT is almost useless in the current form. There are separated methods in
ExecutionEngine for similar or the same features provided by Interpreter
and MCJIT, i.e. to get a pointer to function you should call
getPointerToFunction() for Interpreter or getFunctionAddress() for MCJIT.
Personally, I'm using MCJIT and
2017 Sep 27
2
OrcJIT + CUDA Prototype for Cling
Dear LLVM-Developers and Vinod Grover,
we are trying to extend the cling C++ interpreter
(https://github.com/root-project/cling) with CUDA functionality for
Nvidia GPUs.
I already developed a prototype based on OrcJIT and am seeking for
feedback. I am currently a stuck with a runtime issue, on which my
interpreter prototype fails to execute kernels with a CUDA runtime error.
=== How to use the
2017 May 07
2
[cfe-dev] JIT doens't resolve address - Resolve obj-Addresses?
Hi Bjoern,
CCing cfg-dev (since that's where the conversation started) and llvm-dev
(since it's relevant there).
Do you know if there is a way to obtain the fully resolved obj-code? I
> wanted to load the functions into a shared memory, but how? The only thing
> I receive is a function pointer, but I don't know how large the function
> 'behind' is. Even a call to
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
2016 May 20
0
External function resolution: MCJIT vs ORC JIT
Hi Larry,
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.
No worries. :)
I'll try to keep this in mind and make sure I address it in future
Kaleidoscope tutorial chapters - these issues tripped me up the first time
I encountered them too.
Do I even want to know what additional chickens need to be sacrificed
2016 May 22
1
External function resolution: MCJIT vs ORC JIT
>> llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr)
This is one is a bit tricky and hard to find.
I spent quiet some time digging into MC and ORC JIT execution engines trying to find what makes them work.
The problem is that this trick (LoadLibraryPermanently) happens inside of EngineBuilder, despite that the functionality belongs to a JIT engine itself, not to the builder.
I
2017 Aug 24
1
Invalid Signature of orc::RTDyldObjectLinkingLayer::NotifyLoadedFtor
Hi all, hi Lang
It's a little late to report issues for release_50, but I just found
that thing while porting my JitFromScratch examples to 5.0.
This is a really nifty detail, but (if I'm not mistaken) the function
signature of RTDyldObjectLinkingLayer::NotifyLoadedFtor is incorrect:
$ grep -h -r -A 1 "using NotifyLoadedFtor"
2020 Jan 29
3
Question about LLVM LLJIT Compile time
Hi,
We are using the new LLJIT class in our compiler. We have not been
successful using the parallel JIT feature. When we tried it previously on
multiple modules, our compile-time increased significantly. I don't know if
we are using it incorrectly, or that we miss out on optimizations we get
when running on a single merged module, but it hasn't worked for us yet. We
are pretty far behind
2019 Sep 23
4
"Freeing" functions generated with SimpleORC for JIT use-case
Hi all,
I am using LLVM for JIT use-case and compile functions on the fly. I want
to "free" the modules after some time and reclaim any memory associated
with it. I am using the SimpleORC API
<https://llvm.org/docs/tutorial/BuildingAJIT1.html> now.
Is there an API to "free" all the memory associated with the module? I use
one "compiler" instance (think similar
2019 Aug 08
6
New ORC v2 LLJIT - global variables
We are trying to switch to the new orc v2 lljit engine at my work with
hopes of parallel jitting. We are switching from the ExecutionEngine w/
OrcMCJitReplacement. We are having a hard time with global variables. We
have found a way to create/emit new globals during jitting by using the old
ExecutionEngine::getOrEmitGlobalVariable. Is there an easier way to do this
with the new jit engine? We were
2016 Apr 01
0
Kaleidoscope on Windows - bug maybe found?
Addendum: this still fails:
auto ExprSymbol = J.findSymbol("putchard");
As yet, I have no idea why - that symbol even seemed to be exported:
extern "C"
double putchard(double X) {
putchar((char)X);
return 0;
}
On Fri, Apr 1, 2016 at 2:42 AM, Russell Wallace <russell.wallace at gmail.com>
wrote:
> To try to find out why it was crashing, I followed the