The namespaces of HWREGs is now overlapping with gfx10. Thus the
patch is longer than necessary to just support new names. It also
need to handle proper error messages, i.e. to issue a "specified
hardware register is not supported on this GPU" message.
This may need a major refactoring in the future.
I'm not sure LLVM_READNONE could be used here because the function reads non-constant memory pointed to by Name. Should the attribute be replaced with LLVM_READONLY?