[gfortran] Convert frontend to buildN

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Wed Aug 25 16:06:00 GMT 2004


This lovely patch, whose writing and testing took much less time than writing
the ChangeLog, replaces all uses of build by appropriate calls to build1,
build2, etc. as these are now preferred. I also introduced macros build2_v and
build3_v which in turn call build2 and build3 with a void as type, and removed
build_v, as it's not used anymore after this patch.

Built and tested, diff attached.

- Tobi

2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>

	* trans.h (build2_v, build3_v): New macros.
	(build_v): Remove.
	* f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
	build.
	* trans-array.c (gfc_conv_descriptor_data,
	gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
	gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
	gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
	gfc_trans_allocate_temp_array,
	gfc_trans_array_constructor_subarray,
	gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
	gfc_trans_array_bound_check, gfc_conv_array_index_offset,
	gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
	gfc_conv_array_ref, gfc_trans_preloop_setup,
	gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
	gfc_conv_loop_setup, gfc_array_init_size,
	gfc_conv_array_initializer, gfc_trans_array_bounds,
	gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
	gfc_conv_expr_descriptor, gfc_conv_array_parameter,
	gfc_trans_deferred_array): Use buildN and buildN_v macros instead
	of build and build_v as appropriate.
	* trans-common.c (create_common): Same.
	* trans-decl.c (gfc_trans_auto_character_variable,
	gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
	* trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
	gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
	gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
	gfc_conv_expr_op, gfc_conv_function_call,
	gfc_trans_structure_assign): Same.
	* trans-intrinsic.c (build_fixbound_expr, build_round_expr,
	gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
	gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
	gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
	gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
	gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
	gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
	gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
	gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
	gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
	gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
	gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
	gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
	gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
	gfc_conv_intrinsic_iargc): Same.
	* trans-io.c (set_parameter_value, set_parameter_ref, set_string,
	set_flag, add_case, io_result, transfer_namelist_element,
	transfer_expr): Same.
	* trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
	gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
	gfc_trans_integer_select, gfc_trans_logical_select,
	gfc_trans_character_select, gfc_trans_forall_loop,
	gfc_trans_nested_forall_loop, gfc_do_allocate,
	generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
	compute_inner_temp_size, compute_overall_iter_number,
	allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
	gfc_trans_forall_1, gfc_evaluate_where_mask,
	gfc_trans_where_assign, gfc_trans_allocate): Same.
	* trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
	* trans.c (gfc_add_modify_expr, gfc_finish_block,
	gfc_build_array_ref, gfc_build_function_call,
	gfc_trans_runtime_check): Same.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_patch.gz
Type: application/gzip
Size: 18692 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040825/45c8a95a/attachment.gz>


More information about the Gcc-patches mailing list