[polly] Replace SmallSet with SmallPtrSet (NFC) (#154367)

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 10 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.
This commit is contained in:
Kazu Hirata 2025-08-19 09:09:11 -07:00 committed by GitHub
parent ccd5ddab9b
commit 67ca5dad16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -689,7 +689,7 @@ isl::set ScopBuilder::getPredecessorDomainConstraints(BasicBlock *BB,
// Set of regions of which the entry block domain has been propagated to BB. // Set of regions of which the entry block domain has been propagated to BB.
// all predecessors inside any of the regions can be skipped. // all predecessors inside any of the regions can be skipped.
SmallSet<Region *, 8> PropagatedRegions; SmallPtrSet<Region *, 8> PropagatedRegions;
for (auto *PredBB : predecessors(BB)) { for (auto *PredBB : predecessors(BB)) {
// Skip backedges. // Skip backedges.