Open
Description
In #1945 we split the process of lowering polynomial.eval
into two steps: constructing an ArithemticDag for the lowered eval and materializing the IR in the pass by running a visitor over the DAG.
The first step is good because you can unit test the lowered arithmetic DAG outside of any MLIR nonsense (e.g., evaluate the DAG to assert you get the same output as the polynomial, assert the multiplicative depth is what you expect, cf. lib/Utils/Polynomial/ChebyshevPatersonStockmeyerTest.cpp for examples). The second step is good because it's really independent of the lowering method, so all the IR construction logic can be shared across all lowering options.