Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] newbie question: "saving" modules"
2014 Dec 26
2
[LLVMdev] Function calls only being JIT'd once by Kaleidoscope with MCJIT?
Hi all,
Starting from Chapter 4 of the Kaleidoscope tutorial (where the JIT
support is added), there's some strange behaviour,
ready> def foo(x y) x+y;
ready> Read function definition:
define double @foo(double %x, double %y) {
entry:
%addtmp = fadd double %x, %y
ret double %addtmp
}
ready> foo(1, 2);
ready> Evaluated to 3.000000
ready> foo(3, 4);
ready> Evaluated to
2016 Aug 29
2
cmake configuration changes to build Kaleidoscope outside of llvm examples src tree
I try to understand cmake build configuration. As an example, I copied
Kaleidoscope from llvm examples to some other directory (e.g.,
/tmp/Kaleidoscope). What change(s) that I need to make to "CMakkeLists.txt"
in order to build Kaleidoscope from /tmp/Kaleidoscope?
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
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
2015 Jan 16
2
[LLVMdev] Function calls only being JIT'd once by Kaleidoscope with MCJIT?
Oh - I know what this is. You were running this on Linux, right?
On MacOS I think the symbol is getting double mangled while going through
MCJIT::getSymbolAddress, hence the failure: The IR level foo function gets
compiled to "_foo" in the object file, and then "_foo" gets mangled to
"__foo" when we look it up. Linux doesn't do assembly level name-mangling,
so
2009 Oct 04
4
[LLVMdev] LLVMdev Digest, Vol 64, Issue 5
Where exactly is this mythical Kaleidoscope example? I have llvm 2.5 installed.
examples dsw$ ls
BrainF Fibonacci Makefile ParallelJIT
CMakeLists.txt HowToUseJIT ModuleMaker
> Date: Sat, 3 Oct 2009 21:40:44 +0100
> From: Renato Golin <rengolin at systemcall.org>
> Subject: Re: [LLVMdev] LLVM-Kaleidoscope tutorial
>
> 2009/10/3 Remy Demarest <remy.demarest at
2017 Sep 25
1
Some questions regarding ORC JIT apis
Hi Dibyendu
> On Windows 10 64-bit, with
> dynamic linking - I found one unexpected behaviour - the findSymbol()
> is unable to locate the JIT compiled function in the module if search
> for "exported" only is true ... even though the function is defined as
> having ExternalLinkage. I have to test on Linux / Mac OSX to see if
> the behaviour is different there.
2015 Jan 16
3
[LLVMdev] Function calls only being JIT'd once by Kaleidoscope with MCJIT?
Cheers Lang!
You were right, I was testing this on Linux.
I was planning on committing these changes with the corresponding
changes to the Kaleidoscope tutorial walk-through. Might be a bit of a
surprise to have no explanation of what MCJITHelper and friends is
doing.
I'll try and make time to prepare some patches along these lines, as
well as updating future chapters with the same fix.
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
2015 Aug 20
2
Linking existing functions from JITed code
Lang,
I added the add/get global mapping to my kaleidoscope JIT, but I think perhaps these would make more sense if they were added to the object linking layer as they would be generally usable there.
On Aug 19, 2015, at 11:19 PM, Andy Somogyi wrote:
> Hey Lang,
>
> I've added this to my Kaleidoscope JIT, and it seems to work just fine, basically I copied the global mapping
2017 Sep 23
0
Some questions regarding ORC JIT apis
Hi,
On 22 September 2017 at 15:33, Dibyendu Majumdar <mobile at majumdar.org.uk> wrote:
> I am looking to port my MCJIT based implementation to ORC. I have been
> reading up on the ORC tutorials, but am not clear on how to do
> following:
>
> I would like to discard everything other than the compiled code after
> compiling a module.
> A module may have more than one
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,
2014 Jul 25
2
[LLVMdev] Reminder: Please switch to MCJIT, as the old JIT will be removed soon.
Hi Everyone,
If you're JITing with LLVM and haven't made the switch to MCJIT already,
now is the time. As per discussions on the mailing list and at the last dev
meeting, LLVM 3.5 will be the last release to support the old JIT
infrastructure. Now that LLVM 3.5 has branched, we plan to start removing
the old JIT from the mainline.
If you're looking for help in making the switch, Andy
2012 Sep 10
1
[LLVMdev] OCaml bindings broken in trunk
On Sep 10, 2012, at 3:34 PM, Bob Wilson wrote:
> Didn't Benjamin already fix this in svn 163502?
Looks that way..
> On Sep 10, 2012, at 10:08 AM, Chad Rosier <mcrosier at apple.com> wrote:
>
>>
>> On Sep 7, 2012, at 3:40 PM, Nuno Lopes wrote:
>>
>>> The linking issue is a recent breakage.
>>> I traced it back to r163175. Basically
2010 Nov 16
2
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
Hi Dan,
The tutorial in r119335 does not build : the basicAA pass creation needs to be declared. This is addressed with the 'missing-include' patch, which updates both source code & documentation.
The second point is that beside basicAA, to get the optimizations as shown in the tutorial, (sin(x)*sin(x) -> sin(x)^2), some attributes need to be set on 'sin'. Patch
2010 Nov 15
1
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
SUCCESS!
Sorry, I had removed the addFnAttr() call by accident. Using the basicAA pass and ReadOnly, as you suggested, works like a charm!
:)
> -----Original Message-----
> From: Rob Pieke
> Sent: Monday, November 15, 2010 4:40 PM
> To: 'Duncan Sands'
> Cc: 'llvmdev at cs.uiuc.edu'; 'Dan Gohman'
> Subject: RE: [LLVMdev] Optimization of calls to
2009 Mar 25
3
[LLVMdev] LLVM and GMP
Hello
I've been looking to LLVM, in order to develop a compiler for a
cryptography oriented language. I started by following the tutorials on
Kaleidoscope, and I must say they were very usefull. Now I need to use
GMP, so i can add Big Integer support. I am trying to change
Kaleidoscope to support BigIntegers instead of doubles, but I don't
really know how to do that. I'd really
2009 Aug 16
4
[LLVMdev] Test compiler help
Hi all,
I'm writing a test compiler to understand the overall structure of
LLVM and I managed to produce IR for expressions, functions and
function calls.
I'm following the Kaleidoscope example and had a hard time de-tangling
the language specifics from LLVM syntax. Anyhow, I got here and I'd
like some more specific help to finish my example.
My very simple language has global
2015 Aug 20
2
Linking existing functions from JITed code
Hi Andy,
I think that makes sense. I'm currently rewriting the core Kaleidoscope
tutorials - I'll look at adding support for this.
- Lang.
On Fri, Aug 14, 2015 at 7:38 AM, Andy Somogyi <andy.somogyi at gmail.com>
wrote:
> After some fiddling with it, it does in fact look like it works as you
> describe Lang.
>
> The trick was you had to call
>
>
2011 May 09
2
[LLVMdev] How does Timer work?
I slightly modified the Kaleidoscope example to print the timing data using
the NamedRegionTimer as below:
// Run the main "interpreter loop" now.
{
const char *GroupName = "MainLoop";
NamedRegionTimer T("Kaleidoscope", GroupName, true);
MainLoop();
}
My assumption was that when T goes out of scope, it will emit the data on
the command line. But I see
2019 Jan 07
2
Kaleidoscope tutorial: extern functions failing
Hi all,
I am new to LLVM and have been working through the Kaleidoscope tutorial.
Everything is working fine so far except for local externs (as opposed to
things like the math functions, which are working). Note that I have seen
this bug with the reference code listing, as well as my own code. link to
code: https://llvm.org/docs/tutorial/LangImpl05.html#full-code-listing
[c34n10 kaleidoscope]