[PATCH] D86490: [CSSPGO] IR instrinsic for pseudo-probe block instrumentation
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 14:40:32 PDT 2020
wmi added inline comments.
Herald added a subscriber: danielkiss.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1986
+ if (CurI.mayHaveSideEffects() && !isa<StoreInst>(CurI) &&
+ !isa<PseudoProbeInst>(CurI))
return nullptr;
----------------
hoy wrote:
> hoy wrote:
> > wmi wrote:
> > > Can we check CallBase::onlyAccessesInaccessibleMemory instead of checking PseudoProbeInst here?
> > Good question. Checking against `PseudoProbeInst` is more than `onlyAccessesInaccessibleMemory`. The instruction identified here will be either converted to a `select` or deleted. I probably should move the `PseudoProbeInst` check into `BrBB->instructionsWithoutDebug()`.
> On the second thought, it might not be a good idea to fuse the check into `instructionsWithoutDebug` since API is used in quite some places. We sometimes like a `PseudoProbeInst` treated like a debug intrinsic but sometimes not. It is specific to the transform we'd like to not block.
I think it is a good idea to fuse the check into instructionsWithoutDebug. That will make psuedoProbe intrinsic behave more like debug intrinsic and block less transformations, like we discussed in D86193. What is the case you have concern about?
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