[PATCH] D127835: [SCEV] recognize llvm.annotation intrinsic

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 03:48:24 PDT 2022


nikic added a comment.

In D127835#3584643 <https://reviews.llvm.org/D127835#3584643>, @shchenz wrote:

> In D127835#3584624 <https://reviews.llvm.org/D127835#3584624>, @nikic wrote:
>
>> Previous attempt: https://reviews.llvm.org/D102344
>>
>> The semantics of this intrinsics as specified by LangRef really leave something to be desired. In particular it's not clear to me whether it is okay to replace the llvm.annotation result with its argument during middle-end optimization, because that's what this SCEV change will ultimately lead to (at least in some cases).
>
> From the conclusion of patch D102344 <https://reviews.llvm.org/D102344>, I am thinking there was already an agreement that replacing the llvm.annotation result with its argument during middle-end optimization is valid according to LLVM language reference.

I would like a LangRef patch to make the wording more explicit. I assume the semantics here are that it's always legal to replace llvm.annotation return value with its argument, but it's preferred not to do the replacement? Otherwise we could just mark the argument as `returned`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127835



More information about the llvm-commits mailing list