diff options
author | Kenneth Zadeck <zadeck@naturalbridge.com> | 2008-06-30 19:31:42 +0000 |
---|---|---|
committer | Kenneth Zadeck <zadeck@gcc.gnu.org> | 2008-06-30 19:31:42 +0000 |
commit | 727683a51c938a58cc7bdb7ea6bebed63521c5b4 (patch) | |
tree | 51966707b68782094d933d2a1c44aa2519b1bc11 /gcc | |
parent | 370f38e84763ca6271d7898b4900baad3810ad81 (diff) | |
download | gcc-727683a51c938a58cc7bdb7ea6bebed63521c5b4.zip gcc-727683a51c938a58cc7bdb7ea6bebed63521c5b4.tar.gz gcc-727683a51c938a58cc7bdb7ea6bebed63521c5b4.tar.bz2 |
ifcvt.c (cond_move_process_if_block): Free vectors on false return.
2008-06-30 Kenneth Zadeck <zadeck@naturalbridge.com>
* ifcvt.c (cond_move_process_if_block): Free vectors on false
return.
From-SVN: r137285
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ifcvt.c | 27 |
2 files changed, 27 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3547b54..7c7fd12 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2008-06-30 Kenneth Zadeck <zadeck@naturalbridge.com> + * ifcvt.c (cond_move_process_if_block): Free vectors on false + return. + +2008-06-30 Kenneth Zadeck <zadeck@naturalbridge.com> + * df-scan.c (df_scan_free_ref_vec, df_scan_free_mws_vec): New macros. (df_scan_free_internal): Free data structures not diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index e1601b1..da8afde 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -2614,7 +2614,11 @@ cond_move_process_if_block (struct noce_if_info *if_info) /* Make sure the blocks are suitable. */ if (!check_cond_move_block (then_bb, then_vals, then_regs, cond) || (else_bb && !check_cond_move_block (else_bb, else_vals, else_regs, cond))) - return FALSE; + { + VEC_free (int, heap, then_regs); + VEC_free (int, heap, else_regs); + return FALSE; + } /* Make sure the blocks can be used together. If the same register is set in both blocks, and is not set to a constant in both @@ -2635,7 +2639,11 @@ cond_move_process_if_block (struct noce_if_info *if_info) if (!CONSTANT_P (then_vals[reg]) && !CONSTANT_P (else_vals[reg]) && !rtx_equal_p (then_vals[reg], else_vals[reg])) - return FALSE; + { + VEC_free (int, heap, then_regs); + VEC_free (int, heap, else_regs); + return FALSE; + } } } @@ -2649,7 +2657,11 @@ cond_move_process_if_block (struct noce_if_info *if_info) branches, since if we convert we are going to always execute them. */ if (c > MAX_CONDITIONAL_EXECUTE) - return FALSE; + { + VEC_free (int, heap, then_regs); + VEC_free (int, heap, else_regs); + return FALSE; + } /* Try to emit the conditional moves. First do the then block, then do anything left in the else blocks. */ @@ -2661,11 +2673,17 @@ cond_move_process_if_block (struct noce_if_info *if_info) then_vals, else_vals, true))) { end_sequence (); + VEC_free (int, heap, then_regs); + VEC_free (int, heap, else_regs); return FALSE; } seq = end_ifcvt_sequence (if_info); if (!seq) - return FALSE; + { + VEC_free (int, heap, then_regs); + VEC_free (int, heap, else_regs); + return FALSE; + } loc_insn = first_active_insn (then_bb); if (!loc_insn) @@ -2698,7 +2716,6 @@ cond_move_process_if_block (struct noce_if_info *if_info) VEC_free (int, heap, then_regs); VEC_free (int, heap, else_regs); - return TRUE; } |