<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 16, 2020 at 9:59 AM David Blaikie via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 16, 2020 at 4:48 AM James Courtier-Dutton <<a href="mailto:james.dutton@gmail.com" target="_blank">james.dutton@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 15 Apr 2020 at 17:28, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
><br>
> opaque pointers don't exist in the IR yet - the goal is to reduce the places that use non-opacity of pointer types already/today and then opacify the existing pointer type, rather than introducing an opaque pointer type & having it concurrently with non-opaque pointer types. (though in retrospect such a migration might've been worth considering and/or might still be used as part of the migration, I guess)<br>
><br>
<br>
I would have thought that it would have been useful to have both<br>
pointer types available.<br>
For example, if one wished to move from an opaque pointer to MLIR, one<br>
would need to add passes to derive types first.<br>
So, having a pass that converts from opaque pointer to typed pointer<br>
and back again would have been useful.<br>
The approach you describe kind of reduces the flexibility of LLVM.<br>
I think LLVM IR -> MLIR and MLIR -> LLVM IR round tripping is a useful goal.<br></blockquote><div><br></div><div>The project started before MLIR existed, FWIW. Though I'm not sure it's the right path even today & not sure MLIR is a strong motivation - but haven't looked into it in great detail. Not sure how the presence of MLIR would change the design of opaque pointers. Oh, I see what you mean - you mean going forward/indefinitely keep the typed pointers and treat it as a lowering of sorts (from typed pointers lowering to untyped pointers) - I think that's not the direction LLVM's heading in at the moment, at least, but perhaps in the future as/if MLIR<>LLVM become more connected that'll change. I'd still think of LLVM as just the lower level IR without type information on pointers, not roundtrippable.</div></div></div></blockquote><div><br></div><div>Saying MLIR<>LLVM is sort of confusing, as it isn't clear what the connection point is. MLIR has an LLVM dialect which is intended to model what is in LLVM and roundtrip properly. The LLVM dialect will model what is in LLVM, so it doesn't matter whether the pointers are opaque or not. As LLVM moves to opaque pointers, so will the LLVM dialect in MLIR(and without much problem). I agree with you David, we should not try to roundtrip between a lower level IR and higher level IR if that imposes some unnecessary constraints on either. More specifically, I don't think we should try to enforce that the LLVM(or LLVM dialect) is required to roundtrip between any of the other high level dialects(like standard, affine, etc.) in MLIR. It may be interesting for some things (e.g., polly like raising), but isn't necessarily something I would gate the design of LLVM on.</div><div><br></div><div>-- River</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Kind Regards<br>
<br>
James<br>
</blockquote></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>