Skip to content

Commit 5fdc747

Browse files
[AArch64] Replace SmallSet with SmallPtrSet (NFC) (#154264)
This patch replaces SmallSet<T *, N> with SmallPtrSet<T *, N>. Note that SmallSet.h "redirects" SmallSet to SmallPtrSet for pointer element types: template <typename PointeeType, unsigned N> class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {}; We only have 30 instances that rely on this "redirection". Since the redirection doesn't improve readability, this patch replaces SmallSet with SmallPtrSet for pointer element types. I'm planning to remove the redirection eventually.
1 parent 4831d92 commit 5fdc747

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AArch64/AArch64InstrInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7498,7 +7498,7 @@ static bool getGatherLanePattern(MachineInstr &Root,
74987498
// limit.
74997499
auto MBBItr = Root.getIterator();
75007500
unsigned RemainingSteps = GatherOptSearchLimit;
7501-
SmallSet<const MachineInstr *, 16> RemainingLoadInstrs;
7501+
SmallPtrSet<const MachineInstr *, 16> RemainingLoadInstrs;
75027502
RemainingLoadInstrs.insert(LoadInstrs.begin(), LoadInstrs.end());
75037503
const MachineBasicBlock *MBB = Root.getParent();
75047504

0 commit comments

Comments
 (0)