public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom de Vries <Tom_deVries@mentor.com>
To: Vladimir Makarov <vmakarov@redhat.com>
Cc: Ulrich Weigand <uweigand@de.ibm.com>,
	Steven Bosscher	<stevenb.gcc@gmail.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	Radovan Obradovic <robradovic@mips.com>
Subject: Re: [PATCH][IRA] Analysis of register usage of functions for usage by IRA.
Date: Thu, 04 Sep 2014 07:37:00 -0000	[thread overview]
Message-ID: <540816A0.20607@mentor.com> (raw)
In-Reply-To: <540748BE.9070205@mentor.com>

On 03-09-14 18:58, Tom de Vries wrote:
> I've build the patch and ran the fuse-caller-save tests, and I'm currently
> bootstrapping and reg-testing it on x86_64.
>

Vladimir,

This patch fixes a problem (found on s390) in one of the committed 
fuse-caller-save patches. s390 is the only user of the 
IRA_HARD_REGNO_ADD_COST_MULTIPLIER target macro. The problem in the 
fuse-caller-save patch is that the code guarded by 
IRA_HARD_REGNO_ADD_COST_MULTIPLIER in ira_tune_allocno_costs is not 
call-related, but is now conditional on a ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS 
test. This patch fixes that.

Bootstrapped and reg-tested on x86_64. No issues found ( other than a 
non-reproducible failure while testing the non-bootstrap version: 
https://gcc.gnu.org/ml/gcc/2014-09/msg00065.html ).

OK for trunk ?

Thanks,
- Tom

2014-09-04  Tom de Vries  <tom@codesourcery.com>

	* ira-costs.c (ira_tune_allocno_costs): Don't conditionalize
	IRA_HARD_REGNO_ADD_COST_MULTIPLIER code on
	ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS.

>
>
> 0001-Fix-IRA_HARD_REGNO_ADD_COST_MULTIPLIER-in-ira_tune_a.patch
>
>
> diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c
> index 774a958..57239f5 100644
> --- a/gcc/ira-costs.c
> +++ b/gcc/ira-costs.c
> @@ -2217,21 +2217,19 @@ ira_tune_allocno_costs (void)
>   	      crossed_calls_clobber_regs
>   		= &(ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS (a));
>   	      if (ira_hard_reg_set_intersection_p (regno, mode,
> -						   *crossed_calls_clobber_regs))
> -		{
> -		  if (ira_hard_reg_set_intersection_p (regno, mode,
> +						   *crossed_calls_clobber_regs)
> +		  && (ira_hard_reg_set_intersection_p (regno, mode,
>   						       call_used_reg_set)
> -		      || HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
> -		    cost += (ALLOCNO_CALL_FREQ (a)
> -			     * (ira_memory_move_cost[mode][rclass][0]
> -				+ ira_memory_move_cost[mode][rclass][1]));
> +		      || HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
> +		cost += (ALLOCNO_CALL_FREQ (a)
> +			 * (ira_memory_move_cost[mode][rclass][0]
> +			    + ira_memory_move_cost[mode][rclass][1]));
>   #ifdef IRA_HARD_REGNO_ADD_COST_MULTIPLIER
> -		  cost += ((ira_memory_move_cost[mode][rclass][0]
> -			    + ira_memory_move_cost[mode][rclass][1])
> -			   * ALLOCNO_FREQ (a)
> -			   * IRA_HARD_REGNO_ADD_COST_MULTIPLIER (regno) / 2);
> +	      cost += ((ira_memory_move_cost[mode][rclass][0]
> +			+ ira_memory_move_cost[mode][rclass][1])
> +		       * ALLOCNO_FREQ (a)
> +		       * IRA_HARD_REGNO_ADD_COST_MULTIPLIER (regno) / 2);
>   #endif
> -		}
>   	      if (INT_MAX - cost < reg_costs[j])
>   		reg_costs[j] = INT_MAX;
>   	      else

  parent reply	other threads:[~2014-09-04  7:37 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25 13:05 Tom de Vries
2013-01-25 15:46 ` Vladimir Makarov
2013-02-07 19:12   ` Tom de Vries
2013-02-13 22:35     ` Vladimir Makarov
2013-03-14  9:35       ` Tom de Vries
2013-03-14 15:22         ` Vladimir Makarov
2013-03-29 12:54           ` Tom de Vries
2013-03-29 13:06             ` [PATCH][02/10] -fuse-caller-save - Add new reg-note REG_CALL_DECL Tom de Vries
2013-03-29 13:06             ` [PATCH][09/10] -fuse-caller-save - Add documentation Tom de Vries
2013-03-29 13:06             ` [PATCH][06/10] -fuse-caller-save - Collect register usage information Tom de Vries
2013-03-29 13:06             ` [PATCH][07/10] -fuse-caller-save - Use collected " Tom de Vries
2013-03-29 13:06             ` [PATCH][08/10] -fuse-caller-save - Enable by default at O2 and higher Tom de Vries
2013-03-29 13:06             ` [PATCH][10/10] -fuse-caller-save - Add test-case Tom de Vries
2013-03-29 13:06             ` [PATCH][03/10] -fuse-caller-save - Add implicit parameter to find_all_hard_reg_sets Tom de Vries
2013-03-29 13:06             ` [PATCH][01/10] -fuse-caller-save - Add command line option Tom de Vries
2013-03-29 13:06             ` [PATCH][04/10] -fuse-caller-save - Add TARGET_FN_OTHER_HARD_REG_USAGE hook Tom de Vries
2013-03-29 13:06             ` [PATCH][05/10] -fuse-caller-save - Implement TARGET_FN_OTHER_HARD_REG_USAGE hook for ARM Tom de Vries
2013-03-30 16:10             ` [PATCH][IRA] Analysis of register usage of functions for usage by IRA Tom de Vries
2014-01-09 14:42               ` Richard Earnshaw
2014-01-09 20:56                 ` Tom de Vries
2014-01-09 21:10                   ` Andi Kleen
2014-01-10  0:22                     ` Tom de Vries
2014-01-10 11:39                   ` Richard Earnshaw
2014-01-10 16:44                     ` Tom de Vries
2014-01-13 16:16                     ` Tom de Vries
2014-01-14 10:00                       ` Richard Earnshaw
2013-03-30 17:11             ` [PATCH][01/10] -fuse-caller-save - Add command line option Tom de Vries
2013-03-30 17:11             ` [PATCH][05/10] -fuse-caller-save - Implement TARGET_FN_OTHER_HARD_REG_USAGE hook for ARM Tom de Vries
2013-12-06  0:54               ` Tom de Vries
2013-12-09 10:03                 ` Richard Earnshaw
2013-03-30 17:11             ` [PATCH][02/10] -fuse-caller-save - Add new reg-note REG_CALL_DECL Tom de Vries
2013-03-30 17:11             ` [PATCH][06/10] -fuse-caller-save - Collect register usage information Tom de Vries
2013-03-30 17:11             ` [PATCH][03/10] -fuse-caller-save - Add implicit parameter to find_all_hard_reg_sets Tom de Vries
2013-03-30 17:11             ` [PATCH][04/10] -fuse-caller-save - Add TARGET_FN_OTHER_HARD_REG_USAGE hook Tom de Vries
2013-12-07 15:07               ` [PATCH] -fuse-caller-save - Implement TARGET_FN_OTHER_HARD_REG_USAGE hook for MIPS Tom de Vries
2013-12-25 13:02                 ` Tom de Vries
2014-01-09 13:51                   ` [PING^2][PATCH] " Tom de Vries
2014-01-09 15:31                     ` Richard Sandiford
2014-01-09 23:43                       ` Tom de Vries
2014-01-10  8:47                         ` Richard Sandiford
2014-01-13 15:04                           ` Tom de Vries
2013-03-30 17:12             ` [PATCH][10/10] -fuse-caller-save - Add test-case Tom de Vries
2013-04-28 10:57               ` Richard Sandiford
2013-12-06  0:34                 ` Tom de Vries
2013-12-06  8:51                   ` Richard Sandiford
2013-03-30 17:12             ` [PATCH][07/10] -fuse-caller-save - Use collected register usage information Tom de Vries
2013-12-06  0:56               ` Tom de Vries
2013-12-06  9:11                 ` Paolo Bonzini
2013-03-30 17:12             ` [PATCH][08/10] -fuse-caller-save - Enable by default at O2 and higher Tom de Vries
2013-03-30 17:12             ` [PATCH][09/10] -fuse-caller-save - Add documentation Tom de Vries
2013-12-06  0:47         ` [PATCH][IRA] Analysis of register usage of functions for usage by IRA Tom de Vries
2014-01-14 19:36           ` Vladimir Makarov
2014-05-30  9:20             ` Tom de Vries
2014-09-01 16:41 ` Ulrich Weigand
2014-09-03 16:58   ` Tom de Vries
2014-09-03 18:12     ` Ulrich Weigand
2014-09-03 22:24       ` Tom de Vries
2014-09-04  7:37     ` Tom de Vries [this message]
2014-09-04 14:55       ` Vladimir Makarov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=540816A0.20607@mentor.com \
    --to=tom_devries@mentor.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=robradovic@mips.com \
    --cc=stevenb.gcc@gmail.com \
    --cc=uweigand@de.ibm.com \
    --cc=vmakarov@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).