[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 12:39:40 PDT 2022
nikic accepted this revision.
nikic added reviewers: MaskRay, efriedma.
nikic added subscribers: MaskRay, efriedma.
nikic added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: StephenFan.
This looks good to me. Maybe @MaskRay or @efriedma want to take a look: I'd mainly like confirmation that the current transform (merging an unnamed addr, internal linkage function that is part of `llvm.used` by replacing all uses) is indeed illegal, because I'm a bit hazy on the precise guarantees in this area.
================
Comment at: llvm/test/Transforms/MergeFunc/merge-used.ll:14
+ ret i32 %c
+}
+
----------------
Might make sense to including another function that calls `@a`, just to show that that call does get replaced with `@b` and doesn't call into the thunk.
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