similar to: [LLVMdev] Possible Phi Removal Pass?

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Possible Phi Removal Pass?"

2008 Jul 12
3
[LLVMdev] Little bug in LoopInfo after Rotate?
Hello, I have two for loops (one inside the other), that after indvars, looprotate, etc. (the important here is the loop rotate), is similar to this (I've stripped the real operations): define i32 @f() nounwind { entry: br label %bb1 bb1: ; preds = %bb3, %bb1, %entry %i.0.reg2mem.0.ph = phi i32 [ 0, %entry ], [ %i.0.reg2mem.0.ph, %bb1 ], [ %indvar.next9, %bb3 ] ;
2007 Sep 05
2
[LLVMdev] reg2mem pass
Hello, guys. I just tested -reg2mem pass to see how it changes my bitcode. E.g., for the following simple C code: ------------------------------------------------------------- int foo() { int i,j; int sum = 0; for (i=0; i<10; i++) { sum += i; for (j=0; j<3; j++) sum += 2; } return sum; } ------------------------------------------------------------- I could get the
2010 Apr 20
2
[LLVMdev] How to delete a instruction?
Hi, when I delete some instruction, I got some error prompt message. - %i.0.reg2mem.0 = phi i32 [ 0, %bb5 ], [ %indvar.next, %bb12 ] ; <i32> [#uses=2] - %s.0.reg2mem.0 = phi i32 [ 0, %bb5 ], [ %tmp16, %bb12 ] ; <i32> [#uses=1] - %tmp14 = tail call i32 @foobar(i32 %i.0.reg2mem.0) nounwind ; <i32> [#uses=1] - %tmp16 = add i32 %tmp14, %s.0.reg2mem.0 ; <i32>
2010 Dec 17
0
[LLVMdev] Branch delay slots broken.
On 12/17/2010 02:01 PM, Bruno Cardoso Lopes wrote: > Hi Richard, > >> You changes work for me also. I applied something similar to the Mips CG >> and they worked there also. Thanks again. > > I can't reproduce the same problem here for Mips using clang, could > you please attach the bitcode you used? > Thanks > Hi Bruno, This was the bitcode from a simple
2012 Jan 23
1
[LLVMdev] How to identify the first BB in a loop of non-constant trip count?
Hi, The compilation of the following code void f(int *a, int b[], int n) { int i; for(i=0; i< n; ++i) a[i] = b[i]; } gives the IR: define void @f(i32* nocapture %a, i32* nocapture %b, i32 %n) nounwind { %1 = icmp sgt i32 %n, 0 br i1 %1, label %.lr.ph, label %._crit_edge .lr.ph: ; preds = %0 %tmp = zext i32 %n to i64 br label %2 ;
2010 Sep 07
2
[LLVMdev] loop fusion
Is there a transformation in LLVM that will perform loop fusion? http://en.wikipedia.org/wiki/Loop_fusion I have the following program, in which I would like the 2 loops (iterating the same number of times) to be merged into 1, after which other nice optimizations such as mem2reg will apply: ; ModuleID = 'test' define void @vector([16 x float]* nocapture %arg, [16 x float]* nocapture
2007 Feb 05
1
[LLVMdev] Misc optimization issue
This is from 'early JIT tests' thread on comp.lang.misc. Given :- int ltst(int x) { int i, j; j=0; for(i=0; i<x; i++)j++; return(j); } This is from the online LLVM compiler. AND It does not seem to optimize it down ! ; ModuleID = '/tmp/webcompile/_24843_0.bc' target datalayout = "e-p:32:32" target endian = little target pointersize = 32 target triple =
2007 Aug 25
2
[LLVMdev] constructing 'for' statement from LLVM bitcode
Hello, guys. I am trying to construct higher-level 'for' from the low-level LLVM bitcode(ver 1.9). It's partly successful thanks to David A. Greene's advice suggested to use Control Dependence Graph(CDG). I could find which BB contributes to form which loop with CDG. For example, for this simple function: ----------------------------------------------------------- void bsloop(int
2009 Oct 13
0
[LLVMdev] Detecting reduction operations
> Hi Scott, > > Do you mean loop carried dependencies? There is some initial work on > dependence analysis, but it is still pretty young. We also have support for > dependence between memory operations that are not loop aware. > > -Chris I think the dependence analysis will have to be loop aware. For example: bb: %indvar = phi i64 [ 0, %bb.nph ], [ %indvar.next,
2011 Jul 26
0
[LLVMdev] XOR Optimization
Hi Duncan, when I run "opt -std-compile-opts" on the original source code it has the same output of O3. when I run "opt -std-compile-opts" on the -O3 optimized code, things get even more weird, it outputs the following code: while.body: ; preds = %while.body, %entry %indvar = phi i32 [ 0, %entry ], [ %indvar.next.3, %while.body ] %tmp
2010 Apr 01
1
[LLVMdev] Ho to generate VAARG?
Hello, LLVMers! How can I force a front end to generate VAARG for accessing varargs parameters? I compile a simple C-code: #include <stdarg.h> int FnVarArgs(int a, ...) { int i,tmp=0; va_list ptArgument; va_start(ptArgument,a); for(i=0;i<9;i++) tmp+= va_arg(ptArgument,int); return tmp; } And then have this bytecode: ; ModuleID = 'main.bc' target
2010 May 29
1
[LLVMdev] Vectorized LLVM IR
On Sat, May 29, 2010 at 1:18 AM, Eli Friedman <eli.friedman at gmail.com> wrote: > On Sat, May 29, 2010 at 12:42 AM, Stéphane Letz <letz at grame.fr> wrote: >> >> Le 29 mai 2010 à 01:08, Bill Wendling a écrit : >> >>> Hi Stéphane, >>> >>> The SSE support is the LLVM backend is fine. What is the code that's generated? Do you have some
2010 May 29
0
[LLVMdev] Vectorized LLVM IR
On Sat, May 29, 2010 at 12:42 AM, Stéphane Letz <letz at grame.fr> wrote: > > Le 29 mai 2010 à 01:08, Bill Wendling a écrit : > >> Hi Stéphane, >> >> The SSE support is the LLVM backend is fine. What is the code that's generated? Do you have some short examples of where LLVM doesn't do as well as the equivalent scalar code? >> >> -bw >>
2010 May 29
3
[LLVMdev] Vectorized LLVM IR
Le 29 mai 2010 à 01:08, Bill Wendling a écrit : > Hi Stéphane, > > The SSE support is the LLVM backend is fine. What is the code that's generated? Do you have some short examples of where LLVM doesn't do as well as the equivalent scalar code? > > -bw > > On May 28, 2010, at 12:13 PM, Stéphane Letz wrote: We are actually testing LLVM for the Faust language
2008 Dec 09
1
[LLVMdev] scalar-evolution + indvars fail to get the loop trip count?
Hi, Seems pass scalar-evolution+indvars fail to get the loop trip count of the following case: int foo(int x, int y, int lam[256], int alp[256]) { int i; int z = y; for (i = 255; i >= 0; i--) { z += x; lam[i] = alp[i]; } return z; } The final optimized ll code is : define i32 @foo(i32 %x, i32 %y, i32* %lam, i32* %alp) nounwind { entry: br label %bb bb:
2005 Feb 22
0
[LLVMdev] Area for improvement
On Mon, 21 Feb 2005, Jeff Cohen wrote: > I noticed that fourinarow is one of the programs in which LLVM is much slower > than GCC, so I decided to take a look and see why that is so. The program > has many loops that look like this: > > #define ROWS 6 > #define COLS 7 > > void init_board(char b[COLS][ROWS+1]) > { > int i,j; > > for
2005 Feb 22
2
[LLVMdev] Area for improvement
Sorry, I thought I was running selection dag isel but I screwed up when trying out the really big array. You're right, it does clean it up except for the multiplication. So LoopStrengthReduce is not ready for prime time and doesn't actually get used? I might consider whipping it into shape. Does it still have to handle getelementptr in its full generality? Chris Lattner wrote:
2010 Apr 20
0
[LLVMdev] How to delete a instruction?
lucefe wrote: > Hi, > > when I delete some instruction, I got some error prompt message. Deleting instructions can be a little tricky. The problem is that you can't delete an instruction until there are no other instructions that are using it. There are two things that you can do: 1) Order your deletions so that the instructions at the end of def-use chains are deleted first;
2010 Sep 07
0
[LLVMdev] loop fusion
Is there a transformation in LLVM that will perform loop fusion? http://en.wikipedia.org/wiki/Loop_fusion I have the following program, in which I would like the 2 loops (iterating the same number of times) to be merged into 1, after which other nice optimizations such as mem2reg will apply: ; ModuleID = 'test' define void @vector([16 x float]* nocapture %arg, [16 x float]* nocapture
2010 Sep 08
0
[LLVMdev] loop fusion
I did find this note from 2004 that references a LoopFusion pass, but I can't find it in the source code: http://nondot.org/sabre/LLVMNotes/LoopOptimizerNotes.txt A little background - I'm working on a SIMD runtime, where I have a scalar program but need to execute it on multiple independent data elements. One approach is to generate a loop for each operation, then rely on the