This is an archive of the discontinued LLVM Phabricator instance.

[UpdateTestChecks] Warn if any function conflicts under the same prefix
ClosedPublic

Authored by qiucf on Feb 19 2021, 7:23 PM.

Details

Summary

Currently the update test script will only output warning if all functions have conflict under different run lines with same prefix, and be silent if part of them conflict. This looks counterintuitive and leads to confusion sometimes.

Diff Detail

Event Timeline

qiucf created this revision.Feb 19 2021, 7:23 PM
qiucf requested review of this revision.Feb 19 2021, 7:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2021, 7:23 PM

lgtm code-wise. Added folks who were also interested in this, from a user perspective (I'm not a user of the tool, can't comment on that aspect.)

mtrofin added inline comments.Feb 19 2021, 7:34 PM
llvm/utils/UpdateTestChecks/common.py
339

Nit: may be worth renaming this function to more accurately reflect its new behavior. For example: _get_prefixes_failing_functions (or better name).

pengfei added inline comments.Feb 19 2021, 7:38 PM
llvm/utils/UpdateTestChecks/common.py
275

I think the warn only conflicting for all functions is used for the multi prefixes case, e.g. --check-prefixes=A,B;--check-prefixes=A,C when we hope the conflicted functions use B and C respectively. Under which case, warn A conflicted is annoying.

lkail added a subscriber: lkail.EditedJun 30 2021, 2:50 AM

This patch looks worthy pursuing. We have some tests under test/CodeGen/PowerPC uses -check-prefixes=A,B,C and got conflicts when updating them without any warning and some parts of checks disappear.

llvm/utils/UpdateTestChecks/common.py
275

Agree.

MaskRay added inline comments.Jul 24 2021, 2:32 PM
llvm/test/tools/UpdateTestChecks/update_test_checks/prefix_conflicts.test
2

Add a period.

3

no need for -f. cp is sufficient.

llvm/utils/UpdateTestChecks/common.py
276

https://llvm.org/docs/CodingStandards.html#error-and-warning-messages

It is more common not to capitalize the message.

348

2 column indentation.

MaskRay requested changes to this revision.Jul 24 2021, 2:33 PM

Looks reasonable but the test needs update. Request changes to remove this from folks' review queues

llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/conflict.ll
9

better to add another function

This revision now requires changes to proceed.Jul 24 2021, 2:33 PM
qiucf updated this revision to Diff 361587.Jul 26 2021, 12:57 AM
qiucf marked 6 inline comments as done.

Address some comments.

qiucf updated this revision to Diff 361588.Jul 26 2021, 1:03 AM
MaskRay accepted this revision.Dec 17 2021, 11:48 AM
This revision is now accepted and ready to land.Dec 17 2021, 11:48 AM

This should only warn if said occurrence would lead to the loss of the checks for the function.
I.e. it should not warn on prefix ALL given

; RUN: opt < %s -instcombine -S | FileCheck --check-prefixes=ALL,IC %s
; RUN: opt < %s -vectorize-slp -S | FileCheck --check-prefixes=ALL,SLP %s
lebedev.ri resigned from this revision.Jan 12 2023, 5:41 PM

This review seems to be stuck/dead, consider abandoning if no longer relevant.

mtrofin closed this revision.Jan 13 2023, 6:52 AM

D124306 should address this more comprehensively.