aboutsummaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-04-02 02:48:24 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-04-02 02:48:24 +0000
commit8dd2076d8ab463ce4342ad1e3ee8b31238ef53a8 (patch)
tree6ba434436ff1cc4b22ffc4daf4fd6545004a3284 /gcc/emit-rtl.c
parent07aa0b04f2ef60131900c2ea350d0d78e028acad (diff)
downloadgcc-8dd2076d8ab463ce4342ad1e3ee8b31238ef53a8.zip
gcc-8dd2076d8ab463ce4342ad1e3ee8b31238ef53a8.tar.gz
gcc-8dd2076d8ab463ce4342ad1e3ee8b31238ef53a8.tar.bz2
emit-rtl.c (gen_rtx_CONST_INT): Create cached CONST_INTs on the permanent obstack.
* emit-rtl.c (gen_rtx_CONST_INT): Create cached CONST_INTs on the permanent obstack. From-SVN: r32861
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 246805c..b67e9f1 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -253,7 +253,16 @@ gen_rtx_CONST_INT (mode, arg)
(hashval_t) arg,
/*insert=*/1);
if (!*slot)
- *slot = gen_rtx_raw_CONST_INT (VOIDmode, arg);
+ {
+ if (!ggc_p)
+ {
+ push_obstacks_nochange ();
+ end_temporary_allocation ();
+ }
+ *slot = gen_rtx_raw_CONST_INT (VOIDmode, arg);
+ if (!ggc_p)
+ pop_obstacks ();
+ }
return (rtx) *slot;
}