summaryrefslogtreecommitdiff
path: root/clang-r353983e/include/llvm/Transforms/Vectorize.h
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2019-07-02 16:25:20 -0700
committerAli B <abittin@gmail.com>2019-07-05 19:33:16 +0300
commit9afee4e65dc5f9f5eb371683729ff67b8df81d03 (patch)
tree4cf241d6c9044f91ee8c06e6920174d06f8de0b6 /clang-r353983e/include/llvm/Transforms/Vectorize.h
parent2f19bd722c4c825320d1511c1ed83161b7f95d51 (diff)
Update prebuilt Clang to r353983e.HEADq10.0
clang 9.0.5 (based on r353983e) from build 5696680. Bug: http://b/135931688 Bug: http://b/136008926 Test: N/A Change-Id: I922d17410047d2e2df4625615352c588ee71b203
Diffstat (limited to 'clang-r353983e/include/llvm/Transforms/Vectorize.h')
-rw-r--r--clang-r353983e/include/llvm/Transforms/Vectorize.h143
1 files changed, 143 insertions, 0 deletions
diff --git a/clang-r353983e/include/llvm/Transforms/Vectorize.h b/clang-r353983e/include/llvm/Transforms/Vectorize.h
new file mode 100644
index 00000000..a411b566
--- /dev/null
+++ b/clang-r353983e/include/llvm/Transforms/Vectorize.h
@@ -0,0 +1,143 @@
+//===-- Vectorize.h - Vectorization Transformations -------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This header file defines prototypes for accessor functions that expose passes
+// in the Vectorize transformations library.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TRANSFORMS_VECTORIZE_H
+#define LLVM_TRANSFORMS_VECTORIZE_H
+
+namespace llvm {
+class BasicBlock;
+class BasicBlockPass;
+class Pass;
+
+//===----------------------------------------------------------------------===//
+/// Vectorize configuration.
+struct VectorizeConfig {
+ //===--------------------------------------------------------------------===//
+ // Target architecture related parameters
+
+ /// The size of the native vector registers.
+ unsigned VectorBits;
+
+ /// Vectorize boolean values.
+ bool VectorizeBools;
+
+ /// Vectorize integer values.
+ bool VectorizeInts;
+
+ /// Vectorize floating-point values.
+ bool VectorizeFloats;
+
+ /// Vectorize pointer values.
+ bool VectorizePointers;
+
+ /// Vectorize casting (conversion) operations.
+ bool VectorizeCasts;
+
+ /// Vectorize floating-point math intrinsics.
+ bool VectorizeMath;
+
+ /// Vectorize bit intrinsics.
+ bool VectorizeBitManipulations;
+
+ /// Vectorize the fused-multiply-add intrinsic.
+ bool VectorizeFMA;
+
+ /// Vectorize select instructions.
+ bool VectorizeSelect;
+
+ /// Vectorize comparison instructions.
+ bool VectorizeCmp;
+
+ /// Vectorize getelementptr instructions.
+ bool VectorizeGEP;
+
+ /// Vectorize loads and stores.
+ bool VectorizeMemOps;
+
+ /// Only generate aligned loads and stores.
+ bool AlignedOnly;
+
+ //===--------------------------------------------------------------------===//
+ // Misc parameters
+
+ /// The required chain depth for vectorization.
+ unsigned ReqChainDepth;
+
+ /// The maximum search distance for instruction pairs.
+ unsigned SearchLimit;
+
+ /// The maximum number of candidate pairs with which to use a full
+ /// cycle check.
+ unsigned MaxCandPairsForCycleCheck;
+
+ /// Replicating one element to a pair breaks the chain.
+ bool SplatBreaksChain;
+
+ /// The maximum number of pairable instructions per group.
+ unsigned MaxInsts;
+
+ /// The maximum number of candidate instruction pairs per group.
+ unsigned MaxPairs;
+
+ /// The maximum number of pairing iterations.
+ unsigned MaxIter;
+
+ /// Don't try to form odd-length vectors.
+ bool Pow2LenOnly;
+
+ /// Don't boost the chain-depth contribution of loads and stores.
+ bool NoMemOpBoost;
+
+ /// Use a fast instruction dependency analysis.
+ bool FastDep;
+
+ /// Initialize the VectorizeConfig from command line options.
+ VectorizeConfig();
+};
+
+//===----------------------------------------------------------------------===//
+//
+// LoopVectorize - Create a loop vectorization pass.
+//
+Pass *createLoopVectorizePass(bool InterleaveOnlyWhenForced = false,
+ bool VectorizeOnlyWhenForced = false);
+
+//===----------------------------------------------------------------------===//
+//
+// SLPVectorizer - Create a bottom-up SLP vectorizer pass.
+//
+Pass *createSLPVectorizerPass();
+
+//===----------------------------------------------------------------------===//
+/// Vectorize the BasicBlock.
+///
+/// @param BB The BasicBlock to be vectorized
+/// @param P The current running pass, should require AliasAnalysis and
+/// ScalarEvolution. After the vectorization, AliasAnalysis,
+/// ScalarEvolution and CFG are preserved.
+///
+/// @return True if the BB is changed, false otherwise.
+///
+bool vectorizeBasicBlock(Pass *P, BasicBlock &BB,
+ const VectorizeConfig &C = VectorizeConfig());
+
+//===----------------------------------------------------------------------===//
+//
+// LoadStoreVectorizer - Create vector loads and stores, but leave scalar
+// operations.
+//
+Pass *createLoadStoreVectorizerPass();
+
+} // End llvm namespace
+
+#endif