Use setStream infomatted_raw_ostream's constructor, to reduce code
[oota-llvm.git] / include / llvm / Support / StandardPasses.h
index 024c0194d4e0a0a6758475474e5a18f9f8bf9168..3d25c6cf98bbf644be0f156dafcd737fcb8809c4 100644 (file)
@@ -60,15 +60,10 @@ namespace llvm {
   ///
   /// Internalize - Run the internalize pass.
   /// RunInliner - Use a function inlining pass.
-  /// RunSecondGlobalOpt - Run the global optimizer pass twice.
   /// VerifyEach - Run the verifier after each pass.
-  //
-  // FIXME: RunSecondGlobalOpt should go away once we resolve which of LTO or
-  // llvm-ld is better.
   static inline void createStandardLTOPasses(PassManager *PM,
                                              bool Internalize,
                                              bool RunInliner,
-                                             bool RunSecondGlobalOpt,
                                              bool VerifyEach);
 
   // Implementations
@@ -134,7 +129,6 @@ namespace llvm {
       PM->add(createLoopRotatePass());            // Rotate Loop
       PM->add(createLICMPass());                  // Hoist loop invariants
       PM->add(createLoopUnswitchPass(OptimizeSize));
-      PM->add(createLoopIndexSplitPass());        // Split loop index
       PM->add(createInstructionCombiningPass());  
       PM->add(createIndVarSimplifyPass());        // Canonicalize indvars
       PM->add(createLoopDeletionPass());          // Delete dead loops
@@ -173,7 +167,6 @@ namespace llvm {
   static inline void createStandardLTOPasses(PassManager *PM,
                                              bool Internalize,
                                              bool RunInliner,
-                                             bool RunSecondGlobalOpt,
                                              bool VerifyEach) {
     // Now that composite has been compiled, scan through the module, looking
     // for a main function.  If main is defined, mark all other functions
@@ -207,8 +200,8 @@ namespace llvm {
       addOnePass(PM, createFunctionInliningPass(), VerifyEach);
 
     addOnePass(PM, createPruneEHPass(), VerifyEach);   // Remove dead EH info.
-    // Optimize globals again.
-    if (RunSecondGlobalOpt)
+    // Optimize globals again if we ran the inliner.
+    if (RunInliner)
       addOnePass(PM, createGlobalOptimizerPass(), VerifyEach);
     addOnePass(PM, createGlobalDCEPass(), VerifyEach); // Remove dead functions.