[PATCH] D139726: llvm-reduce: Fix invalid reductions with llvm.used
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 9 10:31:10 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/ModuleUtils.cpp:147
+ }
+}
+
----------------
jdoerfert wrote:
> Nits:
> Early exit in the end.
> Surprised we need .getArrayRef()
> Here and elsewhere, we should keep GV around until we insert the new GlobalVariable before it to avoid reorderings in the IR.
> Remove `llvm::`
If you create the new one when the old one still exists, you get "@llvm.used0" which is wrong. Avoiding reordering would require finding the neighbor global
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139726/new/
https://reviews.llvm.org/D139726
More information about the llvm-commits
mailing list