This patch readjusts the frame stack for the push and pop instructions
co-author: @Lukacma
Paths
| Differential D134599
[RISCV] Readjusting the framestack for Zcmp ClosedPublic Authored by VincentWu on Sep 25 2022, 4:26 AM.
Details Summary This patch readjusts the frame stack for the push and pop instructions co-author: @Lukacma
Diff Detail
Event TimelineVincentWu added a parent revision: D132819: [RISCV] Add MC support of RISCV zcmp Extension.Sep 25 2022, 4:26 AM Comment Actions Do not emit Push/Pop when FP is in used Fixed the problem mentioned in https://github.com/plctlab/llvm-project/issues/58 For the reason that the Spec of the ZCMP extension is not currently modified for this purpose, the LLVM implementation is modified first to avoid this problem. When DisableFramePointerElim is set, the generation of Push/Pop instructions is stopped. KYG added inline comments. jrtc27 added inline comments.
This revision now requires changes to proceed.Apr 11 2023, 11:33 AM
VincentWu marked an inline comment as done. VincentWu retitled this revision from [RISCV] Add CodeGen support of RISCV zcmp Extension to [RISCV] Add CodeGen support of RISCV zcmp Extension. Comment Actionsrebase
Comment Actions Could you split this patch into 3 different revision for easier review? it also easier to demo what you improved for individual part.
My understating is: 1 can be standalone patch, and 2 has some dependency on 3, but it should be able to split that into separated patch? VincentWu marked 9 inline comments as done. VincentWu retitled this revision from [RISCV] Add CodeGen support of RISCV zcmp Extension to [RISCV] Readjusting the framestack for Zcmp. Comment Actions
VincentWu added a child revision: D150416: [RISCV] Add a pass to combine `cm.pop` and `ret` insts.May 11 2023, 7:02 PM
fakepaper56 added inline comments.
Comment Actions Should we provide the Zcmp stack size information into getFrameIndexReference and getFirstSPAdjustAmount like lib call ?
VincentWu marked 17 inline comments as done. Comment Actions
VincentWu marked 3 inline comments as done. Comment Actionsuse ImplicitDefine and set Implicit for push
Comment Actions
the status of this patch is sitll Needs Review. This revision was landed with ongoing or failed builds. Closed by commit rG6269ed24cf15: [RISCV] Readjusting the framestack for Zcmp (authored by VincentWu). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 462712 llvm/lib/Target/RISCV/CMakeLists.txt
llvm/lib/Target/RISCV/RISCV.h
llvm/lib/Target/RISCV/RISCVFrameLowering.h
llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h
llvm/lib/Target/RISCV/RISCVMoveOptimizer.cpp
llvm/lib/Target/RISCV/RISCVPushPopOptimizer.cpp
llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
llvm/test/CodeGen/RISCV/O0-pipeline.ll
llvm/test/CodeGen/RISCV/O3-pipeline.ll
llvm/test/CodeGen/RISCV/attributes.ll
llvm/test/CodeGen/RISCV/callee-saved-gprs.ll
llvm/test/CodeGen/RISCV/cm_mvas_mvsa.ll
|
Why does this return`int`? Aren't all the enum values positive?