Commit 7b14477e by Sebastian Pop Committed by Sebastian Pop

Fix PR44483: incrementally gimplify BB predicates to avoid redundant computations.

2010-06-11  Sebastian Pop  <sebastian.pop@amd.com>

	PR middle-end/44483
	* tree-if-conv.c (bb_predicate_s): New struct.
	(bb_predicate_p): New.
	(bb_has_predicate): New.
	(bb_predicate): New.
	(set_bb_predicate): New.
	(bb_predicate_gimplified_stmts): New.
	(set_bb_predicate_gimplified_stmts): New.
	(add_bb_predicate_gimplified_stmts): New.
	(init_bb_predicate): New.
	(free_bb_predicate): New.
	(is_predicated): Use bb_predicate.
	(add_to_predicate_list): Use bb_predicate and set_bb_predicate.
	(predicate_bbs): Same.  Gimplify the condition of the basic blocks
	before processing their successors.
	(clean_predicate_lists): Removed.
	(find_phi_replacement_condition): Use bb_predicate.
	(process_phi_nodes): Renamed ifconvert_phi_nodes.  Avoid useless
	computations.
	(insert_gimplified_predicates): New.
	(combine_blocks): Call insert_gimplified_predicates.
	(tree_if_conversion): Call free_bb_predicate instead of
	clean_predicate_lists.

	* gcc.dg/tree-ssa/pr44483.c: New.

From-SVN: r160625
parent 1021b0e5
2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/44483
* tree-if-conv.c (bb_predicate_s): New struct.
(bb_predicate_p): New.
(bb_has_predicate): New.
(bb_predicate): New.
(set_bb_predicate): New.
(bb_predicate_gimplified_stmts): New.
(set_bb_predicate_gimplified_stmts): New.
(add_bb_predicate_gimplified_stmts): New.
(init_bb_predicate): New.
(free_bb_predicate): New.
(is_predicated): Use bb_predicate.
(add_to_predicate_list): Use bb_predicate and set_bb_predicate.
(predicate_bbs): Same. Gimplify the condition of the basic blocks
before processing their successors.
(clean_predicate_lists): Removed.
(find_phi_replacement_condition): Use bb_predicate.
(process_phi_nodes): Renamed ifconvert_phi_nodes. Avoid useless
computations.
(insert_gimplified_predicates): New.
(combine_blocks): Call insert_gimplified_predicates.
(tree_if_conversion): Call free_bb_predicate instead of
clean_predicate_lists.
2010-10-11 Paul Brook <paul@codesourcery.com>
* doc/invoke.texi: Document ARM -mcpu=cortex-m4.
......
2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/44483
* gcc.dg/tree-ssa/pr44483.c: New.
2010-06-11 Paul Brook <paul@codesourcery.com>
* g++.dg/other/arm-neon-1.C: New test.
......
/* { dg-do compile } */
/* { dg-options "-c -O3" { target *-*-* } } */
int ffesum (void) {
int ch[4], ii, jj, kk;
char asc[32];
for (ii = 0; ii < 4; ii++)
{
for (jj = 0; jj < 4; jj++)
ch[jj] = ii;
for (kk = 0; kk < 13; kk++)
for (jj = 0; jj < 4; jj += 2)
if ((unsigned char) ch[jj] || (unsigned char) ch[jj + 1])
ch[jj]++;
for (jj = 0; jj < 4; jj++)
asc[4 * jj + ii] = ch[jj];
}
return asc[0];
}
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