[LLVMdev] Loop simplification
Andrew Clinton
andrew at sidefx.com
Tue Feb 1 14:29:32 PST 2011
On 02/01/2011 04:47 PM, Andrew Trick wrote:
>
> I forgot to ask why you're doing this. If the goal is to remove a branch, that would typically be handled by BranchFolder during codegen after phis have been removed. I don't see a problem forcing the CFG to be more canonical earlier, but if the successor is in a deeper loop, then you could be eliminating a preheader and forcing compensation code into the loop. In fact, I wouldn't be surprised if some loop passes might want a single preheader.
>
> -Andy
The goal is to make the LoopInfo pass return a single loop where I
expect a single loop (based on an input program that has a loop
containing an if statement - which seems to generate an outer loop and
an inner loop). The particular block that seems to cause this is a
"loop.outer" that presumably gets added by one of the common
optimization passes.
Andrew
More information about the llvm-dev
mailing list