[MachineBlockPlacementStats] Add check for `-filter-print-funcs` option to machine-block-placement stats.

This commit is contained in:
Mingming Liu 2022-06-16 17:26:02 -07:00
parent 04a3d5f3a1
commit 46d45df451
1 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,7 @@
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/PrintPasses.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/Allocator.h"
@ -3659,6 +3660,9 @@ bool MachineBlockPlacementStats::runOnMachineFunction(MachineFunction &F) {
if (std::next(F.begin()) == F.end())
return false;
if (!isFunctionInPrintList(F.getName()))
return false;
MBPI = &getAnalysis<MachineBranchProbabilityInfo>();
MBFI = &getAnalysis<MachineBlockFrequencyInfo>();