Eliminate the use of dominance frontiers in PromoteMemToReg. In addition to
authorCameron Zwarich <zwarich@apple.com>
Mon, 17 Jan 2011 01:08:59 +0000 (01:08 +0000)
committerCameron Zwarich <zwarich@apple.com>
Mon, 17 Jan 2011 01:08:59 +0000 (01:08 +0000)
commitebed6de7b10d20721f5bd30ed3730cadefed7963
tree0f000eba9f826b76a7b83cdb2064a2d8009d9f94
parente7a820c208415094723adabd8336d3a036692ea4
Eliminate the use of dominance frontiers in PromoteMemToReg. In addition to
eliminating a potentially quadratic data structure, this also gives a 17%
speedup when running -scalarrepl on test-suite + SPEC2000 + SPEC2006. My initial
experiment gave a greater speedup around 25%, but I moved the dominator tree
level computation from dominator tree construction to PromoteMemToReg.

Since this approach to computing IDFs has a much lower overhead than the old
code using precomputed DFs, it is worth looking at using this new code for the
second scalarrepl pass as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123609 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/PromoteMemToReg.h
lib/Transforms/Scalar/ScalarReplAggregates.cpp
lib/Transforms/Utils/Mem2Reg.cpp
lib/Transforms/Utils/PromoteMemoryToRegister.cpp