Merge from pch-branch up to tag pch-commit-20020603.

From-SVN: r54232
This commit is contained in:
Geoffrey Keating 2002-06-04 07:11:05 +00:00 committed by Geoffrey Keating
parent c2ae66169b
commit e2500fedef
182 changed files with 7606 additions and 5957 deletions

View file

@ -4,3 +4,6 @@ c-parse.c
tradcif.c
cscope.files
cscope.out
gengtype-lex.c
gengtype-yacc.c
gengtype-yacc.h

File diff suppressed because it is too large Load diff

View file

@ -562,7 +562,7 @@ REGS_H = regs.h varray.h $(MACHMODE_H)
INTEGRATE_H = integrate.h varray.h
LOOP_H = loop.h varray.h bitmap.h
GCC_H = gcc.h version.h
GGC_H = ggc.h varray.h
GGC_H = ggc.h varray.h gtype-desc.h
TIMEVAR_H = timevar.h timevar.def
INSN_ATTR_H = insn-attr.h $(srcdir)/insn-addr.h $(srcdir)/varray.h
C_COMMON_H = c-common.h $(SPLAY_TREE_H) $(CPPLIB_H)
@ -718,20 +718,21 @@ C_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS)
# Language-independent object files.
OBJS = alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \
cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o cfgrtl.o \
combine.o conflict.o convert.o cse.o cselib.o dbxout.o debug.o dependence.o \
df.o diagnostic.o doloop.o dominance.o dwarf2asm.o dwarf2out.o dwarfout.o \
emit-rtl.o except.o explow.o expmed.o expr.o final.o flow.o \
fold-const.o function.o gcse.o genrtl.o ggc-common.o global.o graph.o \
haifa-sched.o hash.o hashtable.o hooks.o ifcvt.o insn-attrtab.o insn-emit.o \
insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o \
integrate.o intl.o jump.o langhooks.o lcm.o lists.o local-alloc.o \
loop.o mbchar.o optabs.o params.o predict.o print-rtl.o print-tree.o \
profile.o real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \
reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \
sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \
sibcall.o simplify-rtx.o ssa.o ssa-ccp.o ssa-dce.o stmt.o \
OBJS = alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \
cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o \
cfgrtl.o combine.o conflict.o convert.o cse.o cselib.o dbxout.o \
debug.o dependence.o df.o diagnostic.o doloop.o dominance.o \
dwarf2asm.o dwarf2out.o dwarfout.o emit-rtl.o except.o explow.o \
expmed.o expr.o final.o flow.o fold-const.o function.o gcse.o \
genrtl.o ggc-common.o global.o graph.o gtype-desc.o \
haifa-sched.o hashtable.o hooks.o ifcvt.o insn-attrtab.o insn-emit.o \
insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o \
integrate.o intl.o jump.o langhooks.o lcm.o lists.o local-alloc.o \
loop.o mbchar.o optabs.o params.o predict.o print-rtl.o print-tree.o \
profile.o real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \
reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \
sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \
sibcall.o simplify-rtx.o ssa.o ssa-ccp.o ssa-dce.o stmt.o \
stor-layout.o stringpool.o timevar.o toplev.o tracer.o tree.o tree-dump.o \
tree-inline.o unroll.o varasm.o varray.o version.o vmsdbgout.o xcoffout.o \
$(GGC) $(out_object_file) $(EXTRA_OBJS)
@ -744,7 +745,8 @@ BACKEND = main.o libbackend.a
GEN= genemit$(build_exeext) genoutput$(build_exeext) genrecog$(build_exeext) \
genextract$(build_exeext) genflags$(build_exeext) gencodes$(build_exeext) \
genconfig$(build_exeext) genpeep$(build_exeext) gengenrtl$(build_exeext) \
gencheck$(build_exeext) genpreds$(build_exeext) genconstants$(build_exeext)
gencheck$(build_exeext) genpreds$(build_exeext) genconstants$(build_exeext) \
gengtype$(build_exeext)
# Files to be copied away after each stage in building.
STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
@ -759,6 +761,7 @@ STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
genconfig$(build_exeext) genpeep$(build_exeext) genattrtab$(build_exeext) \
genattr$(build_exeext) genopinit$(build_exeext) gengenrtl$(build_exeext) \
gencheck$(build_exeext) genpreds$(build_exeext) genconstants$(build_exeext) \
gengtype$(build_exeext) \
genrtl.c genrtl.h \
xgcc$(exeext) cpp$(exeext) cc1$(exeext) $(EXTRA_PASSES) \
$(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) cc1obj$(exeext) \
@ -1141,7 +1144,8 @@ s-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
c-errors.o: c-errors.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) flags.h \
diagnostic.h $(TM_P_H)
c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) $(GGC_H) intl.h \
$(C_TREE_H) input.h flags.h $(SYSTEM_H) toplev.h output.h $(CPPLIB_H)
$(C_TREE_H) input.h flags.h $(SYSTEM_H) toplev.h output.h $(CPPLIB_H) \
gt-c-parse.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-c $(srcdir)/c-parse.c $(OUTPUT_OPTION)
@ -1164,11 +1168,12 @@ $(srcdir)/c-parse.y: c-parse.in
c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) $(C_TREE_H) \
$(GGC_H) $(TARGET_H) flags.h function.h output.h $(EXPR_H) \
debug.h toplev.h intl.h $(TM_P_H) tree-inline.h $(TIMEVAR_H) c-pragma.h
debug.h toplev.h intl.h $(TM_P_H) tree-inline.h $(TIMEVAR_H) c-pragma.h \
gt-c-decl.h
c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
$(TARGET_H) flags.h intl.h output.h $(EXPR_H) $(RTL_H) toplev.h $(TM_P_H)
c-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
langhooks.h $(LANGHOOKS_DEF_H) c-common.h
$(GGC_H) langhooks.h $(LANGHOOKS_DEF_H) c-common.h gtype-c.h
c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \
debug.h $(C_TREE_H) c-common.h real.h \
c-pragma.h input.h intl.h flags.h toplev.h output.h \
@ -1176,20 +1181,20 @@ c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \
c-objc-common.o : c-objc-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(C_TREE_H) $(RTL_H) insn-config.h integrate.h $(EXPR_H) $(C_TREE_H) \
flags.h toplev.h tree-inline.h diagnostic.h integrate.h $(VARRAY_H) \
langhooks.h $(GGC_H)
langhooks.h $(GGC_H) gt-c-objc-common.h
c-aux-info.o : c-aux-info.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
flags.h toplev.h
c-convert.o : c-convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h toplev.h \
$(C_COMMON_H)
c-pragma.o: c-pragma.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) function.h \
c-pragma.h toplev.h output.h $(GGC_H) $(TM_P_H) $(C_COMMON_H)
c-pragma.h toplev.h output.h $(GGC_H) $(TM_P_H) $(C_COMMON_H) gt-c-pragma.h
mbchar.o: mbchar.c $(CONFIG_H) $(SYSTEM_H) mbchar.h
graph.o: graph.c $(CONFIG_H) $(SYSTEM_H) toplev.h flags.h output.h $(RTL_H) \
function.h hard-reg-set.h $(BASIC_BLOCK_H) graph.h
sbitmap.o: sbitmap.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h \
$(BASIC_BLOCK_H)
COLLECT2_OBJS = collect2.o tlink.o hash.o intl.o underscore.o version.o
COLLECT2_OBJS = collect2.o tlink.o intl.o underscore.o version.o
COLLECT2_LIBS = @COLLECT2_LIBS@
collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
# Don't try modifying collect2 (aka ld) in place--it might be linking this.
@ -1203,9 +1208,8 @@ collect2.o : collect2.c $(CONFIG_H) $(SYSTEM_H) gstab.h intl.h \
-DTARGET_MACHINE=\"$(target_alias)\" \
-c $(srcdir)/collect2.c $(OUTPUT_OPTION)
tlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H) $(SYSTEM_H) collect2.h intl.h
hash.o: hash.c hash.h $(SYSTEM_H) toplev.h $(GCONFIG_H)
$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
tlink.o: tlink.c $(DEMANGLE_H) $(HASHTAB_H) $(CONFIG_H) $(SYSTEM_H) \
$(OBSTACK_H) collect2.h intl.h
underscore.c: s-under ; @true
@ -1227,7 +1231,7 @@ s-under: $(GCC_PASSES)
c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \
$(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
$(EXPR_H) $(TM_P_H) builtin-types.def builtin-attrs.def $(TARGET_H) \
diagnostic.h tree-inline.h except.h real.h
diagnostic.h tree-inline.h except.h gt-c-common.h real.h
# A file used by all variants of C and some other languages.
@ -1314,8 +1318,13 @@ dumpvers: dumpvers.c
version.o: version.c version.h
gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) varray.h $(HASHTAB_H) \
$(TREE_H) $(RTL_H) function.h insn-config.h $(EXPR_H) $(OPTABS_H) \
libfuncs.h debug.h $(GGC_H) bitmap.h $(BASIC_BLOCK_H) hard-reg-set.h \
ssa.h cselib.h insn-addr.h
ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \
flags.h $(GGC_H) varray.h hash.h $(HASHTAB_H) $(TM_P_H) langhooks.h
flags.h $(GGC_H) varray.h $(HASHTAB_H) $(TM_P_H) langhooks.h
ggc-simple.o: ggc-simple.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
$(GGC_H) varray.h $(TIMEVAR_H) $(TM_P_H)
@ -1324,7 +1333,7 @@ ggc-page.o: ggc-page.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
toplev.h $(GGC_H) varray.h $(TIMEVAR_H) $(TM_P_H)
stringpool.o: stringpool.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \
flags.h toplev.h
flags.h toplev.h $(GGC_H)
hashtable.o: hashtable.c hashtable.h $(CONFIG_H) $(SYSTEM_H) $(OBSTACK_H)
@ -1345,7 +1354,8 @@ langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h \
tree-inline.h $(RTL_H) insn-config.h integrate.h langhooks.h \
$(LANGHOOKS_DEF_H) flags.h
tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h function.h toplev.h \
$(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h real.h
$(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h \
real.h gt-tree.h
tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
flags.h langhooks.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
$(EXPR_H) $(SPLAY_TREE_H) tree-dump.h
@ -1392,21 +1402,22 @@ errors.o : errors.c $(GCONFIG_H) $(SYSTEM_H) errors.h
$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
function.h $(EXPR_H) hard-reg-set.h $(REGS_H) $(OBSTACK_H) \
function.h $(EXPR_H) hard-reg-set.h $(REGS_H) \
output.h c-pragma.h toplev.h xcoffout.h debug.h $(GGC_H) $(TM_P_H) \
$(HASHTAB_H) $(TARGET_H) langhooks.h
$(HASHTAB_H) $(TARGET_H) langhooks.h gt-varasm.h
function.o : function.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
function.h $(EXPR_H) libfuncs.h $(REGS_H) hard-reg-set.h \
insn-config.h $(RECOG_H) output.h toplev.h except.h hash.h $(GGC_H) \
$(TM_P_H) langhooks.h
insn-config.h $(RECOG_H) output.h toplev.h except.h $(HASHTAB_H) $(GGC_H) \
$(TM_P_H) langhooks.h gt-function.h
stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h function.h \
insn-config.h hard-reg-set.h $(EXPR_H) libfuncs.h except.h \
$(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H) $(TM_P_H) \
langhooks.h $(PREDICT_H)
langhooks.h $(PREDICT_H) gt-stmt.h
except.o : except.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
except.h function.h $(EXPR_H) libfuncs.h integrate.h langhooks.h \
insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \
dwarf2asm.h dwarf2out.h toplev.h $(HASHTAB_H) intl.h $(GGC_H)
dwarf2asm.h dwarf2out.h toplev.h $(HASHTAB_H) intl.h $(GGC_H) \
gt-except.h
expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h function.h \
$(REGS_H) $(EXPR_H) $(OPTABS_H) libfuncs.h insn-attr.h insn-config.h \
$(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
@ -1423,10 +1434,10 @@ expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
toplev.h $(TM_P_H) langhooks.h
explow.o : explow.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
hard-reg-set.h insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \
toplev.h function.h ggc.h $(TM_P_H)
toplev.h function.h ggc.h $(TM_P_H) gt-explow.h
optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
insn-config.h $(EXPR_H) $(OPTABS_H) libfuncs.h $(RECOG_H) reload.h \
toplev.h $(GGC_H) real.h $(TM_P_H) except.h
toplev.h $(GGC_H) real.h $(TM_P_H) except.h gt-optabs.h
dbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
$(REGS_H) debug.h $(TM_P_H) $(TARGET_H) function.h langhooks.h \
insn-config.h reload.h gstab.h xcoffout.h output.h dbxout.h toplev.h
@ -1434,16 +1445,16 @@ debug.o : debug.c debug.h $(CONFIG_H) $(SYSTEM_H)
sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
function.h $(EXPR_H) output.h hard-reg-set.h $(REGS_H) real.h \
insn-config.h $(OBSTACK_H) xcoffout.h c-pragma.h ggc.h \
sdbout.h toplev.h $(TM_P_H) except.h debug.h langhooks.h
sdbout.h toplev.h $(TM_P_H) except.h debug.h langhooks.h gt-sdbout.h
dwarfout.o : dwarfout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) dwarf.h \
flags.h insn-config.h reload.h output.h toplev.h $(TM_P_H) \
debug.h langhooks.h
dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) dwarf2.h \
debug.h flags.h insn-config.h reload.h output.h diagnostic.h real.h \
hard-reg-set.h $(REGS_H) $(EXPR_H) libfuncs.h toplev.h dwarf2out.h varray.h \
$(GGC_H) except.h dwarf2asm.h $(TM_P_H) langhooks.h
$(GGC_H) except.h dwarf2asm.h $(TM_P_H) langhooks.h gt-dwarf2out.h
dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) flags.h $(RTL_H) $(TREE_H) \
output.h dwarf2asm.h $(TM_P_H)
output.h dwarf2asm.h $(TM_P_H) $(GGC_H)
vmsdbgout.o : vmsdbgout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
output.h vmsdbg.h debug.h langhooks.h
xcoffout.o : xcoffout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) xcoffout.h \
@ -1456,7 +1467,7 @@ real.o : real.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h $(TM_P_H)
integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
debug.h $(INTEGRATE_H) insn-config.h $(EXPR_H) real.h $(REGS_H) \
intl.h function.h output.h $(RECOG_H) except.h toplev.h $(LOOP_H) \
$(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h
$(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h gt-integrate.h
jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h $(REGS_H) \
insn-config.h $(RECOG_H) $(EXPR_H) real.h except.h function.h \
toplev.h $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H)
@ -1466,13 +1477,13 @@ simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) \
output.h function.h $(GGC_H) $(OBSTACK_H) $(TM_P_H)
cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) \
hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \
output.h function.h cselib.h $(GGC_H) $(OBSTACK_H) $(TM_P_H)
output.h function.h cselib.h $(GGC_H) $(TM_P_H) gt-cselib.h
cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h function.h \
$(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H)
gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) hard-reg-set.h \
flags.h real.h insn-config.h ggc.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) \
function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) except.h
function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) except.h gt-gcse.h
sibcall.o : sibcall.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) function.h \
hard-reg-set.h flags.h insn-config.h $(RECOG_H) $(BASIC_BLOCK_H)
resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \
@ -1497,7 +1508,7 @@ conflict.o : conflict.c $(CONFIG_H) $(SYSTEM_H) $(OBSTACK_H) $(HASHTAB_H) \
profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
insn-config.h output.h $(REGS_H) $(EXPR_H) function.h \
gcov-io.h toplev.h $(GGC_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TARGET_H) \
langhooks.h profile.h libfuncs.h
langhooks.h profile.h libfuncs.h gt-profile.h
loop.o : loop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(LOOP_H) \
insn-config.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) \
real.h $(PREDICT_H) $(BASIC_BLOCK_H) function.h \
@ -1537,14 +1548,13 @@ regclass.o : regclass.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h flags.h
local-alloc.o : local-alloc.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h \
$(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \
output.h function.h $(INSN_ATTR_H) toplev.h except.h $(TM_P_H)
bitmap.o : bitmap.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) \
$(REGS_H)
bitmap.o : bitmap.c $(GCONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h \
$(BASIC_BLOCK_H) $(REGS_H) $(GGC_H)
$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
global.o : global.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h reload.h function.h \
$(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h output.h toplev.h \
$(TM_P_H)
varray.o : varray.c $(CONFIG_H) $(SYSTEM_H) varray.h $(RTL_H) $(TREE_H) bitmap.h \
errors.h
varray.o : varray.c $(CONFIG_H) $(SYSTEM_H) varray.h $(GGC_H) errors.h
reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) $(RTL_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 $(TM_P_H)
@ -1560,7 +1570,8 @@ reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) conditions.h hard-reg-set.h \
$(RECOG_H) function.h flags.h output.h $(EXPR_H) toplev.h $(PARAMS_H) $(TM_P_H)
alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h \
$(BASIC_BLOCK_H) $(REGS_H) toplev.h output.h $(EXPR_H) \
$(GGC_H) function.h cselib.h $(TREE_H) $(TM_P_H) langhooks.h $(TARGET_H)
$(GGC_H) function.h cselib.h $(TREE_H) $(TM_P_H) langhooks.h $(TARGET_H) \
gt-alias.h
regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h \
$(RECOG_H) output.h $(REGS_H) hard-reg-set.h flags.h function.h \
$(EXPR_H) $(BASIC_BLOCK_H) toplev.h $(TM_P_H) except.h reload.h
@ -1588,7 +1599,7 @@ recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) function.h $(BASIC_BLOCK_H) \
$(INSN_ATTR_H) real.h toplev.h output.h reload.h $(TM_P_H)
reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) $(RECOG_H) \
$(REGS_H) hard-reg-set.h flags.h insn-config.h toplev.h reload.h \
varray.h function.h $(TM_P_H)
varray.h function.h $(TM_P_H) $(GGC_H) gt-reg-stack.h
predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \
$(RECOG_H) function.h except.h $(EXPR_H) $(TM_P_H) $(PREDICT_H) real.h \
@ -1610,7 +1621,7 @@ ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) toplev.h \
flags.h insn-config.h function.h $(RECOG_H) $(BASIC_BLOCK_H) $(EXPR_H) \
output.h except.h $(TM_P_H)
dependence.o : dependence.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \
$(C_COMMON_H) flags.h varray.h $(EXPR_H)
$(C_COMMON_H) flags.h varray.h $(EXPR_H) $(GGC_H) gt-dependence.h
params.o : params.c $(CONFIG_H) $(SYSTEM_H) $(PARAMS_H) toplev.h
hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) $(HOOKS_H)
@ -1793,6 +1804,38 @@ s-preds: genpreds$(build_exeext) $(srcdir)/move-if-change
$(SHELL) $(srcdir)/move-if-change tmp-preds.h tm-preds.h
$(STAMP) s-preds
GTFILES = $(GCONFIG_H) \
$(HASHTAB_H) \
$(srcdir)/bitmap.h $(srcdir)/function.h $(srcdir)/rtl.h $(srcdir)/optabs.h \
$(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h $(srcdir)/real.h \
$(srcdir)/varray.h $(srcdir)/ssa.h $(srcdir)/insn-addr.h $(srcdir)/cselib.h \
$(srcdir)/c-common.h $(srcdir)/c-tree.h \
$(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c \
$(srcdir)/dependence.c $(srcdir)/dwarf2out.c $(srcdir)/emit-rtl.c \
$(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
$(srcdir)/fold-const.c $(srcdir)/function.c \
$(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
$(srcdir)/profile.c $(srcdir)/regclass.c $(srcdir)/reg-stack.c \
$(srcdir)/sdbout.c $(srcdir)/stmt.c $(srcdir)/stor-layout.c \
$(srcdir)/tree.c $(srcdir)/varasm.c \
$(srcdir)/c-objc-common.c $(srcdir)/c-common.c $(srcdir)/c-parse.in \
$(out_file) \
$(srcdir)/c-decl.c $(srcdir)/c-pragma.c \
@all_gtfiles@
gtype-desc.h gtype-desc.c gt-except.h gt-function.h : s-gtype; @true
gt-integrate.h gt-stmt.h gt-tree.h gt-varasm.h gt-emit-rtl.h : s-gtype; @true
gt-explow.h gt-stor-layout.h gt-regclass.h gt-lists.h : s-gtype; @true
gt-alias.h gt-cselib.h gt-fold-const.h gt-gcse.h gt-profile.h : s-gtype; @true
gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h gt-dwarf2out.h : s-gtype ; @true
gt-reg-stack.h gt-dependence.h : s-gtype ; @true
gt-c-common.h gt-c-decl.h gt-c-parse.h gt-c-pragma.h : s-gtype; @true
gt-c-objc-common.h gtype-c.h : s-gtype ; @true
s-gtype: gengtype$(build_exeext) $(GTFILES)
./gengtype $(GTFILES)
$(STAMP) s-gtype
#
# Compile the programs that generate insn-* from the machine description.
# They are compiled with $(HOST_CC), and associated libraries,
@ -1899,7 +1942,7 @@ genattrtab.o : genattrtab.c $(RTL_H) $(OBSTACK_H) $(HCONFIG_H) \
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c $(OUTPUT_OPTION)
genautomata.o : genautomata.c $(RTL_H) $(OBSTACK_H) $(HCONFIG_H) \
$(SYSTEM_H) errors.h varray.h hash.h genattrtab.h
$(SYSTEM_H) errors.h varray.h genattrtab.h $(HASHTAB_H)
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genautomata.c $(OUTPUT_OPTION)
genoutput$(build_exeext) : genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
@ -1924,6 +1967,33 @@ genpreds$(build_exeext) : genpreds.o $(HOST_LIBDEPS)
genpreds.o : genpreds.c $(RTL_BASE_H) $(HCONFIG_H) $(SYSTEM_H)
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpreds.c $(OUTPUT_OPTION)
gengtype$(build_exeext) : gengtype.o gengtype-lex.o gengtype-yacc.o \
$(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
gengtype.o gengtype-lex.o gengtype-yacc.o $(HOST_LIBS)
gengtype.o : gengtype.c gengtype.h $(HCONFIG_H) $(SYSTEM_H) real.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
$(srcdir)/gengtype.c $(OUTPUT_OPTION)
gengtype-lex.o : gengtype-lex.c gengtype.h gengtype-yacc.c \
$(HCONFIG_H) $(SYSTEM_H)
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
$(srcdir)/gengtype-lex.c $(OUTPUT_OPTION)
gengtype-yacc.o : gengtype-yacc.c gengtype.h $(HCONFIG_H) $(SYSTEM_H)
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
$(srcdir)/gengtype-yacc.c $(OUTPUT_OPTION)
$(srcdir)/gengtype-lex.c : $(srcdir)/gengtype-lex.l
$(FLEX) $(FLEXFLAGS) -o$@ $(srcdir)/gengtype-lex.l \
|| ( rm -f $@ && false )
$(srcdir)/gengtype-yacc.c: $(srcdir)/gengtype-yacc.y
(cd $(srcdir) && \
$(BISON) $(BISONFLAGS) -d -o gengtype-yacc.c gengtype-yacc.y || \
( rm -f $@ && false ) )
#
# Compile the libraries to be used by gen*.
# If we are not cross-building, gen* use the same .o's that cc1 will use,
@ -1941,8 +2011,8 @@ $(BUILD_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(HCONFIG_H) \
sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(BUILD_PREFIX)print-rtl.c
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)print-rtl.c $(OUTPUT_OPTION)
$(BUILD_PREFIX_1)bitmap.o: $(srcdir)/bitmap.c $(HCONFIG_H) $(SYSTEM_H) $(RTL_H) \
flags.h $(BASIC_BLOCK_H) $(REGS_H)
$(BUILD_PREFIX_1)bitmap.o: $(srcdir)/bitmap.c $(HCONFIG_H) $(SYSTEM_H) \
$(RTL_H) flags.h $(BASIC_BLOCK_H) $(REGS_H) $(GGC_H)
rm -f $(BUILD_PREFIX)bitmap.c
sed -e 's/config[.]h/hconfig.h/' $(srcdir)/bitmap.c > $(BUILD_PREFIX)bitmap.c
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)bitmap.c $(OUTPUT_OPTION)
@ -2303,11 +2373,10 @@ docdir = $(srcdir)/doc
doc: $(BUILD_INFO) $(GENERATED_MANPAGES) gccbug
info: $(docdir)/cpp.info $(docdir)/gcc.info $(docdir)/gccint.info lang.info $(docdir)/cppinternals.info
$(docdir)/cpp.info: $(docdir)/cpp.texi $(docdir)/include/fdl.texi \
TEXI_CPP_FILES = $(docdir)/cpp.texi $(docdir)/include/fdl.texi \
$(docdir)/cppenv.texi $(docdir)/cppopts.texi
cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/cpp.info doc/cpp.texi
$(docdir)/gcc.info: $(docdir)/gcc.texi $(docdir)/include/gcc-common.texi \
TEXI_GCC_FILES = $(docdir)/gcc.texi $(docdir)/include/gcc-common.texi \
$(docdir)/frontends.texi $(docdir)/standards.texi \
$(docdir)/invoke.texi $(docdir)/extend.texi $(docdir)/md.texi \
$(docdir)/objc.texi $(docdir)/gcov.texi $(docdir)/trouble.texi \
@ -2316,9 +2385,8 @@ $(docdir)/gcc.info: $(docdir)/gcc.texi $(docdir)/include/gcc-common.texi \
$(docdir)/include/funding.texi $(docdir)/gnu.texi \
$(docdir)/include/gpl.texi $(docdir)/include/fdl.texi \
$(docdir)/contrib.texi $(docdir)/cppenv.texi $(docdir)/cppopts.texi
cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/gcc.info doc/gcc.texi
$(docdir)/gccint.info: $(docdir)/gccint.texi \
TEXI_GCCINT_FILES = $(docdir)/gccint.texi \
$(docdir)/include/gcc-common.texi $(docdir)/contribute.texi \
$(docdir)/makefile.texi $(docdir)/configterms.texi \
$(docdir)/portability.texi $(docdir)/interface.texi \
@ -2329,46 +2397,37 @@ $(docdir)/gccint.info: $(docdir)/gccint.texi \
$(docdir)/headerdirs.texi $(docdir)/include/funding.texi \
$(docdir)/gnu.texi $(docdir)/include/gpl.texi \
$(docdir)/include/fdl.texi $(docdir)/contrib.texi \
$(docdir)/languages.texi $(docdir)/sourcebuild.texi
$(docdir)/languages.texi $(docdir)/sourcebuild.texi \
$(docdir)/gty.texi
TEXI_CPPINT_FILES = $(docdir)/cppinternals.texi
$(docdir)/cpp.info: $(TEXI_CPP_FILES)
cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/cpp.info doc/cpp.texi
$(docdir)/gcc.info: $(TEXI_GCC_FILES)
cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/gcc.info doc/gcc.texi
$(docdir)/gccint.info: $(TEXI_GCCINT_FILES)
cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/gccint.info doc/gccint.texi
$(docdir)/cppinternals.info: $(docdir)/cppinternals.texi
$(docdir)/cppinternals.info: $(TEXI_CPPINT_FILES)
cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/cppinternals.info \
doc/cppinternals.texi
dvi: gcc.dvi gccint.dvi cpp.dvi lang.dvi cppinternals.dvi
# This works with GNU Make's default rule.
cpp.dvi: $(docdir)/cpp.texi $(docdir)/include/fdl.texi \
$(docdir)/cppenv.texi $(docdir)/cppopts.texi
cpp.dvi: $(TEXI_CPP_FILES)
$(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/cpp.texi
gcc.dvi: $(docdir)/gcc.texi $(docdir)/include/gcc-common.texi \
$(docdir)/frontends.texi $(docdir)/standards.texi \
$(docdir)/invoke.texi $(docdir)/extend.texi $(docdir)/md.texi \
$(docdir)/objc.texi $(docdir)/gcov.texi $(docdir)/trouble.texi \
$(docdir)/bugreport.texi $(docdir)/service.texi \
$(docdir)/contribute.texi $(docdir)/vms.texi \
$(docdir)/include/funding.texi $(docdir)/gnu.texi \
$(docdir)/include/gpl.texi $(docdir)/include/fdl.texi \
$(docdir)/contrib.texi $(docdir)/cppenv.texi $(docdir)/cppopts.texi
gcc.dvi: $(TEXI_GCC_FILES)
$(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/gcc.texi
gccint.dvi: $(docdir)/gccint.texi \
$(docdir)/include/gcc-common.texi $(docdir)/contribute.texi \
$(docdir)/makefile.texi $(docdir)/configterms.texi \
$(docdir)/portability.texi $(docdir)/interface.texi \
$(docdir)/passes.texi $(docdir)/c-tree.texi \
$(docdir)/rtl.texi $(docdir)/md.texi $(docdir)/tm.texi \
$(docdir)/hostconfig.texi $(docdir)/fragments.texi \
$(docdir)/configfiles.texi $(docdir)/collect2.texi \
$(docdir)/headerdirs.texi $(docdir)/include/funding.texi \
$(docdir)/gnu.texi $(docdir)/include/gpl.texi \
$(docdir)/include/fdl.texi $(docdir)/contrib.texi \
$(docdir)/languages.texi $(docdir)/sourcebuild.texi
gccint.dvi: $(TEXI_GCCINT_FILES)
$(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/gccint.texi
cppinternals.dvi: $(docdir)/cppinternals.texi
cppinternals.dvi: $(TEXI_CPPINT_FILES)
$(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/cppinternals.texi
generated-manpages: $(docdir)/gcov.1 $(docdir)/cpp.1 $(docdir)/gcc.1 \

View file

@ -1,3 +1,58 @@
2002-06-03 Geoffrey Keating <geoffk@redhat.com>
Merge from pch-branch:
* config-lang.in (gtfiles): Add ada-tree.h.
* ada-tree.h (SET_TYPE_CI_CO_LIST): New.
(SET_TYPE_MODULUS): New.
(SET_TYPE_INDEX): New.
(SET_TYPE_DIGITS_VALUE): New.
(SET_TYPE_RM_SIZE): New.
(SET_TYPE_UNCONSTRAINED_ARRAY): New.
(SET_TYPE_ADA_SIZE): New.
(SET_TYPE_ACTUAL_BOUNDS): New.
(SET_DECL_CONST_CORRESPONDING_VAR): New.
(SET_DECL_ORIGINAL_FIELD): New.
(TREE_LOOP_ID): Correct typo.
* decl.c: Use new macros.
* utils.c: Include debug.h, use new macros.
* utils2.c: Use new macros.
* ada-tree.h: Update all macros for new tree description.
(struct tree_loop_id): New.
(union lang_tree_node): New.
(struct lang_decl): New.
(struct lang_type): New.
* misc.c (gnat_mark_tree): Delete.
(LANG_HOOKS_MARK_TREE): Delete.
* trans.c (tree_transform): No longer any need to cast
for TREE_LOOP_ID.
* utils.c (struct language_function): New dummy structure.
* Makefile.in (decl.o): gt-ada-<filename.h> is in objdir, not srcdir.
(misc.o): Likewise.
(utils.o): Likewise; also gtype-ada.h.
* Make-lang.in (gnat1): Add dependency on s-gtype.
(gnatbind): Add dependency on $(CONFIG_H).
* utils.c: Correct last #include.
(stuct e_stack): Remove unnecessary 'static'.
(mark_e_stack): Remove unused prototype.
* scn-nlit.adb: Remove whitespace after version number to
keep lines under 80 chars.
* snames.adb: Likewise.
* treepr.ads: Likewise.
* Makefile.in (decl.o): Include gt-ada-<filename>.h.
(misc.o): Likewise.
(utils.o): Include gt-ada-<filename>.h and gtype-ada.h.
* config-lang.in (gtfiles): New.
* decl.c: Use gengtype for roots.
* gigi.h: Use gengtype for roots.
* trans.c: Use gengtype for roots.
* utils.c: Use gengtype for roots, marking. Include gtype-ada.h.
2002-06-02 Gabriel Dos Reis <gdr@codesourcery.com>
* misc.c (gnat_init): Adjust setting of internal_error_function.

View file

@ -205,10 +205,6 @@ gnat1$(exeext): $(TARGET_ADA_SRCS) $(GNAT1_OBJS) $(ADA_BACKEND) $(LIBDEPS)
$(SYSLIBS)
$(RM) stamp-gnatlib2 stamp-tools
gnatbind$(exeext): ada/b_gnatb.o $(GNATBIND_OBJS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) \
$(LIBIBERTY) $(LIBS)
# use target-gcc target-gnatmake target-gnatbind target-gnatlink
gnattools: $(GCC_PARTS) $(CONFIG_H) prefix.o force
$(MAKE) -C ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
@ -272,6 +268,9 @@ gnatlib_and_tools: gnatlib gnattools
# use cross-gcc
gnat-cross: force
$(MAKE) -C ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) gnat-cross
gt-ada-decl.h gt-ada-trans.h gt-ada-utils.h gtype-ada.h : s-gtype ; @true
# Build hooks:
@ -1002,7 +1001,8 @@ ada/cuintp.o : ada/cuintp.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) ada/ada.h \
ada/decl.o : ada/decl.c $(CONFIG_H) $(TREE_H) $(srcdir)/flags.h \
$(srcdir)/toplev.h $(srcdir)/convert.h ada/ada.h ada/types.h ada/atree.h \
ada/nlists.h ada/elists.h ada/uintp.h ada/sinfo.h ada/einfo.h ada/snames.h \
ada/namet.h ada/stringt.h ada/repinfo.h ada/fe.h $(ADA_TREE_H) ada/gigi.h
ada/namet.h ada/stringt.h ada/repinfo.h ada/fe.h $(ADA_TREE_H) ada/gigi.h \
gt-ada-decl.h
ada/misc.o : ada/misc.c $(CONFIG_H) $(TREE_H) $(RTL_H) $(srcdir)/expr.h \
insn-codes.h insn-flags.h insn-config.h $(srcdir)/recog.h \
@ -1020,12 +1020,13 @@ ada/targtyps.o : ada/targtyps.c $(CONFIG_H) ada/ada.h ada/types.h ada/atree.h \
ada/trans.o : ada/trans.c $(CONFIG_H) $(TREE_H) $(RTL_H) $(srcdir)/flags.h \
ada/ada.h $(srcdir)/except.h ada/types.h ada/atree.h ada/nlists.h \
ada/elists.h ada/uintp.h ada/sinfo.h ada/einfo.h ada/namet.h ada/snames.h \
ada/stringt.h ada/urealp.h ada/fe.h $(ADA_TREE_H) ada/gigi.h
ada/stringt.h ada/urealp.h ada/fe.h $(ADA_TREE_H) ada/gigi.h gt-ada-trans.h
ada/utils.o : ada/utils.c $(CONFIG_H) $(TREE_H) $(srcdir)/flags.h \
$(srcdir)/expr.h $(srcdir)/convert.h $(srcdir)/defaults.h ada/ada.h \
ada/types.h ada/atree.h ada/nlists.h ada/elists.h ada/sinfo.h ada/einfo.h \
ada/namet.h ada/stringt.h ada/uintp.h ada/fe.h $(ADA_TREE_H) ada/gigi.h
ada/namet.h ada/stringt.h ada/uintp.h ada/fe.h $(ADA_TREE_H) ada/gigi.h \
gt-ada-utils.h gtype-ada.h
ada/utils2.o : ada/utils2.c $(CONFIG_H) $(TREE_H) $(srcdir)/flags.h ada/ada.h \
ada/types.h ada/atree.h ada/nlists.h ada/elists.h ada/sinfo.h ada/einfo.h \

View file

@ -34,6 +34,35 @@ enum gnat_tree_code {
};
#undef DEFTREECODE
/* A tree to hold a loop ID. */
struct tree_loop_id GTY(())
{
struct tree_common common;
struct nesting *loop_id;
};
/* The language-specific tree. */
union lang_tree_node
GTY((desc ("TREE_CODE (&%h.generic) == GNAT_LOOP_ID")))
{
union tree_node GTY ((tag ("0"),
desc ("tree_node_structure (&%h)")))
generic;
struct tree_loop_id GTY ((tag ("1"))) loop_id;
};
/* Ada uses the lang_decl and lang_type fields to hold more trees. */
struct lang_decl GTY(())
{
union lang_tree_node
GTY((desc ("TREE_CODE (&%h.generic) == GNAT_LOOP_ID"))) t;
};
struct lang_type GTY(())
{
union lang_tree_node
GTY((desc ("TREE_CODE (&%h.generic) == GNAT_LOOP_ID"))) t;
};
/* Flags added to GCC type nodes. */
/* For RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE, nonzero if this is a
@ -129,29 +158,39 @@ enum gnat_tree_code {
by copy in copy out. It is a CONSTRUCTOR. For a full description of the
cico parameter passing mechanism refer to the routine gnat_to_gnu_entity. */
#define TYPE_CI_CO_LIST(NODE) \
(tree) TYPE_LANG_SPECIFIC (FUNCTION_TYPE_CHECK (NODE))
(&TYPE_LANG_SPECIFIC (FUNCTION_TYPE_CHECK (NODE))->t.generic)
#define SET_TYPE_CI_CO_LIST(NODE, X) \
(TYPE_LANG_SPECIFIC (FUNCTION_TYPE_CHECK (NODE)) = (struct lang_type *)(X))
/* For an INTEGER_TYPE with TYPE_MODULAR_P, this is the value of the
modulus. */
#define TYPE_MODULUS(NODE) \
(tree) TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))
(&TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))->t.generic)
#define SET_TYPE_MODULUS(NODE, X) \
(TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE)) = (struct lang_type *)(X))
/* For an INTEGER_TYPE that is the TYPE_DOMAIN of some ARRAY_TYPE, points to
the type corresponding to the Ada index type. */
#define TYPE_INDEX_TYPE(NODE) \
(tree) TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))
(&TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))->t.generic)
#define SET_TYPE_INDEX_TYPE(NODE, X) \
(TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE)) = (struct lang_type *)(X))
/* For an INTEGER_TYPE with TYPE_VAX_FLOATING_POINT_P, stores the
Digits_Value. */
#define TYPE_DIGITS_VALUE(NODE) \
(long) TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))
((long) TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE)))
#define SET_TYPE_DIGITS_VALUE(NODE, X) \
(TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE)) = (struct lang_type *)(X))
/* For INTEGER_TYPE, stores the RM_Size of the type. */
#define TYPE_RM_SIZE_INT(NODE) TYPE_VALUES (INTEGER_TYPE_CHECK (NODE))
/* Likewise for ENUMERAL_TYPE. */
#define TYPE_RM_SIZE_ENUM(NODE) \
(tree) TYPE_LANG_SPECIFIC (ENUMERAL_TYPE_CHECK (NODE))
(&TYPE_LANG_SPECIFIC (ENUMERAL_TYPE_CHECK (NODE))->t.generic)
#define SET_TYPE_RM_SIZE_ENUM(NODE, X) \
(TYPE_LANG_SPECIFIC (ENUMERAL_TYPE_CHECK (NODE)) = (struct lang_type *)(X))
#define TYPE_RM_SIZE(NODE) \
(TREE_CODE (NODE) == ENUMERAL_TYPE ? TYPE_RM_SIZE_ENUM (NODE) \
@ -162,17 +201,23 @@ enum gnat_tree_code {
unconstrained object. Likewise for a RECORD_TYPE that is pointed
to by a thin pointer. */
#define TYPE_UNCONSTRAINED_ARRAY(NODE) \
(tree) TYPE_LANG_SPECIFIC (RECORD_TYPE_CHECK (NODE))
(&TYPE_LANG_SPECIFIC (RECORD_TYPE_CHECK (NODE))->t.generic)
#define SET_TYPE_UNCONSTRAINED_ARRAY(NODE, X) \
(TYPE_LANG_SPECIFIC (RECORD_TYPE_CHECK (NODE)) = (struct lang_type *)(X))
/* For other RECORD_TYPEs and all UNION_TYPEs and QUAL_UNION_TYPEs, the Ada
size of the object. This differs from the GCC size in that it does not
include any rounding up to the alignment of the type. */
#define TYPE_ADA_SIZE(NODE) (tree) TYPE_LANG_SPECIFIC (NODE)
#define TYPE_ADA_SIZE(NODE) (&TYPE_LANG_SPECIFIC (NODE)->t.generic)
#define SET_TYPE_ADA_SIZE(NODE, X) \
(TYPE_LANG_SPECIFIC (NODE) = (struct lang_type *)(X))
/* For an INTEGER_TYPE with TYPE_HAS_ACTUAL_BOUNDS_P or an ARRAY_TYPE, this is
the index type that should be used when the actual bounds are required for
a template. This is used in the case of packed arrays. */
#define TYPE_ACTUAL_BOUNDS(NODE) (tree) TYPE_LANG_SPECIFIC (NODE)
#define TYPE_ACTUAL_BOUNDS(NODE) (&TYPE_LANG_SPECIFIC (NODE)->t.generic)
#define SET_TYPE_ACTUAL_BOUNDS(NODE, X) \
(TYPE_LANG_SPECIFIC (NODE) = (struct lang_type *)(X))
/* In an UNCONSTRAINED_ARRAY_TYPE, points to the record containing both
the template and object. */
@ -211,12 +256,16 @@ enum gnat_tree_code {
memory. Used when a scalar constant is aliased or has its
address taken. */
#define DECL_CONST_CORRESPONDING_VAR(NODE) \
(tree) DECL_LANG_SPECIFIC (CONST_DECL_CHECK (NODE))
(&DECL_LANG_SPECIFIC (CONST_DECL_CHECK (NODE))->t.generic)
#define SET_DECL_CONST_CORRESPONDING_VAR(NODE, X) \
(DECL_LANG_SPECIFIC (CONST_DECL_CHECK (NODE)) = (struct lang_decl *)(X))
/* In a FIELD_DECL, points to the FIELD_DECL that was the ultimate
source of the decl. */
#define DECL_ORIGINAL_FIELD(NODE) \
(tree) DECL_LANG_SPECIFIC (FIELD_DECL_CHECK (NODE))
(&DECL_LANG_SPECIFIC (FIELD_DECL_CHECK (NODE))->t.generic)
#define SET_DECL_ORIGINAL_FIELD(NODE, X) \
(DECL_LANG_SPECIFIC (FIELD_DECL_CHECK (NODE)) = (struct lang_decl *)(X))
/* In a FIELD_DECL corresponding to a discriminant, contains the
discriminant number. */
@ -224,4 +273,5 @@ enum gnat_tree_code {
/* This is a horrible kludge to store the loop_id of a loop into a tree
node. We need to find some other place to store it! */
#define TREE_LOOP_ID(NODE) (TREE_CHECK (NODE, GNAT_LOOP_ID)->real_cst.rtl)
#define TREE_LOOP_ID(NODE) \
(((union lang_tree_node *)TREE_CHECK (NODE, GNAT_LOOP_ID))->loop_id.loop_id)

View file

@ -35,6 +35,8 @@ compilers="gnat1\$(exeext)"
stagestuff="gnatbind\$(exeext) gnat1\$(exeext)"
gtfiles="\$(srcdir)/ada/ada-tree.h \$(srcdir)/ada/gigi.h \$(srcdir)/ada/decl.c \$(srcdir)/ada/trans.c \$(srcdir)/ada/utils.c"
diff_excludes="-x ada/a-einfo.h -x ada/a-sinfo.h -x ada/nmake.adb -x ada/nmake.ads -x ada/treeprs.ads -x ada/sysid.ads"
outputs=ada/Makefile

View file

@ -1044,10 +1044,10 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
|| Address_Taken (gnat_entity)
|| Is_Aliased (gnat_entity)
|| Is_Aliased (Etype (gnat_entity))))
DECL_CONST_CORRESPONDING_VAR (gnu_decl)
= create_var_decl (gnu_entity_id, gnu_ext_name, gnu_type,
SET_DECL_CONST_CORRESPONDING_VAR (gnu_decl,
create_var_decl (gnu_entity_id, gnu_ext_name, gnu_type,
gnu_expr, 0, Is_Public (gnat_entity), 0,
static_p, 0);
static_p, 0));
/* If this is declared in a block that contains an block with an
exception handler, we must force this variable in memory to
@ -1184,7 +1184,7 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
if (! integer_zerop (gnu_modulus))
{
TYPE_MODULAR_P (gnu_type) = 1;
TYPE_MODULUS (gnu_type) = gnu_modulus;
SET_TYPE_MODULUS (gnu_type, gnu_modulus);
gnu_high = fold (build (MINUS_EXPR, gnu_type, gnu_modulus,
convert (gnu_type, integer_one_node)));
}
@ -1308,7 +1308,7 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
gnu_field_type, gnu_type, 1, 0, 0, 1),
finish_record_type (gnu_type, gnu_field, 0, 0);
TYPE_LEFT_JUSTIFIED_MODULAR_P (gnu_type) = 1;
TYPE_ADA_SIZE (gnu_type) = bitsize_int (esize);
SET_TYPE_ADA_SIZE (gnu_type, bitsize_int (esize));
}
break;
@ -1320,8 +1320,8 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
{
gnu_type = make_signed_type (esize);
TYPE_VAX_FLOATING_POINT_P (gnu_type) = 1;
TYPE_DIGITS_VALUE (gnu_type)
= UI_To_Int (Digits_Value (gnat_entity));
SET_TYPE_DIGITS_VALUE (gnu_type,
UI_To_Int (Digits_Value (gnat_entity)));
break;
}
@ -1619,7 +1619,7 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
= TYPE_REFERENCE_TO (gnu_type) = gnu_fat_type;
TYPE_MODE (gnu_type) = BLKmode;
TYPE_ALIGN (gnu_type) = TYPE_ALIGN (tem);
TYPE_UNCONSTRAINED_ARRAY (gnu_fat_type) = gnu_type;
SET_TYPE_UNCONSTRAINED_ARRAY (gnu_fat_type, gnu_type);
/* If the maximum size doesn't overflow, use it. */
if (TREE_CODE (gnu_max_size) == INTEGER_CST
@ -1647,7 +1647,7 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
DECL_FIELD_OFFSET (TREE_CHAIN (TYPE_FIELDS (tem))) = size_zero_node;
DECL_FIELD_BIT_OFFSET (TREE_CHAIN (TYPE_FIELDS (tem)))
= bitsize_zero_node;
TYPE_UNCONSTRAINED_ARRAY (tem) = gnu_type;
SET_TYPE_UNCONSTRAINED_ARRAY (tem, gnu_type);
TYPE_OBJECT_RECORD_TYPE (gnu_type) = tem;
/* Give the thin pointer type a name. */
@ -2066,18 +2066,18 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
TYPE_HAS_ACTUAL_BOUNDS_P (gnu_inner_type) = 1;
}
TYPE_ACTUAL_BOUNDS (gnu_inner_type) = NULL_TREE;
SET_TYPE_ACTUAL_BOUNDS (gnu_inner_type, NULL_TREE);
for (gnat_index = First_Index (gnat_entity);
Present (gnat_index); gnat_index = Next_Index (gnat_index))
TYPE_ACTUAL_BOUNDS (gnu_inner_type)
= tree_cons (NULL_TREE,
SET_TYPE_ACTUAL_BOUNDS (gnu_inner_type,
tree_cons (NULL_TREE,
get_unpadded_type (Etype (gnat_index)),
TYPE_ACTUAL_BOUNDS (gnu_inner_type));
TYPE_ACTUAL_BOUNDS (gnu_inner_type)));
if (Convention (gnat_entity) != Convention_Fortran)
TYPE_ACTUAL_BOUNDS (gnu_inner_type)
= nreverse (TYPE_ACTUAL_BOUNDS (gnu_inner_type));
SET_TYPE_ACTUAL_BOUNDS (gnu_inner_type,
nreverse (TYPE_ACTUAL_BOUNDS (gnu_inner_type)));
if (TREE_CODE (gnu_type) == RECORD_TYPE
&& TYPE_LEFT_JUSTIFIED_MODULAR_P (gnu_type))
@ -2577,9 +2577,10 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
DECL_INTERNAL_P (gnu_field)
= DECL_INTERNAL_P (gnu_old_field);
DECL_ORIGINAL_FIELD (gnu_field)
= DECL_ORIGINAL_FIELD (gnu_old_field) != 0
? DECL_ORIGINAL_FIELD (gnu_old_field) : gnu_old_field;
SET_DECL_ORIGINAL_FIELD (gnu_field,
(DECL_ORIGINAL_FIELD (gnu_old_field) != 0
? DECL_ORIGINAL_FIELD (gnu_old_field)
: gnu_old_field));
DECL_DISCRIMINANT_NUMBER (gnu_field)
= DECL_DISCRIMINANT_NUMBER (gnu_old_field);
TREE_THIS_VOLATILE (gnu_field)
@ -2598,7 +2599,7 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
TYPE_ALIGN (gnu_type) = TYPE_ALIGN (gnu_base_type);
TYPE_SIZE (gnu_type) = TYPE_SIZE (gnu_base_type);
TYPE_SIZE_UNIT (gnu_type) = TYPE_SIZE_UNIT (gnu_base_type);
TYPE_ADA_SIZE (gnu_type) = TYPE_ADA_SIZE (gnu_base_type);
SET_TYPE_ADA_SIZE (gnu_type, TYPE_ADA_SIZE (gnu_base_type));
if (TREE_CODE (TYPE_SIZE (gnu_type)) != INTEGER_CST
&& contains_placeholder_p (TYPE_SIZE (gnu_type)))
@ -2623,10 +2624,10 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
&& contains_placeholder_p (TYPE_ADA_SIZE (gnu_type)))
for (gnu_temp = gnu_subst_list;
gnu_temp; gnu_temp = TREE_CHAIN (gnu_temp))
TYPE_ADA_SIZE (gnu_type)
= substitute_in_expr (TYPE_ADA_SIZE (gnu_type),
SET_TYPE_ADA_SIZE (gnu_type,
substitute_in_expr (TYPE_ADA_SIZE (gnu_type),
TREE_PURPOSE (gnu_temp),
TREE_VALUE (gnu_temp));
TREE_VALUE (gnu_temp)));
/* Recompute the mode of this record type now that we know its
actual size. */
@ -2816,7 +2817,7 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
if (gnu_type == 0)
{
gnu_type = make_node (RECORD_TYPE);
TYPE_UNCONSTRAINED_ARRAY (gnu_type) = gnu_old;
SET_TYPE_UNCONSTRAINED_ARRAY (gnu_type, gnu_old);
TYPE_POINTER_TO (gnu_old) = gnu_type;
set_lineno (gnat_entity, 0);
@ -3670,11 +3671,14 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
if (TREE_CODE (gnu_type) == RECORD_TYPE
&& operand_equal_p (TYPE_ADA_SIZE (gnu_type),
TYPE_SIZE (gnu_type), 0))
TYPE_ADA_SIZE (gnu_type) = TYPE_SIZE (gnu_type)
= elaborate_expression_1 (gnat_entity, gnat_entity,
TYPE_SIZE (gnu_type),
get_identifier ("SIZE"),
definition, 0);
{
TYPE_SIZE (gnu_type)
= elaborate_expression_1 (gnat_entity, gnat_entity,
TYPE_SIZE (gnu_type),
get_identifier ("SIZE"),
definition, 0);
SET_TYPE_ADA_SIZE (gnu_type, TYPE_SIZE (gnu_type));
}
else
{
TYPE_SIZE (gnu_type)
@ -3699,11 +3703,11 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
size_int (TYPE_ALIGN (gnu_type) / BITS_PER_UNIT));
if (TREE_CODE (gnu_type) == RECORD_TYPE)
TYPE_ADA_SIZE (gnu_type)
= elaborate_expression_1 (gnat_entity, gnat_entity,
SET_TYPE_ADA_SIZE (gnu_type,
elaborate_expression_1 (gnat_entity, gnat_entity,
TYPE_ADA_SIZE (gnu_type),
get_identifier ("RM_SIZE"),
definition, 0);
definition, 0));
}
}
@ -4040,7 +4044,7 @@ substitution_list (gnat_subtype, gnat_type, gnu_list, definition)
/* For the following two functions: for each GNAT entity, the GCC
tree node used as a dummy for that entity, if any. */
static tree *dummy_node_table;
static GTY((length ("max_gnat_nodes"))) tree * dummy_node_table;
/* Initialize the above table. */
@ -4049,8 +4053,7 @@ init_dummy_type ()
{
Node_Id gnat_node;
dummy_node_table = (tree *) xmalloc (max_gnat_nodes * sizeof (tree));
ggc_add_tree_root (dummy_node_table, max_gnat_nodes);
dummy_node_table = (tree *) ggc_alloc (max_gnat_nodes * sizeof (tree));
for (gnat_node = 0; gnat_node < max_gnat_nodes; gnat_node++)
dummy_node_table[gnat_node] = NULL_TREE;
@ -4447,9 +4450,9 @@ make_packable_type (type)
! DECL_NONADDRESSABLE_P (old_field));
DECL_INTERNAL_P (new_field) = DECL_INTERNAL_P (old_field);
DECL_ORIGINAL_FIELD (new_field)
= (DECL_ORIGINAL_FIELD (old_field) != 0
? DECL_ORIGINAL_FIELD (old_field) : old_field);
SET_DECL_ORIGINAL_FIELD (new_field,
(DECL_ORIGINAL_FIELD (old_field) != 0
? DECL_ORIGINAL_FIELD (old_field) : old_field));
TREE_CHAIN (new_field) = field_list;
field_list = new_field;
}
@ -4583,7 +4586,7 @@ maybe_pad_type (type, size, align, gnat_entity, name_trailer,
/* Keep the RM_Size of the padded record as that of the old record
if requested. */
TYPE_ADA_SIZE (record) = same_rm_size ? size : rm_size (type);
SET_TYPE_ADA_SIZE (record, same_rm_size ? size : rm_size (type));
/* Unless debugging information isn't being written for the input type,
write a record that shows what we are a subtype of and also make a
@ -5696,12 +5699,12 @@ set_rm_size (uint_size, gnu_type, gnat_entity)
&& Is_Discrete_Or_Fixed_Point_Type (gnat_entity))
TYPE_RM_SIZE_INT (gnu_type) = size;
else if (TREE_CODE (gnu_type) == ENUMERAL_TYPE)
TYPE_RM_SIZE_ENUM (gnu_type) = size;
SET_TYPE_RM_SIZE_ENUM (gnu_type, size);
else if ((TREE_CODE (gnu_type) == RECORD_TYPE
|| TREE_CODE (gnu_type) == UNION_TYPE
|| TREE_CODE (gnu_type) == QUAL_UNION_TYPE)
&& ! TYPE_IS_FAT_POINTER_P (gnu_type))
TYPE_ADA_SIZE (gnu_type) = size;
SET_TYPE_ADA_SIZE (gnu_type, size);
}
/* Given a type TYPE, return a new type whose size is appropriate for SIZE.
@ -5935,8 +5938,8 @@ gnat_substitute_in_type (t, f, r)
new = build_range_type (TREE_TYPE (t), low, high);
if (TYPE_INDEX_TYPE (t))
TYPE_INDEX_TYPE (new)
= gnat_substitute_in_type (TYPE_INDEX_TYPE (t), f, r);
SET_TYPE_INDEX_TYPE (new,
gnat_substitute_in_type (TYPE_INDEX_TYPE (t), f, r));
return new;
}
@ -6056,9 +6059,9 @@ gnat_substitute_in_type (t, f, r)
}
DECL_CONTEXT (new_field) = new;
DECL_ORIGINAL_FIELD (new_field)
= DECL_ORIGINAL_FIELD (field) != 0
? DECL_ORIGINAL_FIELD (field) : field;
SET_DECL_ORIGINAL_FIELD (new_field,
(DECL_ORIGINAL_FIELD (field) != 0
? DECL_ORIGINAL_FIELD (field) : field));
/* If the size of the old field was set at a constant,
propagate the size in case the type's size was variable.
@ -6121,7 +6124,7 @@ gnat_substitute_in_type (t, f, r)
{
TYPE_SIZE (new) = TYPE_SIZE (t);
TYPE_SIZE_UNIT (new) = TYPE_SIZE_UNIT (t);
TYPE_ADA_SIZE (new) = TYPE_ADA_SIZE (t);
SET_TYPE_ADA_SIZE (new, TYPE_ADA_SIZE (t));
}
return new;
@ -6209,3 +6212,5 @@ concat_id_with_name (gnu_id, suffix)
strcpy (Name_Buffer + len, suffix);
return get_identifier (Name_Buffer);
}
#include "gt-ada-decl.h"

View file

@ -159,7 +159,7 @@ extern const char *ref_filename;
/* List of TREE_LIST nodes representing a block stack. TREE_VALUE
of each gives the variable used for the setjmp buffer in the current
block, if any. */
extern tree gnu_block_stack;
extern GTY(()) tree gnu_block_stack;
/* This is the main program of the back-end. It sets up all the table
structures and then generates code. */
@ -348,8 +348,8 @@ enum standard_datatypes
ADT_raise_nodefer_decl,
ADT_LAST};
extern tree gnat_std_decls[(int) ADT_LAST];
extern tree gnat_raise_decls[(int) LAST_REASON_CODE + 1];
extern GTY(()) tree gnat_std_decls[(int) ADT_LAST];
extern GTY(()) tree gnat_raise_decls[(int) LAST_REASON_CODE + 1];
#define longest_float_type_node gnat_std_decls[(int) ADT_longest_float_type]
#define void_type_decl_node gnat_std_decls[(int) ADT_void_type_decl]

