similar to: [LLVMdev] Is using lots of in-register values in IR bad?

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] Is using lots of in-register values in IR bad?"

2011 Jul 28
0
[LLVMdev] Is using lots of in-register values in IR bad?
Erkki Lindpere <villane at gmail.com> writes: > I want to experiment with avoiding mutable state as far as I can. At > the moment there are no mutable variables -- only immutable value > types (numerics, bool, vectors, tuples) and I've been doing everything > in LLVM registers. The compiler doesn't generate a single alloca, load > or store at the moment. Ok. Do you
2011 Jul 29
0
[LLVMdev] Is using lots of in-register values in IR bad?
Hi Erkki, > I want to experiment with avoiding mutable state as far as I can. At the moment > there are no mutable variables -- only immutable value types (numerics, bool, > vectors, tuples) and I've been doing everything in LLVM registers. The compiler > doesn't generate a single alloca, load or store at the moment. > > I wonder if it was maybe a bad idea to do it this
2011 Jul 29
1
[LLVMdev] Is using lots of in-register values in IR bad?
Thanks for the reply On Fri, Jul 29, 2011 at 2:06 AM, David A. Greene <greened at obbligato.org>wrote: > Erkki Lindpere <villane at gmail.com> writes: > Ok. Do you ever need to grab the address of something on the stack? If > so you're going to need an alloca. AFAIK, it's the only way to generate > an address for a local object. This is by design of the IR and
2013 Apr 23
3
[LLVMdev] Optimize away sqrt in simple cases?
hi! I'm using LLVM 3.2. Does it optimize away llvm.pow(llvm.sqrt(x), 2) to `x` with any settings? I tried with llc -O3, but that didn't do it. Would be nice to write |v|² in my language ('v' being a 2D vector say and |...| and ...² being two separate infix "operators") -- when I could compare squares of lengths as well as lengths, and know that the sqrt is optimized
2013 Mar 20
1
[LLVMdev] Debug Info Documentation State
Thanks for the quick reply! I will keep the DIBuilder and Clang's CGDebugInfo as my reference for now. At the moment I want to stick with generating .ll -- it's somewhat easier for me to debug the output of my compiler that way, and I haven't programmed much in C/C++ for years -- mostly been a JVM guy. But at one point I may want to look into bindings or even creating a bootstrapped
2013 Mar 20
2
[LLVMdev] Debug Info Documentation State
Hi, I wanted to add debug info to my language (compiler written in Scala, outputs .ll files), but I found it really hard to do based on the documentation provided at http://llvm.org/docs/SourceLevelDebugging.html (I looked at the specific doc for LLVM 3.0 though) With LLVM 3.0, DI version 8 (which is documented there) seemed to work, except DW_TAG_auto_variable for which I used version tag 11
2013 Apr 23
0
[LLVMdev] Optimize away sqrt in simple cases?
That's a pretty seriously unsafe floating point optimization. It could be done in fast-math mode, but I doubt we currently do it. --Owen On Apr 23, 2013, at 1:12 PM, Erkki Lindpere <villane at gmail.com> wrote: > hi! > > I'm using LLVM 3.2. Does it optimize away llvm.pow(llvm.sqrt(x), 2) to `x` with any settings? I tried with llc -O3, but that didn't do it. >
2013 Mar 20
0
[LLVMdev] Debug Info Documentation State
On Wed, Mar 20, 2013 at 2:21 PM, Erkki Lindpere <villane at gmail.com> wrote: > Hi, > > I wanted to add debug info to my language (compiler written in Scala, > outputs .ll files), but I found it really hard to do based on the > documentation provided at http://llvm.org/docs/SourceLevelDebugging.html(I looked at the specific doc for LLVM 3.0 though) > > With LLVM 3.0, DI
2011 Mar 31
3
[LLVMdev] LiveValues removal
I've read that LiveValues has been removed from trunk. Did it bitrot or was simply removed because a replacement is available? If it's the former, what caused the bitrotting? If it's the latter, what's the replacement? (I've found LiveVariables but I'm not sure it can be used in a ModulePass). b.r. -- Carlo Alberto Ferraris <cafxx at strayorange.com <mailto:cafxx
2011 Mar 31
0
[LLVMdev] LiveValues removal
LiveVariables is the optimized and tested way to get variable liveness information (it's used by register allocation). Unfortunately it requires a MachineFunction to work - so you'll either need to lower to one of the built-in targets or add your own target to acquire access to this pass. Andrew On 03/31/2011 12:28 PM, Carlo Alberto Ferraris wrote: > I've read that LiveValues
2011 Jun 24
4
[LLVMdev] Missing symbols in pass stack trace
> That's a weird one. Does addr2line work? > $ addr2line -e CGF.so <address> cafxx at ubuntu:~/Projects/llvm2/Debug+Asserts/bin$ objdump -t ../lib/CGF.so | grep flatten 0000000000005622 l F .text 0000000000000aa6 _ZN12_GLOBAL__N_111CGFFunction7flattenEv 00000000000041d6 l F .text 000000000000049c _ZN12_GLOBAL__N_111CGFCallSite7flattenEv
2011 Aug 02
3
[LLVMdev] Multiple successors, single dynamic successor
Nella citazione martedì 2 agosto 2011 20:02:08, Michael Ilseman ha scritto: > I'm assuming that you're talking about a situation where this can't be > determined statically in the existing LLVM IR, but you know it's true > and want to put it in (e.g. you're the one generating LLVM IR). Correct. Or, more precisely, I'd like to investigate macro compression, i.e.
2011 Jul 31
3
[LLVMdev] SwitchInst::addCase with BlockAddress
I'm trying to figure out how to feed a blockaddress to a switch condition AND destination (basically emulating an indirectbr via a switch; I know it's not a good approach, I'm just experimenting). Suppose I have the following: SwitchInst *s = SwitchInst::Create(...); BasicBlock *bb = ...; PtrToIntInst k = new PtrToIntInst(BlockAddress::get(bb), <TYPE>, "", s);
2011 Jul 07
3
[LLVMdev] Missed optimization with indirectbr terminator
Consider this IR fragment produced after -O3: > %7: > %8 = phi i8* [ blockaddress(@0, %19), %19 ], [ %12, %11 ] > %9 = phi i32 [ %20, %19 ], [ 0, %11 ] > indirectbr i8* %8, [label %4, label %19] > > %19: > %20 = add nsw i32 %9, 1 > %21 = icmp eq i32 %9, 9999 > br i1 %21, label %16, label %7 the br in %19 should be optimized to branch directly to itself rather than going
2011 Jun 24
2
[LLVMdev] Missing symbols in pass stack trace
> Looks like your shared library is not being compiled with symbols. > Did you verify that your sources are compiled with -g? I think so, this is the makefile (based on the one in the Hello pass): > LEVEL = ../../.. > LIBRARYNAME = CGF > LOADABLE_MODULE = 1 > USEDLIBS = > > ifneq ($(REQUIRES_RTTI), 1) > ifneq ($(REQUIRES_EH), 1) > EXPORTED_SYMBOL_FILE =
2011 Jun 24
2
[LLVMdev] Missing symbols in pass stack trace
> Are you loading the shared library directly from the build directory, > or are you installing it first? I'm invoking it directly, I guess:./opt -load=CGF.so -cgf -debug test.S should I install it? (I have no idea about how to do it, though...) > If you run "file CGF.so" on the file you actually load, does it say it > is stripped or non-stripped? cafxx at
2011 Jun 24
2
[LLVMdev] Missing symbols in pass stack trace
> Try building with "make VERBOSE=1", which will show you the > command-lines passed to the compiler/linker. Post the output here. there you go: > cafxx at ubuntu:~/Projects/llvm2/lib/Transforms/cgf$ make VERBOSE=1 > llvm[0]: Compiling CGFPass.cpp for Debug+Asserts build (PIC) > if g++ -I/home/cafxx/Projects/llvm2/include >
2011 Aug 02
2
[LLVMdev] Multiple successors, single dynamic successor
Suppose I have a bb with N predecessors and N successors. What is, in your opinion, the best way to express that the bb has (dynamically) only one successor (i.e. if coming from the i-th predecessor we will always jump to the i-th successor)? b.r., -- Carlo Alberto Ferraris <cafxx at strayorange.com <mailto:cafxx at strayorange.com>> website/blog
2011 Jun 24
0
[LLVMdev] Missing symbols in pass stack trace
On Jun 24, 2011, at 10:34 AM, Carlo Alberto Ferraris wrote: > >> Looks like your shared library is not being compiled with symbols. Did you verify that your sources are compiled with -g? > I think so, this is the makefile (based on the one in the Hello pass): >> LEVEL = ../../.. >> LIBRARYNAME = CGF >> LOADABLE_MODULE = 1 >> USEDLIBS = >> >>
2011 Aug 02
0
[LLVMdev] Multiple successors, single dynamic successor
Nella citazione martedì 2 agosto 2011 22:01:13, Carlo Alberto Ferraris ha scritto: > My question is: > what is the best way to > express such relationships in LLVM IR ("best" in the sense of allowing > other optimizations to run effectively)? Bear in mind that in this > example N=2, but it may be way bigger than that. Just to clarify: I already figured out two ways to