[llvm-dev] Typeless pointers and intrinsics
De Azevedo Piovezan, Felipe via llvm-dev
llvm-dev at lists.llvm.org
Thu Jul 25 04:49:37 PDT 2019
To avoid going too off-topic on the multidimensional gep thread, I'm asking this in a separate thread.
>> I took a look earlier and didn't notice any target-independent ones that would need a separate type parameter
Do you know what would happen with the llvm.ptr.annotation intrinsic? Frontends use that to annotate members of structs:
struct S {
[[some_annotation]] int annotated_array[10];
int not_annotated_array[100;
};
However, there is a big difference between annotating a pointer of type S*, a pointer of type [10 x i32]*, and a pointer of type i8*. The intrinsic is overloaded for "any pointer" type to allow distinguishing between those three cases. Do you think we can represent this in a different way once pointers become opaque?
-----Original Message-----
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Tim Northover via llvm-dev
Sent: Wednesday, July 24, 2019 4:14 PM
To: Michael Kruse <llvmdev at meinersbur.de>
Cc: LLVM Developers Mailing List <llvm-dev at lists.llvm.org>; Michael Kruse <llvm at meinersbur.de>; SAHIL GIRISH YERAWAR <cs15btech11044 at iith.ac.in>; Michael Ferguson <mferguson at cray.com>; Tobias Grosser <tobias.grosser at inf.ethz.ch>
Subject: Re: [llvm-dev] [RFC] A new multidimensional array indexing intrinsic
Hi all,
On Wed, 24 Jul 2019 at 16:14, Michael Kruse via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> Mmmh, looks like Tim Northover is actively working on typeless/opaque
> pointers, e.g. https://reviews.llvm.org/D64203
Yep, I'm spending as much time as I can on the project. I think there's not really much chance that it'll be required in this cycle (i.e. when we fork in ~Jan pointers will be distinct IMO).
On intrinsics as they affect opaque pointers, I took a look earlier and didn't notice any target-independent ones that would need a separate type parameter, but a couple of target-specific ones did.
Unless they were particularly anomalous and implementable by other means, intrinsics will need to develop the ability to specify an abstract "notable type" anyway.
Apart from all that, I'm pretty disappointed to see this as an intrinsic though. GEP is such a fundamental part of addressing in LLVM that bifurcating it into an intrinsic for either a language or an analysis seems like we'd be papering over a language deficiency.
Cheers.
Tim.
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list