View file

@ -8,7 +8,7 @@
@c o
@c G N A T _ RM o
@c o
@c $Revision: 1.6 $
@c $Revision: 1.3.8.1 $
@c o
@c Copyright (C) 1995-2002 Free Software Foundation o
@c o

View file

@ -86,7 +86,6 @@ static const char *gnat_printable_name PARAMS ((tree, int));
static tree gnat_eh_runtime_type PARAMS ((tree));
static int gnat_eh_type_covers PARAMS ((tree, tree));
static void gnat_parse_file PARAMS ((int));
static void gnat_mark_tree PARAMS ((tree));
static rtx gnat_expand_expr PARAMS ((tree, rtx, enum machine_mode,
int));
@ -104,8 +103,6 @@ static rtx gnat_expand_expr PARAMS ((tree, rtx, enum machine_mode,
#define LANG_HOOKS_DECODE_OPTION gnat_decode_option
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE gnat_parse_file
#undef LANG_HOOKS_MARK_TREE
#define LANG_HOOKS_MARK_TREE gnat_mark_tree
#undef LANG_HOOKS_HONOR_READONLY
#define LANG_HOOKS_HONOR_READONLY 1
#undef LANG_HOOKS_FINISH_INCOMPLETE_DECL
@ -289,53 +286,6 @@ gnat_init_options ()
gnat_argc = 1;
}
static void
gnat_mark_tree (t)
tree t;
{
switch (TREE_CODE (t))
{
case FUNCTION_TYPE:
ggc_mark_tree (TYPE_CI_CO_LIST (t));
return;
case INTEGER_TYPE:
if (TYPE_MODULAR_P (t))
ggc_mark_tree (TYPE_MODULUS (t));
else if (TYPE_VAX_FLOATING_POINT_P (t))
;
else if (TYPE_HAS_ACTUAL_BOUNDS_P (t))
ggc_mark_tree (TYPE_ACTUAL_BOUNDS (t));
else
ggc_mark_tree (TYPE_INDEX_TYPE (t));
return;
case ENUMERAL_TYPE:
ggc_mark_tree (TYPE_RM_SIZE_ENUM (t));
return;
case ARRAY_TYPE:
ggc_mark_tree (TYPE_ACTUAL_BOUNDS (t));
return;
case RECORD_TYPE: case UNION_TYPE: case QUAL_UNION_TYPE:
/* This is really TYPE_UNCONSTRAINED_ARRAY for fat pointers. */
ggc_mark_tree (TYPE_ADA_SIZE (t));
return;
case CONST_DECL:
ggc_mark_tree (DECL_CONST_CORRESPONDING_VAR (t));
return;
case FIELD_DECL:
ggc_mark_tree (DECL_ORIGINAL_FIELD (t));
return;
default:
return;
}
}
/* Here is the function to handle the compiler error processing in GCC. */
static void

View file

@ -6,7 +6,6 @@
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 2001-2002 Free Software Foundation, Inc. --
-- --

View file

@ -6,7 +6,6 @@
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 2001-2002 Free Software Foundation, Inc. --
-- --

View file

@ -6,7 +6,6 @@
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 2001-2002 Free Software Foundation, Inc. --
-- --

View file

@ -6,7 +6,6 @@
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 2001 Free Software Foundation, Inc. --
-- --

View file

@ -86,7 +86,7 @@ tree gnu_block_stack;
variables. TREE_VALUE is the VAR_DECL that stores the address of
the raised exception. Nonzero means we are in an exception
handler. Not used in the zero-cost case. */
static tree gnu_except_ptr_stack;
static GTY(()) tree gnu_except_ptr_stack;
/* Map GNAT tree codes to GCC tree codes for simple expressions. */
static enum tree_code gnu_codes[Number_Node_Kinds];
@ -96,7 +96,7 @@ Node_Id error_gnat_node;
/* Variable that stores a list of labels to be used as a goto target instead of
a return in some functions. See processing for N_Subprogram_Body. */
static tree gnu_return_label_stack;
static GTY(()) tree gnu_return_label_stack;
static tree tree_transform PARAMS((Node_Id));
static void elaborate_all_entities PARAMS((Node_Id));
@ -188,9 +188,6 @@ gigi (gnat_root, max_gnat_node, number_name, nodes_ptr, next_node_ptr,
save_gnu_tree (Base_Type (standard_integer),
TYPE_NAME (integer_type_node), 0);
ggc_add_tree_root (&gnu_block_stack, 1);
ggc_add_tree_root (&gnu_except_ptr_stack, 1);
ggc_add_tree_root (&gnu_return_label_stack, 1);
gnu_except_ptr_stack = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE);
dconstp5 = REAL_VALUE_ATOF ("0.5", DFmode);
@ -2318,7 +2315,7 @@ tree_transform (gnat_node)
{
tree gnu_loop_id = make_node (GNAT_LOOP_ID);
TREE_LOOP_ID (gnu_loop_id) = (rtx) loop_id;
TREE_LOOP_ID (gnu_loop_id) = loop_id;
save_gnu_tree (Entity (Identifier (gnat_node)), gnu_loop_id, 1);
}
@ -2407,8 +2404,7 @@ tree_transform (gnat_node)
if (Present (Name (gnat_node)))
loop_id
= (struct nesting *)
TREE_LOOP_ID (get_gnu_tree (Entity (Name (gnat_node))));
= TREE_LOOP_ID (get_gnu_tree (Entity (Name (gnat_node))));
if (Present (Condition (gnat_node)))
gnu_cond = invert_truthvalue (gnat_truthvalue_conversion
@ -5589,3 +5585,5 @@ init_code_table ()
gnu_codes[N_Op_Shift_Right] = RSHIFT_EXPR;
gnu_codes[N_Op_Shift_Right_Arithmetic] = RSHIFT_EXPR;
}
#include "gt-ada-trans.h"

View file

@ -33,6 +33,7 @@
#include "toplev.h"
#include "output.h"
#include "ggc.h"
#include "debug.h"
#include "convert.h"
#include "ada.h"
@ -69,18 +70,22 @@ tree gnat_raise_decls[(int) LAST_REASON_CODE + 1];
/* Associates a GNAT tree node to a GCC tree node. It is used in
`save_gnu_tree', `get_gnu_tree' and `present_gnu_tree'. See documentation
of `save_gnu_tree' for more info. */
static tree *associate_gnat_to_gnu;
static GTY((length ("max_gnat_nodes"))) tree *associate_gnat_to_gnu;
/* This listhead is used to record any global objects that need elaboration.
TREE_PURPOSE is the variable to be elaborated and TREE_VALUE is the
initial value to assign. */
static tree pending_elaborations;
static GTY(()) tree pending_elaborations;
/* This stack allows us to momentarily switch to generating elaboration
lists for an inner context. */
static struct e_stack {struct e_stack *next; tree elab_list; } *elist_stack;
struct e_stack GTY(()) {
struct e_stack *next;
tree elab_list;
};
static GTY(()) struct e_stack *elist_stack;
/* This variable keeps a table for types for each precision so that we only
allocate each of them once. Signed and unsigned types are kept separate.
@ -88,10 +93,10 @@ static struct e_stack {struct e_stack *next; tree elab_list; } *elist_stack;
Note that these types are only used when fold-const requests something
special. Perhaps we should NOT share these types; we'll see how it
goes later. */
static tree signed_and_unsigned_types[2 * MAX_BITS_PER_WORD + 1][2];
static GTY(()) tree signed_and_unsigned_types[2 * MAX_BITS_PER_WORD + 1][2];
/* Likewise for float types, but record these by mode. */
static tree float_types[NUM_MACHINE_MODES];
static GTY(()) tree float_types[NUM_MACHINE_MODES];
/* For each binding contour we allocate a binding_level structure which records
the entities defined or declared in that contour. Contours include:
@ -102,7 +107,7 @@ static tree float_types[NUM_MACHINE_MODES];
Binding contours are used to create GCC tree BLOCK nodes. */
struct binding_level
struct binding_level GTY(())
{
/* A chain of ..._DECL nodes for all variables, constants, functions,
parameters and type declarations. These ..._DECL nodes are chained
@ -121,10 +126,10 @@ struct binding_level
};
/* The binding level currently in effect. */
static struct binding_level *current_binding_level = NULL;
static GTY(()) struct binding_level *current_binding_level;
/* A chain of binding_level structures awaiting reuse. */
static struct binding_level *free_binding_level = NULL;
static GTY((deletable (""))) struct binding_level *free_binding_level;
/* The outermost binding level. This binding level is created when the
compiler is started and it will exist through the entire compilation. */
@ -133,6 +138,11 @@ static struct binding_level *global_binding_level;
/* Binding level structures are initialized by copying this one. */
static struct binding_level clear_binding_level = {NULL, NULL, NULL, NULL};
struct language_function GTY(())
{
int unused;
};
static tree merge_sizes PARAMS ((tree, tree, tree, int, int));
static tree compute_related_constant PARAMS ((tree, tree));
static tree split_plus PARAMS ((tree, tree *));
@ -142,8 +152,6 @@ static tree convert_to_fat_pointer PARAMS ((tree, tree));
static tree convert_to_thin_pointer PARAMS ((tree, tree));
static tree make_descriptor_field PARAMS ((const char *,tree, tree,
tree));
static void mark_binding_level PARAMS ((PTR));
static void mark_e_stack PARAMS ((PTR));
/* Initialize the association of GNAT nodes to GCC trees. */
@ -152,22 +160,12 @@ init_gnat_to_gnu ()
{
Node_Id gnat_node;
associate_gnat_to_gnu = (tree *) xmalloc (max_gnat_nodes * sizeof (tree));
ggc_add_tree_root (associate_gnat_to_gnu, max_gnat_nodes);
associate_gnat_to_gnu = (tree *) ggc_alloc (max_gnat_nodes * sizeof (tree));
for (gnat_node = 0; gnat_node < max_gnat_nodes; gnat_node++)
associate_gnat_to_gnu[gnat_node] = NULL_TREE;
pending_elaborations = build_tree_list (NULL_TREE, NULL_TREE);
ggc_add_tree_root (&pending_elaborations, 1);
ggc_add_root ((PTR) &elist_stack, 1, sizeof (struct e_stack), mark_e_stack);
ggc_add_tree_root (&signed_and_unsigned_types[0][0],
(sizeof signed_and_unsigned_types
/ sizeof signed_and_unsigned_types[0][0]));
ggc_add_tree_root (float_types, ARRAY_SIZE (float_types));
ggc_add_root (&current_binding_level, 1, sizeof current_binding_level,
mark_binding_level);
}
/* GNAT_ENTITY is a GNAT tree node for an entity. GNU_DECL is the GCC tree
@ -260,7 +258,7 @@ pushlevel (ignore)
}
else
newlevel
= (struct binding_level *) xmalloc (sizeof (struct binding_level));
= (struct binding_level *) ggc_alloc (sizeof (struct binding_level));
*newlevel = clear_binding_level;
@ -680,9 +678,6 @@ init_gigi_decls (long_long_float_type, exception_type)
DECL_FUNCTION_CODE (setjmp_decl) = BUILT_IN_SETJMP;
main_identifier_node = get_identifier ("main");
ggc_add_tree_root (gnat_std_decls, ARRAY_SIZE (gnat_std_decls));
ggc_add_tree_root (gnat_raise_decls, ARRAY_SIZE (gnat_raise_decls));
}
/* This function is called indirectly from toplev.c to handle incomplete
@ -849,7 +844,7 @@ finish_record_type (record_type, fieldlist, has_rep, defer_debug)
/* Now set any of the values we've just computed that apply. */
if (! TYPE_IS_FAT_POINTER_P (record_type)
&& ! TYPE_CONTAINS_TEMPLATE_P (record_type))
TYPE_ADA_SIZE (record_type) = ada_size;
SET_TYPE_ADA_SIZE (record_type, ada_size);
#ifdef ROUND_TYPE_SIZE
size = ROUND_TYPE_SIZE (record_type, size, TYPE_ALIGN (record_type));
@ -1159,7 +1154,7 @@ create_subprog_type (return_type, param_decl_list, cico_list,
|| TYPE_RETURNS_BY_REF_P (type) != returns_by_ref)
type = copy_type (type);
TYPE_CI_CO_LIST (type) = cico_list;
SET_TYPE_CI_CO_LIST (type, cico_list);
TYPE_RETURNS_UNCONSTRAINED_P (type) = returns_unconstrained;
TYPE_RETURNS_STACK_DEPRESSED (type) = returns_with_dsp;
TYPE_RETURNS_BY_REF_P (type) = returns_by_ref;
@ -1207,7 +1202,7 @@ create_index_type (min, max, index)
else if (TYPE_INDEX_TYPE (type) != 0)
type = copy_type (type);
TYPE_INDEX_TYPE (type) = index;
SET_TYPE_INDEX_TYPE (type, index);
return type;
}
@ -1598,37 +1593,6 @@ get_pending_elaborations ()
return result;
}
/* Mark the binding level stack. */
static void
mark_binding_level (arg)
PTR arg;
{
struct binding_level *level = *(struct binding_level **) arg;
for (; level != 0; level = level->level_chain)
{
ggc_mark_tree (level->names);
ggc_mark_tree (level->blocks);
ggc_mark_tree (level->this_block);
}
}
/* Mark the pending elaboration list. */
static void
mark_e_stack (data)
PTR data;
{
struct e_stack *p = *((struct e_stack **) data);
if (p != 0)
{
ggc_mark_tree (p->elab_list);
mark_e_stack (&p->next);
}
}
/* Return nonzero if there are pending elaborations. */
int
@ -1643,7 +1607,7 @@ pending_elaborations_p ()
void
push_pending_elaborations ()
{
struct e_stack *p = (struct e_stack *) xmalloc (sizeof (struct e_stack));
struct e_stack *p = (struct e_stack *) ggc_alloc (sizeof (struct e_stack));
p->next = elist_stack;
p->elab_list = pending_elaborations;
@ -1660,7 +1624,6 @@ pop_pending_elaborations ()
pending_elaborations = p->elab_list;
elist_stack = p->next;
free (p);
}
/* Return the current position in pending_elaborations so we can insert
@ -2666,7 +2629,7 @@ update_pointer_to (old_type, new_type)
TREE_CHAIN (TYPE_FIELDS (ptr)), new_ref));
for (var = TYPE_MAIN_VARIANT (ptr); var; var = TYPE_NEXT_VARIANT (var))
TYPE_UNCONSTRAINED_ARRAY (var) = new_type;
SET_TYPE_UNCONSTRAINED_ARRAY (var, new_type);
TYPE_POINTER_TO (new_type) = TYPE_REFERENCE_TO (new_type)
= TREE_TYPE (new_type) = ptr;
@ -3366,3 +3329,6 @@ unchecked_convert (type, expr)
return expr;
}
#include "gt-ada-utils.h"
#include "gtype-ada.h"

View file

@ -514,7 +514,7 @@ nonbinary_modular_operation (op_code, type, lhs, rhs)
/* Copy the node so we ensure it can be modified to make it modular. */
op_type = copy_node (gnat_type_for_size (precision, unsignedp));
modulus = convert (op_type, modulus);
TYPE_MODULUS (op_type) = modulus;
SET_TYPE_MODULUS (op_type, modulus);
TYPE_MODULAR_P (op_type) = 1;
lhs = convert (op_type, lhs);
rhs = convert (op_type, rhs);
@ -530,7 +530,7 @@ nonbinary_modular_operation (op_code, type, lhs, rhs)
{
tree div_type = copy_node (gnat_type_for_size (needed_precision, 1));
modulus = convert (div_type, modulus);
TYPE_MODULUS (div_type) = modulus;
SET_TYPE_MODULUS (div_type, modulus);
TYPE_MODULAR_P (div_type) = 1;
result = convert (op_type,
fold (build (TRUNC_MOD_EXPR, div_type,

View file

@ -152,7 +152,7 @@ static int nonlocal_set_p PARAMS ((rtx));
current function performs nonlocal memory memory references for the
purposes of marking the function as a constant function. */
static rtx *reg_base_value;
static GTY((length ("reg_base_value_size"))) rtx *reg_base_value;
static rtx *new_reg_base_value;
static unsigned int reg_base_value_size; /* size of reg_base_value array */
@ -2663,8 +2663,8 @@ init_alias_analysis ()
optimization. Loop unrolling can create a large number of
registers. */
reg_base_value_size = maxreg * 2;
reg_base_value = (rtx *) xcalloc (reg_base_value_size, sizeof (rtx));
ggc_add_rtx_root (reg_base_value, reg_base_value_size);
reg_base_value = (rtx *) ggc_alloc_cleared (reg_base_value_size
* sizeof (rtx));
new_reg_base_value = (rtx *) xmalloc (reg_base_value_size * sizeof (rtx));
reg_seen = (char *) xmalloc (reg_base_value_size);
@ -2878,12 +2878,7 @@ end_alias_analysis ()
reg_known_value_size = 0;
free (reg_known_equiv_p + FIRST_PSEUDO_REGISTER);
reg_known_equiv_p = 0;
if (reg_base_value)
{
ggc_del_root (reg_base_value);
free (reg_base_value);
reg_base_value = 0;
}
reg_base_value = 0;
reg_base_value_size = 0;
if (alias_invariant)
{
@ -2891,3 +2886,5 @@ end_alias_analysis ()
alias_invariant = 0;
}
}
#include "gt-alias.h"

View file

@ -33,7 +33,7 @@ typedef bitmap_head regset_head;
typedef bitmap regset;
/* Initialize a new regset. */
#define INIT_REG_SET(HEAD) bitmap_initialize (HEAD)
#define INIT_REG_SET(HEAD) bitmap_initialize (HEAD, 1)
/* Clear a register set by freeing up the linked list. */
#define CLEAR_REG_SET(HEAD) bitmap_clear (HEAD)
@ -99,7 +99,7 @@ do { \
#define OBSTACK_ALLOC_REG_SET(OBSTACK) BITMAP_OBSTACK_ALLOC (OBSTACK)
/* Initialize a register set. Returns the new register set. */
#define INITIALIZE_REG_SET(HEAD) bitmap_initialize (&HEAD)
#define INITIALIZE_REG_SET(HEAD) bitmap_initialize (&HEAD, 1)
/* Do any cleanup needed on a regset when it is no longer used. */
#define FREE_REG_SET(REGSET) BITMAP_FREE(REGSET)

View file

@ -23,6 +23,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "rtl.h"
#include "flags.h"
#include "obstack.h"
#include "ggc.h"
#include "bitmap.h"
/* Obstack to allocate bitmap elements from. */
@ -40,13 +41,33 @@ static int bitmap_obstack_init = FALSE;
/* Global data */
bitmap_element bitmap_zero_bits; /* An element of all zero bits. */
static bitmap_element *bitmap_free; /* Freelist of bitmap elements. */
static GTY((deletable (""))) bitmap_element *bitmap_ggc_free;
static void bitmap_elem_to_freelist PARAMS ((bitmap, bitmap_element *));
static void bitmap_element_free PARAMS ((bitmap, bitmap_element *));
static bitmap_element *bitmap_element_allocate PARAMS ((void));
static bitmap_element *bitmap_element_allocate PARAMS ((bitmap));
static int bitmap_element_zerop PARAMS ((bitmap_element *));
static void bitmap_element_link PARAMS ((bitmap, bitmap_element *));
static bitmap_element *bitmap_find_bit PARAMS ((bitmap, unsigned int));
/* Add ELEM to the appropriate freelist. */
static INLINE void
bitmap_elem_to_freelist (head, elt)
bitmap head;
bitmap_element *elt;
{
if (head->using_obstack)
{
elt->next = bitmap_free;
bitmap_free = elt;
}
else
{
elt->next = bitmap_ggc_free;
bitmap_ggc_free = elt;
}
}
/* Free a bitmap element. Since these are allocated off the
bitmap_obstack, "free" actually means "put onto the freelist". */
@ -75,56 +96,68 @@ bitmap_element_free (head, elt)
if (head->current)
head->indx = head->current->indx;
}
elt->next = bitmap_free;
bitmap_free = elt;
bitmap_elem_to_freelist (head, elt);
}
/* Allocate a bitmap element. The bits are cleared, but nothing else is. */
static INLINE bitmap_element *
bitmap_element_allocate ()
bitmap_element_allocate (head)
bitmap head;
{
bitmap_element *element;
if (bitmap_free != 0)
if (head->using_obstack)
{
element = bitmap_free;
bitmap_free = element->next;
}
else
{
/* We can't use gcc_obstack_init to initialize the obstack since
print-rtl.c now calls bitmap functions, and bitmap is linked
into the gen* functions. */
if (!bitmap_obstack_init)
if (bitmap_free != 0)
{
bitmap_obstack_init = TRUE;
/* Let particular systems override the size of a chunk. */
element = bitmap_free;
bitmap_free = element->next;
}
else
{
/* We can't use gcc_obstack_init to initialize the obstack since
print-rtl.c now calls bitmap functions, and bitmap is linked
into the gen* functions. */
if (!bitmap_obstack_init)
{
bitmap_obstack_init = TRUE;
/* Let particular systems override the size of a chunk. */
#ifndef OBSTACK_CHUNK_SIZE
#define OBSTACK_CHUNK_SIZE 0
#endif
/* Let them override the alloc and free routines too. */
/* Let them override the alloc and free routines too. */
#ifndef OBSTACK_CHUNK_ALLOC
#define OBSTACK_CHUNK_ALLOC xmalloc
#endif
#ifndef OBSTACK_CHUNK_FREE
#define OBSTACK_CHUNK_FREE free
#endif
#if !defined(__GNUC__) || (__GNUC__ < 2)
#define __alignof__(type) 0
#endif
obstack_specify_allocation (&bitmap_obstack, OBSTACK_CHUNK_SIZE,
__alignof__ (bitmap_element),
(void *(*) PARAMS ((long))) OBSTACK_CHUNK_ALLOC,
(void (*) PARAMS ((void *))) OBSTACK_CHUNK_FREE);
obstack_specify_allocation (&bitmap_obstack, OBSTACK_CHUNK_SIZE,
__alignof__ (bitmap_element),
(void *(*) PARAMS ((long))) OBSTACK_CHUNK_ALLOC,
(void (*) PARAMS ((void *))) OBSTACK_CHUNK_FREE);
}
element = (bitmap_element *) obstack_alloc (&bitmap_obstack,
sizeof (bitmap_element));
}
element = (bitmap_element *) obstack_alloc (&bitmap_obstack,
sizeof (bitmap_element));
}
else
{
if (bitmap_ggc_free != NULL)
{
element = bitmap_ggc_free;
bitmap_ggc_free = element->next;
}
else
element = ggc_alloc (sizeof (bitmap_element));
}
memset (element->bits, 0, sizeof (element->bits));
@ -232,8 +265,7 @@ bitmap_clear (head)
for (element = head->first; element != 0; element = next)
{
next = element->next;
element->next = bitmap_free;
bitmap_free = element;
bitmap_elem_to_freelist (head, element);
}
head->first = head->current = 0;
@ -256,7 +288,7 @@ bitmap_copy (to, from)
/* Copy elements in forward direction one at a time */
for (from_ptr = from->first; from_ptr; from_ptr = from_ptr->next)
{
bitmap_element *to_elt = bitmap_element_allocate ();
bitmap_element *to_elt = bitmap_element_allocate (to);
to_elt->indx = from_ptr->indx;
@ -363,7 +395,7 @@ bitmap_set_bit (head, bit)
if (ptr == 0)
{
ptr = bitmap_element_allocate ();
ptr = bitmap_element_allocate (head);
ptr->indx = bit / BITMAP_ELEMENT_ALL_BITS;
ptr->bits[word_num] = bit_val;
bitmap_element_link (head, ptr);
@ -594,8 +626,7 @@ bitmap_operation (to, from1, from2, operation)
changed = 1;
to_tmp = to_ptr;
to_ptr = to_ptr->next;
to_tmp->next = bitmap_free;
bitmap_free = to_tmp;
bitmap_elem_to_freelist (to, to_tmp);
}
if (to_ptr && to_ptr->indx == indx)
{
@ -603,7 +634,7 @@ bitmap_operation (to, from1, from2, operation)
to_ptr = to_ptr->next;
}
else
to_tmp = bitmap_element_allocate ();
to_tmp = bitmap_element_allocate (to);
/* Do the operation, and if any bits are set, link it into the
linked list. */
@ -638,8 +669,7 @@ bitmap_operation (to, from1, from2, operation)
}
else
{
to_tmp->next = bitmap_free;
bitmap_free = to_tmp;
bitmap_elem_to_freelist (to, to_tmp);
}
}
@ -649,8 +679,16 @@ bitmap_operation (to, from1, from2, operation)
changed = 1;
for (to_tmp = to_ptr; to_tmp->next ; to_tmp = to_tmp->next)
continue;
to_tmp->next = bitmap_free;
bitmap_free = to_ptr;
if (to->using_obstack)
{
to_tmp->next = bitmap_free;
bitmap_free = to_ptr;
}
else
{
to_tmp->next = bitmap_ggc_free;
bitmap_ggc_free = to_ptr;
}
}
#undef DOIT
@ -715,10 +753,15 @@ bitmap_union_of_diff (dst, a, b, c)
/* Initialize a bitmap header. */
bitmap
bitmap_initialize (head)
bitmap_initialize (head, using_obstack)
bitmap head;
int using_obstack;
{
if (head == NULL && ! using_obstack)
head = ggc_alloc (sizeof (*head));
head->first = head->current = 0;
head->using_obstack = using_obstack;
return head;
}
@ -800,3 +843,5 @@ bitmap_print (file, head, prefix, suffix)
});
fputs (suffix, file);
}
#include "gt-bitmap.h"

