[PATCH] D76389: [NewPM] Run the Speculative Execution Pass only if the target has divergent branches

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 15 12:36:58 PDT 2020


leonardchan updated this revision to Diff 257800.
leonardchan marked an inline comment as done.
leonardchan edited the summary of this revision.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76389

Files:
  llvm/lib/Passes/PassBuilder.cpp


Index: llvm/lib/Passes/PassBuilder.cpp
===================================================================
--- llvm/lib/Passes/PassBuilder.cpp
+++ llvm/lib/Passes/PassBuilder.cpp
@@ -440,7 +440,7 @@
 
   // Speculative execution if the target has divergent branches; otherwise nop.
   if (Level.getSpeedupLevel() > 1) {
-    FPM.addPass(SpeculativeExecutionPass());
+    FPM.addPass(SpeculativeExecutionPass(/*OnlyIfDivergentTarget=*/true));
 
     // Optimize based on known information about branches, and cleanup afterward.
     FPM.addPass(JumpThreadingPass());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76389.257800.patch
Type: text/x-patch
Size: 566 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200415/904e8baf/attachment-0001.bin>


More information about the cfe-commits mailing list