On 10/20/2015 08:34 PM, Alexander Monakov wrote:
This allows to emit decls in 'shared' memory from the middle-end.

        * config/nvptx/nvptx.c (nvptx_legitimate_address_p): Adjust prototype.
         (nvptx_section_for_decl): If type of decl has a specific address
         space, return it.
         (nvptx_addr_space_from_address): Ditto.
         (TARGET_ADDR_SPACE_POINTER_MODE): Define.
         (TARGET_ADDR_SPACE_ADDRESS_MODE): Ditto.
         (TARGET_ADDR_SPACE_SUBSET_P): Ditto.
         (TARGET_ADDR_SPACE_CONVERT): Ditto.
         (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Ditto.

Not a fan of this I'm afraid. I used to have address space support in the nvptx backend, but the middle-end was too broken for it to work, so I made nvptx deal with all the address space complications internally. Is there a reason why this approach can't work for what you want to do? (Also, where are you using this?)


Bernd

Reply via email to