[PATCH] D70635: Reland [AArch64][MachineOutliner] Return address signing for outlined functions
Oliver Stannard (Linaro) via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 09:39:23 PST 2019
ostannard accepted this revision.
ostannard added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:5209
+ // are not
+ auto hasIllegalSPModification = [&TRI](outliner::Candidate &C) {
+ int SPValue = 0;
----------------
tellenbach wrote:
> 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.
Ah, of course.
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