dexonsmith added a comment.

In D92808#2555868 <https://reviews.llvm.org/D92808#2555868>, @ahatanak wrote:

> For example, if SCCP just does a normal RAUW on the following call, which is 
> taken from the example I posted,
>
>   %r = call i8* @foo() [ "clang.arc.rv"(i64 1, i8* %r) ]
>
> will become
>
>   %r = call i8* @foo() [ "clang.arc.rv"(i64 1, i8* @g0) ]
>
> `%r` doesn't have an explicit use in the IR anymore, so passes like 
> deadargelim can change the return type of the function to `void`.

Is that a problem? It seems like this keeps all the information ARC needs. This 
could be lowered to:

  call void @foo()
  call @unsafeClaimAutoreleasedReturnValue(i8* @g0)

The ARC optimizer and ARC lowering both need to know about this case, but I 
don't see why deadargelim needs to know anything special.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92808

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to