diff options
author | Mircea Trofin <mtrofin@google.com> | 2021-02-26 09:32:09 -0800 |
---|---|---|
committer | Mircea Trofin <mtrofin@google.com> | 2021-02-26 09:32:42 -0800 |
commit | a2bfc43ae10e9ed1252d96fd25add647c42b79f9 (patch) | |
tree | 2136c1605965baa8c548682966768b89bf3798cc /llvm/lib/CodeGen/VirtRegMap.cpp | |
parent | f8e810c359b51c911dfb3be1f8c48f28356c09ec (diff) | |
download | llvm-a2bfc43ae10e9ed1252d96fd25add647c42b79f9.zip llvm-a2bfc43ae10e9ed1252d96fd25add647c42b79f9.tar.gz llvm-a2bfc43ae10e9ed1252d96fd25add647c42b79f9.tar.bz2 |
[NFC] Const-ed 2 APIs in VirtRegMap
Diffstat (limited to 'llvm/lib/CodeGen/VirtRegMap.cpp')
-rw-r--r-- | llvm/lib/CodeGen/VirtRegMap.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp index 5e0ff9d..0e6eadb 100644 --- a/llvm/lib/CodeGen/VirtRegMap.cpp +++ b/llvm/lib/CodeGen/VirtRegMap.cpp @@ -99,7 +99,7 @@ unsigned VirtRegMap::createSpillSlot(const TargetRegisterClass *RC) { return SS; } -bool VirtRegMap::hasPreferredPhys(Register VirtReg) { +bool VirtRegMap::hasPreferredPhys(Register VirtReg) const { Register Hint = MRI->getSimpleHint(VirtReg); if (!Hint.isValid()) return false; @@ -108,7 +108,7 @@ bool VirtRegMap::hasPreferredPhys(Register VirtReg) { return Register(getPhys(VirtReg)) == Hint; } -bool VirtRegMap::hasKnownPreference(Register VirtReg) { +bool VirtRegMap::hasKnownPreference(Register VirtReg) const { std::pair<unsigned, unsigned> Hint = MRI->getRegAllocationHint(VirtReg); if (Register::isPhysicalRegister(Hint.second)) return true; |