[PATCH] D39973: Fix CaptureTracking for llvm.invariant.group.barrier
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 13 13:58:27 PST 2017
rampitec added inline comments.
================
Comment at: lib/Analysis/CaptureTracking.cpp:247
+ // Intrinsic function invariant_group_barrier does not capture pointer.
+ if (isa<IntrinsicInst>(I) && cast<IntrinsicInst>(I)->getIntrinsicID() ==
+ Intrinsic::invariant_group_barrier) {
----------------
rampitec wrote:
> yaxunl wrote:
> > rampitec wrote:
> > > Can we mark it as "NoCapture<0>" instead?
> > line 243 also checks I->getType()->isVoidTy(), but this intrinsic returns a pointer. So even if we make it NoCapture, it still does not work.
> Checking for a specific intrinsic seems error-prone. What if the pointer returned by the call is further used in the caller?
Maybe it is possible to add a check for VoidTy with the condition, that value is unused if returned from non-void?
https://reviews.llvm.org/D39973
More information about the llvm-commits
mailing list