[PATCH] D69097: [AArch64][MachineOutliner] Return address signing for outlined functions
David Tellenbach via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 22 02:39:57 PDT 2019
tellenbach marked 5 inline comments as done.
tellenbach added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:5116-5117
+ [](const outliner::Candidate &a, const outliner::Candidate &b) {
+ if (outliningCandidatesSigningScopeConsensus(a, b) &&
+ outliningCandidatesSigningKeyConsensus(a, b)) {
+ return false;
----------------
paquette wrote:
> I find "consensus" kind of confusing to use here. I'd expect it to return true when they agree, not when they disagree. Maybe something like "disagree" would be better to use here?
What you expect is exactly what is happening: `outliningCandidatesSigningScopeConsensus(a, b)` returns `true` if `a` and `b` *agree* on their return address signing. If they do, the lambda for `std::adjacent_find` returns `false` and no differing Candidates are found.
This is basically a pairwise search through the iterator range for unequal candidates (w.r.t. to their return address signing).
However, the logic could be reversed:
```
if (OutliningCandidatesDisagree)
return true;
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69097/new/
https://reviews.llvm.org/D69097
More information about the llvm-commits
mailing list