aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-05-31 13:34:55 +0000
committerJeff Law <law@gcc.gnu.org>1999-05-31 07:34:55 -0600
commitefa90f05afe058d369bddb59c4971026f8aecee8 (patch)
treef84e9faad67f2e1fb47e9707dcea1434b28d3292 /gcc
parent2f0a2a5b4ac9639466b535fe4d0cb252611901c6 (diff)
downloadgcc-efa90f05afe058d369bddb59c4971026f8aecee8.zip
gcc-efa90f05afe058d369bddb59c4971026f8aecee8.tar.gz
gcc-efa90f05afe058d369bddb59c4971026f8aecee8.tar.bz2
jump.c (jump_optimize_1): Only set CAN_REACH_END if calculate_can_reach_end returns nonzero.
* jump.c (jump_optimize_1): Only set CAN_REACH_END if calculate_can_reach_end returns nonzero. From-SVN: r27281
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/jump.c14
2 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e83b9fe..a771927 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -18,6 +18,9 @@ Mon May 31 11:40:20 EDT 1999 John Wehle (john@feith.com)
Mon May 31 00:46:17 1999 Jeffrey A Law (law@cygnus.com)
+ * jump.c (jump_optimize_1): Only set CAN_REACH_END if
+ calculate_can_reach_end returns nonzero.
+
* configure.in (native gas tests): Search for an assembler in the
same manner that the installed compiler will.
* configure: Rebuilt.
diff --git a/gcc/jump.c b/gcc/jump.c
index 01df0db..6b6a90a 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -235,7 +235,12 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan, mark_labels_only)
if (!optimize)
{
- can_reach_end = calculate_can_reach_end (last_insn, 1, 0);
+ /* CAN_REACH_END is persistent for each function. Once set it should
+ not be cleared. This is especially true for the case where we
+ delete the NOTE_FUNCTION_END note. CAN_REACH_END is cleared by
+ the front-end before compiling each function. */
+ if (calculate_can_reach_end (last_insn, 1, 0))
+ can_reach_end = 1;
/* Zero the "deleted" flag of all the "deleted" insns. */
for (insn = f; insn; insn = NEXT_INSN (insn))
@@ -2068,7 +2073,12 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan, mark_labels_only)
}
#endif
- can_reach_end = calculate_can_reach_end (last_insn, 0, 1);
+ /* CAN_REACH_END is persistent for each function. Once set it should
+ not be cleared. This is especially true for the case where we
+ delete the NOTE_FUNCTION_END note. CAN_REACH_END is cleared by
+ the front-end before compiling each function. */
+ if (calculate_can_reach_end (last_insn, 0, 1))
+ can_reach_end = 1;
/* Show JUMP_CHAIN no longer valid. */
jump_chain = 0;