From eb60fb9c1f9abf9b5b6d714db2da440746bd3769 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Mon, 21 Apr 2008 07:51:07 +0000 Subject: [PATCH] Use GVN in LTO instead of GCSE+LoadVN. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50036 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/lto/lto.cpp | 3 +-- tools/lto2/LTOCodeGenerator.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp index ff9ba91d4ea..7e0823edf1b 100644 --- a/tools/lto/lto.cpp +++ b/tools/lto/lto.cpp @@ -330,8 +330,7 @@ LTO::optimize(Module *M, std::ostream &Out, Passes.add(createGlobalsModRefPass()); // IP alias analysis Passes.add(createLICMPass()); // Hoist loop invariants - Passes.add(createLoadValueNumberingPass()); // GVN for load instrs - Passes.add(createGCSEPass()); // Remove common subexprs + Passes.add(createGVNPass()); // Remove common subexprs Passes.add(createDeadStoreEliminationPass()); // Nuke dead stores // Cleanup and simplify the code after the scalar optimizations. diff --git a/tools/lto2/LTOCodeGenerator.cpp b/tools/lto2/LTOCodeGenerator.cpp index b7962be50be..db27145bbf9 100644 --- a/tools/lto2/LTOCodeGenerator.cpp +++ b/tools/lto2/LTOCodeGenerator.cpp @@ -377,8 +377,7 @@ bool LTOCodeGenerator::generateAssemblyCode(std::ostream& out, std::string& errM passes.add(createGlobalsModRefPass()); // IP alias analysis passes.add(createLICMPass()); // Hoist loop invariants - passes.add(createLoadValueNumberingPass()); // GVN for load instrs - passes.add(createGCSEPass()); // Remove common subexprs + passes.add(createGVNPass()); // Remove common subexprs passes.add(createDeadStoreEliminationPass()); // Nuke dead stores // Cleanup and simplify the code after the scalar optimizations.