1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/lib/IR
Jakub Kuderski 2a246b4a78 [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
..
AsmWriter.cpp Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
AttributeImpl.h [IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-06-19 22:05:08 +00:00
Attributes.cpp [Attributes] Fix crash when attempting to remove alignment from an attribute list/set 2018-01-17 19:15:21 +00:00
AttributesCompatFunc.td
AutoUpgrade.cpp Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
BasicBlock.cpp IR: Fix BasicBlock::phis for empty blocks 2017-12-29 19:25:53 +00:00
CMakeLists.txt GCOV: Move GCOV from IR & Support into ProfileData to fix layering 2017-11-03 20:57:10 +00:00
Comdat.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ConstantFold.cpp Silence a bunch of implicit fallthrough warnings 2017-12-19 22:05:25 +00:00
ConstantFold.h IR: Introduce inrange attribute on getelementptr indices. 2016-11-10 22:34:55 +00:00
ConstantRange.cpp [ConstantRange] Support for ashr in ConstantRange computation 2017-12-18 13:01:32 +00:00
Constants.cpp Remove redundant includes from lib/IR. 2017-12-13 21:30:52 +00:00
ConstantsContext.h [IR] Stop deleting other signatures of User::operator new when we override one signature in a class derived from User 2017-06-12 23:25:15 +00:00
Core.cpp [LLVM-C] Publicly expose getters of MetadataType, TokenType 2017-10-27 11:51:40 +00:00
DataLayout.cpp Support, IR, ADT: Check nullptr after allocation with malloc/realloc or calloc 2017-07-20 01:30:39 +00:00
DebugInfo.cpp Remove redundant includes from lib/IR. 2017-12-13 21:30:52 +00:00
DebugInfoMetadata.cpp Generalize llvm::replaceDbgDeclare and actually support the use-case that 2017-12-08 21:58:18 +00:00
DebugLoc.cpp Remove redundant includes from lib/IR. 2017-12-13 21:30:52 +00:00
DiagnosticHandler.cpp Allow ORE.emit to take a closure to delay building the remark object 2017-09-19 23:00:55 +00:00
DiagnosticInfo.cpp This change add's optimization remark in LoopVersioning LICM pass. 2018-01-23 09:47:28 +00:00
DiagnosticPrinter.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
DIBuilder.cpp Add optional DICompileUnit to DIBuilder + make outliner debug info use it 2018-01-19 21:21:49 +00:00
Dominators.cpp [Dominators] Introduce DomTree verification levels 2018-01-24 02:40:35 +00:00
Function.cpp Add a ProfileCount class to represent entry counts. 2018-01-17 22:24:23 +00:00
Globals.cpp Represent runtime preemption in the IR. 2017-10-26 15:00:26 +00:00
GVMaterializer.cpp
InlineAsm.cpp [inlineasm] Fix crash when number of matched input constraint operands overflows signed char 2017-10-25 12:51:32 +00:00
Instruction.cpp [IPSCCP] Remove calls without side effects 2018-01-09 21:58:46 +00:00
Instructions.cpp Fix invalid ptrtoint in InstCombine 2017-10-22 20:28:17 +00:00
IntrinsicInst.cpp Add ‘llvm.experimental.constrained.fma‘ Intrinsic. 2017-08-24 04:18:24 +00:00
IRBuilder.cpp Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
IRPrintingPasses.cpp [IR] Avoid dangling else warning. NFC. 2017-12-01 18:39:58 +00:00
LegacyPassManager.cpp IR printing improvement for function passes - introducing -print-module-scope 2017-12-01 17:42:46 +00:00
LLVMBuild.txt Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
LLVMContext.cpp Irreducible loop metadata for more accurate block frequency under PGO. 2017-11-02 22:26:51 +00:00
LLVMContextImpl.cpp This patch fixes https://bugs.llvm.org/show_bug.cgi?id=32352 2017-09-15 20:10:09 +00:00
LLVMContextImpl.h This patch fixes https://bugs.llvm.org/show_bug.cgi?id=32352 2017-09-15 20:10:09 +00:00
Mangler.cpp CodeGen: handle llvm.used properly for COFF 2018-01-20 00:28:02 +00:00
MDBuilder.cpp [Transforms] Support making mutable versions of new-format TBAA access tags 2018-01-17 13:29:54 +00:00
Metadata.cpp Move the stripping of invalid debug info from the Verifier to AutoUpgrade. 2017-10-02 18:31:29 +00:00
MetadataImpl.h
Module.cpp Normalize constructor call syntax, NFCI. 2017-07-18 08:36:22 +00:00
ModuleSummaryIndex.cpp [ThinLTO] Re-commit of dot dumper after test fix 2018-01-22 13:35:40 +00:00
Operator.cpp [IR] Remove some unneeded includes from Operator.h and fix cpp files that were transitively depending on it. NFC 2017-03-20 05:08:41 +00:00
OptBisect.cpp [IR] Missing changes for r312289 (NFC). 2017-08-31 22:06:09 +00:00
Pass.cpp Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. 2017-10-15 14:32:27 +00:00
PassManager.cpp [PM] Introduce an analysis set used to preserve all analyses over 2017-01-15 06:32:49 +00:00
PassRegistry.cpp [Pass] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-09-06 23:05:38 +00:00
ProfileSummary.cpp Reapply r271728 after adding move cobstructor for ProfileSummaryInfo 2016-06-03 22:54:26 +00:00
SafepointIRVerifier.cpp [SafepointIRVerifier] Allow non-dereferencing uses of unrelocated or poisoned PHI nodes 2017-12-25 09:35:10 +00:00
Statepoint.cpp [Statepoint] Add helper functions for GCRelocate and GCResult 2017-06-20 20:54:57 +00:00
SymbolTableListTraitsImpl.h ADT: Remove external uses of ilist_iterator, NFC 2016-09-03 01:22:56 +00:00
Type.cpp [IR] Add Type::isIntOrIntVectorTy(unsigned) similar to the existing isIntegerTy(unsigned), but also works for vectors. 2017-07-09 07:04:03 +00:00
TypeFinder.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
Use.cpp
User.cpp Remove redundant includes from lib/IR. 2017-12-13 21:30:52 +00:00
Value.cpp Limit size of non-GlobalValue name 2018-01-05 19:41:19 +00:00
ValueSymbolTable.cpp [NVPTX] Assign valid global names 2017-12-04 14:19:33 +00:00
ValueTypes.cpp Test commit access 2018-01-10 19:27:20 +00:00
Verifier.cpp Verifier: fix bug treating debug info issue as non-debug info issue 2018-01-23 16:11:15 +00:00