Add a fastpath to Load GVN to special case when we have exactly one dominating
authorChris Lattner <sabre@nondot.org>
Mon, 21 Dec 2009 23:15:48 +0000 (23:15 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 21 Dec 2009 23:15:48 +0000 (23:15 +0000)
commitd2191e549b42eed97366b34e3b7a567b6a1208c2
tree18940f1a97384b3699501d1748567b743e3f3954
parente1a9042041b97d223a65179fb26eb03a4fbe723b
Add a fastpath to Load GVN to special case when we have exactly one dominating
load to avoid even messing around with SSAUpdate at all.  In this case (which
is very common, we can just use the input value directly).

This speeds up GVN time on gcc.c-torture/20001226-1.c from 36.4s to 16.3s,
which still isn't great, but substantially better and this is a simple speedup
that applies to lots of different cases.

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