This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Disallow unused prefixes under Other
ClosedPublic

Authored by mtrofin on Jan 15 2021, 6:22 PM.

Diff Detail

Event Timeline

mtrofin created this revision.Jan 15 2021, 6:22 PM
mtrofin requested review of this revision.Jan 15 2021, 6:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 15 2021, 6:22 PM
mtrofin updated this revision to Diff 317138.Jan 15 2021, 6:26 PM

new line(s)

llvm/test/Other/new-pass-manager.ll
369

@aeubanks : this test has CHECK-EXT asserts, but not CHECK-NOEXT. Is there a meaningful CHECK-NOEXT I could add? (other than {{.*}} )

llvm/test/Other/opt-LTO-pipeline.ll
1

@aeubanks : it seems this test doesn't have CHECK-EXT, not CHECK-NOEXT - OK to remove the %llvmcheckext?

llvm/test/Other/print-slotindexes.ll
1–2

@jsji : I think s/ALL/CHECK was the intention, correct? (The test passes)

MaskRay added inline comments.
llvm/test/Other/new-pass-manager.ll
369

llvm/test/lit.cfg.py defines %llvmcheckext, which expands to either CHECK-EXT or CHECK-NOEXT. You'll need two builds to verify.

aeubanks added inline comments.Jan 15 2021, 7:22 PM
llvm/test/Other/new-pass-manager.ll
369

There's nothing to check for CHECK-NOEXT

mtrofin marked 2 inline comments as done.Jan 19 2021, 8:27 AM
mtrofin added inline comments.
llvm/test/Other/new-pass-manager.ll
369

(combining the 2 comments) so then adding the artificial CHECK-NOEXT check is ok? The alternative is to not use %llvmcheckext here, and just explicitly use the CHECK-EXT prefix.

aeubanks added inline comments.Jan 19 2021, 11:30 AM
llvm/test/Other/lit.local.cfg
7–8

pardon my ignorance, but why is this substitution necessary? does opt-bisect-legacy-pass-manager.ll break with --allow-unused-prefixes=true?

llvm/test/Other/new-pass-manager.ll
369

Yeah I think adding the CHECK-NOEXT is fine. We need %llvmcheckext to test both configurations when the extension is enabled and when it isn't.

mtrofin marked an inline comment as done.Jan 19 2021, 11:35 AM
mtrofin added inline comments.
llvm/test/Other/lit.local.cfg
7–8

It's not that it breaks because of duplicate flags, it breaks because opt-bisect-helper.py has trouble starting a process called "FileCheck --allow-unused-prefixes=false"

aeubanks added inline comments.Jan 19 2021, 11:41 AM
llvm/test/Other/lit.local.cfg
7–8

Oh FileCheck expands into FileCheck --allow-unused-prefixes=...? Why not keep FileCheck the way it is, then after everything has been fixed/pinned to --allow-unused-prefixes=false, change the default value of allow-unused-prefixes to true? Regressions should be fairly rare and easily fixable.
That's what I've been doing for opt's enable-new-pm flag.

mtrofin added inline comments.Jan 19 2021, 12:10 PM
llvm/test/Other/lit.local.cfg
7–8

I'd prefer avoiding the regressions even if rare. The fix here - once the flag default is flipped - is also very simple.

aeubanks accepted this revision.Jan 19 2021, 12:18 PM
aeubanks added inline comments.
llvm/test/Other/lit.local.cfg
7–8

Can you add a FIXME/TODO so it's clear that this can be reverted at some point?

This revision is now accepted and ready to land.Jan 19 2021, 12:18 PM
mtrofin updated this revision to Diff 317649.Jan 19 2021, 12:21 PM

added FIXME for the %FileChechRaw% substitution.

mtrofin marked an inline comment as done.Jan 19 2021, 12:21 PM
mtrofin added inline comments.
llvm/test/Other/lit.local.cfg
7–8

Good point - done!

MaskRay accepted this revision.Jan 19 2021, 12:22 PM

LGTM. If --allow-unused-prefixes=false tests are more than --allow-unused-prefixes=true tests, it is probably time to flip FileCheck default.

This revision was landed with ongoing or failed builds.Jan 19 2021, 12:32 PM
This revision was automatically updated to reflect the committed changes.
mtrofin marked an inline comment as done.
jsji added inline comments.Jan 21 2021, 1:08 PM
llvm/test/Other/print-slotindexes.ll
1–2

Yes, you are right. Thanks for fixing.