The pass currently relyes on the regular InferAddressSpaces to run
after it to actually rewrite instructions. In the future it shall
be possible to add such rewriting into this pass itself as well
as to change function signatures.
The pass itself is not AMDGPU specific, but it needs to run after
the InferAddressSpaces so that pointers are promoted in the callees
and then it needs yet another run of the InferAddressSpaces after.
Hence the pass placement in the backend, otherwise other targets
would need to run extra InferAddressSpaces instance. When/if
InferAddressSpaces is not needed after argument coercion it can be
placed into a regular opt pipeline.
This is going to end up repeating all of InferAddressSpacesImpl::collectFlatAddressExpressions