From: Chris Lattner Date: Thu, 26 Jun 2003 05:29:50 +0000 (+0000) Subject: Run the simplify CFG pass after instcombine which has the effect of deleting X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dc523538338a1474caa0bc477f00498f58b34d46;p=oota-llvm.git Run the simplify CFG pass after instcombine which has the effect of deleting ALL of the global ctor/dtor stuff if it is not used! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6916 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp index 283118d2940..5b56bd830d3 100644 --- a/tools/gccld/gccld.cpp +++ b/tools/gccld/gccld.cpp @@ -405,6 +405,10 @@ int main(int argc, char **argv) { // Passes.add(createInstructionCombiningPass()); + // Delete basic blocks, which optimization passes may have killed... + // + Passes.add(createCFGSimplificationPass()); + // Now that we have optimized the program, discard unreachable functions... // Passes.add(createGlobalDCEPass());