ispc/ispc — Issue #156: switch: improve code for "varying" break stmts in "uniform" switches
Author: mmp
Created: 2012-01-11 23:41:11+00:00
State: open
Labels: performance

Currently, if we have a switch statement with a uniform condition but that
has a break statement controlled by an "if" with a varying test, we convert
the switch expression to be varying and follow the varying switch code
generation path.

This is actually sub-optimal, since we can still use an LLVM switch
instruction to do a single jump to the single label to start running at.
We then would need to generalize the code generated for uniform switches to
be able to handle the notion of some program instances being disabled by
breaks under varying control flow.