[PATCH] D36721: [MachineOutliner] AArch64: Avoid saving + restoring LR if possible
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 16 12:49:02 PDT 2017
MatzeB added inline comments.
================
Comment at: include/llvm/Target/TargetInstrInfo.h:1560-1561
+ ///
+ /// \param CandidateClass A collection of [Start,End] intervals definining the
+ /// start and end points of a repeated sequence.
///
----------------
I wonder why this parameter is called `CandidateClass`, from reading the description I wonder why there is a `Class` suffix.
================
Comment at: include/llvm/Target/TargetInstrInfo.h:1567-1569
+ std::vector<
+ std::pair<MachineBasicBlock::iterator, MachineBasicBlock::iterator>>
+ &CandidateClass) const {
----------------
Is the vector supposed to be changed by this function? I'd use an `ArrayRef<...>` instead of `std::vector<...>` if it isn't.
================
Comment at: lib/Target/AArch64/AArch64InstrInfo.cpp:4443
+
+bool AArch64InstrInfo::canOutlineWithoutLRSave(MachineBasicBlock &MBB) const {
+ // Was LR saved in the function containing this basic block?
----------------
Not sure if I miss something, but I would expect that it is possible to check `LR` liveness exactly at the position where the call will be inserted rather than requiring the whole block to have `LR` unused?
https://reviews.llvm.org/D36721
More information about the llvm-commits
mailing list