[PATCH] D136297: llvm-reduce: Skip reducing branches that already have the condition to set

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 15:45:05 PDT 2022


aeubanks added inline comments.


================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp:45
+
+      // Skip cases that already have the value we're going to set this to.
+      ConstantInt *Cond = dyn_cast<ConstantInt>(BR->getCondition());
----------------
arsenm wrote:
> arsenm wrote:
> > aeubanks wrote:
> > > we should prefer either zero or one over the other. if we prefer zero, don't try to to change a zero to a one. we do this in the ReduceOperands pass
> > The point here isn't to reduce the condition to zero or one. The point is to see what unconditionally branching to one side or the other can do. 
> Maybe this should proceed and try simplifyCFG anyway, even though that's redundant with the simplify-cfg reduction (which runs later)
yes, I think that makes sense


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

https://reviews.llvm.org/D136297



More information about the llvm-commits mailing list