diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index b5c3e16..82c833e 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -1171,7 +1171,8 @@ MachineBasicBlock *MachineBasicBlock::SplitCriticalEdge( // On some targets like Mips, branches may kill virtual registers. Make sure // that LiveVariables is properly updated after updateTerminator replaces the // terminators. - LiveVariables *LV = P.getAnalysisIfAvailable<LiveVariables>(); + auto *LVWrapper = P.getAnalysisIfAvailable<LiveVariablesWrapperPass>(); + LiveVariables *LV = LVWrapper ? &LVWrapper->getLV() : nullptr; // Collect a list of virtual registers killed by the terminators. SmallVector<Register, 4> KilledRegs; |