This prompt outlines the implementation of a comprehensive block-based optimization system for the Guillotine EVM that introduces BLOCK_START pseudo-instructions to enable advanced optimizations including stack validation, gas pre-calculation, and intelligent prefetching.
Instead of validating stack depth and calculating gas costs instruction-by-instruction during execution, we pre-analyze bytecode into basic blocks and aggregate requirements at the block level. This enables: