CASESI: GCC is optimising away my cases
Jeffrey A Law
law@cygnus.com
Tue Dec 14 09:51:00 GMT 1999
In message < 199912141720.RAA11121@rocoto >you write:
>
> I've created a `casesi' pattern which outputs code for jumping via the
> table. This produces the expected code. However, when I run the compiler
> with any optimisation enabled, it removes the blocks of code referred to
> in the dispatch table.
>
> What it looks like is happening is that the jump optimisation cannot find a
> jump which refers to the routines (as they are done indirectly via the
> dispatch table),
This is your problem. You need to show at the RTL level that each label
is used.
Your casesi pattern should be followed by an ADDR_VEC or ADDR_DIFF_VEC insn
which should contain a reference to each target label. Why is that not
happening?
jeff
More information about the Gcc-help
mailing list