From 8dd5ce97f91111c229e9c444145b5d005d39b3d6 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Tue, 28 Jun 2016 04:07:03 +0000 Subject: [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 --- llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp') 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 ViewMachineBlockFreqPropagationDAG( clEnumValEnd)); -static cl::opt ViewMachineBlockFreqFuncName("view-mbfi-func-name", - cl::Hidden); +extern cl::opt 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 -- cgit v1.2.3