View file

@ -40,7 +40,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
having to realloc and copy a giant bit array. The `prev' field is
undefined for an element on the free list. */
typedef struct bitmap_element_def
typedef struct bitmap_element_def GTY(())
{
struct bitmap_element_def *next; /* Next element. */
struct bitmap_element_def *prev; /* Previous element. */
@ -49,12 +49,14 @@ typedef struct bitmap_element_def
} bitmap_element;
/* Head of bitmap linked list. */
typedef struct bitmap_head_def {
typedef struct bitmap_head_def GTY(()) {
bitmap_element *first; /* First element in linked list. */
bitmap_element *current; /* Last element looked at. */
unsigned int indx; /* Index of last element looked at. */
} bitmap_head, *bitmap;
int using_obstack; /* Are we using an obstack or ggc for
allocation? */
} bitmap_head;
typedef struct bitmap_head_def *bitmap;
/* Enumeration giving the various operations we support. */
enum bitmap_bits {
@ -100,10 +102,12 @@ extern void debug_bitmap_file PARAMS ((FILE *, bitmap));
/* Print a bitmap */
extern void bitmap_print PARAMS ((FILE *, bitmap, const char *, const char *));
/* Initialize a bitmap header. */
extern bitmap bitmap_initialize PARAMS ((bitmap));
/* Initialize a bitmap header. If HEAD is NULL, a new header will be
allocated. USING_OBSTACK indicates how elements should be allocated. */
extern bitmap bitmap_initialize PARAMS ((bitmap head,
int using_obstack));
/* Release all memory held by bitmaps. */
/* Release all memory used by the bitmap obstack. */
extern void bitmap_release_memory PARAMS ((void));
/* A few compatibility/functions macros for compatibility with sbitmaps */
@ -117,22 +121,15 @@ extern int bitmap_last_set_bit PARAMS((bitmap));
/* Allocate a bitmap with oballoc. */
#define BITMAP_OBSTACK_ALLOC(OBSTACK) \
bitmap_initialize ((bitmap) obstack_alloc (OBSTACK, sizeof (bitmap_head)))
bitmap_initialize ((bitmap) obstack_alloc (OBSTACK, sizeof (bitmap_head)), 1)
/* Allocate a bitmap with alloca. Note alloca cannot be passed as an
argument to a function, so we set a temporary variable to the value
returned by alloca and pass that variable to bitmap_initialize().
PTR is then set to the value returned from bitmap_initialize() to
avoid having it appear more than once in case it has side effects. */
#define BITMAP_ALLOCA(PTR) \
do { \
bitmap temp_bitmap_ = (bitmap) alloca (sizeof (bitmap_head)); \
(PTR) = bitmap_initialize (temp_bitmap_); \
} while (0)
/* Allocate a bitmap with ggc_alloc. */
#define BITMAP_GGC_ALLOC() \
bitmap_initialize (NULL, 0)
/* Allocate a bitmap with xmalloc. */
#define BITMAP_XMALLOC() \
bitmap_initialize ((bitmap) xmalloc (sizeof (bitmap_head)))
bitmap_initialize ((bitmap) xmalloc (sizeof (bitmap_head)), 1)
/* Do any cleanup needed on a bitmap when it is no longer used. */
#define BITMAP_FREE(BITMAP) \

View file

@ -3750,41 +3750,6 @@ finish_label_address_expr (label)
return result;
}
/* Mark P (a stmt_tree) for GC. The use of a `void *' for the
parameter allows this function to be used as a GC-marking
function. */
void
mark_stmt_tree (p)
void *p;
{
stmt_tree st = (stmt_tree) p;
ggc_mark_tree (st->x_last_stmt);
ggc_mark_tree (st->x_last_expr_type);
}
/* Mark LD for GC. */
void
c_mark_lang_decl (c)
struct c_lang_decl *c ATTRIBUTE_UNUSED;
{
}
/* Mark F for GC. */
void
mark_c_language_function (f)
struct language_function *f;
{
if (!f)
return;
mark_stmt_tree (&f->x_stmt_tree);
ggc_mark_tree (f->x_scope_stmt_stack);
}
/* Hook used by expand_expr to expand language-specific tree codes. */
rtx
@ -4288,7 +4253,7 @@ enum built_in_attribute
ATTR_LAST
};
static tree built_in_attributes[(int) ATTR_LAST];
static GTY(()) tree built_in_attributes[(int) ATTR_LAST];
static bool c_attrs_initialized = false;
@ -4570,7 +4535,6 @@ c_init_attributes ()
#undef DEF_ATTR_IDENT
#undef DEF_ATTR_TREE_LIST
#undef DEF_FN_ATTR
ggc_add_tree_root (built_in_attributes, (int) ATTR_LAST);
c_attrs_initialized = true;
}
@ -5938,3 +5902,5 @@ check_function_arguments_recurse (callback, ctx, param, param_num)
(*callback) (ctx, param, param_num);
}
#include "gt-c-common.h"

View file

@ -183,10 +183,10 @@ enum c_tree_index
/* Identifier part common to the C front ends. Inherits from
tree_identifier, despite appearances. */
struct c_common_identifier
struct c_common_identifier GTY(())
{
struct tree_common common;
struct cpp_hashnode node;
struct cpp_hashnode GTY ((skip (""))) node;
};
#define wchar_type_node c_global_trees[CTI_WCHAR_TYPE]
@ -231,7 +231,7 @@ struct c_common_identifier
/* A node for `((void) 0)'. */
#define void_zero_node c_global_trees[CTI_VOID_ZERO]
extern tree c_global_trees[CTI_MAX];
extern GTY(()) tree c_global_trees[CTI_MAX];
/* Mark which labels are explicitly declared.
These may be shadowed, and may be referenced from nested functions. */
@ -252,7 +252,7 @@ c_language_kind;
/* Information about a statement tree. */
struct stmt_tree_s {
struct stmt_tree_s GTY(()) {
/* The last statement added to the tree. */
tree x_last_stmt;
/* The type of the last expression statement. (This information is
@ -282,7 +282,7 @@ typedef struct stmt_tree_s *stmt_tree;
/* Global state pertinent to the current function. Some C dialects
extend this structure with additional fields. */
struct language_function {
struct c_language_function GTY(()) {
/* While we are parsing the function, this contains information
about the statement-tree that we are building. */
struct stmt_tree_s x_stmt_tree;
@ -344,7 +344,6 @@ extern tree walk_stmt_tree PARAMS ((tree *,
void *));
extern void prep_stmt PARAMS ((tree));
extern void expand_stmt PARAMS ((tree));
extern void mark_stmt_tree PARAMS ((void *));
extern void shadow_warning PARAMS ((const char *,
tree, tree));
extern tree c_begin_if_stmt PARAMS ((void));
@ -357,7 +356,7 @@ extern void c_finish_while_stmt_cond PARAMS ((tree, tree));
structure for FUNCTION_DECLs; all other DECLs have a NULL
DECL_LANG_SPECIFIC field. */
struct c_lang_decl {
struct c_lang_decl GTY(()) {
unsigned declared_inline : 1;
};
@ -368,8 +367,6 @@ struct c_lang_decl {
#define DECL_NUM_STMTS(NODE) \
(FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
extern void c_mark_lang_decl PARAMS ((struct c_lang_decl *));
/* The variant of the C language being processed. Each C language
front-end defines this variable. */
@ -869,8 +866,6 @@ extern tree boolean_increment PARAMS ((enum tree_code,
after entering or leaving a header file. */
extern void extract_interface_info PARAMS ((void));
extern void mark_c_language_function PARAMS ((struct language_function *));
extern int case_compare PARAMS ((splay_tree_key,
splay_tree_key));

View file

@ -103,21 +103,21 @@ static int current_function_prototype_line;
/* The current statement tree. */
static struct stmt_tree_s c_stmt_tree;
static GTY(()) struct stmt_tree_s c_stmt_tree;
/* The current scope statement stack. */
static tree c_scope_stmt_stack;
static GTY(()) tree c_scope_stmt_stack;
/* A list (chain of TREE_LIST nodes) of all LABEL_DECLs in the function
that have names. Here so we can clear out their names' definitions
at the end of the function. */
static tree named_labels;
static GTY(()) tree named_labels;
/* A list of LABEL_DECLs from outer contexts that are currently shadowed. */
static tree shadowed_labels;
static GTY(()) tree shadowed_labels;
/* Nonzero when store_parm_decls is called indicates a varargs function.
Value not meaningful after store_parm_decls. */
@ -164,7 +164,7 @@ static int current_extern_inline;
/* Note that the information in the `names' component of the global contour
is duplicated in the IDENTIFIER_GLOBAL_VALUEs of all identifiers. */
struct binding_level
struct binding_level GTY(())
{
/* A chain of _DECL nodes for all variables, constants, functions,
and typedef types. These are in the reverse of the order supplied.
@ -229,17 +229,17 @@ struct binding_level
/* The binding level currently in effect. */
static struct binding_level *current_binding_level;
static GTY(()) struct binding_level *current_binding_level;
/* A chain of binding_level structures awaiting reuse. */
static struct binding_level *free_binding_level;
static GTY((deletable (""))) struct binding_level *free_binding_level;
/* The outermost binding level, for names of file scope.
This is created when the compiler is started and exists
through the entire run. */
static struct binding_level *global_binding_level;
static GTY(()) struct binding_level *global_binding_level;
/* Binding level structures are initialized by copying this one. */
@ -262,7 +262,7 @@ static int keep_next_if_subblocks;
saved values of named_labels and shadowed_labels for
a label binding level outside the current one. */
static struct binding_level *label_level_chain;
static GTY(()) struct binding_level *label_level_chain;
/* Functions called automatically at the beginning and end of execution. */
@ -271,7 +271,7 @@ tree static_ctors, static_dtors;
/* Forward declarations. */
static struct binding_level * make_binding_level PARAMS ((void));
static void mark_binding_level PARAMS ((void *));
static void pop_binding_level PARAMS ((struct binding_level **));
static void clear_limbo_values PARAMS ((tree));
static int duplicate_decls PARAMS ((tree, tree, int));
static int redeclaration_error_message PARAMS ((tree, tree));
@ -755,13 +755,33 @@ c_finish_incomplete_decl (decl)
}
}
/* Create a new `struct binding_level'. */
/* Reuse or create a struct for this binding level. */
static struct binding_level *
make_binding_level ()
{
/* NOSTRICT */
return (struct binding_level *) xmalloc (sizeof (struct binding_level));
if (free_binding_level)
{
struct binding_level *result = free_binding_level;
free_binding_level = result->level_chain;
return result;
}
else
return (struct binding_level *) ggc_alloc (sizeof (struct binding_level));
}
/* Remove a binding level from a list and add it to the level chain. */
static void
pop_binding_level (lp)
struct binding_level **lp;
{
struct binding_level *l = *lp;
*lp = l->level_chain;
memset (l, 0, sizeof (struct binding_level));
l->level_chain = free_binding_level;
free_binding_level = l;
}
/* Nonzero if we are currently in the global binding level. */
@ -829,17 +849,7 @@ pushlevel (tag_transparent)
named_labels = 0;
}
/* Reuse or create a struct for this binding level. */
if (free_binding_level)
{
newlevel = free_binding_level;
free_binding_level = free_binding_level->level_chain;
}
else
{
newlevel = make_binding_level ();
}
newlevel = make_binding_level ();
/* Add this level to the front of the chain (stack) of levels that
are active. */
@ -1060,13 +1070,7 @@ poplevel (keep, reverse, functionbody)
/* Pop the current level, and free the structure for reuse. */
{
struct binding_level *level = current_binding_level;
current_binding_level = current_binding_level->level_chain;
level->level_chain = free_binding_level;
free_binding_level = level;
}
pop_binding_level (&current_binding_level);
/* Dispose of the block that we just made inside some higher level. */
if (functionbody)
@ -1145,17 +1149,7 @@ push_label_level ()
{
struct binding_level *newlevel;
/* Reuse or create a struct for this binding level. */
if (free_binding_level)
{
newlevel = free_binding_level;
free_binding_level = free_binding_level->level_chain;
}
else
{
newlevel = make_binding_level ();
}
newlevel = make_binding_level ();
/* Add this level to the front of the chain (stack) of label levels. */
@ -1217,9 +1211,7 @@ pop_label_level ()
shadowed_labels = level->shadowed;
/* Pop the current level, and free the structure for reuse. */
label_level_chain = label_level_chain->level_chain;
level->level_chain = free_binding_level;
free_binding_level = level;
pop_binding_level (&label_level_chain);
}
/* Push a definition or a declaration of struct, union or enum tag "name".
@ -2864,26 +2856,6 @@ lookup_name_current_level (name)
return t;
}
/* Mark ARG for GC. */
static void
mark_binding_level (arg)
void *arg;
{
struct binding_level *level = *(struct binding_level **) arg;
for (; level != 0; level = level->level_chain)
{
ggc_mark_tree (level->names);
ggc_mark_tree (level->tags);
ggc_mark_tree (level->shadowed);
ggc_mark_tree (level->blocks);
ggc_mark_tree (level->this_block);
ggc_mark_tree (level->parm_order);
ggc_mark_tree (level->incomplete_list);
}
}
/* Create the predefined scalar types of C,
and some nodes representing standard constants (0, 1, (void *) 0).
Initialize the global binding level.
@ -2937,20 +2909,6 @@ c_init_decl_processing ()
make_fname_decl = c_make_fname_decl;
start_fname_decls ();
/* Record our roots. */
ggc_add_tree_root (c_global_trees, CTI_MAX);
ggc_add_root (&c_stmt_tree, 1, sizeof c_stmt_tree, mark_stmt_tree);
ggc_add_tree_root (&c_scope_stmt_stack, 1);
ggc_add_tree_root (&named_labels, 1);
ggc_add_tree_root (&shadowed_labels, 1);
ggc_add_root (&current_binding_level, 1, sizeof current_binding_level,
mark_binding_level);
ggc_add_root (&label_level_chain, 1, sizeof label_level_chain,
mark_binding_level);
ggc_add_tree_root (&static_ctors, 1);
ggc_add_tree_root (&static_dtors, 1);
}
/* Create the VAR_DECL for __FUNCTION__ etc. ID is the name to give the
@ -7045,9 +7003,9 @@ check_for_loop_decls ()
that keep track of the progress of compilation of the current function.
Used for nested functions. */
struct c_language_function
struct language_function GTY(())
{
struct language_function base;
struct c_language_function base;
tree named_labels;
tree shadowed_labels;
int returns_value;
@ -7065,10 +7023,10 @@ void
c_push_function_context (f)
struct function *f;
{
struct c_language_function *p;
p = ((struct c_language_function *)
xmalloc (sizeof (struct c_language_function)));
f->language = (struct language_function *) p;
struct language_function *p;
p = ((struct language_function *)
ggc_alloc (sizeof (struct language_function)));
f->language = p;
p->base.x_stmt_tree = c_stmt_tree;
p->base.x_scope_stmt_stack = c_scope_stmt_stack;
@ -7088,8 +7046,7 @@ void
c_pop_function_context (f)
struct function *f;
{
struct c_language_function *p
= (struct c_language_function *) f->language;
struct language_function *p = f->language;
tree link;
/* Bring back all the labels that were shadowed. */
@ -7119,26 +7076,7 @@ c_pop_function_context (f)
current_extern_inline = p->extern_inline;
current_binding_level = p->binding_level;
free (p);
f->language = 0;
}
/* Mark the language specific parts of F for GC. */
void
c_mark_function_context (f)
struct function *f;
{
struct c_language_function *p
= (struct c_language_function *) f->language;
if (p == 0)
return;
mark_c_language_function (&p->base);
ggc_mark_tree (p->shadowed_labels);
ggc_mark_tree (p->named_labels);
mark_binding_level (&p->binding_level);
f->language = NULL;
}
/* Copy the DECL_LANG_SPECIFIC data associated with DECL. */
@ -7158,32 +7096,6 @@ c_dup_lang_specific_decl (decl)
DECL_LANG_SPECIFIC (decl) = ld;
}
/* Mark the language specific bits in T for GC. */
void
c_mark_tree (t)
tree t;
{
if (TREE_CODE (t) == IDENTIFIER_NODE)
{
struct lang_identifier *i = (struct lang_identifier *) t;
ggc_mark_tree (i->global_value);
ggc_mark_tree (i->local_value);
ggc_mark_tree (i->label_value);
ggc_mark_tree (i->implicit_decl);
ggc_mark_tree (i->error_locus);
ggc_mark_tree (i->limbo_value);
}
else if (TYPE_P (t) && TYPE_LANG_SPECIFIC (t))
ggc_mark (TYPE_LANG_SPECIFIC (t));
else if (DECL_P (t) && DECL_LANG_SPECIFIC (t))
{
ggc_mark (DECL_LANG_SPECIFIC (t));
c_mark_lang_decl (&DECL_LANG_SPECIFIC (t)->base);
ggc_mark_tree (DECL_LANG_SPECIFIC (t)->pending_sizes);
}
}
/* The functions below are required for functionality of doing
function at once processing in the C front end. Currently these
functions are not called from anywhere in the C front end, but as
@ -7319,3 +7231,5 @@ make_pointer_declarator (type_quals_attrs, target)
itarget = tree_cons (attrs, target, NULL_TREE);
return build1 (INDIRECT_REF, quals, itarget);
}
#include "gt-c-decl.h"

View file

@ -25,6 +25,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "tree.h"
#include "c-tree.h"
#include "c-common.h"
#include "ggc.h"
#include "langhooks.h"
#include "langhooks-def.h"
@ -49,8 +50,6 @@ static void c_init_options PARAMS ((void));
#define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set
#undef LANG_HOOKS_SAFE_FROM_P
#define LANG_HOOKS_SAFE_FROM_P c_safe_from_p
#undef LANG_HOOKS_MARK_TREE
#define LANG_HOOKS_MARK_TREE c_mark_tree
#undef LANG_HOOKS_EXPAND_EXPR
#define LANG_HOOKS_EXPAND_EXPR c_expand_expr
#undef LANG_HOOKS_MARK_ADDRESSABLE
@ -75,8 +74,6 @@ static void c_init_options PARAMS ((void));
#define LANG_HOOKS_FUNCTION_ENTER_NESTED c_push_function_context
#undef LANG_HOOKS_FUNCTION_LEAVE_NESTED
#define LANG_HOOKS_FUNCTION_LEAVE_NESTED c_pop_function_context
#undef LANG_HOOKS_FUNCTION_MARK
#define LANG_HOOKS_FUNCTION_MARK c_mark_function_context
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl
@ -224,3 +221,5 @@ finish_file ()
{
c_objc_common_finish_file ();
}
#include "gtype-c.h"

View file

@ -41,7 +41,7 @@ static void expand_deferred_fns PARAMS ((void));
static tree start_cdtor PARAMS ((int));
static void finish_cdtor PARAMS ((tree));
static varray_type deferred_fns;
static GTY(()) varray_type deferred_fns;
int
c_missing_noreturn_ok_p (decl)
@ -253,7 +253,6 @@ c_objc_common_init (filename)
}
VARRAY_TREE_INIT (deferred_fns, 32, "deferred_fns");
ggc_add_tree_varray_root (&deferred_fns, 1);
return filename;
}
@ -291,7 +290,7 @@ expand_deferred_fns ()
}
}
VARRAY_FREE (deferred_fns);
deferred_fns = 0;
}
static tree
@ -413,3 +412,5 @@ c_tree_printer (buffer)
return 0;
}
}
#include "gt-c-objc-common.h"

View file

@ -266,17 +266,17 @@ static const char *if_stmt_file;
static int if_stmt_line;
/* List of types and structure classes of the current declaration. */
static tree current_declspecs = NULL_TREE;
static tree prefix_attributes = NULL_TREE;
static GTY(()) tree current_declspecs;
static GTY(()) tree prefix_attributes;
/* List of all the attributes applying to the identifier currently being
declared; includes prefix_attributes and possibly some more attributes
just after a comma. */
static tree all_prefix_attributes = NULL_TREE;
static GTY(()) tree all_prefix_attributes;
/* Stack of saved values of current_declspecs, prefix_attributes and
all_prefix_attributes. */
static tree declspec_stack;
static GTY(()) tree declspec_stack;
/* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK
should be called from the productions making use of setspecs. */
@ -341,16 +341,11 @@ static inline int _yylex PARAMS ((void));
static int yylex PARAMS ((void));
static void init_reswords PARAMS ((void));
/* Add GC roots for variables local to this file. */
/* Initialisation routine for this file. */
void
c_parse_init ()
{
init_reswords ();
ggc_add_tree_root (&declspec_stack, 1);
ggc_add_tree_root (&current_declspecs, 1);
ggc_add_tree_root (&prefix_attributes, 1);
ggc_add_tree_root (&all_prefix_attributes, 1);
}
%}
@ -3730,8 +3725,6 @@ end ifc
|| (next_type == CPP_NAME && yylexname () == STRING));
yylval.ttype = combine_strings (strings);
VARRAY_FREE (strings);
}
else
yylval.ttype = orig;
@ -3943,3 +3936,5 @@ free_parser_stacks ()
free (malloced_yyvs);
}
}
#include "gt-c-parse.h"

View file

@ -36,11 +36,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define GCC_BAD(msgid) do { warning (msgid); return; } while (0)
#define GCC_BAD2(msgid, arg) do { warning (msgid, arg); return; } while (0)
#ifdef HANDLE_PRAGMA_PACK
static void handle_pragma_pack PARAMS ((cpp_reader *));
#ifdef HANDLE_PRAGMA_PACK_PUSH_POP
typedef struct align_stack
typedef struct align_stack GTY(())
{
int alignment;
unsigned int num_pushes;
@ -48,8 +44,12 @@ typedef struct align_stack
struct align_stack * prev;
} align_stack;
static struct align_stack * alignment_stack = NULL;
static GTY(()) struct align_stack * alignment_stack;
#ifdef HANDLE_PRAGMA_PACK
static void handle_pragma_pack PARAMS ((cpp_reader *));
#ifdef HANDLE_PRAGMA_PACK_PUSH_POP
/* If we have a "global" #pragma pack(<n>) in effect when the first
#pragma pack(push,<n>) is encountered, this stores the value of
maximum_field_alignment in effect. When the final pop_alignment()
@ -61,7 +61,6 @@ static int default_alignment;
static void push_alignment PARAMS ((int, tree));
static void pop_alignment PARAMS ((tree));
static void mark_align_stack PARAMS ((void *));
/* Push an alignment value onto the stack. */
static void
@ -75,7 +74,7 @@ push_alignment (alignment, id)
{
align_stack * entry;
entry = (align_stack *) xmalloc (sizeof (* entry));
entry = (align_stack *) ggc_alloc (sizeof (* entry));
entry->alignment = alignment;
entry->num_pushes = 1;
@ -137,24 +136,9 @@ pop_alignment (id)
else
maximum_field_alignment = entry->alignment;
free (alignment_stack);
alignment_stack = entry;
}
}
static void
mark_align_stack (p)
void *p;
{
align_stack *a = *(align_stack **) p;
while (a)
{
ggc_mark_tree (a->id);
a = a->prev;
}
}
#else /* not HANDLE_PRAGMA_PACK_PUSH_POP */
#define SET_GLOBAL_ALIGNMENT(ALIGN) (maximum_field_alignment = (ALIGN))
#define push_alignment(ID, N) \
@ -272,12 +256,12 @@ handle_pragma_pack (dummy)
}
#endif /* HANDLE_PRAGMA_PACK */
static GTY(()) tree pending_weaks;
#ifdef HANDLE_PRAGMA_WEAK
static void apply_pragma_weak PARAMS ((tree, tree));
static void handle_pragma_weak PARAMS ((cpp_reader *));
static tree pending_weaks;
static void
apply_pragma_weak (decl, value)
tree decl, value;
@ -363,11 +347,11 @@ maybe_apply_pragma_weak (decl)
}
#endif /* HANDLE_PRAGMA_WEAK */
static GTY(()) tree pending_redefine_extname;
#ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME
static void handle_pragma_redefine_extname PARAMS ((cpp_reader *));
static tree pending_redefine_extname;
/* #pragma redefined_extname oldname newname */
static void
handle_pragma_redefine_extname (dummy)
@ -404,11 +388,11 @@ handle_pragma_redefine_extname (dummy)
}
#endif
static GTY(()) tree pragma_extern_prefix;
#ifdef HANDLE_PRAGMA_EXTERN_PREFIX
static void handle_pragma_extern_prefix PARAMS ((cpp_reader *));
static tree pragma_extern_prefix;
/* #pragma extern_prefix "prefix" */
static void
handle_pragma_extern_prefix (dummy)
@ -500,25 +484,19 @@ init_pragma ()
#endif
#ifdef HANDLE_PRAGMA_WEAK
cpp_register_pragma (parse_in, 0, "weak", handle_pragma_weak);
ggc_add_tree_root (&pending_weaks, 1);
#endif
#ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME
cpp_register_pragma (parse_in, 0, "redefine_extname",
handle_pragma_redefine_extname);
ggc_add_tree_root (&pending_redefine_extname, 1);
#endif
#ifdef HANDLE_PRAGMA_EXTERN_PREFIX
cpp_register_pragma (parse_in, 0, "extern_prefix",
handle_pragma_extern_prefix);
ggc_add_tree_root (&pragma_extern_prefix, 1);
#endif
#ifdef REGISTER_TARGET_PRAGMAS
REGISTER_TARGET_PRAGMAS (parse_in);
#endif
#ifdef HANDLE_PRAGMA_PACK_PUSH_POP
ggc_add_root (&alignment_stack, 1, sizeof(alignment_stack),
mark_align_stack);
#endif
}
#include "gt-c-pragma.h"

