summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-12-11 03:03:54 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-12-11 03:03:54 +0000
commit96690a81d439e4b101dca6e53e1ea5b283437c17 (patch)
treeea83ba46caffc1791c081e71aa466ec301f91e9f /tools
parent0417feba293f58e90a7f959a4f85120dfcbda8d7 (diff)
downloadllvm-96690a81d439e4b101dca6e53e1ea5b283437c17.tar.gz
llvm-96690a81d439e4b101dca6e53e1ea5b283437c17.tar.bz2
llvm-96690a81d439e4b101dca6e53e1ea5b283437c17.tar.xz
Revert the last patch. We really do need SimplyCFG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-ld/Optimize.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/llvm-ld/Optimize.cpp b/tools/llvm-ld/Optimize.cpp
index c676809f77..5dc9424be9 100644
--- a/tools/llvm-ld/Optimize.cpp
+++ b/tools/llvm-ld/Optimize.cpp
@@ -163,6 +163,9 @@ void Optimize(Module* M) {
// Cleanup and simplify the code after the scalar optimizations.
addPass(Passes, createInstructionCombiningPass());
+ // Delete basic blocks, which optimization passes may have killed...
+ addPass(Passes, createCFGSimplificationPass());
+
// Now that we have optimized the program, discard unreachable functions...
addPass(Passes, createGlobalDCEPass());
}