llvm/utils
Daniel Sanders 64b77007a6 [globalisel][tablegen] Generate rule coverage and use it to identify untested rules
Summary:
This patch adds a LLVM_ENABLE_GISEL_COV which, like LLVM_ENABLE_DAGISEL_COV,
causes TableGen to instrument the generated table to collect rule coverage
information. However, LLVM_ENABLE_GISEL_COV goes a bit further than
LLVM_ENABLE_DAGISEL_COV. The information is written to files
(${CMAKE_BINARY_DIR}/gisel-coverage-* by default). These files can then be
concatenated into ${LLVM_GISEL_COV_PREFIX}-all after which TableGen will
read this information and use it to emit warnings about untested rules.

This technique could also be used by SelectionDAG and can be further
extended to detect hot rules and give them priority over colder rules.

Usage:
* Enable LLVM_ENABLE_GISEL_COV in CMake
* Build the compiler and run some tests
* cat gisel-coverage-[0-9]* > gisel-coverage-all
* Delete lib/Target/*/*GenGlobalISel.inc*
* Build the compiler

Known issues:
* ${LLVM_GISEL_COV_PREFIX}-all must be generated as a manual
  step due to a lack of a portable 'cat' command. It should be the
  concatenation of all ${LLVM_GISEL_COV_PREFIX}-[0-9]* files.
* There's no mechanism to discard coverage information when the ruleset
  changes

Depends on D39742

Reviewers: ab, qcolombet, t.p.northover, aditya_nandakumar, rovka

Reviewed By: rovka

Subscribers: vsk, arsenm, nhaehnle, mgorny, kristof.beyls, javed.absar, igorb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318356 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 00:46:35 +00:00
..
bugpoint
count
crosstool
docker Added optional validation of svn sources to Dockerfiles. 2017-09-15 13:35:54 +00:00
emacs
FileCheck Add a -D flag to FileCheck to define variables 2017-11-07 13:24:44 +00:00
fpcmp
gdb-scripts Make the Twine pretty-printer work with GDB 7.11 2017-06-04 03:27:12 +00:00
git
git-svn [git] Update the llvm git helper script to work correctly with the 2017-09-16 02:13:35 +00:00
jedit
kate
KillTheDoctor
lint
lit Revert "Update test_debuginfo.pl script to point to new tree location." 2017-11-13 23:33:29 +00:00
llvm-build
llvm-lit [lit] Actually do normalize the case of files in the config map. 2017-09-21 21:27:11 +00:00
LLVMVisualizers
Misc
not Convenience/safety fix for llvm::sys::Execute(And|No)Wait 2017-09-13 17:03:37 +00:00
PerfectShuffle
release merge-request.sh: Update to use new "Fixed by Commit(s)" field 2017-09-15 02:25:22 +00:00
sanitizers
TableGen [globalisel][tablegen] Generate rule coverage and use it to identify untested rules 2017-11-16 00:46:35 +00:00
Target/ARM
testgen
textmate
unittest Force #define GTEST_LANG_CXX11. 2017-10-27 21:12:28 +00:00
valgrind
vim Add strictfp attribute to prevent unwanted optimizations of libm calls 2017-08-14 21:15:13 +00:00
vscode
yaml-bench
abtest.py AsmPrinter: mark the beginning and the end of a function in verbose mode 2017-05-23 21:22:16 +00:00
bisect
bisect-skip-count
check-each-file
clang-parse-diagnostics-file
codegen-diff
countloc.sh
create_ladder_graph.py
DSAclean.py
DSAextract.py
extract_symbols.py
findmisopt
findoptdiff
findsym.pl
GenLibDeps.pl
GetRepositoryPath
GetSourceVersion
getsrcs.sh
lldbDataFormatters.py
llvm-compilers-check
llvm-gisel-cov.py [globalisel][tablegen] Generate rule coverage and use it to identify untested rules 2017-11-16 00:46:35 +00:00
llvm-native-gxx
llvm.grm
LLVMBuild.txt
llvmdo
llvmgrep
makellvm
prepare-code-coverage-artifact.py
schedcover.py
shuffle_fuzz.py
shuffle_select_fuzz_tester.py Adding a shufflevector and select LLVM IR instructions fuzz tool 2017-10-31 11:39:31 +00:00
sort_includes.py
test_debuginfo.pl Revert "Update test_debuginfo.pl script to point to new tree location." 2017-11-13 23:33:29 +00:00
update_llc_test_checks.py [utils] Fix RISC-V support in update_llc_test_checks.py 2017-11-09 20:01:25 +00:00
update_mir_test_checks.py update_mir_test_checks: Be careful about replacing entire vregs 2017-11-06 21:06:09 +00:00
update_test_checks.py [utils] remove ability to generate llc check lines from update_test_checks.py 2017-06-12 17:44:30 +00:00
UpdateCMakeLists.pl
wciia.py