View file

@ -34,16 +34,31 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
lang_identifier nodes, because some keywords are only special in a
particular context. */
struct lang_identifier
struct lang_identifier GTY(())
{
struct c_common_identifier ignore;
tree global_value, local_value, label_value, implicit_decl;
tree error_locus, limbo_value;
struct c_common_identifier common_id;
tree global_value;
tree local_value;
tree label_value;
tree implicit_decl;
tree error_locus;
tree limbo_value;
};
/* The resulting tree type. */
union lang_tree_node
GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE")))
{
union tree_node GTY ((tag ("0"),
desc ("tree_node_structure (&%h)")))
generic;
struct lang_identifier GTY ((tag ("1"))) identifier;
};
/* Language-specific declaration information. */
struct lang_decl
struct lang_decl GTY(())
{
struct c_lang_decl base;
/* The return types and parameter types may have variable size.
@ -107,10 +122,10 @@ struct lang_decl
(DECL_LANG_SPECIFIC (NODE)->base.declared_inline)
/* In a RECORD_TYPE, a sorted array of the fields of the type. */
struct lang_type
struct lang_type GTY(())
{
int len;
tree elts[1];
tree GTY((length ("%h.len"))) elts[1];
};
/* Record whether a type or decl was written with nonconstant size.
@ -178,7 +193,6 @@ extern void c_insert_default_attributes PARAMS ((tree));
extern void c_init_decl_processing PARAMS ((void));
extern void c_dup_lang_specific_decl PARAMS ((tree));
extern void c_print_identifier PARAMS ((FILE *, tree, int));
extern void c_mark_tree PARAMS ((tree));
extern tree build_array_declarator PARAMS ((tree, tree, int, int));
extern tree build_enumerator PARAMS ((tree, tree));
extern int c_decode_option PARAMS ((int, char **));
@ -205,7 +219,6 @@ extern tree lookup_name PARAMS ((tree));
extern tree lookup_name_current_level PARAMS ((tree));
extern void parmlist_tags_warning PARAMS ((void));
extern void pending_xref_error PARAMS ((void));
extern void c_mark_function_context PARAMS ((struct function *));
extern void c_push_function_context PARAMS ((struct function *));
extern void c_pop_function_context PARAMS ((struct function *));
extern void pop_label_level PARAMS ((void));
@ -384,7 +397,7 @@ extern int mesg_implicit_function_declaration;
/* In c-decl.c */
extern void c_finish_incomplete_decl PARAMS ((tree));
extern tree static_ctors;
extern tree static_dtors;
extern GTY(()) tree static_ctors;
extern GTY(()) tree static_dtors;
#endif /* ! GCC_C_TREE_H */

View file

@ -188,12 +188,8 @@ static void alpha_elf_select_rtx_section
PARAMS ((enum machine_mode, rtx, unsigned HOST_WIDE_INT));
#endif
static void alpha_init_machine_status
PARAMS ((struct function *p));
static void alpha_mark_machine_status
PARAMS ((struct function *p));
static void alpha_free_machine_status
PARAMS ((struct function *p));
static struct machine_function * alpha_init_machine_status
PARAMS ((void));
static void unicosmk_output_deferred_case_vectors PARAMS ((FILE *));
static void unicosmk_gen_dsib PARAMS ((unsigned long *imaskP));
@ -562,8 +558,6 @@ override_options ()
/* Set up function hooks. */
init_machine_status = alpha_init_machine_status;
mark_machine_status = alpha_mark_machine_status;
free_machine_status = alpha_free_machine_status;
}
/* Returns 1 if VALUE is a mask that contains full bytes of zero or ones. */
@ -5311,9 +5305,9 @@ alpha_multipass_dfa_lookahead ()
/* Machine-specific function data. */
struct machine_function
struct machine_function GTY(())
{
#if TARGET_ABI_UNICOSMK
/* For unicosmk. */
/* List of call information words for calls from this function. */
struct rtx_def *first_ciw;
struct rtx_def *last_ciw;
@ -5321,58 +5315,18 @@ struct machine_function
/* List of deferred case vectors. */
struct rtx_def *addr_list;
#else
#if TARGET_ABI_OSF
/* For OSF. */
const char *some_ld_name;
#else
/* Non-empty struct. */
char dummy;
#endif
#endif
};
/* Register global variables and machine-specific functions with the
garbage collector. */
/* How to allocate a 'struct machine_function'. */
static void
alpha_init_machine_status (p)
struct function *p;
static struct machine_function *
alpha_init_machine_status ()
{
p->machine =
(struct machine_function *) xcalloc (1, sizeof (struct machine_function));
#if TARGET_ABI_UNICOSMK
p->machine->first_ciw = NULL_RTX;
p->machine->last_ciw = NULL_RTX;
p->machine->ciw_count = 0;
p->machine->addr_list = NULL_RTX;
#endif
#if TARGET_ABI_OSF
p->machine->some_ld_name = NULL;
#endif
}
static void
alpha_mark_machine_status (p)
struct function *p;
{
struct machine_function *machine = p->machine;
if (machine)
{
#if TARGET_ABI_UNICOSMK
ggc_mark_rtx (machine->first_ciw);
ggc_mark_rtx (machine->addr_list);
#endif
}
}
static void
alpha_free_machine_status (p)
struct function *p;
{
free (p->machine);
p->machine = NULL;
return ((struct machine_function *)
ggc_alloc_cleared (sizeof (struct machine_function)));
}
/* Functions to save and restore alpha_return_addr_rtx. */
@ -9913,3 +9867,6 @@ unicosmk_need_dex (x)
}
#endif /* TARGET_ABI_UNICOSMK */
#include "gt-alpha.h"

View file

@ -82,9 +82,7 @@ static Ccstar output_multi_immediate PARAMS ((rtx *, Ccstar, Ccstar, int, Hi
static void print_multi_reg PARAMS ((FILE *, Ccstar, int, int));
static Mmode select_dominance_cc_mode PARAMS ((rtx, rtx, Hint));
static Ccstar shift_op PARAMS ((rtx, Hint *));
static void arm_init_machine_status PARAMS ((struct function *));
static void arm_mark_machine_status PARAMS ((struct function *));
static void arm_free_machine_status PARAMS ((struct function *));
static struct machine_function * arm_init_machine_status PARAMS ((void));
static int number_of_first_bit_set PARAMS ((int));
static void replace_symbols_in_block PARAMS ((tree, rtx, rtx));
static void thumb_exit PARAMS ((FILE *, int, rtx));
@ -772,10 +770,6 @@ arm_override_options ()
static void
arm_add_gc_roots ()
{
ggc_add_rtx_root (&arm_compare_op0, 1);
ggc_add_rtx_root (&arm_compare_op1, 1);
ggc_add_rtx_root (&arm_target_insn, 1); /* Not sure this is really a root. */
gcc_obstack_init(&minipool_obstack);
minipool_startobj = (char *) obstack_alloc (&minipool_obstack, 0);
}
@ -10091,37 +10085,16 @@ thumb_unexpanded_epilogue ()
/* Functions to save and restore machine-specific function data. */
static void
arm_mark_machine_status (p)
struct function * p;
static struct machine_function *
arm_init_machine_status ()
{
machine_function *machine = p->machine;
struct machine_function *machine;
machine = (machine_function *) ggc_alloc_cleared (sizeof (machine_function));
if (machine)
ggc_mark_rtx (machine->eh_epilogue_sp_ofs);
}
static void
arm_init_machine_status (p)
struct function * p;
{
p->machine =
(machine_function *) xcalloc (1, sizeof (machine_function));
#if ARM_FT_UNKNOWWN != 0
((machine_function *) p->machine)->func_type = ARM_FT_UNKNOWN;
#if ARM_FT_UNKNOWN != 0
machine->func_type = ARM_FT_UNKNOWN;
#endif
}
static void
arm_free_machine_status (p)
struct function * p;
{
if (p->machine)
{
free (p->machine);
p->machine = NULL;
}
return machine;
}
/* Return an RTX indicating where the return address to the
@ -10152,8 +10125,6 @@ arm_init_expanders ()
{
/* Arrange to initialize and mark the machine per-function status. */
init_machine_status = arm_init_machine_status;
mark_machine_status = arm_mark_machine_status;
free_machine_status = arm_free_machine_status;
}
/* Generate the rest of a function's prologue. */
@ -10851,10 +10822,11 @@ arm_strip_name_encoding (const char * name)
return name;
}
rtx aof_pic_label;
#ifdef AOF_ASSEMBLER
/* Special functions only needed when producing AOF syntax assembler. */
rtx aof_pic_label = NULL_RTX;
struct pic_chain
{
struct pic_chain * next;
@ -10872,10 +10844,6 @@ aof_pic_entry (x)
if (aof_pic_label == NULL_RTX)
{
/* We mark this here and not in arm_add_gc_roots() to avoid
polluting even more code with ifdefs, and because it never
contains anything useful until we assign to it here. */
ggc_add_rtx_root (&aof_pic_label, 1);
aof_pic_label = gen_rtx_SYMBOL_REF (Pmode, "x$adcons");
}

View file

@ -107,21 +107,22 @@ extern arm_cc arm_current_cc;
extern int arm_target_label;
extern int arm_ccfsm_state;
extern struct rtx_def * arm_target_insn;
extern GTY(()) rtx arm_target_insn;
/* Run-time compilation parameters selecting different hardware subsets. */
extern int target_flags;
/* The floating point instruction architecture, can be 2 or 3 */
extern const char * target_fp_name;
/* Define the information needed to generate branch insns. This is
stored from the compare operation. Note that we can't use "rtx" here
since it hasn't been defined! */
extern struct rtx_def * arm_compare_op0;
extern struct rtx_def * arm_compare_op1;
stored from the compare operation. */
extern GTY(()) rtx arm_compare_op0;
extern GTY(()) rtx arm_compare_op1;
/* The label of the current constant pool. */
extern struct rtx_def * pool_vector_label;
extern rtx pool_vector_label;
/* Set to 1 when a return insn is output, this means that the epilogue
is not needed. */
extern int return_used_this_function;
/* Used to produce AOF syntax assembler. */
extern GTY(()) rtx aof_pic_label;
/* Just in case configure has failed to define anything. */
#ifndef TARGET_CPU_DEFAULT
@ -1412,10 +1413,10 @@ enum reg_class
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */
typedef struct machine_function
typedef struct machine_function GTY(())
{
/* Additionsl stack adjustment in __builtin_eh_throw. */
struct rtx_def *eh_epilogue_sp_ofs;
rtx eh_epilogue_sp_ofs;
/* Records if LR has to be saved for far jumps. */
int far_jump_used;
/* Records if ARG_POINTER was ever live. */

View file

@ -272,19 +272,19 @@ extern int valid_parallel_operands_5 PARAMS ((rtx *, enum machine_mode));
extern int valid_parallel_operands_6 PARAMS ((rtx *, enum machine_mode));
extern rtx smulhi3_libfunc;
extern rtx umulhi3_libfunc;
extern rtx fix_truncqfhi2_libfunc;
extern rtx fixuns_truncqfhi2_libfunc;
extern rtx fix_trunchfhi2_libfunc;
extern rtx fixuns_trunchfhi2_libfunc;
extern rtx floathiqf2_libfunc;
extern rtx floatunshiqf2_libfunc;
extern rtx floathihf2_libfunc;
extern rtx floatunshihf2_libfunc;
extern GTY(()) rtx smulhi3_libfunc;
extern GTY(()) rtx umulhi3_libfunc;
extern GTY(()) rtx fix_truncqfhi2_libfunc;
extern GTY(()) rtx fixuns_truncqfhi2_libfunc;
extern GTY(()) rtx fix_trunchfhi2_libfunc;
extern GTY(()) rtx fixuns_trunchfhi2_libfunc;
extern GTY(()) rtx floathiqf2_libfunc;
extern GTY(()) rtx floatunshiqf2_libfunc;
extern GTY(()) rtx floathihf2_libfunc;
extern GTY(()) rtx floatunshihf2_libfunc;
extern struct rtx_def *c4x_compare_op0; /* Operand 0 for comparisons. */
extern struct rtx_def *c4x_compare_op1; /* Operand 1 for comparisons. */
extern GTY(()) rtx c4x_compare_op0; /* Operand 0 for comparisons. */
extern GTY(()) rtx c4x_compare_op1; /* Operand 1 for comparisons. */
#endif /* RTX_CODE */
@ -303,7 +303,12 @@ extern void c4x_pr_FUNC_NEVER_RETURNS PARAMS ((cpp_reader *));
extern void c4x_pr_INTERRUPT PARAMS ((cpp_reader *));
extern void c4x_pr_ignored PARAMS ((cpp_reader *));
extern void c4x_init_pragma PARAMS ((int (*) (tree *)));
extern tree code_tree, data_tree, pure_tree, noreturn_tree, interrupt_tree;
#endif
extern GTY(()) tree code_tree;
extern GTY(()) tree data_tree;
extern GTY(()) tree pure_tree;
extern GTY(()) tree noreturn_tree;
extern GTY(()) tree interrupt_tree;
#endif /* ! GCC_C4X_PROTOS_H */

View file

@ -148,8 +148,8 @@ enum machine_mode c4x_caller_save_map[FIRST_PSEUDO_REGISTER] =
/* Test and compare insns in c4x.md store the information needed to
generate branch and scc insns here. */
struct rtx_def *c4x_compare_op0 = NULL_RTX;
struct rtx_def *c4x_compare_op1 = NULL_RTX;
rtx c4x_compare_op0;
rtx c4x_compare_op1;
const char *c4x_rpts_cycles_string;
int c4x_rpts_cycles = 0; /* Max. cycles for RPTS. */
@ -165,7 +165,6 @@ tree noreturn_tree = NULL_TREE;
tree interrupt_tree = NULL_TREE;
/* Forward declarations */
static void c4x_add_gc_roots PARAMS ((void));
static int c4x_isr_reg_used_p PARAMS ((unsigned int));
static int c4x_leaf_function_p PARAMS ((void));
static int c4x_assembler_function_p PARAMS ((void));
@ -223,32 +222,6 @@ static void c4x_encode_section_info PARAMS ((tree, int));
struct gcc_target targetm = TARGET_INITIALIZER;
/* Called to register all of our global variables with the garbage
collector. */
static void
c4x_add_gc_roots ()
{
ggc_add_rtx_root (&c4x_compare_op0, 1);
ggc_add_rtx_root (&c4x_compare_op1, 1);
ggc_add_tree_root (&code_tree, 1);
ggc_add_tree_root (&data_tree, 1);
ggc_add_tree_root (&pure_tree, 1);
ggc_add_tree_root (&noreturn_tree, 1);
ggc_add_tree_root (&interrupt_tree, 1);
ggc_add_rtx_root (&smulhi3_libfunc, 1);
ggc_add_rtx_root (&umulhi3_libfunc, 1);
ggc_add_rtx_root (&fix_truncqfhi2_libfunc, 1);
ggc_add_rtx_root (&fixuns_truncqfhi2_libfunc, 1);
ggc_add_rtx_root (&fix_trunchfhi2_libfunc, 1);
ggc_add_rtx_root (&fixuns_trunchfhi2_libfunc, 1);
ggc_add_rtx_root (&floathiqf2_libfunc, 1);
ggc_add_rtx_root (&floatunshiqf2_libfunc, 1);
ggc_add_rtx_root (&floathihf2_libfunc, 1);
ggc_add_rtx_root (&floatunshihf2_libfunc, 1);
}
/* Override command line options.
Called once after all options have been parsed.
Mostly we process the processor
@ -317,9 +290,6 @@ c4x_override_options ()
This provides compatibility with the old -mno-aliases option. */
if (! TARGET_ALIASES && ! flag_argument_noalias)
flag_argument_noalias = 1;
/* Register global variables with the garbage collector. */
c4x_add_gc_roots ();
}
@ -5087,3 +5057,4 @@ c4x_asm_named_section (name, flags)
{
fprintf (asm_out_file, "\t.sect\t\"%s\"\n", name);
}

View file

@ -63,7 +63,7 @@ Boston, MA 02111-1307, USA. */
} while (0)
/* Per-function machine data. */
struct machine_function
struct machine_function GTY(())
{
int needs_return_address_on_stack;
};
@ -85,7 +85,7 @@ static void cris_print_base PARAMS ((rtx, FILE *));
static void cris_print_index PARAMS ((rtx, FILE *));
static void cris_init_machine_status PARAMS ((struct function *));
static struct machine_function * cris_init_machine_status PARAMS ((void));
static int cris_initial_frame_pointer_offset PARAMS ((void));
@ -2697,11 +2697,10 @@ cris_init_expanders ()
/* Zero initialization is OK for all current fields. */
static void
cris_init_machine_status (p)
struct function *p;
static struct machine_function *
cris_init_machine_status ()
{
p->machine = xcalloc (1, sizeof (struct machine_function));
return ggc_alloc_cleared (sizeof (struct machine_function));
}
/* Split a 2 word move (DI or presumably DF) into component parts.
@ -3129,6 +3128,8 @@ Prev_insn (insn)
}
#endif
#include "gt-cris.h"
/*
* Local variables:
* eval: (c-set-style "gnu")

View file

@ -39,3 +39,6 @@ $(LIB2FUNCS_EXTRA): $(CRIS_LIB1CSRC)
echo "#define L$$name" > tmp-$@ \
&& echo '#include "$<"' >> tmp-$@ \
&& mv -f tmp-$@ $@
$(out_object_file): gt-cris.h
gt-cris.h : s-gtype ; @true

View file

@ -140,8 +140,8 @@ extern void debug_stack_info PARAMS ((d30v_stack_t *));
/* Define the information needed to generate branch and scc insns. This is
stored from the compare operation. */
extern struct rtx_def *d30v_compare_op0;
extern struct rtx_def *d30v_compare_op1;
extern GTY(()) rtx d30v_compare_op0;
extern GTY(()) rtx d30v_compare_op1;
/* Define the information needed to modify the epilogue for EH. */

View file

@ -47,10 +47,7 @@
static void d30v_print_operand_memory_reference PARAMS ((FILE *, rtx));
static void d30v_build_long_insn PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT,
rtx, rtx));
static void d30v_add_gc_roots PARAMS ((void));
static void d30v_init_machine_status PARAMS ((struct function *));
static void d30v_mark_machine_status PARAMS ((struct function *));
static void d30v_free_machine_status PARAMS ((struct function *));
static struct machine_function * d30v_init_machine_status PARAMS ((void));
static void d30v_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
static void d30v_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
static int d30v_adjust_cost PARAMS ((rtx, rtx, rtx, int));
@ -298,8 +295,6 @@ override_options ()
reg_class_from_letter['x'] = F0_REGS;
reg_class_from_letter['y'] = F1_REGS;
reg_class_from_letter['z'] = OTHER_FLAG_REGS;
d30v_add_gc_roots ();
}
@ -3482,35 +3477,10 @@ d30v_issue_rate ()
/* Routine to allocate, mark and free a per-function,
machine specific structure. */
static void
d30v_init_machine_status (p)
struct function *p;
static struct machine_function *
d30v_init_machine_status ()
{
p->machine =
(machine_function *) xcalloc (1, sizeof (machine_function));
}
static void
d30v_mark_machine_status (p)
struct function * p;
{
if (p->machine == NULL)
return;
ggc_mark_rtx (p->machine->eh_epilogue_sp_ofs);
}
static void
d30v_free_machine_status (p)
struct function *p;
{
struct machine_function *machine = p->machine;
if (machine == NULL)
return;
free (machine);
p->machine = NULL;
return ggc_alloc_cleared (sizeof (machine_function));
}
/* Do anything needed before RTL is emitted for each function. */
@ -3520,8 +3490,6 @@ d30v_init_expanders ()
{
/* Arrange to save and restore machine status around nested functions. */
init_machine_status = d30v_init_machine_status;
mark_machine_status = d30v_mark_machine_status;
free_machine_status = d30v_free_machine_status;
}
/* Find the current function's return address.
@ -3536,13 +3504,3 @@ d30v_return_addr ()
{
return get_hard_reg_initial_val (Pmode, GPR_LINK);
}
/* Called to register all of our global variables with the garbage
collector. */
static void
d30v_add_gc_roots ()
{
ggc_add_rtx_root (&d30v_compare_op0, 1);
ggc_add_rtx_root (&d30v_compare_op1, 1);
}

View file

@ -1929,10 +1929,10 @@ typedef int CUMULATIVE_ARGS;
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */
typedef struct machine_function
typedef struct machine_function GTY(())
{
/* Additionsl stack adjustment in __builtin_eh_throw. */
struct rtx_def * eh_epilogue_sp_ofs;
rtx eh_epilogue_sp_ofs;
} machine_function;

View file

@ -26,8 +26,6 @@ extern char *machopic_function_base_name PARAMS ((void));
extern char *machopic_non_lazy_ptr_name PARAMS ((const char*));
extern char *machopic_stub_name PARAMS ((const char*));
extern void machopic_add_gc_roots PARAMS ((void));
extern void machopic_picsymbol_stub_section PARAMS ((void));
extern void machopic_symbol_stub_section PARAMS ((void));
extern void machopic_lazy_symbol_ptr_section PARAMS ((void));

View file

@ -67,7 +67,7 @@ name_needs_quotes (name)
/* This module assumes that (const (symbol_ref "foo")) is a legal pic
reference, which will not be changed. */
static tree machopic_defined_list;
static GTY(()) tree machopic_defined_list;
enum machopic_addr_class
machopic_classify_ident (ident)
@ -257,7 +257,7 @@ machopic_function_base_name ()
return function_base;
}
static tree machopic_non_lazy_pointers = NULL;
static GTY(()) tree machopic_non_lazy_pointers;
/* Return a non-lazy pointer name corresponding to the given name,
either by finding it in our list of pointer names, or by generating
@ -321,17 +321,7 @@ machopic_non_lazy_ptr_name (name)
}
}
static tree machopic_stubs = 0;
/* Make sure the GC knows about our homemade lists. */
void
machopic_add_gc_roots ()
{
ggc_add_tree_root (&machopic_defined_list, 1);
ggc_add_tree_root (&machopic_non_lazy_pointers, 1);
ggc_add_tree_root (&machopic_stubs, 1);
}
static GTY(()) tree machopic_stubs;
/* Return the name of the stub corresponding to the given name,
generating a new stub name if necessary. */
@ -1297,3 +1287,6 @@ machopic_asm_out_destructor (symbol, priority)
if (!flag_pic)
fprintf (asm_out_file, ".reference .destructors_used\n");
}
#include "gt-darwin.h"

View file

@ -1725,29 +1725,6 @@ override_options ()
rsect_const = tmp = (char *) xmalloc (strlen(".rsect ") +
strlen(const_seg_name) + 3);
sprintf (tmp, ".rsect \"%s\"", const_seg_name);
/* Mark our global variables for GC. */
ggc_add_rtx_root (&dsp16xx_addhf3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_subhf3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_mulhf3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_divhf3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_cmphf3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_fixhfhi2_libcall, 1);
ggc_add_rtx_root (&dsp16xx_floathihf2_libcall, 1);
ggc_add_rtx_root (&dsp16xx_neghf2_libcall, 1);
ggc_add_rtx_root (&dsp16xx_mulhi3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_udivqi3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_udivhi3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_divqi3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_divhi3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_modqi3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_modhi3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_umodqi3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_umodhi3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_ashrhi3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_ashlhi3_libcall, 1);
ggc_add_rtx_root (&dsp16xx_ucmphi2_libcall, 1);
ggc_add_rtx_root (&dsp16xx_lshrhi3_libcall, 1);
}
int

View file

@ -31,29 +31,30 @@ extern const char *const_seg_name;
extern const char *rsect_const;
extern const char *chip_name;
extern const char *save_chip_name;
extern struct rtx_def *dsp16xx_compare_op0, *dsp16xx_compare_op1;
extern struct rtx_def *dsp16xx_addhf3_libcall;
extern struct rtx_def *dsp16xx_subhf3_libcall;
extern struct rtx_def *dsp16xx_mulhf3_libcall;
extern struct rtx_def *dsp16xx_divhf3_libcall;
extern struct rtx_def *dsp16xx_cmphf3_libcall;
extern struct rtx_def *dsp16xx_fixhfhi2_libcall;
extern struct rtx_def *dsp16xx_floathihf2_libcall;
extern struct rtx_def *dsp16xx_neghf2_libcall;
extern struct rtx_def *dsp16xx_umulhi3_libcall;
extern struct rtx_def *dsp16xx_mulhi3_libcall;
extern struct rtx_def *dsp16xx_udivqi3_libcall;
extern struct rtx_def *dsp16xx_udivhi3_libcall;
extern struct rtx_def *dsp16xx_divqi3_libcall;
extern struct rtx_def *dsp16xx_divhi3_libcall;
extern struct rtx_def *dsp16xx_modqi3_libcall;
extern struct rtx_def *dsp16xx_modhi3_libcall;
extern struct rtx_def *dsp16xx_umodqi3_libcall;
extern struct rtx_def *dsp16xx_umodhi3_libcall;
extern GTY(()) rtx dsp16xx_compare_op0;
extern GTY(()) rtx dsp16xx_compare_op1;
extern GTY(()) rtx dsp16xx_addhf3_libcall;
extern GTY(()) rtx dsp16xx_subhf3_libcall;
extern GTY(()) rtx dsp16xx_mulhf3_libcall;
extern GTY(()) rtx dsp16xx_divhf3_libcall;
extern GTY(()) rtx dsp16xx_cmphf3_libcall;
extern GTY(()) rtx dsp16xx_fixhfhi2_libcall;
extern GTY(()) rtx dsp16xx_floathihf2_libcall;
extern GTY(()) rtx dsp16xx_neghf2_libcall;
extern GTY(()) rtx dsp16xx_umulhi3_libcall;
extern GTY(()) rtx dsp16xx_mulhi3_libcall;
extern GTY(()) rtx dsp16xx_udivqi3_libcall;
extern GTY(()) rtx dsp16xx_udivhi3_libcall;
extern GTY(()) rtx dsp16xx_divqi3_libcall;
extern GTY(()) rtx dsp16xx_divhi3_libcall;
extern GTY(()) rtx dsp16xx_modqi3_libcall;
extern GTY(()) rtx dsp16xx_modhi3_libcall;
extern GTY(()) rtx dsp16xx_umodqi3_libcall;
extern GTY(()) rtx dsp16xx_umodhi3_libcall;
extern struct rtx_def *dsp16xx_ashrhi3_libcall;
extern struct rtx_def *dsp16xx_ashlhi3_libcall;
extern struct rtx_def *dsp16xx_lshrhi3_libcall;
extern GTY(()) rtx dsp16xx_ashrhi3_libcall;
extern GTY(()) rtx dsp16xx_ashlhi3_libcall;
extern GTY(()) rtx dsp16xx_lshrhi3_libcall;
/* RUN-TIME TARGET SPECIFICATION */
#define DSP16XX 1

View file

