[llvm] [MachineFrameInfo] Refactoring with computeMaxcallFrameSize() (NFC) (PR #78001)

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 10:04:21 PST 2024


JonPsson1 wrote:

> We should teach the verifier to make sure the adjustsStack is consistent with the SP defs in the instruction stream

Should I add a TODO in MachineVerifier, or you think this is needed as part of this?

Given this comment, I guess the verifier should check this after PEI. By then the frame instructions will have been removed, so it can only check for any def of SP. The rule would be "if the SP is defined anywhere in the function (or it has an inline-asm with alignstack), adjustsStack should be 'true'?


```

  /// Return true if this function adjusts the stack -- e.g.,
  /// when calling another function. This is only valid during and after
  /// prolog/epilog code insertion.
  bool adjustsStack() const { return AdjustsStack; }
  void setAdjustsStack(bool V) { AdjustsStack = V; }
```


https://github.com/llvm/llvm-project/pull/78001


More information about the llvm-commits mailing list