search for: bb1

Displaying 20 results from an estimated 308 matches for "bb1".

Did you mean: b1
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.nex...
2008 Mar 29
3
[LLVMdev] unwinds to in the CFG
...; > try { x = null; } > catch { use(x); } // error, x is uninitialized > Yes, I know. I'm planning to accomplish this by defining pred/succ sensibly such that we get a domtree where the equivalent LLVM code would be invalid. > Also, consider a phi node: > > phi i32 [%x, %bb1] ; %x defined in %bb1. > > Depending on what type of predecessor %bb1 is, some of the models > you've mentioned declare this phi node illegal. Oh. Now that's a very good point. bb1: unwinds to %cleanup %x = add i32 @foo, @bar ret i32 %x cleanup: %y = phi i32 [%x, bb1]...
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 ] %tmp.0 is the PHINode whose value is from entry, bb and bb1. After ext...
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...
2014 May 22
2
[LLVMdev] RFC: Indexing of structs vs arrays in getelementpointer
...; Function Attrs: ssp uwtable define i32 @test1(%struct2* %dm, i1 %tmp4, i64 %tmp9, i64 %tmp19) { bb: br i1 %tmp4, label %bb1, label %bb2 bb1: ; preds = %bb5 %tmp10 = getelementptr inbounds %struct2* %dm, i64 %tmp9, i32 0 br label %bb3...
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 18
2
[LLVMdev] How to insert a basic block in an edge
...a variable of type Pass 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/B...
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?
...BasicBlock to 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 PHI...
2010 Jul 20
2
[LLVMdev] How to insert a basic block in an edge
...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? >>> >&g...
2013 Jul 30
2
[LLVMdev] Eliminating PHI with Identical Inputs
Dear All, 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.
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 replace...
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 te...
2012 Feb 06
0
[LLVMdev] Updating PHI for Instruction Domination?
...t 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. Wi...
2010 Jul 18
0
[LLVMdev] How to insert a basic block in an edge
...stion is why aren'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::SplitEd...
2012 Feb 06
1
[LLVMdev] Updating PHI for Instruction Domination?
...There's code in splitBasicBlock to 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...
2009 Jun 09
1
Problem : solving a equation with R , fail with uniroot function
Hi , I would like to know if a R function have the same behaviour than the matlab solve function. I tried something with uniroot but I have some problems: The equation I need to solve is : exp(c0-r0)*(bb0+x)*(bb1-x)=(bb0+x+1)(bb1-x-1) So I tried this: STEP 1: my function test test <- function(x,bb0=-3,bb1=5,c0=2,r0=0) { + ((exp(c0-r0)*(bb0+x)*(bb1-x))/((bb0+x+1)(bb1-x-1))-1)} STEP 2: > uniroot(test,c(-100,100))$root* Erreur dans f(lower, ...) : tentative d'appliquer un objet qui n'est pa...
2012 Jul 25
2
[LLVMdev] Question about an unusual jump instruction
...ion. The simplest loop that I would like to optimize is like: ////////////////////////// int i = a; do { // loop body --i; } while (i != 0); ////////////////////////// After code selection I've something like: BB0: %vreg0<def> = COPY %R0; // R0 contains 'a' J <#BB1> BB1: %vreg1<def> = PHI %vreg0, <#BB0>, %vreg3, <#BB3> J <#BB2> BB2: // loop body BB3: %vreg3<def> = ADDI %vreg1<kill>, 1 CMPNE %vreg3, 0, %SR<implicit,def> JNZ <#BB1> J <#BB4> BB4: // end With the optimization pass I...
2010 Jul 21
0
[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? &gt...
2019 Jul 02
2
[cfe-dev] [RFC] ASM Goto With Output Constraints
..._ suggesting we need this instruction. > It's just for demonstration purposes. > > > Situations (1) and (2) don't encounter an problem. Any value used in the > goto-target can be handled by inserting the code to extract that value in > the goto-target block: > > > bb1: > > ... > > %x.bb1 = callbr i32 asm sideeffect "...", "=r,X"(i32 *%x*, i8* > blockaddress(@bar, %goto.target)) > > to label %fallthrough1 [label %goto.target] > > > fallthrough1: > > ... > > > bb2: > > ... &gt...