From: davem Date: Thu, 23 May 2002 15:22:05 +0000 (+0000) Subject: 2002-05-23 David S. Miller X-Git-Tag: upstream/4.9.2~86468 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=43a852ea4edb3bace60c8f0880cdc1768ace6151;p=platform%2Fupstream%2Flinaro-gcc.git 2002-05-23 David S. Miller * basic-block.h (CLEANUP_NO_INSN_DEL): Define it. * cfgcleanup.c (cleanup_cfg): If it is set do not attempt to delete trivially dead insns. * except.c (finish_eh_generation): Pass it to cleanup_cfg. * toplev.c (rest_of_compilation): Document non-trivial aspect the RTL before optimize_save_area_alloca is run. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53789 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9da36a9..d7334a9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2002-05-23 David S. Miller + + * basic-block.h (CLEANUP_NO_INSN_DEL): Define it. + * cfgcleanup.c (cleanup_cfg): If it is set do not + attempt to delete trivially dead insns. + * except.c (finish_eh_generation): Pass it to cleanup_cfg. + * toplev.c (rest_of_compilation): Document non-trivial aspect + the RTL before optimize_save_area_alloca is run. + 2002-05-23 Neil Booth * c-lex.c (indent_level): Remove. diff --git a/gcc/basic-block.h b/gcc/basic-block.h index cf0d13a..69ec122 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -595,6 +595,8 @@ enum update_life_extent notes. */ #define CLEANUP_UPDATE_LIFE 32 /* Keep life information up to date. */ #define CLEANUP_THREADING 64 /* Do jump threading. */ +#define CLEANUP_NO_INSN_DEL 128 /* Do not try to delete trivially dead + insns. */ /* Flags for loop discovery. */ #define LOOP_TREE 1 /* Build loop hierarchy tree. */ diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index d5f6de1..1e4056a 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1800,7 +1800,8 @@ cleanup_cfg (mode) changed = true; /* We've possibly created trivially dead code. Cleanup it right now to introduce more oppurtunities for try_optimize_cfg. */ - if (!(mode & (CLEANUP_UPDATE_LIFE | CLEANUP_PRE_SIBCALL)) + if (!(mode & (CLEANUP_NO_INSN_DEL + | CLEANUP_UPDATE_LIFE | CLEANUP_PRE_SIBCALL)) && !reload_completed) delete_trivially_dead_insns (get_insns(), max_reg_num ()); } @@ -1819,7 +1820,8 @@ cleanup_cfg (mode) | PROP_LOG_LINKS)) break; } - else if (!(mode & CLEANUP_PRE_SIBCALL) && !reload_completed) + else if (!(mode & (CLEANUP_NO_INSN_DEL | CLEANUP_PRE_SIBCALL)) + && !reload_completed) { if (!delete_trivially_dead_insns (get_insns(), max_reg_num ())) break; diff --git a/gcc/except.c b/gcc/except.c index e1f32a5..ee6ee9f 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2501,7 +2501,7 @@ finish_eh_generation () rebuild_jump_labels (get_insns ()); find_basic_blocks (get_insns (), max_reg_num (), 0); - cleanup_cfg (CLEANUP_PRE_LOOP); + cleanup_cfg (CLEANUP_PRE_LOOP | CLEANUP_NO_INSN_DEL); /* These registers are used by the landing pads. Make sure they have been generated. */ @@ -2524,7 +2524,7 @@ finish_eh_generation () find_exception_handler_labels (); rebuild_jump_labels (get_insns ()); find_basic_blocks (get_insns (), max_reg_num (), 0); - cleanup_cfg (CLEANUP_PRE_LOOP); + cleanup_cfg (CLEANUP_PRE_LOOP | CLEANUP_NO_INSN_DEL); } static hashval_t diff --git a/gcc/toplev.c b/gcc/toplev.c index fc4f658..bb6a448 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2573,7 +2573,10 @@ rest_of_compilation (decl) unshare_all_rtl (current_function_decl, insns); #ifdef SETJMP_VIA_SAVE_AREA - /* This must be performed before virtual register instantiation. */ + /* This must be performed before virtual register instantiation. + Please be aware the everything in the compiler that can look + at the RTL up to this point must understand that REG_SAVE_AREA + is just like a use of the REG contained inside. */ if (current_function_calls_alloca) optimize_save_area_alloca (insns); #endif