From caa0d010d61b55f3ce4a1c63144af99de31e1d8d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 26 Jun 2003 05:29:50 +0000 Subject: [PATCH] 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! llvm-svn: 6916 --- tools/gccld/gccld.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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());