Skip to content

Commit

Permalink
[SOL] Inform stack size in error message (anza-xyz#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Jul 4, 2024
1 parent 14b9cd9 commit 0a1dd96
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 0a1dd96

Please sign in to comment.