diff options
| author | Adam Nemet <anemet@apple.com> | 2016-06-17 22:35:41 +0000 |
|---|---|---|
| committer | Adam Nemet <anemet@apple.com> | 2016-06-17 22:35:41 +0000 |
| commit | a9f09c6245b9078d0719e0fd9d2aba60b39dd3ac (patch) | |
| tree | d0559b1347ce05c36e2b100484bbfc9b4b759110 /llvm/lib/Transforms | |
| parent | fb72718ebf530f566d82d468619506fed3056671 (diff) | |
| download | llvm-a9f09c6245b9078d0719e0fd9d2aba60b39dd3ac.zip llvm-a9f09c6245b9078d0719e0fd9d2aba60b39dd3ac.tar.gz llvm-a9f09c6245b9078d0719e0fd9d2aba60b39dd3ac.tar.bz2 | |
[LAA] Enable symbolic stride speculation for all LAA clients
This is a functional change for LLE and LDist. The other clients (LV,
LVerLICM) already had this explicitly enabled.
The temporary boolean parameter to LAA is removed that allowed turning
off speculation of symbolic strides. This makes LAA's caching interface
LAA::getInfo only take the loop as the parameter. This makes the
interface more friendly to the new Pass Manager.
The flag -enable-mem-access-versioning is moved from LV to a LAA which
now allows turning off speculation globally.
llvm-svn: 273064
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 17 |
2 files changed, 2 insertions, 17 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp b/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp index 3ac01a7..b88ca7e 100644 --- a/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp +++ b/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp @@ -385,7 +385,7 @@ bool LoopVersioningLICM::legalLoopInstructions() { return false; } // Get LoopAccessInfo from current loop. - LAI = &LAA->getInfo(CurLoop, true); + LAI = &LAA->getInfo(CurLoop); // Check LoopAccessInfo for need of runtime check. if (LAI->getRuntimePointerChecking()->getChecks().empty()) { DEBUG(dbgs() << " LAA: Runtime check not found !!\n"); diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 0c4605e..954b593 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -130,21 +130,6 @@ static cl::opt<bool> MaximizeBandwidth( cl::desc("Maximize bandwidth when selecting vectorization factor which " "will be determined by the smallest type in loop.")); -/// This enables versioning on the strides of symbolically striding memory -/// accesses in code like the following. -/// for (i = 0; i < N; ++i) -/// A[i * Stride1] += B[i * Stride2] ... -/// -/// Will be roughly translated to -/// if (Stride1 == 1 && Stride2 == 1) { -/// for (i = 0; i < N; i+=4) -/// A[i:i+3] += ... -/// } else -/// ... -static cl::opt<bool> EnableMemAccessVersioning( - "enable-mem-access-versioning", cl::init(true), cl::Hidden, - cl::desc("Enable symbolic stride memory access versioning")); - static cl::opt<bool> EnableInterleavedMemAccesses( "enable-interleaved-mem-accesses", cl::init(false), cl::Hidden, cl::desc("Enable vectorization on interleaved memory accesses in a loop")); @@ -4970,7 +4955,7 @@ void LoopVectorizationLegality::collectLoopUniforms() { } bool LoopVectorizationLegality::canVectorizeMemory() { - LAI = &LAA->getInfo(TheLoop, EnableMemAccessVersioning); + LAI = &LAA->getInfo(TheLoop); auto &OptionalReport = LAI->getReport(); if (OptionalReport) emitAnalysis(VectorizationReport(*OptionalReport)); |
