Eliminate assignments to simple "intermediate" wires. (UNSOUND)
This is a basic assignment-propagation simplification. The idea is to reduce modules that have lots of intermediate wires by just replacing the wire with its expression. For instance, a module that had assignments like:
assign a1 = ~a2; assign a2 = ~a3; assign a3 = ~a4; assign a4 = ~a5;
Could presumably be propagated into:
assign a1 = ~(~(~(~a5)));
Which we could then reduce in other ways.
This transformation is generally unsound. We aren't really doing any checking to make sure that we are substituting into contexts with compatible widths, etc. We're also relying on the :DIR fields on module instance arguments, which is probably not safe when ports are incorrectly marked as inputs instead of outputs, etc.
Prerequisites: arguments need to be resolved so we can tell directions on module/gate instance ports.