[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 15:41:59 PDT 2017
arsenm accepted this revision.
arsenm added a comment.
LGTM
================
Comment at: lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:44
+ /* Global */ {NoAlias , MayAlias, NoAlias , NoAlias , MayAlias},
+ /* Constant */ {NoAlias , NoAlias , MayAlias, NoAlias , NoAlias },
+ /* Group */ {NoAlias , NoAlias , NoAlias , MayAlias, MayAlias},
----------------
rampitec wrote:
> arsenm wrote:
> > flat and constant may alias, this isn't the OpenCL rules
> I think in the future as an extension module metadata can be checked to see if source was OpenCL and return NoAlias for flat and constant.
I think we really just need to mark constant accesses with invariant. Anything checking the raw language is broken
================
Comment at: lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:77
+ const Value *Base = GetUnderlyingObject(Loc.Ptr, DL);
+ assert(Base->getType()->isPointerTy());
+
----------------
This is redundant with the assert getPointerAddressSpace will do
Repository:
rL LLVM
https://reviews.llvm.org/D31103
More information about the llvm-commits
mailing list