(secondary_memlocs_elim): Now one per mode per operand.
(get_secondary_mem, combine_reloads): Reflect changed var above. (clear_secondary_mem): Use bzero. From-SVN: r3915
This commit is contained in:
parent
7967c666c2
commit
77545d45a3
29
gcc/reload.c
29
gcc/reload.c
|
@ -226,7 +226,7 @@ static int n_memlocs;
|
||||||
reload each. */
|
reload each. */
|
||||||
|
|
||||||
static rtx secondary_memlocs[NUM_MACHINE_MODES];
|
static rtx secondary_memlocs[NUM_MACHINE_MODES];
|
||||||
static rtx secondary_memlocs_elim[MAX_RECOG_OPERANDS];
|
static rtx secondary_memlocs_elim[NUM_MACHINE_MODES][MAX_RECOG_OPERANDS];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The instruction we are doing reloads for;
|
/* The instruction we are doing reloads for;
|
||||||
|
@ -434,9 +434,9 @@ get_secondary_mem (x, mode, opnum, type)
|
||||||
if (GET_MODE_BITSIZE (mode) < BITS_PER_WORD)
|
if (GET_MODE_BITSIZE (mode) < BITS_PER_WORD)
|
||||||
mode = mode_for_size (BITS_PER_WORD, GET_MODE_CLASS (mode), 0);
|
mode = mode_for_size (BITS_PER_WORD, GET_MODE_CLASS (mode), 0);
|
||||||
|
|
||||||
/* If we already have made a MEM for this operand, return it. */
|
/* If we already have made a MEM for this operand in MODE, return it. */
|
||||||
if (secondary_memlocs_elim[opnum] != 0)
|
if (secondary_memlocs_elim[(int) mode][opnum] != 0)
|
||||||
return secondary_memlocs_elim[opnum];
|
return secondary_memlocs_elim[(int) mode][opnum];
|
||||||
|
|
||||||
/* If this is the first time we've tried to get a MEM for this mode,
|
/* If this is the first time we've tried to get a MEM for this mode,
|
||||||
allocate a new one. `something_changed' in reload will get set
|
allocate a new one. `something_changed' in reload will get set
|
||||||
|
@ -478,7 +478,7 @@ get_secondary_mem (x, mode, opnum, type)
|
||||||
opnum, type, 0);
|
opnum, type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
secondary_memlocs_elim[opnum] = loc;
|
secondary_memlocs_elim[(int) mode][opnum] = loc;
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -487,10 +487,7 @@ get_secondary_mem (x, mode, opnum, type)
|
||||||
void
|
void
|
||||||
clear_secondary_mem ()
|
clear_secondary_mem ()
|
||||||
{
|
{
|
||||||
int i;
|
bzero (secondary_memlocs, sizeof secondary_memlocs);
|
||||||
|
|
||||||
for (i = 0; i < NUM_MACHINE_MODES; i++)
|
|
||||||
secondary_memlocs[i] = 0;
|
|
||||||
}
|
}
|
||||||
#endif /* SECONDARY_MEMORY_NEEDED */
|
#endif /* SECONDARY_MEMORY_NEEDED */
|
||||||
|
|
||||||
|
@ -1385,10 +1382,10 @@ combine_reloads ()
|
||||||
|| reload_secondary_reload[output_reload] == -1)
|
|| reload_secondary_reload[output_reload] == -1)
|
||||||
#ifdef SECONDARY_MEMORY_NEEDED
|
#ifdef SECONDARY_MEMORY_NEEDED
|
||||||
/* Likewise for different secondary memory locations. */
|
/* Likewise for different secondary memory locations. */
|
||||||
&& (secondary_memlocs_elim[reload_opnum[i]] == 0
|
&& (secondary_memlocs_elim[(int) reload_outmode[output_reload]][reload_opnum[i]] == 0
|
||||||
|| secondary_memlocs_elim[reload_opnum[output_reload]] == 0
|
|| secondary_memlocs_elim[(int) reload_outmode[output_reload]][reload_opnum[output_reload]] == 0
|
||||||
|| rtx_equal_p (secondary_memlocs_elim[reload_opnum[i]],
|
|| rtx_equal_p (secondary_memlocs_elim[(int) reload_outmode[output_reload]][reload_opnum[i]],
|
||||||
secondary_memlocs_elim[reload_opnum[output_reload]]))
|
secondary_memlocs_elim[(int) reload_outmode[output_reload]][reload_opnum[output_reload]]))
|
||||||
#endif
|
#endif
|
||||||
#ifdef SMALL_REGISTER_CLASSES
|
#ifdef SMALL_REGISTER_CLASSES
|
||||||
&& reload_reg_class[i] == reload_reg_class[output_reload]
|
&& reload_reg_class[i] == reload_reg_class[output_reload]
|
||||||
|
@ -1437,9 +1434,9 @@ combine_reloads ()
|
||||||
reload_secondary_reload[i] = reload_secondary_reload[output_reload];
|
reload_secondary_reload[i] = reload_secondary_reload[output_reload];
|
||||||
#ifdef SECONDARY_MEMORY_NEEDED
|
#ifdef SECONDARY_MEMORY_NEEDED
|
||||||
/* Copy any secondary MEM. */
|
/* Copy any secondary MEM. */
|
||||||
if (secondary_memlocs_elim[reload_opnum[output_reload]] != 0)
|
if (secondary_memlocs_elim[(int) reload_outmode[output_reload]][reload_opnum[output_reload]] != 0)
|
||||||
secondary_memlocs_elim[reload_opnum[i]]
|
secondary_memlocs_elim[(int) reload_outmode[output_reload]][reload_opnum[i]]
|
||||||
= secondary_memlocs_elim[reload_opnum[output_reload]];
|
= secondary_memlocs_elim[(int) reload_outmode[output_reload]][reload_opnum[output_reload]];
|
||||||
#endif
|
#endif
|
||||||
/* If required, minimize the register class. */
|
/* If required, minimize the register class. */
|
||||||
if (reg_class_subset_p (reload_reg_class[output_reload],
|
if (reg_class_subset_p (reload_reg_class[output_reload],
|
||||||
|
|
Loading…
Reference in New Issue