diff options
author | kan <kan@FreeBSD.org> | 2005-06-03 03:28:44 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2005-06-03 03:28:44 +0000 |
commit | 2156e40a831a8e0ab68e4bc091c2940bf46ca6df (patch) | |
tree | f0dc8ad34f9fcaf27052e24e893a4284b5fee6e9 /contrib/gcc/jump.c | |
parent | 0a20abcc95340c9d2bb59421bac84eca4fb43b0c (diff) | |
download | FreeBSD-src-2156e40a831a8e0ab68e4bc091c2940bf46ca6df.zip FreeBSD-src-2156e40a831a8e0ab68e4bc091c2940bf46ca6df.tar.gz |
Gcc 3.4.4 release.
Diffstat (limited to 'contrib/gcc/jump.c')
-rw-r--r-- | contrib/gcc/jump.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/gcc/jump.c b/contrib/gcc/jump.c index d2b53f8..ce803a9 100644 --- a/contrib/gcc/jump.c +++ b/contrib/gcc/jump.c @@ -311,6 +311,23 @@ duplicate_loop_exit_test (rtx loop_start) int max_reg = max_reg_num (); rtx *reg_map = 0; rtx loop_pre_header_label; + int loop_depth; + + /* If EXITCODE is not in the loop, then this optimization is not + safe; we will emit a VTOP note entirely outside the loop. */ + for (insn = loop_start, loop_depth = 0; + insn != exitcode; + insn = NEXT_INSN (insn)) + { + if (GET_CODE (insn) != NOTE) + continue; + + if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG) + ++loop_depth; + else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END + && --loop_depth == 0) + return 0; + } /* Scan the exit code. We do not perform this optimization if any insn: |