[LLVMdev] inserting blocks into a Function

Chris Lattner sabre at nondot.org
Fri Apr 29 06:11:00 PDT 2005


On Fri, 29 Apr 2005, Sameer D. Sahasrabuddhe wrote:
> Great! SplitBlockPredecessors is exactly the function that I was
> thinking of ... hadn't noticed the LoopSimplify pass before ...
> although the pass I am working on is different, I can leave the
> preheader insertion to LoopSimplify and forget about it.

Good deal! :)

> I was wondering, the above function seems general enough to be
> available as a utility function by itself ... but since I am not a
> compiler guy myself, dunno if anyone actually ends up needing such a
> function. Anyway, the LoopSimplify code's been quite helpful as a
> quick intro to handling side-effects when modifying the CFG.

Sure, if you wanted to seperate it out into the same .h and .cpp file that 
the split critical edges stuff lives in, I would be happy to apply the 
patch.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list