[PATCH] D155900: [TTI][NFCI] Introduce two new target transform hooks
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 14:55:15 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:855
+ !(CB->getCallingConv() == llvm::CallingConv::C &&
+ TargetLibraryInfoImpl::isCallingConvCCompatible(
+ const_cast<Function *>(Callee)))))
----------------
I didn't know any mismatches were allowed?
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:856
+ TargetLibraryInfoImpl::isCallingConvCCompatible(
+ const_cast<Function *>(Callee)))))
+ return false;
----------------
Should just fix these underlying queries being non const
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:886
+ // TODO: Depending on the source and maybe target we could disallow too
+ // many arugments. For now, we allow it.
+
----------------
Typo arugments
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:890-893
+ if (Callee->hasParamAttribute(ArgNo, Attribute::NoUndef) &&
+ willResultInPoisonOnCallEdge(CB->getArgOperand(ArgNo)->getType(),
+ Callee->getArg(ArgNo)->getType()))
+ return false;
----------------
Should move this to AttributeFuncs? Is there any useful case where this differs from areInlineCompatible?
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:898
+
+ // TODO: Check attributes.
+
----------------
Should at least check the ABI attributes
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155900/new/
https://reviews.llvm.org/D155900
More information about the llvm-commits
mailing list