[PATCH] D40874: [LV][LoopInfo] Add irreducible CFG detection for outer loops

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 22 02:49:58 PST 2017


fhahn added a reviewer: fhahn.
fhahn added a comment.

In https://reviews.llvm.org/D40874#954567, @dcaballe wrote:

> If you are OK with the proposed algorithm, I would appreciate feedback on where to refactor the 'isIrreducibleCFG' utility function for Loop and MachineLoop.
>  As I mentioned, LoopBase could be a good candidate. This utility function would be similar to isRecursivelyLCSSAForm implemented in Loop class.
>  Does it sound reasonable?


I think moving this to LoopBase makes sense, if there are multiple users for this function, rather than duplicating it. For the naming, I would call it something like `containsIrreducibleCFG`,  to make it clear that it checks if the loop body contains irreducible CFG (also make that clear in the comment), rather than the loop itself is irreducible.


https://reviews.llvm.org/D40874





More information about the llvm-commits mailing list