[PATCH] D70635: Reland [AArch64][MachineOutliner] Return address signing for outlined functions

David Tellenbach via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 06:01:21 PST 2019


tellenbach marked an inline comment as done.
tellenbach added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:5209
+    // are not
+    auto hasIllegalSPModification = [&TRI](outliner::Candidate &C) {
+      int SPValue = 0;
----------------
ostannard wrote:
> tellenbach wrote:
> > This fixes the bug in the original patch (https://reviews.llvm.org/D69097).
> I think moving this to `getOutliningType` would be better, as that applies to individual instructions, not the whole sequence, so we might still be able to find a shorter sequence which can be outlined.
As you've mentioned, `getOutliningType` considers single instructions, therefore matching `sp` modifying `add` and `sub` instructions would be unnecessarily removed. 

Furthermore, `getOutliningType` runs before we know if an outlined function would need return address signing. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70635/new/

https://reviews.llvm.org/D70635





More information about the llvm-commits mailing list