[PATCH] D114126: [PatternMatch] Create match method to track uses complexity

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 7 11:29:00 PST 2022


rampitec added a comment.

In D114126#3227404 <https://reviews.llvm.org/D114126#3227404>, @spatel wrote:

> If we removed some strictness about uses, we probably wouldn't require this patch or the follow-ons for complicated bitwise logic optimizations. Those are only needed because we miss the simpler, intermediate folds in complex expressions with extra uses. I suppose we'd be more at risk for infinite combine loops if we allowed creating extra instructions, but it might be worth experimenting with removing some use checks on bitwise logic folds to see how that plays out.

More than infinite loops (which is also possible) I am worried we may in fact make code worse without taking into account a wider pattern.
Anyhow, we used to discuss this approach in the very beginning of the ternary changes stack, so I thought to give it a try. It turns out to be more complicated change than I was initially anticipated unfortunately. I am not pushing this in any way.


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

https://reviews.llvm.org/D114126



More information about the llvm-commits mailing list