summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-11-09 18:38:19 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-11-09 20:10:12 +0000
commit6976a0e826623b0490280b546ed9c5c2ba7ece26 (patch)
treeb1e37ab2d384ef43967d936248a35e38b4989255 /llvm/lib
parentf092e80939f7c1ee60c7b04197c107c923aaf238 (diff)
downloadbcm5719-llvm-6976a0e826623b0490280b546ed9c5c2ba7ece26.tar.gz
bcm5719-llvm-6976a0e826623b0490280b546ed9c5c2ba7ece26.zip
RegisterCoalescer - remove duplicate variable to fix Wshadow warning. NFCI.
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index faca645c9e8..c44a302c499 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -3115,7 +3115,8 @@ void JoinVals::eraseInstrs(SmallPtrSetImpl<MachineInstr*> &ErasedInstrs,
LiveInterval *LI) {
for (unsigned i = 0, e = LR.getNumValNums(); i != e; ++i) {
// Get the def location before markUnused() below invalidates it.
- SlotIndex Def = LR.getValNumInfo(i)->def;
+ VNInfo *VNI = LR.getValNumInfo(i);
+ SlotIndex Def = VNI->def;
switch (Vals[i].Resolution) {
case CR_Keep: {
// If an IMPLICIT_DEF value is pruned, it doesn't serve a purpose any
@@ -3131,8 +3132,6 @@ void JoinVals::eraseInstrs(SmallPtrSetImpl<MachineInstr*> &ErasedInstrs,
// In such cases, removing this def from the main range must be
// complemented by extending the main range to account for the liveness
// of the other subrange.
- VNInfo *VNI = LR.getValNumInfo(i);
- SlotIndex Def = VNI->def;
// The new end point of the main range segment to be extended.
SlotIndex NewEnd;
if (LI != nullptr) {
OpenPOWER on IntegriCloud