This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
SH: missing end of basic blocks
- To: gcc-patches at gcc dot gnu dot org
- Subject: SH: missing end of basic blocks
- From: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Date: Sun, 02 Sep 2001 12:55:25 +0900
Hi,
Sometimes the end of basic block is represented by call insn
and barrier in c++ compiler for SH. I've met it in compiling
c++locale.cc when building libstdc++.
The attached patch treats it in find_sub_basic_blocks().
Bootstrapped and regression tested on i686-linux and sh-linux.
kaz
--
2001-09-02 kaz Kojima <kkojima@rr.iij4u.or.jp>
* flow.c (find_sub_basic_blocks): Handle CALL_INSN followed
by BARRIER as a new block end.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.475
diff -u -r1.475 flow.c
--- flow.c 2001/08/28 23:43:21 1.475
+++ flow.c 2001/09/02 01:28:42
@@ -748,6 +748,7 @@
break;
case INSN:
case JUMP_INSN:
+ case CALL_INSN:
/* In case we've previously split insn on the JUMP_INSN, move the
block header to proper place. */
if (jump_insn)
@@ -766,6 +767,9 @@
abort();
jump_insn = insn;
}
+ else if (code == CALL_INSN && insn != end
+ && GET_CODE (NEXT_INSN (insn)) == BARRIER)
+ jump_insn = insn;
break;
default:
break;