diff options
author | Alexey Bataev <a.bataev@outlook.com> | 2023-11-28 11:26:54 -0800 |
---|---|---|
committer | Alexey Bataev <a.bataev@outlook.com> | 2023-11-28 11:27:49 -0800 |
commit | 447da954c7dc3175ef3e04da7b2c65cd75c16f92 (patch) | |
tree | ad7664658be45ccb097bd39ab432875a19140c98 | |
parent | f00ffcdb58d6db902a8f86b0ce83a03874d113ad (diff) |
[SLP][NFC]Use DenseSet instead of SetVector, NFC.
For CSEBlocks we can safely use DenseSet, the order should not be
preserved for this container.
-rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index e6ac4c9024f2..a9ee101566e9 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -3034,7 +3034,7 @@ private: SetVector<Instruction *> GatherShuffleExtractSeq; /// A list of blocks that we are going to CSE. - SetVector<BasicBlock *> CSEBlocks; + DenseSet<BasicBlock *> CSEBlocks; /// Contains all scheduling relevant data for an instruction. /// A ScheduleData either represents a single instruction or a member of an @@ -10093,12 +10093,12 @@ class BoUpSLP::ShuffleInstructionBuilder final : public BaseShuffleAnalysis { /// Holds all of the instructions that we gathered. SetVector<Instruction *> &GatherShuffleExtractSeq; /// A list of blocks that we are going to CSE. - SetVector<BasicBlock *> &CSEBlocks; + DenseSet<BasicBlock *> &CSEBlocks; public: ShuffleIRBuilder(IRBuilderBase &Builder, SetVector<Instruction *> &GatherShuffleExtractSeq, - SetVector<BasicBlock *> &CSEBlocks) + DenseSet<BasicBlock *> &CSEBlocks) : Builder(Builder), GatherShuffleExtractSeq(GatherShuffleExtractSeq), CSEBlocks(CSEBlocks) {} ~ShuffleIRBuilder() = default; |