Add utility script to generate checks for opt or llc regression tests
authorSanjay Patel <spatel@rotateright.com>
Thu, 24 Mar 2016 23:19:26 +0000 (23:19 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 24 Mar 2016 23:19:26 +0000 (23:19 +0000)
commitfff7a3d0efde3f6f3d33c7b5e83d381101eea044
tree1480925dffd7648064f56000ddb4f23a1ab2d951
parent701338a75f0a33b4feee85df8fe8e6f74fe7abda
Add utility script to generate checks for opt or llc regression tests

This is an enhancement of the existing update_llc_test_checks.py script.
It adds some of the functionality from the script used in D17999 to make
the IR checking more flexible.

The bad news:
This actually is 'My First Python Program'. Thus, it's likely that I have
violated all best practices of Python programming if I've made a functional
change from the original program. If you see anything that's obviously
wrong, please let me know or feel free to fix it. I didn't even read any
documentation...

The good news:
I tested this on ~10 existing opt/llc regression tests, and it does what
I hoped for. It produces exact checking for IR regression tests and doesn't
signficantly change the existing llc-with-x86-target asm checking. The opt
tests that were modified in r263667, r263668, r263674, and r263679 are
examples of the expected results, except that this version of the script
puts the check lines ahead of the IR to follow the existing llc/asm
behavior.

If there are no complaints/fallout, we should be able to remove the
original script. Extending this script to be used for non-x86 and clang
regression tests would be the expected follow-up steps.

llvm-svn: 264357
llvm/utils/update_test_checks.py [new file with mode: 0755]