This is a follow-up enhancement to promote scalar IR node sharing using the newly added C2 IR node level flag "Flag_is_commutative_vector_op".
It ensures nodes are marked as commutable right during IR construction and enables sharing such IR nodes with flipped inputs during GVN.
Currently, during the idealization of commutative operations, we sort the inputs of commutative IR based on the idx value thereby enabling communing during GVN, this scheme adds an unneeded dependency on the idealization pass and can be aligned as per the newly added Vector IR sharing mechanism.
It ensures nodes are marked as commutable right during IR construction and enables sharing such IR nodes with flipped inputs during GVN.
Currently, during the idealization of commutative operations, we sort the inputs of commutative IR based on the idx value thereby enabling communing during GVN, this scheme adds an unneeded dependency on the idealization pass and can be aligned as per the newly added Vector IR sharing mechanism.
- relates to
-
JDK-8342393 Promote commutative vector IR node sharing
- Open