[PATCH] D107859: [AMDGPU] MachineLICM cannot hoist VALU

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 09:43:14 PDT 2021


rampitec added a comment.

In D107859#2976487 <https://reviews.llvm.org/D107859#2976487>, @foad wrote:

> This might be a silly question but I have to ask it: why do we have implicit uses of exec in the first place, if we have to keep teaching passes to ignore them? (Maybe we could only add the implicit uses later in the pass pipeline, which control flow intrinsics are lowered to explicit exec mask manipulations?)

That is hard to predict what transformations would be illegal and it is very easy to lose an implicit operand if not written in the MCDesc. It takes some effort to prove it is safe to ignore this operand in each case. In case of the LICM we always hoist an instruction to a block with a mask which shall completely cover the mask used inside loop, so it must be safe. I am not so sure about the rest of potential cases.


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

https://reviews.llvm.org/D107859



More information about the llvm-commits mailing list