This is the mail archive of the gcc-cvs@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]

r251282 - in /trunk/gcc: ChangeLog combine.c cs...


Author: rsandifo
Date: Tue Aug 22 16:14:48 2017
New Revision: 251282

URL: https://gcc.gnu.org/viewcvs?rev=251282&root=gcc&view=rev
Log:
Make more use of paradoxical_subreg_p

This patch makes more use of the existing paradoxical_subreg_p
predicate and also adds a version that operates on outer and
inner modes.

Some of the affected tests were based on GET_MODE_SIZE rather than
GET_MODE_PRECISION and so the patch could change the result for modes
that have the same size but different precisions.  I think in each
case the change should be a no-op or more correct, since a mode with
precision N bits can't be expected to hold all of a mode with precision
M>N bits.

The patch changes the branch taken in simplify_subreg for modes with
equal precision, but the new form matches the commentary more closely.
Both branches should be equally good in that situation.

2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

gcc/
	* rtl.h (paradoxical_subreg_p): Define inline, and add a version
	that takes the outer and inner modes.
	* doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
	comparison as the canonical test for a paradoxical subreg.
	* combine.c (simplify_set): Use paradoxical_subreg_p.
	(make_extraction): Likewise.
	(force_to_mode): Likewise.
	(rtx_equal_for_field_assignment_p): Likewise.
	(gen_lowpart_for_combine): Likewise.
	(simplify_comparison): Likewise.
	* cse.c (equiv_constant): Likewise.
	* expmed.c (store_bit_field_1): Likewise.
	* final.c (alter_subreg): Likewise.
	* fwprop.c (propagate_rtx): Likewise.
	(forward_propagate_subreg): Likewise.
	* ira-conflicts.c (ira_build_conflicts): Likewise.
	* lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
	* lra-constraints.c (curr_insn_transform): Likewise.
	(split_reg): Likewise.
	* lra-eliminations.c (move_plus_up): Likewise.
	(lra_eliminate_regs_1): Likewise.
	* recog.c (general_operand): Likewise.
	* ree.c (combine_reaching_defs): Likewise.
	* reload.c (push_reload): Likewise.
	(find_reloads): Likewise.
	* reload1.c (elimination_effects): Likewise.
	(compute_reload_subreg_offset): Likewise.
	(choose_reload_regs): Likewise.
	* rtlanal.c (subreg_lsb_1): Likewise.
	* simplify-rtx.c (simplify_unary_operation_1): Likewise.
	(simplify_subreg): Likewise.
	* var-tracking.c (track_loc_p): Likewise.
	* emit-rtl.c (byte_lowpart_offset): Likewise.
	(paradoxical_subreg_p): Delete out-of-line definition.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/combine.c
    trunk/gcc/cse.c
    trunk/gcc/doc/rtl.texi
    trunk/gcc/emit-rtl.c
    trunk/gcc/expmed.c
    trunk/gcc/final.c
    trunk/gcc/fwprop.c
    trunk/gcc/ira-conflicts.c
    trunk/gcc/lower-subreg.c
    trunk/gcc/lra-constraints.c
    trunk/gcc/lra-eliminations.c
    trunk/gcc/recog.c
    trunk/gcc/ree.c
    trunk/gcc/reload.c
    trunk/gcc/reload1.c
    trunk/gcc/rtl.h
    trunk/gcc/rtlanal.c
    trunk/gcc/simplify-rtx.c
    trunk/gcc/var-tracking.c


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