* sched-deps.c (sched_insn_is_legitimate_for_speculation): Invoke
may_trap_or_fault_p instead of may_trap_p predicate.
* tree.c (substitute_in_expr): Propagate the TREE_THIS_NOTRAP flag.
(substitute_placeholder_in_expr): Likewise.
* tree-inline.c (remap_gimple_op_r): Propagate the TREE_THIS_NOTRAP
flag on MEM_REF nodes.
(copy_tree_body_r): Propagate the TREE_READONLY and TREE_THIS_NOTRAP
flags on INDIRECT_REF nodes.
ada/
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set
TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
* gcc-interface/trans.c (Identifier_to_gnu): Set TREE_THIS_NOTRAP on
the INDIRECT_REF node built for objects used by reference.
* gcc-interface/utils2.c (build_binary_op): Add short-circuit for
constant result. Set TREE_THIS_NOTRAP on ARRAY_REF and ARRAY_RANGE_REF.
(gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
From-SVN: r165468
gcc/testsuite:
* objc.dg/pr45878.m: Update to include NSConstantString interface
for -fnext-runtime.
* objc.dg/pr23214.m: Use the Object1.m implementation to build m64 on
-fnext-runtime, XFAIL the m64 -fnext-runtime run.
* objc.dg/objc-foreach-4.m: Provide an NSConstantString dummy class
reference for m64 -fnext-runtime.
From-SVN: r165461
* params.c (params_finished): New.
(add_params): Assert !params_finished.
(finish_params): New.
(set_param_value_internal): Take params and params_set
parameters. Assert params_finished.
(set_param_value, maybe_set_param_value): Take params and
params_set parameters. Update calls to set_param_value_internal.
(set_default_param_value): Assert !params_finished. Don't use
set_param_value_internal.
(default_param_value, init_param_values): New.
* params.h (struct param_info): Change value to default_value.
Remove set.
(set_param_value, maybe_set_param_value): Add params and
params_set parameters.
(PARAM_VALUE): Get parameters from global_options.
(PARAM_SET_P): Remove.
(finish_params, default_param_value, init_param_values): New.
* common.opt (param_values): New Variable.
* config/arm/arm.c (arm_option_override): Pass extra arguments to
maybe_set_param_value.
* config/i386/i386.c (ix86_option_override_internal): Pass extra
arguments to maybe_set_param_value.
* config/picochip/picochip.c (picochip_option_override): Pass
extra arguments to maybe_set_param_value.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Pass
extra arguments to maybe_set_param_value.
* config/s390/s390.c (s390_option_override): Use
maybe_set_param_value instead of set_param_value. Pass extra
arguments to maybe_set_param_value.
* config/sparc/sparc.c (sparc_option_override): Pass extra
arguments to maybe_set_param_value.
* config/spu/spu.c (spu_option_override): Pass extra arguments to
maybe_set_param_value.
* opts.c (handle_param): Take opts and opts_set parameters.
Update call to set_param_value.
(initial_min_crossjump_insns,
initial_max_fields_for_field_sensitive,
initial_loop_invariant_max_bbs_in_loop): Remove.
(init_options_once): Don't set them.
(init_options_struct): Initialize parameters structures.
(default_options_optimization): Use default_param_value when
restoring defaults. Update calls to maybe_set_param_value.
(finish_options): Update calls to maybe_set_param_value.
(common_handle_option): Update calls to handle_param and
set_param_value.
* toplev.c (DEFPARAM): Update definition for changes to
param_info.
(general_init): Call finish_params.
From-SVN: r165460
* config/mn10300/mn10300.h (CONSTANT_ALIGNMENT): Define.
(DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
(FIRST_PSEUDO_REGISTER): Increase by one.
(FIXED_REGISTERS, CALL_USED_REGISTERS): Update with CC_REG.
(HARD_REGNO_MODE_OK): Call mn10300_hard_regno_mode_ok.
(MODES_TIEABLE): Call mn10300_modes_tieable.
(REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS): Add
CC_REGS.
(LEGITIMATE_CONSTANT_P): Call mn10300_legitimate_constant_p.
(CC_OVERFLOW_UNUSABLE, CC_NO_CARRY, NOTICE_UPDATE_CC)
(SELECT_CC_MODE, REVERSIBLE_CC_MODE): Delete.
(REGISTER_NAMES, ADDITIONAL_REGISTER_NAMES): Add CC register.
(ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Delete.
(mn10300_cc_status_mdep): Delete.
(CC_STATUS_MDEP, CC_STATUS_MDEP_INIT): Delete.
* config/mn10300/mn10300 (mn10300_option_override): Stop disabling
the combine-stack-adjust pass.
(print_operand): Use the mode of the comparison operation to
select the comparison suffix.
(notice_update_cc): Delete.
(mn10300_secondary_reload_class): Remove test for stack pointer
based arithmetic.
(output_tst): Rename to mn10300_output_cmp.
(impossible_plus_operand): Move into predicates.md.
(mn10300_legitimize_address): Make static.
(mn10300_legitimate_address_p): Make static. Only allow SI sized
constant pic operands.
(mn10300_legitimate_constant_p): New function.
(mn10300_case_values_threshold): Make static.
(mn10300_hard_regno_mode_ok): New function.
(mn10300_modes_tieable): New function.
(mn10300_select_cc_mode): New function.
* config/mn10300/predicates.md (impossible_plus_operand): Define.
* config/mn10300/mn10300-protos.h: Tidy.
(mn10300_legitimate_constant_p, mn10300_modes_tieable)
(mn10300_hard_regno_mode_ok, mn10300_select_cc_mode): Prototype.
* config/mn10300/mn10300.md (cc attribute): Delete. Replace
with clobbers or sets of CC_REG.
(CC_REG): Define.
(mov*): Remove use of CLR instruction.
(cbranch_si4_<code>): New pattern/split.
(integer_conditional_branch): New pattern.
(cbranch_sf4_<code>): New pattern/split.
(float_conditional_branch): New pattern.
(casesi): Use addsi3 pattern instead of movsi pattern to add and
move a value at the same time.
(cc0 peepholes): Remove.
From-SVN: r165459
* sel-sched-ir.c (init_global_and_expr_for_insn): Set CANT_MOVE on RTX_FRAME_RELATED_P
insns and the insn to which NOTE_INSN_EPILOGUE_BEG is attached.
* sched-vis.c (print_value): Allow NULL value.
* gcc.target/ia64/20101005.c: New test.
From-SVN: r165455
PR rtl-optimization/45570
* sel-sched-ir.c (cfg_preds_1): When walking out of the region, assert
that we are pipelining outer loops. Allow returning zero predecessors.
* gcc.dg/pr45570.c: New test.
From-SVN: r165454
* sel-sched-ir.c (maybe_tidy_empty_bb): Simplify comment.
(tidy_control_flow): Tidy vertical space.
(sel_remove_bb): New variable idx. Use it to remember the basic
block index before deleting the block.
(sel_remove_empty_bb): Remove dead code, simplify and insert to ...
(sel_merge_blocks): ... here.
* sel-sched-ir.h (sel_remove_empty_bb): Remove prototype.
From-SVN: r165453
* cse.c (is_dead_reg): Change into inline function that is not
called through for_each_rtx.
(set_live_p): Adjust caller.
(insn_live_p): Don't reset DEBUG_INSNs here.
(struct dead_debug_insn_data): New data.
(count_stores, is_dead_debug_insn, replace_dead_reg): New functions.
(delete_trivially_dead_insns): If there is just one setter for the
dead reg that is referenced by some DEBUG_INSNs, create a DEBUG_EXPR
and add DEBUG_INSN for it right before the removed setter and
use the DEBUG_EXPR instead of the dead pseudo.
From-SVN: r165452
PR rtl-optimization/45912
* ira-costs.c (ira_tune_allocno_costs_and_cover_classes): Test the
regno of registers instead of their index to compute the alignment.
From-SVN: r165437
2010-10-13 Richard Guenther <rguenther@suse.de>
PR objc/45878
* gimple-fold.c (gimple_fold_obj_type_ref): Leave OBJ_TYPE_REFs
alone if there are no virtual methods.
* objc.dg/pr45878.m: New testcase.
From-SVN: r165435
gcc/
* config/arm/arm.h (REG_CLASS_CONTENTS): Remove soft frame pointer
from CORE_REGS and GENERAL_REGS classes.
* config/arm/arm.md (*thumb1_movsi_insn): Ignore all parts of
final constraint for register preferencing.
From-SVN: r165424
2010-10-13 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45982
* tree-ssa-structalias.c (make_constraints_to): New function.
(make_constraint_to): Implement in terms of make_constraints_to.
(find_func_aliases): Properly make return values of pure/const
functions escape if they assign to sth that is not a pointer.
* gcc.dg/torture/pr45982.c: New testcase.
* gcc.dg/tree-ssa/pr24287.c: Adjust.
* gcc.dg/tree-ssa/pta-callused.c: Likewise.
* gcc.dg/torture/pr39074-2.c: Likewise.
From-SVN: r165418
2010-10-13 Richard Guenther <rguenther@suse.de>
PR middle-end/45874
* cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee):
Fixup the CFG when EH was fixed up.
* g++.dg/torture/pr45874.C: New testcase.
From-SVN: r165416
In libobjc/:
2010-10-13 Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/23214
* init.c (objc_init_statics): Do not skip the initialization of a
statics list if the first object has already been initialized; in
the case of Protocols, while the first one may have been
initialized, some others may not have been initialized yet.
In gcc/testsuite/:
2010-10-13 Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/23214
* objc.dg/pr23214.m: New.
From-SVN: r165414