mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	Don't depend on live ranges being present.
DBG_VALUE instructions could be referring to non-existing virtual registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159020 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		@@ -642,11 +642,16 @@ UserValue::computeIntervals(MachineRegisterInfo &MRI,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // Register locations are constrained to where the register value is live.
 | 
					    // Register locations are constrained to where the register value is live.
 | 
				
			||||||
    if (TargetRegisterInfo::isVirtualRegister(Loc.getReg())) {
 | 
					    if (TargetRegisterInfo::isVirtualRegister(Loc.getReg())) {
 | 
				
			||||||
      LiveInterval *LI = &LIS.getInterval(Loc.getReg());
 | 
					      LiveInterval *LI = 0;
 | 
				
			||||||
      const VNInfo *VNI = LI->getVNInfoAt(Idx);
 | 
					      const VNInfo *VNI = 0;
 | 
				
			||||||
 | 
					      if (LIS.hasInterval(Loc.getReg())) {
 | 
				
			||||||
 | 
					        LI = &LIS.getInterval(Loc.getReg());
 | 
				
			||||||
 | 
					        VNI = LI->getVNInfoAt(Idx);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      SmallVector<SlotIndex, 16> Kills;
 | 
					      SmallVector<SlotIndex, 16> Kills;
 | 
				
			||||||
      extendDef(Idx, LocNo, LI, VNI, &Kills, LIS, MDT, UVS);
 | 
					      extendDef(Idx, LocNo, LI, VNI, &Kills, LIS, MDT, UVS);
 | 
				
			||||||
      addDefsFromCopies(LI, LocNo, Kills, Defs, MRI, LIS);
 | 
					      if (LI)
 | 
				
			||||||
 | 
					        addDefsFromCopies(LI, LocNo, Kills, Defs, MRI, LIS);
 | 
				
			||||||
      continue;
 | 
					      continue;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user