aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-06-30 20:05:04 +0000
committerRichard Guenther <rguenther@suse.de>2010-06-30 20:05:04 +0000
commit2abc4a304fd71623c18110e25f80787ab517474c (patch)
treeab0634e35f34f84e476a60fe8be10ff3e7d4f18b
parent1a00539f6a8d8e30065f11f4bd7700e0189ff82c (diff)
parent558576dc4194174b62f4d976e5a9ec4ca3e71abc (diff)
2010-06-30 Richard Guenther <rguenther@suse.de>mem-ref2
Merge from trunk r161633. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/mem-ref2@161638 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog152
-rw-r--r--gcc/ChangeLog.mem-ref24
-rw-r--r--gcc/Makefile.in39
-rw-r--r--gcc/bt-load.c3
-rw-r--r--gcc/c-parser.c12
-rw-r--r--gcc/cfgrtl.c3
-rw-r--r--gcc/config/alpha/alpha.c6
-rw-r--r--gcc/config/bfin/bfin.c5
-rw-r--r--gcc/config/darwin.c2
-rw-r--r--gcc/config/frv/frv.c9
-rw-r--r--gcc/config/i386/i386.c21
-rw-r--r--gcc/config/ia64/ia64.c7
-rw-r--r--gcc/config/mips/mips.c6
-rw-r--r--gcc/config/pa/pa.c11
-rw-r--r--gcc/config/picochip/picochip-protos.h4
-rw-r--r--gcc/config/picochip/picochip.c22
-rw-r--r--gcc/config/rs6000/rs6000.c21
-rw-r--r--gcc/config/s390/s390.c6
-rw-r--r--gcc/config/sh/sh-protos.h6
-rw-r--r--gcc/config/sh/sh.c10
-rw-r--r--gcc/config/xtensa/xtensa-protos.h6
-rw-r--r--gcc/config/xtensa/xtensa.c6
-rw-r--r--gcc/coretypes.h5
-rw-r--r--gcc/cp/ChangeLog14
-rw-r--r--gcc/cp/parser.c14
-rw-r--r--gcc/cp/repo.c12
-rw-r--r--gcc/doc/tm.texi37
-rw-r--r--gcc/doc/tm.texi.in37
-rw-r--r--gcc/final.c3
-rw-r--r--gcc/function.c3
-rw-r--r--gcc/gimple-fold.c24
-rw-r--r--gcc/graphite-sese-to-poly.c15
-rw-r--r--gcc/ipa-split.c7
-rw-r--r--gcc/ira-costs.c3
-rw-r--r--gcc/ira.c2
-rw-r--r--gcc/recog.c3
-rw-r--r--gcc/reg-stack.c3
-rw-r--r--gcc/regrename.c3
-rw-r--r--gcc/reload.c9
-rw-r--r--gcc/reload1.c15
-rw-r--r--gcc/rtl-error.c3
-rw-r--r--gcc/rtl-error.h24
-rw-r--r--gcc/rtl.h13
-rw-r--r--gcc/sel-sched.c4
-rw-r--r--gcc/target.def74
-rw-r--r--gcc/targhooks.c23
-rw-r--r--gcc/targhooks.h16
-rw-r--r--gcc/testsuite/ChangeLog14
-rw-r--r--gcc/testsuite/c-c++-common/uninit-17.c25
-rw-r--r--gcc/testsuite/gcc.dg/pr44699.c157
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ipa-split-4.c29
-rw-r--r--gcc/toplev.h12
-rw-r--r--gcc/tree-inline.c1
-rw-r--r--gcc/tree-vrp.c7
54 files changed, 710 insertions, 262 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 20716b5ea76..af1148791b9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,155 @@
+2010-06-30 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ PR other/44566
+ * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define.
+ * target.def (struct gcc_target): Replace enum reg_class with
+ reg_class_t in hook argument / return types.
+ * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise.
+ (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise.
+ (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise.
+ * targhooks.h (default_branch_target_register_class): Likewise.
+ (default_ira_cover_classes, default_secondary_reload): Likewise.
+ (default_memory_move_cost, default_register_move_cost): Likewise.
+ * targhooks.c (default_branch_target_register_class): Likewise.
+ (default_ira_cover_classes, default_secondary_reload): Likewise.
+ (default_memory_move_cost, default_register_move_cost): Likewise.
+ * reload.c (push_secondary_reload, secondary_reload_class): Likewise.
+ * bt-load.c (branch_target_load_optimize): Likewise.
+ * ira.c (setup_cover_and_important_classes): Likewise.
+ * ira-costs.c (copy_cost): Likewise.
+ * reload1.c (emit_input_reload_insns): Likewise.
+ * config/alpha/alpha.c (alpha_secondary_reload): Likewise.
+ * config/frv/frv.c (frv_secondary_reload): Likewise.
+ * config/s390/s390.c (s390_secondary_reload): Likewise.
+ * config/i386/i386.c (i386_ira_cover_classes): Likewise.
+ (ix86_secondary_reload, ix86_memory_move_cost): Likewise.
+ (ix86_register_move_cost): Likewise.
+ * config/sh/sh-protos.h (sh_secondary_reload): Likewise.
+ * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise.
+ * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise.
+ * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise.
+ * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise.
+ (rs6000_ira_cover_classes): Likewise.
+ * config/picochip/picochip.c (picochip_secondary_reload): Likewise.
+ * config/picochip/picochip-protos.h (picochip_secondary_reload):
+ Likewise.
+ * config/pa/pa.c (pa_secondary_reload): Likewise.
+ * config/mips/mips.c (mips_ira_cover_classes): Likewise.
+ * config/bfin/bfin.c (bfin_secondary_reload): Likewise.
+ * config/ia64/ia64.c (ia64_register_move_cost): Likewise.
+ * doc/tm.texi: Regenerate.
+
+2010-06-30 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR bootstrrap/44726
+ * graphite-sese-to-poly.c (build_poly_dr): Avoid uninitialized
+ use.
+ (build_alias_set_optimal_p): Likewise.
+ (build_base_obj_set_for_drs): Likewise.
+
+2010-06-30 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * target.def: Remove comment about licensing problems of function
+ declarations.
+
+ * target.def (declare_constant_name): Change exp to expr. Use DEFHOOK.
+ * doc/tm.texi.in (TARGET_ASM_DECLARE_CONSTANT_NAME): Use @hook.
+ * doc/tm.texi: Regenerate.
+
+ * target.def (builtin_reciprocal): Change tm_fn to md_fn. Use DEFHOOK.
+ * doc/tm.texi.in (TARGET_BUILTIN_RECIPROCAL): Use @hook.
+
+ * target.def (enum_va_list_p): Use DEFHOOK.
+ * doc/tm.texi.in (TARGET_ENUM_VA_LIST_P): Use @hook.
+ Rename ptype to ptree.
+ * doc/tm.texi: Regenerate.
+
+ * target.def (fold_builtin): Rename nargs to n_args. Use DEFHOOK.
+ * doc/tm.texi.in (TARGET_FOLD_BUILTIN): Use @hook.
+ * doc/tm.texi: Regenerate.
+
+ * target.def (memory_move_cost): Use DEFHOOK.
+ * doc/tm.texi.in (TARGET_MEMORY_MOVE_COST): Use @hook.
+ Rename regclass AKA class to rclass.
+ * doc/tm.texi: Regenerate.
+
+ * target.def (pragma_parse): Use DEFHOOK.
+ * doc/tm.texi.in (TARGET_OPTION_PRAGMA_PARSE): Use @hook.
+ s/TARGET_VALID_OPTION_ATTRIBUTE_P/TARGET_OPTION_VALID_ATRIBUTE_P/ .
+ * doc/tm.texi: Regenerate.
+
+ * target.def (pass_by_reference): Use DEFHOOK.
+ * doc/tm.texi.in (TARGET_PASS_BY_REFERENCE): Use @hook.
+ * doc/tm.texi: Regenerate.
+
+ * target.def (resolve_overloaded_builtin): Rename params to arglist.
+ Use DEFHOOK.
+ * doc/tm.texi.in (TARGET_RESOLVE_OVERLOADED_BUILTIN): Use @hook.
+ * doc/tm.texi: Regenerate.
+
+ * target.def (return_pops_args): Use DEFHOOK.
+ * doc/tm.texi.in (TARGET_RETURN_POPS_ARGS): Use @hook.
+ Rename stack-size to size.
+ * doc/tm.texi: Regenerate.
+
+ * target.def (dfa_new_cycle): Use DEFHOOK. Rename dump_file to dump,
+ last-sched_cycle to last_clock, cur_cycle to clock.
+ * doc/tm.texi.in: Use @hook.
+ * doc/tm.texi: Regenerate.
+
+ * target.def (print_operand, print_operand_address): Update comment.
+ (print_operand_punct_valid_p): Likewise.
+
+2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * toplev.h (_fatal_insn_not_found, _fatal_insn): Move declarations
+ to rtl.h.
+ (error_for_asm, warning_for_asm): Move declarations to rtl-error.h.
+ * rtl.h (_fatal_insn_not_found, _fatal_insn): Move declarations
+ here.
+ * rtl-error.h: New.
+ * regrename.c: Do not include toplev.h. Include rtl-error.h.
+ * rtl-error.c: Likewise.
+ * reload.c: Likewise.
+ * recog.c: Likewise.
+ * sel-sched.c: Likewise.
+ * function.c: Likewise.
+ * reg-stack.c: Likewise.
+ * cfgrtl.c: Likewise.
+ * reload1.c: Likewise.
+ * final.c: Include rtl-error.
+ * Makefile.in: Adjust dependencies.
+
+2010-06-30 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/PR44706
+ * ipa-split (split_function): Refine conditions when to use DECL_RESULT
+ to return the value.
+
+2010-06-30 Michael Matz <matz@suse.de>
+
+ PR bootstrap/44699
+ * tree-vrp.c (vrp_finalize): Deal with changing num_ssa_names.
+ * gimple-fold.c (gimplify_and_update_call_from_tree): If LHS is
+ a gimple reg, attach the original VDEF to the last store in the
+ sequence.
+
+2010-06-30 Iain Sandoe <iains@gcc.gnu.org>
+
+ PR other/44034
+ * config/darwin.c (darwin_override_options): Use renamed
+ targetm.asm_out.emit_unwind_label.
+
+2010-06-30 Bernd Schmidt <bernds@codesourcery.com>
+
+ PR tree-optimization/39799
+ * tree-inline.c (remap_ssa_name): Initialize variable only if
+ SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
+
+2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
+
+ * c-parser.c (c_parser_omp_for_loop): Use a VEC for for_block.
+
2010-06-30 Richard Guenther <rguenther@suse.de>
PR target/44722
diff --git a/gcc/ChangeLog.mem-ref2 b/gcc/ChangeLog.mem-ref2
index addeb302f22..ffb3c2e7c63 100644
--- a/gcc/ChangeLog.mem-ref2
+++ b/gcc/ChangeLog.mem-ref2
@@ -1,5 +1,9 @@
2010-06-30 Richard Guenther <rguenther@suse.de>
+ Merge from trunk r161633.
+
+2010-06-30 Richard Guenther <rguenther@suse.de>
+
Merge from trunk r161597.
2010-06-29 Richard Guenther <rguenther@suse.de>
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 65c0f228138..d717332b328 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -871,6 +871,7 @@ RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H) reg-notes.def insn-notes.def \
$(INPUT_H) $(REAL_H) statistics.h $(VEC_H) $(FIXED_VALUE_H) alias.h
FIXED_VALUE_H = fixed-value.h $(MACHMODE_H) double-int.h
RTL_H = $(RTL_BASE_H) genrtl.h vecir.h
+RTL_ERROR_H = $(RTL_H) $(DIAGNOSTIC_CORE_H)
READ_MD_H = $(OBSTACK_H) $(HASHTAB_H) read-md.h
PARAMS_H = params.h params.def
BUILTINS_DEF = builtins.def sync-builtins.def omp-builtins.def
@@ -2848,8 +2849,8 @@ main.o : main.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H)
host-default.o : host-default.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
hosthooks.h $(HOSTHOOKS_DEF_H)
-rtl-error.o: rtl-error.c $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(INSN_ATTR_H) insn-config.h $(INPUT_H) $(TOPLEV_H) intl.h $(DIAGNOSTIC_H) \
+rtl-error.o: rtl-error.c $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
+ $(INSN_ATTR_H) insn-config.h $(INPUT_H) intl.h $(DIAGNOSTIC_H) \
$(CONFIG_H)
rtl.o : rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
@@ -2869,10 +2870,10 @@ varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(HASHTAB_H) $(TARGET_H) langhooks.h gt-varasm.h $(BASIC_BLOCK_H) \
$(CFGLAYOUT_H) $(CGRAPH_H) targhooks.h tree-mudflap.h \
tree-iterator.h
-function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
$(TREE_H) $(CFGLAYOUT_H) $(GIMPLE_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) \
$(OPTABS_H) libfuncs.h $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \
- output.h $(TOPLEV_H) $(EXCEPT_H) $(HASHTAB_H) $(GGC_H) $(TM_P_H) langhooks.h \
+ output.h $(EXCEPT_H) $(HASHTAB_H) $(GGC_H) $(TM_P_H) langhooks.h \
gt-function.h $(TARGET_H) $(BASIC_BLOCK_H) $(INTEGRATE_H) $(PREDICT_H) \
$(TREE_PASS_H) $(DF_H) $(TIMEVAR_H) vecprim.h
statistics.o : statistics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
@@ -3199,9 +3200,9 @@ cfgexpand.o : cfgexpand.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(DIAGNOSTIC_H) $(TOPLEV_H) $(BASIC_BLOCK_H) $(FLAGS_H) debug.h $(PARAMS_H) \
value-prof.h $(TREE_INLINE_H) $(TARGET_H) $(SSAEXPAND_H) \
tree-pretty-print.h gimple-pretty-print.h $(BITMAP_H) sbitmap.h $(INSN_ATTR_H)
-cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
$(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
- output.h $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) $(TM_P_H) $(INSN_ATTR_H) \
+ output.h $(FUNCTION_H) $(EXCEPT_H) $(TM_P_H) $(INSN_ATTR_H) \
insn-config.h $(EXPR_H) \
$(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \
$(TREE_PASS_H) $(DF_H) $(GGC_H)
@@ -3265,13 +3266,13 @@ bitmap.o : bitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) $(GGC_H) gt-bitmap.h $(BITMAP_H) $(OBSTACK_H) $(HASHTAB_H)
vec.o : vec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(VEC_H) $(GGC_H) \
$(TOPLEV_H) $(HASHTAB_H)
-reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
$(FLAGS_H) output.h $(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) \
- hard-reg-set.h insn-config.h $(REGS_H) $(FUNCTION_H) real.h $(TOPLEV_H) \
+ hard-reg-set.h insn-config.h $(REGS_H) $(FUNCTION_H) real.h \
addresses.h $(TM_P_H) $(PARAMS_H) $(TARGET_H) $(DF_H) ira.h
-reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
$(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \
- $(BASIC_BLOCK_H) $(RECOG_H) output.h $(FUNCTION_H) $(TOPLEV_H) $(TM_P_H) \
+ $(BASIC_BLOCK_H) $(RECOG_H) output.h $(FUNCTION_H) $(TM_P_H) \
addresses.h $(EXCEPT_H) $(TREE_H) $(FLAGS_H) $(MACHMODE_H) \
$(OBSTACK_H) $(DF_H) $(TARGET_H) $(EMIT_RTL_H) ira.h
rtlhooks.o : rtlhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
@@ -3380,8 +3381,8 @@ sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(SCHED_INT_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H) \
$(TREE_PASS_H) $(INSN_ATTR_H)
sel-sched.o : sel-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
- $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
+ $(RTL_ERROR_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
+ $(FUNCTION_H) $(INSN_ATTR_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
$(TM_P_H) output.h $(TARGET_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(SCHED_INT_H) $(GGC_H) $(TREE_H) langhooks.h rtlhooks-def.h \
$(SEL_SCHED_IR_H) $(SEL_SCHED_DUMP_H) sel-sched.h $(DBGCNT_H) $(EMIT_RTL_H)
@@ -3397,21 +3398,21 @@ sel-sched-ir.o : sel-sched-ir.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TM_P_H) $(TARGET_H) $(TIMEVAR_H) $(TREE_PASS_H) $(SCHED_INT_H) $(GGC_H) \
$(TREE_H) langhooks.h rtlhooks-def.h $(SEL_SCHED_IR_H) $(SEL_SCHED_DUMP_H) \
$(EMIT_RTL_H)
-final.o : final.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+final.o : final.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
$(TREE_H) $(FLAGS_H) intl.h $(REGS_H) $(RECOG_H) conditions.h \
insn-config.h $(INSN_ATTR_H) $(FUNCTION_H) output.h hard-reg-set.h \
$(EXCEPT_H) debug.h xcoffout.h $(TOPLEV_H) reload.h dwarf2out.h \
$(TREE_PASS_H) $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H) \
$(CFGLAYOUT_H) dbxout.h $(TIMEVAR_H) $(CGRAPH_H) $(COVERAGE_H) \
$(DF_H) vecprim.h $(GGC_H) $(CFGLOOP_H) $(PARAMS_H) $(TREE_FLOW_H)
-recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
$(FUNCTION_H) $(BASIC_BLOCK_H) $(REGS_H) $(RECOG_H) $(EXPR_H) \
- $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(TOPLEV_H) output.h reload.h \
+ $(FLAGS_H) insn-config.h $(INSN_ATTR_H) output.h reload.h \
addresses.h $(TM_P_H) $(TIMEVAR_H) $(TREE_PASS_H) hard-reg-set.h \
$(DF_H) $(DBGCNT_H) $(TARGET_H)
reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(RTL_H) $(TREE_H) $(RECOG_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
- insn-config.h $(TOPLEV_H) reload.h $(FUNCTION_H) $(TM_P_H) $(GGC_H) \
+ $(RTL_ERROR_H) $(TREE_H) $(RECOG_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
+ insn-config.h reload.h $(FUNCTION_H) $(TM_P_H) $(GGC_H) \
$(BASIC_BLOCK_H) $(CFGLAYOUT_H) output.h $(TIMEVAR_H) \
$(TREE_PASS_H) $(TARGET_H) vecprim.h $(DF_H) $(EMIT_RTL_H)
sreal.o: sreal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) sreal.h
@@ -3443,9 +3444,9 @@ regcprop.o : regcprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
output.h $(RECOG_H) $(FUNCTION_H) $(OBSTACK_H) $(FLAGS_H) $(TM_P_H) \
addresses.h reload.h $(TOPLEV_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H)
regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(RTL_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
+ $(RTL_ERROR_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
output.h $(RECOG_H) $(FUNCTION_H) $(OBSTACK_H) $(FLAGS_H) $(TM_P_H) \
- addresses.h reload.h $(TOPLEV_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H)
+ addresses.h reload.h $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H)
ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(REGS_H) $(TOPLEV_H) $(FLAGS_H) insn-config.h $(FUNCTION_H) $(RECOG_H) \
$(TARGET_H) $(BASIC_BLOCK_H) $(EXPR_H) output.h $(EXCEPT_H) $(TM_P_H) \
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index 5e3d12c359a..abb033fc096 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -1458,7 +1458,8 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
static void
branch_target_load_optimize (bool after_prologue_epilogue_gen)
{
- enum reg_class klass = targetm.branch_target_register_class ();
+ enum reg_class klass
+ = (enum reg_class) targetm.branch_target_register_class ();
if (klass != NO_REGS)
{
/* Initialize issue_rate. */
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index ac81d7699c4..0493524a1b2 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -8150,10 +8150,11 @@ c_parser_omp_for_loop (location_t loc,
c_parser *parser, tree clauses, tree *par_clauses)
{
tree decl, cond, incr, save_break, save_cont, body, init, stmt, cl;
- tree declv, condv, incrv, initv, for_block = NULL, ret = NULL;
+ tree declv, condv, incrv, initv, ret = NULL;
bool fail = false, open_brace_parsed = false;
int i, collapse = 1, nbraces = 0;
location_t for_loc;
+ VEC(tree,gc) *for_block = make_tree_vector ();
for (cl = clauses; cl; cl = OMP_CLAUSE_CHAIN (cl))
if (OMP_CLAUSE_CODE (cl) == OMP_CLAUSE_COLLAPSE)
@@ -8185,8 +8186,7 @@ c_parser_omp_for_loop (location_t loc,
if (c_parser_next_token_starts_declaration (parser))
{
if (i > 0)
- for_block
- = tree_cons (NULL, c_begin_compound_stmt (true), for_block);
+ VEC_safe_push (tree, gc, for_block, c_begin_compound_stmt (true));
c_parser_declaration_or_fndef (parser, true, true, true, true, true);
decl = check_for_loop_decls (for_loc);
if (decl == NULL)
@@ -8416,15 +8416,15 @@ c_parser_omp_for_loop (location_t loc,
ret = stmt;
}
pop_scopes:
- while (for_block)
+ while (!VEC_empty (tree, for_block))
{
/* FIXME diagnostics: LOC below should be the actual location of
this particular for block. We need to build a list of
locations to go along with FOR_BLOCK. */
- stmt = c_end_compound_stmt (loc, TREE_VALUE (for_block), true);
+ stmt = c_end_compound_stmt (loc, VEC_pop (tree, for_block), true);
add_stmt (stmt);
- for_block = TREE_CHAIN (for_block);
}
+ release_tree_vector (for_block);
return ret;
}
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index bf617373762..3138281b589 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
-#include "rtl.h"
#include "hard-reg-set.h"
#include "basic-block.h"
#include "regs.h"
@@ -50,7 +49,7 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "function.h"
#include "except.h"
-#include "toplev.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "obstack.h"
#include "insn-attr.h"
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index b6a83cba916..a67097a3c2c 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -1569,10 +1569,12 @@ alpha_preferred_reload_class(rtx x, enum reg_class rclass)
RCLASS requires an extra scratch or immediate register. Return the class
needed for the immediate register. */
-static enum reg_class
-alpha_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
+static reg_class_t
+alpha_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
enum machine_mode mode, secondary_reload_info *sri)
{
+ enum reg_class rclass = (enum reg_class) rclass_i;
+
/* Loading and storing HImode or QImode values to and from memory
usually requires a scratch register. */
if (!TARGET_BWX && (mode == QImode || mode == HImode || mode == CQImode))
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index c187bf3bbc7..1232ecc7378 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -2458,8 +2458,8 @@ bfin_memory_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
RCLASS requires an extra scratch register. Return the class needed for the
scratch register. */
-static enum reg_class
-bfin_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
+static reg_class_t
+bfin_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
enum machine_mode mode, secondary_reload_info *sri)
{
/* If we have HImode or QImode, we can only use DREGS as secondary registers;
@@ -2467,6 +2467,7 @@ bfin_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
enum reg_class default_class = GET_MODE_SIZE (mode) >= 4 ? DPREGS : DREGS;
enum reg_class x_class = NO_REGS;
enum rtx_code code = GET_CODE (x);
+ enum reg_class rclass = (enum reg_class) rclass_i;
if (code == SUBREG)
x = SUBREG_REG (x), code = GET_CODE (x);
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 1adff12ea73..5801e431dfd 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1864,7 +1864,7 @@ darwin_override_options (void)
/* Disable -freorder-blocks-and-partition for darwin_emit_unwind_label. */
if (flag_reorder_blocks_and_partition
- && (targetm.asm_out.unwind_label == darwin_emit_unwind_label))
+ && (targetm.asm_out.emit_unwind_label == darwin_emit_unwind_label))
{
inform (input_location,
"-freorder-blocks-and-partition does not work with exceptions "
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 057bbdf1452..9454bd25e7b 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -1,5 +1,5 @@
/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009 Free Software Foundation, Inc.
+ 2008, 2009, 2010 Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
This file is part of GCC.
@@ -384,7 +384,7 @@ static int frv_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
tree, bool);
static void frv_output_dwarf_dtprel (FILE *, int, rtx)
ATTRIBUTE_UNUSED;
-static bool frv_secondary_reload (bool, rtx, enum reg_class,
+static reg_class_t frv_secondary_reload (bool, rtx, reg_class_t,
enum machine_mode,
secondary_reload_info *);
static bool frv_frame_pointer_required (void);
@@ -6492,12 +6492,13 @@ frv_secondary_reload_class (enum reg_class rclass,
called from init_reg_autoinc() in regclass.c - before the reload optabs
have been initialised. */
-static bool
-frv_secondary_reload (bool in_p, rtx x, enum reg_class reload_class,
+static reg_class_t
+frv_secondary_reload (bool in_p, rtx x, reg_class_t reload_class_i,
enum machine_mode reload_mode,
secondary_reload_info * sri)
{
enum reg_class rclass = NO_REGS;
+ enum reg_class reload_class = (enum reg_class) reload_class_i;
if (sri->prev_sri && sri->prev_sri->t_icode != CODE_FOR_nothing)
{
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 8a8b57aee5e..ec2cdd38d83 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -25293,13 +25293,13 @@ ix86_free_from_memory (enum machine_mode mode)
/* Implement TARGET_IRA_COVER_CLASSES. If -mfpmath=sse, we prefer
SSE_REGS to FLOAT_REGS if their costs for a pseudo are the
same. */
-static const enum reg_class *
+static const reg_class_t *
i386_ira_cover_classes (void)
{
- static const enum reg_class sse_fpmath_classes[] = {
+ static const reg_class_t sse_fpmath_classes[] = {
GENERAL_REGS, SSE_REGS, MMX_REGS, FLOAT_REGS, LIM_REG_CLASSES
};
- static const enum reg_class no_sse_fpmath_classes[] = {
+ static const reg_class_t no_sse_fpmath_classes[] = {
GENERAL_REGS, FLOAT_REGS, MMX_REGS, SSE_REGS, LIM_REG_CLASSES
};
@@ -25409,8 +25409,8 @@ ix86_preferred_output_reload_class (rtx x, enum reg_class regclass)
return regclass;
}
-static enum reg_class
-ix86_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
+static reg_class_t
+ix86_secondary_reload (bool in_p, rtx x, reg_class_t rclass,
enum machine_mode mode,
secondary_reload_info *sri ATTRIBUTE_UNUSED)
{
@@ -25663,10 +25663,10 @@ inline_memory_move_cost (enum machine_mode mode, enum reg_class regclass,
}
static int
-ix86_memory_move_cost (enum machine_mode mode, enum reg_class regclass,
+ix86_memory_move_cost (enum machine_mode mode, reg_class_t regclass,
bool in)
{
- return inline_memory_move_cost (mode, regclass, in ? 1 : 0);
+ return inline_memory_move_cost (mode, (enum reg_class) regclass, in ? 1 : 0);
}
@@ -25678,9 +25678,12 @@ ix86_memory_move_cost (enum machine_mode mode, enum reg_class regclass,
general registers. */
static int
-ix86_register_move_cost (enum machine_mode mode, enum reg_class class1,
- enum reg_class class2)
+ix86_register_move_cost (enum machine_mode mode, reg_class_t class1_i,
+ reg_class_t class2_i)
{
+ enum reg_class class1 = (enum reg_class) class1_i;
+ enum reg_class class2 = (enum reg_class) class2_i;
+
/* In case we require secondary memory, compute cost of the store followed
by load. In order to avoid bad register allocation choices, we need
for this to be *at least* as high as the symmetric MEMORY_MOVE_COST. */
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 511ca155ab1..0b6df619244 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -5207,8 +5207,11 @@ ia64_rtx_costs (rtx x, int code, int outer_code, int *total,
one in class TO, using MODE. */
static int
-ia64_register_move_cost (enum machine_mode mode, enum reg_class from,
- enum reg_class to)
+ia64_register_move_cost (enum machine_mode mode, enum reg_class from_i,
+ enum reg_class to_i)
+{
+ enum reg_class from = (enum reg_class) from_i;
+ enum reg_class to = (enum reg_class) to_i;
{
/* ADDL_REGS is the same as GR_REGS for movement purposes. */
if (to == ADDL_REGS)
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 29f0f0b74f3..ccdfbbc3fd1 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -10929,14 +10929,14 @@ mips_register_move_cost (enum machine_mode mode,
/* Implement TARGET_IRA_COVER_CLASSES. */
-static const enum reg_class *
+static const reg_class_t *
mips_ira_cover_classes (void)
{
- static const enum reg_class acc_classes[] = {
+ static const reg_class_t acc_classes[] = {
GR_AND_ACC_REGS, FP_REGS, COP0_REGS, COP2_REGS, COP3_REGS,
ST_REGS, LIM_REG_CLASSES
};
- static const enum reg_class no_acc_classes[] = {
+ static const reg_class_t no_acc_classes[] = {
GR_REGS, FP_REGS, COP0_REGS, COP2_REGS, COP3_REGS,
ST_REGS, LIM_REG_CLASSES
};
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 5f42a1ac622..2640f05e1bc 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -155,9 +155,9 @@ static bool pa_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
static int pa_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
tree, bool);
static struct machine_function * pa_init_machine_status (void);
-static enum reg_class pa_secondary_reload (bool, rtx, enum reg_class,
- enum machine_mode,
- secondary_reload_info *);
+static reg_class_t pa_secondary_reload (bool, rtx, reg_class_t,
+ enum machine_mode,
+ secondary_reload_info *);
static void pa_extra_live_on_entry (bitmap);
static enum machine_mode pa_promote_function_mode (const_tree,
enum machine_mode, int *,
@@ -5688,11 +5688,12 @@ output_arg_descriptor (rtx call_insn)
fputc ('\n', asm_out_file);
}
-static enum reg_class
-pa_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
+static reg_class_t
+pa_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
enum machine_mode mode, secondary_reload_info *sri)
{
int is_symbolic, regno;
+ enum reg_class rclass = (enum reg_class) rclass_i;
/* Handle the easy stuff first. */
if (rclass == R1_REGS)
diff --git a/gcc/config/picochip/picochip-protos.h b/gcc/config/picochip/picochip-protos.h
index 875bb1d2a31..4a80bd16d5d 100644
--- a/gcc/config/picochip/picochip-protos.h
+++ b/gcc/config/picochip/picochip-protos.h
@@ -73,9 +73,9 @@ extern int picochip_symbol_offset (rtx operand);
extern int picochip_get_function_arg_boundary (enum machine_mode mode);
-extern enum reg_class picochip_secondary_reload(bool in_p,
+extern reg_class_t picochip_secondary_reload(bool in_p,
rtx x,
- enum reg_class cla,
+ reg_class_t cla,
enum machine_mode mode,
secondary_reload_info *sri);
diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c
index 499c55d9677..2e8dbb92355 100644
--- a/gcc/config/picochip/picochip.c
+++ b/gcc/config/picochip/picochip.c
@@ -1,5 +1,5 @@
/* Subroutines used for code generation on picoChip processors.
- Copyright (C) 2001,2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2008, 2009, 2010 Free Software Foundation, Inc.
Contributed by picoChip Designs Ltd. (http://www.picochip.com)
Maintained by Daniel Towner (daniel.towner@picochip.com) and
Hariharan Sandanagobalane (hariharan@picochip.com)
@@ -103,12 +103,12 @@ int picochip_legitimize_reload_address (rtx *x, enum machine_mode mode,
rtx picochip_struct_value_rtx(tree fntype ATTRIBUTE_UNUSED, int incoming ATTRIBUTE_UNUSED);
rtx picochip_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
bool outgoing ATTRIBUTE_UNUSED);
-enum reg_class
+reg_class_t
picochip_secondary_reload (bool in_p,
- rtx x ATTRIBUTE_UNUSED,
- enum reg_class cla ATTRIBUTE_UNUSED,
- enum machine_mode mode,
- secondary_reload_info *sri);
+ rtx x ATTRIBUTE_UNUSED,
+ reg_class_t cla ATTRIBUTE_UNUSED,
+ enum machine_mode mode,
+ secondary_reload_info *sri);
void
picochip_asm_named_section (const char *name,
unsigned int flags ATTRIBUTE_UNUSED,
@@ -4363,12 +4363,12 @@ picochip_get_high_const (rtx value)
choice of two registers to choose from, so that we a guaranteed to
get at least one register which is different to the output
register. This trick is taken from the alpha implementation. */
-enum reg_class
+reg_class_t
picochip_secondary_reload (bool in_p,
- rtx x ATTRIBUTE_UNUSED,
- enum reg_class cla ATTRIBUTE_UNUSED,
- enum machine_mode mode,
- secondary_reload_info *sri)
+ rtx x ATTRIBUTE_UNUSED,
+ reg_class_t cla ATTRIBUTE_UNUSED,
+ enum machine_mode mode,
+ secondary_reload_info *sri)
{
if (mode == QImode && !TARGET_HAS_BYTE_ACCESS)
{
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 6222bab60f4..36187c95cd5 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1240,11 +1240,11 @@ bool (*rs6000_cannot_change_mode_class_ptr) (enum machine_mode,
enum reg_class)
= rs6000_cannot_change_mode_class;
-static enum reg_class rs6000_secondary_reload (bool, rtx, enum reg_class,
- enum machine_mode,
- struct secondary_reload_info *);
+static reg_class_t rs6000_secondary_reload (bool, rtx, reg_class_t,
+ enum machine_mode,
+ struct secondary_reload_info *);
-static const enum reg_class *rs6000_ira_cover_classes (void);
+static const reg_class_t *rs6000_ira_cover_classes (void);
const int INSN_NOT_AVAILABLE = -1;
static enum machine_mode rs6000_eh_return_filter_mode (void);
@@ -13728,14 +13728,15 @@ rs6000_reload_register_type (enum reg_class rclass)
For VSX and Altivec, we may need a register to convert sp+offset into
reg+sp. */
-static enum reg_class
+static reg_class_t
rs6000_secondary_reload (bool in_p,
rtx x,
- enum reg_class rclass,
+ reg_class_t rclass_i,
enum machine_mode mode,
secondary_reload_info *sri)
{
- enum reg_class ret = ALL_REGS;
+ enum reg_class rclass = (enum reg_class) rclass_i;
+ reg_class_t ret = ALL_REGS;
enum insn_code icode;
bool default_p = false;
@@ -14127,11 +14128,11 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
account for the Altivec and Floating registers being subsets of the VSX
register set under VSX, but distinct register sets on pre-VSX machines. */
-static const enum reg_class *
+static const reg_class_t *
rs6000_ira_cover_classes (void)
{
- static const enum reg_class cover_pre_vsx[] = IRA_COVER_CLASSES_PRE_VSX;
- static const enum reg_class cover_vsx[] = IRA_COVER_CLASSES_VSX;
+ static const reg_class_t cover_pre_vsx[] = IRA_COVER_CLASSES_PRE_VSX;
+ static const reg_class_t cover_vsx[] = IRA_COVER_CLASSES_VSX;
return (TARGET_VSX) ? cover_vsx : cover_pre_vsx;
}
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 1b742357f26..7ff8cb870cd 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -2957,10 +2957,12 @@ s390_reload_symref_address (rtx reg, rtx mem, rtx scratch, bool tomem)
RCLASS requires an extra scratch or immediate register. Return the class
needed for the immediate register. */
-static enum reg_class
-s390_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
+static reg_class_t
+s390_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
enum machine_mode mode, secondary_reload_info *sri)
{
+ enum reg_class rclass = (enum reg_class) rclass_i;
+
/* Intermediate register needed. */
if (reg_classes_intersect_p (CC_REGS, rclass))
return GENERAL_REGS;
diff --git a/gcc/config/sh/sh-protos.h b/gcc/config/sh/sh-protos.h
index 782a88ea551..dc68af1332b 100644
--- a/gcc/config/sh/sh-protos.h
+++ b/gcc/config/sh/sh-protos.h
@@ -173,9 +173,9 @@ extern int sh_contains_memref_p (rtx);
extern int sh_loads_bankedreg_p (rtx);
extern rtx shmedia_prepare_call_address (rtx fnaddr, int is_sibcall);
struct secondary_reload_info;
-extern enum reg_class sh_secondary_reload (bool, rtx, enum reg_class,
- enum machine_mode,
- struct secondary_reload_info *);
+extern reg_class_t sh_secondary_reload (bool, rtx, reg_class_t,
+ enum machine_mode,
+ struct secondary_reload_info *);
extern int sh2a_get_function_vector_number (rtx);
extern int sh2a_is_function_vector_call (rtx);
extern void sh_fix_range (const char *);
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index d8d3985f0b7..b8d2be17c36 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -225,7 +225,7 @@ static int sh_variable_issue (FILE *, int, rtx, int);
static bool sh_function_ok_for_sibcall (tree, tree);
static bool sh_cannot_modify_jumps_p (void);
-static enum reg_class sh_target_reg_class (void);
+static reg_class_t sh_target_reg_class (void);
static bool sh_optimize_target_register_callee_saved (bool);
static bool sh_ms_bitfield_layout_p (const_tree);
@@ -10519,7 +10519,7 @@ sh_cannot_modify_jumps_p (void)
return (TARGET_SHMEDIA && (reload_in_progress || reload_completed));
}
-static enum reg_class
+static reg_class_t
sh_target_reg_class (void)
{
return TARGET_SHMEDIA ? TARGET_REGS : NO_REGS;
@@ -12158,10 +12158,12 @@ shmedia_prepare_call_address (rtx fnaddr, int is_sibcall)
return fnaddr;
}
-enum reg_class
-sh_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
+reg_class_t
+sh_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
enum machine_mode mode, secondary_reload_info *sri)
{
+ enum reg_class rclass = (enum reg_class) rclass_i;
+
if (in_p)
{
if (REGCLASS_HAS_FP_REG (rclass)
diff --git a/gcc/config/xtensa/xtensa-protos.h b/gcc/config/xtensa/xtensa-protos.h
index 6bd1e565fe7..729bc84bbbc 100644
--- a/gcc/config/xtensa/xtensa-protos.h
+++ b/gcc/config/xtensa/xtensa-protos.h
@@ -67,9 +67,9 @@ extern void xtensa_output_literal (FILE *, rtx, enum machine_mode, int);
extern rtx xtensa_return_addr (int, rtx);
extern enum reg_class xtensa_preferred_reload_class (rtx, enum reg_class, int);
struct secondary_reload_info;
-extern enum reg_class xtensa_secondary_reload (bool, rtx, enum reg_class,
- enum machine_mode,
- struct secondary_reload_info *);
+extern reg_class_t xtensa_secondary_reload (bool, rtx, reg_class_t,
+ enum machine_mode,
+ struct secondary_reload_info *);
#endif /* RTX_CODE */
#ifdef TREE_CODE
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index fe66711af39..5d891cde044 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -1,5 +1,5 @@
/* Subroutines for insn-output.c for Tensilica's Xtensa architecture.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
@@ -3089,8 +3089,8 @@ xtensa_preferred_reload_class (rtx x, enum reg_class rclass, int isoutput)
}
-enum reg_class
-xtensa_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
+reg_class_t
+xtensa_secondary_reload (bool in_p, rtx x, reg_class_t rclass,
enum machine_mode mode, secondary_reload_info *sri)
{
int regno;
diff --git a/gcc/coretypes.h b/gcc/coretypes.h
index 72097eed5f9..b631d94d85f 100644
--- a/gcc/coretypes.h
+++ b/gcc/coretypes.h
@@ -119,6 +119,11 @@ typedef const struct basic_block_def *const_basic_block;
obstack_chunk_alloc, \
obstack_chunk_free)
+/* enum reg_class is target specific, so it should not appear in
+ target-independent code or interfaces, like the target hook declarations
+ in target.h. */
+typedef int reg_class_t;
+
#else
struct _dont_use_rtx_here_;
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 72463e871d5..f72e7a6b97f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,17 @@
+2010-06-30 Michael Matz <matz@suse.de>
+
+ * repo.c ((finish_repo): Fix typo.
+
+2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
+
+ * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
+
+2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
+
+ * repo.c (pending_repo): Change type to a VEC.
+ (finish_repo): Adjust for new type of pending_repo.
+ (repo_emit_p): Likewise.
+
2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
* tree.c: Include gimple.h. Do not include tree-flow.h
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 4e4db2d6d76..e8f10a4d000 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -22705,11 +22705,12 @@ static tree
cp_parser_omp_for_loop (cp_parser *parser, tree clauses, tree *par_clauses)
{
tree init, cond, incr, body, decl, pre_body = NULL_TREE, ret;
- tree for_block = NULL_TREE, real_decl, initv, condv, incrv, declv;
+ tree real_decl, initv, condv, incrv, declv;
tree this_pre_body, cl;
location_t loc_first;
bool collapse_err = false;
int i, collapse = 1, nbraces = 0;
+ VEC(tree,gc) *for_block = make_tree_vector ();
for (cl = clauses; cl; cl = OMP_CLAUSE_CHAIN (cl))
if (OMP_CLAUSE_CODE (cl) == OMP_CLAUSE_COLLAPSE)
@@ -22828,8 +22829,7 @@ cp_parser_omp_for_loop (cp_parser *parser, tree clauses, tree *par_clauses)
LOOKUP_ONLYCONVERTING);
if (CLASS_TYPE_P (TREE_TYPE (decl)))
{
- for_block
- = tree_cons (NULL, this_pre_body, for_block);
+ VEC_safe_push (tree, gc, for_block, this_pre_body);
init = NULL_TREE;
}
else
@@ -23083,11 +23083,9 @@ cp_parser_omp_for_loop (cp_parser *parser, tree clauses, tree *par_clauses)
}
}
- while (for_block)
- {
- add_stmt (pop_stmt_list (TREE_VALUE (for_block)));
- for_block = TREE_CHAIN (for_block);
- }
+ while (!VEC_empty (tree, for_block))
+ add_stmt (pop_stmt_list (VEC_pop (tree, for_block)));
+ release_tree_vector (for_block);
return ret;
}
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
index 08a4d623d40..2a08c8fa412 100644
--- a/gcc/cp/repo.c
+++ b/gcc/cp/repo.c
@@ -43,7 +43,7 @@ static FILE *open_repo_file (const char *);
static char *afgets (FILE *);
static FILE *reopen_repo_file_for_write (void);
-static GTY(()) tree pending_repo;
+static GTY(()) VEC(tree,gc) *pending_repo;
static char *repo_name;
static const char *old_args, *old_dir, *old_main;
@@ -236,9 +236,10 @@ reopen_repo_file_for_write (void)
void
finish_repo (void)
{
- tree t;
+ tree val;
char *dir, *args;
FILE *repo_file;
+ unsigned ix;
if (!flag_use_repository || flag_compare_debug)
return;
@@ -266,9 +267,10 @@ finish_repo (void)
fprintf (repo_file, "\n");
}
- for (t = pending_repo; t; t = TREE_CHAIN (t))
+ for (ix = VEC_length (tree, pending_repo) - 1;
+ VEC_iterate (tree, pending_repo, ix, val);
+ ix--)
{
- tree val = TREE_VALUE (t);
tree name = DECL_ASSEMBLER_NAME (val);
char type = IDENTIFIER_REPO_CHOSEN (name) ? 'C' : 'O';
fprintf (repo_file, "%c %s\n", type, IDENTIFIER_POINTER (name));
@@ -352,7 +354,7 @@ repo_emit_p (tree decl)
if (!DECL_REPO_AVAILABLE_P (decl))
{
DECL_REPO_AVAILABLE_P (decl) = 1;
- pending_repo = tree_cons (NULL_TREE, decl, pending_repo);
+ VEC_safe_push (tree, gc, pending_repo, decl);
}
return IDENTIFIER_REPO_CHOSEN (DECL_ASSEMBLER_NAME (decl)) ? 1 : ret;
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index be04c38f50b..d6bc604b7ee 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -2648,7 +2648,7 @@ Don't define this macro unless the target machine has limitations which
require the macro to do something nontrivial.
@end defmac
-@deftypefn {Target Hook} {enum reg_class} TARGET_SECONDARY_RELOAD (bool @var{in_p}, rtx @var{x}, enum reg_class @var{reload_class}, enum machine_mode @var{reload_mode}, secondary_reload_info *@var{sri})
+@deftypefn {Target Hook} reg_class_t TARGET_SECONDARY_RELOAD (bool @var{in_p}, rtx @var{x}, reg_class_t @var{reload_class}, enum machine_mode @var{reload_mode}, secondary_reload_info *@var{sri})
Many machines have some registers that cannot be copied directly to or
from memory or even from other types of registers. An example is the
@samp{MQ} register, which on most machines, can only be copied to or
@@ -2888,7 +2888,7 @@ as below:
@end smallexample
@end defmac
-@deftypefn {Target Hook} {const enum reg_class *} TARGET_IRA_COVER_CLASSES (void)
+@deftypefn {Target Hook} {const reg_class_t *} TARGET_IRA_COVER_CLASSES (void)
Return an array of cover classes for the Integrated Register Allocator
(@acronym{IRA}). Cover classes are a set of non-intersecting register
classes covering all hard registers used for register allocation
@@ -3931,7 +3931,7 @@ suppresses this behavior and causes the parameter to be passed on the
stack in its natural location.
@end defmac
-@deftypefn {Target Hook} TARGET_RETURN_POPS_ARGS (@var{fundecl}, @var{funtype}, @var{stack-size})
+@deftypefn {Target Hook} int TARGET_RETURN_POPS_ARGS (tree @var{fundecl}, tree @var{funtype}, int @var{size})
This target hook returns the number of bytes of its own arguments that
a function pops on returning, or 0 if the function pops no arguments
and the caller must therefore pop them all after the function returns.
@@ -3954,12 +3954,12 @@ by their names. Note that ``library function'' in this context means
a function used to perform arithmetic, whose name is known specially
in the compiler and was not mentioned in the C code being compiled.
-@var{stack-size} is the number of bytes of arguments passed on the
+@var{size} is the number of bytes of arguments passed on the
stack. If a variable number of bytes is passed, it is zero, and
argument popping will always be the responsibility of the calling function.
On the VAX, all functions always pop their arguments, so the definition
-of this macro is @var{stack-size}. On the 68000, using the standard
+of this macro is @var{size}. On the 68000, using the standard
calling convention, no functions pop their arguments, so the value of
the macro is always 0 in this case. But an alternative calling
convention is available in which functions that take a fixed number of
@@ -4089,7 +4089,7 @@ register to be used by the caller for this argument; likewise
@code{FUNCTION_INCOMING_ARG}, for the called function.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_PASS_BY_REFERENCE (CUMULATIVE_ARGS *@var{cum}, enum machine_mode @var{mode}, tree @var{type}, bool @var{named})
+@deftypefn {Target Hook} bool TARGET_PASS_BY_REFERENCE (CUMULATIVE_ARGS *@var{cum}, enum machine_mode @var{mode}, const_tree @var{type}, bool @var{named})
This target hook should return @code{true} if an argument at the
position indicated by @var{cum} should be passed by reference. This
predicate is queried after target independent reasons for being
@@ -4268,13 +4268,13 @@ This hook returns a type node for @code{va_list} for the target.
The default version of the hook returns @code{void*}.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_ENUM_VA_LIST_P (int @var{idx}, const char ** @var{pname}, tree @var{ptype})
+@deftypefn {Target Hook} int TARGET_ENUM_VA_LIST_P (int @var{idx}, const char **@var{pname}, tree *@var{ptree})
This target hook is used in function @code{c_common_nodes_and_builtins}
to iterate through the target specific builtin types for va_list. The
variable @var{idx} is used as iterator. @var{pname} has to be a pointer
-to a @code{const char *} and @var{ptype} a pointer to a @code{tree} typed
+to a @code{const char *} and @var{ptree} a pointer to a @code{tree} typed
variable.
-The arguments @var{pname} and @var{ptype} are used to store the result of
+The arguments @var{pname} and @var{ptree} are used to store the result of
this macro and are set to the name of the va_list builtin type and its
internal type.
If the return value of this macro is zero, then there is no more element.
@@ -6122,7 +6122,7 @@ These macros are obsolete, new ports should use the target hook
@code{TARGET_REGISTER_MOVE_COST} instead.
@end defmac
-@deftypefn {Target Hook} int TARGET_REGISTER_MOVE_COST (enum machine_mode @var{mode}, enum reg_class @var{from}, enum reg_class @var{to})
+@deftypefn {Target Hook} int TARGET_REGISTER_MOVE_COST (enum machine_mode @var{mode}, reg_class_t @var{from}, reg_class_t @var{to})
This target hook should return the cost of moving data of mode @var{mode}
from a register in class @var{from} to one in class @var{to}. The classes
are expressed using the enumeration values such as @code{GENERAL_REGS}.
@@ -6170,9 +6170,9 @@ These macros are obsolete, new ports should use the target hook
@code{TARGET_MEMORY_MOVE_COST} instead.
@end defmac
-@deftypefn {Target Hook} int TARGET_MEMORY_MOVE_COST (enum machine_mode @var{mode}, enum reg_class @var{regclass}, bool @var{in})
+@deftypefn {Target Hook} int TARGET_MEMORY_MOVE_COST (enum machine_mode @var{mode}, reg_class_t @var{rclass}, bool @var{in})
This target hook should return the cost of moving data of mode @var{mode}
-between a register of class @var{class} and memory; @var{in} is @code{false}
+between a register of class @var{rclass} and memory; @var{in} is @code{false}
if the value is to be written to memory, @code{true} if it is to be read in.
This cost is relative to those in @code{TARGET_REGISTER_MOVE_COST}.
If moving between registers and memory is more expensive than between two
@@ -6181,7 +6181,7 @@ registers, you should add this target hook to express the relative cost.
If you do not add this target hook, GCC uses a default cost of 4 plus
the cost of copying via a secondary reload register, if one is
needed. If your machine requires a secondary reload register to copy
-between memory and a register of @var{class} but the reload mechanism is
+between memory and a register of @var{rclass} but the reload mechanism is
more complex than copying via an intermediate, use this target hook to
reflect the actual cost of the move.
@@ -6645,7 +6645,6 @@ The default is that any ready insns can be chosen to be issued.
@end deftypefn
@deftypefn {Target Hook} int TARGET_SCHED_DFA_NEW_CYCLE (FILE *@var{dump}, int @var{verbose}, rtx @var{insn}, int @var{last_clock}, int @var{clock}, int *@var{sort_p})
-
This hook is called by the insn scheduler before issuing @var{insn}
on cycle @var{clock}. If the hook returns nonzero,
@var{insn} is not issued on this processor cycle. Instead,
@@ -7780,7 +7779,7 @@ You may wish to use @code{ASM_OUTPUT_TYPE_DIRECTIVE} and/or
@code{ASM_OUTPUT_SIZE_DIRECTIVE} in the definition of this macro.
@end defmac
-@deftypefn {Target Hook} void TARGET_ASM_DECLARE_CONSTANT_NAME (FILE * @var{file}, const char * @var{name}, const_tree @var{expr}, HOST_WIDE_INT @var{size})
+@deftypefn {Target Hook} void TARGET_ASM_DECLARE_CONSTANT_NAME (FILE *@var{file}, const char *@var{name}, const_tree @var{expr}, HOST_WIDE_INT @var{size})
A target hook to output to the stdio stream @var{file} any text necessary
for declaring the name @var{name} of a constant which is being defined. This
target hook is responsible for outputting the label definition (perhaps using
@@ -9691,11 +9690,11 @@ information in the @var{struct cl_target_option} structure for
function specific options.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_OPTION_PRAGMA_PARSE (target @var{args})
+@deftypefn {Target Hook} bool TARGET_OPTION_PRAGMA_PARSE (tree @var{args}, tree @var{pop_target})
This target hook parses the options for @code{#pragma GCC option} to
set the machine specific options for functions that occur later in the
input stream. The options should be the same as handled by the
-@code{TARGET_VALID_OPTION_ATTRIBUTE_P} hook.
+@code{TARGET_OPTION_VALID_ATTRIBUTE_P} hook.
@end deftypefn
@deftypefn {Target Hook} void TARGET_OPTION_OVERRIDE (void)
@@ -10792,7 +10791,6 @@ built-in function.
@end deftypefn
@deftypefn {Target Hook} tree TARGET_RESOLVE_OVERLOADED_BUILTIN (unsigned int @var{loc}, tree @var{fndecl}, void *@var{arglist})
-
Select a replacement for a machine specific built-in function that
was set up by @samp{TARGET_INIT_BUILTINS}. This is done
@emph{before} regular type checking, and so allows the target to
@@ -10805,7 +10803,6 @@ another @code{CALL_EXPR}.
@end deftypefn
@deftypefn {Target Hook} tree TARGET_FOLD_BUILTIN (tree @var{fndecl}, int @var{n_args}, tree *@var{argp}, bool @var{ignore})
-
Fold a call to a machine specific built-in function that was set up by
@samp{TARGET_INIT_BUILTINS}. @var{fndecl} is the declaration of the
built-in function. @var{n_args} is the number of arguments passed to
@@ -10947,7 +10944,7 @@ cannot_modify_jumps_past_reload_p ()
@end smallexample
@end deftypefn
-@deftypefn {Target Hook} {enum reg_class} TARGET_BRANCH_TARGET_REGISTER_CLASS (void)
+@deftypefn {Target Hook} reg_class_t TARGET_BRANCH_TARGET_REGISTER_CLASS (void)
This target hook returns a register class for which branch target register
optimizations should be applied. All registers in this class should be
usable interchangeably. After reload, registers in this class will be
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 3c8c28d81bb..083d56ffd3b 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -3931,7 +3931,7 @@ suppresses this behavior and causes the parameter to be passed on the
stack in its natural location.
@end defmac
-@deftypefn {Target Hook} TARGET_RETURN_POPS_ARGS (@var{fundecl}, @var{funtype}, @var{stack-size})
+@hook TARGET_RETURN_POPS_ARGS
This target hook returns the number of bytes of its own arguments that
a function pops on returning, or 0 if the function pops no arguments
and the caller must therefore pop them all after the function returns.
@@ -3954,12 +3954,12 @@ by their names. Note that ``library function'' in this context means
a function used to perform arithmetic, whose name is known specially
in the compiler and was not mentioned in the C code being compiled.
-@var{stack-size} is the number of bytes of arguments passed on the
+@var{size} is the number of bytes of arguments passed on the
stack. If a variable number of bytes is passed, it is zero, and
argument popping will always be the responsibility of the calling function.
On the VAX, all functions always pop their arguments, so the definition
-of this macro is @var{stack-size}. On the 68000, using the standard
+of this macro is @var{size}. On the 68000, using the standard
calling convention, no functions pop their arguments, so the value of
the macro is always 0 in this case. But an alternative calling
convention is available in which functions that take a fixed number of
@@ -4089,7 +4089,7 @@ register to be used by the caller for this argument; likewise
@code{FUNCTION_INCOMING_ARG}, for the called function.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_PASS_BY_REFERENCE (CUMULATIVE_ARGS *@var{cum}, enum machine_mode @var{mode}, tree @var{type}, bool @var{named})
+@hook TARGET_PASS_BY_REFERENCE
This target hook should return @code{true} if an argument at the
position indicated by @var{cum} should be passed by reference. This
predicate is queried after target independent reasons for being
@@ -4268,13 +4268,13 @@ This hook returns a type node for @code{va_list} for the target.
The default version of the hook returns @code{void*}.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_ENUM_VA_LIST_P (int @var{idx}, const char ** @var{pname}, tree @var{ptype})
+@hook TARGET_ENUM_VA_LIST_P
This target hook is used in function @code{c_common_nodes_and_builtins}
to iterate through the target specific builtin types for va_list. The
variable @var{idx} is used as iterator. @var{pname} has to be a pointer
-to a @code{const char *} and @var{ptype} a pointer to a @code{tree} typed
+to a @code{const char *} and @var{ptree} a pointer to a @code{tree} typed
variable.
-The arguments @var{pname} and @var{ptype} are used to store the result of
+The arguments @var{pname} and @var{ptree} are used to store the result of
this macro and are set to the name of the va_list builtin type and its
internal type.
If the return value of this macro is zero, then there is no more element.
@@ -5645,7 +5645,7 @@ of @var{x}.
The default version returns false for all constants.
@end deftypefn
-@deftypefn {Target Hook} tree TARGET_BUILTIN_RECIPROCAL (unsigned @var{fn}, bool @var{md_fn}, bool @var{sqrt})
+@hook TARGET_BUILTIN_RECIPROCAL
This hook should return the DECL of a function that implements reciprocal of
the builtin function with builtin function code @var{fn}, or
@code{NULL_TREE} if such a function is not available. @var{md_fn} is true
@@ -6170,9 +6170,9 @@ These macros are obsolete, new ports should use the target hook
@code{TARGET_MEMORY_MOVE_COST} instead.
@end defmac
-@deftypefn {Target Hook} int TARGET_MEMORY_MOVE_COST (enum machine_mode @var{mode}, enum reg_class @var{regclass}, bool @var{in})
+@hook TARGET_MEMORY_MOVE_COST
This target hook should return the cost of moving data of mode @var{mode}
-between a register of class @var{class} and memory; @var{in} is @code{false}
+between a register of class @var{rclass} and memory; @var{in} is @code{false}
if the value is to be written to memory, @code{true} if it is to be read in.
This cost is relative to those in @code{TARGET_REGISTER_MOVE_COST}.
If moving between registers and memory is more expensive than between two
@@ -6181,7 +6181,7 @@ registers, you should add this target hook to express the relative cost.
If you do not add this target hook, GCC uses a default cost of 4 plus
the cost of copying via a secondary reload register, if one is
needed. If your machine requires a secondary reload register to copy
-between memory and a register of @var{class} but the reload mechanism is
+between memory and a register of @var{rclass} but the reload mechanism is
more complex than copying via an intermediate, use this target hook to
reflect the actual cost of the move.
@@ -6644,8 +6644,7 @@ be issued.
The default is that any ready insns can be chosen to be issued.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_SCHED_DFA_NEW_CYCLE (FILE *@var{dump}, int @var{verbose}, rtx @var{insn}, int @var{last_clock}, int @var{clock}, int *@var{sort_p})
-
+@hook TARGET_SCHED_DFA_NEW_CYCLE
This hook is called by the insn scheduler before issuing @var{insn}
on cycle @var{clock}. If the hook returns nonzero,
@var{insn} is not issued on this processor cycle. Instead,
@@ -7779,7 +7778,7 @@ You may wish to use @code{ASM_OUTPUT_TYPE_DIRECTIVE} and/or
@code{ASM_OUTPUT_SIZE_DIRECTIVE} in the definition of this macro.
@end defmac
-@deftypefn {Target Hook} void TARGET_ASM_DECLARE_CONSTANT_NAME (FILE * @var{file}, const char * @var{name}, const_tree @var{expr}, HOST_WIDE_INT @var{size})
+@hook TARGET_ASM_DECLARE_CONSTANT_NAME
A target hook to output to the stdio stream @var{file} any text necessary
for declaring the name @var{name} of a constant which is being defined. This
target hook is responsible for outputting the label definition (perhaps using
@@ -9688,11 +9687,11 @@ information in the @var{struct cl_target_option} structure for
function specific options.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_OPTION_PRAGMA_PARSE (target @var{args})
+@hook TARGET_OPTION_PRAGMA_PARSE
This target hook parses the options for @code{#pragma GCC option} to
set the machine specific options for functions that occur later in the
input stream. The options should be the same as handled by the
-@code{TARGET_VALID_OPTION_ATTRIBUTE_P} hook.
+@code{TARGET_OPTION_VALID_ATTRIBUTE_P} hook.
@end deftypefn
@hook TARGET_OPTION_OVERRIDE
@@ -10782,8 +10781,7 @@ ignored. This function should return the result of the call to the
built-in function.
@end deftypefn
-@deftypefn {Target Hook} tree TARGET_RESOLVE_OVERLOADED_BUILTIN (unsigned int @var{loc}, tree @var{fndecl}, void *@var{arglist})
-
+@hook TARGET_RESOLVE_OVERLOADED_BUILTIN
Select a replacement for a machine specific built-in function that
was set up by @samp{TARGET_INIT_BUILTINS}. This is done
@emph{before} regular type checking, and so allows the target to
@@ -10795,8 +10793,7 @@ another @code{CALL_EXPR}.
@var{arglist} really has type @samp{VEC(tree,gc)*}
@end deftypefn
-@deftypefn {Target Hook} tree TARGET_FOLD_BUILTIN (tree @var{fndecl}, int @var{n_args}, tree *@var{argp}, bool @var{ignore})
-
+@hook TARGET_FOLD_BUILTIN
Fold a call to a machine specific built-in function that was set up by
@samp{TARGET_INIT_BUILTINS}. @var{fndecl} is the declaration of the
built-in function. @var{n_args} is the number of arguments passed to
diff --git a/gcc/final.c b/gcc/final.c
index 31e9155ad09..2bb897dc10b 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -62,7 +62,8 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "except.h"
#include "function.h"
-#include "toplev.h"
+#include "rtl-error.h"
+#include "toplev.h" /* exact_log2, floor_log2 */
#include "reload.h"
#include "intl.h"
#include "basic-block.h"
diff --git a/gcc/function.c b/gcc/function.c
index 8a03c5ac42c..3a7bb25dac6 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tree.h"
#include "flags.h"
#include "except.h"
@@ -51,7 +51,6 @@ along with GCC; see the file COPYING3. If not see
#include "recog.h"
#include "output.h"
#include "basic-block.h"
-#include "toplev.h"
#include "hashtab.h"
#include "ggc.h"
#include "tm_p.h"
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index d20b0047081..6af65114000 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -888,7 +888,8 @@ gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
if (gimple_vdef (stmt) && laststore)
{
gimple_set_vdef (laststore, gimple_vdef (stmt));
- move_ssa_defining_stmt_for_defs (laststore, stmt);
+ if (TREE_CODE (gimple_vdef (stmt)) == SSA_NAME)
+ SSA_NAME_DEF_STMT (gimple_vdef (stmt)) = laststore;
update_stmt (laststore);
}
else
@@ -905,7 +906,15 @@ gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
gsi_insert_before (si_p, last, GSI_NEW_STMT);
gsi_next (si_p);
}
- if (laststore)
+ if (laststore && is_gimple_reg (lhs))
+ {
+ gimple_set_vdef (laststore, gimple_vdef (stmt));
+ update_stmt (laststore);
+ if (TREE_CODE (gimple_vdef (stmt)) == SSA_NAME)
+ SSA_NAME_DEF_STMT (gimple_vdef (stmt)) = laststore;
+ laststore = NULL;
+ }
+ else if (laststore)
{
reaching_vuse = make_ssa_name (gimple_vop (cfun), laststore);
gimple_set_vdef (laststore, reaching_vuse);
@@ -913,9 +922,14 @@ gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
laststore = NULL;
}
new_stmt = gimple_build_assign (lhs, tmp);
- gimple_set_vuse (new_stmt, reaching_vuse);
- gimple_set_vdef (new_stmt, gimple_vdef (stmt));
- move_ssa_defining_stmt_for_defs (new_stmt, stmt);
+ if (!is_gimple_reg (tmp))
+ gimple_set_vuse (new_stmt, reaching_vuse);
+ if (!is_gimple_reg (lhs))
+ {
+ gimple_set_vdef (new_stmt, gimple_vdef (stmt));
+ if (TREE_CODE (gimple_vdef (stmt)) == SSA_NAME)
+ SSA_NAME_DEF_STMT (gimple_vdef (stmt)) = new_stmt;
+ }
}
gimple_set_location (new_stmt, gimple_location (stmt));
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index b73517d2b40..7f83ffcf5df 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -1778,10 +1778,11 @@ build_poly_dr (data_reference_p dr, poly_bb_p pbb)
accesses);
ppl_delete_Polyhedron (accesses);
- if (dr->aux)
- dr_base_object_set = ((base_alias_pair *)(dr->aux))->base_obj_set;
+ gcc_assert (dr->aux);
+ dr_base_object_set = ((base_alias_pair *)(dr->aux))->base_obj_set;
- new_poly_dr (pbb, dr_base_object_set, accesses_ps, DR_IS_READ (dr) ? PDR_READ : PDR_WRITE,
+ new_poly_dr (pbb, dr_base_object_set, accesses_ps,
+ DR_IS_READ (dr) ? PDR_READ : PDR_WRITE,
dr, DR_NUM_DIMENSIONS (dr));
}
@@ -1923,8 +1924,8 @@ build_alias_set_optimal_p (VEC (data_reference_p, heap) *drs)
data_reference_p dr = VEC_index (data_reference_p, drs, i);
base_alias_pair *bap;
- if (dr->aux)
- bap = (base_alias_pair *)(dr->aux);
+ gcc_assert (dr->aux);
+ bap = (base_alias_pair *)(dr->aux);
bap->alias_set = XNEW (int);
*(bap->alias_set) = g->vertices[i].component + 1;
@@ -2002,8 +2003,8 @@ build_base_obj_set_for_drs (VEC (data_reference_p, heap) *drs)
data_reference_p dr = VEC_index (data_reference_p, drs, i);
base_alias_pair *bap;
- if (dr->aux)
- bap = (base_alias_pair *)(dr->aux);
+ gcc_assert (dr->aux);
+ bap = (base_alias_pair *)(dr->aux);
bap->base_obj_set = g->vertices[i].component + 1;
}
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index ae784b6dd77..289a7b38beb 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -931,6 +931,13 @@ split_function (struct split_point *split_point)
if (!VOID_TYPE_P (TREE_TYPE (TREE_TYPE (current_function_decl))))
{
retval = DECL_RESULT (current_function_decl);
+
+ /* We use temporary register to hold value when aggregate_value_p
+ is false. Similarly for DECL_BY_REFERENCE we must avoid extra
+ copy. */
+ if (!aggregate_value_p (retval, TREE_TYPE (current_function_decl))
+ && !DECL_BY_REFERENCE (retval))
+ retval = create_tmp_reg (TREE_TYPE (retval), NULL);
if (is_gimple_reg (retval))
retval = make_ssa_name (retval, call);
gimple_call_set_lhs (call, retval);
diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c
index 39955b64693..da26ad3d8c9 100644
--- a/gcc/ira-costs.c
+++ b/gcc/ira-costs.c
@@ -156,7 +156,8 @@ copy_cost (rtx x, enum machine_mode mode, enum reg_class rclass, bool to_p,
copy it. */
sri.prev_sri = prev_sri;
sri.extra_cost = 0;
- secondary_class = targetm.secondary_reload (to_p, x, rclass, mode, &sri);
+ secondary_class
+ = (enum reg_class) targetm.secondary_reload (to_p, x, rclass, mode, &sri);
if (secondary_class != NO_REGS)
{
diff --git a/gcc/ira.c b/gcc/ira.c
index 7f4c8d8c72d..0f0b70ab473 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -740,7 +740,7 @@ setup_cover_and_important_classes (void)
{
int i, j, n, cl;
bool set_p;
- const enum reg_class *cover_classes;
+ const reg_class_t *cover_classes;
HARD_REG_SET temp_hard_regset2;
static enum reg_class classes[LIM_REG_CLASSES + 1];
diff --git a/gcc/recog.c b/gcc/recog.c
index eb456c06f45..803aff5f786 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "insn-config.h"
#include "insn-attr.h"
@@ -35,7 +35,6 @@ along with GCC; see the file COPYING3. If not see
#include "expr.h"
#include "function.h"
#include "flags.h"
-#include "toplev.h"
#include "basic-block.h"
#include "output.h"
#include "reload.h"
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 43af91dff54..e692584bb6b 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -156,14 +156,13 @@
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "function.h"
#include "insn-config.h"
#include "regs.h"
#include "hard-reg-set.h"
#include "flags.h"
-#include "toplev.h"
#include "recog.h"
#include "output.h"
#include "basic-block.h"
diff --git a/gcc/regrename.c b/gcc/regrename.c
index a5df6ee4f57..191e3b4278f 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -22,7 +22,7 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -34,7 +34,6 @@
#include "function.h"
#include "recog.h"
#include "flags.h"
-#include "toplev.h"
#include "obstack.h"
#include "timevar.h"
#include "tree-pass.h"
diff --git a/gcc/reload.c b/gcc/reload.c
index 30bee6db83d..ea552e6695c 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -94,7 +94,7 @@ a register with any other reload. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "insn-config.h"
#include "expr.h"
@@ -108,7 +108,6 @@ a register with any other reload. */
#include "flags.h"
#include "output.h"
#include "function.h"
-#include "toplev.h"
#include "params.h"
#include "target.h"
#include "ira.h"
@@ -363,7 +362,8 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional,
sri.icode = CODE_FOR_nothing;
sri.prev_sri = prev_sri;
- rclass = targetm.secondary_reload (in_p, x, reload_class, reload_mode, &sri);
+ rclass = (enum reg_class) targetm.secondary_reload (in_p, x, reload_class,
+ reload_mode, &sri);
icode = (enum insn_code) sri.icode;
/* If we don't need any secondary registers, done. */
@@ -526,7 +526,8 @@ secondary_reload_class (bool in_p, enum reg_class rclass,
sri.icode = CODE_FOR_nothing;
sri.prev_sri = NULL;
- rclass = targetm.secondary_reload (in_p, x, rclass, mode, &sri);
+ rclass
+ = (enum reg_class) targetm.secondary_reload (in_p, x, rclass, mode, &sri);
icode = (enum insn_code) sri.icode;
/* If there are no secondary reloads at all, we return NO_REGS.
diff --git a/gcc/reload1.c b/gcc/reload1.c
index a0b61f5b926..412f45d10d8 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "machmode.h"
#include "hard-reg-set.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "obstack.h"
#include "insn-config.h"
@@ -41,7 +41,6 @@ along with GCC; see the file COPYING3. If not see
#include "reload.h"
#include "recog.h"
#include "output.h"
-#include "toplev.h"
#include "except.h"
#include "tree.h"
#include "ira.h"
@@ -7507,8 +7506,10 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
sri.icode = CODE_FOR_nothing;
sri.prev_sri = NULL;
- new_class = targetm.secondary_reload (1, real_oldequiv, rl->rclass,
- mode, &sri);
+ new_class
+ = (enum reg_class) targetm.secondary_reload (1, real_oldequiv,
+ rl->rclass, mode,
+ &sri);
if (new_class == NO_REGS && sri.icode == CODE_FOR_nothing)
second_reload_reg = 0;
@@ -7534,8 +7535,10 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
{
sri2.icode = CODE_FOR_nothing;
sri2.prev_sri = &sri;
- new_t_class = targetm.secondary_reload (1, real_oldequiv,
- new_class, mode, &sri);
+ new_t_class
+ = (enum reg_class) targetm.secondary_reload (1, real_oldequiv,
+ new_class, mode,
+ &sri);
if (new_t_class == NO_REGS && sri2.icode == CODE_FOR_nothing)
{
if (reload_adjust_reg_for_temp (&second_reload_reg,
diff --git a/gcc/rtl-error.c b/gcc/rtl-error.c
index 098666d3415..6cf44d16ab2 100644
--- a/gcc/rtl-error.c
+++ b/gcc/rtl-error.c
@@ -22,11 +22,10 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "insn-attr.h"
#include "insn-config.h"
#include "input.h"
-#include "toplev.h"
#include "intl.h"
#include "diagnostic.h"
diff --git a/gcc/rtl-error.h b/gcc/rtl-error.h
new file mode 100644
index 00000000000..1ff58256b70
--- /dev/null
+++ b/gcc/rtl-error.h
@@ -0,0 +1,24 @@
+/* RTL specific diagnostic subroutines for GCC
+ Copyright (C) 2010 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#include "rtl.h"
+#include "diagnostic-core.h"
+
+extern void error_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
+extern void warning_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 6be88d16ed3..02f74f575c3 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -2440,4 +2440,17 @@ extern int curr_insn_locator (void);
extern bool optimize_insn_for_size_p (void);
extern bool optimize_insn_for_speed_p (void);
+/* rtl-error.c */
+extern void _fatal_insn_not_found (const_rtx, const char *, int, const char *)
+ ATTRIBUTE_NORETURN;
+extern void _fatal_insn (const char *, const_rtx, const char *, int, const char *)
+ ATTRIBUTE_NORETURN;
+
+#define fatal_insn(msgid, insn) \
+ _fatal_insn (msgid, insn, __FILE__, __LINE__, __FUNCTION__)
+#define fatal_insn_not_found(insn) \
+ _fatal_insn_not_found (insn, __FILE__, __LINE__, __FUNCTION__)
+
+
+
#endif /* ! GCC_RTL_H */
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 78816252997..3a86e22feef 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -21,8 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "toplev.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "hard-reg-set.h"
#include "regs.h"
@@ -31,7 +30,6 @@ along with GCC; see the file COPYING3. If not see
#include "insn-config.h"
#include "insn-attr.h"
#include "except.h"
-#include "toplev.h"
#include "recog.h"
#include "params.h"
#include "target.h"
diff --git a/gcc/target.def b/gcc/target.def
index efc412849a2..8bcf877359c 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -63,8 +63,8 @@ HOOK_VECTOR (TARGET_INITIALIZER, gcc_target)
the paragraph with @end deftypefn / deftypevr as appropriate, and marking
the next autogenerated hook with @hook <hookname>.
In both these cases, leave the DOC string empty, i.e. "".
- Sometimes, the function declaration itself is only available under the
- GPL, and/or for some historic reason it has to be documented differently
+ Sometimes, for some historic reason the function declaration
+ has to be documented differently
than what it is. In that case, use DEFHOOK_UNDOC to supress auto-generation
of documentation. DEFHOOK_UNDOC takes a DOC string which it ignores, so
you can put GPLed documentation string there if you have hopes that you
@@ -160,11 +160,10 @@ DEFHOOK
default_internal_label)
/* Output label for the constant. */
-/* ??? The documentation uses a different name for the hook argument EXP. */
-DEFHOOK_UNDOC
+DEFHOOK
(declare_constant_name,
"",
- void, (FILE *file, const char *name, const_tree exp, HOST_WIDE_INT size),
+ void, (FILE *file, const char *name, const_tree expr, HOST_WIDE_INT size),
default_asm_declare_constant_name)
/* Emit a ttype table reference to a typeinfo object. */
@@ -412,9 +411,8 @@ DEFHOOK
#define HOOK_PREFIX "TARGET_"
/* Emit a machine-specific insn operand. */
-/* ??? Documenting the argument types for this hook requires a GFDL
- license grant. Also, the documentation documents this as a macro,
- not a hook, and uses a different name for the hook argument FILE. */
+/* ??? tm.texi only documents the old macro PRINT_OPERAND,
+ not this hook, and uses a different name for the argument FILE. */
DEFHOOK_UNDOC
(print_operand,
"",
@@ -422,9 +420,8 @@ DEFHOOK_UNDOC
default_print_operand)
/* Emit a machine-specific memory address. */
-/* ??? Documenting the argument types for this hook requires a GFDL
- license grant. Also, the documentation documents this as a macro,
- not a hook, and uses different hook argument names. */
+/* ??? tm.texi only documents the old macro PRINT_OPERAND_ADDRESS,
+ not this hook, and uses different argument names. */
DEFHOOK_UNDOC
(print_operand_address,
"",
@@ -433,9 +430,8 @@ DEFHOOK_UNDOC
/* Determine whether CODE is a valid punctuation character for the
`print_operand' hook. */
-/* ??? Documenting the argument types for this hook requires a GFDL
- license grant. Also, the documentation documents this as a macro,
- not a hook. */
+/* ??? tm.texi only documents the old macro PRINT_OPERAND_PUNCT_VALID_P,
+ not this hook. */
DEFHOOK_UNDOC
(print_operand_punct_valid_p,
"",
@@ -600,13 +596,11 @@ DEFHOOK
verbose level of the debugging output. The forth and the fifth
parameter values are correspondingly processor cycle on which
the previous insn has been issued and the current processor cycle. */
-/* ??? The documentation uses different names for dump_file,
- last_sched_cycle and cur_cycle. */
-DEFHOOK_UNDOC
+DEFHOOK
(dfa_new_cycle,
"",
- int, (FILE *dump_file, int verbose, rtx insn, int last_sched_cycle,
- int cur_cycle, int *sort_p),
+ int, (FILE *dump, int verbose, rtx insn, int last_clock,
+ int clock, int *sort_p),
NULL)
/* The following member value is a pointer to a function called by the
@@ -1031,28 +1025,24 @@ DEFHOOK
implement a crude form of function overloading. The result is a
complete expression that implements the operation. PARAMS really
has type VEC(tree,gc)*, but we don't want to include tree.h here. */
- /* ??? params is called differently in the documentation, and we can't
- fix that because of GPL / GFDL incompatibility. */
-DEFHOOK_UNDOC
+DEFHOOK
(resolve_overloaded_builtin,
"",
- tree, (unsigned int /*location_t*/ loc, tree fndecl, void *params), NULL)
+ tree, (unsigned int /*location_t*/ loc, tree fndecl, void *arglist), NULL)
/* Fold a target-specific builtin. */
-/* ??? The documentation uses a different name for nargs. */
-DEFHOOK_UNDOC
+DEFHOOK
(fold_builtin,
"",
- tree, (tree fndecl, int nargs, tree *argp, bool ignore),
+ tree, (tree fndecl, int n_args, tree *argp, bool ignore),
hook_tree_tree_int_treep_bool_null)
/* Returns a code for a target-specific builtin that implements
reciprocal of the function, or NULL_TREE if not available. */
-/* ??? The documentation uses a different name for tm_fn. */
-DEFHOOK_UNDOC
+DEFHOOK
(builtin_reciprocal,
"",
- tree, (unsigned fn, bool tm_fn, bool sqrt),
+ tree, (unsigned fn, bool md_fn, bool sqrt),
default_builtin_reciprocal)
/* For a vendor-specific TYPE, return a pointer to a statically-allocated
@@ -1093,7 +1083,7 @@ DEFHOOK
DEFHOOK
(branch_target_register_class,
"",
- enum reg_class, (void),
+ reg_class_t, (void),
default_branch_target_register_class)
/* Return true if branch target register optimizations should include
@@ -1372,16 +1362,16 @@ DEFHOOK
DEFHOOK
(register_move_cost,
"",
- int, (enum machine_mode mode, enum reg_class from, enum reg_class to),
+ int, (enum machine_mode mode, reg_class_t from, reg_class_t to),
default_register_move_cost)
/* Compute cost of moving registers to/from memory. */
/* ??? Documenting the argument types for this hook requires a GFDL
license grant. Also, the documentation uses a different name for RCLASS. */
-DEFHOOK_UNDOC
+DEFHOOK
(memory_move_cost,
"",
- int, (enum machine_mode mode, enum reg_class rclass, bool in),
+ int, (enum machine_mode mode, reg_class_t rclass, bool in),
default_memory_move_cost)
/* True for MODE if the target expects that registers in this mode will
@@ -1488,8 +1478,7 @@ DEFHOOK
std_build_builtin_va_list)
/* Enumerate the va list variants. */
-/* ??? The documentation gets the type of ptree wrong. */
-DEFHOOK_UNDOC
+DEFHOOK
(enum_va_list_p,
"",
int, (int idx, const char **pname, tree *ptree),
@@ -1680,8 +1669,7 @@ DEFHOOK
/* Return true if a parameter must be passed by reference. TYPE may
be null if this is a libcall. CA may be null if this query is
from __builtin_va_arg. */
-/* ??? The documentation disagrees on the type of 'type'. */
-DEFHOOK_UNDOC
+DEFHOOK
(pass_by_reference,
"",
bool,
@@ -1873,7 +1861,7 @@ DEFHOOK
pops on returning, or 0 if the function pops no arguments and the
caller must therefore pop them all after the function returns. */
/* ??? tm.texi has no types for the parameters. */
-DEFHOOK_UNDOC
+DEFHOOK
(return_pops_args,
"",
int, (tree fundecl, tree funtype, int size),
@@ -1943,15 +1931,15 @@ DEFHOOK
DEFHOOK
(ira_cover_classes,
"",
- const enum reg_class *, (void),
+ const reg_class_t *, (void),
default_ira_cover_classes)
/* Return the class for a secondary reload, and fill in extra information. */
DEFHOOK
(secondary_reload,
"",
- enum reg_class,
- (bool in_p, rtx x, enum reg_class reload_class, enum machine_mode reload_mode,
+ reg_class_t,
+ (bool in_p, rtx x, reg_class_t reload_class, enum machine_mode reload_mode,
secondary_reload_info *sri),
default_secondary_reload)
@@ -2235,8 +2223,8 @@ DEFHOOK
change the state if the options are valid. If the first argument is
NULL, the second argument specifies the default options to use. Return
true if the options are valid, and set the current state. */
-/* ??? The documentation disagrees on the signature of this hook. */
-DEFHOOK_UNDOC
+/* ??? The documentation in tm.texi is incomplete. */
+DEFHOOK
(pragma_parse,
"",
bool, (tree args, tree pop_target),
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 128a5cb448c..9271db829bf 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -807,28 +807,29 @@ default_return_pops_args (tree fundecl ATTRIBUTE_UNUSED,
return 0;
}
-enum reg_class
+reg_class_t
default_branch_target_register_class (void)
{
return NO_REGS;
}
#ifdef IRA_COVER_CLASSES
-const enum reg_class *
+const reg_class_t *
default_ira_cover_classes (void)
{
- static enum reg_class classes[] = IRA_COVER_CLASSES;
+ static reg_class_t classes[] = IRA_COVER_CLASSES;
return classes;
}
#endif
-enum reg_class
+reg_class_t
default_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
- enum reg_class reload_class ATTRIBUTE_UNUSED,
+ reg_class_t reload_class_i ATTRIBUTE_UNUSED,
enum machine_mode reload_mode ATTRIBUTE_UNUSED,
secondary_reload_info *sri)
{
enum reg_class rclass = NO_REGS;
+ enum reg_class reload_class = (enum reg_class) reload_class_i;
if (sri->prev_sri && sri->prev_sri->t_icode != CODE_FOR_nothing)
{
@@ -1176,13 +1177,13 @@ default_have_conditional_execution (void)
int
default_memory_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
- enum reg_class rclass ATTRIBUTE_UNUSED,
+ reg_class_t rclass ATTRIBUTE_UNUSED,
bool in ATTRIBUTE_UNUSED)
{
#ifndef MEMORY_MOVE_COST
- return (4 + memory_move_secondary_cost (mode, rclass, in));
+ return (4 + memory_move_secondary_cost (mode, (enum reg_class) rclass, in));
#else
- return MEMORY_MOVE_COST (mode, rclass, in);
+ return MEMORY_MOVE_COST (mode, (enum reg_class) rclass, in);
#endif
}
@@ -1191,13 +1192,13 @@ default_memory_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
int
default_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
- enum reg_class from ATTRIBUTE_UNUSED,
- enum reg_class to ATTRIBUTE_UNUSED)
+ reg_class_t from ATTRIBUTE_UNUSED,
+ reg_class_t to ATTRIBUTE_UNUSED)
{
#ifndef REGISTER_MOVE_COST
return 2;
#else
- return REGISTER_MOVE_COST (mode, from, to);
+ return REGISTER_MOVE_COST (mode, (enum reg_class) from, (enum reg_class) to);
#endif
}
diff --git a/gcc/targhooks.h b/gcc/targhooks.h
index f6e1ddce00f..f491dbd4d29 100644
--- a/gcc/targhooks.h
+++ b/gcc/targhooks.h
@@ -115,13 +115,13 @@ extern rtx default_internal_arg_pointer (void);
extern rtx default_static_chain (const_tree, bool);
extern void default_trampoline_init (rtx, tree, rtx);
extern int default_return_pops_args (tree, tree, int);
-extern enum reg_class default_branch_target_register_class (void);
+extern reg_class_t default_branch_target_register_class (void);
#ifdef IRA_COVER_CLASSES
-extern const enum reg_class *default_ira_cover_classes (void);
+extern const reg_class_t *default_ira_cover_classes (void);
#endif
-extern enum reg_class default_secondary_reload (bool, rtx, enum reg_class,
- enum machine_mode,
- secondary_reload_info *);
+extern reg_class_t default_secondary_reload (bool, rtx, reg_class_t,
+ enum machine_mode,
+ secondary_reload_info *);
extern void default_target_option_override (void);
extern void hook_void_bitmap (bitmap);
extern bool default_handle_c_option (size_t, const char *, int);
@@ -147,7 +147,7 @@ extern bool default_addr_space_subset_p (addr_space_t, addr_space_t);
extern rtx default_addr_space_convert (rtx, tree, tree);
extern unsigned int default_case_values_threshold (void);
extern bool default_have_conditional_execution (void);
-extern int default_memory_move_cost (enum machine_mode, enum reg_class, bool);
-extern int default_register_move_cost (enum machine_mode, enum reg_class,
- enum reg_class);
+extern int default_memory_move_cost (enum machine_mode, reg_class_t, bool);
+extern int default_register_move_cost (enum machine_mode, reg_class_t,
+ reg_class_t);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 90c5be0e824..d9e9a4025f9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,17 @@
+2010-06-30 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/ipa-split-4.c: New testcase.
+
+2010-06-30 Michael Matz <matz@suse.de>
+
+ PR bootstrap/44699
+ * gcc.dg/pr44699.c: New test.
+
+2010-06-30 Bernd Schmidt <bernds@codesourcery.com>
+
+ PR tree-optimization/39799
+ * c-c++-common/uninit-17.c: New test.
+
2010-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/43298
diff --git a/gcc/testsuite/c-c++-common/uninit-17.c b/gcc/testsuite/c-c++-common/uninit-17.c
new file mode 100644
index 00000000000..b895ac7dcd9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/uninit-17.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wuninitialized" } */
+
+inline int foo(int x)
+{
+ return x;
+}
+static void bar(int a, int *ptr)
+{
+ do
+ {
+ int b; /* { dg-message "note: 'b' was declared here" } */
+ if (b < 40) {
+ ptr[0] = b; /* { dg-warning "may be used uninitialized" } */
+ }
+ b += 1;
+ ptr++;
+ }
+ while (--a != 0);
+}
+void foobar(int a, int *ptr)
+{
+ bar(foo(a), ptr);
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr44699.c b/gcc/testsuite/gcc.dg/pr44699.c
new file mode 100644
index 00000000000..601cc78f572
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr44699.c
@@ -0,0 +1,157 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+typedef long unsigned int size_t;
+typedef long int intmax_t;
+typedef long unsigned int uintmax_t;
+extern void *xmalloc (size_t) __attribute__ ((__malloc__));
+extern const char *trim_filename (const char *);
+
+static __inline void *
+__inline_memcpy_chk (void *__dest, const void *__src, size_t __len)
+{
+ return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+
+typedef unsigned int hashval_t;
+typedef hashval_t (*htab_hash) (const void *);
+typedef int (*htab_eq) (const void *, const void *);
+typedef void (*htab_del) (void *);
+typedef int (*htab_trav) (void **, void *);
+typedef void *(*htab_alloc) (size_t, size_t);
+typedef void (*htab_free) (void *);
+
+typedef void *(*htab_alloc_with_arg) (void *, size_t, size_t);
+typedef void (*htab_free_with_arg) (void *, void *);
+struct htab {
+ htab_hash hash_f;
+ htab_eq eq_f;
+ htab_del del_f;
+ void ** entries;
+ size_t size;
+ size_t n_elements;
+ size_t n_deleted;
+ unsigned int searches;
+ unsigned int collisions;
+ htab_alloc alloc_f;
+ htab_free free_f;
+ void * alloc_arg;
+ htab_alloc_with_arg alloc_with_arg_f;
+ htab_free_with_arg free_with_arg_f;
+ unsigned int size_prime_index;
+};
+
+typedef struct htab *htab_t;
+enum insert_option {NO_INSERT, INSERT};
+extern void * htab_find (htab_t, const void *);
+extern void ** htab_find_slot (htab_t, const void *, enum insert_option);
+
+enum mode_class { MODE_RANDOM, MODE_CC, MODE_INT, MODE_PARTIAL_INT, MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_FLOAT, MODE_DECIMAL_FLOAT, MODE_COMPLEX_INT, MODE_COMPLEX_FLOAT, MODE_VECTOR_INT, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM, MODE_VECTOR_FLOAT, MAX_MODE_CLASS };
+
+static const char *const mode_class_names[MAX_MODE_CLASS] =
+{
+ "MODE_RANDOM", "MODE_CC", "MODE_INT", "MODE_PARTIAL_INT", "MODE_FRACT", "MODE_UFRACT", "MODE_ACCUM", "MODE_UACCUM", "MODE_FLOAT", "MODE_DECIMAL_FLOAT", "MODE_COMPLEX_INT", "MODE_COMPLEX_FLOAT", "MODE_VECTOR_INT", "MODE_VECTOR_FRACT", "MODE_VECTOR_UFRACT", "MODE_VECTOR_ACCUM", "MODE_VECTOR_UACCUM", "MODE_VECTOR_FLOAT"
+};
+struct mode_data
+{
+ struct mode_data *next;
+
+ const char *name;
+ enum mode_class cl;
+ unsigned int precision;
+ unsigned int bytesize;
+ unsigned int ncomponents;
+ unsigned int alignment;
+ const char *format;
+
+ struct mode_data *component;
+ struct mode_data *wider;
+ struct mode_data *wider_2x;
+
+ struct mode_data *contained;
+
+ struct mode_data *next_cont;
+
+ const char *file;
+ unsigned int line;
+ unsigned int counter;
+ unsigned int ibit;
+ unsigned int fbit;
+};
+
+static struct mode_data *modes[MAX_MODE_CLASS];
+static unsigned int n_modes[MAX_MODE_CLASS];
+static struct mode_data *void_mode;
+
+static const struct mode_data blank_mode = {
+ 0, "<unknown>", MAX_MODE_CLASS,
+ -1U, -1U, -1U, -1U,
+ 0, 0, 0, 0, 0, 0,
+ "<unknown>", 0, 0, 0, 0
+};
+
+static htab_t modes_by_name;
+
+static __inline__ struct mode_data *
+find_mode (const char *name)
+{
+ struct mode_data key;
+
+ key.name = name;
+ return (struct mode_data *) htab_find (modes_by_name, &key);
+}
+
+static struct mode_data *
+new_mode (enum mode_class cl, const char *name,
+ const char *file, unsigned int line)
+{
+ struct mode_data *m;
+ static unsigned int count = 0;
+
+ m = find_mode (name);
+ if (m)
+ {
+ error ("%s:%d: duplicate definition of mode \"%s\"",
+ trim_filename (file), line, name);
+ error ("%s:%d: previous definition here", m->file, m->line);
+ return m;
+ }
+
+ m = ((struct mode_data *) xmalloc (sizeof (struct mode_data)));
+ ((__builtin_object_size (m, 0) != (size_t) -1) ? __builtin___memcpy_chk (m, &blank_mode, sizeof (struct mode_data), __builtin_object_size (m, 0)) : __inline_memcpy_chk (m, &blank_mode, sizeof (struct mode_data)));
+ m->cl = cl;
+ m->name = name;
+ if (file)
+ m->file = trim_filename (file);
+ m->line = line;
+ m->counter = count++;
+
+ m->next = modes[cl];
+ modes[cl] = m;
+ n_modes[cl]++;
+
+ *htab_find_slot (modes_by_name, m, INSERT) = m;
+
+ return m;
+}
+
+static void
+make_int_mode (const char *name,
+ unsigned int precision, unsigned int bytesize,
+ const char *file, unsigned int line)
+{
+ struct mode_data *m = new_mode (MODE_INT, name, file, line);
+ m->bytesize = bytesize;
+ m->precision = precision;
+}
+
+static void
+create_modes (void)
+{
+make_int_mode ("HI", -1U, 2, "../../work/gcc/machmode.def", 182);
+}
+
+int
+main (int argc, char **argv)
+{
+ create_modes ();
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ipa-split-4.c b/gcc/testsuite/gcc.dg/tree-ssa/ipa-split-4.c
new file mode 100644
index 00000000000..9d5864bad3c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ipa-split-4.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-fnsplit" } */
+int make_me_big (void);
+void abort (void);
+
+int
+split_me (int a)
+{
+ if (__builtin_expect(a<10, 1))
+ {
+ abort ();
+ }
+ else
+ {
+ make_me_big ();
+ make_me_big ();
+ make_me_big ();
+ make_me_big ();
+ return a+1;
+ }
+}
+
+int
+test(void)
+{
+ return split_me (0)+split_me(1)+split_me(2);
+}
+/* { dg-final { scan-tree-dump-times "Splitting function" 1 "fnsplit"} } */
+/* { dg-final { cleanup-tree-dump "fnsplit" } } */
diff --git a/gcc/toplev.h b/gcc/toplev.h
index 2424fd17695..517d359dbb4 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -32,16 +32,6 @@ along with GCC; see the file COPYING3. If not see
extern int toplev_main (int, char **);
extern void strip_off_ending (char *, int);
-extern void _fatal_insn_not_found (const_rtx, const char *, int, const char *)
- ATTRIBUTE_NORETURN;
-extern void _fatal_insn (const char *, const_rtx, const char *, int, const char *)
- ATTRIBUTE_NORETURN;
-
-#define fatal_insn(msgid, insn) \
- _fatal_insn (msgid, insn, __FILE__, __LINE__, __FUNCTION__)
-#define fatal_insn_not_found(insn) \
- _fatal_insn_not_found (insn, __FILE__, __LINE__, __FUNCTION__)
-
extern void rest_of_decl_compilation (tree, int, int);
extern void rest_of_type_compilation (tree, int);
extern void tree_rest_of_compilation (tree);
@@ -56,8 +46,6 @@ extern void init_eh (void);
extern void announce_function (tree);
-extern void error_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
-extern void warning_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
extern void warn_deprecated_use (tree, tree);
extern bool parse_optimize_options (tree, bool);
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index b5e6e0e3f72..3b1c459128f 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -234,6 +234,7 @@ remap_ssa_name (tree name, copy_body_data *id)
regions of the CFG, but this is expensive to test. */
if (id->entry_bb
&& is_gimple_reg (SSA_NAME_VAR (name))
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name)
&& TREE_CODE (SSA_NAME_VAR (name)) != PARM_DECL
&& (id->entry_bb != EDGE_SUCC (ENTRY_BLOCK_PTR, 0)->dest
|| EDGE_COUNT (id->entry_bb->preds) != 1))
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index a2154dc851a..4f5db8069f5 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -7359,6 +7359,7 @@ vrp_finalize (void)
size_t i;
prop_value_t *single_val_range;
bool do_value_subst_p;
+ unsigned num = num_ssa_names;
if (dump_file)
{
@@ -7370,10 +7371,10 @@ vrp_finalize (void)
/* We may have ended with ranges that have exactly one value. Those
values can be substituted as any other const propagated
value using substitute_and_fold. */
- single_val_range = XCNEWVEC (prop_value_t, num_ssa_names);
+ single_val_range = XCNEWVEC (prop_value_t, num);
do_value_subst_p = false;
- for (i = 0; i < num_ssa_names; i++)
+ for (i = 0; i < num; i++)
if (vr_value[i]
&& vr_value[i]->type == VR_RANGE
&& vr_value[i]->min == vr_value[i]->max
@@ -7401,7 +7402,7 @@ vrp_finalize (void)
identify_jump_threads ();
/* Free allocated memory. */
- for (i = 0; i < num_ssa_names; i++)
+ for (i = 0; i < num; i++)
if (vr_value[i])
{
BITMAP_FREE (vr_value[i]->equiv);