[PATCH] D45754: [PM/LoopUnswitch] Detect irreducible control flow within loops and skip unswitching non-trivial edges.
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 18 11:00:24 PDT 2018
chandlerc planned changes to this revision.
chandlerc added a comment.
In https://reviews.llvm.org/D45754#1071186, @fhahn wrote:
> @dcaballe added a `containsIrreduciableCFG` function to include/llvm/Analysis/CFG.h in https://reviews.llvm.org/D40874. I do not have time to take a close look today, but it seems at least for the attached test case, `containsIrreduciableCFG` does the right thing.
Gah.
I looked and looked, even looked specifically in this area, and asked around, all without success at finding this. Now I'm sad I wasted time building a new one. Thanks for pointing it out.
The approaches are... surprisingly different. I computed a slightly different thing. But I think I like the approach of the existing one quite a bit more, although I'm sad about the cost. But I'm willing for us to get bug reports about the cost of this before we really start stressing.
Lemme adjust this to just call that routine. Maybe I can even call it somewhat later to minimize the cost more.
Repository:
rL LLVM
https://reviews.llvm.org/D45754
More information about the llvm-commits
mailing list