aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gccld
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-26 04:32:31 +0000
committerChris Lattner <sabre@nondot.org>2003-06-26 04:32:31 +0000
commit293a33a9114f1c75163bd68f1fdd0bf0bb0a9905 (patch)
tree53dae34c2fe4fdaf53dd6560b8a4242be2020f2f /tools/gccld
parent5d243c2fa51490110bd105c1f5b6cfde9a3b8cc0 (diff)
downloadexternal_llvm-293a33a9114f1c75163bd68f1fdd0bf0bb0a9905.zip
external_llvm-293a33a9114f1c75163bd68f1fdd0bf0bb0a9905.tar.gz
external_llvm-293a33a9114f1c75163bd68f1fdd0bf0bb0a9905.tar.bz2
Move the instcombine pass before globaldce, so that if globals are made dead by instcombine, that they can be deleted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6910 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccld')
-rw-r--r--tools/gccld/gccld.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp
index eadb5f4..283118d 100644
--- a/tools/gccld/gccld.cpp
+++ b/tools/gccld/gccld.cpp
@@ -400,15 +400,15 @@ int main(int argc, char **argv) {
//
Passes.add(createDeadArgEliminationPass());
- // Now that we have optimized the program, discard unreachable functions...
- //
- Passes.add(createGlobalDCEPass());
-
// The FuncResolve pass may leave cruft around if functions were prototyped
// differently than they were defined. Remove this cruft.
//
Passes.add(createInstructionCombiningPass());
+ // Now that we have optimized the program, discard unreachable functions...
+ //
+ Passes.add(createGlobalDCEPass());
+
// Add the pass that writes bytecode to the output file...
std::string RealBytecodeOutput = OutputFilename;
if (!LinkAsLibrary) RealBytecodeOutput += ".bc";