X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Fopt%2Fopt.cpp;h=19dcb2b782c63f81aac03678a70e2a5918180954;hb=629c1a3f78494d0dd769fe82bd2bd17df0555843;hp=fc71074fb86c5fced9ca641da7c43fe2a6b1f6cb;hpb=74b1e1424c0e4dd8f893d1cabd0854278bfcb25f;p=oota-llvm.git diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index fc71074fb86..19dcb2b782c 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // @@ -265,9 +265,10 @@ void AddStandardCompilePasses(PassManager &PM) { addPass(PM, createArgumentPromotionPass()); // Scalarize uninlined fn args addPass(PM, createTailDuplicationPass()); // Simplify cfg by copying code + addPass(PM, createSimplifyLibCallsPass()); // Library Call Optimizations addPass(PM, createInstructionCombiningPass()); // Cleanup for scalarrepl. + addPass(PM, createJumpThreadingPass()); // Thread jumps. addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs - // FIXME: Temporary! addPass(PM, createScalarReplAggregatesPass()); // Break up aggregate allocas addPass(PM, createInstructionCombiningPass()); // Combine silly seq's addPass(PM, createCondPropagationPass()); // Propagate conditionals @@ -278,12 +279,15 @@ void AddStandardCompilePasses(PassManager &PM) { addPass(PM, createLoopRotatePass()); addPass(PM, createLICMPass()); // Hoist loop invariants addPass(PM, createLoopUnswitchPass()); // Unswitch loops. - addPass(PM, createInstructionCombiningPass()); // Clean up after LICM/reassoc + addPass(PM, createLoopIndexSplitPass()); // Index split loops. + // FIXME : Removing instcombine causes nestedloop regression. + addPass(PM, createInstructionCombiningPass()); addPass(PM, createIndVarSimplifyPass()); // Canonicalize indvars + addPass(PM, createLoopDeletionPass()); // Delete dead loops addPass(PM, createLoopUnrollPass()); // Unroll small loops addPass(PM, createInstructionCombiningPass()); // Clean up after the unroller - addPass(PM, createLoadValueNumberingPass()); // GVN for load instructions - addPass(PM, createGCSEPass()); // Remove common subexprs + addPass(PM, createGVNPass()); // Remove redundancies + addPass(PM, createMemCpyOptPass()); // Remove memcpy / form memset addPass(PM, createSCCPPass()); // Constant prop with SCCP // Run instcombine after redundancy elimination to exploit opportunities @@ -292,9 +296,9 @@ void AddStandardCompilePasses(PassManager &PM) { addPass(PM, createCondPropagationPass()); // Propagate conditionals addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores - addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE' + addPass(PM, createAggressiveDCEPass()); // Delete dead instructions addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs - addPass(PM, createSimplifyLibCallsPass()); // Library Call Optimizations + addPass(PM, createStripDeadPrototypesPass()); // Get rid of dead prototypes addPass(PM, createDeadTypeEliminationPass()); // Eliminate dead types addPass(PM, createConstantMergePass()); // Merge dup global constants } @@ -309,7 +313,7 @@ int main(int argc, char **argv) { llvm_shutdown_obj X; // Call llvm_shutdown() on exit. try { cl::ParseCommandLineOptions(argc, argv, - " llvm .bc -> .bc modular optimizer and analysis printer \n"); + "llvm .bc -> .bc modular optimizer and analysis printer\n"); sys::PrintStackTraceOnErrorSignal(); // Allocate a full target machine description only if necessary.