[PATCH] D44057: [SimplifyCFG] Create attribute to disable simplifyCFG.

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 5 13:07:53 PST 2018


morehouse added a comment.

In https://reviews.llvm.org/D44057#1026415, @hfinkel wrote:

> Do you actually want to disable all CFG simplifications, or do you just need to disable things that convert from control flow to something else (e.g., select formation)?


Yes, what we need is to keep things as control flow so that our edge coverage picks up when a new condition is met.  Is there a better way to do this?

In https://reviews.llvm.org/D44057#1026441, @arsenm wrote:

> More specifically I think if a pass wants to call simplifyCFG the utility function, it should be able to rely on some of the expected canonicalizations so it would not be OK for anything to just disable this


An alternative would be to find every pass that calls `simplifyCFG` and disable them, but that may result in many optimizations unnecessarily disabled.  Considering `simplifyCFG` can return false, shouldn't passes already be handling the case where simplification does not occur?


https://reviews.llvm.org/D44057





More information about the llvm-commits mailing list