[llvm-branch-commits] [llvm-branch] r142546 - in /llvm/branches/release_30: ./ include/llvm/Analysis/BlockFrequencyInfo.h lib/Analysis/BlockFrequencyInfo.cpp test/Analysis/BlockFrequencyInfo/ test/Analysis/BlockFrequencyInfo/basic.ll test/Analysis/BlockFrequencyInfo/dg.exp

Bill Wendling isanbard at gmail.com
Wed Oct 19 15:12:25 PDT 2011


Author: void
Date: Wed Oct 19 17:12:25 2011
New Revision: 142546

URL: http://llvm.org/viewvc/llvm-project?rev=142546&view=rev
Log:
Merging r142491:
------------------------------------------------------------------------
r142491 | chandlerc | 2011-10-19 03:12:41 -0700 (Wed, 19 Oct 2011) | 9 lines

Add pass printing support to BlockFrequencyInfo pass. The implementation
layer already had support for printing the results of this analysis, but
the wiring was missing.

Now that printing the analysis works, actually bring some of this
analysis, and the BranchProbabilityInfo analysis that it wraps, under
test! I'm planning on fixing some bugs and doing other work here, so
having a nice place to add regression tests and a way to observe the
results is really useful.
------------------------------------------------------------------------

Added:
    llvm/branches/release_30/test/Analysis/BlockFrequencyInfo/
      - copied from r142491, llvm/trunk/test/Analysis/BlockFrequencyInfo/
    llvm/branches/release_30/test/Analysis/BlockFrequencyInfo/basic.ll
      - copied unchanged from r142491, llvm/trunk/test/Analysis/BlockFrequencyInfo/basic.ll
    llvm/branches/release_30/test/Analysis/BlockFrequencyInfo/dg.exp
      - copied unchanged from r142491, llvm/trunk/test/Analysis/BlockFrequencyInfo/dg.exp
Modified:
    llvm/branches/release_30/   (props changed)
    llvm/branches/release_30/include/llvm/Analysis/BlockFrequencyInfo.h
    llvm/branches/release_30/lib/Analysis/BlockFrequencyInfo.cpp

Propchange: llvm/branches/release_30/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 19 17:12:25 2011
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:142039,142055,142058,142112,142123,142125,142165,142168,142243,142482,142486,142489,142537
+/llvm/trunk:142039,142055,142058,142112,142123,142125,142165,142168,142243,142482,142486,142489,142491,142537

Modified: llvm/branches/release_30/include/llvm/Analysis/BlockFrequencyInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_30/include/llvm/Analysis/BlockFrequencyInfo.h?rev=142546&r1=142545&r2=142546&view=diff
==============================================================================
--- llvm/branches/release_30/include/llvm/Analysis/BlockFrequencyInfo.h (original)
+++ llvm/branches/release_30/include/llvm/Analysis/BlockFrequencyInfo.h Wed Oct 19 17:12:25 2011
@@ -40,6 +40,7 @@
   void getAnalysisUsage(AnalysisUsage &AU) const;
 
   bool runOnFunction(Function &F);
+  void print(raw_ostream &O, const Module *M) const;
 
   /// getblockFreq - Return block frequency. Return 0 if we don't have the
   /// information. Please note that initial frequency is equal to 1024. It means

Modified: llvm/branches/release_30/lib/Analysis/BlockFrequencyInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_30/lib/Analysis/BlockFrequencyInfo.cpp?rev=142546&r1=142545&r2=142546&view=diff
==============================================================================
--- llvm/branches/release_30/lib/Analysis/BlockFrequencyInfo.cpp (original)
+++ llvm/branches/release_30/lib/Analysis/BlockFrequencyInfo.cpp Wed Oct 19 17:12:25 2011
@@ -49,6 +49,10 @@
   return false;
 }
 
+void BlockFrequencyInfo::print(raw_ostream &O, const Module *) const {
+  if (BFI) BFI->print(O);
+}
+
 /// getblockFreq - Return block frequency. Return 0 if we don't have the
 /// information. Please note that initial frequency is equal to 1024. It means
 /// that we should not rely on the value itself, but only on the comparison to





More information about the llvm-branch-commits mailing list