This is an archive of the discontinued LLVM Phabricator instance.

[opt] Disincentivize new tests from using old pass syntax
ClosedPublic

Authored by lebedev.ri on Dec 8 2022, 9:52 AM.

Details

Summary

Over the past day or so, i've took a large swing at our tests,
and reduced the number of tests that were still using the old syntax
from ~1800 to just 200.

Left to handle: (as it is seen in this patch)

  • Transforms/LSR
  • Transforms/CGP
  • Transforms/TypePromotion
  • Transforms/HardwareLoops
  • Analysis/*
  • some misc.

I think this is the right point to start actively refusing
to honor the old syntax, except for the old tests,
to prevent the old syntax from creeping back in.

Thus, let's add temporary default-off flag,
and if it is not passed refuse to accept old syntax.
The tests that still need porting are annotated with this flag.

Diff Detail

Event Timeline

lebedev.ri created this revision.Dec 8 2022, 9:52 AM
Herald added a project: Restricted Project. · View Herald Transcript
lebedev.ri requested review of this revision.Dec 8 2022, 9:52 AM
lebedev.ri edited the summary of this revision. (Show Details)Dec 8 2022, 9:54 AM
lebedev.ri removed a reviewer: kmitropoulou.
fhahn added a subscriber: fhahn.Dec 8 2022, 12:04 PM

I like the idea, thanks for working on this!

aeubanks accepted this revision.Dec 8 2022, 12:33 PM
aeubanks added inline comments.
llvm/tools/opt/opt.cpp
90
This revision was not accepted when it landed; it landed in state Needs Review.Dec 8 2022, 12:54 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 12:54 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

@aeubanks Thank you for the review!