Revert r233175 and r233183 with it. This pulls float2int back out of the tree, due...
[oota-llvm.git] / include / llvm / Transforms / Vectorize.h
index 669125845f5da6424d141818f9d827e53217d12f..aec3993d68fcf49f78d27abbfceae70266d1da11 100644 (file)
@@ -18,6 +18,7 @@
 namespace llvm {
 class BasicBlock;
 class BasicBlockPass;
+class Pass;
 
 //===----------------------------------------------------------------------===//
 /// @brief Vectorize configuration.
@@ -28,23 +29,41 @@ struct VectorizeConfig {
   /// @brief The size of the native vector registers.
   unsigned VectorBits;
 
-  /// @brief Don't try to vectorize integer values.
-  bool NoInts;
+  /// @brief Vectorize boolean values.
+  bool VectorizeBools;
 
-  /// @brief Don't try to vectorize floating-point values.
-  bool NoFloats;
+  /// @brief Vectorize integer values.
+  bool VectorizeInts;
 
-  /// @brief Don't try to vectorize casting (conversion) operations.
-  bool NoCasts;
+  /// @brief Vectorize floating-point values.
+  bool VectorizeFloats;
 
-  /// @brief Don't try to vectorize floating-point math intrinsics.
-  bool NoMath;
+  /// @brief Vectorize pointer values.
+  bool VectorizePointers;
 
-  /// @brief Don't try to vectorize the fused-multiply-add intrinsic.
-  bool NoFMA;
+  /// @brief Vectorize casting (conversion) operations.
+  bool VectorizeCasts;
 
-  /// @brief Don't try to vectorize loads and stores.
-  bool NoMemOps;
+  /// @brief Vectorize floating-point math intrinsics.
+  bool VectorizeMath;
+
+  /// @brief Vectorize bit intrinsics.
+  bool VectorizeBitManipulations;
+
+  /// @brief Vectorize the fused-multiply-add intrinsic.
+  bool VectorizeFMA;
+
+  /// @brief Vectorize select instructions.
+  bool VectorizeSelect;
+
+  /// @brief Vectorize comparison instructions.
+  bool VectorizeCmp;
+
+  /// @brief Vectorize getelementptr instructions.
+  bool VectorizeGEP;
+
+  /// @brief Vectorize loads and stores.
+  bool VectorizeMemOps;
 
   /// @brief Only generate aligned loads and stores.
   bool AlignedOnly;
@@ -68,9 +87,15 @@ struct VectorizeConfig {
   /// @brief The maximum number of pairable instructions per group.
   unsigned MaxInsts;
 
+  /// @brief The maximum number of candidate instruction pairs per group.
+  unsigned MaxPairs;
+
   /// @brief The maximum number of pairing iterations.
   unsigned MaxIter;
 
+  /// @brief Don't try to form odd-length vectors.
+  bool Pow2LenOnly;
+
   /// @brief Don't boost the chain-depth contribution of loads and stores.
   bool NoMemOpBoost;
 
@@ -88,6 +113,19 @@ struct VectorizeConfig {
 BasicBlockPass *
 createBBVectorizePass(const VectorizeConfig &C = VectorizeConfig());
 
+//===----------------------------------------------------------------------===//
+//
+// LoopVectorize - Create a loop vectorization pass.
+//
+Pass *createLoopVectorizePass(bool NoUnrolling = false,
+                              bool AlwaysVectorize = true);
+
+//===----------------------------------------------------------------------===//
+//
+// SLPVectorizer - Create a bottom-up SLP vectorizer pass.
+//
+Pass *createSLPVectorizerPass();
+
 //===----------------------------------------------------------------------===//
 /// @brief Vectorize the BasicBlock.
 ///