Skip to content

[NFC][MachineLICM] Use SmallDenseSet instead of SmallSet #95201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions llvm/lib/CodeGen/MachineLICM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ namespace {
}

// Track 'estimated' register pressure.
SmallSet<Register, 32> RegSeen;
SmallDenseSet<Register> RegSeen;
SmallVector<unsigned, 8> RegPressure;

// Register pressure "limit" per register pressure set. If the pressure
Expand Down Expand Up @@ -224,7 +224,7 @@ namespace {
MachineBasicBlock *CurPreheader);

void ProcessMI(MachineInstr *MI, BitVector &RUDefs, BitVector &RUClobbers,
SmallSet<int, 32> &StoredFIs,
SmallDenseSet<int> &StoredFIs,
SmallVectorImpl<CandidateInfo> &Candidates,
MachineLoop *CurLoop);

Expand Down Expand Up @@ -464,7 +464,7 @@ static void applyBitsNotInRegMaskToRegUnitsMask(const TargetRegisterInfo &TRI,
/// gather register def and frame object update information.
void MachineLICMBase::ProcessMI(MachineInstr *MI, BitVector &RUDefs,
BitVector &RUClobbers,
SmallSet<int, 32> &StoredFIs,
SmallDenseSet<int> &StoredFIs,
SmallVectorImpl<CandidateInfo> &Candidates,
MachineLoop *CurLoop) {
bool RuledOut = false;
Expand Down Expand Up @@ -568,7 +568,7 @@ void MachineLICMBase::HoistRegionPostRA(MachineLoop *CurLoop,
BitVector RUClobbers(NumRegUnits); // RUs defined more than once.

SmallVector<CandidateInfo, 32> Candidates;
SmallSet<int, 32> StoredFIs;
SmallDenseSet<int> StoredFIs;

// Walk the entire region, count number of defs for each register, and
// collect potential LICM candidates.
Expand Down
Loading