This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Stop using JUMP_INSN for jump table data

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

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

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

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]