summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c69
1 files changed, 6 insertions, 63 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index c5ddeb081ed..66b1f7e93a9 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -171,9 +171,6 @@ static rtx free_insn;
#define last_filename (cfun->emit->x_last_filename)
#define first_label_num (cfun->emit->x_first_label_num)
-/* This is where the pointer to the obstack being used for RTL is stored. */
-extern struct obstack *rtl_obstack;
-
static rtx make_jump_insn_raw PARAMS ((rtx));
static rtx make_call_insn_raw PARAMS ((rtx));
static rtx find_line_note PARAMS ((rtx));
@@ -254,17 +251,7 @@ gen_rtx_CONST_INT (mode, arg)
slot = htab_find_slot_with_hash (const_int_htab, &arg,
(hashval_t) arg, INSERT);
if (*slot == 0)
- {
- if (!ggc_p)
- {
- push_obstacks_nochange ();
- end_temporary_allocation ();
- *slot = gen_rtx_raw_CONST_INT (VOIDmode, arg);
- pop_obstacks ();
- }
- else
- *slot = gen_rtx_raw_CONST_INT (VOIDmode, arg);
- }
+ *slot = gen_rtx_raw_CONST_INT (VOIDmode, arg);
return (rtx) *slot;
}
@@ -2492,15 +2479,7 @@ make_insn_raw (pattern)
{
register rtx insn;
- /* If in RTL generation phase, see if FREE_INSN can be used. */
- if (!ggc_p && free_insn != 0 && rtx_equal_function_value_matters)
- {
- insn = free_insn;
- free_insn = NEXT_INSN (free_insn);
- PUT_CODE (insn, INSN);
- }
- else
- insn = rtx_alloc (INSN);
+ insn = rtx_alloc (INSN);
INSN_UID (insn) = cur_insn_uid++;
PATTERN (insn) = pattern;
@@ -2927,8 +2906,6 @@ emit_insn_before (pattern, before)
insn = XVECEXP (pattern, 0, i);
add_insn_before (insn, before);
}
- if (!ggc_p && XVECLEN (pattern, 0) < SEQUENCE_RESULT_SIZE)
- sequence_result[XVECLEN (pattern, 0)] = pattern;
}
else
{
@@ -3061,8 +3038,6 @@ emit_insn_after (pattern, after)
add_insn_after (insn, after);
after = insn;
}
- if (!ggc_p && XVECLEN (pattern, 0) < SEQUENCE_RESULT_SIZE)
- sequence_result[XVECLEN (pattern, 0)] = pattern;
}
else
{
@@ -3222,8 +3197,6 @@ emit_insn (pattern)
insn = XVECEXP (pattern, 0, i);
add_insn (insn);
}
- if (!ggc_p && XVECLEN (pattern, 0) < SEQUENCE_RESULT_SIZE)
- sequence_result[XVECLEN (pattern, 0)] = pattern;
}
else
{
@@ -3711,29 +3684,9 @@ gen_sequence ()
&& GET_CODE (first_insn) == INSN
/* Don't throw away any reg notes. */
&& REG_NOTES (first_insn) == 0)
- {
- if (!ggc_p)
- {
- NEXT_INSN (first_insn) = free_insn;
- free_insn = first_insn;
- }
- return PATTERN (first_insn);
- }
+ return PATTERN (first_insn);
- /* Put them in a vector. See if we already have a SEQUENCE of the
- appropriate length around. */
- if (!ggc_p && len < SEQUENCE_RESULT_SIZE
- && (result = sequence_result[len]) != 0)
- sequence_result[len] = 0;
- else
- {
- /* Ensure that this rtl goes in saveable_obstack, since we may
- cache it. */
- push_obstacks_nochange ();
- rtl_in_saveable_obstack ();
- result = gen_rtx_SEQUENCE (VOIDmode, rtvec_alloc (len));
- pop_obstacks ();
- }
+ result = gen_rtx_SEQUENCE (VOIDmode, rtvec_alloc (len));
for (i = 0, tem = first_insn; tem; tem = NEXT_INSN (tem), i++)
XVECEXP (result, 0, i) = tem;
@@ -3887,14 +3840,6 @@ copy_insn_1 (orig)
}
break;
- case 'b':
- {
- bitmap new_bits = BITMAP_OBSTACK_ALLOC (rtl_obstack);
- bitmap_copy (new_bits, XBITMAP (orig, i));
- XBITMAP (copy, i) = new_bits;
- break;
- }
-
case 't':
case 'w':
case 'i':
@@ -4117,8 +4062,7 @@ init_emit_once (line_numbers)
virtual_cfa_rtx = gen_rtx_raw_REG (Pmode, VIRTUAL_CFA_REGNUM);
/* These rtx must be roots if GC is enabled. */
- if (ggc_p)
- ggc_add_rtx_root (global_rtl, GR_MAX);
+ ggc_add_rtx_root (global_rtl, GR_MAX);
#ifdef INIT_EXPANDERS
/* This is to initialize save_machine_status and restore_machine_status before
@@ -4135,8 +4079,7 @@ init_emit_once (line_numbers)
for (i = - MAX_SAVED_CONST_INT; i <= MAX_SAVED_CONST_INT; i++)
const_int_rtx[i + MAX_SAVED_CONST_INT] =
gen_rtx_raw_CONST_INT (VOIDmode, i);
- if (ggc_p)
- ggc_add_rtx_root (const_int_rtx, 2 * MAX_SAVED_CONST_INT + 1);
+ ggc_add_rtx_root (const_int_rtx, 2 * MAX_SAVED_CONST_INT + 1);
if (STORE_FLAG_VALUE >= - MAX_SAVED_CONST_INT
&& STORE_FLAG_VALUE <= MAX_SAVED_CONST_INT)