diff mbox

[1/3] Remove redundant call to force_gimple_operand.

Message ID 1297657022-27675-2-git-send-email-sebpop@gmail.com
State New
Headers show

Commit Message

Sebastian Pop Feb. 14, 2011, 4:17 a.m. UTC
2011-02-08  Sebastian Pop  <sebastian.pop@amd.com>

	* tree-parloops.c (gen_parallel_loop): Remove redundant call to
	force_gimple_operand.
---
 gcc/ChangeLog       |    5 +++++
 gcc/tree-parloops.c |   10 +---------
 2 files changed, 6 insertions(+), 9 deletions(-)

Comments

Richard Biener Feb. 14, 2011, 9:58 a.m. UTC | #1
On Mon, Feb 14, 2011 at 5:17 AM, Sebastian Pop <sebpop@gmail.com> wrote:
> 2011-02-08  Sebastian Pop  <sebastian.pop@amd.com>
>
>        * tree-parloops.c (gen_parallel_loop): Remove redundant call to
>        force_gimple_operand.
> ---
>  gcc/ChangeLog       |    5 +++++
>  gcc/tree-parloops.c |   10 +---------
>  2 files changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index c4f256b..52523ac 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,8 @@
> +2011-02-12  Sebastian Pop  <sebastian.pop@amd.com>
> +
> +       * tree-parloops.c (gen_parallel_loop): Remove redundant call to
> +       force_gimple_operand.
> +
>  2011-02-08  Sebastian Pop  <sebastian.pop@amd.com>
>
>        PR tree-optimization/46834
> diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
> index 9a11f80..19dff68 100644
> --- a/gcc/tree-parloops.c
> +++ b/gcc/tree-parloops.c
> @@ -1780,17 +1780,9 @@ gen_parallel_loop (struct loop *loop, htab_t reduction_list,
>                   invert_truthvalue (unshare_expr (niter->may_be_zero)),
>                   many_iterations_cond);
>   many_iterations_cond
> -    = force_gimple_operand (many_iterations_cond, &stmts, false, NULL_TREE);
> +    = force_gimple_operand (many_iterations_cond, &stmts, true, NULL_TREE);
>   if (stmts)
>     gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts);
> -  if (!is_gimple_condexpr (many_iterations_cond))
> -    {
> -      many_iterations_cond
> -       = force_gimple_operand (many_iterations_cond, &stmts,
> -                               true, NULL_TREE);
> -      if (stmts)
> -       gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts);
> -    }

You can use

   many_iterations_cond
     = force_gimple_operand_1 (many_iterations_cond, &stmts,
                                              is_gimple_condexpr, NULL_TREE);

now.

Richard.

>   initialize_original_copy_tables ();
>
> --
> 1.7.1
>
>
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c4f256b..52523ac 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@ 
+2011-02-12  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* tree-parloops.c (gen_parallel_loop): Remove redundant call to
+	force_gimple_operand.
+
 2011-02-08  Sebastian Pop  <sebastian.pop@amd.com>
 
 	PR tree-optimization/46834
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index 9a11f80..19dff68 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -1780,17 +1780,9 @@  gen_parallel_loop (struct loop *loop, htab_t reduction_list,
 		   invert_truthvalue (unshare_expr (niter->may_be_zero)),
 		   many_iterations_cond);
   many_iterations_cond
-    = force_gimple_operand (many_iterations_cond, &stmts, false, NULL_TREE);
+    = force_gimple_operand (many_iterations_cond, &stmts, true, NULL_TREE);
   if (stmts)
     gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts);
-  if (!is_gimple_condexpr (many_iterations_cond))
-    {
-      many_iterations_cond
-	= force_gimple_operand (many_iterations_cond, &stmts,
-				true, NULL_TREE);
-      if (stmts)
-	gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts);
-    }
 
   initialize_original_copy_tables ();