Makefile.in (cgraph.o): Depend on gt-cgraph.h and varray.h.

* Makefile.in (cgraph.o): Depend on gt-cgraph.h and varray.h.
	* gt-cgraph.h: New GC file.
	* cgraph.c (known_fns): New static variable.
	(cgraph_node): Add the decl into varray.

From-SVN: r63998
This commit is contained in:
Jan Hubicka 2003-03-08 19:24:22 +01:00 committed by Jan Hubicka
parent 73ba39fc86
commit 988d165386
3 changed files with 28 additions and 4 deletions

View File

@ -1,3 +1,10 @@
Sat Mar 8 19:22:30 CET 2003 Jan Hubicka <jh@suse.cz>
* Makefile.in (cgraph.o): Depend on gt-cgraph.h and varray.h.
* gt-cgraph.h: New GC file.
* cgraph.c (known_fns): New static variable.
(cgraph_node): Add the decl into varray.
2003-03-08 Hans-Peter Nilsson <hp@bitrange.com>
* config/mmix/mmix.md ("*movcc_expanded"): Add missing alternatives.

View File

@ -1539,7 +1539,7 @@ simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RT
$(REGS_H) hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \
output.h function.h $(GGC_H) $(OBSTACK_H) $(TM_P_H) $(TREE_H) $(TARGET_H)
cgraph.o : cgraph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
langhooks.h tree-inline.h toplev.h flags.h ggc.h $(TARGET_H) cgraph.h
langhooks.h tree-inline.h toplev.h flags.h ggc.h $(TARGET_H) cgraph.h gt-cgraph.h
cgraphunit.o : cgraphunit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
langhooks.h tree-inline.h toplev.h flags.h ggc.h $(TARGET_H) cgraph.h
cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
@ -1929,7 +1929,7 @@ GTFILES = $(srcdir)/location.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
$(srcdir)/varray.h $(srcdir)/ssa.h $(srcdir)/insn-addr.h $(srcdir)/cselib.h \
$(srcdir)/basic-block.h $(srcdir)/location.h \
$(srcdir)/c-common.h $(srcdir)/c-tree.h \
$(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c \
$(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
$(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
$(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
$(srcdir)/fold-const.c $(srcdir)/function.c \
@ -1946,7 +1946,7 @@ GTFILES_FILES_FILES = @all_gtfiles_files_files@
GTFILES_LANG_DIR_NAMES = @subdirs@
GTFILES_SRCDIR = @srcdir@
gtype-desc.h gtype-desc.c gt-except.h gt-function.h : s-gtype; @true
gt-cgraph.h 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

View File

@ -33,6 +33,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "debug.h"
#include "target.h"
#include "cgraph.h"
#include "varray.h"
/* The known declarations must not get garbage collected. Callgraph
datastructures should not get saved via PCH code since this would
make it difficult to extend into intra-module optimizer later. So
we store only the references into the array to prevent gabrage
collector from deleting live data. */
static GTY(()) varray_type known_fns;
/* Hash table used to convert declarations into nodes. */
static htab_t cgraph_hash = 0;
@ -82,8 +90,14 @@ cgraph_node (decl)
struct cgraph_node *node;
struct cgraph_node **slot;
if (TREE_CODE (decl) != FUNCTION_DECL)
abort ();
if (!cgraph_hash)
cgraph_hash = htab_create (10, hash_node, eq_node, NULL);
{
cgraph_hash = htab_create (10, hash_node, eq_node, NULL);
VARRAY_TREE_INIT (known_fns, 32, "known_fns");
}
slot =
(struct cgraph_node **) htab_find_slot_with_hash (cgraph_hash, decl,
@ -107,6 +121,7 @@ cgraph_node (decl)
node->next_nested = node->origin->nested;
node->origin->nested = node;
}
VARRAY_PUSH_TREE (known_fns, decl);
return node;
}
@ -290,3 +305,5 @@ dump_cgraph (f)
fprintf (f, "\n");
}
}
#include "gt-cgraph.h"