summaryrefslogtreecommitdiffstats
path: root/llvm/utils/update_mir_test_checks.py
Commit message (Collapse)AuthorAgeFilesLines
* [UpdateTestChecks] Update tests optionDavid Bolvansky2019-08-071-33/+43
| | | | | | | | | | | | | | | | | | | | | 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
* [UpdateTestChecks] Emit warning when invalid value for -check-prefix(es) optionDavid Bolvansky2019-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add wildcard support to all update_*_test_checks.py scripts (PR37500)Simon Pilgrim2019-03-051-1/+3
| | | | | | | | 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
* Fix update_mir_test_checks.py to run on python3Simon Pilgrim2019-03-021-1/+3
| | | | | | | | Split off from D58817 Differential Revision: https://reviews.llvm.org/D58820 llvm-svn: 355268
* update_mir_test_checks: Fix handling of IR input after r326284Justin Bogner2018-03-121-2/+2
| | | | llvm-svn: 327305
* update_mir_test_checks: Use the regexes from UpdateTestChecks.commonJustin Bogner2018-02-281-13/+11
| | | | | | | | | 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
* update_mir_test_checks: Drop support for vreg block checksJustin Bogner2018-02-281-24/+9
| | | | | | | | | | 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
* update_mir_test_checks: Accept "." in function namesJustin Bogner2018-01-261-1/+1
| | | | llvm-svn: 323573
* update_mir_test_checks: Improve the check for LLVM IR in MIR filesJustin Bogner2018-01-231-1/+1
| | | | | | | | | 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
* update_mir_test_checks: Accept IR as input as well as MIRJustin Bogner2017-12-191-2/+29
| | | | | | | | 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
* update_mir_test_checks: Add "mir" to some states and regex namesJustin Bogner2017-12-181-16/+16
| | | | | | | For tests that do lowering we need to support IR as input, so here we clarify some names to avoid ambiguity in upcoming commits. llvm-svn: 321039
* update_mir_test_checks: Be careful about replacing entire vregsJustin Bogner2017-11-061-1/+2
| | | | | | | | | 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
* update_mir_test_checks: Support adding checks for vreg classesJustin Bogner2017-10-181-9/+24
| | | | | | | | | 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
* update_mir_test_checks: Improve message when updating failsJustin Bogner2017-10-181-2/+6
| | | | llvm-svn: 316133
* update_mir_test_checks: Handle empty liveinsJustin Bogner2017-10-181-1/+1
| | | | | | | 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
* update_mir_test_checks: Do a better job of disambiguating namesJustin Bogner2017-10-181-1/+4
| | | | | | | | | | 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
* update_mir_test_checks: Support '-' in function namesJustin Bogner2017-10-181-2/+2
| | | | | | Some AArch64 and AMDGPU tests have functions with hyphens in the names llvm-svn: 316063
* update_mir_test_checks: Fix a typo I made while preparing for commitJustin Bogner2017-10-181-1/+1
| | | | | | I accidentally added an extra arg here, so this didn't work at all. llvm-svn: 316062
* Add a utility to update MIR checks, similar to update_llc_test_checksJustin Bogner2017-10-181-0/+404
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
OpenPOWER on IntegriCloud