[PATCH] D90260: [llvm-reduce] Add reduction for aliases and special globals.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 28 05:25:21 PDT 2020
fhahn added inline comments.
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceAliasAndSpecialGlobals.cpp:21
+
+static auto SpecialGlobalNames = {"llvm.used", "llvm.compiler.used"};
+
----------------
lebedev.ri wrote:
> arsenm wrote:
> > I almost think reducing these should be a separate step
> +1, the rest of the patch is obvious.
Done, moved to D90302
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceAliasAndSpecialGlobals.cpp:32
+ if (!O.shouldKeep()) {
+ GA.replaceAllUsesWith(UndefValue::get(GA.getType()));
+ GA.eraseFromParent();
----------------
arsenm wrote:
> Would it make more sense to replace this with the aliasee as a first step, and rely on ordinary global reduction as a separate phase?
The updated code now replaces the alias with the aliasee directly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90260/new/
https://reviews.llvm.org/D90260
More information about the llvm-commits
mailing list