forked from OSchip/llvm-project
[MachineBlockPlacementStats] Add check for `-filter-print-funcs` option to machine-block-placement stats.
This commit is contained in:
parent
04a3d5f3a1
commit
46d45df451
llvm/lib/CodeGen
|
@ -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>();
|
||||
|
||||
|
|
Loading…
Reference in New Issue