From e24e721187ece610590c92b1a19b42b5d8ffe306 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 16 Jan 2004 12:30:48 +0100 Subject: [PATCH] re PR rtl-optimization/11350 (undefined labels with -Os -fPIC) PR opt/11350 * cfgcleanup.c (try_optimize_cfg): Suppress tablejump removal after reload. * cfgrtl.c (rtl_can_merge_blocks, cfglayout_can_merge_blocks, rtl_try_redirect_by_replacing_branch): Likewise. From-SVN: r75968 --- gcc/ChangeLog | 8 ++++++++ gcc/cfgcleanup.c | 2 +- gcc/cfgrtl.c | 6 +++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index adc7d9bd8b7..d57fcb051df 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2004-01-16 Jan Hubicka + + PR opt/11350 + * cfgcleanup.c (try_optimize_cfg): Suppress tablejump removal + after reload. + * cfgrtl.c (rtl_can_merge_blocks, cfglayout_can_merge_blocks, + rtl_try_redirect_by_replacing_branch): Likewise. + 2004-01-15 Geoffrey Keating PR pch/13689 diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 3e68cbe3a17..3da1ea5ae59 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1766,7 +1766,7 @@ try_optimize_cfg (int mode) /* If the jump insn has side effects, we can't kill the edge. */ && (GET_CODE (BB_END (b)) != JUMP_INSN - || (flow2_completed + || (reload_completed ? simplejump_p (BB_END (b)) : onlyjump_p (BB_END (b)))) && (next = merge_blocks_move (s, b, c, mode))) diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 7839d5bf750..c1b17455345 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -661,7 +661,7 @@ rtl_can_merge_blocks (basic_block a,basic_block b) /* If the jump insn has side effects, we can't kill the edge. */ && (GET_CODE (BB_END (a)) != JUMP_INSN - || (flow2_completed + || (reload_completed ? simplejump_p (BB_END (a)) : onlyjump_p (BB_END (a))))); } @@ -703,7 +703,7 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) if (tmp || !onlyjump_p (insn)) return false; - if ((!optimize || flow2_completed) && tablejump_p (insn, NULL, NULL)) + if ((!optimize || reload_completed) && tablejump_p (insn, NULL, NULL)) return false; /* Avoid removing branch with side effects. */ @@ -2607,7 +2607,7 @@ cfg_layout_can_merge_blocks_p (basic_block a, basic_block b) /* If the jump insn has side effects, we can't kill the edge. */ && (GET_CODE (BB_END (a)) != JUMP_INSN - || (flow2_completed + || (reload_completed ? simplejump_p (BB_END (a)) : onlyjump_p (BB_END (a))))); } -- 2.30.2