[LLVMdev] Address space extension

Matt Arsenault arsenm2 at gmail.com
Thu Aug 8 10:34:34 PDT 2013


On Aug 8, 2013, at 7:19 , Michele Scandale <michele.scandale at gmail.com> wrote:

> On 08/08/2013 02:52 PM, Micah Villmow wrote:
>> This is something I proposed last year, so you might want to read up on that discussion first.
>> 
>> You can find it here:
>> http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-September/053277.html
> 
> Uhm... I read the discussion, probably I've not understood the problem well: the conclusion (it has been committed?) is that to handle address space conversion that imply a change in the size of pointers must be expressed as a pair ptrtoint/inttoptr. What if the address space conversione logically change also the value of the pointer?

I recently committed patches to reject bitcasts if the address space pointers are different sizes, and accept them if they are the same size as was concluded in the thread. I would like to reject all cross address space bitcasts since it would make some things simpler, but when I tried to do that it broke a good number of optimization tests that would be a lot of work to fix.

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.






More information about the llvm-dev mailing list