summaryrefslogtreecommitdiffstats
path: root/llvm/utils/update_llc_test_checks.py
Commit message (Collapse)AuthorAgeFilesLines
* don't hardcode the name of the llc checks scriptSanjay Patel2016-03-241-5/+2
| | | | | | | | | | We lose the 'utils' directory name in our advertising line with this change. We could retain that, but I don't see the point. This removes a dependency for making the script apply to more than 'llc'. Ie, we'll want to change the script name if it works with opt/clang too. llvm-svn: 264310
* reorganize llc checks script to allow more flexibility, part 2; NFCISanjay Patel2016-03-241-73/+104
| | | | | | | | The goal is to enhance this script to be used with opt and clang: Break 'main' into functions and change variable names to be more generic because we want to handle more than x86 asm output. llvm-svn: 264307
* reorganize llc checks script to allow more flexibility; NFCISanjay Patel2016-03-231-28/+31
| | | | | | | | | The goal is to enhance this script to be used with opt and clang: Group all of the regexes together, so it's easier to see what's going on. This will make it easier to break main() up into pieces too. Also, note that some of the regexes are for x86-specific asm. llvm-svn: 264197
* [utils] Add windows support to update_llc_test_checks.pySimon Pilgrim2016-01-271-1/+3
| | | | | | | | Strip dos line endings from llc generated files to allow the regex patterns to match them. Ensure updated *.ll files are generated with unix style line endings. llvm-svn: 258987
* Make utils/update_llc_test_checks.py note that the assertions areJames Y Knight2015-11-231-1/+7
| | | | | | | | | autogenerated. Also update existing test cases which appear to be generated by it and weren't modified (other than addition of the header) by rerunning it. llvm-svn: 253917
* [x86] Teach my test updating script about another quirk of the printedChandler Carruth2015-02-151-1/+1
| | | | | | | | | | | asm and port the mmx vector shuffle test to it. Not thrilled with how it handles the stack manipulation logic, but I'm much less bothered by that than I am by updating the test manually. =] If anyone wants to teach the test checks management script about stack adjustment patterns, that'd be cool too. llvm-svn: 229268
* [x86] Teach the test update script to strip trailing whitespace.Chandler Carruth2015-02-041-0/+3
| | | | | | | | This is done in a bit of a strange way to use a multiline RE instead of looping over the lines. Suggestions welcome here for a more pythonic way of doing this as long as its reasonably fast. llvm-svn: 228131
* [x86] Tweak my update script to use test case function names startingChandler Carruth2015-02-031-0/+3
| | | | | | | | | | | | with 'stress' to indicate that the specific output isn't interesting and relax them to only check the last instruction (a ret). I've updated the one test case that really uses this to name the one 'stress_test' which was actually producing output we can directly check. With this, the script doesn't introduce noise when run over the v16 test file. llvm-svn: 228033
* Add a new utility script that helps update very simple regression tests.Chandler Carruth2015-01-121-0/+207
This script is currently specific to x86 and limited to use with very small regression or feature tests using 'llc' and 'FileCheck' in a reasonably canonical way. It is in no way general purpose or robust at this point. However, it works quite well for simple examples. Here is the intended workflow: - Make a change that requires updating N test files and M functions' assertions within those files. - Stash the change. - Update those N test files' RUN-lines to look "canonical"[1]. - Refresh the FileCheck lines for either the entire file or select functions by running this script. - The script will parse the RUN lines and run the 'llc' binary you give it according to each line, collecting the asm. - It will then annotate each function with the appropriate FileCheck comments to check every instruction from the start of the first basic block to the last return. - There will be numerous cases where the script either fails to remove the old lines, or inserts checks which need to be manually editted, but the manual edits tend to be deletions or replacements of registers with FileCheck variables which are fast manual edits. - A common pattern is to have the script insert complete checking of every instruction, and then edit it down to only check the relevant ones. - Be careful to do all of these cleanups though! The script is designed to make transferring and formatting the asm output of llc into a test case fast, it is *not* designed to be authoratitive about what constitutes a good test! - Commit the nice fresh baseline of checks. - Unstash your change and rebuild llc. - Re-run script to regenerate the FileCheck annotations - Remember to re-cleanup these annotations!!! - Check the diff to make sure this is sane, checking the things you expected it to, and check that the newly updated tests actually pass. - Profit! Also, I'm *terrible* at writing Python, and frankly I didn't spend a lot of time making this script beautiful or well engineered. But it's useful to me and may be useful to others so I thought I'd send it out. http://reviews.llvm.org/D5546 llvm-svn: 225618
OpenPOWER on IntegriCloud