Just because we cannot completely eliminate all uses of a global, we can
authorChris Lattner <sabre@nondot.org>
Sun, 10 Oct 2004 23:14:11 +0000 (23:14 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 10 Oct 2004 23:14:11 +0000 (23:14 +0000)
commit708148e41f8f7c1e24c73cfd943645b13a1e05f9
tree012140dd3fd838705aae76dcef44fb2e164ff7b5
parente3f27e66e5738488f4a6ff260daeca26facb4d26
Just because we cannot completely eliminate all uses of a global, we can
still optimize away all of the indirect calls and loads, etc from it.
This turns code like this:

  if (G != 0)
    G();

into
   if (G != 0)
     ActualCallee();

This triggers a couple of times in gcc and libstdc++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16901 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp