[LLVMdev] Unifying natural loops with multiple exits.

Jevin Sweval jsweval at arxan.com
Fri Feb 21 14:09:03 PST 2014


On 2/21/14, 4:07 PM, Paul Vario wrote:> Hi Fellows,
 >
 >          Is there an LLVM pass that does the unification of natural loop
 > exits? I.e., when multiple exits are detected in a natural loop, a
 > unified BB will be inserted to join all the old exiting edges etc. My
 > goal is to make multiple-exit natural loops more recognizable to
 > RegionInfo class. Thanks.
 >
 >
 > Best Regards,
 > Paul

-mergereturn does this, but for functions. Maybe it could point you in 
the right direction?

http://llvm.org/docs/Passes.html#mergereturn-unify-function-exit-nodes

Cheers,
Jevin




More information about the llvm-dev mailing list