mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-05 13:09:10 +00:00
ecf84c1124
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225618 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
bugpoint | ||
buildit | ||
count | ||
crosstool | ||
emacs | ||
FileCheck | ||
fpcmp | ||
git | ||
git-svn | ||
jedit | ||
kate | ||
KillTheDoctor | ||
lint | ||
lit | ||
llvm-build | ||
llvm-lit | ||
Misc | ||
not | ||
PerfectShuffle | ||
release | ||
TableGen | ||
Target/ARM | ||
testgen | ||
textmate | ||
unittest | ||
valgrind | ||
vim | ||
yaml-bench | ||
bisect | ||
check-each-file | ||
clang-parse-diagnostics-file | ||
codegen-diff | ||
countloc.sh | ||
DSAclean.py | ||
DSAextract.py | ||
findmisopt | ||
findoptdiff | ||
findsym.pl | ||
GenLibDeps.pl | ||
GetRepositoryPath | ||
GetSourceVersion | ||
getsrcs.sh | ||
lldbDataFormatters.py | ||
llvm-compilers-check | ||
llvm-native-gxx | ||
llvm.grm | ||
llvm.natvis | ||
LLVMBuild.txt | ||
llvmdo | ||
llvmgrep | ||
Makefile | ||
makellvm | ||
shuffle_fuzz.py | ||
sort_includes.py | ||
test_debuginfo.pl | ||
update_llc_test_checks.py | ||
UpdateCMakeLists.pl | ||
wciia.py |