Displaying 8 results from an estimated 8 matches for "__anon_expr".
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, true);
}
CompileLayerT CompileLayer;
typedef IRCompileLayer<ObjLayerT> CompileLaye...
2019 Aug 09
2
Trouble with ORCv2 Tutorial
...Aug 8, 2019 at 3:07 PM Lang Hames <lhames at gmail.com> wrote:
>
> Hi Zeke,
>
> Thanks for pointing this out.
>
> You're right: the issue is that ORCv2 doesn't support code removal (yet). To work around that we need to rename the anonymous expression each time (e.g. __anon_expr.1, __anon_expr.2, ...). Sounds like we're not doing that at the moment. I'll try to get it fixed up shortly.
>
> Cheers,
> Lang.
>
> On Thu, Aug 8, 2019 at 11:08 AM Zeke Medley via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> Hi Praveen,
>>
>&...
2019 Aug 08
2
Trouble with ORCv2 Tutorial
...102334155.000000
I suspect that this has to do with the fact that in ORCv2 we can no
longer remove modules meaning that the code in
HandleTopLevelExpression can't wrap up by removing the most recent
module it added. The tutorial does lookups by creating a function with
no arguments names "__anon_expr", calling it, then removing it AFIK
and because ORCv2 doesn't allow for the removal part as of yet, my
hunch is that the issue is there.
Any thoughts from anyone?
If this does end up being an issue with how the tutorial looks right
now and not me making a mistake I'll happily volunte...
2016 Apr 01
0
Kaleidoscope on Windows - bug maybe found?
...i, 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 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, true);
> }
>
> CompileLayerT CompileLayer;
>...
2019 Jan 07
2
Kaleidoscope tutorial: extern functions failing
...PORT double putchard(double X) {
fputc((char)X, stderr);
return 0;
}
Other posts online suggest that this issue could be caused by not compiling
with -rdynamic, but I am.
The actual error is occuring with the following code (on the cantFail line)
auto ExprSymbol = TheJIT->findSymbol("__anon_expr");
assert(ExprSymbol && "Function not found");
// cast to double-returning function
double (*FP)() = (double (*)())(intptr_t)cantFail(ExprSymbol.getAddress());
fprintf(stderr, "Evaluated to %f\n", FP());
and some investigation with GDB reveals that the hasError fl...
2017 Feb 06
3
Kaleidoscope tutorial: comments, corrections and Windows support
...is missing
- "The KaleidoscopeJIT class is a simple JIT built specifically for
these tutorials.":
It would be nice to mention, where to find the include file:
llvm-src/examples/Kaleidoscope/include/KaleidoscopeJIT.h
- "auto ExprSymbol = TheJIT->findSymbol("__anon_expr");":
On Windows, this will always fail as this function will search for
"ExportedSymbolsOnly" and the exported flag seems to be implemented
incorrectly for COFF in LLVM (see bug report from Russell Wallace:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/0979...
2016 Mar 31
1
Kaleidoscope examples on Windows
Are the Kaleidoscope examples supposed to work on Windows? e.g.
C:\llvm\examples\Kaleidoscope\Orc\initial\toy.cpp
when I try to compile this with clang it gives compile time error
messages, and when I try with Microsoft C++ it generates an executable that
runs but crashes when I type in an expression; I get similar results with
a few of the other versions. I can give more detailed feedback if
2019 Aug 07
2
Trouble with ORCv2 Tutorial
Hi folks,
I'm working on migrating a JIT compiler from the old ORCv1 JIT APIs to
the newer ORCv2 ones and am having some trouble getting the code from
chapter 1 of the "Building a JIT" [1] tutorial working properly. I
have previously walked through the "My First Langauge" [2] tutorial
and that went smoothly using the provided JIT class, but using the one
from the JIT