This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.4 resubmission]
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Richard Sandiford <rsandifo at nildram dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 21 Mar 2008 14:36:10 +0100
- Subject: Re: [4.4 resubmission]
- References: <87fxvgu30k.fsf@firetop.home>
> [Eric, you rashly volunteered to be pinged about this after 4.3 branched.]
Sorry for the delay, I wasn't in reviewing mode lately. :-)
> gcc/
> * Makefile.in (dse.o): Depend on $(TM_P_H).
> * optabs.h (extract_low_bits): Declare.
> * optabs.c (extract_low_bits): New function.
> * rtlhooks.c (gen_lowpart_general): Generalize SUBREG handling.
> * dse.c: Include tm_p.h.
> (find_shift_sequence): Remove the read_reg argument and return the
> read value. Emit the instructions instead of returning them.
> Iterate on new_mode rather than calculating it each time.
> Check MODES_TIEABLE_P. Use simplify_gen_subreg to convert the
> source to NEW_MODE and extract_low_bits to convert the shifted
> value to READ_MODE.
> (replace_read): Allow the load and store to have different mode
> classes. Use extract_low_bits when SHIFT == 0. Create the shift
> or extraction instructions before trying the replacement. Update
> dump-file code accordingly, avoiding use of REGNO (store_info->rhs).
>
> gcc/testsuite/
> * gcc.target/mips/dse-1.c: Add checks for zeros.
This is OK for mainline, modulo the location of extract_low_bits: why not put
it in emit-rtl.c like gen_lowpart_*? I appreciate the different semantics
but optabs.c seems a little strange.
--
Eric Botcazou