[PATCH] D101512: [CodeGen] don't emit addrsig symbol if it's used only by metadata

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 29 15:00:16 PDT 2021


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

Looks good, but please factor it out for readability.



================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1851
+    for (const GlobalValue &GV : M.global_values()) {
+      if (!GV.use_empty()) {
+        llvm::SmallVector<const User *, 32> WorkList;
----------------
Please factor this out into its own function and give it some comments. I can suggest a name of `hasTransitiveNonMetadataUse`, or maybe just `hasNonMetadataUse`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101512



More information about the llvm-commits mailing list