[LLVMdev] Address space extension

David Chisnall David.Chisnall at cl.cam.ac.uk
Fri Aug 9 02:23:44 PDT 2013


On 8 Aug 2013, at 18:34, Matt Arsenault <arsenm2 at gmail.com> wrote:

> I have the auto upgrade for turning bitcasts into inttoptr/ptrtoint implemented, but it isn't necessary with the current rule that same sized pointer bitcasts are allowed. This would be always necessary if all cross address space bitcasts were disallowed.

The ptrtoint inttoptr dance isn't adequate for this (trust me - it's what we're doing currently in our back end and it's really, really horrible and only mostly works).  We currently have a lot of hacks in our branch to stop mid-level optimisers turning these back into bitcasts, or doing annoying (semantics-breaking) sign / zero extends.  If you're fixing this, please fix it properly by introducing an address space cast instruction that is exposed as a SelectionDAG node.

David





More information about the llvm-dev mailing list