[PATCH] D31103: [AMDGPU] Add address space based alias analysis pass

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 14:46:20 PDT 2017


arsenm 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
----------------
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


Repository:
  rL LLVM

https://reviews.llvm.org/D31103





More information about the llvm-commits mailing list