@@ -228,8 +228,9 @@ bool PEI::runOnMachineFunction(MachineFunction &MF) {
228
228
FrameIndexVirtualScavenging = TRI->requiresFrameIndexScavenging (MF);
229
229
ORE = &getAnalysis<MachineOptimizationRemarkEmitterPass>().getORE ();
230
230
231
- // Calculate the MaxCallFrameSize value for the function's frame
232
- // information. Also eliminates call frame pseudo instructions.
231
+ // Calculate the MaxCallFrameSize and AdjustsStack variables for the
232
+ // function's frame information. Also eliminates call frame pseudo
233
+ // instructions.
233
234
calculateCallFrameInfo (MF);
234
235
235
236
// Determine placement of CSR spill/restore code and prolog/epilog code:
@@ -349,8 +350,9 @@ bool PEI::runOnMachineFunction(MachineFunction &MF) {
349
350
return true ;
350
351
}
351
352
352
- // / Calculate the MaxCallFrameSize variables for the function's frame
353
- // / information and eliminate call frame pseudo instructions.
353
+ // / Calculate the MaxCallFrameSize and AdjustsStack
354
+ // / variables for the function's frame information and eliminate call frame
355
+ // / pseudo instructions.
354
356
void PEI::calculateCallFrameInfo (MachineFunction &MF) {
355
357
const TargetInstrInfo &TII = *MF.getSubtarget ().getInstrInfo ();
356
358
const TargetFrameLowering *TFI = MF.getSubtarget ().getFrameLowering ();
@@ -366,13 +368,13 @@ void PEI::calculateCallFrameInfo(MachineFunction &MF) {
366
368
return ;
367
369
368
370
// (Re-)Compute the MaxCallFrameSize with some sanity checks.
369
- bool WasComputed = MFI.isMaxCallFrameSizeComputed ();
371
+ bool CFSComputedIn = MFI.isMaxCallFrameSizeComputed ();
370
372
unsigned MaxCFSIn = MFI.getMaxCallFrameSize ();
371
373
bool AdjStackIn = MFI.adjustsStack ();
372
374
std::vector<MachineBasicBlock::iterator> FrameSDOps;
373
375
MFI.computeMaxCallFrameSize (MF, &FrameSDOps);
374
- assert (!WasComputed || (MaxCFSIn >= MFI.getMaxCallFrameSize () &&
375
- !(!AdjStackIn && MFI.adjustsStack ())));
376
+ assert (!CFSComputedIn || (MaxCFSIn >= MFI.getMaxCallFrameSize () &&
377
+ !(!AdjStackIn && MFI.adjustsStack ())));
376
378
377
379
if (TFI->canSimplifyCallFramePseudos (MF)) {
378
380
// If call frames are not being included as part of the stack frame, and
0 commit comments