diff options
author | Mingming Liu <mingmingl@google.com> | 2022-06-16 21:59:54 -0700 |
---|---|---|
committer | Mingming Liu <mingmingl@google.com> | 2022-06-16 21:59:54 -0700 |
commit | 1e67385d28a4462b3badb40373cd05d91f8ebce5 (patch) | |
tree | cbc72da034e4542599b1b56c40f1fc99cec53a56 /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | b7d09557f6efcf47a905a0e12edf63162dd5e85f (diff) | |
download | llvm-1e67385d28a4462b3badb40373cd05d91f8ebce5.zip llvm-1e67385d28a4462b3badb40373cd05d91f8ebce5.tar.gz llvm-1e67385d28a4462b3badb40373cd05d91f8ebce5.tar.bz2 |
[MachineBlockPlacementStats] Added check for "-filter-print-funcs"
option to the machine-block-placement-stats.
Differential Revision: https://reviews.llvm.org/D128019
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index 19de90a..4cc84f2 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -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>(); |