Open
Description
GVNHoist currently bails out unless a value is fully anticipable at a dominator. It may be profitable to split the parents and create a common dominator for all the basic blocks that have a fully anticipable value. e.g.,
graph TD;
BB -->BB1[BB1:\n I1:VN]
BB -->BB2[BB2:\n I2:VN]
BB -->BB3[BB3:\n]
If only BB1 and BB2 has v
(for an instruction I
). it might be profitable to create a common predecessor for BB1,BB2 and hoist I
there.
graph TD;
BB -->BB0[BB0:\n I1:VN]
BB0 -->BB1[BB1:\n]
BB0 -->BB2[BB2:\n]
BB -->BB3[BB3:\n]