similar to: [LLVMdev] Loop simplification

Displaying 20 results from an estimated 8000 matches similar to: "[LLVMdev] Loop simplification"

2011 Feb 01
0
[LLVMdev] Loop simplification
On Feb 1, 2011, at 1:08 PM, Andrew Clinton wrote: > I have a (non-entry) basic block that contains only PHI nodes and an > unconditional branch (that does not branch to itself). Is it always > possible to merge this block with it's successor and produce a > semantically equivalent program? I'm trying to undo some of the loop > optimizations that LLVM has applied to my
2011 Feb 01
3
[LLVMdev] Loop simplification
On Feb 1, 2011, at 1:34 PM, Andrew Trick wrote: > On Feb 1, 2011, at 1:08 PM, Andrew Clinton wrote: > >> I have a (non-entry) basic block that contains only PHI nodes and an >> unconditional branch (that does not branch to itself). Is it always >> possible to merge this block with it's successor and produce a >> semantically equivalent program? I'm
2011 Feb 01
0
[LLVMdev] Loop simplification
Here's what I've got so far - it seems to work, aside from the fact that DeleteDeadPHIs is not removing at least one dead PHI in my test program. --------------------- static bool mergeBlockIntoSuccessor(BasicBlock *pred, BasicBlock *succ) { if (succ == pred) return false; if (pred->getFirstNonPHI() != pred->getTerminator()) return false; //
2011 Feb 01
2
[LLVMdev] Loop simplification
On Feb 1, 2011, at 1:34 PM, Andrew Trick wrote: > On Feb 1, 2011, at 1:08 PM, Andrew Clinton wrote: > >> I have a (non-entry) basic block that contains only PHI nodes and an >> unconditional branch (that does not branch to itself). Is it always >> possible to merge this block with it's successor and produce a >> semantically equivalent program? I'm
2011 Feb 01
1
[LLVMdev] Loop simplification
On 02/01/2011 06:43 PM, Frits van Bommel wrote: > I don't think that's always possible. > For example: if a phi in the successor has a phi in the predecessor as > one of it's incoming values, then the predecessor cases have to be > merged into the successor phi. However, if they share a predecessor > but have different incoming values for it that can't be done.
2012 Mar 08
2
[LLVMdev] Updating value from PHI
Here is the code snippet that I am using to create the PHIs in the loop according to the PHIs in the new preheader. At this point I have already redirected the loop backedge and removed the preheader from the loop. for (BasicBlock::iterator II = loopHeaderBB->begin(); (PN=dyn_cast<PHINode>(II)); ++II) { // remove loop back PHI and add it to split BB
2012 Mar 08
0
[LLVMdev] Updating value from PHI
I guess I thought that once I redirected the branches and created new PHIs that LLVM would correct the variable usage when I return true (changed CFG) from the pass. Is this not the case? On Wed, Mar 7, 2012 at 4:08 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > Here is the code snippet that I am using to create the PHIs in the loop > according to the PHIs in the new preheader. At
2012 Mar 08
0
[LLVMdev] Updating value from PHI
I have attached a case of what I am trying to do, I'm pretty sure I'm just missing some simple API call. In the cfg you can see that although Im setting "lsr.iv441" as "lsr.iv44" from for.body.387.i it's not propagating that through the block or graph. On Wed, Mar 7, 2012 at 12:03 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > I am splitting a one BB
2012 Mar 07
4
[LLVMdev] Updating value from PHI
I am splitting a one BB loop into two BB. Basically, the one loop BB has 3 incoming values, one form back edge two from other edges. I want to extract the PHIs from the other two edges out into it's own BB and delete that from the loop, then redirect the backedge to the loopbody (non extracted portion) and create a new PHI coming from the extracted BB and the backedge. I can do this;
2017 May 01
4
RFC: Stop using redundant PHI node entries for multi-edge predecessors
Hi, On Mon, May 1, 2017 at 8:47 AM, Daniel Berlin via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> Today, the IR requires that if you have multiple edges from A to B >> (typically with a switch) any phi nodes in B must have an equal number of >> entries for A, but that all of them must have the same value. > >> This seems rather annoying.... >> 1) It
2011 Feb 01
0
[LLVMdev] Loop simplification
On 02/01/2011 04:47 PM, Andrew Trick wrote: > > I forgot to ask why you're doing this. If the goal is to remove a branch, that would typically be handled by BranchFolder during codegen after phis have been removed. I don't see a problem forcing the CFG to be more canonical earlier, but if the successor is in a deeper loop, then you could be eliminating a preheader and forcing
2011 Feb 01
0
[LLVMdev] Loop simplification
On Tue, Feb 1, 2011 at 10:08 PM, Andrew Clinton <andrew at sidefx.com> wrote: > I have a (non-entry) basic block that contains only PHI nodes and an > unconditional branch (that does not branch to itself).  Is it always > possible to merge this block with it's successor and produce a > semantically equivalent program? I don't think that's always possible. For
2004 Jul 08
4
[LLVMdev] PHI nodes in machine code
Could anybody quickly explain why PHI nodes instructions are necessary in machine code? And why the code in LiveVariables.cpp which looks at those PHI nodes (line 249 and below) is necessary. The reason I'm asking is that I try to support 64-bit comparison and I do it by generating code like: // if high1 cond high2: goto operand0 // if high1 reverse_cond high2:
2011 Mar 31
0
[LLVMdev] LiveValues removal
LiveVariables is the optimized and tested way to get variable liveness information (it's used by register allocation). Unfortunately it requires a MachineFunction to work - so you'll either need to lower to one of the built-in targets or add your own target to acquire access to this pass. Andrew On 03/31/2011 12:28 PM, Carlo Alberto Ferraris wrote: > I've read that LiveValues
2004 Dec 07
1
[LLVMdev] Question adding dummy basic blocks
Hi, I got a problem when I am trying to add a dummy basic block. Let say there are two blocks, A and B. A----->B I am trying to generate new BB called C which is located between A and B, but not break the edge of AB. The graph is like the following A---->B \ / \ / C There is new BB 'C' with edges AC and CB. It is kind of like what breakcriticaledge pass does.
2013 Nov 09
1
[LLVMdev] Variable-length Phi-node
You can call addIncoming(). /// addIncoming - Add an incoming value to the end of the PHI list /// void addIncoming(Value *V, BasicBlock *BB) { assert(V && "PHI node got a null value!"); assert(BB && "PHI node got a null basic block!"); assert(getType() == V->getType() && "All operands to PHI node must be the same
2011 Mar 31
3
[LLVMdev] LiveValues removal
I've read that LiveValues has been removed from trunk. Did it bitrot or was simply removed because a replacement is available? If it's the former, what caused the bitrotting? If it's the latter, what's the replacement? (I've found LiveVariables but I'm not sure it can be used in a ModulePass). b.r. -- Carlo Alberto Ferraris <cafxx at strayorange.com <mailto:cafxx
2018 Jun 13
2
RFC: cleanup in Transforms/Utils
Hi, I'm looking to see what's the best way to solve the fact that these two utils mostly do the same thing: 1. lib/Transforms/Utils/Local.cpp : MergeBasicBlockIntoOnlyPred 2. lib/Transforms/Utils/BasicBlockUtils.cpp : MergeBlockIntoPredecessor (+cc some of the folks who touched at least one of these either originally or recently) Brief overview: 1. MergeBasicBlockIntoOnlyPred 2.
2009 Sep 01
1
[LLVMdev] [llvm-commits] SSI Patch
I tried to make 5 separate patches, but as they are constructive, they had information from the last one. So I will post one by one as it gets on the tree. 1. We had a function isUsedInTerminator that tested if a comparator was used in the terminator of its parent BasicBlock. This is wrong because a comparator can be created in a BasicBlock and used in the terminator of other BasicBlock, and
2004 Jul 08
0
[LLVMdev] PHI nodes in machine code
On Thu, Jul 08, 2004 at 08:06:29PM +0400, Vladimir Prus wrote: > Could anybody quickly explain why PHI nodes instructions are necessary > in machine code? And why the code in LiveVariables.cpp which looks at > those PHI nodes (line 249 and below) is necessary. LLVM Machine code is in SSA. Let's say you want to do r = a cond b But doing this: if (a cond b) then r = 1