similar to: [LLVMdev] Missing optimization in constant propagation?

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Missing optimization in constant propagation?"

2011 Jul 15
0
[LLVMdev] Missing optimization in constant propagation?
On Fri, Jul 15, 2011 at 12:21 AM, Martin Apel <martin.apel at simpack.de> wrote: > Hi all, > > I stumbled across a peculiarity regarding constant propagation that I don't understand. I'm not sure, if I oversee anything or if it's a missing feature. > > I have created the following simple test function in C: > > int times_zero(int a) > { >  return (a *
2012 Apr 17
5
[LLVMdev] Dragonegg + IR + llc = Dragonegg directly
Hi Duncan, thanks for the quick reply. I understand, that the generated code is different between the two approaches. But I would still expect IEEE rules to be respected in any case. I do not see any reason why -fPIC -fomit-frame-pointer and the like should have any impact on the results computed by the generated code. Are there any options I can set on the command line of llc to force the
2012 Apr 17
0
[LLVMdev] Dragonegg + IR + llc = Dragonegg directly
Hi Martin, > thanks for the quick reply. I understand, that the generated code is different > between the two approaches. > But I would still expect IEEE rules to be respected in any case. I do not see > any reason why -fPIC -fomit-frame-pointer > and the like should have any impact on the results computed by the generated code. probably in the direct case you are using the x86
2012 Jun 05
2
[LLVMdev] How to unroll loops in opposite loop nest order
I am trying to implement loop unrolling in a context, where lots of constant propagation has taken place. Unrolling an outer loop might make an inner loop have constant bounds, therefore I want to process the loops outside in, i.e. from parent loops to nested loops. Unfortunately the standard loop pass manager performs loop passes inside out, i.e. from nested loops to parent loops, thereby missing
2012 Jun 05
0
[LLVMdev] How to unroll loops in opposite loop nest order
On Jun 5, 2012, at 3:20 AM, Martin Apel <martin.apel at SIMPACK.de> wrote: > I am trying to implement loop unrolling in a context, where lots of constant propagation has taken place. > Unrolling an outer loop might make an inner loop have constant bounds, therefore I want to process the loops > outside in, i.e. from parent loops to nested loops. > Unfortunately the standard loop
2012 Apr 17
0
[LLVMdev] Dragonegg + IR + llc = Dragonegg directly
Hi Martin, > I tried using dragonegg to compile some numerical software of ours. I > tried out two different approaches expecting both would yield the same > results: > 1. gfortran-4.6 -fplugin=dragonegg-3.0 -o test.o test.f (I ommitted a > bunch of additional arguments for brevity) > 2. gfortran-4.6 -fplugin=dragonegg-3.0 -fplugin-arg-dragonegg-emit-ir -S > -o test.ll
2012 Apr 17
2
[LLVMdev] Dragonegg + IR + llc = Dragonegg directly
Hi all, I tried using dragonegg to compile some numerical software of ours. I tried out two different approaches expecting both would yield the same results: 1. gfortran-4.6 -fplugin=dragonegg-3.0 -o test.o test.f (I ommitted a bunch of additional arguments for brevity) 2. gfortran-4.6 -fplugin=dragonegg-3.0 -fplugin-arg-dragonegg-emit-ir -S -o test.ll test.f llc -O0 -o test.s test.ll as
2011 Aug 16
1
[LLVMdev] Missing metadata for volatile variables
Hi everyone, I am using the dragonegg plugin to produce bitcode for the following small C program: int main() { 1: int x = -5; 2: x = 6; 3: return 0; } The assignments on lines 1 and 2 are removed even when no optimization flags are specified. I tried making variable "x" volatile, which prevents the assignments from being removed, however I am no longer able to recover the original
2012 Sep 21
0
[LLVMdev] Alias Analysis accuracy
OK, with the restrict type qualifier, it is a little bit better: The IR's function signature becomes: define void @foo(i32* noalias %a, i32* noalias %b, i32* noalias %c) nounwind { Now the AA result: Function: foo: 13 pointers, 0 call sites NoAlias: i32* %a, i32* %b NoAlias: i32* %a, i32* %c NoAlias: i32* %b, i32* %c NoAlias: i32* %a, i32** %a_addr NoAlias:
2012 Sep 21
3
[LLVMdev] Alias Analysis accuracy
On Fri, Sep 21, 2012 at 3:08 PM, Welson Sun <welson.sun at gmail.com> wrote: > OK, with the restrict type qualifier, it is a little bit better: > > The IR's function signature becomes: > define void @foo(i32* noalias %a, i32* noalias %b, i32* noalias %c) nounwind > { > > Now the AA result: > Function: foo: 13 pointers, 0 call sites > NoAlias: i32* %a,
2012 Sep 21
0
[LLVMdev] Alias Analysis accuracy
Here is the result of running mem2reg then basicaa, it is even worse: (%a should be alias to %0, and partial alias to %3) opt -mem2reg -basicaa -aa-eval -print-all-alias-modref-info < foo.s > /dev/null Function: foo: 6 pointers, 0 call sites NoAlias: i32* %a, i32* %b NoAlias: i32* %a, i32* %c NoAlias: i32* %b, i32* %c PartialAlias: i32* %1, i32* %a NoAlias:
2010 Sep 23
3
[LLVMdev] where does %a_addr.0 come from?
Hi, I am studying SSA and some time ago I asked on this list how to see the phi nodes in the llvm ir output. I learned then to use this command: opt -mem2reg test.ll -S > test_mem2reg.ll However, if you look at the output (attached to this message) there is something I do not understand. At the end of the function @f at line 18, the function returns the variable %a_addr.0. However, this
2012 Jan 23
2
[LLVMdev] Possible bug in the dragonegg
Hi Duncan, >> #include<stdio.h> >> #include<string.h> >> >> int main(int argc, char** argv){ >> >> char a[8] = "aaaaaaa"; >> char b[8] = "bbbbbbb"; >> >> char *c = (char*) malloc(sizeof(char)*(strlen(a)+strlen(b)+1)); >> memcpy(c, a, strlen(a)); >> memcpy(c + strlen(a), b, strlen(b) + 1); >>
2010 Sep 23
0
[LLVMdev] where does %a_addr.0 come from?
Hi Maarten, If you look at the start of basic block 2 (bb2) you'll see the following instruction: %a_addr.0 = phi i32 [ 1, %bb ], [ 0, %bb1 ] ; <i32> [#uses=1] This is an SSA phi node which assigns a value of either 1 or 0 to %a_addr.0 depending on whether control reached the PHI node from basic block bb, or bb1. - Lang. On Thu, Sep 23, 2010 at 11:26 PM, maarten faddegon <
2008 Jun 28
2
[LLVMdev] need to store the address of a variable
Hello everybody, my problem is, that I want to get an array of pointers to all local variables in a function. This array will be used for transfering these Variables to another execution engine. I've code which generates this array, and a pointer to the target field of the array. name = variables.fname + "_pointerArray"; Instruction* pointerArray = new
2012 Jan 24
0
[LLVMdev] Possible bug in the dragonegg
Hi Pablo, I can reproduce this with the supplied IR. It is related to the use of __memcpy_chk. As far as I can see it is a bug in lli or the LLVM code generators. Can you please open a bugreport, attaching the LLVM IR. Ciao, Duncan. On 23/01/12 17:00, Pablo Barrio wrote: > Hi Duncan, >>> #include<stdio.h> >>> #include<string.h> >>> >>> int
2012 Feb 29
4
[LLVMdev] Recovering variable names from bitcode
Hello, I have been facing a few problems getting names of variables from the bitcode. The bitcode does contain debug metadata. The first problem is regarding `memtmp' variables (apparently, the original variable name is no longer present in the bitcode). The other two problems concern OpenMP. In one case, the instruction is not named and hence establishing a connection to the debug metadata
2015 Jan 15
2
[LLVMdev] Bug in InsertElement constant propagation?
I don't see a way to create a ConstantDataVector from Constant or form APFloat though. Did I oversee that? Is the solution to had a new get function in ConstantDataVector to allow that? Any hint on what would be the right fix otherwise? Thomas -----Original Message----- From: Jonathan Roelofs [mailto:jonathan at codesourcery.com] Sent: Wednesday, January 14, 2015 10:30 AM To: Raoux, Thomas
2012 Sep 21
3
[LLVMdev] Alias Analysis accuracy
Can you give an example? And is this limited to C (not C++) only? On Fri, Sep 21, 2012 at 2:52 PM, Liu, Yaxun (Sam) <Yaxun.Liu at amd.com> wrote: > I think you may add restrict type qualifier.**** > > ** ** > > Sam**** > > ** ** > > *From:* llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] *On > Behalf Of *Welson Sun > *Sent:* Friday,
2012 Feb 29
0
[LLVMdev] Recovering variable names from bitcode
On Feb 29, 2012, at 2:59 PM, Ashay Rane wrote: > I have been facing a few problems getting names of variables from the bitcode. The bitcode does contain debug metadata. The first problem is regarding `memtmp' variables (apparently, the original variable name is no longer present in the bitcode). The other two problems concern OpenMP. In one case, the instruction is not named and hence