Go to file
Jakub Kuderski ffb4fb7f6f [Dominators] Introduce DomTree verification levels
Summary:
Currently, there are 2 ways to verify a DomTree:
* `DT.verify()` -- runs full tree verification and checks all the properties and gives a reason why the tree is incorrect. This is run by when EXPENSIVE_CHECKS are enabled or when `-verify-dom-info` flag is set.
* `DT.verifyDominatorTree()` -- constructs a fresh tree and compares it against the old one. This does not check any other tree properties (DFS number, levels), nor ensures that the construction algorithm is correct. Used by some passes inside assertions.

This patch introduces DomTree verification levels, that try to close the gape between the two ways of checking trees by introducing 3 verification levels:
- Full -- checks all properties, but can be slow (O(N^3)). Used when manually requested (e.g. `assert(DT.verify())`) or when  `-verify-dom-info` is set.
- Basic -- checks all properties except the sibling property, and compares the current tree with a freshly constructed one instead. This should catch almost all errors, but does not guarantee that the construction algorithm is correct. Used when EXPENSIVE checks are enabled.
- Fast -- checks only basic properties (reachablility, dfs numbers, levels, roots), and compares with a fresh tree. This is meant to replace the legacy `DT.verifyDominatorTree()` and in my tests doesn't cause any noticeable performance impact even in the most pessimistic examples.

When used to verify dom tree wrapper pass analysis on sqlite3, the 3 new levels make `opt -O3` take the following amount of time on my machine:
- no verification: 8.3s
- `DT.verify(VerificationLevel::Fast)`: 10.1s
- `DT.verify(VerificationLevel::Basic)`: 44.8s
- `DT.verify(VerificationLevel::Full)`: 1m 46.2s
(and the previous `DT.verifyDominatorTree()` is within the noise of the Fast level)

This patch makes `DT.verifyDominatorTree()` pick between the 3 verification levels depending on EXPENSIVE_CHECKS and `-verify-dom-info`.

Reviewers: dberlin, brzycki, davide, grosser, dmgreen

Reviewed By: dberlin, brzycki

Subscribers: MatzeB, llvm-commits

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

llvm-svn: 323298
2018-01-24 02:40:35 +00:00
clang Attempt to fix implicit-fallthrough warning after r323218. 2018-01-24 01:47:22 +00:00
clang-tools-extra [clang-tidy] Handle bitfields in cppcoreguidelines-pro-type-member-init if using C++2a 2018-01-23 17:13:57 +00:00
compiler-rt Break a line into <= 80 characters 2018-01-23 23:14:32 +00:00
debuginfo-tests [debuginfo-tests] Support moving debuginfo-tests to llvm/projects 2017-12-12 16:54:20 +00:00
libclc tanpi: Port from amd_builtins 2018-01-19 18:57:22 +00:00
libcxx Implement P0463R1: 'Endian just Endian'. Reviewed as https://reviews.llvm.org/D35472 2018-01-24 01:53:24 +00:00
libcxxabi [cmake] [libcxxabi] Fix find_path() problems when cross compiling 2018-01-22 19:41:05 +00:00
libunwind [cmake] [libunwind] Fix find_path() problems when cross compiling 2018-01-22 19:15:06 +00:00
lld Fix retpoline PLT header size for i386. 2018-01-24 00:26:57 +00:00
lldb [SymbolFilePDB] Fix null array access when parsing the type of a function without any arguments, i.e. 'int main()' and add support to test it 2018-01-23 20:35:19 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [Dominators] Introduce DomTree verification levels 2018-01-24 02:40:35 +00:00
openmp Fix name of 'macOS' and add asteriks to brands, NFC. 2018-01-23 07:54:10 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [ScopBuilder] Prefer PHI Write accesses in the statement the incoming value is defined. 2018-01-23 23:56:36 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.