This is an archive of the discontinued LLVM Phabricator instance.

utils/update_mir_test_checks.py: support UTC_ARGS
ClosedPublic

Authored by gbossu on Oct 10 2022, 6:54 AM.

Details

Summary

As a reminder, UTC_ARGS is used by lit test cases to specify which
arguments need to be passed to update_XXXX_test_checks.py to be
auto-updated properly.

The support is achieved by relying on common.itertests, which is what other test
updaters use to iterate over test files.

This commit also changes how the --llc-binary option is saved in args.
It used to be saved as "llc", but it is here changed to the standard
"llc_binary" to make use of an existing ignore mechanism for specific
arguments. Without that change, the option would not be ignored and
would appear in UTC_ARGS. This would be different from what e.g.
update_llc_test_checks does. As update_mir_test_checks.py now supports
UTC_ARGS, it became important to ensure the option is ignored.

Depends on D135579

Diff Detail

Event Timeline

gbossu created this revision.Oct 10 2022, 6:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2022, 6:54 AM
Herald added a subscriber: arichardson. · View Herald Transcript
gbossu requested review of this revision.Oct 10 2022, 6:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2022, 6:54 AM
nhaehnle added inline comments.
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/print-stack.test
4–7

The common pattern for this is just re-run update_xxx_test_checks on %t.mir, but without the --print-fixed-stack argument.

Also, remove the print-stack-update.mir file.

gbossu added inline comments.Nov 3 2022, 5:55 AM
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/print-stack.test
4–7

I usually tend to prefer having tests as self-contained as possible to have more control over their inputs. But then again, I'm fine making the change, I think this also is a valid approach.

gbossu added inline comments.Nov 23 2022, 3:08 AM
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/print-stack.test
4–7

@nhaehnle Would you like me to change the test?

nhaehnle added inline comments.Nov 29 2022, 2:49 AM
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/print-stack.test
4–7

Yes, please. We should follow a consistent pattern.

gbossu updated this revision to Diff 478859.Nov 30 2022, 2:01 AM

Remove print-stack-update.mir test input file and just re-run update_mir_test_checks on the existing file instead.

gbossu marked 2 inline comments as done.Nov 30 2022, 2:02 AM
gbossu added inline comments.
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/print-stack.test
4–7

Fine to me, I pushed the change.

nhaehnle accepted this revision.Nov 30 2022, 2:27 AM

Thank you, LGTM

This revision is now accepted and ready to land.Nov 30 2022, 2:27 AM
gbossu updated this revision to Diff 478970.Nov 30 2022, 8:45 AM
gbossu marked an inline comment as done.

Rebase on latest main, otherwise tests seem to timeout.

Rebase on latest main, otherwise tests seem to timeout.

You can ignore the libfuzzer test failure - it's unrelated. I filed https://github.com/llvm/llvm-project/issues/59197 a few days ago since I noticed it failing on almost all reviews.

Rebase on latest main, otherwise tests seem to timeout.

You can ignore the libfuzzer test failure - it's unrelated. I filed https://github.com/llvm/llvm-project/issues/59197 a few days ago since I noticed it failing on almost all reviews.

Thank you, I suspected that and checked other pre-merge builds, but I guess I checked the wrong ones :)

This revision was automatically updated to reflect the committed changes.

Hi, it seems this fixedStack and related changes in the script breaks updating the regbankselect-amdgcn.s.buffer.load.ll from https://reviews.llvm.org/D150230

I had to check out an older update script to process that test.