8 Commits

Author SHA1 Message Date
David Bolvansky
1401bc8ab1 [UpdateTestChecks] Update tests option
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368174 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-07 14:44:50 +00:00
David Bolvansky
8b74c63fb1 [UpdateTestChecks] Emit warning when invalid value for -check-prefix(es) option
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367244 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-29 17:41:00 +00:00
Simon Pilgrim
cf02f1a2eb Add wildcard support to all update_*_test_checks.py scripts (PR37500)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355386 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-05 10:44:37 +00:00
Simon Pilgrim
b739c0c2b7 [utils] Fix update scripts output when run on python3.
This fixes a "bytes-like object is required, not 'str'" python3 error I hit on update_llc_test_checks.py (but present on the other scripts as well) by matching what update_mca_test_checks.py already does, plus I've added an explicit 'utf-8' encoding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352633 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-30 16:15:59 +00:00
Serge Guelton
6da47bee84 Python compat - no explicit reference to Python version
Update documentation and shebang.

Differential Revision: https://reviews.llvm.org/D56252

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350327 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 15:44:24 +00:00
Serge Guelton
60ccceba74 Python compat - print statement
Make sure all print statements are compatible with Python 2 and Python3 using
the `from __future__ import print_function` statement.

Differential Revision: https://reviews.llvm.org/D56249

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350307 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 14:11:33 +00:00
Roman Lebedev
f58bfff04c [NFC] chmod +x utils/update_analyze_test_checks.py
Looks like a simple oversight.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334825 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 12:41:50 +00:00
Simon Pilgrim
d79c539c3b [UpdateTestChecks] Add update_analyze_test_checks.py for cost model analysis generation
The script allows the auto-generation of checks for cost model tests to speed up their creation and help improve coverage, which will help a lot with PR36550.

If the need arises we can add support for other analyze passes as well, but the cost models was the one I needed to get done - at the moment it just warns that any other analysis mode is unsupported.

I've regenerated a couple of x86 test files to show the effect.

Differential Revision: https://reviews.llvm.org/D45272

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329390 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-06 12:36:27 +00:00