This is an archive of the discontinued LLVM Phabricator instance.

[Utils] Add a switch controlling prefix warnings in UpdateTestChecks
ClosedPublic

Authored by mtrofin on Feb 1 2021, 3:24 PM.

Details

Summary

The switch controls both unused prefix warnings, and warnings about
functions which differ under different runs for a prefix, and, thus, end
up not having asserts for that prefix.

(If the latter case spans to all functions, then the former case kicks
in)

The switch is on by default, and can be disabled.

Diff Detail

Event Timeline

mtrofin created this revision.Feb 1 2021, 3:24 PM
mtrofin requested review of this revision.Feb 1 2021, 3:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 1 2021, 3:24 PM

this deserves a test I think

llvm/utils/UpdateTestChecks/common.py
274

leftover?

mtrofin updated this revision to Diff 320648.Feb 1 2021, 5:53 PM

removed leftover

mtrofin updated this revision to Diff 320650.Feb 1 2021, 5:59 PM
mtrofin marked an inline comment as done.

added test

This revision is now accepted and ready to land.Feb 1 2021, 6:02 PM
mtrofin updated this revision to Diff 320651.Feb 1 2021, 6:04 PM

added a test for disabling the switch, too

This revision was landed with ongoing or failed builds.Feb 1 2021, 6:15 PM
This revision was automatically updated to reflect the committed changes.
RKSimon added a subscriber: RKSimon.Feb 2 2021, 4:06 AM

@mtrofin This is causing warning spam on lots of x86 test regenerations - are we sure its actually disabled by default like its supposed to be?

this deserves a test I think

@mtrofin This is causing warning spam on lots of x86 test regenerations - are we sure its actually disabled by default like its supposed to be?

I'm not sure why it'd be supposed to be disabled by default. The old behavior (pre e2dc306b1ac71258e6ce40a66e778527f282c355) - while buggy - seemed to have the intention to warn frequently (but hard to tell, since it was buggy, see the description and discussion in https://reviews.llvm.org/D93078).

Separately, @craig.topper pointed at how his expectation was for this level of verbosity.

I would argue that the warnings have some value: they highlight functions that end up with no asserts under a prefix in a more compact way than visiting the generated file function by function - but happy to switch the default to whatever the broader community agrees to.

llvm/utils/UpdateTestChecks/common.py
274

yes - done.

This is still spewing out useless warnings - revert this?

This comment was removed by mtrofin.