search for: nikander

Displaying 20 results from an estimated 34 matches for "nikander".

2011 Jan 12
4
[LLVMdev] How to define a global variable?
Hi, I'm trying to define a mutable variable, outside functions. The code below is trying to evaluate an expression much like "x = 1" at the module level in Python. It appears that when it tries to JIT the function there is an error because there is no storage allocated for 'x'. How do I do that? thanks, Rob ----- dumped IR ----- ; ModuleID = 'repl-module' %0 =
2011 Jan 12
2
[LLVMdev] How to define a global variable?
On Wed, Jan 12, 2011 at 6:08 PM, Renato Golin <rengolin at systemcall.org> wrote: > On 12 January 2011 22:28, Rob Nikander <rob.nikander at gmail.com> wrote: >> @x = external global %0* > > Hi Rob, > > Try removing the 'extern', as it implies the variable storage is > elsewhere (ie. another object file). > I have to pass something from the LinkageTypes enum to the constructor. I...
2010 Jun 04
5
[LLVMdev] Speculative phi elimination at the top of a loop?
...ll, which then can be inlined. Being a newbie with LLVM (but with quite some past experience with GCC from 1999-2000), I'd be interested in any ideas of how to approach this. Would the best way be to add an option to -loop-unroll, and hack away at lib/Transforms/Utils/LoopUnroll.cpp? --Pekka Nikander
2011 Jan 12
0
[LLVMdev] How to define a global variable?
On 12 January 2011 22:28, Rob Nikander <rob.nikander at gmail.com> wrote: > @x = external global %0* Hi Rob, Try removing the 'extern', as it implies the variable storage is elsewhere (ie. another object file). cheers, --renato
2011 Jan 13
0
[LLVMdev] How to define a global variable?
On Wed, Jan 12, 2011 at 11:28 PM, Rob Nikander <rob.nikander at gmail.com> wrote: > I'm trying to define a mutable variable, outside functions.  The code > below is trying to evaluate an expression much like "x = 1" at the > module level in Python.  It appears that when it tries to JIT the > function there is an...
2010 Jun 04
0
[LLVMdev] Speculative phi elimination at the top of a loop?
Hi, On Fri, Jun 4, 2010 at 5:18 AM, Pekka Nikander <pekka.nikander at nomadiclab.com> wrote: >  Would the best way be to add an option to -loop-unroll, and hack away at lib/Transforms/Utils/LoopUnroll.cpp? Instead, the better alternative is to write another pass similar to LoopUnrollPass.cpp (say LoopPeelPass.cpp) and add new option -loop...
2010 Jun 04
0
[LLVMdev] Speculative phi elimination at the top of a loop?
On Fri, Jun 4, 2010 at 8:18 AM, Pekka Nikander <pekka.nikander at nomadiclab.com> wrote: > I am working on heavily optimising unusually static C++ code, and have encountered a situation where I basically want an optimiser that would speculatively unroll a loop to see if the first round of the loop could be optimised further.  (I happen...
2011 Jan 13
0
[LLVMdev] How to define a global variable?
On 12 January 2011 23:38, Rob Nikander <rob.nikander at gmail.com> wrote: > I have to pass something from the LinkageTypes enum to the > constructor.  I tried others, like GlobalVariable::InternalLinkage, > which dumps as "internal global" but the error was the same. To be honest, your IR is a bit odd. I'm...
2010 Jul 01
0
[LLVMdev] Fail to unroll loop on simple examples.
...y a conditional branch. The source code for that is on line 116 (or so) in lib/Transforms/Utils/LoopUnroll.cpp Based on a quick look at the source code, this looks like a bug in LLVM to me, e.g. perhaps the test is applied on a wrong block? But more probably I am just missing something. --Pekka Nikander On 2010-07 -01, at 13:48 , Claude Helmstetter wrote: > Hi all, > > I have tried to use the loop-unroll pass on a large example, but without success. So I have tried on smaller examples, and I did not get more success. > > My simplest example is attached. It comes from this C code...
2010 Jul 01
2
[LLVMdev] Fail to unroll loop on simple examples.
Hi all, I have tried to use the loop-unroll pass on a large example, but without success. So I have tried on smaller examples, and I did not get more success. My simplest example is attached. It comes from this C code (using llvm-gcc, but similar result with clang): int main (int argc, char *argv[]) { int i; for (i = 0; i!=5; ++i) {} return 0; } I use this command (version 2.8svn, from
2011 Feb 12
1
[LLVMdev] One or many modules with the JIT?
Hi, I'm at the beginning stages of building a language that uses the JIT, and works like a scripting language in that you run the source files without explicit compilation. I'd like to start using modules in the source language. Usually a module will correspond to a file. I'm wondering if I should also use separate LLVM modules, or keep compiling everything to the single module
2011 Mar 20
0
[LLVMdev] how to debug with interpreter
...ou can pass -force-interpreter to lli or pass args to the execution engine creation, but the interpreter is considered incomplete and buggy. Its original purpose was to help debug the JIT, but now the JIT works reliably, so it hasn't been maintained. Reid On Fri, Mar 18, 2011 at 7:26 PM, Rob Nikander <rob.nikander at gmail.com> wrote: > Hi, > > I'm using the JIT execution engine for my language, and I'm finding it > extremely painful to find bugs in generated code.  I get a "seg fault" > and I can't see where it happened.  Writing a debugger or generat...
2011 Mar 21
1
[LLVMdev] how to debug with interpreter
On Sun, Mar 20, 2011 at 11:56 AM, Reid Kleckner <reid.kleckner at gmail.com> wrote: > Alternatively, if you're on Linux, there's the gdb-jit interface, > which should give you symbols and unwind tables without any extra > effort on your part: > http://llvm.org/docs/DebuggingJITedCode.html This page says to run `lli -jit-emit-debug myfile.bc' under gdb. Does the
2011 Mar 19
2
[LLVMdev] how to debug with interpreter
Hi, I'm using the JIT execution engine for my language, and I'm finding it extremely painful to find bugs in generated code. I get a "seg fault" and I can't see where it happened. Writing a debugger or generating info for GDB seems like too much work at this point. Is there a way to use the Interpreter to run this code, stepping through and printing the LLVM
2010 Sep 29
3
[LLVMdev] Associating types directly with debug metadata?
...ode? With that, would LLVM be able to deal with the type-associated metadata, or is there something in the LLVM side that I'm missing? Once that works, I guess I need to ask how to extend clang to emit the information, but the right place for that would be cfe-dev, wouldn't it? --Pekka Nikander
2010 Sep 29
0
[LLVMdev] Associating types directly with debug metadata?
On Sep 29, 2010, at 4:30 AM, Pekka Nikander wrote: > We would need to access the LLVM debug metadata type information directly from LLVM types. It looks like the current clang and llvm-gcc don't support such an association, nor appears the LLVM itself do. True. I am curious how do you want to use this association ? > > Then...
2010 Sep 30
3
[LLVMdev] Associating types directly with debug metadata?
On Sep 30, 2010, at 1:30 AM, Pekka Nikander wrote: >>>> Would the right starting point be to simply add an MDNode pointer to the Type class? That should be then convertible to a DIType? >>> >>> We want to avoid any Type class modification. Instead you can use pair in named metadata to match metadata with ty...
2010 Sep 29
3
[LLVMdev] Associating types directly with debug metadata?
>> We would need to access the LLVM debug metadata type information directly from LLVM types. It looks like the current clang and llvm-gcc don't support such an association, nor appears the LLVM itself do. > > True. I am curious how do you want to use this association ? Thanks for you advice below, Devang. We are using LLVM type definitions + debug metadata to interpret binary
2010 Oct 06
0
[LLVMdev] Associating types directly with debug metadata?
Pekka Nikander wrote: >>>> I thought about that more, and I think the "right" way would be to have a syntax like >>>> >>>> !21 = metadata !{ typeval %struct.T, metadata !11 } >>>> >>>> to avoid the problem with the keyword 'type'. >&...
2011 Jan 12
2
[LLVMdev] using llvm as library from xcode project?
Hi all, I just downloaded and compiled LLVM and I'd like to use the JIT API in a project that I've got in Xcode.  I'm confused because I thought I could use LLVM like a library, but it seems I can't simply include some headers and link to lib, as usual. Or can I? I don't see a framework or dylib file, which I would usually add to my Xcode project. The /usr/local/lib