Skip to content

Commit

Permalink
Inform stack size in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Jun 28, 2024
1 parent 7d055ed commit fd55adb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion llvm/lib/Target/SBF/SBFRegisterInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ static void WarnSize(int Offset, MachineFunction &MF, DebugLoc& DL)
dbgs() << " ";
DL.print(dbgs());
}
uint64_t StackSize = MF.getFrameInfo().getStackSize();
dbgs() << " Function " << MF.getFunction().getName()
<< " Stack offset of " << -Offset << " exceeded max offset of "
<< -MaxOffset << " by " << MaxOffset - Offset
<< " bytes, please minimize large stack variables\n";
<< " bytes, please minimize large stack variables. "
<< "Estimated function frame size: " << StackSize << " bytes.\n\n";
} else {
DiagnosticInfoUnsupported DiagStackSize(
MF.getFunction(),
Expand Down

0 comments on commit fd55adb

Please sign in to comment.