Commit 29105cea by Richard Kenner Committed by Richard Kenner

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
parent 7156dead
Mon Apr 10 07:21:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Mon Apr 10 07:21:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expmed.c (init_expmed): Don't free objects we make.
* emit-rtl.c (gen_rtx_CONST_INT, init_emit_once): Minor cleanups.
* expr.c (get_inner_reference): Correct some WITH_RECORD_EXPR cases. * expr.c (get_inner_reference): Correct some WITH_RECORD_EXPR cases.
(expand_expr, case CONVERT_EXPR): Pass proper alignment to store_field. (expand_expr, case CONVERT_EXPR): Pass proper alignment to store_field.
......
...@@ -248,27 +248,26 @@ gen_rtx_CONST_INT (mode, arg) ...@@ -248,27 +248,26 @@ gen_rtx_CONST_INT (mode, arg)
#endif #endif
/* Look up the CONST_INT in the hash table. */ /* Look up the CONST_INT in the hash table. */
slot = htab_find_slot_with_hash (const_int_htab, slot = htab_find_slot_with_hash (const_int_htab, &arg, (hashval_t) arg, 1);
&arg, if (*slot == 0)
(hashval_t) arg,
/*insert=*/1);
if (!*slot)
{ {
if (!ggc_p) if (!ggc_p)
{ {
push_obstacks_nochange (); push_obstacks_nochange ();
end_temporary_allocation (); end_temporary_allocation ();
*slot = gen_rtx_raw_CONST_INT (VOIDmode, arg);
pop_obstacks ();
} }
*slot = gen_rtx_raw_CONST_INT (VOIDmode, arg); else
if (!ggc_p) *slot = gen_rtx_raw_CONST_INT (VOIDmode, arg);
pop_obstacks ();
} }
return (rtx) *slot; 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. */ only at run-time. */
rtx rtx
gen_rtx_CONST_DOUBLE (mode, arg0, arg1, arg2) gen_rtx_CONST_DOUBLE (mode, arg0, arg1, arg2)
enum machine_mode mode; enum machine_mode mode;
...@@ -4157,10 +4156,8 @@ init_emit_once (line_numbers) ...@@ -4157,10 +4156,8 @@ init_emit_once (line_numbers)
ggc_add_rtx_root (&return_address_pointer_rtx, 1); ggc_add_rtx_root (&return_address_pointer_rtx, 1);
/* Initialize the CONST_INT hash table. */ /* Initialize the CONST_INT hash table. */
const_int_htab = htab_create (37, const_int_htab = htab_create (37, const_int_htab_hash,
const_int_htab_hash, const_int_htab_eq, NULL);
const_int_htab_eq,
NULL);
ggc_add_root (&const_int_htab, 1, sizeof (const_int_htab), ggc_add_root (&const_int_htab, 1, sizeof (const_int_htab),
rtx_htab_mark); rtx_htab_mark);
} }
......
...@@ -90,7 +90,6 @@ static int mul_highpart_cost[NUM_MACHINE_MODES]; ...@@ -90,7 +90,6 @@ static int mul_highpart_cost[NUM_MACHINE_MODES];
void void
init_expmed () init_expmed ()
{ {
char *free_point;
/* This is "some random pseudo register" for purposes of calling recog /* This is "some random pseudo register" for purposes of calling recog
to see what insns exist. */ to see what insns exist. */
rtx reg = gen_rtx_REG (word_mode, 10000); rtx reg = gen_rtx_REG (word_mode, 10000);
...@@ -101,11 +100,6 @@ init_expmed () ...@@ -101,11 +100,6 @@ init_expmed ()
start_sequence (); start_sequence ();
/* Since we are on the permanent obstack, we must be sure we save this
spot AFTER we call start_sequence, since it will reuse the rtl it
makes. */
free_point = (char *) oballoc (0);
reg = gen_rtx_REG (word_mode, 10000); reg = gen_rtx_REG (word_mode, 10000);
zero_cost = rtx_cost (const0_rtx, 0); zero_cost = rtx_cost (const0_rtx, 0);
...@@ -191,9 +185,7 @@ init_expmed () ...@@ -191,9 +185,7 @@ init_expmed ()
} }
} }
/* Free the objects we just allocated. */
end_sequence (); end_sequence ();
obfree (free_point);
} }
/* Return an rtx representing minus the value of X. /* Return an rtx representing minus the value of X.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment