OSDN Git Service

Replace the SSA update code in LCSSA with a bottom-up approach instead of a top
authorChris Lattner <sabre@nondot.org>
Wed, 2 Aug 2006 00:06:09 +0000 (00:06 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 2 Aug 2006 00:06:09 +0000 (00:06 +0000)
commitd41ae8bc0c4c3ebfd59197bccee72bb5b5c2cbfe
treea991f725ec27b70616cc42c025fe7c99e63de524
parentd3a680ae2cb1ca2d96d1272754af4702862dcb30
Replace the SSA update code in LCSSA with a bottom-up approach instead of a top
down approach, inspired by discussions with Tanya.

This approach is significantly faster, because it does not need dominator
frontiers and it does not insert extraneous unused PHI nodes.  For example, on
252.eon, in a release-asserts build, this speeds up LCSSA (which is the slowest
pass in gccas) from 9.14s to 0.74s on my G5.  This code is also slightly smaller
and significantly simpler than the old code.

Amusingly, in a normal Release build (which includes the
"assert(L->isLCSSAForm());" assertion), asserting that the result of LCSSA
is in LCSSA form is actually slower than the LCSSA transformation pass
itself on 252.eon.  I will see if Loop::isLCSSAForm can be sped up next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29463 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LCSSA.cpp