summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gccld/gccld.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-26 05:29:50 +0000
committerChris Lattner <sabre@nondot.org>2003-06-26 05:29:50 +0000
commitc8a619313aab43bc99a648339d6a5af70af05990 (patch)
tree1899a1acc62731c216c86a94c8a48911e55a6a12 /llvm/tools/gccld/gccld.cpp
parentb254fe29d2ee3954d405cc8b4a3191cb44202e0b (diff)
downloadbcm5719-llvm-c8a619313aab43bc99a648339d6a5af70af05990.tar.gz
bcm5719-llvm-c8a619313aab43bc99a648339d6a5af70af05990.zip
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
Diffstat (limited to 'llvm/tools/gccld/gccld.cpp')
-rw-r--r--llvm/tools/gccld/gccld.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/gccld/gccld.cpp b/llvm/tools/gccld/gccld.cpp
index 283118d2940..5b56bd830d3 100644
--- a/llvm/tools/gccld/gccld.cpp
+++ b/llvm/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());
OpenPOWER on IntegriCloud