Age | Commit message (Collapse) | Author | Files | Lines |
|
From-SVN: r151696
|
|
2009-09-13 Richard Guenther <rguenther@suse.de>
Rafael Avila de Espindola <espindola@google.com>
* langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
(LANG_HOOKS_EH_PERSONALITY): Likewise.
(LANG_HOOKS_INITIALIZER): Adjust.
(lhd_pass_through_t): Declare.
* langhooks.h (struct lang_hooks): Add eh_runtime_type and
eh_personality.
* langhooks.c (lhd_pass_through_t): New function.
* dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc,
dwarf2out_begin_prologue): Use personality from current_function_decl.
* expr.h (get_personality_function): Declare.
* expr.c (get_personality_function): New function.
(build_personality_function): Likewise.
* libfuncs.h (libfunc_index): Remove LTI_eh_personality.
(eh_personality_libfunc): Remove.
* optabs.c (build_libfunc_function): New function split out from ...
(init_one_libfunc): ... here.
* tree.h (DECL_FUNCTION_PERSONALITY): New.
(tree_function_decl): Add personality.
(lhd_gcc_personality): Declare.
(build_personality_function): Likewise.
* tree.c (gcc_eh_personality_decl): New.
(lhd_gcc_personality): New function.
* except.h (lang_eh_runtime_type): Remove.
(enum eh_personality_kind): New.
(build_personality_function): Declare.
(function_needs_eh_personality): Declare.
* except.c (lang_eh_runtime_type): Remove.
(function_needs_eh_personality): New function.
(add_type_for_runtime): Call lang_hooks.type_for_runtime instead.
(sjlj_emit_function_enter, output_function_exception_table):
Use personality from current_function_decl.
* tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY.
* tree-inline.c (tree_can_inline_p): Do not inline across different
EH personalities.
(expand_call_inline): Likewise. Adjust the callers EH personality.
(tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY.
* cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY.
* Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency.
(c-parser.o): Likewise
* c-tree.h (c_eh_initialized_p): Remove.
(c_maybe_initialize_eh): Likewise.
* c-decl.c (finish_decl): Don't call c_maybe_initialize_eh.
(finish_decl): Don't call c_maybe_initialize_eh.
(c_eh_initialized_p): Remove.
(c_maybe_initialize_eh): Likewise.
* c-parser.c (c_parser_omp_construct): Likewise.
(c_parse_file): Initialize exception handling.
objc/
* objc-act.c (objc_eh_runtime_type): Export.
(objc_init_exceptions): Remove. Move warning code ...
(objc_begin_try_stmt): ... here
(objc_build_throw_stmt): ... and here.
(objc_eh_personality_decl): New.
(objc_eh_personality): New function.
* objc-act.h (objc_eh_runtime_type): Declare.
(objc_eh_personality): Likewise.
* objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
(LANG_HOOKS_EH_PERSONALITY): Likewise.
cp/
* except.c (init_exception_processing): Do not set
lang_eh_runtime_type.
(choose_personality_routine): Do not set eh_personality_decl,
set pragma_java_exceptions.
* cp-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
(LANG_HOOKS_EH_PERSONALITY): Likewise.
(cp_eh_personality_decl): New.
(cp_eh_personality): Likewise.
* Make-lang.in (cp-lang.o): Add $(EXPR_H) and $(EXCEPT_H)
dependencies.
java/
* decl.c (do_nothing): Remove.
(java_init_decl_processing): Do not set lang_eh_runtime_type.
* Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
* lang.c (java_eh_personality): New.
(java_eh_personality_decl): Likewise.
(LANG_HOOKS_EH_PERSONALITY): Define.
ada/
* gcc-interface/misc.c (gnat_init_gcc_eh): Do not set
lang_eh_runtime_type.
(LANG_HOOKS_EH_PERSONALITY): Define.
(gnat_eh_personality_decl): New.
(gnat_eh_personality): Likewise.
* Make-lang.in (misc.o): Add gt-ada-misc.h dependency.
* config-lang.in (gtfiles): Add misc.c.
fortran/
* f95-lang.c (gfc_maybe_initialize_eh): Do not init
eh_personality_libfunc.
Co-Authored-By: Rafael Avila de Espindola <espindola@google.com>
From-SVN: r151676
|
|
2009-09-09 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/39779
* expr.c (convert_modes): Return when mode == oldmode after
CONST_INTs are processed.
testsuite/ChangeLog:
Revert:
2009-09-09 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/39779
* gcc.dg/pr39979.c: New test.
From-SVN: r151596
|
|
PR rtl-optimization/39779
* expr.c (convert_modes): Return when mode == oldmode after
CONST_INTs are processed.
testsuite/ChangeLog:
PR rtl-optimization/39779
* gcc.dg/pr39979.c: New test.
From-SVN: r151573
|
|
* expr.h (emit_storent_insn, expand_expr_real_1,
expand_expr_real_2): Declare.
* expr.c (emit_storent_insn, expand_expr_real_1,
expand_expr_real_2): Export.
(store_expr): Setting and evaluating dont_return_target is
useless.
(expand_expr_real_1, <case GOTO_EXPR, RETURN_EXPR, SWITCH_EXPR,
LABEL_EXPR and ASM_EXPR>): Move to gcc_unreachable.
* except.c (expand_resx_expr): Rename to ...
(expand_resx_stmt): ... this. Rewrite to take gimple statement.
* except.h (expand_resx_stmt): Declare.
* stmt.c: Add include gimple.h
(expand_asm_expr): Rename to ...
(expand_asm_stmt): ... this. Rewrite to take gimple statement.
(expand_case): Rewrite to take gimple statement.
* tree.h (expand_asm_stmt): Declare.
(expand_case): Change prototype.
* Makefile.in (stmt.o): Depend on gimple.h.
* builtins.c (expand_builtin_synchronize): Build gimple asm
statement, not an ASM_EXPR.
* cfgexpand.c (gimple_cond_pred_to_tree, set_expr_location_r,
gimple_to_tree, release_stmt_tree): Remove.
(expand_gimple_cond): Don't call gimple_cond_pred_to_tree or
ggc_free, but hold comparison code and operands separately.
Call jumpif_1 and jumpifnot_1 instead of jumpif and jumpifnot.
(expand_call_stmt, expand_gimple_stmt_1,
expand_gimple_stmt): New helpers.
(expand_gimple_tailcall): Don't call gimple_to_tree, expand_expr_stmt,
release_stmt_tree. Call expand_gimple_stmt instead.
(expand_gimple_basic_block): Ditto.
* calls.c (emit_call_1): Don't look at EH regions here, make
fntree parameter useless.
(expand_call): New local rettype for TREE_TYPE(exp), use it
throughout. Remove local p, use addr instead.
Don't look at EH regions here.
From-SVN: r151350
|
|
expression, split out from ...
* expr.c (expand_expr_real_2): New function taking exploded
unary or binary expression, split out from ...
(expand_expr_real_1): ... here. Move over all unary/binary
switch parts to above function, in particular these codes:
PAREN_EXPR, NOP_EXPR, CONVERT_EXPR, POINTER_PLUS_EXPR, PLUS_EXPR,
MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, FLOOR_DIV_EXPR, CEIL_DIV_EXPR,
ROUND_DIV_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, TRUNC_MOD_EXPR,
FLOOR_MOD_EXPR, CEIL_MOD_EXPR, ROUND_MOD_EXPR, FIXED_CONVERT_EXPR,
FIX_TRUNC_EXPR, FLOAT_EXPR, NEGATE_EXPR, ABS_EXPR, MAX_EXPR, MIN_EXPR,
BIT_NOT_EXPR, TRUTH_AND_EXPR, BIT_AND_EXPR, TRUTH_OR_EXPR,
BIT_IOR_EXPR, TRUTH_XOR_EXPR, BIT_XOR_EXPR, LROTATE_EXPR, RROTATE_EXPR,
LSHIFT_EXPR, RSHIFT_EXPR, LT_EXPR, LE_EXPR, GT_EXPR, GE_EXPR, EQ_EXPR,
NE_EXPR, UNORDERED_EXPR, ORDERED_EXPR, UNLT_EXPR, UNLE_EXPR, UNGT_EXPR,
UNGE_EXPR, UNEQ_EXPR, LTGT_EXPR, TRUTH_NOT_EXPR, COMPLEX_EXPR,
WIDEN_SUM_EXPR, REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR,
VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR, VEC_INTERLEAVE_HIGH_EXPR,
VEC_INTERLEAVE_LOW_EXPR, VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR,
VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR, VEC_UNPACK_FLOAT_HI_EXPR,
VEC_UNPACK_FLOAT_LO_EXPR, VEC_WIDEN_MULT_HI_EXPR,
VEC_WIDEN_MULT_LO_EXPR, VEC_PACK_TRUNC_EXPR, VEC_PACK_SAT_EXPR,
VEC_PACK_FIX_TRUNC_EXPR.
(<case PAREN_EXPR>): Call set_mem_attributes() with type, not the
full expression.
From-SVN: r151142
|
|
* expr.h (jumpifnot_1, jumpif_1, do_jump_1): Declare.
* dojump.c (do_jump_by_parts_greater): Take two operands instead of
full expression.
(do_jump_by_parts_equality, do_compare_and_jump): Ditto.
(jumpifnot_1, jumpif_1): New wrappers for do_jump_1.
(do_jump): Split out code for simple binary comparisons into ...
(do_jump_1): ... this, taking the individual operands and code.
Change callers to helper function above accordingly.
* expr.c (expand_expr_real_1): Use jumpifnot_1 for simple binary
comparisons.
From-SVN: r151080
|
|
exploded simple expression.
* expr.h (struct separate_ops, sepops): New type for passing
around an exploded simple expression.
* optabs.c (expand_widen_pattern_expr, expand_vec_shift_expr):
Use this structure instead of expression tree.
(get_vcond_icode, expand_vec_cond_expr_p): Don't take whole
expression, only its type.
(expand_vec_cond_expr): Take type and individual operands instead
of full expression.
* optabs.h (expand_widen_pattern_expr, expand_vec_cond_expr,
expand_vec_shift_expr): Change prototype accordingly.
* tree-vect-stmts.c (vectorizable_condition): Change call of
expand_vec_cond_expr_p to pass only type.
* expr.c (do_store_flags): Change prototype and implementation
to take an exploded expression.
(expand_expr_real_1): New local ops initialized with details
of the full expression. Use it instead of full
expression in calls to do_store_flags, expand_vec_cond_expr,
expand_widen_pattern_expr and expand_vec_shift_expr.
From-SVN: r151079
|
|
* expr.c (expand_expr_real_1): New local treeop0, treeop1,
treeop2 initialized with first three operands of the full expression.
Substitute all TREE_OPERAND (exp, [012]) calls with them.
From-SVN: r151078
|
|
PR middle-end/41123
* expr.c (expand_expr_real_1) <normal_inner_ref>: Handle all kinds
of CONCAT, not just bitpos 0 bitsize size of the whole CONCAT.
* gcc.dg/pr41123.c: New test.
From-SVN: r150946
|
|
2009-04-17 Paolo Bonzini <bonzini@gnu.org>
* expr.c (store_constructor): Use promote_decl_mode. Remove
now write-only variable unsignedp.
(expand_expr_real_1): Use promote_decl_mode.
* expr.h (promote_function_mode, promote_decl_mode): New.
(promote_mode): Remove last argument.
* function.c (assign_temp): Drop last argument of promote_mode.
(assign_parm_find_data_types): Use promote_function_mode.
(assign_parm_setup_reg): Likewise.
(expand_function_end): Use promote_function_mode.
* calls.c (initialize_argument_information): Use promote_function_mode.
(precompute_arguments): Use promote_mode instead of checking if
only PROMOTE_FUNCTION_MODE is defined.
(expand_call): When making sibcall decisions, use promote_function_mode.
Below, remove an if for targetm.calls.promote_function_return and
and use promote_function_mode.
(emit_library_call_value_1): Use promote_function_mode, fix bug
where promote_mode was passed FOR_CALL == 0 for a return value in an
assertion.
* cfgexpand.c (expand_one_register_var): Use promote_decl_mode.
* explow.c (promote_function_mode, promote_decl_mode): New.
(promote_mode): Keep only the FOR_CALL == 0 case.
* combine.c (setup_incoming_promotion): Remove test of
promote_function_args. Use promote_function_mode.
* stmt.c (expand_value_return): Use promote_decl_mode.
(expand_decl): Use promote_decl_mode.
* expr.c (store_constructor): Use promote_decl_mode. Remove
now write-only variable unsignedp.
(expand_expr_real_1): Use promote_decl_mode.
* expr.h (promote_function_mode, promote_decl_mode): New.
(promote_mode): Remove last argument.
* function.c (assign_temp): Drop last argument of promote_mode.
(assign_parm_find_data_types): Use promote_function_mode.
(assign_parm_setup_reg): Likewise.
(expand_function_end): Use promote_function_mode.
* calls.c (initialize_argument_information): Use promote_function_mode.
(precompute_arguments): Use promote_mode instead of checking if
only PROMOTE_FUNCTION_MODE is defined.
(expand_call): When making sibcall decisions, use promote_function_mode.
Below, remove an if for targetm.calls.promote_function_return and
and use promote_function_mode.
(emit_library_call_value_1): Use promote_function_mode, fix bug
where promote_mode was passed FOR_CALL == 0 for a return value in an
assertion.
* cfgexpand.c (expand_one_register_var): Use promote_decl_mode.
* explow.c (promote_function_mode, promote_decl_mode): New.
(promote_mode): Keep only the FOR_CALL == 0 case.
* combine.c (setup_incoming_promotion): Remove test of
promote_function_args. Use promote_function_mode.
* stmt.c (expand_value_return): Use promote_decl_mode.
(expand_decl): Use promote_decl_mode.
* explow.c (promote_function_mode): Just call the target hook.
* targhooks.c (default_promote_function_mode,
default_promote_function_mode_always_promote): New.
* targhooks.h (default_promote_function_mode,
default_promote_function_mode_always_promote): Declare.
* target.h (promote_function_args, promote_function_return): Remove.
(promote_function_mode): New.
* target-def.h (TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN): Remove.
(TARGET_PROMOTE_FUNCTION_MODE): New.
(TARGET_CALLS): Adjust.
* system.h (TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN, PROMOTE_FUNCTION_MODE): Poison.
* config/s390/s390.h (PROMOTE_FUNCTION_MODE): Move...
* config/s390/s390.c (s390_promote_function_mode): ... here,
with pointer handling.
(TARGET_PROMOTE_FUNCTION_MODE): Define.
(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.
* config/sparc/sparc.h (PROMOTE_FUNCTION_MODE): Move...
* config/sparc/sparc.c (sparc_promote_function_mode): ... here,
with pointer handling.
(TARGET_PROMOTE_FUNCTION_MODE): Define.
(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.
* config/sh/sh-protos.h (sh_promote_function_mode): New.
* config/sh/sh.c (sh_promote_function_mode): New.
(TARGET_PROMOTE_FUNCTION_MODE): Define.
(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.
* config/cris/cris.h (PROMOTE_FUNCTION_MODE): Move...
* config/cris/cris.c (cris_promote_function_mode): ... here.
(TARGET_PROMOTE_FUNCTION_MODE): Define.
(TARGET_PROMOTE_FUNCTION_ARGS): Remove.
* config/mmix/mmix.h (PROMOTE_FUNCTION_MODE): Move...
* config/mmix/mmix.c (mmix_promote_function_mode): ... here.
(TARGET_PROMOTE_FUNCTION_MODE): Define.
(TARGET_PROMOTE_FUNCTION_ARGS): Remove.
* config/arm/arm.h (PROMOTE_FUNCTION_MODE): Move...
* config/arm/arm.c (arm_promote_function_mode): ... here, without complex
type handling.
(TARGET_PROMOTE_FUNCTION_MODE): Define.
(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.
* config/pa/pa.c (pa_promote_function_mode): New.
(TARGET_PROMOTE_FUNCTION_MODE): Define.
(TARGET_PROMOTE_FUNCTION_RETURN): Remove.
* config/alpha/alpha.c (TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN): Remove.
(TARGET_PROMOTE_FUNCTION_MODE): Define equivalently.
* config/xtensa/xtensa.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/iq2000/iq2000.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/picochip/picochip.c: Likewise.
* config/arc/arc.c: Likewise.
* config/mcore/mcore.c: Likewise.
* config/score/score.c: Likewise.
* config/mips/mips.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/ia64/ia64.c: Likewise (disabled though).
* config/frv/frv.h: Remove pointless remark.
* doc/tm.texi (PROMOTE_FUNCTION_MODE,
TARGET_PROMOTE_FUNCTION_ARGS,
TARGET_PROMOTE_FUNCTION_RETURN): Consolidate into...
(TARGET_PROMOTE_FUNCTION_MODE): ... this.
From-SVN: r150336
|
|
2009-07-17 Aldy Hernandez <aldyh@redhat.com>
Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 40435
* tree-complex.c, tree-loop-distribution.c,
tree.c, tree.h, builtins.c, fold-const.c, omp-low.c,
cgraphunit.c, tree-ssa-ccp.c, tree-ssa-dom.c,
gimple-low.c, expr.c, tree-ssa-ifcombine.c, c-decl.c,
stor-layout.c, tree-if-conv.c, c-typeck.c,
gimplify.c, calls.c, tree-sra.c, tree-mudflap.c,
tree-ssa-copy.c, tree-ssa-forwprop.c, c-convert.c, c-omp.c,
varasm.c, tree-inline.c, c-common.c,
c-common.h, gimple.c, tree-switch-conversion.c, gimple.h,
tree-cfg.c, c-parser.c, convert.c: Add location
argument to fold_{unary,binary,ternary}, fold_build[123],
build_call_expr, build_size_arg, build_fold_addr_expr,
build_call_array, non_lvalue, size_diffop,
fold_build1_initializer, fold_build2_initializer,
fold_build3_initializer, fold_build_call_array,
fold_build_call_array_initializer, fold_single_bit_test,
omit_one_operand, omit_two_operands, invert_truthvalue,
fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
combine_comparisons, fold_builtin_*, fold_call_expr,
build_range_check, maybe_fold_offset_to_address, round_up,
round_down.
objc/
* objc-act.c: Add location argument to all calls to
build_fold_addr_expr.
testsuite/
* gcc.dg/pr36902.c: Add column info.
* g++.dg/gcov/gcov-2.C: Change count for definition.
cp/
* typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c,
tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c,
call.c, cvt.c, mangle.c: Add location argument to
fold_{unary,binary,ternary}, fold_build[123], build_call_expr,
build_size_arg, build_fold_addr_expr, build_call_array,
non_lvalue, size_diffop, fold_build1_initializer,
fold_build2_initializer, fold_build3_initializer,
fold_build_call_array, fold_build_call_array_initializer,
fold_single_bit_test, omit_one_operand, omit_two_operands,
invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref,
fold_indirect_ref, combine_comparisons, fold_builtin_*,
fold_call_expr, build_range_check, maybe_fold_offset_to_address,
round_up, round_down.
fortran/
* trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c,
trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location
argument to fold_{unary,binary,ternary}, fold_build[123],
build_call_expr, build_size_arg, build_fold_addr_expr,
build_call_array, non_lvalue, size_diffop,
fold_build1_initializer, fold_build2_initializer,
fold_build3_initializer, fold_build_call_array,
fold_build_call_array_initializer, fold_single_bit_test,
omit_one_operand, omit_two_operands, invert_truthvalue,
fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
combine_comparisons, fold_builtin_*, fold_call_expr,
build_range_check, maybe_fold_offset_to_address, round_up,
round_down.
Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>
From-SVN: r149722
|
|
do_store_flag returns NULL.
2009-07-01 Paolo Bonzini <bonzini@gnu.org>
* expr.c (expand_expr_real_1): Reinstate fallthrough to
TRUTH_ANDIF_EXPR if do_store_flag returns NULL.
From-SVN: r149136
|
|
2009-06-28 Paolo Bonzini <bonzini@gnu.org>
* expr.c (expand_expr_real_1): Just use do_store_flag.
(do_store_flag): Drop support for TRUTH_NOT_EXPR. Use
emit_store_flag_force.
* expmed.c (emit_store_flag_force): Copy here trick
previously in expand_expr_real_1. Try reversing the comparison.
(emit_store_flag_1): Work if target is NULL.
(emit_store_flag): Work if target is NULL, using the result mode
from the comparison. Use split_comparison, restructure final part
to simplify conditionals.
From-SVN: r149032
|
|
2009-06-22 Shujing Zhao <pearly.zhao@oracle.com>
* alias.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P, CALL_P, NOTE_P and
JUMP_TABLE_DATA_P predicates where applicable.
* auto-inc-dec.c: Ditto.
* builtins.c: Ditto.
* caller-save.c: Ditto.
* calls.c: Ditto.
* cfgcleanup.c: Ditto.
* cfglayout.c: Ditto.
* cfgrtl.c: Ditto.
* combine.c: Ditto.
* combine-stack-adj.c: Ditto.
* cse.c: Ditto.
* cselib.c: Ditto.
* dbxout.c: Ditto.
* df-scan.c: Ditto.
* dse.c: Ditto.
* dwarf2asm.c: Ditto.
* dwarf2out.c: Ditto.
* emit-rtl.c: Ditto.
* except.c: Ditto.
* explow.c: Ditto.
* expmed.c: Ditto.
* expr.c: Ditto.
* final.c: Ditto.
* function.c: Ditto.
* fwprop.c: Ditto.
* gcse.c: Ditto.
* genpreds.c: Ditto.
* genrecog.c: Ditto.
* ifcvt.c: Ditto.
* ira-costs.c: Ditto.
* ira-lives.c: Ditto.
* jump.c: Ditto.
* loop-iv.c: Ditto.
* lower-subreg.c: Ditto.
* modulo-sched.c: Ditto.
* optabs.c: Ditto.
* postreload.c: Ditto.
* print-rtl.c: Ditto.
* recog.c: Ditto.
* reginfo.c: Ditto.
* regmove.c: Ditto.
* reload1.c: Ditto.
* reload.c: Ditto.
* reorg.c: Ditto.
* rtlanal.c: Ditto.
* rtl.c: Ditto.
* sched-vis.c: Ditto.
* sdbout.c: Ditto.
* sel-sched-ir.c: Ditto.
* simplify-rtx.c: Ditto.
* targhooks.c: Ditto.
* var-tracking.c: Ditto.
* vmsdbgout.c: Ditto.
From-SVN: r148786
|
|
* expr.c (struct move_by_pieces_d): Rename from move_by_pieces.
Change all uses.
(struct store_by_pieces_d): Rename from store_by_pieces. Change
call uses.
From-SVN: r148633
|
|
2009-06-17 Steve Ellcey <sje@cup.hp.com>
* expr.c (expand_assignment): Change complex type check.
From-SVN: r148614
|
|
PR middle-end/40446
* expr.c (expand_expr_real_1) <case VIEW_CONVERT_EXPR>: Don't
use gen_lowpart if op0 has complex mode.
* g++.dg/other/pr40446.C: New test.
From-SVN: r148533
|
|
gcc/java/
* java-gimplify.c (java_gimplify_block): New argument to
build_empty_stmt.
* expr.c (force_evaluation_order): Same.
* typeck.c: Add location to build_decl or PUSH_FIELD calls.
* class.c: Same.
* decl.c: Same.
* jcf-parse.c: Same.
* constants.c: Same.
* resource.c: Same.
* except.c: Same.
* builtins.c: Same.
* expr.c: Same.
* java-tree.h (PUSH_FIELD): Add location field.
gcc/objc/
* objc-act.c (finish_var_decl): Pass location to finish_decl.
(objc_get_parm_info): Same.
(get_super_receiver): Same.
* objc-act.c (objc_build_component_ref): Pass location to
build_compound_ref.
(build_module_initializer_routine): Pass location to
c_end_compound_stmt.
(objc_generate_static_init_call): Pass location to build_stmt.
(build_typed_selector_reference): New location argument.
(build_selector_reference): Same.
(objc_substitute_decl): Pass location to build_array_ref.
(next_sjlj_build_try_catch_finally): Pass location to build_stmt.
(objc_begin_catch_clause): Same.
(objc_finish_try_stmt): Same.
(objc_finish_catch_clause): Pass location to c_end_compound_stmt.
(objc_build_throw_stmt): New argument.
(generate_shared_structures): Pass location to build_c_cast.
(objc_build_message_expr): Use local location.
(objc_finish_message_expr): Use input_location.
(build_objc_method_call): New argument.
(objc_build_selector_expr): Same.
(get_super_receiver): Pass location to build_c_cast,
build_modify_expr, build_compound_expr.
* objc-act.c: Add location to all calls to start_struct, build_decl,
finish_struct.
gcc/
* tree-pretty-print.c (dump_generic_node): Dump column numbers.
* gimple-pretty-print.c (dump_gimple_stmt): Same.
* gimplify.c (gimplify_modify_expr): Set location for GIMPLE_ASSIGNs
created.
* c-parser.c (c_parser_binary_expression): Use current column while
building binary operations.
* common.opt (fshow-column): Enable by default.
* tree-vrp.c (check_array_ref): Use warning_at.
(check_array_bounds): Use location from call back if expr has no
location.
* tree.h: Add location argument to maybe_fold_*.
* tree-ssa-ccp.c (ccp_fold): Pass location to maybe_fold_*.
(maybe_fold_offset_to_array_ref): Add location argument and use it.
(maybe_fold_offset_to_component_ref): Same.
(maybe_fold_offset_to_reference): Same.
(maybe_fold_offset_to_address): Same.
(maybe_fold_stmt_indirect): Same.
(maybe_fold_stmt_addition): Same.
(fold_stmt_r): Pass location to maybe_fold_*.
(fold_gimple_assign): Same.
* c-tree.h: Add location argument to finish_decl,
default_function_array_conversion, store_init_value.
* c-decl.c (define_label): Use error_at.
(c_make_fname_decl): Pass location to finish_decl.
(finish_decl): New location argument.
(build_compound_literal): Pass location to store_init_value.
(grokdeclarator): Pass location to finish_decl.
(grokfield): Same.
* c-typeck.c (array_to_pointer_conversion): New location argument.
(function_to_pointer_conversion): Same.
(default_function_array_conversion): Same.
(parser_build_unary_op): Pass location to overflow_warning.
(parser_build_binary_op): Same. Use warning_at.
(build_unary_op): Pass location to array_to_pointer_conversion.
(build_c_cast): Pass location to digest_init.
(build_modify_expr): New location argument.
(convert_for_assignment): Same.
(store_init_value): Same.
(digest_init): Same.
(output_init_element): Pass location to digest_init and
array_to_pointer_conversion.
(c_finish_return): Pass location to convert_for_assignment.
* gimplify.c (gimplify_conversion): Pass location to
maybe_fold_offset_to_address.
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Pass location
to maybe_fold_stmt_addition.
* c-omp.c (c_finish_omp_atomic): Pass new location to
build_modify_expr.
(c_finish_omp_for): Same.
* c-common.c (overflow_warning): New argument.
* c-common.h: New argument to build_modify_expr, overflow_warning.
* c-parser.c (c_parser_declaration_or_fndef): Pass location to
finish_decl.
(c_parser_initializer): Pass location to
default_function_array_conversion.
(c_parser_initelt): Same.
(c_parser_initval): Same.
(c_parser_asm_operands): Same.
(c_parser_expr_no_commas): Same. Pass location to build_modify_expr.
(c_parser_conditional_expression): Same.
(c_parser_binary_expression): Add location info to stack. Use it.
(c_parser_unary_expression): Pass location to
default_function_array_conversion, parser_build_unary_op,
build_indirect_ref, c_parser_postfix_expression_after_primary.
(c_parser_postfix_expression_after_primary): New location argument.
Use it.
(c_parser_expression_conv): Pass location to
default_function_array_conversion.
(c_parser_expr_list): Same.
(c_parser_omp_atomic): Same.
(c_parser_omp_for_loop): Same.
* c-tree.h: (struct c_declarator): Add comment to id_loc.
(build_array_declarator): New argument.
* c-decl.c (build_array_declarator): Add location argument.
(grokdeclarator): Set id_loc for cdk_array.
* c-parser.c (c_parser_direct_declarator_inner): Pass location to
build_array_declarator.
* tree.c (build_omp_clause): Add location argument.
* tree.h (OMP_CLAUSE_HAS_LOCATION): New macro.
(OMP_CLAUSE_LOCATION): New macro.
(struct tree_omp_clause): Add location field.
(build_omp_clause): Add argument.
* testsuite/gcc.dg/gomp/for-1.c: Fix column.
* cp/pt.c (tsubst_omp_for_iterator): Pass location to
build_omp_clause.
* cp/parser.c (cp_parser_omp_var_list_no_open): Same.
(cp_parser_omp_clause_collapse): Same.
(cp_parser_omp_clause_default): Same.
(cp_parser_omp_clause_if): Same.
(cp_parser_omp_clause_nowait): Same.
(cp_parser_omp_clause_num_threads): Same.
(cp_parser_omp_clause_ordered): Same.
(cp_parser_omp_clause_schedule): Same.
(cp_parser_omp_clause_untied): Same.
(cp_parser_omp_for_loop): Same.
(cp_parser_omp_parallel): Pass location to c_split_parallel_clauses.
* c-tree.h (c_start_case): Add location argument.
(c_process_expr_stmt): Same.
(c_finish_goto_*): Same.
* tree-parloops.c (initialize_reductions): Pass location to
build_omp_clause.
(create_parallel_loop): Same.
* fortran/trans-openmp.c (gfc_trans_omp_variable_list): Same.
(gfc_trans_omp_reduction_list): Same.
(gfc_trans_omp_clauses): Same.
(gfc_trans_omp_do): Same.
* c-typeck.c (c_finish_goto_label): Same.
(c_finish_goto_ptr): New location argument.
(c_start_case): Same.
(emit_side_effect_warnings): Same.
(c_process_expr_stmt): Same.
(c_finish_stmt_expr): Same.
(c_finish_omp_clauses): Use error_at instead of error.
* gimplify.c (gimplify_adjust_omp_clauses_1): Pass location to
build_omp_clause.
* c-omp.c (c_split_parallel_clauses): New location argument.
* tree-nested.c (convert_nonlocal_reference_stmt): Pass location
to build_omp_clause.
(convert_local_reference_stmt): Same.
(convert_gimple_call): Same.
* c-common.h (c_split_parallel_clauses): New argument.
* c-parser.c (c_parser_statement_after_labels): Pass location to
c_finish_goto_label.
(c_parser_switch_statement): Pass location to c_start_case.
(c_parser_for_statement): Pass location to c_finish_expr_stmt,
and c_process_expr_stmt.
(c_parser_omp_variable_list): Add location argument.
(c_parser_omp_clause_collapse): Pass location to
build_omp_clause.
(c_parser_omp_clause_default): Same.
(c_parser_omp_clause_if): Same.
(c_parser_omp_clause_num_threads): Same.
(-c_parser_omp_clause_ordered): Same.
(c_parser_omp_clause_reduction): Pass location to
c_parser_omp_variable_list.
(c_parser_omp_clause_schedule): Pass location to build_omp_clause.
(c_parser_omp_clause_untied): Same.
(c_parser_omp_for_loop): Pass location to c_process_expr_stmt.
(c_parser_omp_parallel): Pass location to
c_split_parallel_clauses.
* c-tree.h (check_for_loop_decls, undeclared_variable,
build_component_ref, build_array_ref, build_external_ref,
c_expr_sizeof_expr, c_expr_sizeof_type, parser_build_unary_op,
build_conditional_expr, build_compound_expr, c_cast_expr,
build_c_cast, build_asm_expr, c_end_compound_stmt, c_finish_stmt_expr,
c_finish_return, c_finish_omp_parallel, c_finish_omp_task): New
argument.
* c-semantics.c (build_stmt): Same.
(build_case_label): Same.
* c-decl.c (c_finish_incomplete_decl): Pass location on down.
(undeclared_variable): New argument.
(make_label): Same.
(lookup_label): Pass location on down.
(define_label): Same.
(finish_decl): Same.
(build_compound_literal): Same.
(finish_struct): Same.
(finish_function): Do not set location here.
(check_for_loop_decls): New argument.
* tree.c (save_expr): Set location.
(build_empty_stmt): New argument.
* tree.h (build_empty_stmt): New argument to build_empty_stmt.
(CAN_HAVE_LOCATION_P): Make sure we have a non empty node.
* builtins.c (gimplify_va_arg_expr): Use locations.
(expand_builtin_sync_operation): Same.
* c-typeck.c (build_component_ref): New argument.
(build_array_ref): Same.
(build_external_ref): Same.
(c_expr_sizeof_expr): Same.
(c_expr_sizeof_type): Same.
(parser_build_unary_op): Same.
(build_conditional_expr): Same.
(build_compound_expr): Pass location on down.
(build_compound_expr): New argument.
(build_c_cast): Same.
(c_cast_expr): Same.
(build_asm_expr): Same.
(c_finish_return): Same.
(c_process_expr_stmt): Pass location on down.
(c_finish_stmt_expr): New argument.
(push_clenaup): Same.
(c_finish_omp_parallel): Same.
(c_finish_omp_task): Same.
* gimplify.c (gimplify_call_expr): Pass location on down.
* c-omp.c (c_finish_omp_master): New argument.
(c_finish_omp_critical): Same.
(c_finish_omp_ordered): Same.
(c_finish_omp_barrier): Same.
(-c_finish_omp_taskwait): Same.
(c_finish_omp_atomic): Same.
(c_finish_omp_flush): Same.
* tree-inline.c (copy_tree_body_r): Pass location on down.
(inline_forbidden_p): Remove use of input_location.
* c-gimplify.c (c_build_bind_expr): New argument.
* c-common.c (c_common_truthvalue_conversion): Pass location on down.
(c_sizeof_or_alignof_type): New argument.
(c_alignof_expr): Same.
(build_va_arg): Same.
(c_add_case_label): Same.
* c-common.h (c_sizeof_or_alignof_type, c_alignof_expr,
c_sizeof, c_alignof, build_va_arg, build_stmt, build_case_label,
c_build_bind_expr, objc_build_selector_expr, objc_build_throw_stmt,
c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered,
c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush,
c_finish_omp_taskwait, c_finish_omp_for, c_split_parallel_clauses):
New argument.
* stub-objc.c (objc_build_selector_expr): Same.
(objc_build_throw_stmt): Same.
* c-parser.c (c_parser_declaration_or_fndef): Pass location on down.
(c_parser_initelt): Same.
(c_parser_compound_statement): Same.
(c_parser_compound_statement_nostart): Same.
(c_parser_label): Same.
(c_parser_statement_after_labels): Same.
(c_parser_if_body): Same.
(c_parser_else_body): Same.
(c_parser_if_statement): Same.
(c_parser_switch_statement): Same.
(c_parser_while_statement): Same.
(c_parser_do_statement): Same.
(c_parser_for_statement): Same.
(c_parser_asm_statement): Same.
(c_parser_conditional_expression): Same.
(c_parser_binary_expression): Same.
(c_parser_cast_expression): Same.
(c_parser_unary_expression): Same.
(c_parser_sizeof_expression): Same.
(c_parser_alignof_expression): Same.
(c_parser_postfix_expression): Same.
(c_parser_expression): Same.
(c_parser_objc_receiver): Same.
(c_parser_omp_variable_list): Same.
(c_parser_omp_structured_block): Same.
(c_parser_omp_atomic): New argument.
(c_parser_omp_barrier): Same.
(c_parser_omp_critical): Same.
(c_parser_omp_flush): Pass location on down.
(c_parser_omp_for_loop): New argument.
(c_parser_omp_for): Same.
(c_parser_omp_master): Same.
(c_parser_omp_ordered): Same.
(c_parser_omp_sections_scope): Same.
(c_parser_omp_sections): Same.
(c_parser_omp_parallel): Same.
(c_parser_omp_single): Same.
(c_parser_omp_task): Same.
(c_parser_omp_taskwait): Pass location on down.
(c_parser_omp_construct): Same.
(c_parser_omp_threadprivate): Same.
* dwarf2asm.c, targhooks.c, optabs.c, tree.c, tree.h, target.h,
builtins.c, omp-low.c, cgraphunit.c, tree-call-cdce.c,
tree-ssa-alias.c, gimple-low.c, c-tree.h, expr.c, tree-parloops.c,
c-decl.c, tree-eh.c, langhooks.c, function.c, stor-layout.c,
c-typeck.c, gimplify.c, c-pragma.c, expmed.c, except.c, coverage.c,
emit-rtl.c, cfgexpand.c, tree-mudflap.c, varasm.c, tree-nested.c,
rtl.h, tree-inline.c, tree-profile.c, c-common.c, c-common.h,
tree-switch-conversion.c, tree-cfg.c, ipa-struct-reorg.c, c-parser.c,
config/i386/i386.c, stmt.c:
Add location argument to the following function definitions and/or
function calls: build_decl, objcp_start_struct, objcp_finish_struct,
start_struct, finish_struct, PUSH_FIELD, create_artificial_label,
cp_make_fname_decl, pushtag, implicitly_declare, c_make_fname_decl,
build_compound_literal, parser_xref_tag, resolve_overloaded_builtin,
do_case, c_finish_bc_stmt, build_compound_literal,
build_function_call.
* c-decl.c (build_compound_literal): Add location argument.
Make all diagnostic calls use location.
(start_struct): Same.
(finish_struct): Same.
(start_enum): Same.
(build_enumerator): Same.
(start_function): Same.
(grokdeclarator): Make all diagnostic calls use location.
(store_parm_decls_oldstyle): Same.
* c-typeck.c (build_function_call): Add location argument.
Make all diagnostic calls use location.
(do_case): Same.
(c_finish_bc_stmt): Same.
* tree-nested.c (get_trampoline_type): Add argument.
Pass location to build_decl.
(lookup_tramp_for_decl): Pass location to get_trampoline_type.
* rtl.h (RTL_LOCATION): New.
* c-common.c (c_add_case_label): Add location argument.
Make all diagnostic calls use location.
* c-common.h: Add location argument to make_fname_decl, do_case,
c_add_case_label, build_function_call, resolve_overloaded_builtin.
* c-parser.c (c_parser_enum_specifier): Rename ident_loc to enum_loc.
Set it appropriately for every case. Pass enum_loc to start_enum
call. Pass value_loc first to build_enumerator. Pass enum_loc to
parser_xref_tag.
(c_parser_struct_or_union_specifier): Save location. Use it for
start_struct, finish_struct, and parser_xref_tag.
gcc/testsuite/
* gcc.dg/old-style-prom-3.c: Add column info.
* gcc.dg/overflow-warn-1.c
* gcc.dg/gomp/pr27415.c
* gcc.dg/gomp/for-1.c: Same.
* gcc.dg/enum-compat-1.c: Same.
* gcc.dg/c99-tag-3.c: Same.
* gcc.dg/Wredundant-decls-2.c: Same.
* gcc.dg/func-ptr-conv-1.c: Same.
* gcc.dg/asm-wide-1.c: Same.
* gcc.dg/nofixed-point-2.c: Same.
* gcc.dg/cpp/line3.c: Same.
* gcc.dg/array-10.c: Same.
* gcc.dg/c99-vla-jump-1.c: Same.
* gcc.dg/pr20368-1.c: Same.
* gcc.dg/Wshadow-3.c: Same.
* gcc.dg/c90-const-expr-8.c: Same.
* gcc.dg/label-decl-2.c: Same.
* gcc.dg/dremf-type-compat-2.c: Same.
* gcc.dg/c90-const-expr-5.c: Same.
* gcc.dg/builtins-30.c: Same.
* gcc.dg/Warray-bounds.c: Same.
* gcc.dg/Wcxx-compat-2.c: Same.
* gcc.dg/tree-ssa/col-1.c: Same.
* gcc.dg/old-style-prom-2.c: Same.
* gcc.dg/cast-function-1.c: Same.
* gcc.dg/pr15698-1.c: Same.
* gcc.dg/dremf-type-compat-3.c: Same.
* gcc.dg/vla-8.c: Same.
* gcc.dg/gomp/pr27415.c: Move firstprivate diagnostics to correct
line.
* gcc.dg/label-decl-2.c: Move label diagnostic to correct line.
* gcc.dg/old-style-prom-3.c: Check for error on the correct line.
* gcc.dg/enum-compat-1.c: Same.
* gcc.dg/dremf-type-compat-2.c: Same.
* gcc.dg/old-style-prom-2.c: Same.
* gcc.dg/pr15698-1.c: Same.
* gcc.dg/pr20368-1.c: Same.
* gcc.dg/dremf-type-compat-3.c: Same.
* gcc.dg/builtins-30.c: Same. Test for columns.
gcc/objcp/
* objcp-decl.h (c_end_compound_stmt): New argument.
* objcp-decl.c (objcp_start_struct): Add argument.
(objcp_finish_struct): Same.
gcc/cp/
* typeck.c (cp_build_binary_op): Pass location to overflow_warning.
(build_modify_expr): New arg.
* semantics.c (finish_unary_op_expr): Pass location to
overflow_warning.
(handle_omp_for_class_iterator): Pass location to build_modify_expr.
* typeck.c (cxx_sizeof_or_alignof_type): Pass location to
c_sizeof_or_alignof_type.
(build_array_ref): New argument.
(build_compound_expr): Same.
(build_const_cast): Same.
(build_ptrmemfunc): Pass location to build_c_cast.
* init.c (avoid_placement_new_aliasing): Pass location to
build_stmt.
(build_vec_delete_1): Pass location to cp_build_modify_expr,
build_compound_expr.
* class.c (build_vtbl_ref_1): Pass location to build_array_ref.
* decl.c (poplevel): Pass location to c_build_bind_expr.
(finish_case_label): Pass location to build_case_label.
(finish_constructor_body): Same.
(finish_destructor_body): Pass location to build_stmt.
(cxx_maybe_build_cleanup): Same, but to build_compound_expr.
* call.c (build_new_op): Pass location to build_array_ref.
(build_x_va_arg): Pass location to build_va_arg.
* except.c (expand_end_catch_block): Pass location to
build_stmt.
* cp-tree.h (build_array_ref): New argument.
(build_compound_expr): Same.
(build_c_cast): Same.
* cp-gimplify.c (gimplify_if_stmt): Pass location on down.
(gimplify_switch_stmt): Same.
* typeck2.c (split_nonconstant_init_1): Same.
* pt.c (tsubst_copy): Same.
* semantics.c (add_decl_expr): Same.
(do_poplevel): Same.
(push_cleanup): Same.
(finish_goto_stmt): Same.
(finish_expr_stmt): Same.
(begin_if_stmt): Same.
(begin_while_stmt): Same.
(begin_do_stmt): Same.
(finish_return_stmt): Same.
(begin_for_stmt): Same.
(finish_break_stmt): Same.
(finish_continue_stmt): Same.
(begin_switch_stmt): Same.
(begin_try_block): Same.
(begin_handler): Same.
(finish_asm_stmt): Same.
(finish_label_stmt): Same.
(finish_stmt_expr_expr): Same.
(finalize_nrv_r): Same.
(finish_omp_atomic): Same.
* name-lookup.c (do_using_directive): Same.
* decl2.c (grok_array_decl): Same.
* parser.c (cp_parser_cast_expression): Same.
(cp_parser_selection_statement): Same.
(cp_parser_implicitly_scoped_statement): Same.
(cp_parser_objc_selector_expression): Same.
(cp_parser_objc_synchronized_statement): Same.
(cp_parser_objc_throw_statement): Same.
(cp_parser_omp_critical): Same.
(cp_parser_omp_master): Same.
* typeck.c (build_function_call): Add location argument.
* init.c: Add location argument to all build_decl calls.
* class.c: Same.
* method.c: Same.
* rtti.c: Same.
* tree.c: Same.
* pt.c: Same.
* semantics.c: Same.
* lex.c: Same.
* decl2.c: Same.
* cp-gimplify.c: Same.
* decl.c: Same.
(cp_make_fname_decl): Add location argument. Pass location ot
build_decl.
(finish_case_label): Same.
* cp-tree.h (finish_case_label): Add location argument.
* parser.c (cp_parser_label_for_labeled_statement): Pass location to
finish_case_label.
gcc/fortran/
* trans-array.c (gfc_trans_allocate_array_storage): Pass
location on down.
(gfc_trans_array_constructor_value): Same.
(gfc_trans_scalarized_loop_end): Same.
(gfc_conv_ss_startstride): Same.
(gfc_trans_g77_array): Same.
(gfc_trans_dummy_array_bias): Same.
(gfc_conv_array_parameter): Same.
(structure_alloc_comps): Same.
* trans-expr.c (gfc_conv_function_call): Same.
(fill_with_spaces): Same.
(gfc_trans_string_copy): Same.
(gfc_trans_scalar_assign): Same.
* trans-stmt.c (gfc_trans_goto): Same.
(gfc_trans_if_1): Same.
(gfc_trans_simple_do): Same.
(gfc_trans_do): Same.
(gfc_trans_do_while): Same.
(gfc_trans_logical_select): Same.
(gfc_trans_select): Same.
(gfc_trans_forall_loop): Same.
(gfc_trans_nested_forall_loop): Same.
(generate_loop_for_temp_to_lhs): Same.
(generate_loop_for_rhs_to_temp): Same.
(gfc_trans_forall_1): Same.
(gfc_trans_where_assign): Same.
(gfc_trans_where_3): Same.
(gfc_trans_allocate): Same.
* trans.c (gfc_finish_block): Same.
(gfc_trans_runtime_check): Same.
(gfc_call_malloc): Same.
(gfc_allocate_with_status): Same.
(gfc_call_free): Same.
(gfc_deallocate_with_status): Same.
(gfc_call_realloc): Same.
(gfc_trans_code): Same.
* trans-decl.c (gfc_init_default_dt): Same.
(gfc_generate_constructors): Same.
* trans-io.c (gfc_trans_io_runtime_check): Same.
* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
(gfc_conv_intrinsic_fdate): Same.
(gfc_conv_intrinsic_ttynam): Same.
(gfc_conv_intrinsic_minmax): Same.
(gfc_conv_intrinsic_minmax_char): Same.
(gfc_conv_intrinsic_anyall): Same.
(gfc_conv_intrinsic_count): Same.
(gfc_conv_intrinsic_arith): Same.
(gfc_conv_intrinsic_minmaxloc): Same.
(gfc_conv_intrinsic_minmaxval): Same.
(gfc_conv_intrinsic_rrspacing): Same.
(gfc_conv_intrinsic_array_transfer): Same.
(gfc_conv_intrinsic_trim): Same.
(gfc_conv_intrinsic_repeat): Same.
From-SVN: r148442
|
|
Co-Authored-By: Leehod Baruch <leehod@il.ibm.com>
From-SVN: r148211
|
|
* expr.c (target_align): New function. Alignment the TARGET of an
assignment may be assume to have.
(highest_pow2_factor_for_target): Use it instead of relying on
immediate tree attributes of TARGET, not necessarily honored when
intermediate bitfields are involved.
testsuite/
* gcc.c-torture/execute/align-nest.c: New testcase.
* gnat.dg/misaligned_nest.adb: New testcase.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r147916
|
|
above)
2009-05-26 Richard Guenther <rguenther@suse.de>
PR middle-end/40248
Revert
* expr.c (expand_expr_real_1): Avoid calling do_store_flag
with mismatched comparison modes.
* expr.c (expand_expr_real_1): Expand the operand of a
VIEW_CONVERT_EXPR in its natural mode.
From-SVN: r147874
|
|
2009-05-22 Richard Guenther <rguenther@suse.de>
PR middle-end/38964
* alias.c (write_dependence_p): Do not use TBAA for answering
anti-dependence or output-dependence.
* tree-ssa-structalias.c (set_uids_in_ptset): Remove TBAA pruning
code.
(emit_pointer_definition): Remove.
(emit_alias_warning): Likewise.
(find_what_var_points_to): Remove TBAA pruning code.
(find_what_p_points_to): Likewise. Do not warn about strict-aliasing
violations.
(compute_points_to_sets): Remove code computing the set of
dereferenced pointers.
* tree-data-ref.c (dr_may_alias_p): Properly use the split
oracle for querying anti and output dependencies.
* tree-ssa-alias.c (refs_may_alias_p_1): Add argument specifying
if TBAA may be applied.
(refs_anti_dependent_p): New function.
(refs_output_dependent_p): Likewise.
* tree-ssa-alias.h (refs_anti_dependent_p): Declare.
(refs_output_dependent_p): Likewise.
* doc/tree-ssa.texi (Memory model): New section.
testsuite/
* g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: XFAIL.
* gcc.dg/Wstrict-aliasing-converted-assigned.c: Likewise.
* gcc.dg/Wstrict-aliasing-float-ptr-int-obj.c: Likewise.
* doc/c-tree.texi (CHANGE_DYNAMIC_TYPE_EXPR): Remove.
* doc/gimple.texi (GIMPLE_CHANGE_DYNAMIC_TYPE): Remove.
* cfgexpand.c (expand_gimple_basic_block): Do not handle
GIMPLE_CHANGE_DYNAMIC_TYPE or CHANGE_DYNAMIC_TYPE_EXPR.
* expr.c (expand_expr_real_1): Likewise.
* gimple-low.c (lower_stmt): Likewise.
* gimple-pretty-print.c (dump_gimple_stmt): Likewise.
(dump_gimple_cdt): Remove.
* gimple.c (gss_for_code): Do not handle GIMPLE_CHANGE_DYNAMIC_TYPE.
(gimple_size): Likewise.
(walk_gimple_op): Likewise.
(is_gimple_stmt): Likewise.
(walk_stmt_load_store_addr_ops): Likewise.
(gimple_build_cdt): Remove.
* gimple.def (GIMPLE_CHANGE_DYNAMIC_TYPE): Remove.
* gimple.h (gimple_cdt_new_type): Remove.
(gimple_cdt_new_type_ptr): Likewise.
(gimple_cdt_set_new_type): Likewise.
(gimple_cdt_location): Likewise.
(gimple_cdt_location_ptr): Likewise.
(gimple_cdt_set_location): Likewise.
* gimplify.c (gimplify_expr): Do not handle CHANGE_DYNAMIC_TYPE_EXPR.
* tree-cfg.c (remove_useless_stmts_1): Do not handle
GIMPLE_CHANGE_DYNAMIC_TYPE.
(verify_types_in_gimple_stmt): Likewise.
* tree-inline.c (estimate_num_insns): Likewise.
(expand_call_inline): Do not copy DECL_NO_TBAA_P.
(copy_decl_to_var): Likewise.
(copy_result_decl_to_var): Likewise.
* tree-pretty-print.c (dump_generic_node): Do not handle
CHANGE_DYNAMIC_TYPE_EXPR.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* tree-ssa-structalias.c (struct variable_info): Remove
no_tbaa_pruning member.
(new_var_info): Do not set it based on DECL_NO_TBAA_P.
(unify_nodes): Do not copy it.
(find_func_aliases): Do not handle GIMPLE_CHANGE_DYNAMIC_TYPE.
(dump_solution_for_var): Do not dump no_tbaa_pruning state.
(set_uids_in_ptset): Do not check it.
(find_what_var_points_to): Likewise.
(compute_tbaa_pruning): Remove.
(compute_points_to_sets): Do not call it.
* tree.c (walk_tree_1): Do not handle CHANGE_DYNAMIC_TYPE_EXPR.
* tree.def (CHANGE_DYNAMIC_TYPE_EXPR): Remove.
* tree.h (CHANGE_DYNAMIC_TYPE_NEW_TYPE): Remove.
(CHANGE_DYNAMIC_TYPE_LOCATION): Likewise.
(DECL_NO_TBAA_P): Likewise.
(struct tree_decl_common): Move no_tbaa_flag to unused flags section.
* omp-low.c (copy_var_decl): Do not copy DECL_NO_TBAA_P.
(expand_omp_atomic_pipeline): Do not set it.
* print-tree.c (print_node): Do not dump it.
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Remove
redundant check.
cp/
* init.c (avoid_placement_new_aliasing): Remove.
(build_new_1): Do not call it.
From-SVN: r147805
|
|
comparison modes.
2009-05-20 Richard Guenther <rguenther@suse.de>
* expr.c (expand_expr_real_1): Avoid calling do_store_flag
with mismatched comparison modes.
* gcc.c-torture/compile/20090518-1.c: New testcase.
From-SVN: r147731
|
|
* expr.c (get_def_for_expr): Move it up in the file.
(store_field): When expanding a bit-field store, look at the
defining gimple stmt for the masking conversion.
From-SVN: r147203
|
|
* attribs.c (decl_attributes): Use %qE for identifiers in
diagnostics.
* cgraphunit.c (verify_cgraph_node): Translate function names to
locale character set in diagnostics.
* coverage.c (get_coverage_counts): Use %qE for identifiers in
diagnostics.
* doc/invoke.texi (-finstrument-functions-exclude-function-list):
Document that functions are named in UTF-8.
* expr.c (expand_expr_real_1): Translate function names to locale
character set in diagnostics.
* gimplify.c (omp_notice_variable, omp_is_private,
gimplify_scan_omp_clauses): Use %qE for identifiers in
diagnostics.
* langhooks.c (lhd_print_error_function): Translate function names
to locale character set.
* langhooks.h (decl_printable_name): Document that return value is
in internal character set.
* stmt.c: Include pretty-print.h
(tree_conflicts_with_clobbers_p): Use %qE for identifiers in
diagnostics.
(resolve_operand_name_1): Translate named operand name to locale
character set.
* stor-layout.c (finalize_record_size): Use %qE for identifiers in
diagnostics.
* toplev.c (announce_function): Translate function names to locale
character set.
(warn_deprecated_use): Use %qE for identifiers in diagnostics.
(default_tree_printer): Use pp_identifier or translate identifiers
to locale character set. Mark "<anonymous>" for translation.
* tree-mudflap.c (mx_register_decls, mudflap_finish_file): Use %qE
for identifiers in diagnostics.
* tree.c (handle_dll_attribute): Use %qE for identifiers in
diagnostics.
* varasm.c (output_constructor): Use %qE for identifiers in
diagnostics.
testsuite:
* gcc.dg/ucnid-11.c, gcc.dg/ucnid-12.c, gcc.dg/ucnid-13.c: New
tests.
From-SVN: r147111
|
|
* expr.c (get_def_for_expr): New function.
(expand_expr_real_1) <PLUS_EXPR, MINUS_EXPR>: Adjust to work with
SSA rather than trees.
<MULT_EXPR>: Likewise. Use subexp0 and subexp1 instead of
TREE_OPERAND (exp, 0) and TREE_OPERAND (exp, 1).
Co-Authored-By: Richard Guenther <rguenther@suse.de>
From-SVN: r147078
|
|
gcc/
Expand from SSA.
* builtins.c (fold_builtin_next_arg): Handle SSA names.
* tree-ssa-copyrename.c (rename_ssa_copies): Use ssa_name() directly.
* tree-ssa-coalesce.c (create_outofssa_var_map): Mark only useful
SSA names.
(compare_pairs): Swap cost comparison.
(coalesce_ssa_name): Don't use change_partition_var.
* tree-nrv.c (struct nrv_data): Add modified member.
(finalize_nrv_r): Set it.
(tree_nrv): Use it to update statements.
(pass_nrv): Require PROP_ssa.
* tree-mudflap.c (mf_decl_cache_locals,
mf_build_check_statement_for): Use make_rename_temp.
(pass_mudflap_2): Require PROP_ssa, run ssa update at finish.
* alias.c (find_base_decl): Handle SSA names.
* emit-rtl (set_reg_attrs_for_parm): Make non-static.
(component_ref_for_mem_expr): Don't leak SSA names into RTL.
* rtl.h (set_reg_attrs_for_parm): Declare.
* tree-optimize.c (pass_cleanup_cfg_post_optimizing): Rename
to "optimized", remove unused locals at finish.
(execute_free_datastructures): Make global, call
delete_tree_cfg_annotations.
(execute_free_cfg_annotations): Don't call
delete_tree_cfg_annotations.
* ssaexpand.h: New file.
* expr.c (toplevel): Include ssaexpand.h.
(expand_assignment): Handle SSA names the same as register
variables.
(expand_expr_real_1): Expand SSA names.
* cfgexpand.c (toplevel): Include ssaexpand.h.
(SA): New global variable.
(gimple_cond_pred_to_tree): Fold TERed comparisons into predicates.
(SSAVAR): New macro.
(set_rtl): New helper function.
(add_stack_var): Deal with SSA names, use set_rtl.
(expand_one_stack_var_at): Likewise.
(expand_one_stack_var): Deal with SSA names.
(stack_var_size_cmp): Use code (SSA_NAME / DECL) as tie breaker
before unique numbers.
(expand_stack_vars): Use set_rtl.
(expand_one_var): Accept SSA names, add asserts for them, feed them
to above subroutines.
(expand_used_vars): Expand all partitions (without default defs),
then only the local decls (ignoring those expanded already).
(expand_gimple_cond): Remove edges when jumpif() expands an
unconditional jump.
(expand_gimple_basic_block): Don't clear EDGE_EXECUTABLE here,
or remove abnormal edges. Ignore insns setting the LHS of a TERed
SSA name.
(gimple_expand_cfg): Call into rewrite_out_of_ssa, initialize
members of SA; deal with PARM_DECL partitions here; expand
all PHI nodes, free tree datastructures and SA. Commit instructions
on edges, clear EDGE_EXECUTABLE and remove abnormal edges here.
(pass_expand): Require and destroy PROP_ssa, verify SSA form, flow
info and statements at start, collect garbage at finish.
* tree-ssa-live.h (struct _var_map): Remove partition_to_var member.
(VAR_ANN_PARTITION) Remove.
(change_partition_var): Don't declare.
(partition_to_var): Always return SSA names.
(var_to_partition): Only accept SSA names.
(register_ssa_partition): Only check argument.
* tree-ssa-live.c (init_var_map): Don't allocate partition_to_var
member.
(delete_var_map): Don't free it.
(var_union): Only accept SSA names, simplify.
(partition_view_init): Mark only useful SSA names as used.
(partition_view_fini): Only deal with SSA names.
(change_partition_var): Remove.
(dump_var_map): Use ssa_name instead of partition_to_var member.
* tree-ssa.c (delete_tree_ssa): Don't remove PHI nodes on RTL
basic blocks.
* tree-outof-ssa.c (toplevel): Include ssaexpand.h and expr.h.
(struct _elim_graph): New member const_dests; nodes member vector of
ints.
(set_location_for_edge): New static helper.
(create_temp): Remove.
(insert_partition_copy_on_edge, insert_part_to_rtx_on_edge,
insert_value_copy_on_edge, insert_rtx_to_part_on_edge): New
functions.
(new_elim_graph): Allocate const_dests member.
(clean_elim_graph): Truncate const_dests member.
(delete_elim_graph): Free const_dests member.
(elim_graph_size): Adapt to new type of nodes member.
(elim_graph_add_node): Likewise.
(eliminate_name): Likewise.
(eliminate_build): Don't take basic block argument, deal only with
partition numbers, not variables.
(get_temp_reg): New static helper.
(elim_create): Use it, deal with RTL temporaries instead of trees.
(eliminate_phi): Adjust all calls to new signature.
(assign_vars, replace_use_variable, replace_def_variable): Remove.
(rewrite_trees): Only do checking.
(edge_leader, stmt_list, leader_has_match, leader_match): Remove.
(same_stmt_list_p, identical_copies_p, identical_stmt_lists_p,
init_analyze_edges_for_bb, fini_analyze_edges_for_bb,
contains_tree_r, MAX_STMTS_IN_LATCH,
process_single_block_loop_latch, analyze_edges_for_bb,
perform_edge_inserts): Remove.
(expand_phi_nodes): New global function.
(remove_ssa_form): Take ssaexpand parameter. Don't call removed
functions, initialize new parameter, remember partitions having a
default def.
(finish_out_of_ssa): New global function.
(rewrite_out_of_ssa): Make global. Adjust call to remove_ssa_form,
don't reset in_ssa_p here, don't disable TER when mudflap.
(pass_del_ssa): Remove.
* tree-flow.h (struct var_ann_d): Remove out_of_ssa_tag and
partition members.
(execute_free_datastructures): Declare.
* Makefile.in (SSAEXPAND_H): New variable.
(tree-outof-ssa.o, expr.o, cfgexpand.o): Depend on SSAEXPAND_H.
* basic-block.h (commit_one_edge_insertion): Declare.
* passes.c (init_optimization_passes): Move pass_nrv and
pass_mudflap2 before pass_cleanup_cfg_post_optimizing, remove
pass_del_ssa, pass_free_datastructures, pass_free_cfg_annotations.
* cfgrtl.c (commit_one_edge_insertion): Make global, don't declare.
(redirect_branch_edge): Deal with super block when expanding, split
out jump patching itself into ...
(patch_jump_insn): ... here, new static helper.
testsuite/
Expand from SSA.
* gcc.dg/tree-ssa/20030728-1.c: Use -rtl-expand-details dump and
change regexps.
* gcc.target/i386/pr37248-1.c: Modified.
* gcc.target/i386/pr37248-3.c: Modified.
* gcc.target/i386/pr37248-2.c: Modified.
* gnat.dg/aliasing1.adb: Modified.
* gnat.dg/pack9.adb: Modified.
* gnat.dg/aliasing2.adb: Modified.
* gcc.dg/strict-overflow-2.c: Modified.
* gcc.dg/autopar/reduc-1char.c: Modified.
* gcc.dg/autopar/reduc-2char.c: Modified.
* gcc.dg/autopar/reduc-1.c: Modified.
* gcc.dg/autopar/reduc-2.c: Modified.
* gcc.dg/autopar/reduc-3.c: Modified.
* gcc.dg/autopar/reduc-6.c: Modified.
* gcc.dg/autopar/reduc-7.c: Modified.
* gcc.dg/autopar/reduc-8.c: Modified.
* gcc.dg/autopar/reduc-9.c: Modified.
* gcc.dg/autopar/reduc-1short.c: Modified.
* gcc.dg/autopar/reduc-2short.c: Modified.
* gcc.dg/autopar/parallelization-1.c: Modified.
* gcc.dg/strict-overflow-4.c: Modified.
* gcc.dg/strict-overflow-6.c: Modified.
* gcc.dg/gomp/combined-1.c: Modified.
* gcc.dg/no-strict-overflow-1.c: Modified.
* gcc.dg/no-strict-overflow-3.c: Modified.
* gcc.dg/no-strict-overflow-5.c: Modified.
* gcc.dg/tree-ssa/reassoc-13.c: Modified.
* gcc.dg/tree-ssa/pr18134.c: Modified.
* gcc.dg/tree-ssa/20030824-1.c: Modified.
* gcc.dg/tree-ssa/vector-2.c: Modified.
* gcc.dg/tree-ssa/forwprop-9.c: Modified.
* gcc.dg/tree-ssa/loop-21.c: Modified.
* gcc.dg/tree-ssa/20030824-2.c: Modified.
* gcc.dg/tree-ssa/vector-3.c: Modified.
* gcc.dg/tree-ssa/asm-3.c: Modified.
* gcc.dg/tree-ssa/pr23294.c: Modified.
* gcc.dg/tree-ssa/loop-22.c: Modified.
* gcc.dg/tree-ssa/loop-15.c: Modified.
* gcc.dg/tree-ssa/prefetch-4.c: Modified.
* gcc.dg/tree-ssa/pr22051-1.c: Modified.
* gcc.dg/tree-ssa/pr20139.c: Modified.
* gcc.dg/tree-ssa/scev-cast.c: Modified.
* gcc.dg/tree-ssa/pr22051-2.c: Modified.
* gcc.dg/tree-ssa/reassoc-1.c: Modified.
* gcc.dg/tree-ssa/loop-5.c: Modified.
* gcc.dg/tree-ssa/pr19431.c: Modified.
* gcc.dg/tree-ssa/pr32044.c: Modified.
* gcc.dg/tree-ssa/prefetch-7.c: Modified.
* gcc.dg/tree-ssa/loop-19.c: Modified.
* gcc.dg/tree-ssa/loop-28.c: Modified.
* gcc.dg/tree-ssa/ssa-pre-15.c: Modified.
* gcc.dg/tree-ssa/divide-1.c: Modified.
* gcc.dg/tree-ssa/inline-1.c: Modified.
* gcc.dg/tree-ssa/divide-3.c: Modified.
* gcc.dg/tree-ssa/pr30978.c: Modified.
* gcc.dg/tree-ssa/alias-6.c: Modified.
* gcc.dg/tree-ssa/divide-4.c: Modified.
* gcc.dg/tree-ssa/alias-11.c: Modified.
* gcc.dg/no-strict-overflow-7.c: Modified.
* gcc.dg/strict-overflow-1.c: Modified.
* gcc.dg/pr15784-4.c: Modified.
* gcc.dg/pr34263.c: Modified.
* gcc.dg/strict-overflow-3.c: Modified.
* gcc.dg/tree-prof/stringop-1.c: Modified.
* gcc.dg/tree-prof/val-prof-1.c: Modified.
* gcc.dg/tree-prof/val-prof-2.c: Modified.
* gcc.dg/tree-prof/val-prof-3.c: Modified.
* gcc.dg/tree-prof/val-prof-4.c: Modified.
* gcc.dg/no-strict-overflow-2.c: Modified.
* gcc.dg/no-strict-overflow-4.c: Modified.
* gcc.dg/no-strict-overflow-6.c: Modified.
* g++.dg/tree-ssa/pr27090.C: Modified.
* g++.dg/tree-ssa/tmmti-2.C: Modified.
* g++.dg/tree-ssa/ptrmemfield.C: Modified.
* g++.dg/tree-ssa/pr19807.C: Modified.
* g++.dg/opt/pr30965.C: Modified.
* g++.dg/init/new17.C: Modified.
* gfortran.dg/whole_file_6.f90: Modified.
* gfortran.dg/whole_file_5.f90: Modified.
* gfortran.dg/reassoc_1.f90: Modified.
* gfortran.dg/reassoc_3.f90: Modified.
From-SVN: r146817
|
|
* target.h (struct gcc_target): Add case_values_threshold field.
* target-def.h (TARGET_CASE_VALUES_THRESHOLD): New.
(TARGET_INITIALIZER): Use TARGET_CASE_VALUES_THRESHOLD.
* targhooks.c (default_case_values_threshold): New function.
* targhooks.h (default_case_values_threshold): Declare function.
* stmt.c (expand_case): Use case_values_threshold target hook.
* expr.h (case_values_threshold): Remove declartation.
* expr.c (case_values_threshold): Remove function.
* doc/tm.texi (CASE_VALUES_THRESHOLD): Revise documentation.
* config/avr/avr.h (CASE_VALUES_THRESHOLD): Remove macro.
* config/avr/avr.c (TARGET_CASE_VALUES_THRESHOLD): Define macro.
(avr_case_values_threshold): Declare as static.
* config/avr/avr-protos.h (avr_case_values_threshold): Remove.
* config/avr/mn10300.h (CASE_VALUES_THRESHOLD): Remove macro.
* config/avr/mn10300.c (TARGET_CASE_VALUES_THRESHOLD): Define macro.
(mn10300_case_values_threshold): New function.
From-SVN: r146756
|
|
gcc/:
Fix enum conversions which are invalid in C++:
* auto-inc-dec.c (attempt_change): Change 0 to SET in function
call.
* calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function
call.
* cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call.
* dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type.
* dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function
call.
(dbxout_parms): Likewise.
* df-core.c (df_set_flags): Change changeable_flags parameter to
int.
(df_clear_flags): Likewise.
* df-problems.c (df_rd_bb_local_compute_process_def): Change
top_flag parameter to int.
(df_chain_create_bb_process_use): Likewise.
(df_chain_add_problem): Change chain_flags parameter to unsigned
int. Remove cast.
* df-scan.c (df_ref_create): Change ref_flags parameter to int.
(df_ref_create_structure, df_def_record_1): Likewise.
(df_defs_record, df_uses_record, df_get_call_refs): Likewise.
(df_notes_rescan): Change 0 to VOIDmode in function call.
(df_get_call_refs, df_insn_refs_collect): Likewise.
(df_bb_regs_collect): Likewise.
(df_entry_block_defs_collect): Likewise.
(df_exit_block_uses_collect): Likewise.
* df.h: Update declarations.
* double-int.c (double_int_divmod): Add cast to enum type.
* dse.c (replace_inc_dec): Reverse parameters to gen_int_mode.
* dwarf2out.c (new_reg_loc_descr): Add casts to enum type.
(based_loc_descr): Likewise.
(loc_descriptor_from_tree_1): Change first_op and second_op to
enum dwarf_location_atom. Add cast to enum type.
* expmed.c (init_expmed): Change 0 to SET in function call.
* expr.c (init_expr_target): Change 0 to VOIDmode in function
call.
(expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call.
(do_store_flag): Likewise.
* fixed-value.h (struct fixed_value): Change mode to enum
machine_mode.
* function.c (assign_parms): Change 0 to VOIDmode in function
call.
* genautomata.c (insert_automaton_decl): Change 1 to INSERT in
function call.
(insert_insn_decl, insert_decl, insert_state): Likewise.
(automata_list_finish): Likewise.
* genrecog.c (process_define_predicate): Add cast to enum type.
* gensupport.c (init_predicate_table): Add cast to enum type.
* gimple.c (gimple_build_return): Change 0 to ERROR_MARK in
function call.
(gimple_build_call_1, gimple_build_label): Likewise.
(gimple_build_goto, gimple_build_asm_1): Likewise.
(gimple_build_switch_1, gimple_build_cdt): Likewise.
* gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function
call.
(enum fallback): Rename from enum fallback_t.
(fallback_t): Typedef as int.
* gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to
GSI_SAME_STMT in function call.
* ira.c (setup_class_subset_and_memory_move_costs): Add casts to
enum type.
(setup_reg_class_relations): Likewise.
(setup_reg_class_nregs): Change cl to int. Add casts to enum
type.
(setup_prohibited_class_mode_regs): Add cast to enum type.
(setup_prohibited_mode_move_regs): Likewise.
* ira-costs.c (record_reg_classes): Change rclass to enum
reg_class.
(record_address_regs): Change i to enum reg_class.
* lists.c (alloc_EXPR_LIST): Add cast to enum type.
* machmode.h (GET_MODE_CLASS): Cast value to enum mode_class.
(GET_MODE_WIDER_MODE): Cast value to enum machine_mode.
(GET_MODE_2XWIDER_MODE): Likewise.
(GET_CLASS_NARROWEST_MODE): Likewise.
* omp-low.c (expand_omp_for): Add cast to enum type.
* optabs.c (debug_optab_libfuncs): Add casts to enum type.
* opts.c (enable_warning_as_error): Change kind to diagostic_t.
* postreload.c (reload_cse_simplify_operands): Change rclass local
to enum reg_class.
* predict.c (combine_predictions_for_insn): Change best_predictor
and predictor to enum br_predictor.
(combine_predictions_for_bb): Likewise.
(build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to
use SET_PREDICT_EXPR_OUTCOME.
* real.c (real_arithmetic): Change icode to code in function
call.
* reginfo.c (init_move_cost): Add casts to enum type.
(init_reg_sets_1, init_fake_stack_mems): Likewise.
* regmove.c (regclass_compatible_p): Change class0 and class1 to
enum reg_class.
* reload.c (find_valid_class): Add casts to enum type.
(push_reload): Change 0 to NO_REGS in function call.
(find_reloads): Change this_alternative to array of enum
reg_class. Remove some now-unnecessary casts.
(make_memloc): Change 0 to VOIDmode in function call.
* reload1.c (reload): Change 0 to VOIDmode in function call.
(eliminate_regs_1, elimination_effects): Likewise.
(eliminate_regs_in_insn): Likewise.
(emit_input_reload_insns): Add cast to enum type.
(delete_output_reload): Change 0 to VOIDmode in function call.
* reorg.c (insn_sets_resource_p): Convert include_delayed_effects
to enum type in function call.
* tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type.
(SET_PREDICT_EXPR_OUTCOME): Define.
* tree-dump.c (get_dump_file_info): Change phase parameter to
int.
(get_dump_file_name, dump_begin, dump_enabled_p): Likewise.
(dump_initialized_p, dump_flag_name, dump_end): Likewise.
(dump_function): Likewise.
* tree-dump.h: Update declarations.
* tree-pass.h: Update declarations.
* varasm.c (assemble_integer): Change mclass to enum mode_class.
* config/arm/arm.c (thumb_legitimize_reload_address): Add cast to
enum type.
(arm_rtx_costs_1): Correct parenthesization.
(arm_rtx_costs): Add casts to enum type.
(adjacent_mem_locations): Reverse arguments to const_ok_for_op.
(vfp_emit_fstmd): Use add_rg_note.
(emit_multi_reg_push, emit_sfm): Likewise.
(thumb_set_frame_pointer): Likewise.
(arm_expand_prologue): Likewise.
(arm_regno_class): Change return type to enum reg_class.
(thumb1_expand_prologue): Use add_reg_note.
* config/arm/arm-protos.h (arm_regno_class): Update declaration.
* config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL
in function call.
* config/arm/gentune.sh: Add cast to enum type.
* config/arm/arm-tune.md: Rebuild.
* config/i386/i386.c (ix86_expand_prologue): Use add_reg_note.
(ix86_split_fp_branch, predict_jump): Likewise.
(ix86_expand_multi_arg_builtin): Change sub_code from enum
insn_code to enum rtx_code.
(ix86_builtin_vectorized_function): Add cast to enum type.
* config/i386/i386.md (truncdfsf2): Change slot to enum
ix86_stack_slot.
(truncxf<mode>2, isinf<mode>2): Likewise.
* config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to
enum type.
* config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note.
(spill_restore_mem, do_spill, ia64_expand_prologue): Likewise.
(insert_bundle_state): Change 1 to INSERT in function call.
(ia64_add_bundle_selector_before): Likewise.
* config/ia64/ia64.md (cpu attr): Add cast to enum type.
(save_stack_nonlocal): Change 0 to LCT_NORMAL in function call.
(restore_stack_nonlocal): Likewise.
* config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in
function call.
* config/mips/mips.c (mips_binary_cost): Change 0 to SET in
function call.
(mips_rtx_costs): Likewise.
(mips_override_options): Add casts to enum type.
* config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL
in function call.
* config/pa/pa.c (legitimize_pic_address): Use add_reg_note.
(store_reg, set_reg_plus_d): Likewise.
(hppa_expand_prologue, hppa_profile_hook): Likewise.
* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add
cast to enum type.
(altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in
function call.
(emit_unlikely_jump): Use add_reg_note.
(rs6000_emit_allocate_stack): Likewise.
(rs6000_frame_related, rs6000_emit_prologue): Likewise.
(output_toc): Change 1 to INSERT in function call.
(output_profile_hook): Change 0 to LCT_NORMAL in function call.
(rs6000_initialize_trampoline): Likewise.
(rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in
function call.
* config/s390/s390.c (s390_rtx_costs): Add cast to enum type.
(s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call.
(s390_expand_setmem, s390_expand_cmpmem): Likewise.
(save_gprs): Use add_reg_note.
(s390_emit_prologue): Likewise.
(s390_expand_builtin): Change 0 to EXPAND_NORMAL in function
call.
* config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note.
(sparc_fold_builtin): Add cast to enum type.
* config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to
enum insn_code.
(spu_expand_prologue): Use add_reg_note.
(expand_builtin_args): Change 0 to EXPAND_NORMAL in function
call.
* c-parser.c (c_parser_attributes): Change VEC back to tree list.
(c_parser_postfix_expression_after_primary): Get VEC for list of
arguments. Get original types of arguments. Call
build_function_call_vec.
(cached_expr_list_1, cached_expr_list_2): New static variables.
(c_parser_expr_list): Change return type to VEC *. Add
p_orig_types parameter. Change all callers.
(c_parser_release_expr): New static function.
(c_parser_vec_to_tree_list): New static function.
* c-typeck.c (build_function_call): Rewrite to build a VEC and
call build_function_call_vec.
(build_function_call_vec): New function, based on old
build_function_call.
(convert_arguments): Remove nargs and argarray parameters. Change
values to a VEC. Add origtypes parameter.
(build_modify_expr): Add rhs_origtype parameter. Change all
callers.
(convert_for_assignment): Add origtype parameter. Change all
callers. If warn_cxx_compat, check for conversion to an enum
type when calling a function.
(store_init_value): Add origtype parameter. Change all callers.
(digest_init): Likewise.
(struct init_node): Add origtype field.
(add_pending_init): Add origtype parameter. Change all callers.
(output_init_element): Likewise.
(output_pending_init_elements): Pass origtype from init_node to
output_init_element.
(process_init_elemnt): Pass origtype from c_expr to
output_init_element.
(c_finish_return): Add origtype parameter. Change all callers.
* c-common.c (sync_resolve_size): Change params to VEC *. Change
caller.
(sync_resolve_params): Likewise.
(sync_resolve_return): Change params to first_param. Change
caller.
(resolve_overloaded_builtins): Change params to VEC *. Change
callers. Save first parameter around call to
build_function_call_vec.
* c-decl.c (finish_decl): Add origtype parameter. Change all
callers. Call build_function_call_vec rather than
build_function_call for cleanup.
* c-tree.h: Update declarations.
* c-common.h: Update declarations.
* stub-objc.c (objc_rewrite_function_call): Change parameter from
params to first_param.
* target.h (struct gcc_target): Change resolve_overloaded_builtin
params parameter from tree to void *.
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
Change arglist parameter to have type void *, and to be a pointer
to a VEC.
* config/rs6000/rs6000-protos.h
(altivec_resolve_overloaded_builtin): Update declaration.
* config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change
fnargs parameter to have type void *, and to be a pointer to a
VEC. Call build_function_call_vec instead of
build_function_call.
* config/spu/spu-protos.h (spu_expand_builtin): Update
declaration.
gcc/cp/:
* typeck.c (build_function_call_vec): New function.
(cp_build_function_call): Only pass first parameter to
objc_rewrite_function_call.
(build_modify_expr): Add rhs_origtype parameter. Change all
callers.
* decl.c (finish_decl): Add origtype parameter. Change all
callers.
* semantics.c (finish_call_expr): Pass VEC to
resolve_overloaded_builtin.
gcc/objc:
* objc-act.c (objc_rewrite_function_call): Change parameter from
params to first_param. Change all callers.
gcc/testsuite:
* gcc.dg/Wcxx-compat-3.c: New testcase.
From-SVN: r146451
|
|
2009-04-20 Richard Guenther <rguenther@suse.de>
* expr.c (handled_component_p): Move ...
* tree.h (handled_component_p): ... here.
* tree.def: Re-order BIT_FIELD_REF, COMPONENT_REF,
ARRAY_REF, ARRAY_RANGE_REF, VIEW_CONVERT_EXPR, IMAGPART_EXPR
and REALPART_EXPR to be in one group.
From-SVN: r146427
|
|
2009-04-09 Paolo Bonzini <bonzini@gnu.org>
* config/i386/i386.md (cmpcc): New.
* config/i386/sync.md (sync_compare_and_swap*): Set FLAGS_REG.
(sync_compare_and_swap_cc*): Delete.
* config/s390/s390.c (s390_compare_emitted): Remove.
(s390_emit_compare): Handle MODE_CC s390_compare_op0 like
s390_compare_emitted used to be handled. Assert that modes match.
(s390_emit_compare_and_swap): Use s390_emit_compare, do not
refer to sync_compare_and_swap_ccsi.
* config/s390/s390.h (s390_compare_emitted): Remove.
* config/s390/s390.md (seq): Look for MODE_CC s390_compare_op0
instead of s390_compare_emitted.
(stack_protect_test, sync_compare_and_swap_cc): Set s390_compare_op0
instead of s390_compare_emitted.
* config/s390/s390.md (cmpcc): New.
(sync_compare_and_swapqi, sync_compare_and_swaphi): Clobber
CC_REGNUM, do not pretend it's set.
(sync_compare_and_swap_cc*): Delete.
* config/s390/predicates.md (cc_reg_operand): New.
* expr.c (sync_compare_and_swap_cc): Delete.
* optabs.h (sync_compare_and_swap_cc): Delete.
* optabs.c (prepare_cmp_insn): Ignore which specific CCmode
is being used with can_compare_p.
(emit_cmp_and_jump_insn_1): Likewise when looking in the optab.
(find_cc_set): New.
(expand_bool_compare_and_swap): Do not use sync_compare_and_swap_cc,
look for a MODE_CC set instead. Use emit_store_flag.
(expand_compare_and_swap_loop): Likewise, with some additional
complication to avoid a force_reg when useless. Use
emit_cmp_and_jump_insns.
* genopinit.c (optabs): Delete sync_compare_and_swap_cc.
* doc/md.texi (sync_compare_and_swap_cc): Merge with
sync_compare_and_swap documentation.
java:
2009-04-09 Paolo Bonzini <bonzini@gnu.org>
* builtins.c (compareAndSwapLong_builtin,
compareAndSwapInt_builtin, compareAndSwapObject_builtin,
VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
From-SVN: r145825
|
|
2009-04-07 Paolo Bonzini <bonzini@gnu.org>
* expr.c (do_store_flag): Remove last argument. Simplify code
to avoid duplication of tests already done by can_compare_p.
(expand_expr_real_1): Adjust caller.
From-SVN: r145668
|
|
2009-04-07 Paolo Bonzini <bonzini@gnu.org>
* expr.c (convert_move): Use emit_store_flag instead of
"emulating" it.
From-SVN: r145666
|
|
2009-03-28 Paolo Bonzini <bonzini@gnu.org>
* c-common.c (c_expand_expr, c_staticp): Remove.
* c-common.def (COMPOUND_LITERAL_EXPR): Delete.
* c-common.h (emit_local_var, c_staticp, COMPOUND_LITERAL_EXPR_DECL,
COMPOUND_LITERAL_EXPR_DECL_EXPR): Remove.
* c-gimplify.c (gimplify_compound_literal_expr,
optimize_compound_literals_in_ctor): Remove.
(c_gimplify_expr): Remove COMPOUND_LITERAL_EXPR handling.
* c-objc-common.h (LANG_HOOKS_STATICP): Remove.
* c-semantics.c (emit_local_var): Remove.
* langhooks-def.h (lhd_expand_expr): Remove.
* langhooks.c (lhd_expand_expr): Remove.
* langhooks.h (LANG_HOOKS_DEF): Remove LANG_HOOKS_EXPAND_EXPR.
* expr.c (expand_expr_real_1): Move COMPOUND_LITERAL_EXPR
handling from c-semantics.c; don't call into langhook.
(expand_expr_addr_expr_1): Check that we don't get non-GENERIC trees.
* gimplify.c (gimplify_compound_literal_expr,
optimize_compound_literals_in_ctor): Move from c-gimplify.c.
(gimplify_init_constructor): Call optimize_compound_literals_in_ctor.
(gimplify_modify_expr_rhs, gimplify_expr): Handle COMPOUND_LITERAL_EXPR
as was done in c-gimplify.c.
* tree.c (staticp): Move COMPOUND_LITERAL_EXPR handling from c_staticp.
* tree.h (COMPOUND_LITERAL_EXPR_DECL, COMPOUND_LITERAL_EXPR_DECL_EXPR):
Move from c-common.h.
* tree.def (COMPOUND_LITERAL_EXPR): Move from c-common.def.
* tree.c (staticp): Do not call langhook.
* langhooks.c (lhd_staticp): Delete.
* langhooks-def.h (lhd_staticp): Delete prototype.
(LANG_HOOKS_STATICP): Delete.
(LANG_HOOKS_INITIALIZER): Delete LANG_HOOKS_STATICP.
* doc/c-tree.texi (Expression nodes): Refer to DECL_EXPRs
instead of DECL_STMTs.
cp:
2009-03-28 Paolo Bonzini <bonzini@gnu.org>
* cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
* cp/cp-objcp-common.c (cxx_staticp): Remove.
* cp/cp-tree.h (cxx_staticp): Remove.
From-SVN: r145256
|
|
glibc headers)
2009-03-03 Richard Guenther <rguenther@suse.de>
PR middle-end/39272
* tree.c (tree_nonartificial_location): New function.
* tree.h (tree_nonartificial_location): Declare.
* builtins.c (expand_builtin_memory_chk): Provide location
of the call location for artificial function pieces.
(maybe_emit_chk_warning): Likewise.
(maybe_emit_sprintf_chk_warning): Likewise.
(maybe_emit_free_warning): Likewise.
* expr.c (expand_expr_real_1): Likewise.
From-SVN: r144573
|
|
PR middle-end/31150
* dse.c (struct store_info): Add const_rhs field.
(clear_rhs_from_active_local_stores): Clear also const_rhs.
(record_store): Try also cselib_expand_value_rtx to get a constant.
(find_shift_sequence, get_stored_val): Use const_rhs instead of
rhs if worthwhile.
* cselib.c (cselib_record_sets): If !cselib_record_memory and
there is just one set from read-only MEM, look at REG_EQUAL or
REG_EQUIV note.
* dse.c (struct store_info): Add redundant_reason field.
(record_store): When storing the same constant as has been
stored by an earlier store, set redundant_reason field
to the earlier store's insn_info_t. Don't delete cannot_delete
insns.
(find_shift_sequence): Remove read_info argument, add read_mode
and require_cst arguments. Return early if require_cst and
constant wouldn't be returned.
(get_stored_val): New function.
(replace_read): Use it.
(scan_insn): Put even cannot_delete insns with exactly 1 store
into active_local_stores.
(dse_step1): Don't delete cannot_delete insns. Remove redundant
constant stores if contains_cselib_groups and earlier store storing
the same value hasn't been eliminated.
(dse_step6): Renamed to dse_step7. New function.
(dse_step7): Renamed from dse_step6.
(rest_of_handle_dse): Call dse_step6 and dse_step7 at the end.
* cselib.c (cselib_expand_value_rtx): Don't wrap CONST_INTs
into CONST unless really necessary. Handle SUBREG, unary,
ternary, bitfield and compares specially, to be able to simplify
operations on constants.
(expand_loc): Try to optimize LO_SUM.
* dse.c (get_call_args): New function.
(scan_insn): Don't handle BUILT_IN_BZERO. For memset, attempt
to get call arguments and if successful and both len and val are
constants, handle the call as (mem:BLK) (const_int) store.
* dse.c (struct store_info): Add is_large bool field, change
positions_needed into a union of a bitmask and bitmap + count.
(free_store_info): Free bitmap if is_large.
(set_usage_bits): Don't look at stores where
offset + width >= MAX_OFFSET.
(set_position_unneeded, set_all_positions_unneeded,
any_positions_needed_p, all_positions_needed_p): New static inline
functions.
(record_store): Handle BLKmode stores of CONST_INT, if
MEM_SIZE is set on the MEM. Use the new positions_needed
accessor inlines.
(replace_read): Handle reads from BLKmode CONST_INT stores.
(check_mem_read_rtx): Use all_positions_needed_p function.
(dse_step1): Free large positions_needed bitmaps and clear is_large.
* dse.c (struct store_info): Change begin and end types to
HOST_WIDE_INT.
* dse.c (record_store): Fix check for unused store.
* expr.c (block_clear_fn): No longer static.
* expr.h (block_clear_fn): Declare.
* dse.c (scan_insn): Memset and bzero can just read their
arguments.
* gcc.c-torture/execute/20081218-1.c: New test.
From-SVN: r142892
|
|
if...
2008-11-19 Richard Guenther <rguenther@suse.de>
* tree.c (build2_stat): Allow non-POINTER_PLUS_EXPRs with
non-sizetype offsets if their precision matches that of
the pointer.
* expr.c (expand_expr_real_1): Always sign-extend the offset
operand of a POINTER_PLUS_EXPR.
From-SVN: r142009
|
|
powerpc-apple-darwin9)
PR target/35366
* expr.c (expand_expr_addr_expr_1): If EXP needs bigger alignment
than INNER and INNER is a constant, forcibly align INNER as much
as needed.
From-SVN: r141782
|
|
PR middle-end/37730
* expr.c (store_constructor): For vectors, if target is a MEM, use
target's MEM_ALIAS_SET instead of elttype alias set.
* gcc.dg/vect/pr37730.c: New test.
From-SVN: r141461
|
|
* tree.h (contains_packed_reference): Mention ARRAY_RANGE_REF in
head comment.
(array_ref_element_size): Likewise.
(array_ref_low_bound): Likewise.
(array_ref_up_bound): Likewise.
* expr.c (contains_packed_reference): Likewise.
(array_ref_element_size): Likewise.
(array_ref_low_bound): Likewise.
(array_ref_up_bound): Likewise.
* tree-ssa-loop-ivopts.c (idx_contains_abnormal_ssa_name_p): Deal
with ARRAY_RANGE_REF.
(idx_find_step): Likewise.
(idx_record_use): Likewise.
(strip_offset_1): Likewise.
(idx_remove_ssa_names): Likewise.
From-SVN: r141065
|
|
gcc/
2008-10-07 Simon Martin <simartin@users.sourceforge.net>
PR c/35437
* expr.c (count_type_elements): Handle ERROR_MARK.
gcc/testsuite/
2008-01-07 Simon Martin <simartin@users.sourceforge.net>
PR c/35437
* gcc.dg/struct-parse-2.c: New test.
* g++.dg/parse/struct-4.C: New test.
From-SVN: r140953
|
|
be forced to constant memory.
* expr.c (expand_expr_real_1) <normal_inner_ref>: Force op0 to
non-constant memory if it cannot be forced to constant memory.
Overhaul surrounding code and factor out common condition.
From-SVN: r140760
|
|
* expr.c (emit_group_store): Do not shift before moving via a
stack slot.
From-SVN: r140442
|
|
2008-09-02 H.J. Lu <hongjiu.lu@intel.com>
* expr.c (emit_group_store): Don't assert stack temp mode size.
From-SVN: r139894
|
|
* expr.c (MOVE_BY_PIECES_P, CLEAR_BY_PIECES_P, SET_BY_PIECES_P): Pass speed operand.
* expr.h (MOVE_RATIO, CLEAR_RATIO, SET_RATIO): Update.
* gimplify.c (gimplify_init_constructor): Add speed operand.
* tree-sra.c (decide_block_copy): Likewise.
* tree-inline.c (estimate_move_cost): Likewise.
* config/alpha/alpha.h (MOVE_RATIO): Update.
* config/frv/frv.c (MOVE_RATIO): Update.
* config/spu/spu.h (MOVE_RATIO): Update.
* config/sparc/sparc.h (MOVE_RATIO): Update.
* config/i386/i386.h (MOVE_RATIO, CLEAR_RATIO): Update.
* config/m68hc11/m68hc11.h (MOVE_RATIO): Update.
* config/cris/cris.h (MOVE_RATIO): Update.
* config/mn10300/mn10300.h (MOVE_RATIO): Update.
* config/arm/arm.h (MOVE_RATIO): Update.
* config/pa/pa.md: Update uses of MOVE_RATIO
* config/pa/pa.h (MOVE_RATIO): Update.
* config/mips/mips.h (MOVE_RATIO, MOVE_BY_PIECES, CLEAR_RATIO, SET_RATIO): Update.
* config/h8300/h8300.h (MOVE_RATIO): Update.
* config/v850/v850.h (MOVE_RATIO): Update.
* config/bfin/bfin.h (MOVE_RATIO): Update.
From-SVN: r139855
|
|
* fwprop.c (should_replace_address): Add speed attribute.
(PR_OPTIMIZE_FOR_SPEED): New flag.
(propagate_rtx_1): Use it.
(propagate_rtx): Set it.
(try_fwprop_subst): Update call of rtx_costs.
(forward_propagate_and_simplify): LIkewise.
* hooks.c (hook_int_rtx_bool_0): New
(hook_bool_rtx_int_int_intp_false): Replace by ...
(hook_bool_rtx_int_int_intp_bool_false): .. thisone.
* hooks.h (hook_int_rtx_bool_0): New
(hook_bool_rtx_int_int_intp_false): Replace by ...
(hook_bool_rtx_int_int_intp_bool_false): .. thisone.
* optabs.c (avoid_expensive_constant): UPdate call of rtx_cost.
(prepare_cmp_insn): UPdate call of rtx_cost.
* postreload.c (reload_cse_simplify_set): Update call of rtx_cost.
(reload_cse_simplify_operands): Update call of rtx_cost.
(reload_cse_move2add): call of rtx_cost.
* target.h (struct gcc_target): Update rtx_costs and address_costs.
* rtlanal.c (rtx_cost): Add speed argument.
(address_cost): Add speed argument
(default_address_cost): Likewise.
(insn_rtx_cost): Likewise.
* cfgloopanal.c (seq_cost): Add speed argument.
(target_reg_cost, target_spill_cost): Turn to array.
(init_set_costs): Update for speed.
(estimate_reg_pressure_cost): Add speed argument.
* auto-inc-dec.c (attempt_change): Update call of rtx_cost.
* dojump.c (prefer_and_bit_test): UPdate call of rtx_cost.
* tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed.
(seq_cost): Add speed argument.
(computation_cost): Add speed arugment.
(add_cost, multiply_by_const, get_address_cost): add speed argument.
(force_expr_to_var_cost): Update for profile info.
(force_var_cost): Likewise.
(split_address_cost): Likewise.
(ptr_difference_cost): Likewise.
(difference_cost): Likewise.
(get_computation_cost_at): Likewise.
(determine_iv_cost): Likewise.
(ivopts_global_cost_for_size): Likewise.
(rewrite_use_address): Likewise.
(tree_ssa_iv_optimize_loop): Initialize speed field.
* cse.c (optimize_this_for_speed_p): New static var.
(notreg_cost): Update call of rtx_cost.
(cse_extended_basic_block): set optimize_this_for_speed_p.
* ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost.
(noce_try_cmove_arith): Likewise.
(noce_try_sign_mask): LIkewise.
* expr.c (compress_float_constant): Update rtx_cost calls.
* tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument.
(addr_to_parts): Likewise.
(create_mem_ref): Likewise.
* dse.c (find_shift_sequence): Add speed argument.
(replace_read): Update call.
* calls.c (precompute_register_parameters): Update call of rtx_cost.
* expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost,
* neg_cost, shift_cost, shiftadd_cost,
shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost,
mul_highpart_cost): Increase dimension.
(init_expmed): Initialize for both size and speed.
(expand_shift): Use profile.
(synth_mult): Use profile.
(choose_mult_variant): Use profile.
(expand_mult): Use profile.
(expand_mult_highpart_optab): Use profile.
(expand_mult_highpart): Use profile.
(expand_smod_pow2): Use profile.
(expand_divmod): Use profile.
* simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost.
* loop-invariant.c (create_new_invariant): Use profile.
(gain_for_invariant): Add speed parameter.
(best_gain_for_invariant): Likewise.
(find_invariants_to_move): Likewise.
(move_single_loop_invariants): Set it.
* target-def.h (TARGET_RTX_COSTS): Use hook.
* rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe.
(optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare.
* output.h (default_address_cost): Update prototype.
* combine.c (optimize_this_for_speed_p): New static var.
(combine_validate_cost): Update call of rtx_cost.
(combine_instructions): Set optimize_this_for_speed_p.
(expand_compound_operation): Update call of rtx_cost.
(make_extraction):Update call of rtx_cost.
(force_to_mode):Update call of rtx_cost.
(distribute_and_simplify_rtx):Update call of rtx_cost.
* cfgloop.h (target_reg_cost, target_spill_cost): Turn to array.
(estimate_reg_pressure_cost): Update prototype.
* tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype.
* basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p):
Remove.
* config/alpha/alpha.c (alpha_rtx_costs): Update.
(alpha_rtx_costs): Update.
* config/frv/frv.c (frv_rtx_costs): Update.
* config/s390/s390.c (s390_rtx_costs): Update.
* config/m32c/m32c.c (m32c_memory_move_cost): Update.
(m32c_rtx_costs): Update.
* config/spu/spu.c (TARGET_ADDRESS_COST): Upate.
(spu_rtx_costs): Update.
* config/sparc/sparc.c (sparc_rtx_costs): Update.
* config/m32r/m32r.c (m32r_rtx_costs): Update.
* config/i386/i386.c (:ix86_address_cost): Update.
(ix86_rtx_costs): Update.
* config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update.
* config/pdp11/pdp11.c (pdp11_rtx_costs): Update.
* config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update.
* config/crx/crx.c (crx_address_cost): Update.
* config/xtensa/xtensa.c (xtensa_rtx_costs): Update.
* config/stormy16/stormy16.c
(xstormy16_address_cost, xstormy16_rtx_costs): Update.
* config/m68hc11/m68hc11.c
(m68hc11_address_cost, m68hc11_rtx_costs): Update.
* config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update.
* config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update.
* config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update
* config/ia64/ia64.c (ia64_rtx_costs): Update.
* config/m68k/m68k.c (m68k_rtx_costs): Update.
* config/rs6000/rs6000.c (rs6000_rtx_costs): Update.
* config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update.
* config/mcore/mcore.c (TARGET_ADDRESS_COST): Update.
(mcore_rtx_costs): update.
* config/score/score3.c (score3_rtx_costs): Update.
* config/score/score7.c (score7_rtx_costs): Update.
* config/score/score3.h (score3_rtx_costs):Update.
* config/score/score7.h (score7_rtx_costs): Update.
* config/score/score.c (score_rtx_costs): Update.
* config/arm/arm.c (arm_address_cost): Update.
(arm_rtx_costs_1): Update.
(arm_rtx_costs_1): Update.
(arm_size_rtx_costs): Update.
(arm_size_rtx_costs): Update.
(arm_size_rtx_costs): Update.
(arm_xscale_rtx_costs): Update.
(arm_thumb_address_cost): Update.
* config/pa/pa.c (hppa_address_cost): Update.
* config/mips/mips.c (mips_rtx_costs): Update.
* config/vax/vax.c (vax_address_cost): Update.
* config/h8300/h8300.c (h8300_shift_costs): Update.
(h8300_rtx_costs): Update.
* config/v850/v850.c (TARGET_ADDRESS_COST): Update.
(v850_rtx_costs): Update.
* config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update.
* config/bfin/bfin.c
(bfin_address_cost): Update.
(bfin_rtx_costs): Update.
* stmt.c (lshift_cheap_p): Update.
From-SVN: r139821
|
|
* tree.h (IS_CONVERT_EXPR_CODE_P): Renamed to
* CONVERT_EXPR_CODE_P.
* tree-ssa-threadedge.c (simplify_control_stmt_condition): Use
CONVERT_EXPR_P.
* tree-data-ref.c (split_constant_offset_1): Likewise.
* tree-inline.c (estimate_operator_cost): Use CASE_CONVERT.
* tree-sra.c (sra_walk_expr): Likewise.
* matrix-reorg.c (ssa_accessed_in_assign_rhs): Likewise.
* tree-ssa-loop-niter.c (expand_simple_operations): Likewise.
* gimple.h (gimple_assign_cast_p): Use CONVERT_EXPR_CODE_P.
* tree-ssa-structalias.c (find_func_aliases, find_func_aliases):
* Likewise.
* gimple.c (gimple_assign_unary_nop_p): Likewise.
* tree-vect-transform.c (vectorizable_type_demotion)
(vectorizable_type_promotion): Likewise.
* tree-inline.c (expand_call_inline):
* tree-ssa-forwprop.c (get_prop_source_stmt, can_propagate_from)
(forward_propagate_addr_expr_1, forward_propagate_comparison)
(tree_ssa_forward_propagate_single_use_vars): Likewise.
* expr.c (expand_expr_real_1): Likewise.
* tree-ssa-dom.c (hashable_expr_equal_p,
* iterative_hash_hashable_expr)
(gimple_assign_unary_useless_conversion_p): Likewise.
* tree-stdarg.c (execute_optimize_stdarg): Likewise.
* tree-ssa-ccp.c (ccp_fold, fold_gimple_assign): Likewise.
* fold-const.c (fold_unary): Likewise.
* tree.h (CONVERT_EXPR_P): Likewise.
* tree.c (simple_cst_equal, iterative_hash_expr): Likewise.
* tree-ssa-loop-im.c (rewrite_bittest): Likewise.
* tree-vrp.c:
(register_edge_assert_for_2, extract_range_from_unary_expr)
(register_edge_assert_for_1): Likewise.
* cp/tree.c (cp_tree_equal): Likewise.
From-SVN: r139204
|
|
inner memory reference.
* expr.c (expand_expr_real_1) <VIEW_CONVERT_EXPR>: When converting
to BLKmode, try to fetch an inner memory reference. Use 'mode' in
lieu of TYPE_MODE (type) throughout.
From-SVN: r139139
|
|
2008-08-13 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/36701
* expr.c (emit_group_store): Allocate stack temp with the
largest alignment when copying from register to stack.
From-SVN: r139062
|