[llvm-dev] Opaque Pointers Help Wanted

Craig Topper via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 21 09:35:38 PDT 2021


If I remember correctly, these 3 intrinsics need to be redesigned as they
use a type overload on the pointer argument to recover a type. See code
in BPFAbstractMemberAccess::IsPreserveDIAccessIndexCall.

def int_preserve_array_access_index :
DefaultAttrsIntrinsic<[llvm_anyptr_ty],
                                                [llvm_anyptr_ty,
llvm_i32_ty,
                                                 llvm_i32_ty],
                                                [IntrNoMem,
                                                 ImmArg<ArgIndex<1>>,
                                                 ImmArg<ArgIndex<2>>]>;
def int_preserve_union_access_index :
DefaultAttrsIntrinsic<[llvm_anyptr_ty],
                                                [llvm_anyptr_ty,
llvm_i32_ty],
                                                [IntrNoMem,
                                                 ImmArg<ArgIndex<1>>]>;
def int_preserve_struct_access_index :
DefaultAttrsIntrinsic<[llvm_anyptr_ty],
                                                 [llvm_anyptr_ty,
llvm_i32_ty,
                                                  llvm_i32_ty],
                                                 [IntrNoMem,
                                                  ImmArg<ArgIndex<1>>,
                                                  ImmArg<ArgIndex<2>>]>;

~Craig


On Mon, Jun 21, 2021 at 9:03 AM Arthur Eubanks via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> For the opaque pointers project,
> https://llvm.org/docs/OpaquePointers.html#transition-plan contains high
> level steps for what to do before we can enable opaque pointers. (Looks
> like the page hasn't been rebuilt in a while,
> https://github.com/llvm/llvm-project/blob/main/llvm/docs/OpaquePointers.rst#transition-plan
> contains some more concrete steps)
>
> Essentially almost all of the work boils down to figuring out how to
> remove calls to `PointerType::getElementType()` and
> `Type::getPointerElementType()`. Everything else derives from that.
>
> Any help with this is welcome and appreciated!
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210621/76b27d65/attachment.html>


More information about the llvm-dev mailing list