From 8dd2076d8ab463ce4342ad1e3ee8b31238ef53a8 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Sun, 2 Apr 2000 02:48:24 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/emit-rtl.c | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3fb581dbed6..1600e4f18f7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-04-01 Mark Mitchell + + * emit-rtl.c (gen_rtx_CONST_INT): Create cached CONST_INTs on the + permanent obstack. + 2000-04-01 Zack Weinberg * cpplib.c: Include symcat.h. Add 'origin' field to struct diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 246805c78a0..b67e9f131a7 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; }