aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gccld/GenerateCode.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-12 05:38:15 +0000
committerChris Lattner <sabre@nondot.org>2004-04-12 05:38:15 +0000
commitf9c455d3dff3cd9b8a8c94c1e64057b3142c333c (patch)
tree2f5f72cbf6c02049ee81ac495258cfdf9f1e4d15 /tools/gccld/GenerateCode.cpp
parent27829ec5ff18e5d055e3727360567f761b3269b1 (diff)
downloadexternal_llvm-f9c455d3dff3cd9b8a8c94c1e64057b3142c333c.zip
external_llvm-f9c455d3dff3cd9b8a8c94c1e64057b3142c333c.tar.gz
external_llvm-f9c455d3dff3cd9b8a8c94c1e64057b3142c333c.tar.bz2
Add a couple more IPO's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12863 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccld/GenerateCode.cpp')
-rw-r--r--tools/gccld/GenerateCode.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp
index c985b8d..a844ee7 100644
--- a/tools/gccld/GenerateCode.cpp
+++ b/tools/gccld/GenerateCode.cpp
@@ -105,6 +105,9 @@ int llvm::GenerateBytecode(Module *M, bool Strip, bool Internalize,
if (!DisableInline)
addPass(Passes, createFunctionInliningPass()); // Inline small functions
+ addPass(Passes, createPruneEHPass()); // Remove dead EH info
+ addPass(Passes, createGlobalDCEPass()); // Remove dead functions
+
// If we didn't decide to inline a function, check to see if we can
// transform it to pass arguments by value instead of by reference.
addPass(Passes, createArgumentPromotionPass());