[PATCH] D33810: [PM] Add GVNSink to the pipeline

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 3 16:18:57 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL304671: [PM] Add GVNSink to the pipeline. (authored by davide).

Changed prior to commit:
  https://reviews.llvm.org/D33810?vs=101137&id=101336#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D33810

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
@@ -164,6 +164,10 @@
     "enable-npm-gvn-hoist", cl::init(false), cl::Hidden,
     cl::desc("Enable the GVN hoisting pass for the new PM (default = off)"));
 
+static cl::opt<bool> EnableGVNSink(
+    "enable-npm-gvn-sink", cl::init(false), cl::Hidden,
+    cl::desc("Enable the GVN hoisting pass for the new PM (default = off)"));
+
 static Regex DefaultAliasRegex(
     "^(default|thinlto-pre-link|thinlto|lto-pre-link|lto)<(O[0123sz])>$");
 
@@ -314,6 +318,12 @@
   if (EnableGVNHoist)
     FPM.addPass(GVNHoistPass());
 
+  // Global value numbering based sinking.
+  if (EnableGVNSink) {
+    FPM.addPass(GVNSinkPass());
+    FPM.addPass(SimplifyCFGPass());
+  }
+
   // Speculative execution if the target has divergent branches; otherwise nop.
   FPM.addPass(SpeculativeExecutionPass());
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33810.101336.patch
Type: text/x-patch
Size: 995 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170603/2cfbd560/attachment.bin>


More information about the llvm-commits mailing list