[PATCH] Kill combine's gen_binary

Paolo Bonzini paolo.bonzini@polimi.it
Wed May 26 14:06:00 GMT 2004


Here's the first product of RTL hooks.  There are only two
gen_binary-specific simplifications, one of which is
already in simplify_gen_relational, and the other can be moved
to simplify_gen_binary (it actually generalizes an
already-present simplification).

The handling of CLOBBER is superfluous because it is handled
by simplify-rtx.c: now it looks at side_effects_p for the operators
and CLOBBER is marked as having side effects.  At the time
Denis Chertykov added the handling of CLOBBERs to fix PR/11181, there
was a bug in simplify_relational_operation (now
simplify_const_relational_operation) that did not look for
side-effecting computations.  Eric Botcazou fixed the latter (which
is PR/11381).

So, this patch kills gen_binary.  It is replaced with 
simplify_gen_binary or simplify_gen-relational (in all cases but one, it 
is known which is to be used).

I also factored some simplification code out of several combine 
functions, since it was the place with the worst indentation of all.

Bootstrapped/regtested i686-pc-linux-gnu, ok for mainline?  (I'd
appreciate some more testing since this code is very sensitive
to the target).

Paolo

2004-05-25  Paolo Bonzini  <bonzini@gnu.org>

	* combine.c (gen_binary): Remove.
	(known_cond, simplify_shift_const
	find_split_point, combine_simplify_rtx,
	simplify_if_then_else, simplify_set,
	simplify_logical, expand_field_assignment,
	extract_left_shift, force_to_mode,
	if_then_else_cond, apply_distributive_law,
	simplify_and_const_int, simplify_shift_const,
	gen_lowpart_for_combine, simplify_comparison,
	reversed_comparison): Replace with
	simplify_gen_binary, simplify_gen_relational or
	distribute_and_simplify_rtx.
	(distribute_and_simplify_rtx): New function.
	* simplify-rtx.c (simplify_binary_operation):
	Use nonzero_bits to simplify ANDs where we are
	turning off bits already known to be off in OP0.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: combine-kill-gen-binary.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040526/54d386e5/attachment.ksh>


More information about the Gcc-patches mailing list