utils/update_mir_test_checks.py: support UTC_ARGS
authorGaëtan Bossu <gaetan.bossu@amd.com>
Thu, 8 Dec 2022 20:50:02 +0000 (21:50 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 8 Dec 2022 20:54:56 +0000 (21:54 +0100)
commit8c0e401da78d16eeabcf022763b48832fe62b1ed
tree8b23adc9e618b27d7f2154b17ed6cd3a43494c6e
parentb1a95848180e66758f7a6d5bd172ced11a2e8914
utils/update_mir_test_checks.py: support UTC_ARGS

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.

Differential Revision: https://reviews.llvm.org/D135580
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/print-stack.mir.expected
llvm/test/tools/UpdateTestChecks/update_mir_test_checks/print-stack.test
llvm/utils/update_mir_test_checks.py