[PATCH] D114766: If constrained intrinsic is replaced, remove its side effect

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 30 21:48:19 PST 2021


sepavloff added a comment.

Let me summarize some points of the solution:

1. Changing call site attributes is safe. It is equivalent to the creation of a new call site, with new set of attributes, and then replacing the old one with it, an ubiquitous operation in LLVM.
2. The attribute adjustment can be made as soon as the possibility of constant folding is detected.
3. The place where constant evaluation occurs is a subject of pipeline tuning. It is obvious that it should not run too early because the frontend already makes constant expression evaluation, so the constant evaluation in IR pipeline mainly evaluates constants formed by previous passes. Current point where InstSimplify is run probably is not the best, but  it must be good enough.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114766



More information about the llvm-commits mailing list