[PATCH] D94153: [AMDGPU][Inliner] Remove amdgpu-inline and add new TTI inline hooks
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 06:47:37 PST 2021
arsenm 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;
----------------
I still don't really want to expand this compile time hack to a target hook
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