[NVPTX] Implement NVPTX AliasAnalysis
authorAndrew Savonichev <andrew.savonichev@gmail.com>
Wed, 1 Feb 2023 13:16:43 +0000 (16:16 +0300)
committerAndrew Savonichev <andrew.savonichev@gmail.com>
Wed, 1 Feb 2023 13:16:43 +0000 (16:16 +0300)
commitca50be8c896b19847c2ff99c8ee1c4653a422cb7
treefa3ffb3fd1f08469095256310ca761b85dc23739
parentf783c9bbbe576ad580aaaf6841ce8f3646cd0824
[NVPTX] Implement NVPTX AliasAnalysis

NVPTXAliasAnalysis extends the default AA to take pointer address
spaces into account. The analysis assumes that pointers in different
address spaces do not alias, unless one of them is generic (flat)
address space.

The patch also implements pointsToConstantMemory (via
getModRefInfoMask) to expose semantic of the constant address space to
the optimizer as discussed in D112466.

Differential Revision: https://reviews.llvm.org/D124787
llvm/lib/Target/NVPTX/CMakeLists.txt
llvm/lib/Target/NVPTX/NVPTXAliasAnalysis.cpp [new file with mode: 0644]
llvm/lib/Target/NVPTX/NVPTXAliasAnalysis.h [new file with mode: 0644]
llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
llvm/lib/Target/NVPTX/NVPTXTargetMachine.h
llvm/test/CodeGen/NVPTX/nvptx-aa.ll [new file with mode: 0644]