diff options
author | Florian Hahn <flo@fhahn.com> | 2020-01-28 08:20:40 -0800 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2020-01-29 22:02:52 +0100 |
commit | b0536b58c1b40ac946bb653d13a63e4372c2ca17 (patch) | |
tree | b406fd9d485182488767a8f7ac07309ca7a32b46 /llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h | |
parent | d275de35f8bdb92e7b5789ebdb96df99fab504ab (diff) | |
download | bcm5719-llvm-b0536b58c1b40ac946bb653d13a63e4372c2ca17.tar.gz bcm5719-llvm-b0536b58c1b40ac946bb653d13a63e4372c2ca17.zip |
[LV] Do not try to sink dead instructions.
Dead instructions do not need to be sunk. Currently we try and record
the recipies for them, but there are no recipes emitted for them and
there's nothing to sink. They can be removed from SinkAfter while
marking them for recording.
Fixes PR44634.
Reviewers: rengolin, hsaito, fhahn, Ayal, gilr
Reviewed By: gilr
Differential Revision: https://reviews.llvm.org/D73423
(cherry picked from commit a911fef3dd79e0a04b241be7b476dde7e99744c4)
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h index c3ca43fcd49..e5edd305d3d 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h +++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h @@ -279,9 +279,10 @@ private: /// Build a VPlan using VPRecipes according to the information gather by /// Legal. This method is only used for the legacy inner loop vectorizer. - VPlanPtr - buildVPlanWithVPRecipes(VFRange &Range, SmallPtrSetImpl<Value *> &NeedDef, - SmallPtrSetImpl<Instruction *> &DeadInstructions); + VPlanPtr buildVPlanWithVPRecipes( + VFRange &Range, SmallPtrSetImpl<Value *> &NeedDef, + SmallPtrSetImpl<Instruction *> &DeadInstructions, + const DenseMap<Instruction *, Instruction *> &SinkAfter); /// Build VPlans for power-of-2 VF's between \p MinVF and \p MaxVF inclusive, /// according to the information gathered by Legal when it checked if it is |