The attached patch provides a new alias analysis: Address Space Alias Analysis.  This pass is off-by-default and has no impact on generated code unless -asaa is provided to opt.<div><br></div><div>This analysis signals NoAlias for pointers in different address spaces.  The primary target for this pass is GPU back-ends which use LLVM address spaces as a means for differentiating memory types (on-chip shared, off-chip global, etc.) and hence pointers in different address spaces cannot alias.  For OpenCL code compiled with the PTX back-end, this improves performance by over 2x in some of my test kernels due to LLVM using this alias information to remove redundant loads.</div>
<div><br></div><div>Is this okay to commit?<br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>
</div>