aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2017-06-05 16:27:09 +0000
committerAdam Nemet <anemet@apple.com>2017-06-05 16:27:09 +0000
commit4ef096b0c235b7dade47d6b43951697098b30e9d (patch)
tree75c414cce2fb563002745ee2b460e2b8ddd84cd2 /llvm/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp
parentad12580012765c2c6580000688b5166de3b1587d (diff)
downloadllvm-4ef096b0c235b7dade47d6b43951697098b30e9d.zip
llvm-4ef096b0c235b7dade47d6b43951697098b30e9d.tar.gz
llvm-4ef096b0c235b7dade47d6b43951697098b30e9d.tar.bz2
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
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp')
0 files changed, 0 insertions, 0 deletions