mirror of
https://review.haiku-os.org/buildtools
synced 2024-11-23 07:18:49 +01:00
[taken from gcc-2.95.3-latest-cvs]
2001-03-28 Bernd Schmidt <bernds@redhat.com> * flow.c (propagate_block): When trying to delete a case vector, cope if its label has LABEL_PRESERVE_P set. * varasm.c (force_const_mem): If we have a label, set LABEL_PRESERVE_P so it won't get deleted. git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9591 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a8e3cfa07e
commit
4837867f67
@ -2744,15 +2744,23 @@ propagate_block (old, first, last, final, significant, bnum, remove_dead_code)
|
||||
{
|
||||
if (REG_NOTE_KIND (inote) == REG_LABEL)
|
||||
{
|
||||
int n_forced;
|
||||
rtx label = XEXP (inote, 0);
|
||||
rtx next;
|
||||
LABEL_NUSES (label)--;
|
||||
|
||||
/* The label may be forced if it has been put in the
|
||||
constant pool. We can't delete it in this case, but
|
||||
we still must discard a jump table following it. */
|
||||
n_forced = 0;
|
||||
if (LABEL_PRESERVE_P (label))
|
||||
n_forced++;
|
||||
|
||||
/* If this label was attached to an ADDR_VEC, it's
|
||||
safe to delete the ADDR_VEC. In fact, it's pretty much
|
||||
mandatory to delete it, because the ADDR_VEC may
|
||||
be referencing labels that no longer exist. */
|
||||
if (LABEL_NUSES (label) == 0
|
||||
if (LABEL_NUSES (label) == n_forced
|
||||
&& (next = next_nonnote_insn (label)) != NULL
|
||||
&& GET_CODE (next) == JUMP_INSN
|
||||
&& (GET_CODE (PATTERN (next)) == ADDR_VEC
|
||||
|
@ -3499,6 +3499,9 @@ force_const_mem (mode, x)
|
||||
pop_obstacks ();
|
||||
}
|
||||
|
||||
if (GET_CODE (x) == LABEL_REF)
|
||||
LABEL_PRESERVE_P (XEXP (x, 0)) = 1;
|
||||
|
||||
/* Allocate a pool constant descriptor, fill it in, and chain it in. */
|
||||
|
||||
pool = (struct pool_constant *) savealloc (sizeof (struct pool_constant));
|
||||
|
Loading…
Reference in New Issue
Block a user