summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/tool-template
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-04-28 09:34:03 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-04-28 09:34:03 +0000
commit1fcee98ddc748df45e1d1206f2e72f812d8ddcf6 (patch)
treea70b7186bdea2cb8752af15c2245a3694b6c255a /clang-tools-extra/tool-template
parent942d971c84e3089aab902756b6911bd82ccac300 (diff)
downloadbcm5719-llvm-1fcee98ddc748df45e1d1206f2e72f812d8ddcf6.tar.gz
bcm5719-llvm-1fcee98ddc748df45e1d1206f2e72f812d8ddcf6.zip
Fix very poor compile-time in PR19499 due to excessive tree walks in
domtree. When finding a nearest common dominator, if neither A dominates B nor B dominates A, we immediately resorted to a tree walk. The tree walk here is *particularly* expensive because we have to build a (potentially very large) set for one side's dominators and compare it with the other side's. If at any point we have DFS info, we don't need to do any of this. We can just walk up one side's immediate dominators and return the first one which dominates the other side. Because of the DFS info, the dominates queries are trivially constant time. This reduces the optimizers time in the test case on PR19499 by 70%. It now optimizes in about 30 seconds for me. And there is still more to be done for this case. llvm-svn: 207406
Diffstat (limited to 'clang-tools-extra/tool-template')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud