Continuation of #120.
Adds two new optimization passes, gives finer control over what MCHPRS considers to be inputs/outputs and some QoL changes to commands.
Hope the huge scope of this PR is acceptable, as it was too difficult to properly decouple everything and create separate PR's for each change.
Changes:
Add /toggleioonly command that ensures only I/O blocks are visually updated, even in "development mode" (without active redpiler)
Also implies io-only on compiles
Reworked what components are considered to be inputs or outputs. Now defined in the core crates build script (useful for builds with non standard output components)
Optimization passes in the redpiler now ensure these components are never optimized away
Experimental addition of a now Buffer component that can be used to coalesce multiple components
Added PruneOrphans pass, removes all nodes that do not contribute to output components
Added TailCoalesce pass, replaces lines of comparators, that only connect to outputs, with the new Buffer component
Added dot file output when compiling with the export flag
Improved warning message when compiling while there are still active ticks
Added autocompletion info for some commands
~Adds a playground crate to to run experiments (Should possibly be removed or better commented?)~
Checks:
No performance regressions on the chungus benchmark
Note: Node in direct.rs now contains exactly 128 bytes
Open improvements and considerations:
Consider using unions and bitfields in the future in case Node ever needs to hold more state
~Improve documentation on the new "magic" build script?~
tail_coalesce pass can theoretically optimize more cases according to the results of the playgrounds experiments
Delete entirely or improve documentation of new playground crate and its current binaries
Linear subgraph search algorithm can be extracted and also used to delete comparator lines that more than 15 signal strength falloff
Continuation of #120. Adds two new optimization passes, gives finer control over what MCHPRS considers to be inputs/outputs and some QoL changes to commands. Hope the huge scope of this PR is acceptable, as it was too difficult to properly decouple everything and create separate PR's for each change.
Changes:
/toggleioonly
command that ensures only I/O blocks are visually updated, even in "development mode" (without active redpiler)Buffer
component that can be used to coalesce multiple componentsPruneOrphans
pass, removes all nodes that do not contribute to output componentsTailCoalesce
pass, replaces lines of comparators, that only connect to outputs, with the newBuffer
componentChecks:
Node
in direct.rs now contains exactly 128 bytesOpen improvements and considerations:
Node
ever needs to hold more statetail_coalesce
pass can theoretically optimize more cases according to the results of the playgrounds experiments