diff options
author | Olatunji Ruwase <tjruwase@google.com> | 2009-07-20 19:35:25 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2009-07-20 19:35:25 +0000 |
commit | d48e9ceac992612378241b3917d48cf434412a04 (patch) | |
tree | f498012ed27ad5899f4f7b0a7afd40e9e4874bf8 /gcc | |
parent | 9c8e65c30f22cfa6556f9431c35ec326a8088854 (diff) | |
download | gcc-d48e9ceac992612378241b3917d48cf434412a04.zip gcc-d48e9ceac992612378241b3917d48cf434412a04.tar.gz gcc-d48e9ceac992612378241b3917d48cf434412a04.tar.bz2 |
cgraph.h (constant_pool_htab): New function.
* cgraph.h (constant_pool_htab): New function.
(constant_descriptor_tree): Move from varasm.c.
* varasm.c (constant_pool_htab): New function.
(constant_descriptor_tree): Move to cgraph.h.
From-SVN: r149834
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cgraph.h | 19 | ||||
-rw-r--r-- | gcc/varasm.c | 24 |
3 files changed, 34 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 43ea2b7..da82beb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2009-07-20 Olatunji Ruwase <tjruwase@google.com> + + * cgraph.h (constant_pool_htab): New function. + (constant_descriptor_tree): Move from varasm.c. + * varasm.c (constant_pool_htab): New function. + (constant_descriptor_tree): Move to cgraph.h. + 2009-07-20 Olatunji Ruwase <tjruwase@google.com> * toplev.c: Invoke FINISH_UNIT callbacks before call to diff --git a/gcc/cgraph.h b/gcc/cgraph.h index a05541d..3e19520 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -606,5 +606,24 @@ cgraph_node_set_size (cgraph_node_set set) return htab_elements (set->hashtab); } +/* Uniquize all constants that appear in memory. + Each constant in memory thus far output is recorded + in `const_desc_table'. */ + +struct GTY(()) constant_descriptor_tree { + /* A MEM for the constant. */ + rtx rtl; + + /* The value of the constant. */ + tree value; + + /* Hash of value. Computing the hash from value each time + hashfn is called can't work properly, as that means recursive + use of the hash table during hash table expansion. */ + hashval_t hash; +}; + +/* Constant pool accessor function. */ +htab_t constant_pool_htab (void); #endif /* GCC_CGRAPH_H */ diff --git a/gcc/varasm.c b/gcc/varasm.c index 729cc07..2a8fb11 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -2782,22 +2782,6 @@ decode_addr_const (tree exp, struct addr_const *value) value->offset = offset; } -/* Uniquize all constants that appear in memory. - Each constant in memory thus far output is recorded - in `const_desc_table'. */ - -struct GTY(()) constant_descriptor_tree { - /* A MEM for the constant. */ - rtx rtl; - - /* The value of the constant. */ - tree value; - - /* Hash of value. Computing the hash from value each time - hashfn is called can't work properly, as that means recursive - use of the hash table during hash table expansion. */ - hashval_t hash; -}; static GTY((param_is (struct constant_descriptor_tree))) htab_t const_desc_htab; @@ -2805,6 +2789,14 @@ static GTY((param_is (struct constant_descriptor_tree))) static struct constant_descriptor_tree * build_constant_desc (tree); static void maybe_output_constant_def_contents (struct constant_descriptor_tree *, int); +/* Constant pool accessor function. */ + +htab_t +constant_pool_htab (void) +{ + return const_desc_htab; +} + /* Compute a hash code for a constant expression. */ static hashval_t |