[PATCH] D153392: [PhaseOrdering] Don't speculate blocks in simplifycfg before jump-threading

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 01:38:08 PDT 2023


nikic added a comment.

Can you please explain what the JumpThreading interaction is in more detail? This looks plausible to me, but I want to make sure no change is needed in JumpThreading (which is supposed to be able to thread over selects as well, not just branches).



================
Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:1017
     EarlyFPM.addPass(LowerExpectIntrinsicPass());
-    EarlyFPM.addPass(SimplifyCFGPass());
+    EarlyFPM.addPass(SimplifyCFGPass(SimplifyCFGOptions().speculateBlocks(false)));
     EarlyFPM.addPass(SROAPass(SROAOptions::ModifyCFG));
----------------
This bit definitely makes sense to keep branches for IPSCCP -- maybe after this, we can even swap the SimplifyCFG and SROA order, as the current one only exists so that SimplifyCFG doesn't do too much.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153392



More information about the llvm-commits mailing list