summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
diff options
context:
space:
mode:
authorGil Rapaport <gil.rapaport@intel.com>2019-10-07 17:24:33 +0300
committerGil Rapaport <gil.rapaport@intel.com>2019-11-05 17:29:13 +0200
commit100e797adb433724a17c9b42b6533cd634cb796b (patch)
tree414525d19cddb3386a0f845ac6c797c70231e0c8 /llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
parent95a25d8883365c26999496400a75df83e577e0de (diff)
downloadbcm5719-llvm-100e797adb433724a17c9b42b6533cd634cb796b.tar.gz
bcm5719-llvm-100e797adb433724a17c9b42b6533cd634cb796b.zip
[LV] Apply sink-after & interleave-groups as VPlan transformations (NFC)
This recommits 2be17087f8c38934b7fc9208ae6cf4e9b4d44f4b (reverted in d3ec06d219788801380af1948c7f7ef9d3c6100b for heap-use-after-free) with a fix in IAI's reset() which was not clearing the set of interleave groups after deleting them.
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
index a5e85f27fab..614f931cbc6 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
@@ -201,6 +201,9 @@ class LoopVectorizationPlanner {
/// The profitability analysis.
LoopVectorizationCostModel &CM;
+ /// The interleaved access analysis.
+ InterleavedAccessInfo &IAI;
+
SmallVector<VPlanPtr, 4> VPlans;
/// This class is used to enable the VPlan to invoke a method of ILV. This is
@@ -223,8 +226,10 @@ public:
LoopVectorizationPlanner(Loop *L, LoopInfo *LI, const TargetLibraryInfo *TLI,
const TargetTransformInfo *TTI,
LoopVectorizationLegality *Legal,
- LoopVectorizationCostModel &CM)
- : OrigLoop(L), LI(LI), TLI(TLI), TTI(TTI), Legal(Legal), CM(CM) {}
+ LoopVectorizationCostModel &CM,
+ InterleavedAccessInfo &IAI)
+ : OrigLoop(L), LI(LI), TLI(TLI), TTI(TTI), Legal(Legal), CM(CM),
+ IAI(IAI) {}
/// Plan how to best vectorize, return the best VF and its cost, or None if
/// vectorization and interleaving should be avoided up front.
OpenPOWER on IntegriCloud