diff options
author | lauras <lauras@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-02 16:37:28 +0000 |
---|---|---|
committer | lauras <lauras@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-02 16:37:28 +0000 |
commit | f194cdb5c2152d9e90a698b080a3c8a26c045332 (patch) | |
tree | 1548c871457714606f49c3800159d9d9a995f937 /gcc/varasm.c | |
parent | 48eb063e56e4ae5c089b53b6b55b599bf864fb87 (diff) | |
download | gcc-f194cdb5c2152d9e90a698b080a3c8a26c045332.tar.gz |
2011-06-02 Laurynas Biveinis <laurynas.biveinis@gmail.com>gc-improv
* varasm.c (make_decl_rtl): Allocate DECL_RTL in the permanent RTL
memory.
* rtl.c: (_obstack_allocated_p): Declare.
(allocated_in_function_mem_p): New.
(need_copy_p): New.
(copy_rtx): Re-enable sharing of CONST_VECTOR rtxes. Use
need_copy_p to decide on copying vs. sharing of rtxes.
* function.c (reinit_struct_function): New.
(set_cfun, prepare_function_start): Call it.
* config/i386/i386.c (ix86_expand_split_stack_prologue): Allocate
split_stack_fn in the permanent RTL memory.
(ix86_expand_split_stack_prologue): Allocate split_stack_fn_large
in the permanent RTL memory.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gc-improv@174568 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 032885ece9d..b3d55a5e155 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1238,6 +1238,9 @@ make_decl_rtl (tree decl) "optimization may eliminate reads and/or " "writes to register variables"); + if (TREE_STATIC (decl)) + use_rtl_permanent_mem (); + /* If the user specified one of the eliminables registers here, e.g., FRAME_POINTER_REGNUM, we don't want to get this variable confused with that register and be eliminated. This usage is @@ -1248,6 +1251,9 @@ make_decl_rtl (tree decl) REG_USERVAR_P (DECL_RTL (decl)) = 1; if (TREE_STATIC (decl)) + use_rtl_function_mem (); + + if (TREE_STATIC (decl)) { /* Make this register global, so not usable for anything else. */ |