[PATCH] D128019: [MachineBlockPlacementStats] Added check for "-filter-print-funcs" option to the machine-block-placement-stats
Mingming Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 16 17:27:36 PDT 2022
mingmingl created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
mingmingl requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The code change is similar to https://reviews.llvm.org/D114310; basically allow users to filter stats for a specific function.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128019
Files:
llvm/lib/CodeGen/MachineBlockPlacement.cpp
Index: llvm/lib/CodeGen/MachineBlockPlacement.cpp
===================================================================
--- llvm/lib/CodeGen/MachineBlockPlacement.cpp
+++ 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 @@
if (std::next(F.begin()) == F.end())
return false;
+ if (!isFunctionInPrintList(F.getName()))
+ return false;
+
MBPI = &getAnalysis<MachineBranchProbabilityInfo>();
MBFI = &getAnalysis<MachineBlockFrequencyInfo>();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128019.437755.patch
Type: text/x-patch
Size: 729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220617/266fcb5d/attachment.bin>
More information about the llvm-commits
mailing list