[LLVMdev] Separate loop condition and loop body
Trevor Harmon
Trevor.W.Harmon at nasa.gov
Mon May 10 11:05:07 PDT 2010
On May 10, 2010, at 8:43 AM, Xinfinity wrote:
> Is it possible to get the list of BasicBlocks building the condition
> of a
> loop and the list of BasicBlocks that form the body?
Based on my (limited) experience with Loop and LoopInfo, this isn't
possible. (But don't take my word for it.)
> My aim is to manipulate for loops, while and do-while loops unitary,
> but I
> did not find an easy way to do this.
I think the problem here is that LLVM's CFG is low-level enough such
that the distinction between the loop header expression and the loop
body is lost.
Why exactly do you need to identify the blocks that form the loop
header expression? I'm wondering if you could find some workaround
that doesn't require this...
Trevor
More information about the llvm-dev
mailing list