[PATCH] D103043: [Internalize] Rename instead of removal if a to-be-internalized comdat has more than one member

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 24 13:48:13 PDT 2021


tejohnson added a comment.

This seems like a reasonable approach to me. Couple minor comments below. Hoping others can take a look in case I am missing anything.



================
Comment at: llvm/include/llvm/Transforms/IPO/Internalize.h:37
 class InternalizePass : public PassInfoMixin<InternalizePass> {
+  struct ComdatInfo {
+    size_t Size = 0;
----------------
Struct fields could use some descriptive comments.


================
Comment at: llvm/test/Transforms/Internalize/comdat-empty-moduleid.ll:5
+
+;; Without an exported symbol, the module ID is empty. In this case we don't rename comdat for ELF.
+
----------------
Presumably this doesn't hurt in practice because all of the internal symbols get removed during optimization?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103043



More information about the llvm-commits mailing list