aboutsummaryrefslogtreecommitdiff
path: root/gcc/reg-stack.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-07-16 22:54:44 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2001-07-16 20:54:44 +0000
commit4793dca1588681eb583ccfd7cd179216c2d44d7e (patch)
treef2d3118471d29556bb961862c3ae6d62df08e484 /gcc/reg-stack.c
parentccef9ef51073dac630247180cba0591af5382d6b (diff)
downloadgcc-4793dca1588681eb583ccfd7cd179216c2d44d7e.zip
gcc-4793dca1588681eb583ccfd7cd179216c2d44d7e.tar.gz
gcc-4793dca1588681eb583ccfd7cd179216c2d44d7e.tar.bz2
basic-block.h (CLEANUP_PRE_SIBCALL): New constant.
* basic-block.h (CLEANUP_PRE_SIBCALL): New constant. * except.c (finish_eh_generation): Update call of cleanup_cfg; do rebuild_jump_labels instead of jump_optimize * sibcall.c (optimize_sibling_and_tail_recursive_call): Likewise. * toplev.c (rest_of_compulation): Likewise for -Wreturn_type. * flow.c (try_optimize_cfg): Remove unneeded code_labels. * flow.c: Include timevar.h (find_basic_block): Push/pop timevar; (cleanup_cfg): Likewise. * timevar.def (TV_CFG, TV_CLEANUP_CFG): New. * Makefile: Add dependencies on timevar.h * integrate.c (save_for_inline): Kill all BASIC_BLOCK notes. (copy_insn_list): Avoid killing of BASIC_BLOCK notes. * rtl.h (delete_trivially_dead_insns): Add new parameter. * toplev.c (rest_of_compilation): Update calls. * cse.c (set_live_p, insn_live_p, dead_libcall_p): Break out from ... (delete_trivially_dead_insns): ... here; accept new argument preserve_basic_blocks; preserve basic blocks if set. * reg-stack.c (stack_regs_mentioned): Return 0 if stack_regs_mentioned_data is not initialized. (reg_to_stack): Make stack_regs_mentioned survive after the reg-stack is completted; do not call cleanup_cfg. * toplev.c (rest_of_compilation): Do cleanup_cfg before bb-reorder; make cleanup_cfg after bb-reorder to output to debug file. From-SVN: r44056
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r--gcc/reg-stack.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index bdd1c98..19f6660 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -303,7 +303,7 @@ stack_regs_mentioned (insn)
unsigned int uid, max;
int test;
- if (! INSN_P (insn))
+ if (! INSN_P (insn) || !stack_regs_mentioned_data)
return 0;
uid = INSN_UID (insn);
@@ -419,6 +419,13 @@ reg_to_stack (first, file)
int max_uid;
block_info bi;
+ /* Clean up previous run. */
+ if (stack_regs_mentioned_data)
+ {
+ VARRAY_FREE (stack_regs_mentioned_data);
+ stack_regs_mentioned_data = 0;
+ }
+
if (!optimize)
split_all_insns (0);
@@ -479,11 +486,8 @@ reg_to_stack (first, file)
VARRAY_CHAR_INIT (stack_regs_mentioned_data, max_uid + 1,
"stack_regs_mentioned cache");
- if (convert_regs (file) && optimize)
- cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_CROSSJUMP | CLEANUP_POST_REGSTACK);
+ convert_regs (file);
- /* Clean up. */
- VARRAY_FREE (stack_regs_mentioned_data);
free (bi);
}