1. 07 Sep, 2007 3 commits
    • tree-loop-linear.c: Include obstack.h. · b9dd78fa
      2007-09-06  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* tree-loop-linear.c: Include obstack.h.
      	(linear_transform_loops): New obstack lambda_obstack.
      	Initialize it, pass it to gcc_loopnest_to_lambda_loopnest,
      	lambda_loopnest_transform, lambda_loopnest_to_gcc_loopnest calls
      	and free afterwards.
      	* lambda.h (struct obstack): New forward declaration.
      	(lambda_linear_expression_new): New parameter of type struct
      	obstack *.
      	(lambda_loopnest_new): Likewise.
      	(lambda_loopnest_transform): Likewise.
      	(lambda_body_vector_new): Likewise.
      	(lambda_body_vector_compute_new): Likewise.
      	(gcc_loopnest_to_lambda_loopnest): Likewise.
      	(lambda_loopnest_to_gcc_loopnest): Likewise.
      	* lambda-code.c: Include obstack.h.
      	(lambda_lattice_new): New parameter lambda_obstack.  Use it for
      	allocation of ret.
      	(lambda_body_vector_new): Likewise.
      	(lambda_linear_expression_new): Likewise.
      	(lambda_lattice_new): Likewise.
      	(lambda_loopnest_new): Likewise.  Additionally use obstack to
      	allocate LN_LOOPS(ret).
      	(lambda_lattice_compute_base): New parameter lambda_obstack.  Pass
      	it to lambda_lattice_new.
      	(lambda_body_vector_compute_new): New parameter lambda_obstack.
      	Pass it to lambda_body_vector_new.
      	(lambda_lattice_compute_base): New paramater lambda_obstack.  Pass
      	it to lambda_lattice_new.
      	(compute_nest_using_fourier_motzkin): New parameter lambda_obstack.
      	Pass it to lambda_loopnest_new, lambda_linear_expression_new.
      	(lambda_compute_target_space): Likewise.
      	(lambda_compute_auxillary_space): New parameter lambda_obstack.
      	Pass it to lambda_lattice_compute_base and
      	compute_nest_using_fourieer_motzkin.
      	(lambda_loopnest_transform): New parameter lambda_obstack.  Pass
      	it to lambda_lattice_compute_base, lambda_lattice_auxillary_space
      	and lambda_lattice_compute_target_space.
      	(gcc_tree_to_linear_expression): Nex parameter lambda_obstack.
      	Pass it to lambda_linear_expression_new.
      	(gcc_loop_to_lambda_loop): New parameter lambda_obstack.  Pass it
      	to gcc_tree_to_linear_expression.
      	(gcc_loopnest_to_lambda_loopnest): New parameter lambda_obstack.
      	Pass it to gcc_loop_to_lambda_loop and lambda_loopnest_new.
      	(lambda_loopnest_to_gcc_loopnest): New parameter lambda_obstack.
      	Pass it to lambda_body_vector_new and
      	lambda_body_vector_compute_new.
      	* Makefile.in (tree-loop-linear.o): Add $(OBSTACK_H) dependency.
      	(lambda-code.o): Likewise.
      
      From-SVN: r128219
      Laurynas Biveinis committed
    • stdfix.h: New file. · 0f996086
      	* ginclude/stdfix.h: New file.
      	* Makefile.in (USER_H): Add $(srcdir)/ginclude/stdfix.h.
      	(convert.o): Add dependence on fixed-value.h.
      	* c-convert.c (convert): Support FIXED_POINT_TYPE.
      	* c-cppbuiltin.c (builtin_define_fixed_point_constants): New function
      	to define fixed-point constants.
      	(c_cpp_builtins): Define fixed-point constants.
      	* convert.c (fixed-value.h): New include.
      	(convert_to_real): Update comment to include fixed-point.
      	Support FIXED_POINT_TYPE.
      	(convert_to_integer): Update comment to include fixed-point.
      	Support FIXED_POINT_TYPE.
      	(convert_to_complex): Support FIXED_POINT_TYPE.
      	(convert_to_fixed): New function.
      	* convert.h (convert_to_fixed): Declare.
      	* genopinit.c: Add comment about $Q for only fixed-point modes.
      	(optabs): Add fract_optab, fractuns_optab, satfract_optab,
      	satfractuns_optab, add_optab, ssadd_optab, usadd_optab, sub_optab,
      	sssub_optab, ussub_optab, smul_optab, ssmul_optab, usmul_optab,
      	ssmadd_widen_optab, usmadd_widen_optab, ssdiv_optab, udiv_optab,
      	usdiv_optab, ssashl_optab, usashl_optab, neg_optab, ssneg_optab,
      	usneg_optab for fixed-point modes.
      	(gen_insn): Add force_fixed to track the $Q format for all fixed-point
      	modes.
      	* optabs.c (optab_for_tree_code): For *DIV_EXPR, LSHIFT_EXPR,
      	PLUS_EXPR, MINUS_EXPR, MULT_EXPR, NEGATE_EXPR, return signed or
      	unsigned saturation optabs, when type is saturating.
      	(shift_optab_p): Return true for SS_ASHIFT or US_ASHIFT.
      	(expand_fixed_convert): New function.
      	(gen_fixed_libfunc, gen_signed_fixed_libfunc,
      	gen_unsigned_fixed_libfunc, gen_int_fp_fixed_libfunc,
      	gen_int_fp_signed_fixed_libfunc, gen_int_fixed_libfunc,
      	gen_int_signed_fixed_libfunc, gen_int_unsigned_fixed_libfunc,
      	gen_fract_conv_libfunc, gen_fractuns_conv_libfunc,
      	gen_satfract_conv_libfunc, gen_satfractuns_conv_libfunc): New
      	functions.
      	(init_optabs): Initialize ssadd_optab, usadd_optab, sssub_optab,
      	ussub_optab, ssmul_optab, usmul_optab, ssmadd_widen_optab,
      	usmadd_widen_optab, ssmsub_widen_optab, usmsub_widen_optab,
      	ssdiv_optab, usdiv_optab, ssashl_optab, usashl_optab, ssneg_optab,
      	usneg_optab, fract_optab, fractuns_optab, satfract_optab,
      	satfractuns_optab.
      	Initialize fixed-point libraries, including add, ssadd, usadd, sub,
      	sssub, ussub, mul, ssmul, usmul, div, ssdiv, udiv, usdiv, ashl,
      	ssashl, usashl, ashr, lshr, neg, ssneg, usneg, cmp, fract, satfract,
      	fractuns, satfractuns.
      	* optabs.h (enum optab_index): Add OTI_ssadd, OTI_usadd, OTI_sssub,
      	OTI_ussub, OTI_ssmul, OTI_usmul, OTI_ssdiv, OTI_usdiv, OTI_ssneg,
      	OTI_usneg, OTI_ssashl, OTI_usashl, OTI_ssmadd_widen, OTI_usmadd_widen,
      	OTI_ssmsub_widen,  OTI_usmsub_widen.
      	(ssadd_optab, usadd_optab, sssub_optab, ussub_optab, ssmul_optab,
      	usmul_optab, ssdiv_optab, usdiv_optab, ssneg_optab, usneg_optab,
      	ssashl_optab, usashl_optab, ssmadd_widen_optab, usmadd_widen_optab,
      	umsub_widen_optab, usmsub_widen_optab): Define.
      	(enum convert_optab_index): Add COI_fract, COI_fractuns, COI_satfract,
      	COI_satfractuns.
      	(fract_optab, fractuns_optab, satfract_optab, satfractuns_optab):
      	Define.
      	(expand_fixed_convert): Declare.
      	* expr.c (convert_move): Support the move of fixed-point modes.
      	(emit_move_insn_1): Handle fixed-point mode to move via integer.
      	(categorize_ctor_elements_1): Handle FIXED_CST.
      	(count_type_elements): Handle FIXED_POINT_TYPE.
      	(expand_expr_real_1): For VECTOR_CST, check MODE_VECTOR_FRACT,
      	MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
      	Support FIXED_CST.
      	For PLUS_EXPR and MINUS_EXPR, support saturating and non-saturating
      	multiply and add/subtract for fixed-point types.
      	For MULT_EXPR, *DIV_EXPR, *SHIFT_EXPR, if the mode if a fixed-point
      	mode, we jump to binop directly.
      	Support FIXED_CONVERT_EXPR.
      	(do_store_flag): Check FIXED_CST to put a constant second.
      	(vector_mode_valid_p): Handle MODE_VECTOR_FRACT,
      	MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
      	(const_vector_from_tree): Support FIXED_CST.
      	* doc/extend.texi (Fixed-Point): New node.
      	* doc/md.texi (ssadd, usadd, sssub, ussub, ssmul, usmul, ssdiv, usdiv,
      	ssmadd, usmadd, ssmsub, usmsub, ssashl, usashl, ssneg, usneg, fract,
      	satfract, fractuns, satfractuns): Document them.
      
      From-SVN: r128218
      Chao-ying Fu committed
    • Daily bump. · 58cfe698
      From-SVN: r128215
      GCC Administrator committed
  2. 06 Sep, 2007 37 commits