[PATCH] D158246: [amdgpu] WIP variadics

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 18 13:30:58 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:297
+    NF->copyAttributesFrom(&F);
+    NF->setComdat(F.getComdat());
+    F.getParent()->getFunctionList().insert(F.getIterator(), NF);
----------------
Test the comdat? Weird that copyAttributesFrom seems to not cover it


================
Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:339
+    // This fails to update call instructions, unfortunately
+    // It may therefore also fail to update globals
+    F.replaceAllUsesWith(NF);
----------------
Add a test with a def and decl in a global initializer, and with a constantexpr cast in the initializer. I think this should also handle blockaddress


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158246



More information about the cfe-commits mailing list