[PATCH] D139295: [Coroutines] Don't mark the parameter attribute of resume function as noalias

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 8 19:13:21 PST 2022


ChuanqiXu abandoned this revision.
ChuanqiXu added a comment.

In D139295#3978335 <https://reviews.llvm.org/D139295#3978335>, @nikic wrote:

> @ChuanqiXu Your first function already contains:
>
>   store i32 42, ptr %__promise.reload.addr.i.i, align 8, !tbaa !3, !alias.scope !18
>   store ptr null, ptr %.reload.addr, align 8, !alias.scope !18
>   %1 = load ptr, ptr %0, align 8
>   musttail call fastcc void %1(ptr nonnull %0) #5, !noalias !18
>
> which says that the store and the call don't alias. I don't think the `noalias` argument on the function would even matter in that case. The incorrect noalias metadata must be introduced at some earlier point already.

Oh, so I misunderstood the semantics of `!noalias` before. So this patch may not be correct. BTW, do you have any ideas why the `store` in the first function would't be optimized out?


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

https://reviews.llvm.org/D139295



More information about the llvm-commits mailing list