Even though we request the optimized Yul IR (and no EVM bytecode) from solc, due to some optimization passes, EVM codegen is still run. This can lead to errors like Could not create stack layout after 1000 iterations. when compiling contracts. But PVM is in no way connected to the EVM stack, and Yul has no stack layout.
Setting yulDetails.stackAllocation: false does not help in all cases, found a reproducer that just OOMs (my 64gb machine) in that case.
solc is notorious for such bugs. Because even --optimize --no-optimize-yul forcefully enables stack allocation, we have no other choice left than to request the unoptimized Yul. This should be fine; any remaining solc optimizer gains which are not covered yet by either the NY opt or LLVM passes can just be re-implemented in NY.
Even though we request the optimized Yul IR (and no EVM bytecode) from solc, due to some optimization passes, EVM codegen is still run. This can lead to errors like
Could not create stack layout after 1000 iterations.when compiling contracts. But PVM is in no way connected to the EVM stack, and Yul has no stack layout.Setting
yulDetails.stackAllocation: falsedoes not help in all cases, found a reproducer that just OOMs (my 64gb machine) in that case.solcis notorious for such bugs. Because even--optimize --no-optimize-yulforcefully enables stack allocation, we have no other choice left than to request the unoptimized Yul. This should be fine; any remaining solc optimizer gains which are not covered yet by either the NY opt or LLVM passes can just be re-implemented in NY.