@ -553,7 +553,7 @@ static char const tls_model_chars[] = " GLil";
#define X86_64_VARARGS_SIZE (REGPARM_MAX * UNITS_PER_WORD + SSE_REGPARM_MAX * 16)
/* Define the structure for the machine field in struct function. */
struct machine_function
struct machine_function GTY(())
{
rtx stack_locals[(int) MAX_MACHINE_MODE][MAX_386_STACK_LOCALS];
const char *some_ld_name;
@ -680,9 +680,7 @@ static int ix86_agi_dependant PARAMS ((rtx, rtx, enum attr_type));
static enum attr_ppro_uops ix86_safe_ppro_uops PARAMS ((rtx));
static void ix86_dump_ppro_packet PARAMS ((FILE *));
static void ix86_reorder_insn PARAMS ((rtx *, rtx *));
static void ix86_init_machine_status PARAMS ((struct function *));
static void ix86_mark_machine_status PARAMS ((struct function *));
static void ix86_free_machine_status PARAMS ((struct function *));
static struct machine_function * ix86_init_machine_status PARAMS ((void));
static int ix86_split_to_parts PARAMS ((rtx, rtx *, enum machine_mode));
static int ix86_nsaved_regs PARAMS ((void));
static void ix86_emit_save_regs PARAMS ((void));
@ -1042,9 +1040,7 @@ override_options ()
/* Arrange to set up i386_stack_locals for all functions. */
init_machine_status = ix86_init_machine_status;
mark_machine_status = ix86_mark_machine_status;
free_machine_status = ix86_free_machine_status;
/* Validate -mregparm= value. */
if (ix86_regparm_string)
{
@ -10636,38 +10632,10 @@ ix86_expand_call (retval, fnaddr, callarg1, callarg2, pop)
This is called from INIT_EXPANDERS once before RTL is emitted for each
function. */
static void
ix86_init_machine_status (p)
struct function *p;
static struct machine_function *
ix86_init_machine_status ()
{
p->machine = (struct machine_function *)
xcalloc (1, sizeof (struct machine_function));
}
/* Mark machine specific bits of P for GC. */
static void
ix86_mark_machine_status (p)
struct function *p;
{
struct machine_function *machine = p->machine;
enum machine_mode mode;
int n;
if (! machine)
return;
for (mode = VOIDmode; (int) mode < (int) MAX_MACHINE_MODE;
mode = (enum machine_mode) ((int) mode + 1))
for (n = 0; n < MAX_386_STACK_LOCALS; n++)
ggc_mark_rtx (machine->stack_locals[(int) mode][n]);
}
static void
ix86_free_machine_status (p)
struct function *p;
{
free (p->machine);
p->machine = NULL;
return ggc_alloc_cleared (sizeof (struct machine_function));
}
/* Return a MEM corresponding to a stack slot with mode MODE.
@ -10693,20 +10661,19 @@ assign_386_stack_local (mode, n)
/* Construct the SYMBOL_REF for the tls_get_addr function. */
static GTY(()) rtx ix86_tls_symbol;
rtx
ix86_tls_get_addr ()
{
static rtx symbol;
if (!symbol)
if (!ix86_tls_symbol)
{
symbol = gen_rtx_SYMBOL_REF (Pmode, (TARGET_GNU_TLS
ix86_tls_symbol = gen_rtx_SYMBOL_REF (Pmode, (TARGET_GNU_TLS
? "___tls_get_addr"
: "__tls_get_addr"));
ggc_add_rtx_root (&symbol, 1);
}
return symbol;
return ix86_tls_symbol;
}
/* Calculate the length of the memory address in the instruction
@ -13948,3 +13915,5 @@ x86_output_mi_thunk (file, delta, function)
}
}
}
#include "gt-i386.h"

View file

@ -21,7 +21,8 @@ Boston, MA 02111-1307, USA. */
/* Variables defined in ia64.c. */
#ifdef RTX_CODE
extern rtx ia64_compare_op0, ia64_compare_op1;
extern GTY(()) rtx ia64_compare_op0;
extern GTY(()) rtx ia64_compare_op1;
#endif
/* Functions defined in ia64.c */

View file

@ -127,10 +127,7 @@ static rtx gen_fr_restore_x PARAMS ((rtx, rtx, rtx));
static enum machine_mode hfa_element_mode PARAMS ((tree, int));
static void fix_range PARAMS ((const char *));
static void ia64_add_gc_roots PARAMS ((void));
static void ia64_init_machine_status PARAMS ((struct function *));
static void ia64_mark_machine_status PARAMS ((struct function *));
static void ia64_free_machine_status PARAMS ((struct function *));
static struct machine_function * ia64_init_machine_status PARAMS ((void));
static void emit_insn_group_barriers PARAMS ((FILE *, rtx));
static void emit_all_insn_group_barriers PARAMS ((FILE *, rtx));
static void emit_predicate_relation_info PARAMS ((void));
@ -1044,27 +1041,25 @@ ia64_expand_load_address (dest, src, scratch)
emit_move_insn (dest, temp);
}
static GTY(()) rtx gen_tls_tga;
static rtx
gen_tls_get_addr ()
{
static rtx tga;
if (!tga)
if (!gen_tls_tga)
{
tga = init_one_libfunc ("__tls_get_addr");
ggc_add_rtx_root (&tga, 1);
}
return tga;
gen_tls_tga = init_one_libfunc ("__tls_get_addr");
}
return gen_tls_tga;
}
static GTY(()) rtx thread_pointer_rtx;
static rtx
gen_thread_pointer ()
{
static rtx tp;
if (!tp)
if (!thread_pointer_rtx)
{
tp = gen_rtx_REG (Pmode, 13);
RTX_UNCHANGING_P (tp);
ggc_add_rtx_root (&tp, 1);
thread_pointer_rtx = gen_rtx_REG (Pmode, 13);
RTX_UNCHANGING_P (thread_pointer_rtx);
}
return tp;
}
@ -4146,44 +4141,10 @@ fix_range (const_str)
}
}
/* Called to register all of our global variables with the garbage
collector. */
static void
ia64_add_gc_roots ()
static struct machine_function *
ia64_init_machine_status ()
{
ggc_add_rtx_root (&ia64_compare_op0, 1);
ggc_add_rtx_root (&ia64_compare_op1, 1);
}
static void
ia64_init_machine_status (p)
struct function *p;
{
p->machine =
(struct machine_function *) xcalloc (1, sizeof (struct machine_function));
}
static void
ia64_mark_machine_status (p)
struct function *p;
{
struct machine_function *machine = p->machine;
if (machine)
{
ggc_mark_rtx (machine->ia64_eh_epilogue_sp);
ggc_mark_rtx (machine->ia64_eh_epilogue_bsp);
ggc_mark_rtx (machine->ia64_gp_save);
}
}
static void
ia64_free_machine_status (p)
struct function *p;
{
free (p->machine);
p->machine = NULL;
return ggc_alloc_cleared (sizeof (struct machine_function));
}
/* Handle TARGET_OPTIONS switches. */
@ -4219,10 +4180,6 @@ ia64_override_options ()
ia64_section_threshold = g_switch_set ? g_switch_value : IA64_DEFAULT_GVALUE;
init_machine_status = ia64_init_machine_status;
mark_machine_status = ia64_mark_machine_status;
free_machine_status = ia64_free_machine_status;
ia64_add_gc_roots ();
}
static enum attr_itanium_requires_unit0 ia64_safe_itanium_requires_unit0 PARAMS((rtx));
@ -8161,3 +8118,5 @@ ia64_aix_select_rtx_section (mode, x, align)
ia64_select_rtx_section (mode, x, align);
flag_pic = save_pic;
}
#include "gt-ia64.h"

View file

@ -2440,16 +2440,16 @@ extern int ia64_final_schedule;
#define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 15 : INVALID_REGNUM)
/* This function contains machine specific function data. */
struct machine_function
struct machine_function GTY(())
{
/* The new stack pointer when unwinding from EH. */
struct rtx_def* ia64_eh_epilogue_sp;
rtx ia64_eh_epilogue_sp;
/* The new bsp value when unwinding from EH. */
struct rtx_def* ia64_eh_epilogue_bsp;
rtx ia64_eh_epilogue_bsp;
/* The GP value save register. */
struct rtx_def* ia64_gp_save;
rtx ia64_gp_save;
/* The number of varargs registers to save. */
int n_varargs;

View file

@ -43,10 +43,15 @@ extern void m68hc11_function_arg_advance PARAMS((CUMULATIVE_ARGS*,
#ifdef RTX_CODE
extern rtx m68hc11_compare_op0;
extern rtx m68hc11_compare_op1;
extern rtx m68hc11_soft_tmp_reg;
extern rtx iy_reg;
extern rtx ix_reg;
extern rtx d_reg;
extern GTY(()) rtx m68hc11_soft_tmp_reg;
extern GTY(()) rtx ix_reg;
extern GTY(()) rtx iy_reg;
extern GTY(()) rtx d_reg;
extern GTY(()) rtx da_reg;
extern GTY(()) rtx stack_push_word;
extern GTY(()) rtx stack_pop_word;
extern GTY(()) rtx z_reg;
extern GTY(()) rtx z_reg_qi;
extern void m68hc11_initialize_trampoline PARAMS((rtx, rtx, rtx));

View file

@ -72,7 +72,6 @@ static tree m68hc11_handle_fntype_attribute PARAMS ((tree *, tree, tree, int, bo
const struct attribute_spec m68hc11_attribute_table[];
void create_regs_rtx PARAMS ((void));
static void m68hc11_add_gc_roots PARAMS ((void));
static void asm_print_register PARAMS ((FILE *, int));
static void m68hc11_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
@ -94,7 +93,7 @@ rtx da_reg;
rtx stack_push_word;
rtx stack_pop_word;
static int regs_inited = 0;
static rtx z_reg;
rtx z_reg;
/* Set to 1 by expand_prologue() when the function is an interrupt handler. */
int current_function_interrupt;
@ -229,8 +228,6 @@ struct gcc_target targetm = TARGET_INITIALIZER;
int
m68hc11_override_options ()
{
m68hc11_add_gc_roots ();
memset (m68hc11_reg_valid_for_index, 0,
sizeof (m68hc11_reg_valid_for_index));
memset (m68hc11_reg_valid_for_base, 0, sizeof (m68hc11_reg_valid_for_base));
@ -4005,7 +4002,7 @@ struct replace_info
int z_loaded_with_sp;
};
static rtx z_reg_qi;
rtx z_reg_qi;
static int m68hc11_check_z_replacement PARAMS ((rtx, struct replace_info *));
static void m68hc11_find_z_replacement PARAMS ((rtx, struct replace_info *));
@ -5414,20 +5411,6 @@ m68hc11_asm_file_start (out, main_file)
}
static void
m68hc11_add_gc_roots ()
{
ggc_add_rtx_root (&m68hc11_soft_tmp_reg, 1);
ggc_add_rtx_root (&ix_reg, 1);
ggc_add_rtx_root (&iy_reg, 1);
ggc_add_rtx_root (&d_reg, 1);
ggc_add_rtx_root (&da_reg, 1);
ggc_add_rtx_root (&z_reg, 1);
ggc_add_rtx_root (&z_reg_qi, 1);
ggc_add_rtx_root (&stack_push_word, 1);
ggc_add_rtx_root (&stack_pop_word, 1);
}
static void
m68hc11_asm_out_constructor (symbol, priority)
rtx symbol;

View file

@ -49,8 +49,8 @@ extern rtx mcore_function_value PARAMS ((tree, tree));
#ifdef RTX_CODE
extern rtx arch_compare_op0;
extern rtx arch_compare_op1;
extern GTY(()) rtx arch_compare_op0;
extern GTY(()) rtx arch_compare_op1;
extern const char * mcore_output_bclri PARAMS ((rtx, int));
extern const char * mcore_output_bseti PARAMS ((rtx, int));

View file

@ -125,7 +125,6 @@ static cond_type is_cond_candidate PARAMS ((rtx));
static rtx emit_new_cond_insn PARAMS ((rtx, int));
static rtx conditionalize_block PARAMS ((rtx));
static void conditionalize_optimization PARAMS ((rtx));
static void mcore_add_gc_roots PARAMS ((void));
static rtx handle_structs_in_regs PARAMS ((enum machine_mode, tree, int));
static void mcore_mark_dllexport PARAMS ((tree));
static void mcore_mark_dllimport PARAMS ((tree));
@ -3069,15 +3068,6 @@ mcore_is_same_reg (x, y)
return 0;
}
/* Called to register all of our global variables with the garbage
collector. */
static void
mcore_add_gc_roots ()
{
ggc_add_rtx_root (&arch_compare_op0, 1);
ggc_add_rtx_root (&arch_compare_op1, 1);
}
void
mcore_override_options ()
{
@ -3096,8 +3086,6 @@ mcore_override_options ()
/* Only the m340 supports little endian code. */
if (TARGET_LITTLE_END && ! TARGET_M340)
target_flags |= M340_BIT;
mcore_add_gc_roots ();
}
int

View file

@ -124,7 +124,6 @@ static rtx mips_find_symbol PARAMS ((rtx));
static void abort_with_insn PARAMS ((rtx, const char *))
ATTRIBUTE_NORETURN;
static int symbolic_expression_p PARAMS ((rtx));
static void mips_add_gc_roots PARAMS ((void));
static bool mips_assemble_integer PARAMS ((rtx, unsigned int, int));
static void mips_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
static void mips_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
@ -143,9 +142,7 @@ static int iris6_section_align_1 PARAMS ((void **, void *));
static int mips_adjust_cost PARAMS ((rtx, rtx, rtx, int));
static int mips_issue_rate PARAMS ((void));
static void mips_init_machine_status PARAMS ((struct function *));
static void mips_free_machine_status PARAMS ((struct function *));
static void mips_mark_machine_status PARAMS ((struct function *));
static struct machine_function * mips_init_machine_status PARAMS ((void));
static void mips_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT))
ATTRIBUTE_UNUSED;
static void mips_unique_section PARAMS ((tree, int))
@ -154,7 +151,7 @@ static void mips_select_rtx_section PARAMS ((enum machine_mode, rtx,
unsigned HOST_WIDE_INT));
static void mips_encode_section_info PARAMS ((tree, int));
struct machine_function {
struct machine_function GTY(()) {
/* Pseudo-reg holding the address of the current function when
generating embedded PIC code. Created by LEGITIMIZE_ADDRESS,
used by mips_finalize_pic if it was created. */
@ -5435,44 +5432,16 @@ override_options ()
align_functions = 8;
}
/* Register global variables with the garbage collector. */
mips_add_gc_roots ();
/* Functions to allocate, mark and deallocate machine-dependent
function status. */
/* Function to allocate machine-dependent function status. */
init_machine_status = &mips_init_machine_status;
free_machine_status = &mips_free_machine_status;
mark_machine_status = &mips_mark_machine_status;
}
/* Allocate a chunk of memory for per-function machine-dependent data. */
static void
mips_init_machine_status (fn)
struct function *fn;
static struct machine_function *
mips_init_machine_status ()
{
fn->machine = ((struct machine_function *)
xcalloc (1, sizeof (struct machine_function)));
}
/* Release the chunk of memory for per-function machine-dependent data. */
static void
mips_free_machine_status (fn)
struct function *fn;
{
free (fn->machine);
fn->machine = NULL;
}
/* Mark per-function machine-dependent data. */
static void
mips_mark_machine_status (fn)
struct function *fn;
{
if (fn->machine)
{
ggc_mark_rtx (fn->machine->embedded_pic_fnaddr_rtx);
ggc_mark_rtx (fn->machine->mips16_gp_pseudo_rtx);
}
return ((struct machine_function *)
ggc_alloc_cleared (sizeof (struct machine_function)));
}
/* On the mips16, we want to allocate $24 (T_REG) before other
@ -10128,19 +10097,6 @@ mips_output_conditional_branch (insn,
return 0;
}
/* Called to register all of our global variables with the garbage
collector. */
static void
mips_add_gc_roots ()
{
ggc_add_rtx_root (&mips_load_reg, 1);
ggc_add_rtx_root (&mips_load_reg2, 1);
ggc_add_rtx_root (&mips_load_reg3, 1);
ggc_add_rtx_root (&mips_load_reg4, 1);
ggc_add_rtx_root (branch_cmp, ARRAY_SIZE (branch_cmp));
}
static enum processor_type
mips_parse_cpu (cpu_string)
const char *cpu_string;
@ -10547,3 +10503,5 @@ iris6_asm_file_end (stream)
mips_asm_file_end (stream);
}
#endif /* TARGET_IRIX6 */
#include "gt-mips.h"

View file

@ -137,7 +137,7 @@ extern int set_noat; /* # of nested .set noat's */
extern int set_volatile; /* # of nested .set volatile's */
extern int mips_branch_likely; /* emit 'l' after br (branch likely) */
extern int mips_dbx_regno[]; /* Map register # to debug register # */
extern struct rtx_def *branch_cmp[2]; /* operands for compare */
extern GTY(()) rtx branch_cmp[2]; /* operands for compare */
extern enum cmp_type branch_type; /* what type of branch to use */
extern enum processor_type mips_arch; /* which cpu to codegen for */
extern enum processor_type mips_tune; /* which cpu to schedule for */
@ -162,10 +162,10 @@ extern int dslots_jump_total; /* total # jump related delay slots */
extern int dslots_jump_filled; /* # filled jump delay slots */
extern int dslots_number_nops; /* # of nops needed by previous insn */
extern int num_refs[3]; /* # 1/2/3 word references */
extern struct rtx_def *mips_load_reg; /* register to check for load delay */
extern struct rtx_def *mips_load_reg2; /* 2nd reg to check for load delay */
extern struct rtx_def *mips_load_reg3; /* 3rd reg to check for load delay */
extern struct rtx_def *mips_load_reg4; /* 4th reg to check for load delay */
extern GTY(()) rtx mips_load_reg; /* register to check for load delay */
extern GTY(()) rtx mips_load_reg2; /* 2nd reg to check for load delay */
extern GTY(()) rtx mips_load_reg3; /* 3rd reg to check for load delay */
extern GTY(()) rtx mips_load_reg4; /* 4th reg to check for load delay */
extern int mips_string_length; /* length of strings for mips16 */
/* Functions to change what output section we are using. */
@ -2790,7 +2790,7 @@ typedef struct mips_args {
the shift patterns, and function_arg, which returns them when given
a VOIDmode argument. */
unsigned int num_adjusts;
struct rtx_def *adjust[MAX_ARGS_IN_REGISTERS];
rtx adjust[MAX_ARGS_IN_REGISTERS];
} CUMULATIVE_ARGS;
/* Initialize a variable CUM of type CUMULATIVE_ARGS

View file

@ -98,6 +98,7 @@ static void mmix_output_condition PARAMS ((FILE *, rtx, int));
static HOST_WIDEST_INT mmix_intval PARAMS ((rtx));
static void mmix_output_octa PARAMS ((FILE *, HOST_WIDEST_INT, int));
static bool mmix_assemble_integer PARAMS ((rtx, unsigned int, int));
static struct machine_function * mmix_init_machine_status PARAMS ((void));
static void mmix_init_machine_status PARAMS ((struct function *));
static void mmix_encode_section_info PARAMS ((tree, int));
static const char *mmix_strip_name_encoding PARAMS ((const char *));
@ -155,11 +156,6 @@ mmix_override_options ()
warning ("-f%s not supported: ignored", (flag_pic > 1) ? "PIC" : "pic");
flag_pic = 0;
}
/* All other targets add GC roots from their override_options function,
so play along. */
ggc_add_rtx_root (&mmix_compare_op0, 1);
ggc_add_rtx_root (&mmix_compare_op1, 1);
}
/* INIT_EXPANDERS. */
@ -172,11 +168,10 @@ mmix_init_expanders ()
/* Set the per-function data. */
static void
mmix_init_machine_status (f)
struct function *f;
static struct machine_function *
mmix_init_machine_status ()
{
f->machine = xcalloc (1, sizeof (struct machine_function));
return ggc_alloc_cleared (sizeof (struct machine_function));
}
/* DATA_ALIGNMENT.

View file

@ -82,13 +82,13 @@ Boston, MA 02111-1307, USA. */
/* Declarations for helper variables that are not tied to a particular
target macro. */
extern struct rtx_def *mmix_compare_op0;
extern struct rtx_def *mmix_compare_op1;
extern GTY(()) rtx mmix_compare_op0;
extern GTY(()) rtx mmix_compare_op1;
/* Per-function machine data. This is normally an opaque type just
defined and used in the tm.c file, but we need to see the definition in
mmix.md too. */
struct machine_function
struct machine_function GTY(())
{
int has_landing_pad;
int highest_saved_stack_register;

View file

@ -85,8 +85,6 @@ asm_file_start (file)
else
fprintf (file, "\n\n");
output_file_directive (file, main_input_filename);
ggc_add_rtx_root (&zero_dreg, 1);
ggc_add_rtx_root (&zero_areg, 1);
}
/* Print operand X using operand code CODE to assembly language output file

View file

@ -983,5 +983,5 @@ struct cum_arg { int nbytes; };
SYMBOL_REF, LABEL_REF, SUBREG, REG, MEM }}, \
{"nshift_operator", { ASHIFTRT, LSHIFTRT, ASHIFT }},
extern struct rtx_def *zero_dreg;
extern struct rtx_def *zero_areg;
extern GTY(()) rtx zero_dreg;
extern GTY(()) rtx zero_areg;

View file

@ -100,8 +100,6 @@ static void pa_combine_instructions PARAMS ((rtx));
static int pa_can_combine_p PARAMS ((rtx, rtx, rtx, int, rtx, rtx, rtx));
static int forward_branch_p PARAMS ((rtx));
static int shadd_constant_p PARAMS ((int));
static void pa_add_gc_roots PARAMS ((void));
static void mark_deferred_plabels PARAMS ((void *));
static void compute_zdepwi_operands PARAMS ((unsigned HOST_WIDE_INT, unsigned *));
static int compute_movstrsi_length PARAMS ((rtx));
static bool pa_assemble_integer PARAMS ((rtx, unsigned int, int));
@ -151,12 +149,14 @@ unsigned int total_code_bytes;
/* Variables to handle plabels that we discover are necessary at assembly
output time. They are output after the current function. */
struct deferred_plabel
struct deferred_plabel GTY(())
{
rtx internal_label;
char *name;
} *deferred_plabels = 0;
int n_deferred_plabels = 0;
};
static GTY((length ("n_deferred_plabels"))) struct deferred_plabel *
deferred_plabels;
static int n_deferred_plabels = 0;
/* Initialize the GCC target structure. */
@ -301,9 +301,6 @@ override_options ()
targetm.asm_out.unaligned_op.si = NULL;
targetm.asm_out.unaligned_op.di = NULL;
}
/* Register global variables with the garbage collector. */
pa_add_gc_roots ();
}
/* Return non-zero only if OP is a register of mode MODE,
@ -6277,10 +6274,10 @@ output_call (insn, call_dest, sibcall)
if (deferred_plabels == 0)
deferred_plabels = (struct deferred_plabel *)
xmalloc (1 * sizeof (struct deferred_plabel));
ggc_alloc (sizeof (struct deferred_plabel));
else
deferred_plabels = (struct deferred_plabel *)
xrealloc (deferred_plabels,
ggc_realloc (deferred_plabels,
((n_deferred_plabels + 1)
* sizeof (struct deferred_plabel)));
@ -7666,31 +7663,6 @@ cmpib_comparison_operator (op, mode)
|| GET_CODE (op) == LEU));
}
/* Mark ARG (which is really a struct deferred_plabel **) for GC. */
static void
mark_deferred_plabels (arg)
void *arg;
{
struct deferred_plabel *dp = *(struct deferred_plabel **) arg;
int i;
for (i = 0; i < n_deferred_plabels; ++i)
ggc_mark_rtx (dp[i].internal_label);
}
/* Called to register all of our global variables with the garbage
collector. */
static void
pa_add_gc_roots ()
{
ggc_add_rtx_root (&hppa_compare_op0, 1);
ggc_add_rtx_root (&hppa_compare_op1, 1);
ggc_add_root (&deferred_plabels, 1, sizeof (&deferred_plabels),
&mark_deferred_plabels);
}
/* On hpux10, the linker will give an error if we have a reference
in the read-only data section to a symbol defined in a shared
library. Therefore, expressions that might require a reloc can
@ -7717,3 +7689,5 @@ pa_select_section (exp, reloc, align)
else
data_section ();
}
#include "gt-pa.h"

View file

@ -865,7 +865,8 @@ struct hppa_args {int words, nargs_prototype, indirect; };
|| ((MODE) && GET_MODE_SIZE (MODE) > 8)))
extern struct rtx_def *hppa_compare_op0, *hppa_compare_op1;
extern GTY(()) rtx hppa_compare_op0;
extern GTY(()) rtx hppa_compare_op1;
extern enum cmp_type hppa_branch_type;
#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \

View file

@ -147,8 +147,7 @@ static int toc_hash_eq PARAMS ((const void *, const void *));
static int toc_hash_mark_entry PARAMS ((void **, void *));
static void toc_hash_mark_table PARAMS ((void *));
static int constant_pool_expr_1 PARAMS ((rtx, int *, int *));
static void rs6000_free_machine_status PARAMS ((struct function *));
static void rs6000_init_machine_status PARAMS ((struct function *));
static struct machine_function * rs6000_init_machine_status PARAMS ((void));
static bool rs6000_assemble_integer PARAMS ((rtx, unsigned int, int));
static int rs6000_ra_ever_killed PARAMS ((void));
static tree rs6000_handle_longcall_attribute PARAMS ((tree *, tree, tree, int, bool *));
@ -631,7 +630,6 @@ rs6000_override_options (default_cpu)
/* Arrange to save and restore machine status around nested functions. */
init_machine_status = rs6000_init_machine_status;
free_machine_status = rs6000_free_machine_status;
}
/* Handle -mvrsave= options. */
@ -6268,28 +6266,15 @@ rs6000_got_register (value)
return pic_offset_table_rtx;
}
/* Functions to init, mark and free struct machine_function.
These will be called, via pointer variables,
from push_function_context and pop_function_context. */
/* Function to init struct machine_function.
This will be called, via a pointer variable,
from push_function_context. */
static void
rs6000_init_machine_status (p)
struct function *p;
static struct machine_function *
rs6000_init_machine_status ()
{
p->machine = (machine_function *) xcalloc (1, sizeof (machine_function));
return ggc_alloc_cleared (sizeof (machine_function));
}
static void
rs6000_free_machine_status (p)
struct function *p;
{
if (p->machine == NULL)
return;
free (p->machine);
p->machine = NULL;
}
/* Print an operand. Recognize special options, documented below. */
@ -11254,16 +11239,9 @@ rs6000_fatal_bad_address (op)
static void
rs6000_add_gc_roots ()
{
ggc_add_rtx_root (&rs6000_compare_op0, 1);
ggc_add_rtx_root (&rs6000_compare_op1, 1);
toc_hash_table = htab_create (1021, toc_hash_function, toc_hash_eq, NULL);
ggc_add_root (&toc_hash_table, 1, sizeof (toc_hash_table),
toc_hash_mark_table);
#if TARGET_MACHO
machopic_add_gc_roots ();
#endif
}
#if TARGET_MACHO

View file

@ -1559,7 +1559,7 @@ typedef struct rs6000_stack {
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */
typedef struct machine_function
typedef struct machine_function GTY(())
{
/* Whether a System V.4 varargs area was created. */
int sysv_varargs_p;
@ -2400,7 +2400,8 @@ do { \
stored from the compare operation. Note that we can't use "rtx" here
since it hasn't been defined! */
extern struct rtx_def *rs6000_compare_op0, *rs6000_compare_op1;
extern GTY(()) rtx rs6000_compare_op0;
extern GTY(()) rtx rs6000_compare_op1;
extern int rs6000_compare_fp_p;
/* Control the assembler format that we output. */

View file

@ -16,13 +16,15 @@ fp-bit.c: $(srcdir)/config/fp-bit.c
darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) $(RTL_BASE_H) \
$(REGS_H) hard-reg-set.h insn-config.h conditions.h output.h \
insn-attr.h flags.h $(TREE_H) $(EXPR_H) reload.h \
function.h $(GGC_H) $(TM_P_H)
function.h $(GGC_H) $(TM_P_H) gt-darwin.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
darwin-c.o: $(srcdir)/config/darwin-c.c $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(C_TREE_H) c-pragma.h toplev.h cpplib.h $(TM_P_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
gt-darwin.h : s-gtype ; @true
# Build the libraries for both hard and soft floating point
MULTILIB_OPTIONS = msoft-float

View file

@ -6230,16 +6230,14 @@ reg_unused_after (reg, insn)
#include "ggc.h"
static GTY(()) rtx fpscr_rtx;
rtx
get_fpscr_rtx ()
{
static rtx fpscr_rtx;
if (! fpscr_rtx)
{
fpscr_rtx = gen_rtx (REG, PSImode, FPSCR_REG);
REG_USERVAR_P (fpscr_rtx) = 1;
ggc_add_rtx_root (&fpscr_rtx, 1);
mark_user_reg (fpscr_rtx);
}
if (! reload_completed || mdep_reorg_phase != SH_AFTER_MDEP_REORG)
@ -6819,3 +6817,5 @@ sh_strip_name_encoding (str)
str += *str == '*';
return str;
}
#include "gt-sh.h"

View file

@ -44,5 +44,8 @@ $(T)crti.o: $(srcdir)/config/sh/crti.asm $(GCC_PASSES)
$(T)crtn.o: $(srcdir)/config/sh/crtn.asm $(GCC_PASSES)
$(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/sh/crtn.asm
$(out_object_file): gt-sh.h
gt-sh.h : s-gtype ; @true
# These are not suitable for COFF.
# EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o

View file

@ -140,7 +140,6 @@ static int hypersparc_adjust_cost PARAMS ((rtx, rtx, rtx, int));
static void sparc_output_addr_vec PARAMS ((rtx));
static void sparc_output_addr_diff_vec PARAMS ((rtx));
static void sparc_output_deferred_case_vectors PARAMS ((void));
static void sparc_add_gc_roots PARAMS ((void));
static int check_return_regs PARAMS ((rtx));
static int epilogue_renumber PARAMS ((rtx *, int));
static bool sparc_assemble_integer PARAMS ((rtx, unsigned int, int));
@ -438,9 +437,6 @@ sparc_override_options ()
/* Do various machine dependent initializations. */
sparc_init_modes ();
/* Register global variables with the garbage collector. */
sparc_add_gc_roots ();
}
/* Miscellaneous utilities. */
@ -3114,10 +3110,10 @@ reg_unused_after (reg, insn)
}
/* The table we use to reference PIC data. */
static rtx global_offset_table;
static GTY(()) rtx global_offset_table;
/* The function we use to get at it. */
static rtx get_pc_symbol;
static GTY(()) rtx get_pc_symbol;
static char get_pc_symbol_name[256];
/* Ensure that we are not using patterns that are not OK with PIC. */
@ -7786,8 +7782,8 @@ set_extends (insn)
}
/* We _ought_ to have only one kind per function, but... */
static rtx sparc_addr_diff_list;
static rtx sparc_addr_list;
static GTY(()) rtx sparc_addr_diff_list;
static GTY(()) rtx sparc_addr_list;
void
sparc_defer_case_vector (lab, vec, diff)
@ -7997,20 +7993,6 @@ sparc_profile_hook (labelno)
emit_library_call (fun, LCT_NORMAL, VOIDmode, 1, lab, Pmode);
}
/* Called to register all of our global variables with the garbage
collector. */
static void
sparc_add_gc_roots ()
{
ggc_add_rtx_root (&sparc_compare_op0, 1);
ggc_add_rtx_root (&sparc_compare_op1, 1);
ggc_add_rtx_root (&global_offset_table, 1);
ggc_add_rtx_root (&get_pc_symbol, 1);
ggc_add_rtx_root (&sparc_addr_diff_list, 1);
ggc_add_rtx_root (&sparc_addr_list, 1);
}
#ifdef OBJECT_FORMAT_ELF
static void
sparc_elf_asm_named_section (name, flags)
@ -8530,3 +8512,5 @@ sparc_output_mi_thunk (file, thunk_fndecl, delta, function)
reload_completed = 0;
no_new_pseudos = 0;
}
#include "gt-sparc.h"

View file

@ -1809,7 +1809,8 @@ function_arg_padding ((MODE), (TYPE))
stored from the compare operation. Note that we can't use "rtx" here
since it hasn't been defined! */
extern struct rtx_def *sparc_compare_op0, *sparc_compare_op1;
extern GTY(()) rtx sparc_compare_op0;
extern GTY(()) rtx sparc_compare_op1;
/* Generate the special assembly code needed to tell the assembler whatever

View file

@ -27,3 +27,6 @@ LIB1ASMFUNCS = _mulsi3 _nsau _divsi3 _modsi3 _udivsi3 _umodsi3
TARGET_LIBGCC2_CFLAGS += -mlongcalls
LIB2FUNCS_EXTRA += $(srcdir)/config/xtensa/lib2funcs.S
$(out_object_file): gt-xtensa.h
gt-xtensa.h : s-gtype ; @true

View file

@ -85,7 +85,7 @@ const char *xtensa_st_opcodes[(int) MAX_MACHINE_MODE];
#define LARGEST_MOVE_RATIO 15
/* Define the structure for the machine field in struct function. */
struct machine_function
struct machine_function GTY(())
{
int accesses_prev_frame;
};
@ -193,8 +193,7 @@ static rtx gen_float_relational PARAMS ((enum rtx_code, rtx, rtx));
static rtx gen_conditional_move PARAMS ((rtx));
static rtx fixup_subreg_mem PARAMS ((rtx x));
static enum machine_mode xtensa_find_mode_for_size PARAMS ((unsigned));
static void xtensa_init_machine_status PARAMS ((struct function *p));
static void xtensa_free_machine_status PARAMS ((struct function *p));
static struct machine_status * xtensa_init_machine_status PARAMS ((void));
static void printx PARAMS ((FILE *, signed int));
static void xtensa_select_rtx_section PARAMS ((enum machine_mode, rtx,
unsigned HOST_WIDE_INT));
@ -1549,21 +1548,10 @@ xtensa_expand_nonlocal_goto (operands)
}
static void
xtensa_init_machine_status (p)
struct function *p;
static struct machine_function *
xtensa_init_machine_status ()
{
p->machine = (struct machine_function *)
xcalloc (1, sizeof (struct machine_function));
}
static void
xtensa_free_machine_status (p)
struct function *p;
{
free (p->machine);
p->machine = NULL;
return ggc_alloc_cleared (sizeof (struct machine_function));
}
@ -1846,7 +1834,6 @@ override_options ()
}
init_machine_status = xtensa_init_machine_status;
free_machine_status = xtensa_free_machine_status;
/* Check PIC settings. There's no need for -fPIC on Xtensa and
some targets need to always use PIC. */
@ -2759,3 +2746,5 @@ xtensa_encode_section_info (decl, first)
if (TREE_CODE (decl) == FUNCTION_DECL && ! TREE_PUBLIC (decl))
SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
}
#include "gt-xtensa.h"

68
gcc/configure vendored
View file

