diff options
author | Craig Topper <craig.topper@sifive.com> | 2024-02-13 14:59:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 14:59:28 -0800 |
commit | 0de2b26942f890a6ec84cd75ac7abe3f6f2b2e37 (patch) | |
tree | 433f1541454bc8f0df16d8068bb70f00271d481b /lldb/source/Commands/CommandObjectCommands.cpp | |
parent | 017675fff116c26bef7f0a389c983c909a3141fd (diff) | |
download | llvm-0de2b26942f890a6ec84cd75ac7abe3f6f2b2e37.zip llvm-0de2b26942f890a6ec84cd75ac7abe3f6f2b2e37.tar.gz llvm-0de2b26942f890a6ec84cd75ac7abe3f6f2b2e37.tar.bz2 |
[RISCV] Register fixed stack slots for callee saved registers for -msave-restore/Zcmp (#81392)
PEI previously used fake frame indices for these callee saved registers.
These fake frame indices are not register with MachineFrameInfo. This
required them to be deleted form CalleeSavedInfo after PEI to avoid
breaking later passes. See #79535
Unfortunately, removing the registers from CalleeSavedInfo pessimizes
Interprocedural Register Allocation. The RegUsageInfoCollector pass runs
after PEI and uses CalleeSavedInfo.
This patch replaces #79535 by properly creating fixed stack objects
through MachineFrameInfo. This changes the stack size and offsets
returned by MachineFrameInfo which requires changes to how
RISCVFrameLowering uses that information.
In addition to the individual object for each register, I've also create
a single large fixed object that covers the entire stack area covered by
cm.push or the libcalls. cm.push must always push a multiple of 16 bytes
and the save restore libcall pushes a multiple of stack align. I think
this leaves holes in the stack where we could spill other registers, but
it matches what we did previously. Maybe we can optimize this in the
future.
The only test changes are due to stack alignment handling after the
callee save registers. Since we now have the fixed objects, on the stack
the offset is non-zero when an aligned object is processed so the offset
gets rounded up, increasing the stack size.
I suspect we might need some more updates for RVV related code. There is
very little or maybe even no testing of RVV mixed with Zcmp and
save-restore.
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
0 files changed, 0 insertions, 0 deletions