[PATCH] D33806: Move GVNHoist to the right position in the new pass manager pipeline

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 16:08:48 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL304490: Move GVNHoist to the right position in the new pass manager pipeline. (authored by davide).

Changed prior to commit:
  https://reviews.llvm.org/D33806?vs=101123&id=101133#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D33806

Files:
  llvm/trunk/lib/Passes/PassBuilder.cpp


Index: llvm/trunk/lib/Passes/PassBuilder.cpp
===================================================================
--- llvm/trunk/lib/Passes/PassBuilder.cpp
+++ llvm/trunk/lib/Passes/PassBuilder.cpp
@@ -310,6 +310,10 @@
   // Catch trivial redundancies
   FPM.addPass(EarlyCSEPass());
 
+  // Hoisting of scalars and load expressions.
+  if (EnableGVNHoist)
+    FPM.addPass(GVNHoistPass());
+
   // Speculative execution if the target has divergent branches; otherwise nop.
   FPM.addPass(SpeculativeExecutionPass());
 
@@ -473,8 +477,6 @@
   EarlyFPM.addPass(SROA());
   EarlyFPM.addPass(EarlyCSEPass());
   EarlyFPM.addPass(LowerExpectIntrinsicPass());
-  if (EnableGVNHoist)
-    EarlyFPM.addPass(GVNHoistPass());
   MPM.addPass(createModuleToFunctionPassAdaptor(std::move(EarlyFPM)));
 
   // Interprocedural constant propagation now that basic cleanup has occured


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33806.101133.patch
Type: text/x-patch
Size: 868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170601/c67d98e0/attachment.bin>


More information about the llvm-commits mailing list