[PATCH] D86490: [CSSPGO] IR instrinsic for pseudo-probe block instrumentation
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 28 20:19:48 PDT 2020
davidxl added inline comments.
================
Comment at: llvm/include/llvm/IR/BasicBlock.h:185
+ /// PHINode, a debug intrinsic, or a pseudo probe intrinsic.
+ const Instruction *getFirstNonPHIOrDbgOrPseudoProbe() const;
+ Instruction *getFirstNonPHIOrDbgOrPseudoProbe() {
----------------
I have concerns on the proliferation of interfaces. How about extending exiting two interfaces (NonDebug, NonDebugOrLifemaker) with an optional argument 'bool SkipPseudoOp = true'?
================
Comment at: llvm/lib/IR/BasicBlock.cpp:102
std::function<bool(const Instruction &)> Fn = [](const Instruction &I) {
- return !isa<DbgInfoIntrinsic>(I);
+ return !isa<DbgInfoIntrinsic>(I) && !isa<PseudoProbeInst>(I);
};
----------------
There are still quite a few such predicates (debug || pseudoop), or !(debug||pseudoop) in the patch. Perhaps commonize them.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86490/new/
https://reviews.llvm.org/D86490
More information about the llvm-commits
mailing list