From 155cfd237bf52055894c7f191b7a0122715a6f87 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 11 Oct 2004 04:47:18 +0000 Subject: [PATCH] Don't miss global optimizations because we run before the inliner llvm-svn: 16913 --- llvm/tools/gccld/GenerateCode.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/tools/gccld/GenerateCode.cpp b/llvm/tools/gccld/GenerateCode.cpp index a803b43a0b25..1144b92a643c 100644 --- a/llvm/tools/gccld/GenerateCode.cpp +++ b/llvm/tools/gccld/GenerateCode.cpp @@ -184,6 +184,7 @@ int llvm::GenerateBytecode(Module *M, bool Strip, bool Internalize, addPass(Passes, createFunctionInliningPass()); // Inline small functions addPass(Passes, createPruneEHPass()); // Remove dead EH info + addPass(Passes, createGlobalOptimizerPass()); // Optimize globals again. addPass(Passes, createGlobalDCEPass()); // Remove dead functions // If we didn't decide to inline a function, check to see if we can