Skip to content

[MCP] Use MCRegUnit as the key type of CopyTracker::Copies map. NFC. #98277

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 2 commits into from
Jul 11, 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
7 changes: 4 additions & 3 deletions llvm/lib/CodeGen/MachineCopyPropagation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/InitializePasses.h"
#include "llvm/MC/MCRegister.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
Expand Down Expand Up @@ -112,7 +113,7 @@ class CopyTracker {
bool Avail;
};

DenseMap<MCRegister, CopyInfo> Copies;
DenseMap<MCRegUnit, CopyInfo> Copies;

public:
/// Mark all of the given registers and their subregisters as unavailable for
Expand Down Expand Up @@ -251,7 +252,7 @@ class CopyTracker {
return !Copies.empty();
}

MachineInstr *findCopyForUnit(MCRegister RegUnit,
MachineInstr *findCopyForUnit(MCRegUnit RegUnit,
const TargetRegisterInfo &TRI,
bool MustBeAvailable = false) {
auto CI = Copies.find(RegUnit);
Expand All @@ -262,7 +263,7 @@ class CopyTracker {
return CI->second.MI;
}

MachineInstr *findCopyDefViaUnit(MCRegister RegUnit,
MachineInstr *findCopyDefViaUnit(MCRegUnit RegUnit,
const TargetRegisterInfo &TRI) {
auto CI = Copies.find(RegUnit);
if (CI == Copies.end())
Expand Down
Loading