[PATCH] D76153: [SimplifyCFG] try branch-to-branch simplification sooner

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 14 08:33:43 PDT 2020


spatel added a comment.

In D76153#1922408 <https://reviews.llvm.org/D76153#1922408>, @efriedma wrote:

> It isn't obvious to me why the order matters?  The commit message and comments in the code don't really explain.


Sorry, missed this question initially. Order matters because SimplifyCFG doesn't run to fix-point. It's a curated set of transforms gated by requestResimplify() and a 'Changed' flag. I don't think that can be changed without major surgery. For example, if we speculatively hoist instructions using the cost model, then we don't want to re-run that transform without marking the already hoisted instructions as changed by SimplifyCFG itself.

But then again, we run this pass multiple times in the normal opt pipeline, so we must be layering cost-based speculations on top of one another...unless I'm missing something that prevents that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76153/new/

https://reviews.llvm.org/D76153





More information about the llvm-commits mailing list