[PATCH] D127751: [MergeFunctions] Preserve symbols used llvm.used/llvm.compiler.used

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 08:26:03 PDT 2022


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/MergeFunctions.cpp:862
+        if (CompilerUsed.contains(G))
+          appendToCompilerUsed(*G->getParent(), {G});
       } else {
----------------
So does this just leave the old function behind, effectively not doing a merge? I think what you actually want is to go into the alias/thunk code path in this case.


================
Comment at: llvm/test/Transforms/MergeFunc/merge-used.ll:6
+; CHECK: @a
+; CHECK: @b
+
----------------
Please include full check lines (update_test_checks.py with `--check-globals` flag), it's unclear what the result here is.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127751



More information about the llvm-commits mailing list