Split some code out to a helper function (FindReusablePredBB)
authorChris Lattner <sabre@nondot.org>
Sat, 13 Feb 2010 05:35:08 +0000 (05:35 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 13 Feb 2010 05:35:08 +0000 (05:35 +0000)
commit98d5c3141eddc84a8bcf7db57332967695585e42
treed62f4cb77ec83676ced166081a11e82dc401c1fb
parent6686c6bf68148190309451aa9a79d2efd38ce698
Split some code out to a helper function (FindReusablePredBB)
and add a doxygen comment.

Cache the phi entry to avoid doing tons of
PHINode::getBasicBlockIndex calls in the common case.

On my insane testcase from re2c, this speeds up CGP from
617.4s to 7.9s (78x).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96083 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/CodeGenPrepare.cpp