diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-18 23:20:09 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-18 23:20:09 +0000 |
commit | 820f2ae976ffe5a052176ac7d0ea325cc9357faf (patch) | |
tree | 635d996d3e9a7dd331e13ce0eb3e0a5e8017c64c /gcc/tree-cfgcleanup.c | |
parent | 472cd78ab0398cbc1a8a59135de98d2fe4ed051a (diff) | |
download | ppe42-gcc-820f2ae976ffe5a052176ac7d0ea325cc9357faf.tar.gz ppe42-gcc-820f2ae976ffe5a052176ac7d0ea325cc9357faf.zip |
PR middle-end/22057
* tree-cfgcleanup.c (cleanup_tree_cfg): Only remove forwarder
blocks when optimizing.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102142 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r-- | gcc/tree-cfgcleanup.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index bedee9bdef9..51b2fc59465 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -501,20 +501,28 @@ cleanup_tree_cfg (void) retval = cleanup_control_flow (); retval |= delete_unreachable_blocks (); - /* cleanup_forwarder_blocks can redirect edges out of SWITCH_EXPRs, - which can get expensive. So we want to enable recording of edge - to CASE_LABEL_EXPR mappings around the call to - cleanup_forwarder_blocks. */ - start_recording_case_labels (); - retval |= cleanup_forwarder_blocks (); - end_recording_case_labels (); + /* Forwarder blocks can carry line number information which is + useful when debugging, so we only clean them up when + optimizing. */ + + if (optimize > 0) + { + /* cleanup_forwarder_blocks can redirect edges out of + SWITCH_EXPRs, which can get expensive. So we want to enable + recording of edge to CASE_LABEL_EXPR mappings around the call + to cleanup_forwarder_blocks. */ + start_recording_case_labels (); + retval |= cleanup_forwarder_blocks (); + end_recording_case_labels (); + } #ifdef ENABLE_CHECKING if (retval) { gcc_assert (!cleanup_control_flow ()); gcc_assert (!delete_unreachable_blocks ()); - gcc_assert (!cleanup_forwarder_blocks ()); + if (optimize > 0) + gcc_assert (!cleanup_forwarder_blocks ()); } #endif |