[PATCH] D111503: [llvm-reduce] Introduce operands-to-args pass.

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 12 13:50:05 PDT 2021


aeubanks accepted this revision.
aeubanks added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp:46
+  // Do not replace literals.
+  if (isa<ConstantData>(Val))
+    return false;
----------------
Meinersbur wrote:
> aeubanks wrote:
> > if this pass runs after the `operands` pass and the `operands` pass reduces a bunch of things to `undef`, doesn't that mostly defeat the purpose of this since we're skipping constants?
> > and the description mentions that the instruction reduction pass should hopefully clean up dead instructions, but that runs before this pass
> > 
> > 
> I myself do not run anything that results in undefs being introduced using the `--passes` switch. Which passes run are enabled by default currently cannot be defined independently of which passes are available. I myself run llvm-reduce in a fixpoint loop until no more reductions are found, which is already necessary now to get a maximally reduced output. 
> 
> I'd work on upstreaming more patches supporting this workflow. Until then maybe you could suggest an alternative position in the current pass pipeline? In any case, there is still use in running it after the `operands` pass in reducing arguments that cannot just set to Undef (or zero with in `D110274`), but needs a non-constant value.
> 
Makes sense.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111503



More information about the llvm-commits mailing list