@@ -222,23 +222,23 @@ void LiveRangeCalc::updateFromLiveIns() {
222
222
}
223
223
224
224
225
- void LiveRangeCalc::extend (LiveRange &LR, SlotIndex Kill , unsigned PhysReg) {
226
- assert (Kill .isValid () && " Invalid SlotIndex" );
225
+ void LiveRangeCalc::extend (LiveRange &LR, SlotIndex Use , unsigned PhysReg) {
226
+ assert (Use .isValid () && " Invalid SlotIndex" );
227
227
assert (Indexes && " Missing SlotIndexes" );
228
228
assert (DomTree && " Missing dominator tree" );
229
229
230
- MachineBasicBlock *KillMBB = Indexes->getMBBFromIndex (Kill .getPrevSlot ());
231
- assert (KillMBB && " No MBB at Kill " );
230
+ MachineBasicBlock *UseMBB = Indexes->getMBBFromIndex (Use .getPrevSlot ());
231
+ assert (UseMBB && " No MBB at Use " );
232
232
233
233
// Is there a def in the same MBB we can extend?
234
- if (LR.extendInBlock (Indexes->getMBBStartIdx (KillMBB ), Kill ))
234
+ if (LR.extendInBlock (Indexes->getMBBStartIdx (UseMBB ), Use ))
235
235
return ;
236
236
237
- // Find the single reaching def, or determine if Kill is jointly dominated by
237
+ // Find the single reaching def, or determine if Use is jointly dominated by
238
238
// multiple values, and we may need to create even more phi-defs to preserve
239
239
// VNInfo SSA form. Perform a search for all predecessor blocks where we
240
240
// know the dominating VNInfo.
241
- if (findReachingDefs (LR, *KillMBB, Kill , PhysReg))
241
+ if (findReachingDefs (LR, *UseMBB, Use , PhysReg))
242
242
return ;
243
243
244
244
// When there were multiple different values, we may need new PHIs.
@@ -257,12 +257,12 @@ void LiveRangeCalc::calculateValues() {
257
257
}
258
258
259
259
260
- bool LiveRangeCalc::findReachingDefs (LiveRange &LR, MachineBasicBlock &KillMBB ,
261
- SlotIndex Kill , unsigned PhysReg) {
262
- unsigned KillMBBNum = KillMBB .getNumber ();
260
+ bool LiveRangeCalc::findReachingDefs (LiveRange &LR, MachineBasicBlock &UseMBB ,
261
+ SlotIndex Use , unsigned PhysReg) {
262
+ unsigned UseMBBNum = UseMBB .getNumber ();
263
263
264
264
// Block numbers where LR should be live-in.
265
- SmallVector<unsigned , 16 > WorkList (1 , KillMBBNum );
265
+ SmallVector<unsigned , 16 > WorkList (1 , UseMBBNum );
266
266
267
267
// Remember if we have seen more than one value.
268
268
bool UniqueVNI = true ;
@@ -316,11 +316,11 @@ bool LiveRangeCalc::findReachingDefs(LiveRange &LR, MachineBasicBlock &KillMBB,
316
316
}
317
317
318
318
// No, we need a live-in value for Pred as well
319
- if (Pred != &KillMBB )
319
+ if (Pred != &UseMBB )
320
320
WorkList.push_back (Pred->getNumber ());
321
321
else
322
- // Loopback to KillMBB , so value is really live through.
323
- Kill = SlotIndex ();
322
+ // Loopback to UseMBB , so value is really live through.
323
+ Use = SlotIndex ();
324
324
}
325
325
}
326
326
@@ -338,9 +338,9 @@ bool LiveRangeCalc::findReachingDefs(LiveRange &LR, MachineBasicBlock &KillMBB,
338
338
E = WorkList.end (); I != E; ++I) {
339
339
SlotIndex Start, End;
340
340
std::tie (Start, End) = Indexes->getMBBRange (*I);
341
- // Trim the live range in KillMBB .
342
- if (*I == KillMBBNum && Kill .isValid ())
343
- End = Kill ;
341
+ // Trim the live range in UseMBB .
342
+ if (*I == UseMBBNum && Use .isValid ())
343
+ End = Use ;
344
344
else
345
345
Map[MF->getBlockNumbered (*I)] = LiveOutPair (TheVNI, nullptr );
346
346
Updater.add (Start, End, TheVNI);
@@ -355,8 +355,8 @@ bool LiveRangeCalc::findReachingDefs(LiveRange &LR, MachineBasicBlock &KillMBB,
355
355
I = WorkList.begin (), E = WorkList.end (); I != E; ++I) {
356
356
MachineBasicBlock *MBB = MF->getBlockNumbered (*I);
357
357
addLiveInBlock (LR, DomTree->getNode (MBB));
358
- if (MBB == &KillMBB )
359
- LiveIn.back ().Kill = Kill ;
358
+ if (MBB == &UseMBB )
359
+ LiveIn.back ().Kill = Use ;
360
360
}
361
361
362
362
return false ;
0 commit comments