search for: ptrtoptr

Displaying 4 results from an estimated 4 matches for "ptrtoptr".

Did you mean: ptrptr
2012 Sep 08
2
[LLVMdev] Bitcasts between pointers with different address spaces
...e source >>> pointer does not point to a location in B. >> >> Use a ptrtoint + inttoptr to implement the cast. >> > > I find that strange. One has to pick an intermediate integer type that is safe to convert to and from. It would seem more natural then to define a ptrtoptr operation that will truncate/extended as appropriate. It would make auto upgraded of old LLVM IR files easier to change bitcast of pointer to pointer. Yes, that makes sense to me. It's more cumbersome to implement, what with being a new instruction, but I guess that's the price for doing...
2012 Sep 08
0
[LLVMdev] Bitcasts between pointers with different address spaces
...cast is undefined if the source >> pointer does not point to a location in B. > > Use a ptrtoint + inttoptr to implement the cast. > I find that strange. One has to pick an intermediate integer type that is safe to convert to and from. It would seem more natural then to define a ptrtoptr operation that will truncate/extended as appropriate. It would make auto upgraded of old LLVM IR files easier to change bitcast of pointer to pointer. >> If the address spaces overlap, one should be able to bticast between them. > > I am not okay with having the verifier accept or r...
2012 Sep 08
0
[LLVMdev] Bitcasts between pointers with different address spaces
...ointer does not point to a location in B. >>> >>> Use a ptrtoint + inttoptr to implement the cast. >>> >> >> I find that strange. One has to pick an intermediate integer type that is safe to convert to and from. It would seem more natural then to define a ptrtoptr operation that will truncate/extended as appropriate. It would make auto upgraded of old LLVM IR files easier to change bitcast of pointer to pointer. > > Yes, that makes sense to me. It's more cumbersome to implement, what with being a new instruction, but I guess that's the price...
2012 Sep 08
2
[LLVMdev] Bitcasts between pointers with different address spaces
Mon Ping Wang wrote: > Hi, > > I don't think we should make bit casts between pointers with different > address spaces illegal. Address spaces are not required to be disjoint. > In the N1169 spec, it says > A non-null pointer into an address space A can be cast to a pointer into > another address space B, but such a cast is undefined if the source > pointer does not