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

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 15 03:05:59 PDT 2021


SjoerdMeijer added a comment.

@lebedev.ri , @reames : I am not saying this the right patch, but just wanted to leave a thought about LICM being a canonicalizing transform. The situation where we are in at the moment, is that LICM is deemed a canonicalisation transform, but we don't have a solid solution in the backend to undo this. LoopSink is an IR pass, works with profile info, and is unsuitable if register pressure needs to be taken into account. MachineSink would be the natural place for this, but currently lacks the ability to sink back into loops. Some work was started to address this, D94308 <https://reviews.llvm.org/D94308>, but that needs finishing and isn't the end of the story. It would need more heuristics, and then get enabled, so that is quite a way off from where we want to be.

Long story short, I think it is a bit easy to say this is a canonicalization transformation. I am not ready to challenge this, not sure I ever will, but just saying that we are in a limbo and not really in a good situation with this.


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

https://reviews.llvm.org/D111806



More information about the llvm-commits mailing list