Re: [PATCH v2] RISC-V: Avoid unused frame-pointer references in stack ties
Jeffrey Law <[email protected]> Mon, 3 Aug 2026 20:28:29 -0600
| Newsgroups | gmane.comp.gcc.patches |
|---|---|
| Message-ID | <[email protected]> |
On 7/18/2026 12:14 PM, Jin Ma wrote: > > Removing the no-frame-pointer tie entirely would change existing > scheduling behavior. It would also require changing > riscv_sr_match_epilogue to match an epilogue without a stack tie, > while still requiring the tie for a frame-pointer epilogue. This > broadens the change and may introduce unintended effects. I wouldn't worry much about the scheduling behavior; in fact, I would claim current behavior is probably not what we want or intended. The tie's purpose is to prevent the stack from being deallocated before any FP based restores are done. What it's doing now is a stronger optimization barrier than intended. But prologue/epilogue scheduling is nowhere near as important as it used to be. The need to further adjust riscv_sr_match_epilogue to handle cases without a tie is meaningful. It's not likely that hard, but I can understand the desire not to try and tackle that right now. > > Any other questions or suggestions? No. I think it's OK as-is. One could argue that perhaps we'd like stronger tests, but I think we're OK there too. Commit when convenient. Thanks for tackling this and your patience. Jeff