* config/m32c/m32c.c (classes_intersect): Remove.
(m32c_preferred_reload_class, m32c_secondary_reload_class): Use
reg_classes_intersect_p instead of classes_intersect.
(class_can_hold_mode): Change arguments type from enum reg_class to
reg_class_t. Use reg_class_contents instead of class_contents.
(m32c_register_move_cost): Make static. Change arguments type from
enum reg_class to reg_class_t. Use reg_classes_intersect_p instead of
classes_intersect. Use reg_class_contents instead of class_contents.
(m32c_memory_move_cost): Make static. Change arguments type from
enum reg_class to reg_class_t.
(TARGET_REGISTER_MOVE_COST, TARGET_MEMORY_MOVE_COST): Define.
* config/m32c/m32c.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
* config/m32c/m32c-protos.h (m32c_register_move_cost,
m32c_memory_move_cost): Remove.
From-SVN: r163693
2010-08-31 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/44480
* include/bits/hashtable.h (_Hashtable<>::_M_begin_bucket_index):
Add, caching the index of the first non-empty bucket.
(begin, cbegin): Use it.
(_Hashtable<>::_Hashtable(_InputIterator, _InputIterator, ...),
_Hashtable(const _Hashtable&), _Hashtable(_Hashtable&&),
swap(_Hashtable&), clear): Adjust.
(_M_insert_bucket, _M_insert, erase(const_iterator),
erase(const key_type&), _M_rehash): Update it.
* include/bits/hashtable.h (_Hashtable<>::_M_erase): Remove.
(erase(const_iterator)): Inline the latter.
From-SVN: r163686
* config/arm/arm-protos.h (arm_function_arg_advance): Delete.
(arm_function_arg): Delete.
(arm_needs_doubleword_align): Take a const_tree.
* config/arm/arm.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/arm/arm.c (aapcs_select_call_coproc): Take a const_tree.
(aapcs_layout_arg, arm_needs_doubleword_align): Likewise.
(arm_function_arg): Make static. Take a const_tree and a bool.
(arm_function_arg_advance): Likewise.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
From-SVN: r163683
Stack usage support
* common.opt (-fstack-usage): New option.
* doc/invoke.texi (Debugging options): Document it.
* builtins.c (expand_builtin_apply): Pass TRUE as 4th argument to
allocate_dynamic_stack_space.
(expand_builtin_alloca): Add 4th bool parameter CANNOT_ACCUMULATE
and propagate it to allocate_dynamic_stack_space.
(expand_builtin) <BUILT_IN_ALLOCA>: Adjust for above change.
* calls.c (initialize_argument_information): Pass TRUE as 4th
argument to allocate_dynamic_stack_space.
(expand_call): Set current_function_has_unbounded_dynamic_stack_size
to 1 when pushing a variable-sized argument onto the stack. Pass
TRUE as 4th argument to allocate_dynamic_stack_space.
Update current_function_pushed_stack_size.
(emit_library_call_value_1): Likewise.
* explow.c (allocate_dynamic_stack_space): Add 4th bool parameter
CANNOT_ACCUMULATE. If flag_stack_usage, look into the size and
attempt to find an upper bound. Remove redundant code for the
SETJMP_VIA_SAVE_AREA case.
* expr.h (allocate_dynamic_stack_space): Add 4th bool parameter.
* function.h (struct stack_usage): New structure.
(current_function_static_stack_size): New macro.
(current_function_dynamic_stack_size): Likewise.
(current_function_pushed_stack_size): Likewise.
(current_function_dynamic_alloc_count): Likewise.
(current_function_has_unbounded_dynamic_stack_size): Likewise.
(current_function_allocates_dynamic_stack_space): Likewise.
(struct function): Add new field 'su'.
* function.c (instantiate_virtual_regs): If SETJMP_VIA_SAVE_AREA,
add the value of the dynamic offset to the dynamic stack usage.
(gimplify_parameters): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA
for variable-sized objects.
(prepare_function_start): Allocate cfun->su if flag_stack_usage.
(rest_of_handle_thread_prologue_and_epilogue): Call output_stack_usage.
* gimplify.c (gimplify_decl_expr): Set ALLOCA_FOR_VAR_P on call to
BUILT_IN_ALLOCA for variable-sized objects.
* output.h (output_stack_usage): Declare.
* toplev.c (stack_usage_file): New file pointer.
(output_stack_usage): New function.
(open_auxiliary_file): Likewise.
(lang_dependent_init): Open file if flag_stack_usage is set.
(finalize): Close file if stack_usage_file is not null.
* tree.h (ALLOCA_FOR_VAR_P): New macro.
* config/alpha/alpha.c (compute_frame_size): New function.
(alpha_expand_prologue): Use it.
(alpha_start_function): Likewise.
(alpha_expand_epilogue): Likewise. Set stack usage info.
* config/i386/i386.c (ix86_expand_prologue): Likewise.
* config/ia64/ia64.c (ia64_expand_prologue): Likewise.
* config/mips/mips.c (mips_expand_prologue): Likewise.
* config/pa/pa.c (hppa_expand_prologue): Likewise.
* config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
* config/sparc/sparc.c (sparc_expand_prologue): Likewise.
testsuite/
* lib/gcc-dg.exp (cleanup-stack-usage): New procedure.
* lib/scanasm.exp (scan-stack-usage): Likewise.
(scan-stack-usage-not): Likewise.
* gcc.dg/stack-usage-1.c: New test.
* gcc.target/i386/stack-usage-realign.c: Likewise.
From-SVN: r163660
PR tree-optimization/45427
* tree-ssa-loop-niter.c (number_of_iterations_ne_max): Rewritten.
Handle the case that the exit is never taken correctly.
(number_of_iterations_ne): Pass exit_must_be_taken to
number_of_iterations_ne_max.
* gcc.dg/tree-ssa/pr45427.c: New test.
From-SVN: r163659
* gcc-interface/trans.c (call_to_gnu): Also force the return slot opt
for the call to a function whose return type was unconstrained.
From-SVN: r163648
* gcc-interface/decl.c (FOREIGN_FORCE_REALIGN_STACK): New macro,
replacement for FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN.
(gnat_to_gnu_entity) <case ..., E_Procedure>: Use it.
From-SVN: r163641
* config/i386/i386.md (zero_extendsidi2_1): Rename from
zero_extendsidi2_32.
(zero_extend<mode>di2): Macroize insn from zero_extend{qi,hi}di2
using SWI12 mode iterator.
(zero_extendhisi2_and): Merge insn pattern and corresponding spliter
to define_insn_and_split pattern.
(zero_extendqi<mode>2): Macroize expander from zero_extendqi{hi,si}2
using SWI24 mode iterator.
(*zero_extendqi<mode>2_and): Macroize insn from
*zero_extendqi{hi,si}2_and using SWI24 mode iterator.
(*zero_extendqi<mode>2_movzbl_and): Macroize insn from
*zero_extendqihi2_movzbw_and and *zero_extendqisi2_movzbl_and using
SWI24 mode iterator.
(*zero_extendqi<mode>2_movzbl): Ditto from
*zero_extendqi{hi,si}2_movzbl.
(extendsidi2_1): Rename from extendsidi2_32.
(extend<mode>di2): Macroize insn from extend{qi,hi}di2 using
SWI12 mode iterator.
From-SVN: r163636
2010-08-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/42769
* resolve.c (resolve_structure_cons): For derived types, make sure the
type has been resolved.
(resolve_typebound_procedures): Make sure the vtab has been generated.
2010-08-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/42769
* gfortran.dg/dynamic_dispatch_11.f03: New.
From-SVN: r163631
* config/ia64/ia64.h (HARD_REGNO_NREGS): Return 1 for CCImode in
general purpose registers.
(HARD_REGNO_MODE_OK): Accept CCImode in general purpose registers.
* config/ia64/ia64.md (*movcci): Change to named pattern. Deal
with general purpose registers and memory operands. Add associated
CCImode post-reload splitter.
* config/ia64/div.md: Change BImode to CCImode throughout.
From-SVN: r163630