@ -2226,7 +2226,7 @@ EOF
fi
# Find some useful tools
for ac_prog in mawk gawk nawk awk
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@ -6706,7 +6706,7 @@ for f in $tm_file; do
ansidecl.h )
tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
defaults.h )
tm_file_list="${tm_file_list} $f" ;;
tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
*) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
esac
done
@ -6721,8 +6721,10 @@ for f in $host_xm_file; do
case $f in
ansidecl.h )
host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
auto-host.h | defaults.h )
auto-host.h )
host_xm_file_list="${host_xm_file_list} $f" ;;
defaults.h )
host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
*) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
esac
done
@ -6732,8 +6734,10 @@ for f in $build_xm_file; do
case $f in
ansidecl.h )
build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
auto-build.h | auto-host.h | defaults.h )
auto-build.h | auto-host.h )
build_xm_file_list="${build_xm_file_list} $f" ;;
defaults.h )
host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
*) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
esac
done
@ -6841,7 +6845,7 @@ fi
# Figure out what assembler we will be using.
echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
echo "configure:6845: checking what assembler to use" >&5
echo "configure:6849: checking what assembler to use" >&5
gcc_cv_as=
gcc_cv_gas_major_version=
gcc_cv_gas_minor_version=
@ -6935,7 +6939,7 @@ fi
# Figure out what linker we will be using.
echo $ac_n "checking what linker to use""... $ac_c" 1>&6
echo "configure:6939: checking what linker to use" >&5
echo "configure:6943: checking what linker to use" >&5
gcc_cv_ld=
gcc_cv_gld_major_version=
gcc_cv_gld_minor_version=
@ -7028,7 +7032,7 @@ fi
# Figure out what nm we will be using.
echo $ac_n "checking what nm to use""... $ac_c" 1>&6
echo "configure:7032: checking what nm to use" >&5
echo "configure:7036: checking what nm to use" >&5
if test -x nm$host_exeext; then
gcc_cv_nm=./nm$host_exeext
elif test "x$program_prefix" != xNONE; then
@ -7040,7 +7044,7 @@ echo "$ac_t""$gcc_cv_nm" 1>&6
# Figure out what objdump we will be using.
echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
echo "configure:7044: checking what objdump to use" >&5
echo "configure:7048: checking what objdump to use" >&5
if test -x objdump$host_exeext; then
gcc_cv_objdump=./objdump$host_exeext
elif test "x$program_prefix" != xNONE; then
@ -7052,7 +7056,7 @@ echo "$ac_t""$gcc_cv_objdump" 1>&6
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
echo "configure:7056: checking assembler alignment features" >&5
echo "configure:7060: checking assembler alignment features" >&5
gcc_cv_as_alignment_features=none
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
# Gas version 2.6 and later support for .balign and .p2align.
@ -7100,7 +7104,7 @@ fi
echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
echo "configure:7104: checking assembler subsection support" >&5
echo "configure:7108: checking assembler subsection support" >&5
gcc_cv_as_subsections=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7140,7 +7144,7 @@ fi
echo "$ac_t""$gcc_cv_as_subsections" 1>&6
echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
echo "configure:7144: checking assembler weak support" >&5
echo "configure:7148: checking assembler weak support" >&5
gcc_cv_as_weak=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then
@ -7163,7 +7167,7 @@ fi
echo "$ac_t""$gcc_cv_as_weak" 1>&6
echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
echo "configure:7167: checking assembler hidden support" >&5
echo "configure:7171: checking assembler hidden support" >&5
gcc_cv_as_hidden=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 \
@ -7226,7 +7230,7 @@ libgcc_visibility=$gcc_cv_as_hidden
echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
echo "configure:7230: checking assembler leb128 support" >&5
echo "configure:7234: checking assembler leb128 support" >&5
gcc_cv_as_leb128=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7271,7 +7275,7 @@ fi
echo "$ac_t""$gcc_cv_as_leb128" 1>&6
echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
echo "configure:7275: checking assembler eh_frame optimization" >&5
echo "configure:7279: checking assembler eh_frame optimization" >&5
gcc_cv_as_eh_frame=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7352,7 +7356,7 @@ fi
echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
echo "configure:7356: checking assembler section merging support" >&5
echo "configure:7360: checking assembler section merging support" >&5
gcc_cv_as_shf_merge=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7375,7 +7379,7 @@ fi
echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
echo "configure:7379: checking assembler thread-local storage support" >&5
echo "configure:7383: checking assembler thread-local storage support" >&5
gcc_cv_as_tls=no
conftest_s=
tls_first_major=
@ -7467,7 +7471,7 @@ case "$target" in
# All TARGET_ABI_OSF targets.
alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
echo "configure:7471: checking assembler supports explicit relocations" >&5
echo "configure:7475: checking assembler supports explicit relocations" >&5
if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7517,7 +7521,7 @@ EOF
;;
sparc*-*-*)
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
echo "configure:7521: checking assembler .register pseudo-op support" >&5
echo "configure:7525: checking assembler .register pseudo-op support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7545,7 +7549,7 @@ EOF
fi
echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
echo "configure:7549: checking assembler supports -relax" >&5
echo "configure:7553: checking assembler supports -relax" >&5
if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7573,7 +7577,7 @@ EOF
fi
echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
echo "configure:7577: checking assembler and linker support unaligned pc related relocs" >&5
echo "configure:7581: checking assembler and linker support unaligned pc related relocs" >&5
if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7600,7 +7604,7 @@ EOF
fi
echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
echo "configure:7604: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
echo "configure:7608: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7641,7 +7645,7 @@ EOF
if test "x$gcc_cv_as_flags64" != xno; then
echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
echo "configure:7645: checking for assembler offsetable %lo() support" >&5
echo "configure:7649: checking for assembler offsetable %lo() support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7681,7 +7685,7 @@ EOF
i[34567]86-*-* | x86_64-*-*)
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
echo "configure:7685: checking assembler instructions" >&5
echo "configure:7689: checking assembler instructions" >&5
gcc_cv_as_instructions=
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then
@ -7708,7 +7712,7 @@ EOF
echo "$ac_t""$gcc_cv_as_instructions" 1>&6
echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
echo "configure:7712: checking assembler GOTOFF in data directives" >&5
echo "configure:7716: checking assembler GOTOFF in data directives" >&5
gcc_cv_as_gotoff_in_data=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
then
@ -7738,7 +7742,7 @@ EOF
esac
echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
echo "configure:7742: checking assembler dwarf2 debug_line support" >&5
echo "configure:7746: checking assembler dwarf2 debug_line support" >&5
gcc_cv_as_dwarf2_debug_line=no
# ??? Not all targets support dwarf2 debug_line, even within a version
# of gas. Moreover, we need to emit a valid instruction to trigger any
@ -7794,7 +7798,7 @@ fi
echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
echo "configure:7798: checking assembler --gdwarf2 support" >&5
echo "configure:7802: checking assembler --gdwarf2 support" >&5
gcc_cv_as_gdwarf2_flag=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
then
@ -7823,7 +7827,7 @@ fi
echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
echo "configure:7827: checking assembler --gstabs support" >&5
echo "configure:7831: checking assembler --gstabs support" >&5
gcc_cv_as_gstabs_flag=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
then
@ -7851,7 +7855,7 @@ fi
echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
echo "configure:7855: checking linker PT_GNU_EH_FRAME support" >&5
echo "configure:7859: checking linker PT_GNU_EH_FRAME support" >&5
gcc_cv_ld_eh_frame_hdr=no
if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
@ -8014,7 +8018,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:8018: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo "configure:8022: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@ -8072,6 +8076,8 @@ all_stagestuff=
all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
# List of language makefile fragments.
all_lang_makefiles=
# Files for gengtype
all_gtfiles=
# Add the language fragments.
# Languages are added via two mechanisms. Some information must be
@ -8092,6 +8098,7 @@ do
compilers=
stagestuff=
outputs=
gtfiles=
. ${srcdir}/$s/config-lang.in
if test "x$language" = x
then
@ -8110,6 +8117,7 @@ do
all_compilers="$all_compilers $compilers"
all_stagestuff="$all_stagestuff $stagestuff"
all_outputs="$all_outputs $outputs"
all_gtfiles="$all_gtfiles $gtfiles"
fi
done
@ -8304,6 +8312,7 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
# Echo that links are built
@ -8569,6 +8578,7 @@ s%@objdir@%$objdir%g
s%@subdirs@%$subdirs%g
s%@all_boot_languages@%$all_boot_languages%g
s%@all_compilers@%$all_compilers%g
s%@all_gtfiles@%$all_gtfiles%g
s%@all_lang_makefiles@%$all_lang_makefiles%g
s%@all_languages@%$all_languages%g
s%@all_stagestuff@%$all_stagestuff%g

View file

@ -1062,7 +1062,7 @@ for f in $tm_file; do
ansidecl.h )
tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
defaults.h )
tm_file_list="${tm_file_list} $f" ;;
tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
*) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
esac
done
@ -1077,8 +1077,10 @@ for f in $host_xm_file; do
case $f in
ansidecl.h )
host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
auto-host.h | defaults.h )
auto-host.h )
host_xm_file_list="${host_xm_file_list} $f" ;;
defaults.h )
host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
*) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
esac
done
@ -1088,8 +1090,10 @@ for f in $build_xm_file; do
case $f in
ansidecl.h )
build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
auto-build.h | auto-host.h | defaults.h )
auto-build.h | auto-host.h )
build_xm_file_list="${build_xm_file_list} $f" ;;
defaults.h )
host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
*) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
esac
done
@ -2326,6 +2330,8 @@ all_stagestuff=
all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
# List of language makefile fragments.
all_lang_makefiles=
# Files for gengtype
all_gtfiles=
# Add the language fragments.
# Languages are added via two mechanisms. Some information must be
@ -2346,6 +2352,7 @@ do
compilers=
stagestuff=
outputs=
gtfiles=
. ${srcdir}/$s/config-lang.in
if test "x$language" = x
then
@ -2364,6 +2371,7 @@ do
all_compilers="$all_compilers $compilers"
all_stagestuff="$all_stagestuff $stagestuff"
all_outputs="$all_outputs $outputs"
all_gtfiles="$all_gtfiles $gtfiles"
fi
done
@ -2496,6 +2504,7 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
AC_SUBST(subdirs)
AC_SUBST(all_boot_languages)
AC_SUBST(all_compilers)
AC_SUBST(all_gtfiles)
AC_SUBST(all_lang_makefiles)
AC_SUBST(all_languages)
AC_SUBST(all_stagestuff)

View file

@ -1,3 +1,213 @@
2002-06-03 Geoffrey Keating <geoffk@redhat.com>
* pt.c (inline_parm_levels): Mark for GC.
* mangle.c (start_mangling): Allocate G.substitutions here...
(init_mangle): ... rather than here.
(finish_mangling): Clear the varray pointer when done with it.
* spew.c (yylexstring): Don't use VARRAY_FREE.
* search.c (bfs_walk): Don't use VARRAY_FREE.
* decl2.c (pending_statics): Use gengtype to mark.
(deferred_fns): Likewise.
(ssdf_decls): Likewise.
(init_decl2): Delete.
* decl.c (pop_from_top_level): Don't use VARRAY_FREE.
(cxx_init_decl_processing): Don't call init_decl2.
(cxx_pop_function_context): Don't use VARRAY_FREE.
* cp-tree.h (struct saved_scope): No need for special marking
of varrays.
(struct language_function): Likewise.
(local_classes): Use gengtype to mark.
(init_decl2): Delete prototype.
* class.c (init_class_processing): Don't use
ggc_add_tree_varray_root.
(build_vtbl_initializer): Don't use VARRAY_FREE.
* decl.c (typename_compare): Don't use same_type_p.
* decl.c: Include hashtab.h instead of hash.h.
(typename_hash): Update to use htab_h.
(typename_compare): Likewise.
(typename_htab): Use gengtype to mark.
(build_typename_type): Update to use htab_h.
* Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
* Make-lang.in (gt-cp-tree.h): New rule.
(cp/tree.o): Depend on gt-cp-tree.h.
* config-lang.in (gtfiles): Add cp/tree.c.
* tree.c: Include gt-cp-tree.h.
(list_hash_table): Use gengtype to mark.
(init_tree): Use gengtype to mark trees.
* Make-lang.in (cp/decl.o): Add debug.h dependency.
* call.c (struct z_candidate): Use gengtype.
(USER_CONV_CAND): Use WRAPPER_ZC.
(convert_class_to_reference): Use build_zc_wrapper.
(build_type_conversion_1): Likewise.
(build_over_call): Use WRAPPER_ZC.
(add_warning): Use build_zc_wrapper.
* cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
* cp-tree.h (struct lang_identifier): Use gengtype.
(struct template_parm_index_s): Likewise.
(struct ptrmem_cst): Likewise.
(struct tree_binding): Likewise.
(struct tree_overload): Likewise.
(struct tree_srcloc): Likewise.
(struct tree_wrapper): Likewise. Also modify to have a pointer
to struct z_candidate rather than void.
(enum cp_tree_node_structure_enum): New.
(union lang_tree_node): New.
(cxx_mark_tree): Delete prototype.
(cp_tree_node_structure): New prototype.
(build_ptr_wrapper): Delete prototype.
(build_int_wrapper): Delete prototype.
(build_zc_wrapper): New prototype.
* decl.c: Include debug.h
(cxx_mark_tree): Delete.
(cp_tree_node_structure): New.
* tree.c (build_ptr_wrapper): Delete.
(build_int_wrapper): Delete.
(build_zc_wrapper): New.
* cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
Correct typo. Patch from k_fukui@highway.ne.jp.
* semantics.c (current_stmt_tree): Update for change to
struct language_function.
(finish_mem_initializers): Likewise.
* decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
* cp-tree.h (struct language_function): Rename from
cp_language_function. Change all uses.
(cp_function_chain): Don't need to cast.
* class.c (duplicate_tag_error): Reset discriminator.
(check_bases_and_members): Update for data structure changes.
* cp-tree.h (struct lang_id2): Use gengtype.
(flagged_type_tree): Likewise.
(SET_LANG_ID): Use GGC on struct lang_id2.
(struct cp_language_function): Use gengtype. Remove field
'x_vcalls_possible_p'.
(current_vcalls_possible_p): Delete.
(struct lang_type_header): New.
(struct lang_type_class): Rename from struct lang_type. Include
struct lang_type_header.
(struct lang_type_ptrmem): New.
(struct lang_type): New.
(LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
(LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
(TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
(struct lang_decl_flags): Use gengtype. Add discriminators.
(struct lang_decl): Use gengtype. Add and use discriminators.
Update the macros that reference moved fields.
(LANG_DECL_U2_CHECK): New function. Use it when appropriate.
(SET_DECL_THUNK_P): Set discriminator too.
(clear_inline_text_obstack): Delete prototype.
(finish_inline_definitions): Delete prototype.
(mark_pending_inlines): Delete prototype.
(lang_check_failed): New prototype.
* decl.c (struct named_label_use_list): Use gengtype.
(struct named_label_list): Likewise.
(mark_binding_level): Delete.
(mark_named_label_lists): Delete.
(push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
(cxx_init_decl_processing): Use generated marker routine.
(begin_destructor_body): Delete dead set to
current_vcalls_possible_p.
(mark_lang_function): Delete.
(mark_cp_function_context): Delete.
(lang_mark_tree): Use generated marker routines.
* decl2.c (start_objects): Set discriminator when setting
GLOBAL_INIT_PRIORITY.
* lex.c (retrofit_lang_decl): Set discriminators.
(copy_lang_type): Update for changes to lang_type structure.
(cp_make_lang_type): Set discriminator.
* parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
* search.c: Include ggc.h.
* semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
(finish_inline_definitions): Delete.
* spew.c (struct token): Use gengtype.
(struct token_chunk): New.
(struct unparsed_text): Use gengtype. Store tokens in chunks.
(struct feed): Use gengtype.
(feed_obstack): Delete.
(feed): Mark as GC root.
(pending_inlines): Mark as GC root.
(pending_inlines_tail): Likewise.
(processing_these_inlines): Likewise.
(token_obstack): Make static.
(first_token): Likewise.
(init_spew): Don't initialise deleted things; use gengtype for roots.
(clear_inline_text_obstack): Delete.
(feed_input): Use GC for struct feed. Update for changes to
struct unparsed_text.
(mark_pending_inlines): Delete.
(next_token): Rename from add_token. Change all callers. Update
for changes to struct unparsed_text.
(space_for_token): New.
(remove_last_token): New.
(alloc_unparsed_text): New.
(snarf_block): Take an unparsed_text. Update for changes to struct
unparsed_text.
(snarf_method): Update for changes to struct unparsed_text.
(snarf_defarg): Update for changes to struct unparsed_text.
* tree.c (lang_check_failed): New.
* Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
(cp/spew.o): Add dependency on gt-<filename>.h.
(cp/decl2.o): Add dependency on gt-<filename>.h.
(cp/call.o): Add dependency on gt-<filename>.h.
(cp/pt.o): Add dependency on gt-<filename>.h.
(cp/repo.o): Add dependency on gt-<filename>.h.
(cp/parse.o): Add dependency on gt-<filename>.h.
* call.c: Use gengtype for roots.
* config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
decl2.c parse.y pt.c repo.c spew.c.
* cp-tree.h: Use gengtype for roots.
(struct saved_scope): Use GGC, gengtype.
(cp_parse_init): Delete prototype.
(init_pt): Delete prototype.
* decl.c: Use gengtype for roots.
(mark_saved_scope): Delete.
(cxx_init_decl_processing): Don't call deleted initilisation
routines.
(signed_size_zero_node): Delete, unused.
* decl.h: Use gengtype for roots.
* decl2.c: Use gengtype for roots.
* lex.h: Use gengtype for roots.
* parse.y: Use gengtype for roots.
(cp_parse_init): Delete.
* pt.c: Use gengtype for roots.
(init_pt): Delete.
* repo.c: Use gengtype for roots.
* spew.c: Use gengtype for roots.
* Make-lang.in: Allow for filename changes. Add gtype-cp.h.
(cp/decl.o): Add dependency on gtype-cp.h.
* decl.c: Remove use of add_deletable_root, use GTY marker instead.
Include gtype-cp.h. Allow for filename changes.
* Make-lang.in (cp/gt-decl.h): Generate using gengtype.
(cp/decl.o): Add cp/gt-decl.h dependency.
* config-lang.in (gtfiles): New.
* tree.h: Rename struct binding_level to struct cp_binding_level.
* decl.c: Rename struct binding_level to struct cp_binding_level.
Include cp/gt-decl.h.
(struct cp_binding_level): Use gengtype.
(make_binding_level): Use GGC on struct cp_binding_level.
(mark_binding_level): Use gt_ggc_m_cp_binding_level.
(cxx_init_decl_processing): Mark free_binding_level as
deletable.
* decl.c (mark_cp_function_context): Update calling sequence.
* decl.c (start_function): Don't free 'struct
cp_language_function'.
(pop_cp_function_context): Likewise.
(save_function_data): Allocate it using GC.
* semantics.c (genrtl_start_function): Don't free 'struct
cp_language_function'.
2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
* lang-specs.h: Use cpp_debug_options.

View file

@ -131,6 +131,10 @@ $(srcdir)/cp/parse.c: $(srcdir)/cp/parse.y
false ; \
fi
gtype-cp.h gt-cp-call.h gt-cp-decl.h gt-cp-decl2.h : s-gtype; @true
gt-cp-parse.h gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h : s-gtype; @true
gt-cp-tree.h : s-gtype; @true
#
# Build hooks:
@ -247,24 +251,26 @@ CXX_TREE_H = $(TREE_H) cp/cp-tree.h c-common.h cp/cp-tree.def c-common.def \
function.h varray.h $(SYSTEM_H) $(CONFIG_H) $(TARGET_H) \
$(srcdir)/../include/hashtab.h $(srcdir)/../include/splay-tree.h
cp/spew.o: cp/spew.c $(CXX_TREE_H) cp/parse.h flags.h cp/lex.h toplev.h
cp/spew.o: cp/spew.c $(CXX_TREE_H) cp/parse.h flags.h cp/lex.h toplev.h \
gt-cp-spew.h
cp/lex.o: cp/lex.c $(CXX_TREE_H) cp/parse.h flags.h cp/lex.h c-pragma.h \
toplev.h output.h mbchar.h $(GGC_H) input.h diagnostic.h cp/operators.def \
$(TM_P_H)
cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) toplev.h langhooks.h $(LANGHOOKS_DEF_H) \
c-common.h
cp/decl.o: cp/decl.c $(CXX_TREE_H) flags.h cp/lex.h cp/decl.h stack.h \
output.h $(EXPR_H) except.h toplev.h hash.h $(GGC_H) $(RTL_H) \
cp/operators.def $(TM_P_H) tree-inline.h diagnostic.h c-pragma.h
output.h $(EXPR_H) except.h toplev.h $(HASHTAB_H) $(GGC_H) $(RTL_H) \
cp/operators.def $(TM_P_H) tree-inline.h diagnostic.h c-pragma.h \
debug.h gt-cp-decl.h gtype-cp.h
cp/decl2.o: cp/decl2.c $(CXX_TREE_H) flags.h cp/lex.h cp/decl.h $(EXPR_H) \
output.h except.h toplev.h $(GGC_H) $(RTL_H) c-common.h
output.h except.h toplev.h $(GGC_H) $(RTL_H) c-common.h gt-cp-decl2.h
cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) flags.h toplev.h output.h $(TM_P_H) \
diagnostic.h
cp/typeck.o: cp/typeck.c $(CXX_TREE_H) flags.h $(RTL_H) $(EXPR_H) toplev.h \
diagnostic.h
cp/class.o: cp/class.c $(CXX_TREE_H) flags.h toplev.h $(RTL_H) $(TARGET_H)
cp/call.o: cp/call.c $(CXX_TREE_H) flags.h toplev.h $(RTL_H) $(EXPR_H) \
$(GGC_H) diagnostic.h
$(GGC_H) diagnostic.h gt-cp-call.h
cp/friend.o: cp/friend.c $(CXX_TREE_H) flags.h $(RTL_H) toplev.h $(EXPR_H)
cp/init.o: cp/init.c $(CXX_TREE_H) flags.h $(RTL_H) $(EXPR_H) toplev.h \
$(GGC_H) except.h
@ -273,7 +279,7 @@ cp/method.o: cp/method.c $(CXX_TREE_H) toplev.h $(GGC_H) $(RTL_H) $(EXPR_H) \
cp/cvt.o: cp/cvt.c $(CXX_TREE_H) cp/decl.h flags.h toplev.h convert.h
cp/search.o: cp/search.c $(CXX_TREE_H) stack.h flags.h toplev.h $(RTL_H)
cp/tree.o: cp/tree.c $(CXX_TREE_H) flags.h toplev.h $(GGC_H) $(RTL_H) \
insn-config.h integrate.h tree-inline.h real.h
insn-config.h integrate.h tree-inline.h real.h gt-cp-tree.h
cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(SYSTEM_H)
cp/rtti.o: cp/rtti.c $(CXX_TREE_H) flags.h toplev.h
cp/except.o: cp/except.c $(CXX_TREE_H) flags.h $(RTL_H) except.h toplev.h \
@ -281,10 +287,11 @@ cp/except.o: cp/except.c $(CXX_TREE_H) flags.h $(RTL_H) except.h toplev.h \
cp/expr.o: cp/expr.c $(CXX_TREE_H) $(RTL_H) flags.h $(EXPR_H) toplev.h \
except.h $(TM_P_H)
cp/pt.o: cp/pt.c $(CXX_TREE_H) cp/decl.h cp/parse.h cp/lex.h toplev.h \
$(GGC_H) $(RTL_H) except.h tree-inline.h
$(GGC_H) $(RTL_H) except.h tree-inline.h gt-cp-pt.h
cp/error.o: cp/error.c $(CXX_TREE_H) toplev.h diagnostic.h flags.h real.h \
$(LANGHOOKS_DEF_H)
cp/repo.o: cp/repo.c $(CXX_TREE_H) toplev.h $(GGC_H) diagnostic.h
cp/repo.o: cp/repo.c $(CXX_TREE_H) toplev.h $(GGC_H) diagnostic.h \
gt-cp-repo.h
cp/semantics.o: cp/semantics.c $(CXX_TREE_H) cp/lex.h except.h toplev.h \
flags.h $(GGC_H) debug.h output.h $(RTL_H) $(TIMEVAR_H) $(EXPR_H) \
tree-inline.h
@ -294,7 +301,7 @@ cp/optimize.o: cp/optimize.c $(CXX_TREE_H) rtl.h integrate.h insn-config.h \
cp/mangle.o: cp/mangle.c $(CXX_TREE_H) toplev.h real.h
cp/parse.o: cp/parse.c $(CXX_TREE_H) flags.h cp/lex.h except.h output.h \
$(SYSTEM_H) toplev.h $(GGC_H)
$(SYSTEM_H) toplev.h $(GGC_H) gt-cp-parse.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \
$(srcdir)/cp/parse.c $(OUTPUT_OPTION)
#

View file

@ -535,7 +535,7 @@ build_method_call (instance, name, parms, basetype_path, flags)
/* New overloading code. */
struct z_candidate {
struct z_candidate GTY(()) {
tree fn;
tree convs;
tree second_conv;
@ -572,8 +572,7 @@ struct z_candidate {
should be created to hold the result of the conversion. */
#define NEED_TEMPORARY_P(NODE) TREE_LANG_FLAG_4 (NODE)
#define USER_CONV_CAND(NODE) \
((struct z_candidate *)WRAPPER_PTR (TREE_OPERAND (NODE, 1)))
#define USER_CONV_CAND(NODE) WRAPPER_ZC (TREE_OPERAND (NODE, 1))
#define USER_CONV_FN(NODE) (USER_CONV_CAND (NODE)->fn)
int
@ -1022,7 +1021,7 @@ convert_class_to_reference (t, s, expr)
conv = build1 (IDENTITY_CONV, s, expr);
conv = build_conv (USER_CONV, TREE_TYPE (TREE_TYPE (cand->fn)),
conv);
TREE_OPERAND (conv, 1) = build_ptr_wrapper (cand);
TREE_OPERAND (conv, 1) = build_zc_wrapper (cand);
ICS_USER_FLAG (conv) = 1;
if (cand->viable == -1)
ICS_BAD_FLAG (conv) = 1;
@ -2559,7 +2558,7 @@ build_user_type_conversion_1 (totype, expr, flags)
(USER_CONV,
(DECL_CONSTRUCTOR_P (cand->fn)
? totype : non_reference (TREE_TYPE (TREE_TYPE (cand->fn)))),
expr, build_ptr_wrapper (cand));
expr, build_zc_wrapper (cand));
ICS_USER_FLAG (cand->second_conv) = ICS_USER_FLAG (*p) = 1;
if (cand->viable == -1)
@ -3826,7 +3825,7 @@ convert_like_real (convs, expr, fn, argnum, inner)
case USER_CONV:
{
struct z_candidate *cand
= WRAPPER_PTR (TREE_OPERAND (convs, 1));
= WRAPPER_ZC (TREE_OPERAND (convs, 1));
tree convfn = cand->fn;
tree args;
@ -4160,7 +4159,7 @@ build_over_call (cand, args, flags)
/* Give any warnings we noticed during overload resolution. */
if (cand->warnings)
for (val = cand->warnings; val; val = TREE_CHAIN (val))
joust (cand, WRAPPER_PTR (TREE_VALUE (val)), 1);
joust (cand, WRAPPER_ZC (TREE_VALUE (val)), 1);
if (DECL_FUNCTION_MEMBER_P (fn))
enforce_access (cand->basetype_path, fn);
@ -4405,7 +4404,7 @@ build_over_call (cand, args, flags)
return convert_from_reference (fn);
}
static tree java_iface_lookup_fn;
static GTY(()) tree java_iface_lookup_fn;
/* Make an expression which yields the address of the Java interface
method FN. This is achieved by generating a call to libjava's
@ -4430,7 +4429,6 @@ build_java_interface_fn_ref (fn, instance)
= builtin_function ("_Jv_LookupInterfaceMethodIdx",
build_function_type (ptr_type_node, t),
0, NOT_BUILT_IN, NULL);
ggc_add_tree_root (&java_iface_lookup_fn, 1);
}
/* Look up the pointer to the runtime java.lang.Class object for `instance'.
@ -5207,7 +5205,7 @@ add_warning (winner, loser)
struct z_candidate *winner, *loser;
{
winner->warnings = tree_cons (NULL_TREE,
build_ptr_wrapper (loser),
build_zc_wrapper (loser),
winner->warnings);
}
@ -5635,3 +5633,5 @@ initialize_reference (type, expr)
return convert_like (conv, expr);
}
#include "gt-cp-call.h"

View file

@ -2157,6 +2157,7 @@ duplicate_tag_error (t)
memset ((char *) TYPE_LANG_SPECIFIC (t), 0, sizeof (struct lang_type));
BINFO_BASETYPES(binfo) = NULL_TREE;
TYPE_LANG_SPECIFIC (t)->u.h.is_lang_type_class = 1;
TYPE_BINFO (t) = binfo;
CLASSTYPE_INTERFACE_ONLY (t) = interface_only;
SET_CLASSTYPE_INTERFACE_UNKNOWN_X (t, interface_unknown);
@ -4379,7 +4380,7 @@ check_bases_and_members (t, empty_p)
/* Figure out whether or not we will need a cookie when dynamically
allocating an array of this type. */
TYPE_LANG_SPECIFIC (t)->vec_new_uses_cookie
TYPE_LANG_SPECIFIC (t)->u.c.vec_new_uses_cookie
= type_requires_array_cookie (t);
}
@ -5470,7 +5471,6 @@ init_class_processing ()
= (class_stack_node_t) xmalloc (current_class_stack_size
* sizeof (struct class_stack_node));
VARRAY_TREE_INIT (local_classes, 8, "local_classes");
ggc_add_tree_varray_root (&local_classes, 1);
access_default_node = build_int_2 (0, 0);
access_public_node = build_int_2 (ak_public, 0);
@ -7511,8 +7511,6 @@ build_vtbl_initializer (binfo, orig_binfo, t, rtti_binfo, non_fn_entries_p)
VARRAY_TREE_INIT (vid.fns, 32, "fns");
/* Add the vcall and vbase offset entries. */
build_vcall_and_vbase_vtbl_entries (binfo, &vid);
/* Clean up. */
VARRAY_FREE (vid.fns);
/* Clear BINFO_VTABLE_PATH_MARKED; it's set by
build_vbase_offset_vtbl_entries. */
for (vbase = CLASSTYPE_VBASECLASSES (t);

View file

@ -33,3 +33,5 @@ compilers="cc1plus\$(exeext)"
stagestuff="g++\$(exeext) g++-cross\$(exeext) cc1plus\$(exeext)"
target_libs="${libstdcxx_version} target-gperf"
gtfiles="\$(srcdir)/cp/cp-tree.h \$(srcdir)/cp/decl.h \$(srcdir)/cp/lex.h \$(srcdir)/cp/call.c \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \$(srcdir)/cp/parse.y \$(srcdir)/cp/pt.c \$(srcdir)/cp/repo.c \$(srcdir)/cp/spew.c \$(srcdir)/cp/tree.c"

View file

@ -66,8 +66,6 @@ static bool cxx_warn_unused_global_decl PARAMS ((tree));
#define LANG_HOOKS_TRUTHVALUE_CONVERSION c_common_truthvalue_conversion
#undef LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES
#define LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES cxx_insert_default_attributes
#undef LANG_HOOKS_MARK_TREE
#define LANG_HOOKS_MARK_TREE cxx_mark_tree
#undef LANG_HOOKS_UNSAFE_FOR_REEVAL
#define LANG_HOOKS_UNSAFE_FOR_REEVAL c_common_unsafe_for_reeval
#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
@ -93,10 +91,8 @@ static bool cxx_warn_unused_global_decl PARAMS ((tree));
#undef LANG_HOOKS_FUNCTION_INIT
#define LANG_HOOKS_FUNCTION_INIT cxx_push_function_context
#undef LANG_HOOKS_FUNCTION_FREE
#define LANG_HOOKS_FUNCTION_FREE cxx_pop_function_context
#undef LANG_HOOKS_FUNCTION_MARK
#define LANG_HOOKS_FUNCTION_MARK cxx_mark_function_context
#undef LANG_HOOKS_FUNCTION_FINAL
#define LANG_HOOKS_FUNCTION_FINAL cxx_pop_function_context
/* Attribute hooks. */
#undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -36,13 +36,13 @@ extern tree grokdeclarator PARAMS ((tree, tree, enum decl_context, int,
/* Parsing a function declarator leaves a list of parameter names
or a chain or parameter decls here. */
extern tree last_function_parms;
extern GTY(()) tree last_function_parms;
/* A list of objects which have constructors or destructors
which reside in the global scope. The decl is stored in
the TREE_VALUE slot and the initializer is stored
in the TREE_PURPOSE slot. */
extern tree static_aggregates;
extern GTY(()) tree static_aggregates;
#ifdef DEBUG_CP_BINDING_LEVELS
/* Purely for debugging purposes. */

View file

@ -95,13 +95,13 @@ static tree get_guard_bits PARAMS ((tree));
/* A list of static class variables. This is needed, because a
static class variable can be declared inside the class without
an initializer, and then initialized, statically, outside the class. */
static varray_type pending_statics;
static GTY(()) varray_type pending_statics;
#define pending_statics_used \
(pending_statics ? pending_statics->elements_used : 0)
/* A list of functions which were declared inline, but which we
may need to emit outline anyway. */
static varray_type deferred_fns;
static GTY(()) varray_type deferred_fns;
#define deferred_fns_used \
(deferred_fns ? deferred_fns->elements_used : 0)
@ -2712,6 +2712,7 @@ start_objects (method_type, initp)
DECL_GLOBAL_CTOR_P (current_function_decl) = 1;
else
DECL_GLOBAL_DTOR_P (current_function_decl) = 1;
DECL_LANG_SPECIFIC (current_function_decl)->decl_flags.u2sel = 1;
GLOBAL_INIT_PRIORITY (current_function_decl) = initp;
body = begin_compound_stmt (/*has_no_scope=*/0);
@ -2768,17 +2769,17 @@ finish_objects (method_type, initp, body)
#define SSDF_IDENTIFIER "__static_initialization_and_destruction"
/* The declaration for the __INITIALIZE_P argument. */
static tree initialize_p_decl;
static GTY(()) tree initialize_p_decl;
/* The declaration for the __PRIORITY argument. */
static tree priority_decl;
static GTY(()) tree priority_decl;
/* The declaration for the static storage duration function. */
static tree ssdf_decl;
static GTY(()) tree ssdf_decl;
/* All the static storage duration functions created in this
translation unit. */
static varray_type ssdf_decls;
static GTY(()) varray_type ssdf_decls;
/* A map from priority levels to information about that priority
level. There may be many such levels, so efficient lookup is
@ -5280,15 +5281,4 @@ handle_class_head (aggr, scope, id, defn_p, new_type_p)
return decl;
}
/* Initialize decl2.c. */
void
init_decl2 ()
{
ggc_add_tree_varray_root (&deferred_fns, 1);
ggc_add_tree_varray_root (&pending_statics, 1);
ggc_add_tree_varray_root (&ssdf_decls, 1);
ggc_add_tree_root (&ssdf_decl, 1);
ggc_add_tree_root (&priority_decl, 1);
ggc_add_tree_root (&initialize_p_decl, 1);
}
#include "gt-cp-decl2.h"

View file

@ -1434,6 +1434,12 @@ retrofit_lang_decl (t)
ld = (struct lang_decl *) ggc_alloc_cleared (size);
ld->decl_flags.can_be_full = CAN_HAVE_FULL_LANG_DECL_P (t) ? 1 : 0;
ld->decl_flags.u1sel = TREE_CODE (t) == NAMESPACE_DECL ? 1 : 0;
ld->decl_flags.u2sel = 0;
if (ld->decl_flags.can_be_full)
ld->u.f.u3sel = TREE_CODE (t) == FUNCTION_DECL ? 1 : 0;
DECL_LANG_SPECIFIC (t) = ld;
if (current_lang_name == lang_name_cplusplus)
SET_DECL_LANGUAGE (t, lang_cplusplus);
@ -1498,7 +1504,10 @@ copy_lang_type (node)
if (! TYPE_LANG_SPECIFIC (node))
return;
size = sizeof (struct lang_type);
if (TYPE_LANG_SPECIFIC (node)->u.h.is_lang_type_class)
size = sizeof (struct lang_type);
else
size = sizeof (struct lang_type_ptrmem);
lt = (struct lang_type *) ggc_alloc (size);
memcpy (lt, TYPE_LANG_SPECIFIC (node), size);
TYPE_LANG_SPECIFIC (node) = lt;
@ -1538,6 +1547,7 @@ cxx_make_type (code)
ggc_alloc_cleared (sizeof (struct lang_type)));
TYPE_LANG_SPECIFIC (t) = pi;
pi->u.c.h.is_lang_type_class = 1;
#ifdef GATHER_STATISTICS
tree_node_counts[(int)lang_type] += 1;

View file

@ -68,15 +68,15 @@ typedef unsigned long RID_BIT_TYPE; /* assumed at least 32 bits */
yylex must look this up to detect typedefs, which get token type TYPENAME,
so it is left around in case the identifier is not a typedef but is
used in a context which makes it a reference to a variable. */
extern tree lastiddecl;
extern GTY(()) tree lastiddecl;
/* Back-door communication channel to the lexer. */
extern int looking_for_typename;
extern int looking_for_template;
/* Tell the lexer where to look for names. */
extern tree got_scope;
extern tree got_object;
extern GTY(()) tree got_scope;
extern GTY(()) tree got_object;
/* Pending language change.
Positive is push count, negative is pop count. */

View file

@ -2166,6 +2166,7 @@ write_substitution (seq_id)
static inline void
start_mangling ()
{
VARRAY_TREE_INIT (G.substitutions, 1, "mangling substitutions");
obstack_free (&G.name_obstack, obstack_base (&G.name_obstack));
}
@ -2175,7 +2176,7 @@ static inline const char *
finish_mangling ()
{
/* Clear all the substitutions. */
VARRAY_POP_ALL (G.substitutions);
G.substitutions = 0;
/* Null-terminate the string. */
write_char ('\0');
@ -2189,7 +2190,6 @@ void
init_mangle ()
{
gcc_obstack_init (&G.name_obstack);
VARRAY_TREE_INIT (G.substitutions, 1, "mangling substitutions");
/* Cache these identifiers for quick comparison when checking for
standard substitutions. */

View file

@ -103,21 +103,21 @@ int have_extern_spec;
int used_extern_spec;
/* List of types and structure classes of the current declaration. */
static tree current_declspecs;
static GTY(()) tree current_declspecs;
/* List of prefix attributes in effect.
Prefix attributes are parsed by the reserved_declspecs and declmods
rules. They create a list that contains *both* declspecs and attrs. */
/* ??? It is not clear yet that all cases where an attribute can now appear in
a declspec list have been updated. */
static tree prefix_attributes;
static GTY(()) tree prefix_attributes;
/* When defining an enumeration, this is the type of the enumeration. */
static tree current_enum_type;
static GTY(()) tree current_enum_type;
/* When parsing a conversion operator name, this is the scope of the
operator itself. */
static tree saved_scopes;
static GTY(()) tree saved_scopes;
static tree empty_parms PARAMS ((void));
static tree parse_decl0 PARAMS ((tree, tree, tree, tree, int));
@ -263,19 +263,11 @@ check_class_key (key, aggr)
: key == record_type_node ? "struct" : "class", aggr);
}
void
cp_parse_init ()
{
ggc_add_tree_root (&current_declspecs, 1);
ggc_add_tree_root (&prefix_attributes, 1);
ggc_add_tree_root (&current_enum_type, 1);
ggc_add_tree_root (&saved_scopes, 1);
}
%}
%start program
%union {
%union { GTY(())
long itype;
tree ttype;
char *strtype;
@ -388,7 +380,7 @@ cp_parse_init ()
%type <ttype> paren_expr_or_null nontrivial_exprlist SELFNAME
%type <ttype> expr_no_commas expr_no_comma_rangle
%type <ttype> cast_expr unary_expr primary STRING
%type <ttype> reserved_declspecs boolean.literal
%type <ttype> reserved_declspecs boolean_literal
%type <ttype> reserved_typespecquals
%type <ttype> SCSPEC TYPESPEC CV_QUALIFIER maybe_cv_qualifier
%type <ttype> init initlist maybeasm maybe_init defarg defarg1
@ -436,13 +428,13 @@ cp_parse_init ()
%token <ttype> PRE_PARSED_CLASS_DECL DEFARG DEFARG_MARKER
%token <pi> PRE_PARSED_FUNCTION_DECL
%type <ttype> component_constructor_declarator
%type <ttype> fn.def2 return_id constructor_declarator
%type <ttype> .begin_function_body
%type <ttype> fn_def2 return_id constructor_declarator
%type <ttype> begin_function_body_
%type <ttype> class_head class_head_apparent_template
%type <ftype> class_head_decl class_head_defn
%type <ttype> base_class_list
%type <ttype> base_class_access_list
%type <ttype> base_class maybe_base_class_list base_class.1
%type <ttype> base_class maybe_base_class_list base_class_1
%type <ttype> exception_specification_opt ansi_raise_identifier ansi_raise_identifiers
%type <ttype> operator_name
%type <ttype> object aggr
@ -470,7 +462,7 @@ cp_parse_init ()
%token TYPENAME_DEFN IDENTIFIER_DEFN PTYPENAME_DEFN
%type <ttype> identifier_defn IDENTIFIER_DEFN TYPENAME_DEFN PTYPENAME_DEFN
%type <ttype> handler_args
%type <ttype> self_template_type .finish_template_type
%type <ttype> self_template_type finish_template_type_
%token NSNAME
%type <ttype> NSNAME
@ -815,7 +807,7 @@ eat_saved_input:
mem-initializer-list, so we open one there and suppress the one that
actually corresponds to the curly braces. */
function_body:
.begin_function_body ctor_initializer_opt save_lineno '{'
begin_function_body_ ctor_initializer_opt save_lineno '{'
{ $<ttype>$ = begin_compound_stmt (/*has_no_scope=*/1); }
compstmtend
{
@ -909,7 +901,7 @@ component_constructor_declarator:
/* more C++ complexity. See component_decl for a comment on the
reduce/reduce conflict introduced by these rules. */
fn.def2:
fn_def2:
declmods component_constructor_declarator
{ $$ = parse_method ($2, $1.t, $1.lookups);
rest_of_mdef:
@ -963,7 +955,7 @@ base_init:
}
;
.begin_function_body:
begin_function_body_:
/* empty */
{
$$ = begin_function_body ();
@ -1095,10 +1087,10 @@ end_explicit_instantiation:
template_type:
PTYPENAME '<' template_arg_list_opt template_close_bracket
.finish_template_type
finish_template_type_
{ $$ = $5; }
| TYPENAME '<' template_arg_list_opt template_close_bracket
.finish_template_type
finish_template_type_
{ $$ = $5; }
| self_template_type
;
@ -1106,17 +1098,17 @@ template_type:
apparent_template_type:
template_type
| identifier '<' template_arg_list_opt '>'
.finish_template_type
finish_template_type_
{ $$ = $5; }
;
self_template_type:
SELFNAME '<' template_arg_list_opt template_close_bracket
.finish_template_type
finish_template_type_
{ $$ = $5; }
;
.finish_template_type:
finish_template_type_:
{
if (yychar == YYEMPTY)
yychar = YYLEX;
@ -1615,7 +1607,7 @@ primary:
$$ = finish_id_expr ($1);
}
| CONSTANT
| boolean.literal
| boolean_literal
| STRING
{
$$ = fix_string_type ($$);
@ -1813,7 +1805,7 @@ delete:
{ got_scope = NULL_TREE; $$ = 1; }
;
boolean.literal:
boolean_literal:
CXX_TRUE
{ $$ = boolean_true_node; }
| CXX_FALSE
@ -2372,7 +2364,6 @@ structsp:
}
pending_inlines
{
finish_inline_definitions ();
$$.t = $<ttype>8;
$$.new_type_flag = 1;
}
@ -2550,13 +2541,13 @@ base_class_list:
;
base_class:
base_class.1
base_class_1
{ $$ = finish_base_specifier (access_default_node, $1); }
| base_class_access_list see_typename base_class.1
| base_class_access_list see_typename base_class_1
{ $$ = finish_base_specifier ($1, $3); }
;
base_class.1:
base_class_1:
typename_sub
{ if (!TYPE_P ($$))
$$ = error_mark_node; }
@ -2632,13 +2623,13 @@ component_decl:
yyungetc ('}', 0); }
/* C++: handle constructors, destructors and inline functions */
/* note that INLINE is like a TYPESPEC */
| fn.def2 ':' /* base_init compstmt */
| fn_def2 ':' /* base_init compstmt */
{ $$ = finish_method ($$); }
| fn.def2 TRY /* base_init compstmt */
| fn_def2 TRY /* base_init compstmt */
{ $$ = finish_method ($$); }
| fn.def2 RETURN_KEYWORD /* base_init compstmt */
| fn_def2 RETURN_KEYWORD /* base_init compstmt */
{ $$ = finish_method ($$); }
| fn.def2 '{' /* nodecls compstmt */
| fn_def2 '{' /* nodecls compstmt */
{ $$ = finish_method ($$); }
| ';'
{ $$ = NULL_TREE; }
@ -4026,3 +4017,5 @@ free_parser_stacks ()
free (malloced_yyvs);
}
}
#include "gt-cp-parse.h"

View file

@ -56,17 +56,17 @@ extern struct obstack permanent_obstack;
the instantiate request occurred; the TREE_VALUE is a either a DECL
(for a function or static data member), or a TYPE (for a class)
indicating what we are hoping to instantiate. */
static tree pending_templates;
static GTY(()) tree pending_templates;
static tree last_pending_template;
int processing_template_parmlist;
static int template_header_count;
static tree saved_trees;
static varray_type inline_parm_levels;
static GTY(()) tree saved_trees;
static GTY(()) varray_type inline_parm_levels;
static size_t inline_parm_levels_used;
static tree current_tinst_level;
static GTY(()) tree current_tinst_level;
/* A map from local variable declarations in the body of the template
presently being instantiated to the corresponding instantiated
@ -170,16 +170,6 @@ static tree copy_default_args_to_explicit_spec_1 PARAMS ((tree, tree));
static void copy_default_args_to_explicit_spec PARAMS ((tree));
static int invalid_nontype_parm_type_p PARAMS ((tree, tsubst_flags_t));
/* Called once to initialize pt.c. */
void
init_pt ()
{
ggc_add_tree_root (&pending_templates, 1);
ggc_add_tree_root (&saved_trees, 1);
ggc_add_tree_root (&current_tinst_level, 1);
}
/* Do any processing required when DECL (a member template declaration
using TEMPLATE_PARAMETERS as its innermost parameter list) is
finished. Returns the TEMPLATE_DECL corresponding to DECL, unless
@ -10426,3 +10416,5 @@ invalid_nontype_parm_type_p (type, complain)
type);
return 1;
}
#include "gt-cp-pt.h"

View file

@ -42,8 +42,8 @@ static void open_repo_file PARAMS ((const char *));
static char *afgets PARAMS ((FILE *));
static void reopen_repo_file_for_write PARAMS ((void));
static tree pending_repo;
static tree original_repo;
static GTY(()) tree pending_repo;
static GTY(()) tree original_repo;
static char *repo_name;
static FILE *repo_file;
@ -320,8 +320,6 @@ init_repo (filename)
if (! flag_use_repository)
return;
ggc_add_tree_root (&pending_repo, 1);
ggc_add_tree_root (&original_repo, 1);
gcc_obstack_init (&temporary_obstack);
open_repo_file (filename);
@ -458,3 +456,5 @@ finish_repo ()
if (repo_file)
fclose (repo_file);
}
#include "gt-cp-repo.h"

View file

@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */
#include "flags.h"
#include "rtl.h"
#include "output.h"
#include "ggc.h"
#include "toplev.h"
#define obstack_chunk_alloc xmalloc
@ -1673,9 +1674,6 @@ bfs_walk (binfo, fn, qfn, data)
}
}
/* Clean up. */
VARRAY_FREE (bfs_bases);
return rval;
}

