[PATCH] D152081: [Attributor] Add lightweight version for attribute deduction only. (WIP)
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 22 11:17:36 PDT 2023
fhahn 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,
----------------
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.
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