Hi,
If I do a loop over the basic blocks in a LoopInfo object, is it going
to loop over the basic blocks of the loop AND the subloops of the loop
or just the BBs of the loop itself?
Thanks!
-bw
Hi,
If I do a loop over the basic blocks in a LoopInfo object, is it going
to loop over the basic blocks of the loop AND the subloops of the loop
or just the BBs of the loop itself?
Thanks!
-bw
A loop's block list include blocks that are part of subloops. The canonical way to determine if a block is in "this loop and not a child" is:
if (LI->getLoopFor(BB) == ThisLoop)
If BB is part of a child loop, getLoopFor will return it so the compare will fail.
-Chris
Hi,
If I do a loop over the basic blocks in a LoopInfo object, is it going
to loop over the basic blocks of the loop AND the subloops of the loop
yes