This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: Skip reducing branches that already have the condition to set
Needs RevisionPublic

Authored by arsenm on Oct 19 2022, 2:57 PM.

Details

Summary

This should reduce the number of steps when resuming a
reduction.

Diff Detail

Event Timeline

arsenm created this revision.Oct 19 2022, 2:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2022, 2:57 PM
arsenm requested review of this revision.Oct 19 2022, 2:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2022, 2:57 PM
Herald added a subscriber: wdng. · View Herald Transcript
aeubanks added inline comments.Oct 20 2022, 11:08 AM
llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
45

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

arsenm added inline comments.Oct 20 2022, 11:35 AM
llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
45

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.

arsenm added inline comments.Oct 20 2022, 11:41 AM
llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
45

Maybe this should proceed and try simplifyCFG anyway, even though that's redundant with the simplify-cfg reduction (which runs later)

aeubanks added inline comments.Oct 21 2022, 3:45 PM
llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
45

yes, I think that makes sense

lebedev.ri requested changes to this revision.Jan 15 2023, 5:19 PM

(as per inline comments)

This revision now requires changes to proceed.Jan 15 2023, 5:19 PM