1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/unittests/IR
Adam Nemet 63ebf9bb19 Handle non-unique edges in edge-dominance
This removes a quadratic behavior in assert-enabled builds.

GVN propagates the equivalence from a condition into the blocks guarded by the
condition.  E.g. for 'if (a == 7) { ... }', 'a' will be replaced in the block
with 7.  It does this by replacing all the uses of 'a' that are dominated by
the true edge.

For a switch with N cases and U uses of the value, this will mean N * U calls
to 'dominates'.  Asserting isSingleEdge in 'dominates' make this N^2 * U
because this function checks for the uniqueness of the edge. I.e. traverses
each edge between the SwitchInst's block and the cases.

The change removes the assert and makes 'dominates' works correctly in the
presence of non-unique edges.

This brings build time down by an order of magnitude for an input that has
~10k cases in a switch statement.

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

llvm-svn: 304721
2017-06-05 16:27:09 +00:00
..
AsmWriterTest.cpp Fix crash when printing instructions that have a metadata attached but no parent. 2016-01-07 20:14:30 +00:00
AttributesTest.cpp Fix assertion when merging multiple empty AttributeLists 2017-05-31 14:24:06 +00:00
BasicBlockTest.cpp Remove unnecessary double-assignment triggering -Wsequence-point. 2017-05-26 12:07:12 +00:00
CMakeLists.txt [IR] Add an iterator and range accessor for the PHI nodes of a basic 2017-05-26 03:10:00 +00:00
ConstantRangeTest.cpp [ConstantRange] Add another truncate unittest for wrapped set staying a wrapped set. 2017-06-04 23:07:53 +00:00
ConstantsTest.cpp [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
DebugInfoTest.cpp Formatting with clang-format patch r280700 2016-09-06 17:03:02 +00:00
DebugTypeODRUniquingTest.cpp Formatting with clang-format patch r280700 2016-09-06 17:03:02 +00:00
DominatorTreeTest.cpp Handle non-unique edges in edge-dominance 2017-06-05 16:27:09 +00:00
FunctionTest.cpp [GlobalObject] Fix setSection("") 2017-02-15 21:42:42 +00:00
InstructionsTest.cpp [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
IntrinsicsTest.cpp Handle more edge cases in intrinsic name binary search 2016-01-26 22:33:19 +00:00
IRBuilderTest.cpp Add support for DW_TAG_thrown_type. 2017-04-26 22:56:44 +00:00
LegacyPassManagerTest.cpp Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
MDBuilderTest.cpp IR: Split Metadata from Value 2014-12-09 18:38:53 +00:00
MetadataTest.cpp [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
ModuleTest.cpp Avoid unnecessary constexpr to appease MSVC 2013 2016-10-11 18:35:13 +00:00
PassManagerTest.cpp [PM] Introduce the facilities for registering cross-IR-unit dependencies 2016-12-27 08:40:39 +00:00
PatternMatch.cpp Add support to paternmatch for simple const Value cases. 2016-08-12 22:16:05 +00:00
TypeBuilderTest.cpp Suppress all uses of LLVM_END_WITH_NULL. NFC. 2017-05-09 19:31:13 +00:00
TypesTest.cpp Fix several accidental DOS line endings in source files 2016-01-03 17:22:03 +00:00
UserTest.cpp [IR] Adding const_value_op_iterator for IR/User.h 2017-01-09 14:00:57 +00:00
UseTest.cpp Format: Modernize using variadic templates. 2015-02-15 22:15:41 +00:00
ValueHandleTest.cpp Add a new WeakVH value handle; NFC 2017-05-01 17:07:54 +00:00
ValueMapTest.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
ValueTest.cpp Remove getArgumentList() in favor of arg_begin(), args(), etc 2017-03-16 22:59:15 +00:00
VerifierTest.cpp Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
WaymarkTest.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00