This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: Improve delta pass flag handling
ClosedPublic

Authored by arsenm on Oct 10 2022, 11:09 AM.

Details

Summary

Verify all the requested passes exist before trying to run any.
For long reductions, it was really annoying for it to get halfway through
and then I come back later to an incomplete reduction.

Also add a new skip-delta-passes flag. Most of the time I want to opt out
of specific reductions, rather than run a select few.

Diff Detail

Unit TestsFailed

Event Timeline

arsenm created this revision.Oct 10 2022, 11:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2022, 11:09 AM
arsenm requested review of this revision.Oct 10 2022, 11:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2022, 11:09 AM
Herald added a subscriber: wdng. · View Herald Transcript
regehr accepted this revision.Oct 10 2022, 11:22 AM

LGTM

llvm/tools/llvm-reduce/DeltaManager.cpp
202

unintended whitespace change?

This revision is now accepted and ready to land.Oct 10 2022, 11:22 AM
aeubanks added inline comments.Oct 10 2022, 11:39 AM
llvm/tools/llvm-reduce/DeltaManager.cpp
133–134

now unreachable?

150

there's already a StringRef::split overload that does this

there's also cl::CommaSeparated as part of cl::opt

185–186

with cl::CommaSeparated it should be easier to just create a set for skipped and just a list for RunPassList.

arsenm updated this revision to Diff 466609.Oct 10 2022, 1:55 PM
arsenm marked 3 inline comments as done.

Let cl::opt handle the lists and use unreachable

aeubanks accepted this revision.Oct 10 2022, 2:00 PM