[PATCH] D111806: [LICM] Check the number of divergent paths from loop header to target block

Di Mo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 21 14:24:00 PDT 2021


modimo added subscribers: wenlei, modimo.
modimo added a comment.

To keep the conversation coherent I'll talk about the same feedback for D87551 <https://reviews.llvm.org/D87551> here:

In D111806#3067256 <https://reviews.llvm.org/D111806#3067256>, @reames wrote:

> If we were being presented with hard cases to undo with a cost based transform, I might be willing to entertain the notion that LICM should be non-canonical.  As it stands, I don't see such examples.

The original change that prompted adding this from @wenlei is a more complicated situation https://reviews.llvm.org/D65060#1596899. Specifically, once the values are hoisted out of the 200 switch arms there's not longer a dominating use block to sink them back into. In addition, the block frequency information at that point no longer indicates that there's an issue from the hoisting. Getting MachineLICM to handle that case is complicated and I suspect fragile.


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

https://reviews.llvm.org/D111806



More information about the llvm-commits mailing list