View file

@ -97,7 +97,7 @@ stmt_tree
current_stmt_tree ()
{
return (cfun
? &cfun->language->x_stmt_tree
? &cfun->language->base.x_stmt_tree
: &scope_chain->x_stmt_tree);
}
@ -109,7 +109,7 @@ int
anon_aggr_type_p (node)
tree node;
{
return (CLASS_TYPE_P (node) && TYPE_LANG_SPECIFIC(node)->anon_aggr);
return ANON_AGGR_TYPE_P (node);
}
/* Finish a scope. */
@ -1131,7 +1131,7 @@ finish_mem_initializers (init_list)
tree *
current_scope_stmt_stack ()
{
return &cfun->language->x_scope_stmt_stack;
return &cfun->language->base.x_scope_stmt_stack;
}
/* Finish a parenthesized expression EXPR. */
@ -1882,16 +1882,6 @@ begin_inline_definitions ()
do_pending_inlines ();
}
/* Finish processing the inline function definitions cached during the
processing of a class definition. */
void
finish_inline_definitions ()
{
if (current_class_type == NULL_TREE)
clear_inline_text_obstack ();
}
/* Finish processing the declaration of a member class template
TYPES whose template parameters are given by PARMS. */
@ -2475,10 +2465,7 @@ genrtl_start_function (fn)
function; we need the named return value info for
cp_copy_res_decl_for_inlining. */
if (! DECL_INLINE (fn))
{
free (DECL_SAVED_FUNCTION_DATA (fn));
DECL_SAVED_FUNCTION_DATA (fn) = NULL;
}
DECL_SAVED_FUNCTION_DATA (fn) = NULL;
}
/* Keep track of how many functions we're presently expanding. */

View file

