blockfreq: Separate unwrapLoops() from finalizeMetrics()
[oota-llvm.git] / include / llvm / Analysis / BlockFrequencyInfoImpl.h
index e6f08bb04e410fd82561ebf96106e45344193657..81456636308ab783ad46f96585c7f3c0cb5a2126 100644 (file)
@@ -1141,10 +1141,13 @@ public:
   /// \brief Package up a loop.
   void packageLoop(LoopData &Loop);
 
+  /// \brief Unwrap loops.
+  void unwrapLoops();
+
   /// \brief Finalize frequency metrics.
   ///
-  /// Unwraps loop packages, calculates final frequencies, and cleans up
-  /// no-longer-needed data structures.
+  /// Calculates final frequencies and cleans up no-longer-needed data
+  /// structures.
   void finalizeMetrics();
 
   /// \brief Clear all memory.
@@ -1434,6 +1437,7 @@ void BlockFrequencyInfoImpl<BT>::doFunction(const FunctionT *F,
   // the full function.
   computeMassInLoops();
   computeMassInFunction();
+  unwrapLoops();
   finalizeMetrics();
 }