Use IPSCCPPass instead of IPConstantPropagationPass.

llvm-svn: 51605
diff --git a/llvm/tools/lto2/LTOCodeGenerator.cpp b/llvm/tools/lto2/LTOCodeGenerator.cpp
index e829cfb..ae97694 100644
--- a/llvm/tools/lto2/LTOCodeGenerator.cpp
+++ b/llvm/tools/lto2/LTOCodeGenerator.cpp
@@ -340,6 +340,11 @@
     // Add an appropriate TargetData instance for this module...
     passes.add(new TargetData(*_target->getTargetData()));
     
+    // Propagate constants at call sites into the functions they call.  This
+    // opens opportunities for globalopt (and inlining) by substituting function
+    // pointers passed as arguments to direct uses of functions.  
+    passes.add(createIPSCCPPass());
+
     // Now that we internalized some globals, see if we can hack on them!
     passes.add(createGlobalOptimizerPass());
 
@@ -352,9 +357,6 @@
     // supporting.
     passes.add(createStripSymbolsPass());
     
-    // Propagate constants at call sites into the functions they call.
-    passes.add(createIPConstantPropagationPass());
-
     // Remove unused arguments from functions...
     passes.add(createDeadArgEliminationPass());