[PATCH] D158477: [AMDGPU] Respect `nobuiltin` when converting `printf`
    Sameer Sahasrabuddhe via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Aug 22 06:33:10 PDT 2023
    
    
  
sameerds added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp:443-445
+          (!CI->isNoBuiltin() ||
+           (CI->hasFnAttr(Attribute::Builtin) &&
+            PrintfFunction->hasFnAttribute(Attribute::NoBuiltin))))
----------------
But doesn't `(!CI->isNoBuiltin())` cover all of this? It calls `hasFnAttrImpl()`, which in turn checks both attributes in the positive and negative sense, including on the called function. The overall effect is as the function comment says: "check whether this call should not be treated as a builtin".
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158477/new/
https://reviews.llvm.org/D158477
    
    
More information about the llvm-commits
mailing list