summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-10-19 10:12:41 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-10-19 10:12:41 +0000
commit343fad44ea20085ca1095d46a386f525b3f68fce (patch)
treecdb39bff2712bdb89fe59861146303d2ca1b1208 /llvm/lib/Analysis
parenta96c00bf4736add36d9cc8acd127b258c65e3c40 (diff)
downloadbcm5719-llvm-343fad44ea20085ca1095d46a386f525b3f68fce.tar.gz
bcm5719-llvm-343fad44ea20085ca1095d46a386f525b3f68fce.zip
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. llvm-svn: 142491
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/BlockFrequencyInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/BlockFrequencyInfo.cpp b/llvm/lib/Analysis/BlockFrequencyInfo.cpp
index ee899153e1d..d16665fa55c 100644
--- a/llvm/lib/Analysis/BlockFrequencyInfo.cpp
+++ b/llvm/lib/Analysis/BlockFrequencyInfo.cpp
@@ -49,6 +49,10 @@ bool BlockFrequencyInfo::runOnFunction(Function &F) {
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
OpenPOWER on IntegriCloud