diff options
author | Chris Lattner <sabre@nondot.org> | 2010-05-21 17:47:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-05-21 17:47:50 +0000 |
commit | 65569b8ddff9d4b8647377291f8f0f2cb647bfb9 (patch) | |
tree | 553839a62d8618bedfbd9cf264250520be634fbd | |
parent | 19f5f71bba08e690611fa213647ac6bae814756b (diff) | |
download | external_llvm-65569b8ddff9d4b8647377291f8f0f2cb647bfb9.zip external_llvm-65569b8ddff9d4b8647377291f8f0f2cb647bfb9.tar.gz external_llvm-65569b8ddff9d4b8647377291f8f0f2cb647bfb9.tar.bz2 |
constify accessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104325 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/MachineRegisterInfo.h | 3 | ||||
-rw-r--r-- | lib/CodeGen/PreAllocSplitting.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h index fd7431f..dede05f 100644 --- a/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/include/llvm/CodeGen/MachineRegisterInfo.h @@ -216,7 +216,8 @@ public: /// getRegClassVirtRegs - Return the list of virtual registers of the given /// target register class. - std::vector<unsigned> &getRegClassVirtRegs(const TargetRegisterClass *RC) { + const std::vector<unsigned> & + getRegClassVirtRegs(const TargetRegisterClass *RC) const { return RegClass2VRegMap[RC->getID()]; } diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp index eb19be1..997e82f 100644 --- a/lib/CodeGen/PreAllocSplitting.cpp +++ b/lib/CodeGen/PreAllocSplitting.cpp @@ -1154,7 +1154,7 @@ PreAllocSplitting::SplitRegLiveIntervals(const TargetRegisterClass **RCs, // codegen is not modelling. Ignore these barriers for now. if (!TII->isSafeToMoveRegClassDefs(*RC)) continue; - std::vector<unsigned> &VRs = MRI->getRegClassVirtRegs(*RC); + const std::vector<unsigned> &VRs = MRI->getRegClassVirtRegs(*RC); for (unsigned i = 0, e = VRs.size(); i != e; ++i) { unsigned Reg = VRs[i]; if (!LIs->hasInterval(Reg)) |