jaa2
jaa2
Item 3 is now completed. Any range of cases spanning no more than 16 values is now supported by subtracting the minimum case if necessary (underflows desired), and empty cases...
The primary reason I included relative offsets was to eliminate a conditional jump for gas savings, but you're right, we could fit up to 32 cases in a single push,...
The switch block type is now in ControlFlowGraphTest and StackLayoutGeneratorTest. The new graphs seem correct to me, but I haven't yet committed updates to the test cases.
Current issues: - The switch CFG type as I implemented it has increased bytecode size and same or slightly worse execution cost for regular switches. I think this is because...
It might need a little more work, but the last case optimization was a major improvement: ### `ir-optimize-evm+yul` | project | bytecode_size | deployment_gas | method_gas | |:----------------:|-------------------:|-------------------:|-------------------:| | bleeps...
> If we can't reduce this further, we could still (I think I saw that as a suggestion somewhere while I was off) consider moving the decision for jump tables...
I implemented the "early decision" for jump tables in my most recent commits to #12978. It uses the CFG switch type for jump tables only, and seems to have favorable...
Oh, that makes sense. I now remember seeing that when I was fiddling with the stack generation. Here is an overall asm comparison in the latest version, for `UniswapV3Factory.sol` from...
> @jaa2 Are you still working on this ? Or shall we takeover I would love to see this completed. Technically, I am waiting for feedback on #12978. I could...