[PATCH] D71617: [WIP][NFC][Attributor] noalias attribute deduction fixme

pankaj gode via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 07:05:54 PST 2020


pgode updated this revision to Diff 237305.
pgode added a comment.

Thanks for reviewing further.

- Removed the Dependence flag.
- For the conditions to return 'true', in Pred: I observe that the correct condition should be below. This condition means that callsite_argument should not have nocapture and getCtxI() should be reachable from user. I think this, because for noalias propagation to happen w.r.t. (ii) condition, we should get true from checkForAllUses and Pred as well.

  // Doesn't have nocapture but reachable.
  if (!NoCaptureAA.isAssumedNoCapture() &&
      ReachabilityAA.isAssumedReachable(UserI, getCtxI()))
    return true;

- For the pthreads.ll test case, are we conservatively assuming that when we propagate 1st noalias attribute then there is potential of it getting

captured and thus we should not have noalias attribute propagation for other 3 cases ?

  As per current conditions, as all users are reachable and the  [THREAD] parameter doesn't have nocapture, so noalias propagation will happen and the Pred handles 1 use at a time so not sure (and even with Dependence flag set to true), we can get only 1st user parameter to have noalias.  I apologize as I might be missing something basic.  


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71617/new/

https://reviews.llvm.org/D71617

Files:
  llvm/lib/Transforms/IPO/Attributor.cpp
  llvm/test/Transforms/Attributor/IPConstantProp/pthreads.ll
  llvm/test/Transforms/Attributor/callbacks.ll
  llvm/test/Transforms/Attributor/noalias.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71617.237305.patch
Type: text/x-patch
Size: 7446 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200110/38086898/attachment.bin>


More information about the llvm-commits mailing list