diff options
author | Xinliang David Li <davidxl@google.com> | 2016-06-28 04:07:03 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-06-28 04:07:03 +0000 |
commit | 8dd5ce97f91111c229e9c444145b5d005d39b3d6 (patch) | |
tree | 68eebd5416e7c96ff005ae09cb30819a49f32568 /llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp | |
parent | bd861acf29bb49c6530870de2e05d4828eb1a9a2 (diff) | |
download | bcm5719-llvm-8dd5ce97f91111c229e9c444145b5d005d39b3d6.tar.gz bcm5719-llvm-8dd5ce97f91111c229e9c444145b5d005d39b3d6.zip |
[BFI]: enhance BFI graph dump
MBFI supports profile count dumping and function
name based filtering. Add these two feature to
BFI as well. The filtering option is shared between
BFI and MBFI: -view-bfi-func-name=..
llvm-svn: 273992
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp index f02356b92c5..7e05ebe2848 100644 --- a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp +++ b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp @@ -46,8 +46,7 @@ static cl::opt<GVDAGType> ViewMachineBlockFreqPropagationDAG( clEnumValEnd)); -static cl::opt<std::string> ViewMachineBlockFreqFuncName("view-mbfi-func-name", - cl::Hidden); +extern cl::opt<std::string> ViewBlockFreqFuncName; namespace llvm { @@ -134,8 +133,8 @@ bool MachineBlockFrequencyInfo::runOnMachineFunction(MachineFunction &F) { MBFI->calculate(F, MBPI, MLI); #ifndef NDEBUG if (ViewMachineBlockFreqPropagationDAG != GVDT_None && - (ViewMachineBlockFreqFuncName.empty() || - F.getName().equals(ViewMachineBlockFreqFuncName))) { + (ViewBlockFreqFuncName.empty() || + F.getName().equals(ViewBlockFreqFuncName))) { view(); } #endif |