From ef28ff91f71fc5c62cc08d74cf93188aeec9ec08 Mon Sep 17 00:00:00 2001
From: Sebastian Pop <sebpop@gmail.com>
Date: Fri, 25 Jun 2010 11:09:00 -0500
Subject: [PATCH 4/4] Do not insert statements computing the true predicate.
2010-06-25 Sebastian Pop <sebastian.pop@amd.com>
* tree-if-conv.c (insert_gimplified_predicates): Do not insert
statements computing the true predicate.
---
gcc/ChangeLog | 5 +++++
gcc/tree-if-conv.c | 9 +++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
@@ -1,5 +1,10 @@
2010-06-25 Sebastian Pop <sebastian.pop@amd.com>
+ * tree-if-conv.c (insert_gimplified_predicates): Do not insert
+ statements computing the true predicate.
+
+2010-06-25 Sebastian Pop <sebastian.pop@amd.com>
+
* tree-if-conv.c (init_bb_predicate): Initialize the predicate
to boolean_true_node.
(reset_bb_predicate): New.
@@ -1021,6 +1021,15 @@ insert_gimplified_predicates (loop_p loop)
basic_block bb = ifc_bbs[i];
gimple_seq stmts = bb_predicate_gimplified_stmts (bb);
+ if (!is_predicated (bb))
+ {
+ /* Do not insert statements for a basic block that is not
+ predicated. Also make sure that the predicate of the
+ basic block is set to true. */
+ reset_bb_predicate (bb);
+ continue;
+ }
+
if (stmts)
{
gimple_stmt_iterator gsi = gsi_last_bb (bb);
--
1.7.0.4