-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RISCV] Refine getMaxPushPopReg like getLibCallID. NFC.
If save/restore libcall or Zcmp push/pop are enabled, callee-saved registers including ra would be assigned a negative frame index (-1 for ra, -2 for s0, ..., -13 for s11) by RISCVRegisterInfo::hasReservedSpillSlot. getLibCallID would find a callee-saved register that has max register id and with assigned negative frame index. And use this max register to get which save/restore libcall should be selected. In getMaxPushPopReg (for Zcmp push/pop, similar getLibCallID), it uses extra register class (PGPR) to check the saved register is in ra, s0-s11 instead of checking the frame index is negative. This patch just changes the checking for the saved register from `is contained in PGPR` to `has a negative frame index`. Reviewed By: fakepaper56 Differential Revision: https://reviews.llvm.org/D156393
- Loading branch information
Showing
3 changed files
with
5 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters