summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/RegisterAliasing.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2018-06-13 13:24:41 +0000
committerGuillaume Chatelet <gchatelet@google.com>2018-06-13 13:24:41 +0000
commitc9f727bb85bbff4bf6f112e9887595e9928f4261 (patch)
treef2ff4104a68abfac205ddb8862573459c7b92ed0 /llvm/tools/llvm-exegesis/lib/RegisterAliasing.cpp
parent3a7654c15dd204fe3454f477fc576924e3686d0d (diff)
downloadbcm5719-llvm-c9f727bb85bbff4bf6f112e9887595e9928f4261.tar.gz
bcm5719-llvm-c9f727bb85bbff4bf6f112e9887595e9928f4261.zip
[llvm-exegesis] Cleaner design without mutable data.
Summary: Previous design was relying on the 'mutate' keyword and was quite confusing. This version separate mutable from immutable data and makes it clearer what changes and what doesn't. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48020 llvm-svn: 334596
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/RegisterAliasing.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/RegisterAliasing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/RegisterAliasing.cpp b/llvm/tools/llvm-exegesis/lib/RegisterAliasing.cpp
index fb5547bb603..039f78db985 100644
--- a/llvm/tools/llvm-exegesis/lib/RegisterAliasing.cpp
+++ b/llvm/tools/llvm-exegesis/lib/RegisterAliasing.cpp
@@ -64,7 +64,7 @@ RegisterAliasingTrackerCache::RegisterAliasingTrackerCache(
EmptyRegisters(RegInfo.getNumRegs()) {}
const RegisterAliasingTracker &
-RegisterAliasingTrackerCache::getRegister(llvm::MCPhysReg PhysReg) {
+RegisterAliasingTrackerCache::getRegister(llvm::MCPhysReg PhysReg) const {
auto &Found = Registers[PhysReg];
if (!Found)
Found.reset(new RegisterAliasingTracker(RegInfo, PhysReg));
@@ -72,7 +72,7 @@ RegisterAliasingTrackerCache::getRegister(llvm::MCPhysReg PhysReg) {
}
const RegisterAliasingTracker &
-RegisterAliasingTrackerCache::getRegisterClass(unsigned RegClassIndex) {
+RegisterAliasingTrackerCache::getRegisterClass(unsigned RegClassIndex) const {
auto &Found = RegisterClasses[RegClassIndex];
const auto &RegClass = RegInfo.getRegClass(RegClassIndex);
if (!Found)
OpenPOWER on IntegriCloud