[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 13:00:21 PDT 2017
MatzeB added inline comments.
================
Comment at: lib/CodeGen/MachineOutliner.cpp:885-894
+ // Get the overall cost of calling every candidate in this class, and the
+ // way that they should all be outlined.
+ std::pair<size_t, unsigned> CallOverheadPair =
+ TII.getOutliningCallOverhead(CandidateClass);
+ size_t CallOverhead = CallOverheadPair.first;
+
+ // Do the same thing for the frame for the candidates.
----------------
Seeing that both `getOutliningCallOverhead` and `getOutliningFrameOverhead` are now called in sequence and both perform some computations in common, this smells like maybe they should become one function now? (It certainly feels odd that currently you test `LR`-liveness twice for each candidate because of this split).
https://reviews.llvm.org/D36721
More information about the llvm-commits
mailing list