This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Use JUMP_TABLE_DATA_P instead of JUMP_P and GET_CODE tests
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 28 Mar 2013 10:32:45 +0100
- Subject: Re: [patch] Use JUMP_TABLE_DATA_P instead of JUMP_P and GET_CODE tests
- References: <CABu31nO7mQ2URsxtxmzrKN-iV17m=G+zdH5Y5ePQDmFeJugdfQ at mail dot gmail dot com> <CABu31nNGkwHJEm+=KX9C3bQdae14Bs9UD-RDGgGjkvpJt0AR5A at mail dot gmail dot com>
On Thu, Mar 28, 2013 at 12:16 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> *Ping*
Ok.
Thanks,
Richard.
> On Sat, Mar 23, 2013 at 5:15 PM, Steven Bosscher wrote:
>> Hello,
>>
>> This patch replaces all tests I could find, where the code is looking
>> for jump table data with GET_CODE(..)=ADDR_VEC and similar with
>> JUMP_TABLE_DATA_P tests.
>>
>> Most replacements are mechanical, but a few are not:
>>
>> * The code in s390.c looked odd, I think the replacement code is
>> easier to follow.
>>
>> * The changed in bfin.c and a few other places assume that ADDR_VEC
>> and ADDR_DIFF_VEC can only appear as tablejump data. This appears to
>> be assumed in many other places in the compiler (although AFAICT it's
>> not documented as such) and it looks like the authors of the changed
>> code simply omitted the JUMP_P test before looking at the pattern for
>> an ADDR_VEC/ADDR_DIFF_VEC.
>>
>> BTW if ADDR_VEC/ADDR_DIFF_VEC really only appear in JUMP_TABLE_DATA_P
>> insns then tests for these codes can be removed in all places where
>> the insn being looked at must be in a basic block. That's almost all
>> places in the middle-end proper (especially as case labels) and I
>> intend to clean that up in a follow-up patch.
>>
>> But first...
>>
>> Bootstrapped&tested on powerpc64-unknown-linux-gnu and on
>> ia64-unknown-linux-gnu.
>> OK for trunk?
>>
>> Ciao!
>> Steven