This is the mail archive of the gcc-patches@gcc.gnu.org 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] Use JUMP_TABLE_DATA_P instead of JUMP_P and GET_CODE tests


*Ping*

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


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