search for: bb3

Displaying 20 results from an estimated 164 matches for "bb3".

Did you mean: bb
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 ] ; <i32> [#uses=4] %j.0.reg2mem.0 = phi i32 [ 0, %entry ], [ %indvar.next, %bb1 ], [ 0, %bb3 ] ; <i32> [#uses=3] %indvar.next = add i32 %j.0.reg2mem.0,...
2010 Jul 18
2
[LLVMdev] How to insert a basic block in an edge
...ss and it need to be non-null. But I could not figure out how to use it. Please help me out. Regards, Chayan On Sat, Jul 17, 2010 at 10:16 PM, Nick Lewycky <nicholas at mxc.ca> wrote: > Chayan Sarkar wrote: >> >> Hi all, >> >> Suppose in a CFG bb1 has two succesor bb3 and bb4, and bb3 has two >> predecessor bb1 and bb2. Now how can I insert a basic block between >> bb1 and bb3 that at the edge bb1-->bb3 . >> >> In general how can I insert a basic block on an edge? > > Use llvm::SplitEdge in Transforms/Utils/BasicBlockUtils.h. &gt...
2010 Jul 17
2
[LLVMdev] How to insert a basic block in an edge
Hi all, Suppose in a CFG bb1 has two succesor bb3 and bb4, and bb3 has two predecessor bb1 and bb2. Now how can I insert a basic block between bb1 and bb3 that at the edge bb1-->bb3 . In general how can I insert a basic block on an edge? Regards, Chayan
2010 Jul 20
2
[LLVMdev] How to insert a basic block in an edge
...> >> Regards, >> Chayan >> >> On Sat, Jul 17, 2010 at 10:16 PM, Nick Lewycky<nicholas at mxc.ca>  wrote: >>> >>> Chayan Sarkar wrote: >>>> >>>> Hi all, >>>> >>>> Suppose in a CFG bb1 has two succesor bb3 and bb4, and bb3 has two >>>> predecessor bb1 and bb2. Now how can I insert a basic block between >>>> bb1 and bb3 that at the edge bb1-->bb3 . >>>> >>>> In general how can I insert a basic block on an edge? >>> >>> Use llvm::Spli...
2010 Jul 17
0
[LLVMdev] How to insert a basic block in an edge
Chayan Sarkar wrote: > Hi all, > > Suppose in a CFG bb1 has two succesor bb3 and bb4, and bb3 has two > predecessor bb1 and bb2. Now how can I insert a basic block between > bb1 and bb3 that at the edge bb1-->bb3 . > > In general how can I insert a basic block on an edge? Use llvm::SplitEdge in Transforms/Utils/BasicBlockUtils.h. The technique is to create...
2010 Nov 17
1
[LLVMdev] Copy Instruction from one Basic block to another
...m structure: bb / \ bb1 bb2 \ / bb3 | bb4 Now I want to create a new basic block, say bb5 between bb2 & bb3, copy some instructions from bb3 to bb5. Then I want to add between bb2 and bb3, then outgoing edge from...
2010 Jul 18
0
[LLVMdev] How to insert a basic block in an edge
...;t you doing your transforms inside of a Pass? Nick > Regards, > Chayan > > On Sat, Jul 17, 2010 at 10:16 PM, Nick Lewycky<nicholas at mxc.ca> wrote: >> Chayan Sarkar wrote: >>> >>> Hi all, >>> >>> Suppose in a CFG bb1 has two succesor bb3 and bb4, and bb3 has two >>> predecessor bb1 and bb2. Now how can I insert a basic block between >>> bb1 and bb3 that at the edge bb1-->bb3 . >>> >>> In general how can I insert a basic block on an edge? >> >> Use llvm::SplitEdge in Transforms/Util...
2014 May 22
2
[LLVMdev] RFC: Indexing of structs vs arrays in getelementpointer
...br i1 %tmp4, label %bb1, label %bb2 bb1: ; preds = %bb5 %tmp10 = getelementptr inbounds %struct2* %dm, i64 %tmp9, i32 0 br label %bb3 bb2: ; preds = %.lr.ph.i.i %tmp20 = getelementptr inbounds %struct2* %dm, i64 %tmp9, i32 1...
2010 Jul 21
0
[LLVMdev] How to insert a basic block in an edge
...Chayan >>> >>> On Sat, Jul 17, 2010 at 10:16 PM, Nick Lewycky<nicholas at mxc.ca>  wrote: >>>> >>>> Chayan Sarkar wrote: >>>>> >>>>> Hi all, >>>>> >>>>> Suppose in a CFG bb1 has two succesor bb3 and bb4, and bb3 has two >>>>> predecessor bb1 and bb2. Now how can I insert a basic block between >>>>> bb1 and bb3 that at the edge bb1-->bb3 . >>>>> >>>>> In general how can I insert a basic block on an edge? >>>> >&gt...
2011 Jan 27
0
[LLVMdev] Update PHINode after extracting code
I guess I didn't have a clear question. Suppose we have BB1 and BB2 both point to BB3. BB1 has variable x. BB2 also as variable x. BB3 will have PHINode for x with 2 value from BB1 and BB2. BB1 BB2 \ / BB3 Now if BB1 and BB2 is extracted into a function (using ExtractCodeRegion), they will be replaced by a basic block called codeRepl (which has a call to the extract...
2011 Jan 27
2
[LLVMdev] Update PHINode after extracting code
On 01/26/2011 07:50 PM, Vu Le wrote: > I guess I didn't have a clear question. > > Suppose we have BB1 and BB2 both point to BB3. > BB1 has variable x. BB2 also as variable x. > BB3 will have PHINode for x with 2 value from BB1 and BB2. > BB1 BB2 > \ / > BB3 > > Now if BB1 and BB2 is extracted into a function > (using ExtractCodeRegion), they will be replaced by > a basic block ca...
2011 Jan 25
2
[LLVMdev] Update PHINode after extracting code
Hi all, I have problem with ExtractCodeRegion (CodeExtractor.cpp). My original program is as follows. bb: ... %tmp.15 = load %struct.MYSQL_ROWS** %3, align 4 ... bb1: ... %tmp.1 = load %struct.MYSQL_ROWS** %6, align 4 ... bb4: ; preds = %bb1, %bb, %entry %tmp.0 = phi %struct.MYSQL_ROWS* [ null, %entry ], [ %tmp.15, %bb ], [ %tmp.1, %bb1 ]
2009 Jan 06
2
[LLVMdev] LLVM Optmizer
...pc-linux-gnu" define i32 @TESTE2(i32 %parami, i32 %paraml, double %paramd) nounwind readnone { entry: %0 = shl i32 %parami, 1 ; <i32> [#uses=1] %varx.110 = add i32 %0, %paraml ; <i32> [#uses=2] %1 = icmp slt i32 %paraml, 1 ; <i1> [#uses=1] br i1 %1, label %bb5, label %bb3 bb3: ; preds = %bb3, %entry %indvar = phi i32 [ %indvar.next, %bb3 ], [ 0, %entry ] ; <i32> [#uses=3] %2 = add i32 %indvar, 2 ; <i32> [#uses=1] %3 = icmp sgt i32 %2, %paraml ; <i1> [#uses=1] %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1] br i1 %3, label %bb5....
2007 Sep 05
2
[LLVMdev] reg2mem pass
...%bb8.outer bb8.outer: ; preds = %bb10, %entry %indvar26 = phi uint [ 0, %entry ], [ %indvar.next27, %bb10 ] ; <uint> [#uses=2] %sum.0.pn.ph = phi int [ 0, %entry ], [ %sum.1, %bb10 ] ; <int> [#uses=1] %i.0.0.ph = cast uint %indvar26 to int ; <int> [#uses=1] br label %bb8 bb3: ; preds = %bb8 %indvar.next = add uint %indvar, 1 ; <uint> [#uses=1] br label %bb8 bb8: ; preds = %bb3, %bb8.outer %indvar = phi uint [ 0, %bb8.outer ], [ %indvar.next, %bb3 ] ; <uint> [#uses=2] %sum.0.pn = phi int [ %sum.1, %bb3 ], [ %sum.0.pn.ph, %bb8.outer ] ; <int>...
2010 May 08
2
[LLVMdev] Remove identical or redundant basic blocks?
...sider identical or redundant. For instance, return: ; preds = %min.exit ret i32 0 bb15: ; preds = %min.exit ret i32 0 or, bb7.i: ; preds = %bb1.i br label %bb3.i bb9.i: ; preds = %bb1.i br label %bb3.i I think it is safe to remove the blocks bb7.i, bb9.i, bb15 while replacing each jump to bb15 with return and jumps to bb7.i, bb9.i with bb3.i. Is there any opt pass I can apply to the code to merge or remov...
2013 Jul 30
2
[LLVMdev] Eliminating PHI with Identical Inputs
...l, Is there a pass (or set of passes) that will replace a phi whose input operands all compute the same value with an instruction that computes that value? In other words, something that will convert: define internal i32 @function(i32 %x) { ... bb1: %y = add %x, 10 ... bb2: %z = add %x, 10 ... bb3: %phi = [bb1, %y], [bb2, %z] into define internal i32 @function(i32 %x) { ... bb1: ... bb2: ... bb3: %phi = add %x, 10 -- John T.
2014 Apr 01
2
[LLVMdev] Construction of SCEVAddRecExpr
Hello, I'm studying how the SCEV analyzis works and how to use it and I could not create an example where the SCEV analyzis identifies an expression as "SCEVAddRecExpr". Aren't the expressions below the kind of pattern that should be represented as a "AddRecExpr" ? SCEV: (1 + (2 * %3) or SCEV: (%1 + (2 * %3) or SCEV: (%1 + (%2 * %3) In my experiments they are
2012 Feb 03
5
[LLVMdev] Updating PHI for Instruction Domination?
So my best bet is to try and work in reg2mem mode and then go back to mem2reg? I'm curious, it seems though when you split a block that the phis get updated, right? On Thu, Feb 2, 2012 at 5:05 PM, Eric Christopher <echristo at apple.com> wrote: > Not that I'm aware of. > > -eric > > On Feb 2, 2012, at 3:47 PM, Ryan Taylor wrote: > > So essentially I'm
2012 Feb 06
1
[LLVMdev] Fwd: Updating PHI for Instruction Domination?
...o do this. It should just take a >> little bit of work to get what you want done. >> >> -eric >> > > Yes, the first DOES sound painful (I want to avoid it) and the second is > not an option. I'm adding a second path in a loop. > > The old path: BB1->BB2/BB3, BB2->BB1/BB3, BB3->n/a > > The new path: BB1->H/BB2, BB2->F/K, H->F, K->F, F->BB1/G, G->BB3 > > There are PHI nodes in BB1 that come in from BB2 for values defined in > BB2. With the new possible path: BB1->H->F, BB2. Without adding new PHIs or > Va...
2011 May 03
0
[LLVMdev] Loop-Unroll optimization
...2.8 -loop-unroll Hello3.bc -o Hello4.bc* *manish at manish:~/Test2$ llvm-dis-2.8 Hello4.bc* My *Hello.c* looks like: for(i=0; i< 1000; i++) { c[i] = a[i] + b[i]; } printf("%d\n", c[999]); ------------------------------------------------- and bit-code in *Hello4.bc* bb3: ; preds = %bb3, %bb3.preheader %i.17 = phi i32 [ %5, %bb3 ], [ 0, %bb3.preheader ] %scevgep11 = getelementptr [1000 x i32]* %b, i32 0, i32 %i.17 %scevgep10 = getelementptr [1000 x i32]* %a, i32 0, i32 %i.17 %scevgep = getelementptr [1000 x i32]*...