[LLVMdev] Address space extension
Michele Scandale
michele.scandale at gmail.com
Mon Aug 12 11:13:45 PDT 2013
On 08/12/2013 07:18 PM, Matt Arsenault wrote:
>
> On Aug 10, 2013, at 6:07 , Iain Sandoe <iain at codesourcery.com> wrote:
>
>>
>>> RELATED PROBLEMS
>>> 1) addrspacecast support: approved but not implemented yet. It will
>>> cleanup address spaces conversions localized in a single instruction
>>> allowing each target to define the semantic...
>>
>> Is anyone known to be working on this?
>
> If people agree that this is necessary, I can do this. I thought there were objections when that was originally proposed, and the alternative was ptrtoint + inttoptr.
I based that on what has been discussed here
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-August/064674.html
I was trying to do this but I have to implement the auto upgrade mechanism for
this new instruction. The problem in this last task is that I modified the
CastInst::castIsValid method in the following manner:
a) bitcast is not valid if both arguments are pointers and the address spaces
are different
b) addrspacecast is valid only if both arguments are pointers and the address
spaces are different
This method is called in the constructor of the subclasses of CastInst as
condition for an assertion. So the auto upgrade should prevent to create
instances with bad conditions, but I'm not sure this would be fine.
>> I see that global data items are correctly sized according to my pointer definitions - but that all operations are carried out as if pointers were sized for address space 0.
> This is what I'm working on now
Thanks,
-Michele
More information about the llvm-dev
mailing list