[PATCH] D31103: [AMDGPU] Add address space based alias analysis pass
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 17 14:52:41 PDT 2017
rampitec added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:83-101
+ if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(Base)) {
+ if (GV->isConstant())
+ return true;
+ } else if (const Argument *Arg = dyn_cast<Argument>(Base)) {
+ const Function *F = Arg->getParent();
+ unsigned ArgNo = Arg->getArgNo();
+ /* On an argument, ReadOnly attribute indicates that the function does
----------------
arsenm wrote:
> rampitec wrote:
> > arsenm wrote:
> > > I think BasicAA will handle all of this, we should only need to handle the address spaces
> > It was not handled really, that's why it got here...
> I think this is only correct to do if F is a kernel
You probably right, that is safer. I will change it. BTW, I have checked this method in BasicAA, it does not check argument attributes.
Repository:
rL LLVM
https://reviews.llvm.org/D31103
More information about the llvm-commits
mailing list