aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2001-04-19 19:44:43 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2001-04-19 19:44:43 +0000
commit13c502cdd58e3f48a479d82bc84a1a559009ff14 (patch)
tree506fdafc46c4b6ec4b2ce4087363eec750cfc54b
parent3dcaf6e0d1737ac856d10d757e3c94bcaceff562 (diff)
downloadgcc-13c502cdd58e3f48a479d82bc84a1a559009ff14.zip
gcc-13c502cdd58e3f48a479d82bc84a1a559009ff14.tar.gz
gcc-13c502cdd58e3f48a479d82bc84a1a559009ff14.tar.bz2
rtl.texi (jump_insn): Expand on JUMP_LABEL documentation.
* rtl.texi (jump_insn): Expand on JUMP_LABEL documentation. * loop.c (load_mems): Handle a NULL JUMP_LABEL for a JUMP_INSN. From-SVN: r41424
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/loop.c11
-rw-r--r--gcc/rtl.texi13
3 files changed, 17 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 429a184..cfd394e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2001-04-19 Mark Mitchell <mark@codesourcery.com>
+ * rtl.texi (jump_insn): Expand on JUMP_LABEL documentation.
+ * loop.c (load_mems): Handle a NULL JUMP_LABEL for a JUMP_INSN.
+
* mips.md (reload_outputdi): Require that operand0 be a
general_operand.
diff --git a/gcc/loop.c b/gcc/loop.c
index 7748015..3e340af 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -8850,10 +8850,13 @@ load_mems (loop)
/* If this is a jump outside of the loop but not right
after the end of the loop, we would have to emit new fixup
sequences for each such label. */
- if (JUMP_LABEL (p) != end_label
- && (INSN_UID (JUMP_LABEL (p)) >= max_uid_for_loop
- || INSN_LUID (JUMP_LABEL (p)) < INSN_LUID (loop->start)
- || INSN_LUID (JUMP_LABEL (p)) > INSN_LUID (loop->end)))
+ if (/* If we can't tell where control might go when this
+ JUMP_INSN is executed, we must be conservative. */
+ !JUMP_LABEL (p)
+ || (JUMP_LABEL (p) != end_label
+ && (INSN_UID (JUMP_LABEL (p)) >= max_uid_for_loop
+ || INSN_LUID (JUMP_LABEL (p)) < INSN_LUID (loop->start)
+ || INSN_LUID (JUMP_LABEL (p)) > INSN_LUID (loop->end))))
return;
if (!any_condjump_p (p))
diff --git a/gcc/rtl.texi b/gcc/rtl.texi
index 665a407..4e1dd21 100644
--- a/gcc/rtl.texi
+++ b/gcc/rtl.texi
@@ -2501,14 +2501,15 @@ recorded as a @code{jump_insn}.
accessed in the same way and in addition contain a field
@code{JUMP_LABEL} which is defined once jump optimization has completed.
-For simple conditional and unconditional jumps, this field contains the
-@code{code_label} to which this insn will (possibly conditionally)
+For simple conditional and unconditional jumps, this field contains
+the @code{code_label} to which this insn will (possibly conditionally)
branch. In a more complex jump, @code{JUMP_LABEL} records one of the
-labels that the insn refers to; the only way to find the others
-is to scan the entire body of the insn.
+labels that the insn refers to; the only way to find the others is to
+scan the entire body of the insn. In an @code{addr_vec},
+@code{JUMP_LABEL} is @code{NULL_RTX}.
-Return insns count as jumps, but since they do not refer to any labels,
-they have zero in the @code{JUMP_LABEL} field.
+Return insns count as jumps, but since they do not refer to any
+labels, their @code{JUMP_LABEL} is @code{NULL_RTX}.
@findex call_insn
@item call_insn