[PATCH] D139726: llvm-reduce: Fix invalid reductions with llvm.used
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 9 10:25:19 PST 2022
jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.
LG, with some nits though.
================
Comment at: llvm/include/llvm/Transforms/Utils/ModuleUtils.h:88
+void removeFromUsedLists(Module &M,
+ std::function<bool(Constant *)> ShouldRemove);
+
----------------
Nit: I don't think we need it to be a std::function, llvm::function_ref should do.
================
Comment at: llvm/lib/Transforms/Utils/ModuleUtils.cpp:147
+ }
+}
+
----------------
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::`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139726/new/
https://reviews.llvm.org/D139726
More information about the llvm-commits
mailing list