similar to: [LLVMdev] Instruction as Value in PHI

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Instruction as Value in PHI"

2012 Sep 20
0
[LLVMdev] Instruction as Value in PHI
On Thu, Sep 20, 2012 at 3:18 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > Curious, is there a pass/mechanism that exists to promote an instruction > that is a value of a PHI? > > For example, if one of the incoming values is a sub(x, y) from BB2, does > there exist something to promote this instruction back to BB2 (such that tmp > = sub(x,y)) and the PHI replaces the
2012 Feb 06
1
[LLVMdev] Fwd: Updating PHI for Instruction Domination?
---------- Forwarded message ---------- From: Ryan Taylor <ryta1203 at gmail.com> Date: Mon, Feb 6, 2012 at 10:36 AM Subject: Re: [LLVMdev] Updating PHI for Instruction Domination? To: Eric Christopher <echristo at apple.com> Since I'm not sure which instructions I might want to replicate, would it be possible to cast the Value from "PHINode::getIncomingValue" to
2012 Feb 06
0
[LLVMdev] Updating PHI for Instruction Domination?
I guess not since Value is a superclass of Instruction. On Mon, Feb 6, 2012 at 10:36 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > > > ---------- Forwarded message ---------- > From: Ryan Taylor <ryta1203 at gmail.com> > Date: Mon, Feb 6, 2012 at 10:36 AM > Subject: Re: [LLVMdev] Updating PHI for Instruction Domination? > To: Eric Christopher <echristo at
2012 Feb 06
1
[LLVMdev] Updating PHI for Instruction Domination?
You're creating a new path that doesn't include L. For all values defined in L and used outside of L, you need to determine the new reaching def. That's specific to your transformation and can't be automated. Once you do that, creating the phi in F is natural. -Andy On Feb 6, 2012, at 11:51 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > I guess not since Value is a
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: ...
2013 Jul 30
0
[LLVMdev] Eliminating PHI with Identical Inputs
Hi John, On 30/07/13 16:12, John Criswell wrote: > 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
2013 Jul 30
1
[LLVMdev] Eliminating PHI with Identical Inputs
On 7/30/13 9:46 AM, Duncan Sands wrote: > Hi John, > > On 30/07/13 16:12, John Criswell wrote: >> 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: >> >>
2011 Aug 30
2
[LLVMdev] Getting rid of phi instructions?
Hi all, is there a pass to get rid of phi-instructions in a function? There's no loop involved. I have a function approx. like this: void @func() { entry: … bb1: … bb2: … %tmp100 = phi i32 [ 0, bb1 ], [ 1, bb2 ] … %tmp101 = getelementptr …, %tmp100 tail call void @anotherfunc(…, %tmp101) ret void } I would like it to rather be something like this: void @func() { entry: … bb1: ...
2012 May 10
1
[LLVMdev] How to get the label field of PHI instruction?
Typical PHI instruction in LLVM goes like this: %P = phi i32* [%A, %BB1], [%B, %BB2] When I try to access all the source operands, only %A and %B are included. I checked the methods in instruction.h, but I didn't find any methods obtaining the label fields i.e. %BB1, %BB2. I notice that each label of a basic block is related with a value which can be referenced in 'br'
2014 May 22
2
[LLVMdev] RFC: Indexing of structs vs arrays in getelementpointer
On May 22, 2014, at 3:51 PM, Chandler Carruth <chandlerc at google.com> wrote: > > On Thu, May 22, 2014 at 4:42 PM, Louis Gerbarg <lgg at apple.com> wrote: > The problem that the above transform is technically illegal because “When indexing into a (optionally packed) structure, only i32 integer constants are allowed (when using a vector of indices they must all be the same
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 extracted
2011 Jun 12
1
[LLVMdev] Doubt on phi nodes
Hi all, I have a doubt on the usage of phi nodes in LLVM: if I define a value in a bb, are phi nodes needed in the blocks that are dominated by the bb where the value is defined? As an example consider the following trivial example: // BB0 A = 5; if (condition) { // BB1 B = 2; } else { // BB2 B = 1; } // BB3 is a phi node required for A in BB3? b.r., Carlo Alberto Ferraris --------------
2008 Nov 10
1
question about contrast in R for multi-factor linear regression models?
Hi all, I am using "lm" to fit some anova factor models with interactions. The default setting for my unordered factors is "treatment". I understand the resultant "lm" coefficients for one factors, but when it comes to the interaction term, I got confused. > options()$contrasts unordered ordered "contr.treatment"
2012 Feb 06
0
[LLVMdev] Updating PHI for Instruction Domination?
On Feb 2, 2012, at 5:13 PM, Ryan Taylor wrote: > So my best bet is to try and work in reg2mem mode and then go back to mem2reg? > I wouldn't. That sounds painful. > I'm curious, it seems though when you split a block that the phis get updated, right? Sure. There's code in splitBasicBlock to do this. It should just take a little bit of work to get what you want done.
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
2013 Sep 18
1
[LLVMdev] In llvm, how can I delete a whole branch elegantly?
Hi, I am trying to prune some uninteresting llvm ir branches, corresponding to the *if-else* condition in the source code. And here is the procedures: 1. Get the BasicBlock containing the BranchInst which has 2 successors(in order to keep consistent with the source code I am using the llvm ir without any optimizations, so SelectInst/SwitchInst/PHINode is absent), one of which should be
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
2019 Jul 01
2
[cfe-dev] [RFC] ASM Goto With Output Constraints
On Fri, Jun 28, 2019 at 3:35 PM James Y Knight <jyknight at google.com> wrote: > On Fri, Jun 28, 2019 at 5:53 PM Bill Wendling <isanbard at gmail.com> wrote: > >> On Fri, Jun 28, 2019 at 1:48 PM James Y Knight <jyknight at google.com> >> wrote: >> >>> On Fri, Jun 28, 2019 at 3:00 PM Bill Wendling <isanbard at gmail.com> >>> wrote:
2010 Nov 17
1
[LLVMdev] Copy Instruction from one Basic block to another
I want to do the following: suppose the program structure: bb / \ bb1 bb2 \ / bb3
2019 Jul 02
2
[cfe-dev] [RFC] ASM Goto With Output Constraints
On Mon, Jul 1, 2019 at 6:25 PM Finkel, Hal J. <hfinkel at anl.gov> wrote: > On 7/1/19 1:38 PM, Bill Wendling via llvm-dev wrote: > > On Fri, Jun 28, 2019 at 3:35 PM James Y Knight <jyknight at google.com> > wrote: > >> On Fri, Jun 28, 2019 at 5:53 PM Bill Wendling <isanbard at gmail.com> wrote: >> >>> On Fri, Jun 28, 2019 at 1:48 PM James Y