aboutsummaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-04-10 11:51:53 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-04-10 07:51:53 -0400
commit29105cea6a1c86b7fcaa96cb78a6d948b32564be (patch)
tree281a0004acf40b6d9b37c62c3a00afcb7ea17725 /gcc/emit-rtl.c
parent7156dead87434b51b11f4c804bb0e75d4e55812f (diff)
downloadgcc-29105cea6a1c86b7fcaa96cb78a6d948b32564be.zip
gcc-29105cea6a1c86b7fcaa96cb78a6d948b32564be.tar.gz
gcc-29105cea6a1c86b7fcaa96cb78a6d948b32564be.tar.bz2
expmed.c (init_expmed): Don't free objects we make.
* expmed.c (init_expmed): Don't free objects we make. * emit-rtl.c (gen_rtx_CONST_INT, init_emit_once): Minor cleanups. From-SVN: r33057
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index feead76..e697d55 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -248,27 +248,26 @@ gen_rtx_CONST_INT (mode, arg)
#endif
/* Look up the CONST_INT in the hash table. */
- slot = htab_find_slot_with_hash (const_int_htab,
- &arg,
- (hashval_t) arg,
- /*insert=*/1);
- if (!*slot)
+ slot = htab_find_slot_with_hash (const_int_htab, &arg, (hashval_t) arg, 1);
+ if (*slot == 0)
{
if (!ggc_p)
{
push_obstacks_nochange ();
end_temporary_allocation ();
+ *slot = gen_rtx_raw_CONST_INT (VOIDmode, arg);
+ pop_obstacks ();
}
- *slot = gen_rtx_raw_CONST_INT (VOIDmode, arg);
- if (!ggc_p)
- pop_obstacks ();
+ else
+ *slot = gen_rtx_raw_CONST_INT (VOIDmode, arg);
}
return (rtx) *slot;
}
-/* CONST_DOUBLEs needs special handling because its length is known
+/* CONST_DOUBLEs needs special handling because their length is known
only at run-time. */
+
rtx
gen_rtx_CONST_DOUBLE (mode, arg0, arg1, arg2)
enum machine_mode mode;
@@ -4157,10 +4156,8 @@ init_emit_once (line_numbers)
ggc_add_rtx_root (&return_address_pointer_rtx, 1);
/* Initialize the CONST_INT hash table. */
- const_int_htab = htab_create (37,
- const_int_htab_hash,
- const_int_htab_eq,
- NULL);
+ const_int_htab = htab_create (37, const_int_htab_hash,
+ const_int_htab_eq, NULL);
ggc_add_root (&const_int_htab, 1, sizeof (const_int_htab),
rtx_htab_mark);
}