public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH GCC8][15/33]Simplify function autoinc_possible_for_pair
@ 2017-04-18 10:46 Bin Cheng
  2017-04-25 15:35 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Bin Cheng @ 2017-04-18 10:46 UTC (permalink / raw)
  To: gcc-patches; +Cc: nd

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

Hi,
This patch simplifies function autoinc_possible_for_pair by deleting unnecessary local variables.
Is it OK?

Thanks,
bin
2017-04-11  Bin Cheng  <bin.cheng@arm.com>

	* tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.

[-- Attachment #2: 0015-autoinc_possible_for_pair-20170220.txt --]
[-- Type: text/plain, Size: 1152 bytes --]

From 09ea8cf6f542ab270ba9994f8491b926fc78237d Mon Sep 17 00:00:00 2001
From: Bin Cheng <binche01@e108451-lin.cambridge.arm.com>
Date: Wed, 1 Mar 2017 14:34:54 +0000
Subject: [PATCH 15/33] autoinc_possible_for_pair-20170220.txt

---
 gcc/tree-ssa-loop-ivopts.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index c9cf9cf..4948a47 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5232,19 +5232,12 @@ static bool
 autoinc_possible_for_pair (struct ivopts_data *data, struct iv_use *use,
 			   struct iv_cand *cand)
 {
-  bitmap inv_vars;
-  bool can_autoinc;
-  comp_cost cost;
-
   if (use->type != USE_ADDRESS)
     return false;
 
-  cost = get_computation_cost (data, use, cand, true, &inv_vars,
-			       &can_autoinc, NULL);
-
-  BITMAP_FREE (inv_vars);
-
-  return !cost.infinite_cost_p () && can_autoinc;
+  bool can_autoinc = false;
+  get_computation_cost (data, use, cand, true, NULL, &can_autoinc, NULL);
+  return can_autoinc;
 }
 
 /* Examine IP_ORIGINAL candidates to see if they are incremented next to a
-- 
1.9.1


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

* Re: [PATCH GCC8][15/33]Simplify function autoinc_possible_for_pair
  2017-04-18 10:46 [PATCH GCC8][15/33]Simplify function autoinc_possible_for_pair Bin Cheng
@ 2017-04-25 15:35 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2017-04-25 15:35 UTC (permalink / raw)
  To: Bin Cheng, gcc-patches; +Cc: nd

On 04/18/2017 04:45 AM, Bin Cheng wrote:
> Hi,
> This patch simplifies function autoinc_possible_for_pair by deleting unnecessary local variables.
> Is it OK?
> 
> Thanks,
> bin
> 2017-04-11  Bin Cheng  <bin.cheng@arm.com>
> 
> 	* tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
> 
OK when prerequisites are installed.
jeff

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

end of thread, other threads:[~2017-04-25 15:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 10:46 [PATCH GCC8][15/33]Simplify function autoinc_possible_for_pair Bin Cheng
2017-04-25 15:35 ` Jeff Law

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).