diff options
| author | Jay Foad <jay.foad@amd.com> | 2023-03-22 16:56:05 +0000 |
|---|---|---|
| committer | Jay Foad <jay.foad@amd.com> | 2023-03-22 18:41:10 +0000 |
| commit | eac8e25ea5ee64ea46f93bba42d842fbde61609c (patch) | |
| tree | 7c6b07d7b1c4b3027f4f1d8c1567d62a31fe3cc5 /llvm/lib/CodeGen/VirtRegMap.cpp | |
| parent | 38d69df5c2dad0d4ceb08d840840ab083dd673fe (diff) | |
[CodeGen] Fix type of MachineRegisterInfo::RegAllocHints. NFC.
The first member of the pair should be unsigned instead of Register
because it is the hint type, 0 for simple (target independent) hints and
other values for target dependent hints.
Differential Revision: https://reviews.llvm.org/D146646
Diffstat (limited to 'llvm/lib/CodeGen/VirtRegMap.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/VirtRegMap.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp index f80b06d7e9b7..8e00712d2308 100644 --- a/llvm/lib/CodeGen/VirtRegMap.cpp +++ b/llvm/lib/CodeGen/VirtRegMap.cpp @@ -116,10 +116,10 @@ bool VirtRegMap::hasPreferredPhys(Register VirtReg) const { } bool VirtRegMap::hasKnownPreference(Register VirtReg) const { - std::pair<unsigned, unsigned> Hint = MRI->getRegAllocationHint(VirtReg); - if (Register::isPhysicalRegister(Hint.second)) + std::pair<unsigned, Register> Hint = MRI->getRegAllocationHint(VirtReg); + if (Hint.second.isPhysical()) return true; - if (Register::isVirtualRegister(Hint.second)) + if (Hint.second.isVirtual()) return hasPhys(Hint.second); return false; } |
