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

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 30 09:09:16 PST 2021


kpn added a comment.

In D114766#3161806 <https://reviews.llvm.org/D114766#3161806>, @sepavloff wrote:

> Probably the pass should run earlier, it is hard to reason without analyzing practical cases. If it is indeed so, we could move the pass or run it several times. Tuning pipeline is not unique for constant folding only. But without ability to remove instructions many optimizations do not make sense.

But InstSimplify is used for analysis long before it is run for transformations. Other passes just call into InstSimplify and bypass InstSimplify's transformation pass machinery. Meaning, parts of InstSimplify do run earlier in the pipeline _already_. And many if not most transformation passes eliminate instructions without going through InstSimplify. So tuning the pipeline is not the answer.

Coming up with a more general solution that can be used by multiple transformation passes is what we need.


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