summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-02-19 05:16:52 +0000
committerFangrui Song <maskray@google.com>2019-02-19 05:16:52 +0000
commitb7fbfa68779a3f96c6cc933aba3cafb91f3a37ef (patch)
tree632767bc28430f39f58abb11da2d4597e90a7cba /lldb/packages/Python/lldbsuite/test
parentc81e0c67ba554fbb8d446e025a7039c0ef11dd92 (diff)
downloadbcm5719-llvm-b7fbfa68779a3f96c6cc933aba3cafb91f3a37ef.tar.gz
bcm5719-llvm-b7fbfa68779a3f96c6cc933aba3cafb91f3a37ef.zip
[Dominators] Fix and optimize edge insertion of depth-based search
Summary: After (x,y) is inserted, depth-based search finds all affected v that satisfies: depth(nca(x,y))+1 < depth(v) && there exists a path P from y to v where every w on P satisfies depth(v) <= depth(w) This reduces to a widest path problem (maximizing the depth of the minimum vertex in the path) which can be solved by a modified version of Dijkstra with a bucket queue (named depth-based search in the paper). The algorithm visits vertices in decreasing order of bucket number. However, the current code misused priority_queue to extract them in increasing order. I cannot think of a failing scenario but it surely may process vertices more than once due to the local usage of Processed. This patch fixes this bug and simplifies/optimizes the code a bit. Also add more comments. Reviewers: kuhar Reviewed By: kuhar Subscribers: kristina, jdoerfert, llvm-commits, NutshellySima, brzycki Tags: #llvm Differential Revision: https://reviews.llvm.org/D58349 llvm-svn: 354306
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud