Skip to content

ir3/cf: Rewrite pass

Connor Abbott requested to merge cwabbott0/mesa:review/ir3-fix-cf into main

The old pass had a few bugs:

  • It tried to avoid folding f2f32 into f2f16, but didn't consider conversions that were already folded in.
  • It didn't prevent folding an f2f16 or f2f32 into a non-floating-point op.

In addition it wasn't written in a manner which made handling integer conversions practical. This rewrites the pass to instead calculate the "type" of the conversion source and then check whether folding the conversion is allowed. This allows us to cleanly separate the declarative part where we describe how the HW works from the policy part where we decide whether the transform is allowed, and makes it simple to add support for folding integer conversions.

Closes: #3208 (closed)

Merge request reports