diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2018-06-13 13:24:41 +0000 |
---|---|---|
committer | Guillaume Chatelet <gchatelet@google.com> | 2018-06-13 13:24:41 +0000 |
commit | c9f727bb85bbff4bf6f112e9887595e9928f4261 (patch) | |
tree | f2ff4104a68abfac205ddb8862573459c7b92ed0 /llvm/tools/llvm-exegesis/lib/RegisterAliasing.cpp | |
parent | 3a7654c15dd204fe3454f477fc576924e3686d0d (diff) | |
download | bcm5719-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.cpp | 4 |
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) |