diff options
author | Chris Lattner <sabre@nondot.org> | 2003-06-26 05:29:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-06-26 05:29:50 +0000 |
commit | dc523538338a1474caa0bc477f00498f58b34d46 (patch) | |
tree | 16246469e1741392aa79a7001842e967fcd8cac8 | |
parent | 083de22d9fe81dac433d2a449fb8c0326920cf4f (diff) | |
download | external_llvm-dc523538338a1474caa0bc477f00498f58b34d46.zip external_llvm-dc523538338a1474caa0bc477f00498f58b34d46.tar.gz external_llvm-dc523538338a1474caa0bc477f00498f58b34d46.tar.bz2 |
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
-rw-r--r-- | tools/gccld/gccld.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp index 283118d..5b56bd8 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()); |