Skip to content

Commit 447da95

Browse files
committed
[SLP][NFC]Use DenseSet instead of SetVector, NFC.
For CSEBlocks we can safely use DenseSet, the order should not be preserved for this container.
1 parent f00ffcd commit 447da95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3034,7 +3034,7 @@ class BoUpSLP {
30343034
SetVector<Instruction *> GatherShuffleExtractSeq;
30353035

30363036
/// A list of blocks that we are going to CSE.
3037-
SetVector<BasicBlock *> CSEBlocks;
3037+
DenseSet<BasicBlock *> CSEBlocks;
30383038

30393039
/// Contains all scheduling relevant data for an instruction.
30403040
/// A ScheduleData either represents a single instruction or a member of an
@@ -10093,12 +10093,12 @@ class BoUpSLP::ShuffleInstructionBuilder final : public BaseShuffleAnalysis {
1009310093
/// Holds all of the instructions that we gathered.
1009410094
SetVector<Instruction *> &GatherShuffleExtractSeq;
1009510095
/// A list of blocks that we are going to CSE.
10096-
SetVector<BasicBlock *> &CSEBlocks;
10096+
DenseSet<BasicBlock *> &CSEBlocks;
1009710097

1009810098
public:
1009910099
ShuffleIRBuilder(IRBuilderBase &Builder,
1010010100
SetVector<Instruction *> &GatherShuffleExtractSeq,
10101-
SetVector<BasicBlock *> &CSEBlocks)
10101+
DenseSet<BasicBlock *> &CSEBlocks)
1010210102
: Builder(Builder), GatherShuffleExtractSeq(GatherShuffleExtractSeq),
1010310103
CSEBlocks(CSEBlocks) {}
1010410104
~ShuffleIRBuilder() = default;

0 commit comments

Comments
 (0)