gcc/
* Makefile.in (target-globals.o): Depend on $(RTL_H).
* rtl.h: (target_rtl): New structure.
(default_target_rtl): Declare.
(this_target_rtl): Declare as a variable or define as a macro.
(global_rtl, pic_offset_table_rtx, return_address_pointer_rtx):
Redefine as macros.
* emit-rtl.c (default_target_rtl): New variable.
(this_target_rtl): New conditional variable.
(global_rtl, static_regno_reg_rtx, pic_offset_table_rtx)
(return_address_pointer_rtx): Delete.
(initial_regno_reg_rtx): New macro.
(init_emit): Use initial_regno_reg_rtx instead of static_regno_reg_rtx.
(init_emit_regs): Likewise.
* target-globals.h (this_target_rtl): Declare.
(target_globals): Add a rtl field.
(restore_target_globals): Copy the rtl field to this_target_rtl.
* target-globals.c: Include rtl.h.
(default_target_globals): Initialize the rtl field.
(save_target_globals): Likewise.
From-SVN: r162088
gcc/
* Makefile.in (target-globals.o): Depend on $(REGS_H).
* regs.h (target_reg_modes): New structure.
(default_target_reg_modes): Declare.
(this_target_reg_modes): Declare as a variable or define as a macro.
(hard_regno_nregs, reg_raw_mode): Redefine as macros.
* reginfo.c (default_target_reg_modes): New variable.
(this_target_reg_modes): New conditional variable.
(hard_regno_nregs, reg_raw_mode): Delete.
* target-globals.h (this_target_regs): Declare.
(target_globals): Add a regs field.
(restore_target_globals): Copy the regs field to this_target_regs.
* target-globals.c: Include regs.h.
(default_target_globals): Initialize the regs field.
(save_target_globals): Likewise.
From-SVN: r162087
* config/arm/arm.c (arm_get_frame_offsets): Don't use r3 to
align the stack when it's going to be saved.
testsuite/
* gcc.target/arm/interrupt-1.c: New test.
* gcc.target/arm/interrupt-2.c: New test.
From-SVN: r162078
PR pch/14940
* config/host-solaris.c (mmap_fixed): New function.
(sol_gt_pch_get_address): Use it.
(sol_gt_pch_use_address): Likewise.
From-SVN: r162074
* config/i386/i386.c (ix86_asm_output_function_label): Change format
string placeholder from 0x%x to %#x.
(ix86_code_end): Use putc to output '\n'.
(ix86_print_operand) <case ';'>: Use putc to output ';'.
From-SVN: r162067
2010-07-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/44773
* trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
if the lhs has never been host associated, as well as not being
use associated, a pointer or a target.
* resolve.c (resolve_variable): Mark variables that are host
associated.
* gfortran.h: Add the host_assoc bit to the symbol_attribute
structure.
From-SVN: r162038
2010-07-10 Richard Guenther <rguenther@suse.de>
PR lto/44889
* gimple.c (gimple_fixup_complete_and_incomplete_subtype_p): New
helper function.
(gimple_types_compatible_p): Similar to pointed-to
types allow and merge a mix of complete and incomplete aggregate.
Use gimple_fixup_complete_and_incomplete_subtype_p for that.
(iterative_hash_gimple_type): Adjust for that.
* gcc.dg/lto/20100709-1_0.c: New testcase.
* gcc.dg/lto/20100709-1_1.c: Likewise.
From-SVN: r162032
gcc/
PR objc/44140
* config/darwin.c (output_objc_section_asm_op): Save and restore
section when outputting ObjC section list.
testsuite/
PR objc/44140
* objc.dg/lto/trivial-1_0.m: New.
* objc.dg/lto/lto.exp: New.
* obj-c++.dg/lto/trivial-1_0.mm: New.
* obj-c++.dg/lto/lto.exp: New.
* objc.dg/symtab-1.m: Adjust sizes.
* objc.dg/image-info.m: Do not run for gnu-runtime.
gcc/objc/
PR objc/44140
* objc-act.c: build_objc_string_decl() remove declaration.
(finish_var_decl): Remove forcing of var output and marking
as "Used".
(init_def_list): Use integer_zero_node.
(init_objc_symtab): Use integer_zero_node, make the short
integer type specific on relevant nodes.
(generate_objc_symtab_decl): Remove call to
forward_declare_categories(). Use null_pointer_node where
appropriate.
(build_module_descriptor): Comment and mark this item as
DECL_PRESERVE_P.
(generate_static_references): Use gcc_unreachable instead of
abort ().
(diagnose_missing_method): New.
(build_next_selector_translation_table): New.
(build_gnu_selector_translation_table): New.
(add_objc_string): Merge code from build_objc_string_decl...
... and delete build_objc_string_decl().
(generate_dispatch_table): Make integer types explicit.
(generate_category): Pass implent and arrange for the data
to be extracted within the routine. Do not start new vars,
but finish the ones collcted during parsing.
(generate_shared_structures): Likewise.
(finish_objc): Reorder code so that we finish variables before
referencing them. Save the global data before calling meta-data
creation routines, and pass the current reference to the two
main routines. Only call generate_objc_image_info () for the
NeXT runtime.
(generate_classref_translation_entry): Comment on and make this
item DECL_PRESERVE_P.
(handle_class_ref): Use varpool interfaces, comment on and make
this item DECL_PRESERVE_P.
(handle_impent): Likewise.
(generate_objc_image_info): Only generate when the content is
non-zero. Make integer types explict.
From-SVN: r162030
2010-07-09 Changpeng Fang <changpeng.fang@amd.com>
PR tree-optimization/44576
* tree-ssa-loop-prefetch.c (trip_count_to_ahead_ratio_too_small_p):
New. Pull out from is_loop_prefetching_profitable to implement
the trip count to ahead ratio heuristic.
(mem_ref_count_reasonable_p): New. Pull out from
is_loop_prefetching_profitable to implement the instruction to
memory reference ratio heuristic. Also consider not reasonable if
the memory reference count is above a threshold (to avoid
explosive compilation time.
(insn_to_prefetch_ratio_too_small_p): New. Pull out from
is_loop_prefetching_profitable to implement the instruction to
prefetch ratio heuristic.
(is_loop_prefetching_profitable): Removed.
(loop_prefetch_arrays): Distribute the cost analysis across the
function to allow early exit of the prefetch analysis.
is_loop_prefetching_profitable is splitted into three functions,
with each one called as early as possible.
(PREFETCH_MAX_MEM_REFS_PER_LOOP): New. Threshold above which the
number of memory references in a loop is considered too many.
From-SVN: r162023
* config/arm/arm.md (cbranchqi4): Fix array size.
(addsi3_cbranch): Also andle alternative 2 like alternative 3 when
calculating length.
From-SVN: r162022
* reload.c (find_reloads): Don't clear badop if we have a
winreg alternative, but not win, and the class only has fixed
regs.
* hard-reg-set.h (class_only_fixed_regs): Declare.
* reginfo.c (class_only_fixed_regs): New array.
(init_reg_sets_1): Initialize it.
* config/arm/arm.md (arm_addsi3, thumb1_addsi3, arm_subsi3_insn): Don't
discourage alternatives using the stack pointer.
testsuite/
* gcc.dg/pr32370.c: Allow another kind of error message.
From-SVN: r162019
2010-07-09 Richard Guenther <rguenther@suse.de>
* gimple.c (struct type_fixup_s): New struct and VEC type.
(gimple_register_type_fixups): New static global.
(gimple_queue_type_fixup): New function.
(gimple_types_compatible_p): Queue type fixups instead of
applying them here.
(gimple_register_type): Apply queued fixups for the
canonical type. Empty the type fixup queue.
From-SVN: r162017
2010-07-09 Janus Weil <janus@gcc.gnu.org>
* intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
SIZEOF and C_SIZEOF.
From-SVN: r162006
2010-07-09 Richard Guenther <rguenther@suse.de>
PR middle-end/44890
* tree-ssa-address.c (create_mem_ref_raw): Only build a MEM_REF
if base is a pointer.
* tree-cfg.c (verify_expr): Update MEM_REF checking.
From-SVN: r162005