Skip to content

Commit

Permalink
[SOL] Do not miss stack size errors (anza-xyz#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Jun 29, 2024
1 parent b131dcb commit a725ce4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions llvm/lib/Target/SBF/SBFRegisterInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ BitVector SBFRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
static void WarnSize(int Offset, MachineFunction &MF, DebugLoc& DL)
{
static Function *OldMF = nullptr;
if (&(MF.getFunction()) == OldMF) {
return;
}
OldMF = &(MF.getFunction());
int MaxOffset = -1 * SBFRegisterInfo::FrameLength;
if (Offset <= MaxOffset) {

if (&(MF.getFunction()) == OldMF) {
return;
}
OldMF = &(MF.getFunction());

if (MF.getSubtarget<SBFSubtarget>().isSolana()) {
dbgs() << "Error:";
if (DL) {
Expand Down

0 comments on commit a725ce4

Please sign in to comment.