[PATCH] D94153: [AMDGPU][Inliner] Remove amdgpu-inline and add new TTI inline hooks
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 14 11:40:43 PST 2021
aeubanks marked 2 inline comments as done.
aeubanks added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:1124-1134
+bool GCNTTIImpl::mustNotInline(const CallBase *CB) const {
+ const Function *Caller = CB->getCaller();
+ const Function *Callee = CB->getCalledFunction();
+ if (InlineMaxBB && !Callee->hasFnAttribute(Attribute::InlineHint)) {
+ // Single BB does not increase total BB amount, thus subtract 1
+ size_t BBSize = Caller->size() + Callee->size() - 1;
+ return BBSize > InlineMaxBB;
----------------
arsenm wrote:
> I still don't really want to expand this compile time hack to a target hook
is stuffing this into areInlineCompatible() better?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94153/new/
https://reviews.llvm.org/D94153
More information about the llvm-commits
mailing list