In libobjc/:
2010-10-14 Nicola Pero <nicola.pero@meta-innovation.com>
* init.c (__objc_init_protocol): New function which fixes up a
protocol's class pointer, registers it with the runtime, register
all protocol selectors and registers associated protocols too.
(objc_init_statics): Detect if we are initializing protocols, and
if so, use __objc_init_protocol instead of only fixing up the
class pointer.
(__objc_init_protocls): Use __objc_init_protocol.
* objc-private/module-abi-8.h: Updated comments.
* objc-private/runtime.h
(__objc_register_selectors_from_description_list): New.
* selector.c (__objc_register_selectors_from_description_list):
New. (struct objc_method_description_list): Declare.
* Protocol.m ([-descriptionForInstanceMethod:]): Use sel_get_name
when accessing the name of a method, which is now correctly a SEL.
([-descriptionForClassMethod:]): Same change.
* protocols.c (protocol_getMethodDescription): Same change.
* objc/runtime.h: Updated comments.
(sel_registerTypedName): Fixed typo in function name.
From-SVN: r165499
2010-10-15 Chung-Lin Tang <cltang@codesourcery.com>
* ifcvt.c (find_active_insn_before): New function.
(find_active_insn_after): New function.
(cond_exec_process_if_block): Use new functions to replace
prev_active_insn() and next_active_insn().
testsuite/
* gcc.dg/20101010-1.c: New testcase.
From-SVN: r165495
2010-10-14 Richard Guenther <rguenther@suse.de>
PR tree-optimization/44913
* tree-data-ref.c (disjoint_objects_p): Remove.
(dr_may_alias_p): Simplify. Only hand the base object to
the alias-oracle.
* tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle
some more trees, bail out instead of asserting.
(ptr_derefs_may_alias_p): Likewise. Export.
(refs_may_alias_p_1): Handle STRING_CSTs.
* tree-ssa-alias.h (ptr_derefs_may_alias_p): Declare.
* gcc.dg/torture/pr44913.c: New testcase.
From-SVN: r165473
PR c/45969
* c-typeck.c (build_binary_op): Don't try to compute a semantic
type with excess precision for boolean operations.
testsuite:
* gcc.c-torture/compile/pr45969-1.c: New test.
From-SVN: r165472
* 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