1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
llvm-mirror/unittests
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
..
ADT ADT: handle special case of ARM environment for SUSE 2017-06-03 22:31:06 +00:00
Analysis [OrderedBasicBlock] Return false for comesBefore(A, A) 2017-06-02 13:10:31 +00:00
AsmParser Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
Bitcode Reapply "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr"" 2017-01-04 22:36:33 +00:00
CodeGen [SVE] Fix mismatched sign comparison warning in unit test from r300842. 2017-04-20 16:54:49 +00:00
DebugInfo [PDB] Fix use after free. 2017-06-03 00:33:35 +00:00
ExecutionEngine [ExecutionEngine] Make RuntimeDyld::MemoryManager responsible for tracking EH 2017-05-09 21:32:18 +00:00
IR Handle non-unique edges in edge-dominance 2017-06-05 16:27:09 +00:00
LineEditor Remove autoconf support 2016-01-26 21:29:08 +00:00
Linker Implement intrinsic mangling for literal struct types. 2017-02-15 23:16:20 +00:00
MC Fix static initialization order fiasco in MCTests 2016-11-11 22:18:42 +00:00
MI Fix subreg value numbers in handleMoveUp 2017-03-11 00:14:52 +00:00
Object Fix unittest for buildbot with mips host (32bit big endian) from r295174 2017-02-15 16:03:22 +00:00
ObjectYAML Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
Option Fix some ArgList uses after API change in r300135. 2017-04-12 23:43:58 +00:00
ProfileData Fixed warning: must specify at least one argument for '...' parameter. 2017-06-04 05:30:26 +00:00
Support Close DynamicLibraries in reverse order they were opened. 2017-06-05 16:26:58 +00:00
Target [globalisel][tablegen] Demote OptForSize/OptForMinSize/ForCodeSize to per-function predicates. 2017-05-19 11:08:33 +00:00
Transforms Reapply "[Cloning] Take another pass at properly cloning debug info" 2017-06-01 23:02:12 +00:00
XRay [XRay][graph] Disambiguate name of type from member name 2017-02-10 06:59:25 +00:00
CMakeLists.txt [XRay] A graph Class for the llvm-xray graph 2017-02-10 06:36:08 +00:00