[PATCH] D99121: [IR][InstCombine] IntToPtr Produces Typeless Pointer To Byte

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 03:49:06 PDT 2021


nlopes added a comment.

In D99121#2645593 <https://reviews.llvm.org/D99121#2645593>, @dblaikie wrote:

> In D99121#2644362 <https://reviews.llvm.org/D99121#2644362>, @lebedev.ri wrote:
>
>> In D99121#2644223 <https://reviews.llvm.org/D99121#2644223>, @nlopes wrote:
>>
>>> The pointee type in LLVM doesn't really matter. It's even supposed to disappear one day after the migration is completed.
>>> E.g., i8* and i64* are exactly the same thing: they are pointers to data.
>>
>> Yep. That will be indeed a great to see.
>>
>>> So, I don't understand the motivation for this patch. It doesn't solve the root cause of the problem (which one btw?).
>>
>> It is indeed temporary until Opaque pointers are here.
>> The problem has been stated last time in D99051 <https://reviews.llvm.org/D99051> by @ruiling:
>> https://godbolt.org/z/x7E1EjWvv, i.e. given the same integer,
>> there can be any number of pointers `inttoptr`'d from it,
>> and passes won't be able to tell that they are identical.
>>
>> @dblaikie @t.p.northover can anyone comment on the Opaque Pointers progress? Is there a checklist somewhere?
>
> no checklist, unfortunately - myself, @t.p.northover, @jyknight, and @arsenm have all done bits and pieces of work on it lately.
>
> I think we've got most of the big IR changes (adding explicit types where they'll be needed when they're no longer carried on the type of pointer parameters) - @arsenm's D98146 <https://reviews.llvm.org/D98146> is another piece in that area, hopefully near the last I think.
>
> After all that's in place, the next step I think would be to introduce the typeless pointer, support it as an operand to these various operations - and then try producing it as a result of instructions too. But I'm probably missing a bunch of important steps we'll find are necessary...

Do you have an ETA for when the switch will happen? Just to inform us where we should proceed with temp fixes like this one or we should just wait.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99121/new/

https://reviews.llvm.org/D99121



More information about the llvm-commits mailing list