diff options
| author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-15 00:53:44 +0000 | 
|---|---|---|
| committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-15 00:53:44 +0000 | 
| commit | a716a89bd43bf65449a0466b93dbcc4b9b8f594a (patch) | |
| tree | 5b6cb99d81c2d3b5f62712aa4a7879120688ebfb | |
| parent | 9936e1622e660be8b2ba443ea2017865f5680860 (diff) | |
| download | ppe42-gcc-a716a89bd43bf65449a0466b93dbcc4b9b8f594a.tar.gz ppe42-gcc-a716a89bd43bf65449a0466b93dbcc4b9b8f594a.zip | |
	* cfgcleanup.c (flow_find_cross_jump): Replace tests for note
	by active_insn_p; count conditional jump as instruction.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48022 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/cfgcleanup.c | 23 | 
2 files changed, 21 insertions, 7 deletions
| diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 244080dfe5e..14fd691451f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sat Dec 15 01:39:12 CET 2001  Jan Hubicka  <jh@suse.cz> + +	* cfgcleanup.c (flow_find_cross_jump): Replace tests for note +	by active_insn_p; count conditional jump as instruction. +  2001-12-14  DJ Delorie  <dj@redhat.com>  	    Danny Smith  <dannysmith@users.sourceforge.net> diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index e7e31f94b6c..2f0115323a8 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -670,21 +670,30 @@ flow_find_cross_jump (mode, bb1, bb2, f1, f2)       need to be compared for equivalence, which we'll do below.  */    i1 = bb1->end; +  last1 = afterlast1 = last2 = afterlast2 = NULL_RTX;    if (onlyjump_p (i1)        || (returnjump_p (i1) && !side_effects_p (PATTERN (i1)))) -    i1 = PREV_INSN (i1); +    { +      last1 = i1; +      /* Count everything except for unconditional jump as insn.  */ +      if (!simplejump_p (i1) && !returnjump_p (i1)) +	ninsns++; +      i1 = PREV_INSN (i1); +    }    i2 = bb2->end;    if (onlyjump_p (i2)        || (returnjump_p (i2) && !side_effects_p (PATTERN (i2)))) -    i2 = PREV_INSN (i2); +    { +      last2 = i2; +      i2 = PREV_INSN (i2); +    } -  last1 = afterlast1 = last2 = afterlast2 = NULL_RTX;    while (true)      {        /* Ignore notes.  */ -      while ((GET_CODE (i1) == NOTE && i1 != bb1->head)) +      while (!active_insn_p (i1) && i1 != bb1->head)  	i1 = PREV_INSN (i1); -      while ((GET_CODE (i2) == NOTE && i2 != bb2->head)) +      while (!active_insn_p (i2) && i2 != bb2->head)  	i2 = PREV_INSN (i2);        if (i1 == bb1->head || i2 == bb2->head) @@ -735,11 +744,11 @@ flow_find_cross_jump (mode, bb1, bb2, f1, f2)       Two, it keeps line number notes as matched as may be.  */    if (ninsns)      { -      while (last1 != bb1->head && GET_CODE (PREV_INSN (last1)) == NOTE) +      while (last1 != bb1->head && !active_insn_p (PREV_INSN (last1)))  	last1 = PREV_INSN (last1);        if (last1 != bb1->head && GET_CODE (PREV_INSN (last1)) == CODE_LABEL)  	last1 = PREV_INSN (last1); -      while (last2 != bb2->head && GET_CODE (PREV_INSN (last2)) == NOTE) +      while (last2 != bb2->head && !active_insn_p (PREV_INSN (last2)))  	last2 = PREV_INSN (last2);        if (last2 != bb2->head && GET_CODE (PREV_INSN (last2)) == CODE_LABEL)  	last2 = PREV_INSN (last2); | 

