search for: splitblockpredecessors

Displaying 3 results from an estimated 3 matches for "splitblockpredecessors".

2005 Apr 29
0
[LLVMdev] inserting blocks into a Function
...itBasicBlock (splits a BB into two, connected with an unconditional branch). llvm/Transforms/Utils/BasicBlockUtils.h:SplitCriticalEdge (inserts a block on a CFG edge from a multiple successor BB to a multiple predecessor BB). If you look at lib/Transforms/Scalar/LoopSimplify.cpp, it includes a SplitBlockPredecessors function. If desired, you could factor this out somehow. It's prototype is: BasicBlock *SplitBlockPredecessors(BasicBlock *BB, const char *Suffix, const std::vector<BasicBlock*> &Preds); Basically, given a BB with multiple predecessors, it inse...
2005 Apr 28
2
[LLVMdev] inserting blocks into a Function
Recently wrote a pass that inserts a preheader for a loop that doesn't have one. When I tried to run it, I ran into a problem that became obvious in hindsight - the PHINodes need to be updated in places where the incoming control-edge has changed. Is there anything else that can be affected when a block is inserted into the CFG? Also, planning to write a helper function which will take care
2005 Apr 29
1
[LLVMdev] inserting blocks into a Function
On Thu, Apr 28, 2005 at 11:22:26PM -0500, Chris Lattner wrote: > BasicBlock *SplitBlockPredecessors(BasicBlock *BB, const char *Suffix, > const std::vector<BasicBlock*> &Preds); > > Basically, given a BB with multiple predecessors, it inserts (and returns) > a new block, moving the predecessors in Preds to the new block and leaving >...