[PATCH] D145093: Add map info for dereference pointer.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 2 09:02:44 PST 2023


ABataev added a comment.

In D145093#4164877 <https://reviews.llvm.org/D145093#4164877>, @jyu2 wrote:

>> I mean we shall emit the same mapping for `(*a)[:3]` and for `a[0][:3]`
>
> Yes I mean emit (*a)[:3] as a[0][:3]
>
> The difficulty is during the process array section of 
> OMPArraySectionExpr 0x12aa37e0 '<OpenMP array section type>' lvalue
>
> | -ImplicitCastExpr 0x12a8a918 'int *' <ArrayToPointerDecay> |
> | `-ArraySubscriptExpr 0x12a8a8d8 'int[3]':'int[3]' lvalue   |
> |                                                            | -ImplicitCastExpr 0x12a8a8c0 'int (*)[3]' <LValueToRValue>                       |
> |                                                            | `-DeclRefExpr 0x12a8a880 'int (*)[3]' lvalue ParmVar 0x12a8a000 'a' 'int (*)[3]' |
> | `-IntegerLiteral 0x12a8a8a0 'int' 0                        |
> | -<<<NULL>>>                                                |
> | -IntegerLiteral 0x12a8a8f8 'int' 3                         |
> |
>
> `-<<<NULL>>>
>
> It is not easy to set section base as a[0].

Yes, I understand. And did not ask for it. I just mean that a[0][:3] emits different mapping data - TARGET_PAPARM|TO|FROM, PTR_AND_OBJ|TO|FROM


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145093



More information about the cfe-commits mailing list