Add PM extension point EP_VectorizerStart
authorTobias Grosser <tobias@grosser.es>
Thu, 16 Jul 2015 08:20:37 +0000 (08:20 +0000)
committerTobias Grosser <tobias@grosser.es>
Thu, 16 Jul 2015 08:20:37 +0000 (08:20 +0000)
This extension point allows passes to be executed right before the vectorizer
and other highly target specific optimizations are run.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242389 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/IPO/PassManagerBuilder.h
lib/Transforms/IPO/PassManagerBuilder.cpp

index 1334dd0da23c30d9035e738cedbac5bed99f82ef..ef01fa350531a90b8a304aa0de08108d22f11aa7 100644 (file)
@@ -81,6 +81,11 @@ public:
     /// run after everything else.
     EP_OptimizerLast,
 
+    /// EP_VectorizerStart - This extension point allows adding optimization
+    /// passes before the vectorizer and other highly target specific
+    /// optimization passes are executed.
+    EP_VectorizerStart,
+
     /// EP_EnabledOnOptLevel0 - This extension point allows adding passes that
     /// should not be disabled by O0 optimization level. The passes will be
     /// inserted after the inlining pass.
index 88e5e479136f849759e3e2580a3e84937994a3c8..4e290a2db82defca6bf6804a08b702ae24dbfafd 100644 (file)
@@ -318,6 +318,8 @@ void PassManagerBuilder::populateModulePassManager(
   if (RunFloat2Int)
     MPM.add(createFloat2IntPass());
 
+  addExtensionsToPM(EP_VectorizerStart, MPM);
+
   // Re-rotate loops in all our loop nests. These may have fallout out of
   // rotated form due to GVN or other transformations, and the vectorizer relies
   // on the rotated form. Disable header duplication at -Oz.