diff options
author | Richard Henderson <rth@cygnus.com> | 1999-10-27 15:22:34 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1999-10-27 15:22:34 -0700 |
commit | e218fc41a887ae8f97649ad0ac79400654458f33 (patch) | |
tree | 53ef066b9c79de195ac18303654977657339d8de /gcc/reg-stack.c | |
parent | 163537f7f15b3727538f9c0b5f82efbd7d56f8a8 (diff) | |
download | gcc-e218fc41a887ae8f97649ad0ac79400654458f33.zip gcc-e218fc41a887ae8f97649ad0ac79400654458f33.tar.gz gcc-e218fc41a887ae8f97649ad0ac79400654458f33.tar.bz2 |
jump.c (jump_optimize_1): If we did cross-jumping, and the data will matter, rebuild the CFG.
* jump.c (jump_optimize_1): If we did cross-jumping, and
the data will matter, rebuild the CFG.
* reg-stack.c (reg_to_stack): Only (re)build the CFG if
not optimizing. Don't run shorten_branches.
* toplev.c (rest_of_compilation): Run shorten_branches after
reg_to_stack.
From-SVN: r30223
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r-- | gcc/reg-stack.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 50e55c1..7ab8184 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -406,8 +406,7 @@ pop_stack (regstack, regno) register file. FIRST is the first insn in the function, FILE is the dump file, if used. - Construct a CFG and run life analysis. (When optimizing, the data - was corruped by jump2's cross-jumping.) Then convert each insn one + Construct a CFG and run life analysis. Then convert each insn one by one. Run a last jump_optimize pass, if optimizing, to eliminate code duplication created when the converter inserts pop insns on the edges. */ @@ -430,16 +429,19 @@ reg_to_stack (first, file) if (i > LAST_STACK_REG) return; - /* Ok, floating point instructions exist. Rebuild the CFG and run - life analysis. */ - find_basic_blocks (first, max_reg_num (), file, 0); + /* Ok, floating point instructions exist. If not optimizing, + build the CFG and run life analysis. */ + if (! optimize) + { + find_basic_blocks (first, max_reg_num (), file, 0); - blocks = sbitmap_alloc (n_basic_blocks); - sbitmap_ones (blocks); - count_or_remove_death_notes (blocks, 1); - sbitmap_free (blocks); + blocks = sbitmap_alloc (n_basic_blocks); + sbitmap_ones (blocks); + count_or_remove_death_notes (blocks, 1); + sbitmap_free (blocks); - life_analysis (first, max_reg_num (), file, 0); + life_analysis (first, max_reg_num (), file, 0); + } /* Set up block info for each basic block. */ bi = (block_info) alloca ((n_basic_blocks + 1) * sizeof (*bi)); @@ -488,9 +490,6 @@ reg_to_stack (first, file) { jump_optimize (first, JUMP_CROSS_JUMP_DEATH_MATTERS, !JUMP_NOOP_MOVES, !JUMP_AFTER_REGSCAN); - - /* This has the effect of resetting label alignments around loops. */ - shorten_branches (get_insns ()); } VARRAY_FREE (stack_regs_mentioned_data); |