@ -50,12 +50,12 @@ Boston, MA 02111-1307, USA. */
backtracking. */
/* fifo of tokens recognized and available to parser. */
struct token
struct token GTY(())
{
/* The values for YYCHAR will fit in a short. */
short yychar;
unsigned int lineno;
YYSTYPE yylval;
YYSTYPE GTY ((desc ("%1.yychar"))) yylval;
};
/* Since inline methods can refer to text which has not yet been seen,
@ -68,7 +68,14 @@ struct token
This function's FUNCTION_DECL will have a bit set in its common so
that we know to watch out for it. */
struct unparsed_text
#define TOKEN_CHUNK_SIZE 20
struct token_chunk GTY(())
{
struct token_chunk *next;
struct token toks[TOKEN_CHUNK_SIZE];
};
struct unparsed_text GTY(())
{
struct unparsed_text *next; /* process this one next */
tree decl; /* associated declaration */
@ -76,26 +83,31 @@ struct unparsed_text
int lineno; /* line number we got the text from */
int interface; /* remembering interface_unknown and interface_only */
struct token *pos; /* current position, when rescanning */
struct token *limit; /* end of saved text */
struct token_chunk * tokens; /* Start of the token list. */
struct token_chunk *last_chunk; /* End of the token list. */
short last_pos; /* Number of tokens used in the last chunk of
TOKENS. */
short cur_pos; /* Current token in 'cur_chunk', when rescanning. */
struct token_chunk *cur_chunk; /* Current chunk, when rescanning. */
};
/* Stack of state saved off when we return to an inline method or
default argument that has been stored for later parsing. */
struct feed
struct feed GTY(())
{
struct unparsed_text *input;
const char *filename;
int lineno;
int yychar;
YYSTYPE yylval;
YYSTYPE GTY ((desc ("%1.yychar"))) yylval;
int first_token;
struct obstack token_obstack;
struct obstack GTY ((skip (""))) token_obstack;
struct feed *next;
};
};
static struct obstack feed_obstack;
static struct feed *feed;
static GTY(()) struct feed *feed;
static SPEW_INLINE void do_aggr PARAMS ((void));
static SPEW_INLINE int identifier_type PARAMS ((tree));
@ -107,25 +119,32 @@ static int read_token PARAMS ((struct token *));
static SPEW_INLINE int num_tokens PARAMS ((void));
static SPEW_INLINE struct token *nth_token PARAMS ((int));
static SPEW_INLINE int add_token PARAMS ((struct token *));
static SPEW_INLINE int next_token PARAMS ((struct token *));
static SPEW_INLINE int shift_token PARAMS ((void));
static SPEW_INLINE void push_token PARAMS ((struct token *));
static SPEW_INLINE void consume_token PARAMS ((void));
static SPEW_INLINE int read_process_identifier PARAMS ((YYSTYPE *));
static SPEW_INLINE void feed_input PARAMS ((struct unparsed_text *));
static SPEW_INLINE void snarf_block PARAMS ((const char *, int));
static SPEW_INLINE struct token * space_for_token
PARAMS ((struct unparsed_text *t));
static SPEW_INLINE struct token * remove_last_token
PARAMS ((struct unparsed_text *t));
static struct unparsed_text * alloc_unparsed_text
PARAMS ((const char *fn, int li, tree decl, int interface));
static void snarf_block PARAMS ((struct unparsed_text *t));
static tree snarf_defarg PARAMS ((void));
static int frob_id PARAMS ((int, int, tree *));
/* The list of inline functions being held off until we reach the end of
the current class declaration. */
static struct unparsed_text *pending_inlines;
static struct unparsed_text *pending_inlines_tail;
static GTY(()) struct unparsed_text *pending_inlines;
static GTY(()) struct unparsed_text *pending_inlines_tail;
/* The list of previously-deferred inline functions currently being parsed.
This exists solely to be a GC root. */
static struct unparsed_text *processing_these_inlines;
static GTY(()) struct unparsed_text *processing_these_inlines;
static void begin_parsing_inclass_inline PARAMS ((struct unparsed_text *));
@ -151,13 +170,8 @@ extern int yychar; /* the lookahead symbol */
extern YYSTYPE yylval; /* the semantic value of the */
/* lookahead symbol */
/* The token fifo lives in this obstack. */
struct obstack token_obstack;
int first_token;
/* Sometimes we need to save tokens for later parsing. If so, they are
stored on this obstack. */
struct obstack inline_text_obstack;
char *inline_text_firstobj;
static struct obstack token_obstack;
static int first_token;
/* When we see a default argument in a method declaration, we snarf it as
text using snarf_defarg. When we get up to namespace scope, we then go
@ -168,35 +182,21 @@ char *inline_text_firstobj;
the TREE_TYPE is the current_class_type, TREE_VALUE is the FUNCTION_DECL,
and TREE_PURPOSE is the list unprocessed dependent functions. */
static tree defarg_fns; /* list of functions with unprocessed defargs */
static tree defarg_parm; /* current default parameter */
static tree defarg_depfns; /* list of unprocessed fns met during current fn. */
static tree defarg_fnsdone; /* list of fns with circular defargs */
/* list of functions with unprocessed defargs */
static GTY(()) tree defarg_fns;
/* current default parameter */
static GTY(()) tree defarg_parm;
/* list of unprocessed fns met during current fn. */
static GTY(()) tree defarg_depfns;
/* list of fns with circular defargs */
static GTY(()) tree defarg_fnsdone;
/* Initialize obstacks. Called once, from cxx_init. */
void
init_spew ()
{
gcc_obstack_init (&inline_text_obstack);
inline_text_firstobj = (char *) obstack_alloc (&inline_text_obstack, 0);
gcc_obstack_init (&token_obstack);
gcc_obstack_init (&feed_obstack);
ggc_add_tree_root (&defarg_fns, 1);
ggc_add_tree_root (&defarg_parm, 1);
ggc_add_tree_root (&defarg_depfns, 1);
ggc_add_tree_root (&defarg_fnsdone, 1);
ggc_add_root (&pending_inlines, 1, sizeof (struct unparsed_text *),
mark_pending_inlines);
ggc_add_root (&processing_these_inlines, 1, sizeof (struct unparsed_text *),
mark_pending_inlines);
}
void
clear_inline_text_obstack ()
{
obstack_free (&inline_text_obstack, inline_text_firstobj);
}
/* Subroutine of read_token. */
@ -270,8 +270,6 @@ yylexstring (t)
t->yylval.ttype = combine_strings (strings);
last_token_id = t->yylval.ttype;
VARRAY_FREE (strings);
}
/* We will have always read one token too many. */
@ -396,10 +394,10 @@ feed_input (input)
abort ();
#endif
f = obstack_alloc (&feed_obstack, sizeof (struct feed));
f = ggc_alloc (sizeof (struct feed));
/* The token list starts just after the struct unparsed_text in memory. */
input->pos = (struct token *) (input + 1);
input->cur_chunk = input->tokens;
input->cur_pos = 0;
#ifdef SPEW_DEBUG
if (spew_debug)
@ -439,48 +437,12 @@ end_input ()
token_obstack = f->token_obstack;
feed = f->next;
obstack_free (&feed_obstack, f);
#ifdef SPEW_DEBUG
if (spew_debug)
fprintf (stderr, "\treturning to %s:%d\n", input_filename, lineno);
#endif
}
/* GC callback to mark memory pointed to by the pending inline queue. */
void
mark_pending_inlines (pi)
PTR pi;
{
struct unparsed_text *up = * (struct unparsed_text **)pi;
while (up)
{
struct token *t = (struct token *) (up + 1);
struct token *l = up->limit;
while (t < l)
{
/* Some of the possible values for yychar use yylval.code
instead of yylval.ttype. We only have to worry about
yychars that could have been returned by read_token. */
switch (t->yychar)
{
case '+': case '-': case '*': case '/':
case '%': case '&': case '|': case '^':
case '>': case '<': case LSHIFT: case RSHIFT:
case ASSIGN: case MIN_MAX: case EQCOMPARE: case ARITHCOMPARE:
t++;
continue;
}
if (t->yylval.ttype)
ggc_mark_tree (t->yylval.ttype);
t++;
}
up = up->next;
}
}
/* Token queue management. */
/* Return the number of tokens available on the fifo. */
@ -510,16 +472,24 @@ static const struct token Tpad = { EMPTY, 0 UNION_INIT_ZERO };
/* Copy the next token into T and return its value. */
static SPEW_INLINE int
add_token (t)
next_token (t)
struct token *t;
{
if (!feed)
return read_token (t);
if (feed->input->pos < feed->input->limit)
if (feed->input->cur_chunk != feed->input->last_chunk
|| feed->input->cur_pos != feed->input->last_pos)
{
memcpy (t, feed->input->pos, sizeof (struct token));
return (feed->input->pos++)->yychar;
if (feed->input->cur_pos == TOKEN_CHUNK_SIZE)
{
feed->input->cur_chunk = feed->input->cur_chunk->next;
feed->input->cur_pos = 0;
}
memcpy (t, feed->input->cur_chunk->toks + feed->input->cur_pos,
sizeof (struct token));
feed->input->cur_pos++;
return t->yychar;
}
memcpy (t, &Teosi, sizeof (struct token));
@ -532,7 +502,7 @@ shift_token ()
{
size_t point = obstack_object_size (&token_obstack);
obstack_blank (&token_obstack, sizeof (struct token));
return add_token ((struct token *) (obstack_base (&token_obstack) + point));
return next_token ((struct token *) (obstack_base (&token_obstack) + point));
}
/* Consume the next token out of the fifo. */
@ -1060,22 +1030,73 @@ process_next_inline (i)
extract_interface_info ();
}
}
/* Create a new token at the end of the token list in T. */
static SPEW_INLINE struct token *
space_for_token (t)
struct unparsed_text *t;
{
if (t->last_pos != TOKEN_CHUNK_SIZE)
return t->last_chunk->toks + (t->last_pos++);
t->last_chunk->next = ggc_alloc (sizeof (*t->last_chunk->next));
t->last_chunk = t->last_chunk->next;
t->last_chunk->next = NULL;
t->last_pos = 1;
return t->last_chunk->toks;
}
/* Shrink the token list in T by one token. */
static SPEW_INLINE struct token *
remove_last_token (t)
struct unparsed_text *t;
{
struct token *result = t->last_chunk->toks + t->last_pos - 1;
if (t->last_pos == 0)
abort ();
t->last_pos--;
if (t->last_pos == 0 && t->last_chunk != t->tokens)
{
struct token_chunk **tc;
for (tc = &t->tokens; (*tc)->next != NULL; tc = &(*tc)->next)
;
*tc = NULL;
t->last_pos = sizeof ((*tc)->toks) / sizeof ((*tc)->toks[0]);
}
return result;
}
/* Allocate an 'unparsed_text' structure, ready to use space_for_token. */
static struct unparsed_text *
alloc_unparsed_text (fn, li, decl, interface)
const char *fn;
int li;
tree decl;
int interface;
{
struct unparsed_text *r;
r = ggc_alloc_cleared (sizeof (*r));
r->decl = decl;
r->filename = fn;
r->lineno = li;
r->interface = interface;
r->tokens = r->last_chunk = ggc_alloc_cleared (sizeof (*r->tokens));
return r;
}
/* Subroutine of snarf_method, deals with actual absorption of the block. */
static SPEW_INLINE void
snarf_block (starting_file, starting_line)
const char *starting_file;
int starting_line;
static void
snarf_block (t)
struct unparsed_text *t;
{
int blev = 1;
int look_for_semicolon = 0;
int look_for_lbrac = 0;
int look_for_catch = 0;
int yyc;
struct token tmp;
size_t point;
struct token *current;
if (yychar == '{')
;
@ -1092,17 +1113,14 @@ snarf_block (starting_file, starting_line)
yyerror ("parse error in method specification");
/* The current token is the first one to be recorded. */
tmp.yychar = yychar;
tmp.yylval = yylval;
tmp.lineno = lineno;
obstack_grow (&inline_text_obstack, &tmp, sizeof (struct token));
current = space_for_token (t);
current->yychar = yychar;
current->yylval = yylval;
current->lineno = lineno;
for (;;)
{
point = obstack_object_size (&inline_text_obstack);
obstack_blank (&inline_text_obstack, sizeof (struct token));
yyc = add_token ((struct token *)
(obstack_base (&inline_text_obstack) + point));
yyc = next_token (space_for_token (t));
if (yyc == '{')
{
@ -1117,27 +1135,29 @@ snarf_block (starting_file, starting_line)
if (!look_for_catch)
break;
if (add_token (&tmp) != CATCH)
if (next_token (space_for_token (t)) != CATCH)
{
push_token (&tmp);
push_token (remove_last_token (t));
break;
}
look_for_lbrac = 1;
obstack_grow (&inline_text_obstack, &tmp, sizeof (struct token));
}
}
else if (yyc == ';')
{
if (look_for_lbrac)
{
struct token *fake;
error ("function body for constructor missing");
/* fake a { } to avoid further errors */
tmp.yylval.ttype = 0;
tmp.yychar = '{';
obstack_grow (&inline_text_obstack, &tmp, sizeof (struct token));
tmp.yychar = '}';
obstack_grow (&inline_text_obstack, &tmp, sizeof (struct token));
fake = space_for_token (t);
fake->yylval.ttype = 0;
fake->yychar = '{';
fake = space_for_token (t);
fake->yylval.ttype = 0;
fake->yychar = '}';
break;
}
else if (look_for_semicolon && blev == 0)
@ -1145,7 +1165,7 @@ snarf_block (starting_file, starting_line)
}
else if (yyc == 0)
{
error_with_file_and_line (starting_file, starting_line,
error_with_file_and_line (t->filename, t->lineno,
"end of file read inside definition");
break;
}
@ -1160,37 +1180,24 @@ snarf_method (decl)
{
int starting_lineno = lineno;
const char *starting_filename = input_filename;
size_t len;
struct unparsed_text *meth;
/* Leave room for the header, then absorb the block. */
obstack_blank (&inline_text_obstack, sizeof (struct unparsed_text));
snarf_block (starting_filename, starting_lineno);
meth = alloc_unparsed_text (starting_filename, starting_lineno, decl,
(interface_unknown ? 1
: (interface_only ? 0 : 2)));
len = obstack_object_size (&inline_text_obstack);
meth = (struct unparsed_text *) obstack_finish (&inline_text_obstack);
snarf_block (meth);
/* Happens when we get two declarations of the same function in the
same scope. */
if (decl == void_type_node
|| (current_class_type && TYPE_REDEFINED (current_class_type)))
{
obstack_free (&inline_text_obstack, (char *)meth);
return;
}
meth->decl = decl;
meth->filename = starting_filename;
meth->lineno = starting_lineno;
meth->limit = (struct token *) ((char *)meth + len);
meth->interface = (interface_unknown ? 1 : (interface_only ? 0 : 2));
meth->next = 0;
return;
#ifdef SPEW_DEBUG
if (spew_debug)
fprintf (stderr, "\tsaved method of %d tokens from %s:%d\n",
meth->limit - (struct token *) (meth + 1),
meth->limit,
starting_filename, starting_lineno);
#endif
@ -1204,8 +1211,8 @@ snarf_method (decl)
pending_inlines_tail = meth;
}
/* Consume a no-commas expression - a default argument - and save it
on the inline_text_obstack. */
/* Consume a no-commas expression - a default argument - and return
a DEFAULT_ARG tree node. */
static tree
snarf_defarg ()
@ -1214,19 +1221,14 @@ snarf_defarg ()
const char *starting_filename = input_filename;
int yyc;
int plev = 0;
size_t point;
size_t len;
struct unparsed_text *buf;
tree arg;
obstack_blank (&inline_text_obstack, sizeof (struct unparsed_text));
buf = alloc_unparsed_text (starting_filename, starting_lineno, 0, 0);
for (;;)
{
point = obstack_object_size (&inline_text_obstack);
obstack_blank (&inline_text_obstack, sizeof (struct token));
yyc = add_token ((struct token *)
(obstack_base (&inline_text_obstack) + point));
yyc = next_token (space_for_token (buf));
if (plev <= 0 && (yyc == ')' || yyc == ','))
break;
@ -1243,24 +1245,13 @@ snarf_defarg ()
}
/* Unget the last token. */
push_token ((struct token *) (obstack_base (&inline_text_obstack) + point));
/* This is the documented way to shrink a growing obstack block. */
obstack_blank (&inline_text_obstack, - (int) sizeof (struct token));
push_token (remove_last_token (buf));
done:
len = obstack_object_size (&inline_text_obstack);
buf = (struct unparsed_text *) obstack_finish (&inline_text_obstack);
buf->decl = 0;
buf->filename = starting_filename;
buf->lineno = starting_lineno;
buf->limit = (struct token *) ((char *)buf + len);
buf->next = 0;
#ifdef SPEW_DEBUG
if (spew_debug)
fprintf (stderr, "\tsaved defarg of %d tokens from %s:%d\n",
buf->limit - (struct token *) (buf + 1),
buf->limit,
starting_filename, starting_lineno);
#endif
@ -1531,3 +1522,5 @@ yyerror (msgid)
else
error ("%s before `%s' token", string, NAME (last_token));
}
#include "gt-cp-spew.h"

View file

@ -710,7 +710,7 @@ unshare_base_binfos (binfo)
While all these live in the same table, they are completely independent,
and the hash code is computed differently for each of these. */
static htab_t list_hash_table;
static GTY ((param_is (union tree_node))) htab_t list_hash_table;
struct list_proxy
{
@ -1720,25 +1720,15 @@ cp_tree_equal (t1, t2)
return -1;
}
/* Build a wrapper around some pointer PTR so we can use it as a tree. */
/* Build a wrapper around a 'struct z_candidate' so we can use it as a
tree. */
tree
build_ptr_wrapper (ptr)
void *ptr;
build_zc_wrapper (ptr)
struct z_candidate *ptr;
{
tree t = make_node (WRAPPER);
WRAPPER_PTR (t) = ptr;
return t;
}
/* Build a wrapper around some integer I so we can use it as a tree. */
tree
build_int_wrapper (i)
int i;
{
tree t = make_node (WRAPPER);
WRAPPER_INT (t) = i;
WRAPPER_ZC (t) = ptr;
return t;
}
@ -2326,10 +2316,7 @@ void
init_tree ()
{
lang_statement_code_p = cp_statement_code_p;
list_hash_table = htab_create (31, list_hash, list_hash_eq, NULL);
ggc_add_root (&list_hash_table, 1,
sizeof (list_hash_table),
mark_tree_hashtable);
list_hash_table = htab_create_ggc (31, list_hash, list_hash_eq, NULL);
}
/* Called via walk_tree. If *TP points to a DECL_STMT for a local
@ -2557,3 +2544,20 @@ stabilize_expr (exp, initp)
*initp = init_expr;
return exp;
}
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
/* Complain that some language-specific thing hanging off a tree
node has been accessed improperly. */
void
lang_check_failed (file, line, function)
const char *file;
int line;
const char *function;
{
internal_error ("lang_* check: failed in %s, at %s:%d",
function, trim_filename (file), line);
}
#endif /* ENABLE_TREE_CHECKING */
#include "gt-cp-tree.h"

View file

@ -35,7 +35,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "toplev.h"
#include "output.h"
#include "ggc.h"
#include "obstack.h"
#include "hashtab.h"
#include "cselib.h"
@ -79,7 +78,7 @@ static void cselib_record_sets PARAMS ((rtx));
the locations of the entries with the rtx we are looking up. */
/* A table that enables us to look up elts by their value. */
static htab_t hash_table;
static GTY((param_is (cselib_val))) htab_t hash_table;
/* This is a global so we don't have to pass this through every function.
It is used in new_elt_loc_list to set SETTING_INSN. */
@ -101,7 +100,8 @@ static int n_useless_values;
/* This table maps from register number to values. It does not contain
pointers to cselib_val structures, but rather elt_lists. The purpose is
to be able to refer to the same register in different modes. */
static varray_type reg_values;
static GTY(()) varray_type reg_values;
static GTY((deletable (""))) varray_type reg_values_old;
#define REG_VALUES(I) VARRAY_ELT_LIST (reg_values, (I))
/* The largest number of hard regs used by any entry added to the
@ -110,22 +110,17 @@ static unsigned int max_value_regs;
/* Here the set of indices I with REG_VALUES(I) != 0 is saved. This is used
in clear_table() for fast emptying. */
static varray_type used_regs;
static GTY(()) varray_type used_regs;
static GTY((deletable (""))) varray_type used_regs_old;
/* We pass this to cselib_invalidate_mem to invalidate all of
memory for a non-const call instruction. */
static rtx callmem;
/* Memory for our structures is allocated from this obstack. */
static struct obstack cselib_obstack;
/* Used to quickly free all memory. */
static char *cselib_startobj;
static GTY(()) rtx callmem;
/* Caches for unused structures. */
static cselib_val *empty_vals;
static struct elt_list *empty_elt_lists;
static struct elt_loc_list *empty_elt_loc_lists;
static GTY((deletable (""))) cselib_val *empty_vals;
static GTY((deletable (""))) struct elt_list *empty_elt_lists;
static GTY((deletable (""))) struct elt_loc_list *empty_elt_loc_lists;
/* Set by discard_useless_locs if it deleted the last location of any
value. */
@ -145,8 +140,7 @@ new_elt_list (next, elt)
if (el)
empty_elt_lists = el->next;
else
el = (struct elt_list *) obstack_alloc (&cselib_obstack,
sizeof (struct elt_list));
el = (struct elt_list *) ggc_alloc (sizeof (struct elt_list));
el->next = next;
el->elt = elt;
return el;
@ -165,8 +159,7 @@ new_elt_loc_list (next, loc)
if (el)
empty_elt_loc_lists = el->next;
else
el = (struct elt_loc_list *) obstack_alloc (&cselib_obstack,
sizeof (struct elt_loc_list));
el = (struct elt_loc_list *) ggc_alloc (sizeof (struct elt_loc_list));
el->next = next;
el->loc = loc;
el->setting_insn = cselib_current_insn;
@ -236,11 +229,7 @@ clear_table (clear_all)
VARRAY_POP_ALL (used_regs);
htab_empty (hash_table);
obstack_free (&cselib_obstack, cselib_startobj);
empty_vals = 0;
empty_elt_lists = 0;
empty_elt_loc_lists = 0;
n_useless_values = 0;
next_unknown_value = 0;
@ -704,7 +693,7 @@ new_cselib_val (value, mode)
if (e)
empty_vals = e->u.next_free;
else
e = (cselib_val *) obstack_alloc (&cselib_obstack, sizeof (cselib_val));
e = (cselib_val *) ggc_alloc (sizeof (cselib_val));
if (value == 0)
abort ();
@ -1399,20 +1388,25 @@ cselib_update_varray_sizes ()
void
cselib_init ()
{
/* These are only created once. */
/* This is only created once. */
if (! callmem)
{
gcc_obstack_init (&cselib_obstack);
cselib_startobj = obstack_alloc (&cselib_obstack, 0);
callmem = gen_rtx_MEM (BLKmode, const0_rtx);
ggc_add_rtx_root (&callmem, 1);
}
callmem = gen_rtx_MEM (BLKmode, const0_rtx);
cselib_nregs = max_reg_num ();
VARRAY_ELT_LIST_INIT (reg_values, cselib_nregs, "reg_values");
VARRAY_UINT_INIT (used_regs, cselib_nregs, "used_regs");
hash_table = htab_create (31, get_value_hash, entry_and_rtx_equal_p, NULL);
if (reg_values_old != NULL && VARRAY_SIZE (reg_values_old) >= cselib_nregs)
{
reg_values = reg_values_old;
used_regs = used_regs_old;
VARRAY_CLEAR (reg_values);
VARRAY_CLEAR (used_regs);
}
else
{
VARRAY_ELT_LIST_INIT (reg_values, cselib_nregs, "reg_values");
VARRAY_UINT_INIT (used_regs, cselib_nregs, "used_regs");
}
hash_table = htab_create_ggc (31, get_value_hash, entry_and_rtx_equal_p,
NULL);
clear_table (1);
}
@ -1421,8 +1415,13 @@ cselib_init ()
void
cselib_finish ()
{
clear_table (0);
VARRAY_FREE (reg_values);
VARRAY_FREE (used_regs);
htab_delete (hash_table);
reg_values_old = reg_values;
reg_values = 0;
used_regs_old = used_regs;
used_regs = 0;
hash_table = 0;
n_useless_values = 0;
next_unknown_value = 0;
}
#include "gt-cselib.h"

View file

@ -20,17 +20,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
/* Describe a value. */
typedef struct cselib_val_struct
typedef struct cselib_val_struct GTY(())
{
/* The hash value. */
unsigned int value;
union
union cselib_val_u
{
/* A VALUE rtx that points back to this structure. */
rtx val_rtx;
rtx GTY ((tag ("1"))) val_rtx;
/* Used to keep a list of free cselib_val structures. */
struct cselib_val_struct *next_free;
} u;
struct cselib_val_struct * GTY ((skip (""))) next_free;
} GTY ((desc ("1"))) u;
/* All rtl expressions that hold this value at the current time during a
scan. */
@ -41,7 +41,7 @@ typedef struct cselib_val_struct
} cselib_val;
/* A list of rtl expressions that hold the same value. */
struct elt_loc_list
struct elt_loc_list GTY(())
{
/* Next element in the list. */
struct elt_loc_list *next;
@ -52,7 +52,7 @@ struct elt_loc_list
};
/* A list of cselib_val structures. */
struct elt_list
struct elt_list GTY(())
{
struct elt_list *next;
cselib_val *elt;

View file

@ -31,6 +31,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "tree.h"
#include "c-common.h"
#include "flags.h"
#include "ggc.h"
#include "varray.h"
#define MAX_SUBSCRIPTS 13
@ -81,7 +82,7 @@ enum complexity_type {ziv, strong_siv, weak_siv, weak_zero_siv,
for that variable. Alternately one can sequentially follow each
element of def_use_chain. */
typedef struct def_use
typedef struct def_use GTY(())
{
/* outermost loop */
tree outer_loop;
@ -106,7 +107,7 @@ typedef struct def_use
element of loop_chain and check outer_loop to get all loops
contained within a certain loop. */
typedef struct loop
typedef struct loop GTY(())
{
/* outermost loop containing this loop */
tree outer_loop;
@ -124,7 +125,7 @@ typedef struct loop
/* Pointed to by loop. One per induction variable. */
typedef struct induction
typedef struct induction GTY(())
{
/* our name */
const char *variable;
@ -140,7 +141,7 @@ typedef struct induction
/* Pointed to by def/use. One per dependence. */
typedef struct dependence
typedef struct dependence GTY(())
{
tree source;
tree destination;
@ -172,16 +173,16 @@ typedef struct subscript
static tree dest_to_remember;
/* Chain for def_use */
static varray_type def_use_chain;
static GTY ((param_is (def_use))) varray_type def_use_chain;
/* Chain for dependence */
static varray_type dep_chain;
static GTY ((param_is (dependence))) varray_type dep_chain;
/* Chain for loop */
static varray_type loop_chain;
static GTY ((param_is (loop))) varray_type loop_chain;
/* Chain for induction */
static varray_type induction_chain;
static GTY ((param_is (induction))) varray_type induction_chain;
void init_dependence_analysis PARAMS ((tree));
static void build_def_use PARAMS ((tree, enum def_use_type));
@ -227,8 +228,6 @@ void
init_dependence_analysis (exp)
tree exp;
{
def_use *du_ptr;
VARRAY_GENERIC_PTR_INIT (def_use_chain, 50, "def_use_chain");
VARRAY_GENERIC_PTR_INIT (dep_chain, 50, "dep_chain");
VARRAY_GENERIC_PTR_INIT (loop_chain, 50, "loop_chain");
@ -242,16 +241,9 @@ init_dependence_analysis (exp)
/* dump_node_dependence (&def_use_chain);*/
for (du_ptr = VARRAY_TOP (def_use_chain, generic);
VARRAY_POP (def_use_chain);
du_ptr = VARRAY_TOP (def_use_chain, generic))
{
free (du_ptr);
}
VARRAY_FREE (def_use_chain);
VARRAY_FREE (loop_chain);
VARRAY_FREE (induction_chain);
def_use_chain = 0;
loop_chain = 0;
induction_chain = 0;
}
/* Build ARRAY_REF def/use info 'def_use_chain' starting at EXP which is a def
@ -337,7 +329,8 @@ build_def_use (exp, du_type)
int i;
char null_string = '\0';
VARRAY_PUSH_GENERIC_PTR (def_use_chain, xmalloc (sizeof (def_use)));
VARRAY_PUSH_GENERIC_PTR (def_use_chain,
ggc_alloc (sizeof (def_use)));
du_ptr = VARRAY_GENERIC_PTR (def_use_chain, du_idx++);
du_ptr->type = du_type;
du_ptr->status = unseen;
@ -418,7 +411,7 @@ add_loop (loop_node, outer_loop, nloop)
{
loop *loop_ptr;
VARRAY_PUSH_GENERIC_PTR (loop_chain, xmalloc (sizeof (loop)));
VARRAY_PUSH_GENERIC_PTR (loop_chain, ggc_alloc (sizeof (loop)));
loop_ptr = VARRAY_TOP (loop_chain, generic);
loop_ptr->outer_loop = outer_loop;
loop_ptr->containing_loop = loop_node;
@ -502,7 +495,8 @@ find_induction_variable (init_node, cond_node, incr_node, loop_def)
if (!INDEX_LIMIT_CHECK (cond_node))
return 0;
VARRAY_PUSH_GENERIC_PTR (induction_chain, xmalloc (sizeof (induction)));
VARRAY_PUSH_GENERIC_PTR (induction_chain,
ggc_alloc (sizeof (induction)));
ind_ptr = VARRAY_TOP (induction_chain, generic);
loop_def->ind = ind_ptr;
ind_ptr->variable = IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND
@ -747,7 +741,7 @@ check_node_dependence (du)
if (! have_dependence)
continue;
VARRAY_PUSH_GENERIC_PTR (dep_chain, xmalloc (sizeof (dependence)));
VARRAY_PUSH_GENERIC_PTR (dep_chain, ggc_alloc (sizeof (dependence)));
dep_ptr = VARRAY_TOP (dep_chain, generic);
dep_ptr->source = use_ptr->expression;
dep_ptr->destination = def_ptr->expression;
@ -790,7 +784,8 @@ check_node_dependence (du)
/* Dummy for rtl interface */
dependence *dep_root_ptr;
VARRAY_PUSH_GENERIC_PTR (dep_chain, xmalloc (sizeof (dependence)));
VARRAY_PUSH_GENERIC_PTR (dep_chain,
ggc_alloc (sizeof (dependence)));
dep_root_ptr = VARRAY_TOP (dep_chain, generic);
dep_root_ptr->source = 0;
dep_root_ptr->destination = def_ptr->expression;
@ -1364,7 +1359,6 @@ dump_node_dependence (void)
if (i >= VARRAY_SIZE (seen))
dump_one_node (du_ptr, &seen);
}
VARRAY_FREE (seen);
}
#endif
@ -1463,5 +1457,7 @@ have_dependence_p (dest_rtx, src_rtx, direction, distance)
void
end_dependence_analysis ()
{
VARRAY_FREE (dep_chain);
dep_chain = 0;
}
#include "gt-dependence.h"

View file

@ -169,6 +169,7 @@ Additional tutorial information is linked to from
* Fragments:: Writing the @file{t-@var{target}} and @file{x-@var{host}} files.
* Collect2:: How @code{collect2} works; how it finds @code{ld}.
* Header Dirs:: Understanding the standard header file directories.
* Type Information:: GCC's memory management; generating type information.
* Funding:: How to help assure funding for free software.
* GNU Project:: The GNU Project and GNU/Linux.
@ -196,6 +197,7 @@ Additional tutorial information is linked to from
@include fragments.texi
@include collect2.texi
@include headerdirs.texi
@include gty.texi
@include funding.texi
@include gnu.texi

257
gcc/doc/gty.texi Normal file
View file

@ -0,0 +1,257 @@
@c Copyright (C) 2002
@c Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@node Type Information
@chapter Memory Management and Type Information
@cindex GGC
@findex GTY
GCC uses some fairly sophisticated memory management techniques, which
involve determining information about GCC's data structures from GCC's
source code and using this information to perform garbage collection.
A full C parser would be too overcomplicated for this task, so a limited
subset of C is interpreted and special markers are used to determine
what parts of the source to look at. The parser can also detect
simple typedefs of the form @code{typedef struct ID1 *ID2;} and
@code{typedef int ID3;}, and these don't need to be specially marked.
The two forms that do need to be marked are:
@verbatim
struct ID1 GTY(([options]))
{
[fields]
};
typedef struct ID2 GTY(([options]))
{
[fields]
} ID3;
@end verbatim
@menu
* GTY Options:: What goes inside a @code{GTY(())}.
* GGC Roots:: Making global variables GGC roots.
* Files:: How the generated files work.
@end menu
@node GTY Options
@section The Inside of a @code{GTY(())}
Sometimes the C code is not enough to fully describe the type structure.
Extra information can be provided by using more @code{GTY} markers.
These markers can be placed:
@itemize @bullet
@item
In a structure definition, before the open brace;
@item
In a global variable declaration, after the keyword @code{static} or
@code{extern}; and
@item
In a structure field definition, before the name of the field.
@end itemize
The format of a marker is
@verbatim
GTY (([name] ([param]), [name] ([param]) ...))
@end verbatim
The parameter is either a string or a type name.
When the parameter is a string, often it is a fragment of C code. Three
special escapes may be available:
@cindex % in GTY option
@table @code
@item %h
This expands to an expression that evaluates to the current structure.
@item %1
This expands to an expression that evaluates to the structure that
immediately contains the current structure.
@item %0
This expands to an expression that evaluates to the outermost structure
that contains the current structure.
@end table
The available options are:
@table @code
@findex length
@item length
There are two places the type machinery will need to be explicitly told
the length of an array. The first case is when a structure ends in a
variable-length array, like this:
@verbatim
struct rtvec_def GTY(()) {
int num_elem; /* number of elements */
rtx GTY ((length ("%h.num_elem"))) elem[1];
};
@end verbatim
In this case, the @code{length} option is used to override the specified
array length (which should usually be @code{1}). The parameter of the
option is a fragment of C code that calculates the length.
The second case is when a structure or a global variable contains a
pointer to an array, like this:
@verbatim
tree * GTY ((length ("%h.regno_pointer_align_length"))) regno_decl;
@end verbatim
In this case, @code{regno_decl} has been allocated by writing something like
@verbatim
x->regno_decl = ggc_alloc (x->regno_pointer_align_length * sizeof (tree));
@end verbatim
and the @code{length} provides the length of the field.
This second use of @code{length} also works on global variables, like:
@verbatim
static GTY((length ("reg_base_value_size"))) rtx *reg_base_value;
@end verbatim
@findex skip
@item skip
If @code{skip} is applied to a field, the type machinery will ignore it.
This is somewhat dangerous; the only safe use is in a union when one
field really isn't ever used.
@findex desc
@findex tag
@findex always
@item desc
@itemx tag
@itemx always
The type machinery needs to be told which field of a @code{union} is
currently active. This is done by giving each field a constant @code{tag}
value, and then specifying a discriminator using @code{desc}. For example,
@verbatim
struct tree_binding GTY(())
{
struct tree_common common;
union tree_binding_u {
tree GTY ((tag ("0"))) scope;
struct cp_binding_level * GTY ((tag ("1"))) level;
} GTY ((desc ("BINDING_HAS_LEVEL_P ((tree)&%0)"))) scope;
tree value;
};
@end verbatim
In the @code{desc} option, the ``current structure'' is the union that
it discriminates. Use @code{%1} to mean the structure containing it.
(There are no escapes available to the @code{tag} option, since it's
supposed to be a constant.)
You can use @code{always} to mean that this field is always used.
@findex param_is
@findex use_param
@item param_is
@itemx use_param
Sometimes it's convenient to define some data structure to work on
generic pointers (that is, @code{PTR}), and then use it with specific types.
@code{param_is} specifies the real type pointed to, and @code{use_param}
says where in the generic data structure that type should be put.
For instance, to have a @code{htab_t} that points to trees, one should write
@verbatim
htab_t GTY ((param_is (union tree_node))) ict;
@end verbatim
@findex deletable
@item deletable
@code{deletable}, when applied to a global variable, indicates that when
garbage collection runs, there's no need to mark anything pointed to
by this variable, it can just be set to @code{NULL} instead. This is used
to keep a list of free structures around for re-use.
@findex if_marked
@item if_marked
Suppose you want some kinds of object to be unique, and so you put them
in a hash table. If garbage collection marks the hash table, these
objects will never be freed, even if the last other reference to them
goes away. GGC has special handling to deal with this: if you use the
@code{if_marked} option on a global hash table, GGC will call the
routine whose name is the parameter to the option on each hash table
entry. If the routine returns nonzero, the hash table entry will
be marked as usual. If the routine returns zero, the hash table entry
will be deleted.
The routine @code{ggc_marked_p} can be used to determine if an element
has been marked already; in fact, the usual case is to use
@code{if_marked ("ggc_marked_p")}.
@findex maybe_undef
@item maybe_undef
When applied to a field, @code{maybe_undef} indicates that it's OK if
the structure that this fields points to is never defined, so long as
this field is always @code{NULL}. This is used to avoid requiring
backends to define certain optional structures. It doesn't work with
language frontends.
@findex special
@item special
The @code{special} option is used for those bizarre cases that are just
too hard to deal with otherwise. Don't use it for new code.
@end table
@node GGC Roots
@section Marking Roots for the Garbage Collector
@cindex roots, marking
@cindex marking roots
In addition to keeping track of types, the type machinery also locates
the global variables that the garbage collector starts at. There are
two syntaxes it accepts to indicate a root:
@enumerate
@item
@verb{|extern GTY (([options])) [type] ID;|}
@item
@verb{|static GTY (([options])) [type] ID;|}
@end enumerate
@node Files
@section Source Files Containing Type Information
@cindex generated files
@cindex files, generated
Whenever you add @code{GTY} markers to a new source file, there are three
things you need to do:
@enumerate
@item
You need to add the file to the list of source files the type machinery
scans. For a back-end file, this is done automatically. For a
front-end file, this is done by adding the filename to the
@code{gtfiles} variable defined in @file{config-lang.in}. For other
files, this is done by adding the filename to the @code{GTFILES} variable
in @file{Makefile.in}.
@item
You need to include the file that the type machinery will generate in
the source file you just changed. The file will be called
@file{gt-@var{path}.h} where @var{path} is the pathname from the
@file{gcc} directory with slashes replaced by @verb{|-|}. Don't forget
to mention this file as a dependency in the @file{Makefile}!
@item
Finally, you need to add a @file{Makefile} rule that will ensure this file
can be built. This is done by making it a dependency of @code{s-gtype},
like this:
@verbatim
gt-path.h : s-gtype ; @true
@end verbatim
@end enumerate
For language frontends, there is another file that needs to be included
somewhere. It will be called @file{gtype-@var{lang}.h}, where
@var{lang} is the name of the subdirectory the language is contained in.
It will need @file{Makefile} rules just like the other generated files.

View file

@ -824,11 +824,9 @@ structure contains a field called @code{machine} whose type is
to their own specific data.
If a target needs per-function specific data it should define the type
@code{struct machine_function} and also the macro
@code{INIT_EXPANDERS}. This macro should be used to initialize some or
all of the function pointers @code{init_machine_status},
@code{free_machine_status} and @code{mark_machine_status}. These
pointers are explained below.
@code{struct machine_function} and also the macro @code{INIT_EXPANDERS}.
This macro should be used to initialize the function pointer
@code{init_machine_status}. This pointer is explained below.
One typical use of per-function, target specific data is to create an
RTX to hold the register containing the function's return address. This
@ -864,19 +862,9 @@ specific initialization of the @code{struct function} structure. It is
intended that this would be used to initialize the @code{machine} of
that structure.
@findex free_machine_status
@item free_machine_status
This is a @code{void (*)(struct function *)} function pointer. If this
pointer is non-@code{NULL} it will be called once per function, after the
function has been compiled, in order to allow any memory allocated
during the @code{init_machine_status} function call to be freed.
@findex mark_machine_status
@item mark_machine_status
This is a @code{void (*)(struct function *)} function pointer. If this
pointer is non-@code{NULL} it will be called once per function in order to mark
any data items in the @code{struct machine_function} structure which
need garbage collection.
@code{struct machine_function} structures are expected to be freed by GC.
Generally, any memory that they reference must be allocated by using
@code{ggc_alloc}, including the structure itself.
@end table

View file

@ -704,7 +704,7 @@ mark_indirect_pool_entry (node, data)
splay_tree_node node;
void* data ATTRIBUTE_UNUSED;
{
ggc_mark_nonnull_tree ((tree) node->value);
ggc_mark_tree ((tree) node->value);
return 0;
}

View file

@ -134,6 +134,22 @@ default_eh_frame_section ()
#endif
}
/* Array of RTXes referenced by the debugging information, which therefore
must be kept around forever. */
static GTY(()) varray_type used_rtx_varray;
/* A pointer to the base of a list of incomplete types which might be
completed at some later time. incomplete_types_list needs to be a VARRAY
because we want to tell the garbage collector about it. */
static GTY(()) varray_type incomplete_types;
/* A pointer to the base of a table of references to declaration
scopes. This table is a display which tracks the nesting
of declaration scopes at the current scope and containing
scopes. This table is used to find the proper place to
define type declaration DIE's. */
static GTY(()) varray_type decl_scope_table;
#if defined (DWARF2_DEBUGGING_INFO) || defined (DWARF2_UNWIND_INFO)
/* How to start an assembler comment. */
@ -3352,13 +3368,6 @@ static unsigned decl_die_table_in_use;
decl_die_table. */
#define DECL_DIE_TABLE_INCREMENT 256
/* A pointer to the base of a table of references to declaration
scopes. This table is a display which tracks the nesting
of declaration scopes at the current scope and containing
scopes. This table is used to find the proper place to
define type declaration DIE's. */
varray_type decl_scope_table;
/* A pointer to the base of a list of references to DIE's that
are uniquely identified by their tag, presence/absence of
children DIE's, and list of attribute/value pairs. */
@ -3441,21 +3450,12 @@ static unsigned ranges_table_in_use;
/* Whether we have location lists that need outputting */
static unsigned have_location_lists;
/* A pointer to the base of a list of incomplete types which might be
completed at some later time. incomplete_types_list needs to be a VARRAY
because we want to tell the garbage collector about it. */
varray_type incomplete_types;
/* Record whether the function being analyzed contains inlined functions. */
static int current_function_has_inlines;
#if 0 && defined (MIPS_DEBUGGING_INFO)
static int comp_unit_has_inlines;
#endif
/* Array of RTXes referenced by the debugging information, which therefore
must be kept around forever. This is a GC root. */
static varray_type used_rtx_varray;
/* Forward declarations for functions defined in this file. */
static int is_pseudo_reg PARAMS ((rtx));
@ -5123,7 +5123,7 @@ static inline dw_die_ref
lookup_type_die (type)
tree type;
{
return (dw_die_ref) TYPE_SYMTAB_POINTER (type);
return TYPE_SYMTAB_DIE (type);
}
/* Equate a DIE to a given type specifier. */
@ -5133,7 +5133,7 @@ equate_type_number_to_die (type, type_die)
tree type;
dw_die_ref type_die;
{
TYPE_SYMTAB_POINTER (type) = (char *) type_die;
TYPE_SYMTAB_DIE (type) = type_die;
}
/* Return the DIE associated with a given declaration. */
@ -12034,7 +12034,6 @@ dwarf2out_init (main_input_filename)
/* Allocate the initial hunk of the decl_scope_table. */
VARRAY_TREE_INIT (decl_scope_table, 256, "decl_scope_table");
ggc_add_tree_varray_root (&decl_scope_table, 1);
/* Allocate the initial hunk of the abbrev_die_table. */
abbrev_die_table
@ -12061,10 +12060,8 @@ dwarf2out_init (main_input_filename)
comp_unit_die = gen_compile_unit_die (main_input_filename);
VARRAY_TREE_INIT (incomplete_types, 64, "incomplete_types");
ggc_add_tree_varray_root (&incomplete_types, 1);
VARRAY_RTX_INIT (used_rtx_varray, 32, "used_rtx_varray");
ggc_add_rtx_varray_root (&used_rtx_varray, 1);
ggc_add_root (&limbo_die_list, 1, 1, mark_limbo_die_list);
@ -12322,4 +12319,11 @@ dwarf2out_finish (input_filename)
if (debug_str_hash)
ht_forall (debug_str_hash, output_indirect_string, NULL);
}
#endif /* DWARF2_DEBUGGING_INFO || DWARF2_UNWIND_INFO */
#else
/* This should never be used, but its address is needed for comparisons. */
const struct gcc_debug_hooks dwarf2_debug_hooks;
#endif /* DWARF2_DEBUGGING_INFO */
#include "gt-dwarf2out.h"

View file

@ -143,13 +143,16 @@ rtx const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1];
/* A hash table storing CONST_INTs whose absolute value is greater
than MAX_SAVED_CONST_INT. */
static htab_t const_int_htab;
static GTY ((if_marked ("ggc_marked_p"), param_is (struct rtx_def)))
htab_t const_int_htab;
/* A hash table storing memory attribute structures. */
static htab_t mem_attrs_htab;
static GTY ((if_marked ("ggc_marked_p"), param_is (struct mem_attrs)))
htab_t mem_attrs_htab;
/* A hash table storing all CONST_DOUBLEs. */
static htab_t const_double_htab;
static GTY ((if_marked ("ggc_marked_p"), param_is (struct rtx_def)))
htab_t const_double_htab;
#define first_insn (cfun->emit->x_first_insn)
#define last_insn (cfun->emit->x_last_insn)
@ -161,7 +164,6 @@ static htab_t const_double_htab;
static rtx make_jump_insn_raw PARAMS ((rtx));
static rtx make_call_insn_raw PARAMS ((rtx));
static rtx find_line_note PARAMS ((rtx));
static void mark_sequence_stack PARAMS ((struct sequence_stack *));
static rtx change_address_1 PARAMS ((rtx, enum machine_mode, rtx,
int));
static void unshare_all_rtl_1 PARAMS ((rtx));
@ -178,7 +180,6 @@ static rtx lookup_const_double PARAMS ((rtx));
static hashval_t mem_attrs_htab_hash PARAMS ((const void *));
static int mem_attrs_htab_eq PARAMS ((const void *,
const void *));
static void mem_attrs_mark PARAMS ((const void *));
static mem_attrs *get_mem_attrs PARAMS ((HOST_WIDE_INT, tree, rtx,
rtx, unsigned int,
enum machine_mode));
@ -273,25 +274,6 @@ mem_attrs_htab_eq (x, y)
&& p->size == q->size && p->align == q->align);
}
/* This routine is called when we determine that we need a mem_attrs entry.
It marks the associated decl and RTL as being used, if present. */
static void
mem_attrs_mark (x)
const void *x;
{
mem_attrs *p = (mem_attrs *) x;
if (p->expr)
ggc_mark_tree (p->expr);
if (p->offset)
ggc_mark_rtx (p->offset);
if (p->size)
ggc_mark_rtx (p->size);
}
/* Allocate a new mem_attrs structure and insert it into the hash table if
one identical to it is not already in the table. We are doing this for
MEM of mode MODE. */
@ -811,17 +793,17 @@ gen_reg_rtx (mode)
rtx *new1;
tree *new2;
new = xrealloc (f->emit->regno_pointer_align, old_size * 2);
new = ggc_realloc (f->emit->regno_pointer_align, old_size * 2);
memset (new + old_size, 0, old_size);
f->emit->regno_pointer_align = (unsigned char *) new;
new1 = (rtx *) xrealloc (f->emit->x_regno_reg_rtx,
old_size * 2 * sizeof (rtx));
new1 = (rtx *) ggc_realloc (f->emit->x_regno_reg_rtx,
old_size * 2 * sizeof (rtx));
memset (new1 + old_size, 0, old_size * sizeof (rtx));
regno_reg_rtx = new1;
new2 = (tree *) xrealloc (f->emit->regno_decl,
old_size * 2 * sizeof (tree));
new2 = (tree *) ggc_realloc (f->emit->regno_decl,
old_size * 2 * sizeof (tree));
memset (new2 + old_size, 0, old_size * sizeof (tree));
f->emit->regno_decl = new2;
@ -2237,21 +2219,6 @@ restore_emit_status (p)
{
last_label_num = 0;
}
/* Clear out all parts of the state in F that can safely be discarded
after the function has been compiled, to let garbage collection
reclaim the memory. */
void
free_emit_status (f)
struct function *f;
{
free (f->emit->x_regno_reg_rtx);
free (f->emit->regno_pointer_align);
free (f->emit->regno_decl);
free (f->emit);
f->emit = NULL;
}
/* Go through all the RTL insn bodies and copy any invalid shared
structure. This routine should only be called once. */
@ -4436,6 +4403,9 @@ emit (x)
abort ();
}
/* Space for free sequence stack entries. */
static GTY ((deletable (""))) struct sequence_stack *free_sequence_stack;
/* Begin emitting insns to a sequence which can be packaged in an
RTL_EXPR. If this sequence will contain something that might cause
the compiler to pop arguments to function calls (because those
@ -4449,7 +4419,13 @@ start_sequence ()
{
struct sequence_stack *tem;
tem = (struct sequence_stack *) xmalloc (sizeof (struct sequence_stack));
if (free_sequence_stack != NULL)
{
tem = free_sequence_stack;
free_sequence_stack = tem->next;
}
else
tem = (struct sequence_stack *) ggc_alloc (sizeof (struct sequence_stack));
tem->next = seq_stack;
tem->first = first_insn;
@ -4566,7 +4542,9 @@ end_sequence ()
seq_rtl_expr = tem->sequence_rtl_expr;
seq_stack = tem->next;
free (tem);
memset (tem, 0, sizeof (*tem));
tem->next = free_sequence_stack;
free_sequence_stack = tem;
}
/* This works like end_sequence, but records the old sequence in FIRST
@ -4824,7 +4802,7 @@ init_emit ()
{
struct function *f = cfun;
f->emit = (struct emit_status *) xmalloc (sizeof (struct emit_status));
f->emit = (struct emit_status *) ggc_alloc (sizeof (struct emit_status));
first_insn = NULL;
last_insn = NULL;
seq_rtl_expr = NULL;
@ -4841,14 +4819,16 @@ init_emit ()
f->emit->regno_pointer_align_length = LAST_VIRTUAL_REGISTER + 101;
f->emit->regno_pointer_align
= (unsigned char *) xcalloc (f->emit->regno_pointer_align_length,
sizeof (unsigned char));
= (unsigned char *) ggc_alloc_cleared (f->emit->regno_pointer_align_length
* sizeof (unsigned char));
regno_reg_rtx
= (rtx *) xcalloc (f->emit->regno_pointer_align_length, sizeof (rtx));
= (rtx *) ggc_alloc_cleared (f->emit->regno_pointer_align_length
* sizeof (rtx));
f->emit->regno_decl
= (tree *) xcalloc (f->emit->regno_pointer_align_length, sizeof (tree));
= (tree *) ggc_alloc_cleared (f->emit->regno_pointer_align_length
* sizeof (tree));
/* Put copies of all the virtual register rtx into regno_reg_rtx. */
init_virtual_regs (f->emit);
@ -4884,46 +4864,6 @@ init_emit ()
#endif
}
/* Mark SS for GC. */
static void
mark_sequence_stack (ss)
struct sequence_stack *ss;
{
while (ss)
{
ggc_mark_rtx (ss->first);
ggc_mark_tree (ss->sequence_rtl_expr);
ss = ss->next;
}
}
/* Mark ES for GC. */
void
mark_emit_status (es)
struct emit_status *es;
{
rtx *r;
tree *t;
int i;
if (es == 0)
return;
for (i = es->regno_pointer_align_length, r = es->x_regno_reg_rtx,
t = es->regno_decl;
i > 0; --i, ++r, ++t)
{
ggc_mark_rtx (*r);
ggc_mark_tree (*t);
}
mark_sequence_stack (es->sequence_stack);
ggc_mark_tree (es->sequence_rtl_expr);
ggc_mark_rtx (es->x_first_insn);
}
/* Generate the constant 0. */
static rtx
@ -4966,15 +4906,12 @@ init_emit_once (line_numbers)
tables. */
const_int_htab = htab_create (37, const_int_htab_hash,
const_int_htab_eq, NULL);
ggc_add_deletable_htab (const_int_htab, 0, 0);
const_double_htab = htab_create (37, const_double_htab_hash,
const_double_htab_eq, NULL);
ggc_add_deletable_htab (const_double_htab, 0, 0);
mem_attrs_htab = htab_create (37, mem_attrs_htab_hash,
mem_attrs_htab_eq, NULL);
ggc_add_deletable_htab (mem_attrs_htab, 0, mem_attrs_mark);
no_line_numbers = ! line_numbers;
@ -5029,9 +4966,6 @@ init_emit_once (line_numbers)
gen_raw_REG (Pmode, VIRTUAL_OUTGOING_ARGS_REGNUM);
virtual_cfa_rtx = gen_raw_REG (Pmode, VIRTUAL_CFA_REGNUM);
/* These rtx must be roots if GC is enabled. */
ggc_add_rtx_root (global_rtl, GR_MAX);
#ifdef INIT_EXPANDERS
/* This is to initialize {init|mark|free}_machine_status before the first
call to push_function_context_to. This is needed by the Chill front
@ -5047,7 +4981,6 @@ init_emit_once (line_numbers)
for (i = - MAX_SAVED_CONST_INT; i <= MAX_SAVED_CONST_INT; i++)
const_int_rtx[i + MAX_SAVED_CONST_INT] =
gen_rtx_raw_CONST_INT (VOIDmode, i);
ggc_add_rtx_root (const_int_rtx, 2 * MAX_SAVED_CONST_INT + 1);
if (STORE_FLAG_VALUE >= - MAX_SAVED_CONST_INT
&& STORE_FLAG_VALUE <= MAX_SAVED_CONST_INT)
@ -5100,12 +5033,6 @@ init_emit_once (line_numbers)
if (STORE_FLAG_VALUE == 1)
const_tiny_rtx[1][(int) BImode] = const1_rtx;
/* For bounded pointers, `&const_tiny_rtx[0][0]' is not the same as
`(rtx *) const_tiny_rtx'. The former has bounds that only cover
`const_tiny_rtx[0]', whereas the latter has bounds that cover all. */
ggc_add_rtx_root ((rtx *) const_tiny_rtx, sizeof const_tiny_rtx / sizeof (rtx));
ggc_add_rtx_root (&const_true_rtx, 1);
#ifdef RETURN_ADDRESS_POINTER_REGNUM
return_address_pointer_rtx
= gen_raw_REG (Pmode, RETURN_ADDRESS_POINTER_REGNUM);
@ -5152,13 +5079,6 @@ init_emit_once (line_numbers)
if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM)
pic_offset_table_rtx = gen_raw_REG (Pmode, PIC_OFFSET_TABLE_REGNUM);
ggc_add_rtx_root (&pic_offset_table_rtx, 1);
ggc_add_rtx_root (&struct_value_rtx, 1);
ggc_add_rtx_root (&struct_value_incoming_rtx, 1);
ggc_add_rtx_root (&static_chain_rtx, 1);
ggc_add_rtx_root (&static_chain_incoming_rtx, 1);
ggc_add_rtx_root (&return_address_pointer_rtx, 1);
}
/* Query and clear/ restore no_line_numbers. This is used by the
@ -5249,3 +5169,5 @@ emit_copy_of_insn_after (insn, after)
}
return new;
}
#include "gt-emit-rtl.h"

Some files were not shown because too many files have changed in this diff Show more