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

pankaj gode via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 26 05:17:57 PST 2019


pgode marked an inline comment as done.
pgode added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2328
+      }
     }
 
----------------
jdoerfert wrote:
> Minor:
> You can asssume V has pointer type so you don't need to check it.
> To get the `CallSiteI` directly you can call `getCtxI()`.
> I think you should even pass `CallSiteI->getNextNode()` to `checkForAllUses` because we don't want to see the uses in the call site.
Thanks for the review comments.  I didn't understand the part:
>> I think you should even pass CallSiteI->getNextNode() to checkForAllUses because we don't want to see the uses in the call site.

I thought that, if we don't have any uses of instruction/value passed to CallSite, before the callsite instruction then we can propagate.  CallSiteI->getNextNode() gives me next node after the callsite instruction. Not sure about the reason why we should also have additional call to checkForAllUses.

Should we have something like below.
```
if (!A.checkForAllUses(UsePred, *this, V, getCtxI())  && !A.checkForAllUses(UsePred, *this, V, getCtxI()->getNextNode()) {
.. 
}
```



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

https://reviews.llvm.org/D71617





More information about the llvm-commits mailing list