Commit 727683a5 by Kenneth Zadeck Committed by Kenneth Zadeck

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
parent 370f38e8
2008-06-30 Kenneth Zadeck <zadeck@naturalbridge.com> 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 * df-scan.c (df_scan_free_ref_vec, df_scan_free_mws_vec): New
macros. macros.
(df_scan_free_internal): Free data structures not (df_scan_free_internal): Free data structures not
......
...@@ -2614,7 +2614,11 @@ cond_move_process_if_block (struct noce_if_info *if_info) ...@@ -2614,7 +2614,11 @@ cond_move_process_if_block (struct noce_if_info *if_info)
/* Make sure the blocks are suitable. */ /* Make sure the blocks are suitable. */
if (!check_cond_move_block (then_bb, then_vals, then_regs, cond) 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))) || (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 /* 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 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) ...@@ -2635,7 +2639,11 @@ cond_move_process_if_block (struct noce_if_info *if_info)
if (!CONSTANT_P (then_vals[reg]) if (!CONSTANT_P (then_vals[reg])
&& !CONSTANT_P (else_vals[reg]) && !CONSTANT_P (else_vals[reg])
&& !rtx_equal_p (then_vals[reg], 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) ...@@ -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 branches, since if we convert we are going to always execute
them. */ them. */
if (c > MAX_CONDITIONAL_EXECUTE) 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, /* Try to emit the conditional moves. First do the then block,
then do anything left in the else blocks. */ then do anything left in the else blocks. */
...@@ -2661,11 +2673,17 @@ cond_move_process_if_block (struct noce_if_info *if_info) ...@@ -2661,11 +2673,17 @@ cond_move_process_if_block (struct noce_if_info *if_info)
then_vals, else_vals, true))) then_vals, else_vals, true)))
{ {
end_sequence (); end_sequence ();
VEC_free (int, heap, then_regs);
VEC_free (int, heap, else_regs);
return FALSE; return FALSE;
} }
seq = end_ifcvt_sequence (if_info); seq = end_ifcvt_sequence (if_info);
if (!seq) 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); loc_insn = first_active_insn (then_bb);
if (!loc_insn) if (!loc_insn)
...@@ -2698,7 +2716,6 @@ cond_move_process_if_block (struct noce_if_info *if_info) ...@@ -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, then_regs);
VEC_free (int, heap, else_regs); VEC_free (int, heap, else_regs);
return TRUE; return TRUE;
} }
......
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