[PATCH] D49884: [MachineOutliner] Add support for saving LR to a callee-saved register
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 27 17:11:55 PDT 2018
paquette marked an inline comment as done.
paquette added inline comments.
================
Comment at: lib/Target/AArch64/AArch64InstrInfo.cpp:4929
+/// I3
+/// RET
+///
----------------
efriedma wrote:
> An alternative sequence would be "ADR scratch, .+8; B OUTLINED_FUNCTION", and then in the outlined function "I1; I2; I3; BR scratch". Disadvantage is that every caller has to use the same register, and I guess you can't skip the save/restore in some callers like you're planning.
Yeah, the goal here is to set it up so that we can use the NoLRSave case whenever possible. However, it could still be worth it to use a sequence like this if it turns out that there are too few NoLRSave candidates for it to be worth it to keep them around.
================
Comment at: lib/Target/AArch64/AArch64InstrInfo.cpp:4952
+ // We only want callee-saved registers that were saved in the Candidate's
+ // frame.
+ const std::vector<CalleeSavedInfo> &CSInfo =
----------------
efriedma wrote:
> Why not a caller-save register?
I talked with Matthias about this, and apparently LiveRegUnits actually handles basically everything weird that could happen here, so it's not even really an issue...
https://reviews.llvm.org/D49884
More information about the llvm-commits
mailing list