Instruction Combination can create a ton of trivially dead instructions. Remove
authorChris Lattner <sabre@nondot.org>
Mon, 6 May 2002 16:52:15 +0000 (16:52 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 6 May 2002 16:52:15 +0000 (16:52 +0000)
them with an DIE pass before more expensive optimizations are run.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2491 91177308-0d34-0410-b5e6-96231b3b80d8

tools/gccas/gccas.cpp

index a292a71afedb0e591340f56c380c58562839bd63..5d14e3c4a0005cb8aab305af96f977fc8fa2841e 100644 (file)
@@ -83,6 +83,7 @@ int main(int argc, char **argv) {
     Passes.add(createRaisePointerReferencesPass()); // Eliminate casts
     Passes.add(createPromoteMemoryToRegister());    // Promote alloca's to regs
     Passes.add(createInstructionCombiningPass());   // Combine silly seq's
     Passes.add(createRaisePointerReferencesPass()); // Eliminate casts
     Passes.add(createPromoteMemoryToRegister());    // Promote alloca's to regs
     Passes.add(createInstructionCombiningPass());   // Combine silly seq's
+    Passes.add(createDeadInstEliminationPass());    // Kill InstCombine remnants
     Passes.add(createSCCPPass());                   // Constant prop with SCCP
     Passes.add(createGCSEPass());                   // Remove common subexprs
     Passes.add(createDeadCodeEliminationPass());    // Remove Dead code/vars
     Passes.add(createSCCPPass());                   // Constant prop with SCCP
     Passes.add(createGCSEPass());                   // Remove common subexprs
     Passes.add(createDeadCodeEliminationPass());    // Remove Dead code/vars