Open Quuxplusone opened 6 years ago
Bugzilla Link | PR37299 |
Status | NEW |
Importance | P enhancement |
Reported by | kripken (alonzakai@gmail.com) |
Reported on | 2018-04-30 20:01:11 -0700 |
Last modified on | 2018-05-31 14:44:27 -0700 |
Version | trunk |
Hardware | PC Linux |
CC | jgravelle@google.com, llvm-bugs@lists.llvm.org, llvm@sunfishcode.online |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
We could do that, but it would be a tradeoff of register pressure for code size. In general that's probably not worth doing?
It shouldn't have an effect on the uses of the stack pointer for the rest of the function though.
We have logic to save stack frame and base pointers into locals when we need them, which is in the presence of VLAs and over-aligned allocations. If we do emit a frame pointer, our epilog just resets the stack pointer to the value of the frame pointer. In theory we could add "optimize for code size" as an input into making that decision, though I'm not sure if that's plumbed through to the backend.