[PATCH] D45308: [IPRA] Do not collect register usage information on functions that can be derefined
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 13 12:47:42 PDT 2018
MatzeB added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/TargetFrameLowering.h:338
static bool isSafeForNoCSROpt(const Function &F) {
- if (!F.hasLocalLinkage() || F.hasAddressTaken() ||
+ if (!F.isDefinitionExact() || F.hasAddressTaken() ||
!F.hasFnAttribute(Attribute::NoRecurse))
----------------
MatzeB wrote:
> I believe this should rather be
> `F.hasAvailableExternallyLinkage() || F.isInterposable() || F.hasAddressTaken() || !F.hasFnAttribute(Attribute::NoRecurse)`.
And we probably should also abort for `isLinkOnceLinkage()` (though I'm currently not sure if that linkage is even possible when the symbol doesn't have an external linkage...)
https://reviews.llvm.org/D45308
More information about the llvm-commits
mailing list