public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Simplify code in gimple_equal_p
@ 2013-11-09 15:55 Tom de Vries
  2013-11-11  9:38 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2013-11-09 15:55 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

Richard,

This patch simplifies code in gimple_equal_p.

Bootstrapped and regtested on x86_64.

OK for trunk?

Thanks,
- Tom

2013-11-06  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-tail-merge.c (gimple_equal_p): Remove equal variable.

[-- Attachment #2: tmp.patch --]
[-- Type: text/x-patch, Size: 1037 bytes --]

diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c
index db95ce1..00dd071 100644
--- a/gcc/tree-ssa-tail-merge.c
+++ b/gcc/tree-ssa-tail-merge.c
@@ -1085,7 +1085,7 @@ gimple_equal_p (same_succ same_succ, gimple s1, gimple s2)
   tree lhs1, lhs2;
   basic_block bb1 = gimple_bb (s1), bb2 = gimple_bb (s2);
   tree t1, t2;
-  bool equal, inv_cond;
+  bool inv_cond;
   enum tree_code code1, code2;
 
   if (gimple_code (s1) != gimple_code (s2))
@@ -1107,7 +1107,6 @@ gimple_equal_p (same_succ same_succ, gimple s1, gimple s2)
       if (gimple_call_builtin_p (s1, BUILT_IN_TM_COMMIT))
 	return false;
 
-      equal = true;
       for (i = 0; i < gimple_call_num_args (s1); ++i)
 	{
 	  t1 = gimple_call_arg (s1, i);
@@ -1116,11 +1115,8 @@ gimple_equal_p (same_succ same_succ, gimple s1, gimple s2)
 	    continue;
 	  if (gvn_uses_equal (t1, t2))
 	    continue;
-	  equal = false;
-	  break;
+	  return false;
 	}
-      if (!equal)
-	return false;
 
       lhs1 = gimple_get_lhs (s1);
       lhs2 = gimple_get_lhs (s2);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Simplify code in gimple_equal_p
  2013-11-09 15:55 Simplify code in gimple_equal_p Tom de Vries
@ 2013-11-11  9:38 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2013-11-11  9:38 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gcc-patches

On Sat, 9 Nov 2013, Tom de Vries wrote:

> Richard,
> 
> This patch simplifies code in gimple_equal_p.
> 
> Bootstrapped and regtested on x86_64.
> 
> OK for trunk?

Ok.

Thanks,
Richard.

> Thanks,
> - Tom
> 
> 2013-11-06  Tom de Vries  <tom@codesourcery.com>
> 
> 	* tree-ssa-tail-merge.c (gimple_equal_p): Remove equal variable.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-11  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-09 15:55 Simplify code in gimple_equal_p Tom de Vries
2013-11-11  9:38 ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).