6 Commits

Author SHA1 Message Date
Craig Topper
4162a9bca4 [RISCV] Cleanup pass initialization.
Remove redundant initializations from pass constructors that were
already being initialized by LLVMInitializeRISCVTarget().
2023-12-07 18:21:38 -08:00
Craig Topper
44d4f975e4 [RISCV] Replace RISCV -> RISC-V in comments. NFC
I did this once previously, but more uses have crept in.
2023-10-21 10:52:24 -07:00
Alex Bradbury
fc654b4f59 [RISCV][NFC] Correct/clarify RISCVPushPopOptimizer.cpp header comment
Refer to Zcmp rather than Zca. Also, this pass will only modify POP
instructions (replacing with POPRET if possible).
2023-10-10 16:50:15 +01:00
Anmol P. Paralkar
53e89f5e3f [RISCV] Add bounds check before use on returned iterator.
Check iterator validity before use; fixes a crash seen in the RISC-V
Zcmp Push/Pop optimization pass when compiling an internal benchmark.

Reviewed By: asb, wangpc

Differential Revision: https://reviews.llvm.org/D157674
2023-08-14 16:06:09 -07:00
Alex Bradbury
cde5e4281b [RISCV][NFC] Get rid of additional unneeded static_cast around RISCVSubtarget
Some similar cases to 60152f1983336e709.
2023-07-20 14:37:58 +01:00
WuXinlong
c0221e006d [RISCV] Add a pass to combine cm.pop and ret insts
`RISCVPushPopOptimizer.cpp` combine `cm.pop` and `ret` to generates `cm.popretz` or `cm.popret` .

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D150416
2023-07-07 14:04:11 +08:00