You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on #4899 I discovered that opt_expr has optimizations for folding cells with constant outputs (e.g. when a shift cell has two constant inputs), but these don't get checked until after the optimizations for cells with one constant input. This means for example, that if a shift cell has two constant inputs, it will first replace the cell with a wire connecting the relevant bits of A directly to Y, which then requires a separate operation to optimize the new wire. It seems to me that reordering the opt_expr::replace_const_cells() to perform the FOLD_NARG_CELL() checks first could be an improvement to performance (albeit a slight one).
The text was updated successfully, but these errors were encountered:
Feature Description
While working on #4899 I discovered that
opt_expr
has optimizations for folding cells with constant outputs (e.g. when a shift cell has two constant inputs), but these don't get checked until after the optimizations for cells with one constant input. This means for example, that if a shift cell has two constant inputs, it will first replace the cell with a wire connecting the relevant bits of A directly to Y, which then requires a separate operation to optimize the new wire. It seems to me that reordering theopt_expr::replace_const_cells()
to perform theFOLD_NARG_CELL()
checks first could be an improvement to performance (albeit a slight one).The text was updated successfully, but these errors were encountered: