diff options
author | Chris Lattner <sabre@nondot.org> | 2003-11-09 19:55:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-11-09 19:55:09 +0000 |
commit | cc650b615d548eb213b8ef44101258c518cb3326 (patch) | |
tree | 5b8eddb56db503438eba8b3be1d09b187acb2cb1 /tools/gccld/GenerateCode.cpp | |
parent | ccc4b1a2d38674f2bd6c2263ac9503436bed5f49 (diff) |
Give gccld more guts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccld/GenerateCode.cpp')
-rw-r--r-- | tools/gccld/GenerateCode.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp index 26b115f262..bf32400c63 100644 --- a/tools/gccld/GenerateCode.cpp +++ b/tools/gccld/GenerateCode.cpp @@ -16,6 +16,7 @@ #include "gccld.h" #include "llvm/Module.h" #include "llvm/PassManager.h" +#include "llvm/Analysis/LoadValueNumbering.h" #include "llvm/Bytecode/WriteBytecodePass.h" #include "llvm/Target/TargetData.h" #include "llvm/Transforms/IPO.h" @@ -84,6 +85,13 @@ GenerateBytecode (Module *M, bool Strip, bool Internalize, std::ostream *Out) { if (!DisableInline) Passes.add(createFunctionInliningPass()); // Inline small functions + // Run a few AA driven optimizations here and now, to cleanup the code. + // Eventually we should put an IP AA in place here. + + Passes.add(createLICMPass()); // Hoist loop invariants + Passes.add(createLoadValueNumberingPass()); // GVN for load instructions + Passes.add(createGCSEPass()); // Remove common subexprs + // The FuncResolve pass may leave cruft around if functions were prototyped // differently than they were defined. Remove this cruft. Passes.add(createInstructionCombiningPass()); |