forked from OSchip/llvm-project
				
			Don't use LiveVariables::VarInfo::DefInst.
llvm-svn: 45815
This commit is contained in:
		
							parent
							
								
									0f8c7c4a73
								
							
						
					
					
						commit
						d445b8813f
					
				| 
						 | 
					@ -309,7 +309,14 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb,
 | 
				
			||||||
      // are actually two values in the live interval.  Because of this we
 | 
					      // are actually two values in the live interval.  Because of this we
 | 
				
			||||||
      // need to take the LiveRegion that defines this register and split it
 | 
					      // need to take the LiveRegion that defines this register and split it
 | 
				
			||||||
      // into two values.
 | 
					      // into two values.
 | 
				
			||||||
      unsigned DefIndex = getDefIndex(getInstructionIndex(vi.DefInst));
 | 
					      MachineRegisterInfo& MRI = mbb->getParent()->getRegInfo();
 | 
				
			||||||
 | 
					      unsigned lowIndex = ~0U;
 | 
				
			||||||
 | 
					      for (MachineRegisterInfo::def_iterator DI = MRI.def_begin(interval.reg),
 | 
				
			||||||
 | 
					          DE = MRI.def_end(); DI != DE; ++DI)
 | 
				
			||||||
 | 
					        if (getInstructionIndex(&*DI) < lowIndex)
 | 
				
			||||||
 | 
					          lowIndex = getInstructionIndex(&*DI);
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					      unsigned DefIndex = getDefIndex(lowIndex);
 | 
				
			||||||
      unsigned RedefIndex = getDefIndex(MIIdx);
 | 
					      unsigned RedefIndex = getDefIndex(MIIdx);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      const LiveRange *OldLR = interval.getLiveRangeContaining(RedefIndex-1);
 | 
					      const LiveRange *OldLR = interval.getLiveRangeContaining(RedefIndex-1);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue