[PATCH] D35644: [PEI] Separate saving and restoring CSRs into different functions. NFC
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 19 16:25:17 PDT 2017
MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.
LGTM, style suggestions below.
================
Comment at: lib/CodeGen/PrologEpilogInserter.cpp:484
+ if (!TFI->restoreCalleeSavedRegisters(RestoreBlock, I, CSI, TRI)) {
+ for (int i = CSI.size() - 1; i >= 0; --i) {
+ unsigned Reg = CSI[i].getReg();
----------------
How about `for (CalleeSavedInfo &CI : reverse(CSI)) ...`?
================
Comment at: lib/CodeGen/PrologEpilogInserter.cpp:501
+ MachineFrameInfo &MFI = Fn.getFrameInfo();
+ const std::vector<CalleeSavedInfo> &CSI = MFI.getCalleeSavedInfo();
MinCSFrameIndex = std::numeric_limits<unsigned>::max();
----------------
Could use an ArrayRef here.
https://reviews.llvm.org/D35644
More information about the llvm-commits
mailing list