[LLVMdev] Irreducible Control-Flow & Loops
Chris Lattner
clattner at apple.com
Mon Sep 28 10:45:19 PDT 2009
On Sep 28, 2009, at 2:28 AM, Ralf Karrenberg wrote:
>
> I am considering writing a patch for LoopInfo instead of creating my
> own
> data structure for irreducible loops.
> Is such an enhancement desired or even already implemented by someone
> (e.g. in the 2.6 branch)?
I'm not sure that this is a good idea. LoopInfo is clearly defined to
represent "natural" loops (where the header dominates the body of the
loop). Natural loops have a lot of very useful properties like loop
headers etc that the loop optimizers depend on. We already have SCC
iterators etc, is there a specific reason you want to have LoopInfo do
this?
If you're writing a pass that converts irreducible control flow to
reducible loops, I'd think it would be based on SCC iterators, not on
LoopInfo.
-Chris
More information about the llvm-dev
mailing list