AMDGPU: Implement hook for InferAddressSpaces

For now just port some of the existing NVPTX tests
and from an old HSAIL optimization pass which
approximately did the same thing.

Don't enable the pass yet until more testing is done.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293580 91177308-0d34-0410-b5e6-96231b3b80d8
6 files changed