[patch] Tidy up BIT_FIELD_REF handling code

Eric Botcazou ebotcazou@adacore.com
Wed Jul 25 16:33:00 GMT 2012


As documented in tree.def and checked in tree-cfg.c, the second and third 
operands of BIT_FIELD_REF are INTEGER_CSTs so there is no need to do fancy 
things on them.  The patch also removes the now unused build6 stuff and fixes a 
buglet in the folder.

Tested on x86_64-suse-linux, OK for the mainline?


2012-07-25  Eric Botcazou  <ebotcazou@adacore.com>

	* expr.c (expand_expr_real_1): Do not expand operand #1 and #2
	of BIT_FIELD_REF for ignored results.
	* fold-const.c (fold_ternary_loc) <BIT_FIELD_REF>: Check that the
	CONSTRUCTOR has vector type before using vector accessors on it.
	* gimplify.c (gimplify_compound_lval): Do not gimplify operand #1 and
	#2 of BIT_FIELD_REF.
	(gimplify_expr) <BIT_FIELD_REF>: Likewise.
	* tree-nested.c (convert_nonlocal_reference_op) <BIT_FIELD_REF>: Do
	not process operand #1 and #2.
	(convert_local_reference_op): Likewise.
	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Remove superfluous
	breaks throughout.
	<BIT_FIELD_REF>: Reuse operand #1 and #2 directly.
	* tree.c (stabilize_reference) <BIT_FIELD_REF>: Do not stabilize
	operand #1 and #2.
	(UPDATE_FLAGS): Do not consider operand #2 of BIT_FIELD_REF.
	(build6_stat): Delete.
	* tree.h (build6_stat, build6, build6_stat_loc, build6_loc): Likewise.
ada/
	* gcc-interface/utils2.c (gnat_stabilize_reference) <BIT_FIELD_REF>: Do
	not stabilize operand #1 and #2.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 10975 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120725/c17d37bb/attachment.bin>


More information about the Gcc-patches mailing list