"Marcin J." <trashyan...@wp.pl> writes: > will be possible to add optimization that merge this two (or more) switch in > one big one (even if inner one is from inline function?) and then use one > jump table for both switches?
Is it possible? Sure. It's quite a special case, though, so if it's enabled by default it would have to be really fast. Fortunately it's easy to find switch statements as they will be the last statement in a basic block. See gcc/tree-switch-conversion.c for ideas on how to approach this. Ian