PR17925, PATCH

Stepan Dyatkovskiy stpworld at narod.ru
Fri Nov 22 04:12:30 PST 2013


New patch.

In respect to last Nick's remarks:
http://llvm.org/bugs/show_bug.cgi?id=17925#c2

I made only addrspace(0) equal to integer type by default. I also have 
added few fixmes, in which I propose to ask target whether we can ignore 
address space and treat all pointers as integers.

I have removed inttoptr-address-space-2.ll, since it would be incorrect 
after these changes. This test wants to merge function with different 
return types.

-Stepan

Stepan Dyatkovskiy wrote:
> ping
> Stepan Dyatkovskiy wrote:
>> I have updated fix:
>> Introduced exceptions for
>> * 'ret' instruction (we can ignore address space here)
>> * 'load' instruction (we can't ignore address space in operands, but
>> it we still can do it for instruction type itself)
>>
>> Now all tests are passed.
>>
>> -Stepan
>>
>> 14.11.2013, 16:38, "Stepan Dyatkovskiy" <stpworld at narod.ru>:
>>> Please find bug description at:
>>> http://llvm.org/bugs/show_bug.cgi?id=17925
>>>
>>> Sorry, I forget, that fixes should be published in llvm-commits, not in
>>> bugzilla. So, below is fix description.
>>>
>>> Fix:
>>> The are cases when we CAN treat pointers as integers, and places when we
>>> CAN'T. Below is my proposal:
>>> * We treat pointers as integers when we compare function formal
>>> arguments.
>>> * Otherwise, we can't do that in general.
>>> * We can add more exceptions, where address space affects nothing: for
>>> example argument of "ret" instruction.
>>> The patch is attached.
>>>
>>> Though, by now, it breaks 3 tests, but only since these tests checks
>>> things that are wrong in general. We have to decide what to do with
>>> these things:
>>> 1. Can we always ignore address space of 'ret' type?
>>> 2. Isn't it imprortant to tread 'load' instruction as different if they
>>> accepts pointers with different address spaces?
>>>
>>> ,
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ptr-int-transitivity-2013-11-22.patch
Type: text/x-diff
Size: 10904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131122/81944d12/attachment.patch>


More information about the llvm-commits mailing list