diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1996-02-13 14:43:08 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1996-02-13 14:43:08 -0800 |
commit | f6135b207a02f8daa8653e4b0a91ed5156041494 (patch) | |
tree | 38811c742e1c32a833d3411154b21eefd84c2055 /gcc/integrate.c | |
parent | 53ac8a7b367c106d3e48f48a6f3a922e091674c5 (diff) | |
download | gcc-f6135b207a02f8daa8653e4b0a91ed5156041494.tar.gz |
(save_constants_in_decl_trees): New function.
(save_for_inline_copying, save_for_inline_nocopy): Call it.
From-SVN: r11263
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r-- | gcc/integrate.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c index 01644b5ce99..4ecbfb27ea4 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -67,6 +67,7 @@ static void note_modified_parmregs PROTO((rtx, rtx)); static rtx copy_for_inline PROTO((rtx)); static void integrate_parm_decls PROTO((tree, struct inline_remap *, rtvec)); static void integrate_decl_tree PROTO((tree, int, struct inline_remap *)); +static void save_constants_in_decl_trees PROTO ((tree)); static void subst_constants PROTO((rtx *, rtx, struct inline_remap *)); static void restore_constants PROTO((rtx *)); static void set_block_origin_self PROTO((tree)); @@ -430,6 +431,10 @@ save_for_inline_copying (fndecl) save_constants (®_NOTES (insn)); } + /* Also scan all decls, and replace any constant pool references with the + actual constant. */ + save_constants_in_decl_trees (DECL_INITIAL (fndecl)); + /* Clear out the constant pool so that we can recreate it with the copied constants below. */ init_const_rtx_hash_table (); @@ -790,6 +795,10 @@ save_for_inline_nocopy (fndecl) } } + /* Also scan all decls, and replace any constant pool references with the + actual constant. */ + save_constants_in_decl_trees (DECL_INITIAL (fndecl)); + /* We have now allocated all that needs to be allocated permanently on the rtx obstack. Set our high-water mark, so that we can free the rest of this when the time comes. */ @@ -2031,6 +2040,23 @@ integrate_decl_tree (let, level, map) } } } + +/* Given a BLOCK node LET, search for all DECL_RTL fields, and pass them + through save_constants. */ + +static void +save_constants_in_decl_trees (let) + tree let; +{ + tree t; + + for (t = BLOCK_VARS (let); t; t = TREE_CHAIN (t)) + if (DECL_RTL (t) != 0) + save_constants (&DECL_RTL (t)); + + for (t = BLOCK_SUBBLOCKS (let); t; t = TREE_CHAIN (t)) + save_constants_in_decl_trees (t); +} /* Create a new copy of an rtx. Recursively copies the operands of the rtx, |