diff options
author | Daniel Paoliello <danpao@microsoft.com> | 2025-09-25 10:42:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-25 10:42:34 -0700 |
commit | 80d3a8015513e2a64c47e173addda6ce816bf85c (patch) | |
tree | 6c2ce335c690819f1c219840e2df0b0e7618cb0d /llvm/unittests/Support/CommandLineTest.cpp | |
parent | 9e7b21afaaf1b165ac7a9f4bc4afd67a7d1b4687 (diff) | |
download | llvm-80d3a8015513e2a64c47e173addda6ce816bf85c.zip llvm-80d3a8015513e2a64c47e173addda6ce816bf85c.tar.gz llvm-80d3a8015513e2a64c47e173addda6ce816bf85c.tar.bz2 |
[NFC][x86] Cleanup X86FrameLowering::emitSPUpdate (#156948)
I was trying to understand the cases where `emitSPUpdate` may use a
`push` to adjust the stack pointer and realized that the code was more
complex than it needed to be.
* `Chunk` is redundant as it is set to `MaxSPChunk` and never modified.
* The only time we use the `push` optimization is if `Offset` is equal
to `SlotSize` (as `SlotSize` is never as large as `MaxSPChunk`, so will
never equal if `std::min` returned that value).
* If we use the `push` optimization, then we've finished adjusting the
stack and can return early instead of continuing the loop.
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
0 files changed, 0 insertions, 0 deletions