scalehls
scalehls copied to clipboard
Simplify expression pass
Based on my experience, MLIR does not have passes to simplify things like this:
%cst_1 = 1.0 : f32
%1 = mulf %0, %cst_1 : f32
In this case, all uses of %1
can be replaced by %0
. This simplification pass is meaningful for us because this is automatically simplified in Vivado HLS, which makes our estimator wrongly take some redundant mulf
or other operations into consideration.