Commit 95479831 by David S. Miller Committed by David S. Miller

basic-block.h (CLEANUP_NO_INSN_DEL): Define it.

2002-05-23  David S. Miller  <davem@redhat.com>

	* 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.

From-SVN: r53789
parent a97d1398
2002-05-23 David S. Miller <davem@redhat.com>
* 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 <neil@daikokuya.demon.co.uk> 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
* c-lex.c (indent_level): Remove. * c-lex.c (indent_level): Remove.
......
...@@ -595,6 +595,8 @@ enum update_life_extent ...@@ -595,6 +595,8 @@ enum update_life_extent
notes. */ notes. */
#define CLEANUP_UPDATE_LIFE 32 /* Keep life information up to date. */ #define CLEANUP_UPDATE_LIFE 32 /* Keep life information up to date. */
#define CLEANUP_THREADING 64 /* Do jump threading. */ #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. */ /* Flags for loop discovery. */
#define LOOP_TREE 1 /* Build loop hierarchy tree. */ #define LOOP_TREE 1 /* Build loop hierarchy tree. */
......
...@@ -1800,7 +1800,8 @@ cleanup_cfg (mode) ...@@ -1800,7 +1800,8 @@ cleanup_cfg (mode)
changed = true; changed = true;
/* We've possibly created trivially dead code. Cleanup it right /* We've possibly created trivially dead code. Cleanup it right
now to introduce more oppurtunities for try_optimize_cfg. */ 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) && !reload_completed)
delete_trivially_dead_insns (get_insns(), max_reg_num ()); delete_trivially_dead_insns (get_insns(), max_reg_num ());
} }
...@@ -1819,7 +1820,8 @@ cleanup_cfg (mode) ...@@ -1819,7 +1820,8 @@ cleanup_cfg (mode)
| PROP_LOG_LINKS)) | PROP_LOG_LINKS))
break; 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 ())) if (!delete_trivially_dead_insns (get_insns(), max_reg_num ()))
break; break;
......
...@@ -2501,7 +2501,7 @@ finish_eh_generation () ...@@ -2501,7 +2501,7 @@ finish_eh_generation ()
rebuild_jump_labels (get_insns ()); rebuild_jump_labels (get_insns ());
find_basic_blocks (get_insns (), max_reg_num (), 0); 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 /* These registers are used by the landing pads. Make sure they
have been generated. */ have been generated. */
...@@ -2524,7 +2524,7 @@ finish_eh_generation () ...@@ -2524,7 +2524,7 @@ finish_eh_generation ()
find_exception_handler_labels (); find_exception_handler_labels ();
rebuild_jump_labels (get_insns ()); rebuild_jump_labels (get_insns ());
find_basic_blocks (get_insns (), max_reg_num (), 0); 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 static hashval_t
......
...@@ -2573,7 +2573,10 @@ rest_of_compilation (decl) ...@@ -2573,7 +2573,10 @@ rest_of_compilation (decl)
unshare_all_rtl (current_function_decl, insns); unshare_all_rtl (current_function_decl, insns);
#ifdef SETJMP_VIA_SAVE_AREA #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) if (current_function_calls_alloca)
optimize_save_area_alloca (insns); optimize_save_area_alloca (insns);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment