'python' means Python 2 on some platforms while Python 3 on others.
'python3' is Python 3 only. Python 2.7 End of Life is set to January 1,
2020. Getting rid of Python 2 support reduces maintenance burden.
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D70730
Summary:
This commit also introduces a common.debug() function to avoid many
`if args.verbose:` statements. Depends on D70428.
Reviewers: xbolva00, MaskRay, jdoerfert
Reviewed By: MaskRay
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70432
Summary:
Add a function common.parse_commandline_args() that adds options common
to all tools (--verbose and --update-only) and returns the parsed
commandline arguments. I plan to use the shared parsing of --verbose in a
follow-up commit to remove most of the `if args.verbose:` checks in the
scripts.
Reviewers: xbolva00, MaskRay
Reviewed By: MaskRay
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70428
Summary:
This adds a switch to the update_test_checks that triggers arguments and
other function annotations, e.g., personality, to be present in the
check line. If not set, the behavior should be the same as before.
If arguments are recorded, their names are scrubbed from the IR to allow
merging.
This patch includes D68153.
Reviewers: lebedev.ri, greened, spatel, xbolva00, RKSimon, mehdi_amini
Subscribers: bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68819
previously we would generate literal check lines w/ no reg-exps for
vregs as MI flags (nsw, ninf, etc.) won't be recognized as a part of MI.
Fixing that. Includes updating the MIR tests that suffered from the
problem.
Reviewed By: bogner
Differential Revision: https://reviews.llvm.org/D68905
llvm-svn: 374829
Summary:
Port of new feature introduced https://reviews.llvm.org/D65610 to other update scripts.
- update_*_checks.py: add an alias -u for --update-only
- port --update-only to other update_*_test_checks.py scripts
- update script aborts if the test file was generated by another update_*_test_checks.py utility
Reviewers: lebedev.ri, RKSimon, MaskRay, reames, gbedwell
Reviewed By: MaskRay
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65793
llvm-svn: 368174
Summary:
The script is silent for the following issue:
FileCheck %s -check-prefix=CHECK,POPCOUNT
FileCheck will catch it later, but I think we can warn here too.
Now it warns:
./update_llc_test_checks.py file.ll
WARNING: Supplied prefix 'CHECK,POPCOUNT' is invalid. Prefix must contain only alphanumeric characters, hyphens and underscores. Did you mean --check-prefixes=CHECK,POPCOUNT?
Reviewers: lebedev.ri, spatel, RKSimon, craig.topper, nikic, gbedwell
Reviewed By: RKSimon
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64589
llvm-svn: 367244
We can already update multiple files in each update call, this extends it to work with wildcards as well in the same way as update_mca_test_checks.py (to support shells that won't do this for us - windows command prompt etc.)
Differential Revision: https://reviews.llvm.org/D58817
llvm-svn: 355386
Some of the update_*_test_checks regexes have been moved into a
library, so we might as well use them in update_mir_test_checks.
Also includes minor bugfixes to the regexes that are there so we
don't regress update_mir_test_checks
llvm-svn: 326288
Since vregs are printed in the instruction stream now, checking the
vreg block is always redundant. Remove the temporary feature that
allowed us to do that.
This reverts r316134
llvm-svn: 326284
The LLVM IR section of a MIR document can start with "--- |" rather
than just "---", because "|" is a sigil for a freeform document in
YAML. We need to handle this so that we don't try to add check lines
to the LLVM IR functions in a MIR file.
llvm-svn: 323178
We need to handle IR for tests that want to do lowering (or just
-stop-after with IR as input). I've run this on one AArch64 test to
demonstrate what it looks like.
llvm-svn: 321048
Previously, this could end up replacing a vreg like %14 with
[[VREG1]]4, where VREG1 was the match for %1. That's obviously not
correct, though it hasn't actually come up in any tests I've converted
so far.
llvm-svn: 317509
This is a temporary hack to support adding checks for the "registers:"
block of mir functions. This is necessary to convert a number of tests
so that there's less churn when we change the MIR printer to put the
vreg classes on defs instead of in their own block.
llvm-svn: 316134
An empty livein block doesn't make much sense (why not just omit it?)
but they're legal and some tests have them, so its best to handle it.
llvm-svn: 316089
Matching prefixes isn't good enough, because it leads to things like
calling the first constant C3 just because there were two copies
before it. Tighten up the check to match more precisely, but also be
careful about ambiguity when dealing with target opcodes that end in a
number.
llvm-svn: 316088
This adds update_mir_test_checks, which updates the check lines in mir
tests. This can only update tests that start and end with .mir
currently (ie, -run-pass) but it should be sufficient for updating at
least some of the GlobalISel tests.
llvm-svn: 316057