[PATCH] D102344: [SCEV]: Teach SCEV about llvm.annotation intrinsic

Ettore Tiotto via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 13 11:50:26 PDT 2021


etiotto added a comment.

In D102344#2755915 <https://reviews.llvm.org/D102344#2755915>, @Meinersbur wrote:

> testcase <https://reviews.llvm.org/file/data/jej6j7yzekjybkn2jgpk/PHID-FILE-z6brbbyniawgnh36elcl/meme-test_case>
>
> From the language reference:
>
>> they are ignored by code generation and optimization.
>
> I agree that this means the annotation can be ignored. But it returning the first argument (as mentioned in the summary) is not sufficient to conclude that, e.g. it could have side effects.

It is not clear to me what side-effects the `llvm.annotation` intrinsic would need to have. The current documentation states that the intrinsic function can be ignored by code gen and optimizations.  That means I could  move instructions past the intrinsic since the intrinsic can be ignored.  If the intrinsics had side effects that optimization would be illegal, and it follows the intrinsic could not be ignored. Do I make any sense?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102344



More information about the llvm-commits mailing list