[PATCH] D152081: [Attributor] Add lightweight version for attribute deduction only. (WIP)
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 23 13:29:39 PDT 2023
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:3239
if (!Attrs.hasAttribute(AK))
- if (!AA::hasAssumedIRAttr<AK>(*this, nullptr, IRP, DepClassTy::NONE,
- IsKnown))
- getOrCreateAAFor<AAType>(IRP);
+ if (!Configuration.Allowed || Configuration.Allowed->count(&AAType::ID))
+ if (!AA::hasAssumedIRAttr<AK>(*this, nullptr, IRP, DepClassTy::NONE,
----------------
fhahn wrote:
> I noticed that `checkAndQueryIRAttr` would add additional attributes if it's directly implied by the IR, which is not what we want at least to start with; I updated things here to check `Allowed` for now, to avoid inferring additional attributes that aren't part of the Allowed set.
I don't see the point in this, honestly. This will only add known stuff, and we already don't have a 1:1 mapping, so it's unclear why we artificially prevent some known deductions that should not cost anything.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152081/new/
https://reviews.llvm.org/D152081
More information about the llvm-commits
mailing list