[PATCH] D156708: AMDGPU: Consider nobuiltin when querying defined libfuncs

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 14:39:28 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp:960
 
-  // check formal with actual types conformance
-  if (F && !F->isDeclaration() &&
-      fInfo.isCompatibleSignature(F->getFunctionType()))
-    return F;
+  if (F->hasFnAttribute(Attribute::NoBuiltin))
+    return nullptr;
----------------
Pierre-vh wrote:
> nit: can you add a small not explaining why it's important to respect this attr?
> e.g. what happens if we don't respect it? what does this fix?
> 
> Note can be here or in the test, doesn't matter, it's just to preserve some context surrounding this change.
I think the correct place is the LangRef, where this is already semi-documented


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156708/new/

https://reviews.llvm.org/D156708



More information about the llvm-commits mailing list