aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/RegAllocBasic.cpp
diff options
context:
space:
mode:
authorMircea Trofin <mtrofin@google.com>2020-10-09 16:38:42 -0700
committerMircea Trofin <mtrofin@google.com>2020-10-12 08:32:30 -0700
commit596a9f6b89d0d3e3f2897132ef1283941bd3607b (patch)
treed80beb8c25c4975bbb6299d3d12c46c95d908d00 /llvm/lib/CodeGen/RegAllocBasic.cpp
parentc2216d796aab7659771c05303f9d78bad4aeca07 (diff)
downloadllvm-596a9f6b89d0d3e3f2897132ef1283941bd3607b.zip
llvm-596a9f6b89d0d3e3f2897132ef1283941bd3607b.tar.gz
llvm-596a9f6b89d0d3e3f2897132ef1283941bd3607b.tar.bz2
[NFC][Regalloc] Pass VirtRegMap by reference.
It's never null - the reason it's modeled as a pointer is because the pass can't init it in its ctor. Passing by ref simplifies the code, too, as the null checks were unnecessary complexity. Differential Revision: https://reviews.llvm.org/D89171
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBasic.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocBasic.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp
index 83b5a05..05c8c4e 100644
--- a/llvm/lib/CodeGen/RegAllocBasic.cpp
+++ b/llvm/lib/CodeGen/RegAllocBasic.cpp
@@ -312,7 +312,7 @@ bool RABasic::runOnMachineFunction(MachineFunction &mf) {
RegAllocBase::init(getAnalysis<VirtRegMap>(),
getAnalysis<LiveIntervals>(),
getAnalysis<LiveRegMatrix>());
- VirtRegAuxInfo VRAI(*MF, *LIS, VRM, getAnalysis<MachineLoopInfo>(),
+ VirtRegAuxInfo VRAI(*MF, *LIS, *VRM, getAnalysis<MachineLoopInfo>(),
getAnalysis<MachineBlockFrequencyInfo>());
VRAI.calculateSpillWeightsAndHints();