similar to: [LLVMdev] JIT Optimization Levels?

Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] JIT Optimization Levels?"

2009 Mar 30
1
[LLVMdev] JIT Optimization Levels?
I was simply surprised because some C++ code I implemented/translated into LLVM IR ran significantly slower in the JIT than the C++ version. The code in question was mean to implement the "plus" operator in my scripting language, and had different behaviors depending on the type of the objects being added. I expected it to run faster as I was eliminating a call to a C++ function by
2009 Mar 30
0
[LLVMdev] JIT Optimization Levels?
On Mar 27, 2009, at 2:47 PM, Nyx wrote: > > Hello, > > Is there a way to control how optimized the x86 code generated by > the JIT > is? I mean the actual x86 code, not the llvm IR (I know about those > optimization passes). I would like to make it as optimized as > reasonably > possible. Then the default is what you want. By default, all the codegen
2010 Apr 04
2
[LLVMdev] Linking with C Library
I'm coding a JIT compiler for C source in OCaml, using LLVM. I'm pretty much done with the LLVM code generation. The problem is that I can't seem to call C library functions. I was told that all I needed to do to be able to link with libc functions was to declare them in my module and give them external linkage, but this does not seem to work. Please note that this is a JIT compiler. I
2010 Apr 05
2
[LLVMdev] Linking with C Library
I tried running nm - D | grep "puts" on the binary compiled by the OCaml compiler. It outputs the following: 08161b00 T camlRuntime__rt_fputs_208 08161a20 T camlRuntime__rt_puts_198 U fputs I'm assuming this means that fputs is linked dynamically, and puts is not. I tried modifying my code to use fputs instead of puts instead, but had no success, however, I still get:
2010 Apr 04
0
[LLVMdev] Linking with C Library
In C, on Linux, you would have to link your JIT compiler with -rdynamic or -Wl,-export-dynamic (they're synonyms). I'm not sure what the equivalent linker flag is for OCaml. You can see what symbols are available to the JIT with `nm -D`. On Sun, Apr 4, 2010 at 8:41 AM, Nyx <mcheva at cs.mcgill.ca> wrote: > > I'm coding a JIT compiler for C source in OCaml, using LLVM.
2009 Mar 16
2
[LLVMdev] Printing x86 ASM for Function
Hello, I would like to know how to go about printing the x86 assembly output for a compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter on doxygen. However, it takes several arguments I don't know how to fill in. Is there a helper function to create such a pass? Once I have the pass created, do I just add it to a FunctionPassManager? Thank you for your time, -
2009 Mar 17
0
[LLVMdev] Printing x86 ASM for Function
Dear Maxime, Nyx wrote: > Hello, > > I would like to know how to go about printing the x86 assembly output for a > compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter > on doxygen. However, it takes several arguments I don't know how to fill in. > Is there a helper function to create such a pass? Once I have the pass > created, do I just add it
2009 Mar 10
2
[LLVMdev] C++ Exception Handling Problem
Duncan Sands wrote: > > Hi Nyx, > >> I'm in the process of creating a JIT and I've run into a problem with >> exception handling. The situation I'm in is that my program will JIT >> functions, which will call native C++ functions (part of the run-time >> support). These native functions can throw exceptions. However, I don't >> actually want
2009 Mar 10
4
[LLVMdev] C++ Exception Handling Problem
Hello, I'm in the process of creating a JIT and I've run into a problem with exception handling. The situation I'm in is that my program will JIT functions, which will call native C++ functions (part of the run-time support). These native functions can throw exceptions. However, I don't actually want to handle these exceptions in the JITted functions. There are already try/catch
2009 Mar 15
0
[LLVMdev] Strange LLVM Crash
I don't know how to do that. Rather new to LLVM. The functions that get stripped out are native C++ functions that I'm registering in my execution engine by doing: // Create a function type object for the function llvm::FunctionType* pFuncType = llvm::FunctionType::get(returnType, argTypes, false); // Create a function object with external linkage and the specified
2009 Mar 14
3
[LLVMdev] Strange LLVM Crash
Nyx wrote: > The linkage type is set to external, I have little code snippet I use to > register those native functions in the first post of this topic. The global > DCE pass deletes the unused native functions when run. I commented it out > for now... Can you make this happen by writing a custom .ll to demonstrate the problem? For example: $ cat gdce.ll define i32 @foo() {
2010 Apr 05
3
[LLVMdev] Linking with C Library
>> You need to figure out how to pass -rdynamic to the linker, like I said before. http://llvm.org/docs/tutorial/OCamlLangImpl7.html mentions it, but I don't know enough about the ocaml build process to say whether that'll work. I believe I'm already doing that, properly by passing -ccopt -rdynamic to ocamlopt: ocamlopt -cc g++ -ccopt -rdynamic -linkall $(LIBFILES) -o alpha
2010 Feb 24
5
[LLVMdev] C Compiler written in OCaml, Pointers Wanted
Hello, For a course project, I am required to write a compiler for some language of my choice, and this compiler has to be implemented in a functional language. I have chosen create a *JIT* compiler for C source, and to implement my compiler in OCaml using LLVM for the back-end. I have experience using LLVM in C++ (I wrote a MATLAB JIT compiler not long ago), however, I am a bit puzzled as to how
2010 Mar 10
4
[LLVMdev] On-Stack Replacement & Code Patching
I am interested in writing a JIT that makes use of on-stack replacement. This essentially means that the JIT must be able to compile new versions of already compiled functions (eg: more optimized versions) and ensure that the code for the new functions is executed. I was wondering if LLVM offers any support for this. Suppose a function f calls a function g, and f is recompiled while g is running,
2009 Mar 14
5
[LLVMdev] Strange LLVM Crash
I'm implementing a JIT and getting some strange crashes. I'm unsure exactly what's causing them, but it seems to occur when I call the getReturnType() method on some LLVM function objects. More precisely, I'm registering some native C++ functions as LLVM functions through the addGlobalMapping method of an execution engine object. I then keep a pointer to those LLVM function
2010 Apr 05
0
[LLVMdev] Linking with C Library
On Sun, Apr 4, 2010 at 5:24 PM, Maxime Chevalier-Boisvert <mcheva at cs.mcgill.ca> wrote: > I tried running nm - D | grep "puts" on the binary compiled by the OCaml > compiler. It outputs the following: > > 08161b00 T camlRuntime__rt_fputs_208 > 08161a20 T camlRuntime__rt_puts_198 >        U fputs > > I'm assuming this means that fputs is linked
2009 Mar 10
0
[LLVMdev] C++ Exception Handling Problem
Hi Nyx, > I'm in the process of creating a JIT and I've run into a problem with > exception handling. The situation I'm in is that my program will JIT > functions, which will call native C++ functions (part of the run-time > support). These native functions can throw exceptions. However, I don't > actually want to handle these exceptions in the JITted functions.
2010 Apr 06
0
[LLVMdev] Linking with C Library
On Mon, Apr 5, 2010 at 3:27 PM, Nyx <mcheva at cs.mcgill.ca> wrote: > >>> You need to figure out how to pass -rdynamic to the linker, like I > said before. http://llvm.org/docs/tutorial/OCamlLangImpl7.html > mentions it, but I don't know enough about the ocaml build process to > say whether that'll work. > > I believe I'm already doing that, properly by
2017 Aug 24
2
JIT Optimization Levels
Hello, there are several optimization levels in lli like O0, O1, O2, O3. What does they mean? how the run time optimization is performed in LLVM JIT? I am working on a project where my goal is to study the impact of lli optimizations. here my IR is already optimized through opt. now i have to perform lli optimizations provided i am giving varying inputs at run time. so i suppose here my
2009 Jul 24
1
[LLVMdev] setOnlyReadsMemory / setDoesNotAccessMemory
But, which optimization pass will take advantage of those flags? As for nounwind, that means "can't throw an exception"? - Maxime John McCall-2 wrote: > > Nyx wrote: >> Hello, >> >> I'm in a situation where my code is calling many native functions. >> Sometimes, these calls are simply calls to static "accessor" methods that >>