diff options
author | Devang Patel <dpatel@apple.com> | 2008-05-27 20:18:45 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-05-27 20:18:45 +0000 |
commit | 00481ed5db48ca7cdfc165fb94781017def18717 (patch) | |
tree | f0cad295f0ea9d5c837c838f26c2d6e77e781de7 /tools | |
parent | caa98d3ab9da6c23e380a4ed6583ee42b7896a7e (diff) | |
download | llvm-00481ed5db48ca7cdfc165fb94781017def18717.tar.gz llvm-00481ed5db48ca7cdfc165fb94781017def18717.tar.bz2 llvm-00481ed5db48ca7cdfc165fb94781017def18717.tar.xz |
Use IPSCCPPass instead of IPConstantPropagationPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lto2/LTOCodeGenerator.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/lto2/LTOCodeGenerator.cpp b/tools/lto2/LTOCodeGenerator.cpp index e829cfb6dc..ae97694a92 100644 --- a/tools/lto2/LTOCodeGenerator.cpp +++ b/tools/lto2/LTOCodeGenerator.cpp @@ -340,6 +340,11 @@ bool LTOCodeGenerator::generateAssemblyCode(std::ostream& out, std::string& errM // 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 @@ bool LTOCodeGenerator::generateAssemblyCode(std::ostream& out, std::string& errM // 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()); |