summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2019-05-15 10:05:49 +0000
committerFlorian Hahn <flo@fhahn.com>2019-05-15 10:05:49 +0000
commit9e778e6c730a439229079811674dec6a37792412 (patch)
tree66f8bcd21c4d226029cb4cd5dead532ea8a4f9d9 /llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
parentde1becfaa198115fa695e6bd939dce94ca15d860 (diff)
downloadbcm5719-llvm-9e778e6c730a439229079811674dec6a37792412.tar.gz
bcm5719-llvm-9e778e6c730a439229079811674dec6a37792412.zip
[LV] Move getScalarizationOverhead and vector call cost computations to CM. (NFC)
This reduces the number of parameters we need to pass in and they seem a natural fit in LoopVectorizationCostModel. Also simplifies things for D59995. As a follow up refactoring, we could only expose a expose a shouldUseVectorIntrinsic() helper in LoopVectorizationCostModel, instead of calling getVectorCallCost/getVectorIntrinsicCost in InnerLoopVectorizer/VPRecipeBuilder. Reviewers: Ayal, hsaito, dcaballe, rengolin Reviewed By: rengolin Differential Revision: https://reviews.llvm.org/D61638 llvm-svn: 360758
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h')
-rw-r--r--llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h b/llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
index bc6b2212099..0ca6a6b93cf 100644
--- a/llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+++ b/llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
@@ -29,9 +29,6 @@ class VPRecipeBuilder {
/// Target Library Info.
const TargetLibraryInfo *TLI;
- /// Target Transform Info.
- const TargetTransformInfo *TTI;
-
/// The legality analysis.
LoopVectorizationLegality *Legal;
@@ -104,11 +101,9 @@ public:
public:
VPRecipeBuilder(Loop *OrigLoop, const TargetLibraryInfo *TLI,
- const TargetTransformInfo *TTI,
LoopVectorizationLegality *Legal,
LoopVectorizationCostModel &CM, VPBuilder &Builder)
- : OrigLoop(OrigLoop), TLI(TLI), TTI(TTI), Legal(Legal), CM(CM),
- Builder(Builder) {}
+ : OrigLoop(OrigLoop), TLI(TLI), Legal(Legal), CM(CM), Builder(Builder) {}
/// Check if a recipe can be create for \p I withing the given VF \p Range.
/// If a recipe can be created, it adds it to \p VPBB.
OpenPOWER on IntegriCloud