opencompl / Quidditch

IREE compiler and runtime for Snitch
Apache License 2.0
6 stars 3 forks source link

[PromoteToL1] Fix dominance bug #117

Closed zero9178 closed 3 months ago

zero9178 commented 3 months ago

The pass would previously create invalid IR by always replacing a tensor value with the promoted tensor despite its insertion point being before a compute operation. If another operation before the compute operation would have a use of the tensor it'd get replaced despite being illegal.

The fix is to simply not replace the value of the tensor but rather the operand use. CSE should clean up any redundancy.