This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Stop using JUMP_INSN for jump table data
- From: Jeff Law <law at redhat dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 30 Mar 2013 07:02:35 -0600
- Subject: Re: [patch] Stop using JUMP_INSN for jump table data
- References: <CABu31nOPJ-+ixTfOqAGWMqg4nbKXHP_OWuitre8=1H__cc8S+Q at mail dot gmail dot com>
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 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.