summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-05-21 17:47:50 +0000
committerChris Lattner <sabre@nondot.org>2010-05-21 17:47:50 +0000
commita81e1cab041e005439c70061842a9d8433d72111 (patch)
treeb8d3416dff13ffe276200b4d08c2d16c7902567b /llvm
parentb4e16872704f6d4b1d80e64f33d499e00aa7e792 (diff)
downloadbcm5719-llvm-a81e1cab041e005439c70061842a9d8433d72111.tar.gz
bcm5719-llvm-a81e1cab041e005439c70061842a9d8433d72111.zip
constify accessor.
llvm-svn: 104325
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/CodeGen/MachineRegisterInfo.h3
-rw-r--r--llvm/lib/CodeGen/PreAllocSplitting.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineRegisterInfo.h b/llvm/include/llvm/CodeGen/MachineRegisterInfo.h
index fd7431ff0bc..dede05f85c0 100644
--- a/llvm/include/llvm/CodeGen/MachineRegisterInfo.h
+++ b/llvm/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/llvm/lib/CodeGen/PreAllocSplitting.cpp b/llvm/lib/CodeGen/PreAllocSplitting.cpp
index eb19be12cee..997e82f11db 100644
--- a/llvm/lib/CodeGen/PreAllocSplitting.cpp
+++ b/llvm/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))
OpenPOWER on IntegriCloud