Certain targets (e.g. amdgcn) require global variable to stay in global or constant address
space. In C or C++ global variables are emitted in the default (generic) address space.
This patch introduces virtual functions TargetCodeGenInfo::getGlobalVarAddressSpace
and TargetInfo::getConstantAddressSpace to handle this in a general approach.
It only affects IR generated for amdgcn target.
"Return an AST address space which can be used opportunistically for constant global memory. It must be possible to convert pointers into this address space to LangAS::Default. If no such address space exists, this may return None, and such optimizations will be disabled."