aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2017-01-13 22:40:01 +0000
committerDaniel Berlin <dberlin@dberlin.org>2017-01-13 22:40:01 +0000
commitc0431fd02d24b86e3b2a9d029cb44e93aaf77efe (patch)
tree41041542cce2af4d4788fa877163c44bce115795 /llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
parentc109bbea57c2df9edb983177ec1c998bd946d23a (diff)
downloadllvm-c0431fd02d24b86e3b2a9d029cb44e93aaf77efe.zip
llvm-c0431fd02d24b86e3b2a9d029cb44e93aaf77efe.tar.gz
llvm-c0431fd02d24b86e3b2a9d029cb44e93aaf77efe.tar.bz2
NewGVN: Move leaders around properly to ensure we have a canonical dominating leader. Fixes PR 31613.
Summary: This is a testcase where phi node cycling happens, and because we do not order the leaders by domination or anything similar, the leader keeps changing. Using std::set for the members is too expensive, and we actually don't need them sorted all the time, only at leader changes. We could keep both a set and a vector, and keep them mostly sorted and resort as necessary, or use a set and a fibheap, but all of this seems premature. After running some statistics, we are able to avoid the vast majority of sorting by keeping a "next leader" field. Most congruence classes only have leader changes once or twice during GVN. Reviewers: davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28594 llvm-svn: 291968
Diffstat (limited to 'llvm/lib/CodeGen/ResetMachineFunctionPass.cpp')
0 files changed, 0 insertions, 0 deletions