On 03/29/2013 05:15 PM, Steven Bosscher wrote:
Hello,

GCC uses fake JUMP_INSNs as placeholders for jump table data. These
JUMP_INSNs have an ADDR_VEC or ADDR_DIFF_VEC as PATTERN, but they are
not real instructions and they are not inside basic blocks. This
results in special-casing JUMP_P insns in various places throughout
the compiler.

The attached patch adds a new object, JUMP_TABLE_DATA, to hold jump
table data. All remaining JUMP_P insns will be real insns, which helps
simplify things a bit -- or at least make things more intuitive.

A number of back ends, and probably some code in the middle end (not
sure), uses the "*active_insn*" family of functions while traversing
the insn chain (instead of the CFG) and expect jump table data to be
considered an active insn. Therefore, JUMP_TABLE_DATA is an RTX_INSN
for the moment, but I intend to make it an RTX_EXTRA before stage1
ends.

Bootstrapped and tested on powerpc64-unknown-linux-gnu and on
x86_64-unknown-linux-gnu.
OK for trunk?
OK.

Note that on at least one target, the jump table data is actual code (PA). I don't think it makes a difference at this stage, but please keep that in mind as you continue this work.

Jeff

Reply via email to