Displaying 20 results from an estimated 60000 matches similar to: "[LLVMdev] Test compiler help"
2009 Aug 18
0
[LLVMdev] Test compiler help
On Sun, Aug 16, 2009 at 3:39 PM, Renato Golin <rengolin at systemcall.org>wrote:
> 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
2009 Aug 18
0
[LLVMdev] Test compiler help
On Aug 16, 2009, at 12:39 PM, Renato Golin wrote:
> 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
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 18
1
[LLVMdev] Test compiler help
>> 3. When the program is running, I'd like to print some values. As
>> Kaleidoscope "returns" the value to the JIT, it's easy to give the
>> answer, but in my case it won't happen. Do I need to create a simple
>> IR routine to print doubles or is there something easy to use for that
>> purpose?
>
> Yes, you'll probably need to
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
2009 Oct 01
3
[LLVMdev] PHI and Allocas
Hi,
I'm incrementing my toy compiler to account for variable mutations
around if/else blocks.
Reading the Kaleidoscope tutorial, I've learnt that I can substitute
the PHI node creation by allocas and retrieving the value later, if
needed. The Kaleidoscope example seems to account for one value only,
the result of:
Value *ThenV = Then->Codegen();
(...)
Value *ElseV =
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
2016 Mar 29
3
JIT compiler and calls to existing functions
True, I care more about how fast the code runs than how long it takes to
compile it. So if the symbolic approach enables better code generation,
that is a very significant advantage from my perspective.
Is there any example code or documentation you can point to for details
about how to implement the symbolic approach? Is it similar to any of the
versions of Kaleidoscope or any other extant
2016 Mar 30
4
JIT compiler and calls to existing functions
For what it's worth we did a similar thing, but
overrode RTDyldMemoryManager directly This allowed us to control where the
RAM was allocated too (e.g. guarantee it was in the low 4GB so we could use
small memory model and avoid the mov rax, xxxxxxx; call rax code generated
for x86)*, and also override findSymbol() to have the same behaviour as
described in 4).
--matt
* later issues in not
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.
2016 Mar 30
1
JIT compiler and calls to existing functions
We use an explicit relocation step to deal with this. We generate code
into a temporary memory location, then relocate it into a reserved area
of memory which is always within a small relative offset of other
interesting code. This allows us to get pc relative calls.
Philip
On 03/30/2016 05:53 AM, Matt Godbolt wrote:
> For what it's worth we did a similar thing, but
> overrode
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
2014 May 30
1
R CMD check for the R code from vignettes
Hi,
Recently I saw a couple of cases in which the package vignettes were
somewhat complicated so that Stangle() (or knitr::purl() or other
tangling functions) can fail to produce the exact R code that is
executed by the weaving function Sweave() (or knitr::knit(), ...). For
example, this is a valid document that can pass the weaving process
but cannot generate a valid R script to be source()d:
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
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
2016 Mar 30
0
JIT compiler and calls to existing functions
Can't the code generator do this opportunistically? That is, generate the
more compact instruction sequence if the address happens to be within four
gigabytes, otherwise generate the longer form?
On Wed, Mar 30, 2016 at 1:53 PM, Matt Godbolt <matt at godbolt.org> wrote:
> For what it's worth we did a similar thing, but
> overrode RTDyldMemoryManager directly This allowed us