public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Committed][PR64895] Use actual_call_used_reg_set to find conflicting regs
@ 2015-03-12 12:17 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2015-03-12 12:17 UTC (permalink / raw)
  To: Vladimir Makarov; +Cc: GCC Patches

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

Hi,

This patch fixes PR64895, related to the gcc.target/i386/fuse-caller-save*.c 
failures for -m32 -fpic.

Bootstrapped and reg-tested on x86_64 for unix/ and unix/-m32.
Build and reg-tested on x86_64 for unix/fpic and unix/fpic/-m32.

Approved here ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64895#c7 ):
...
The patch looks ok to me.  Tom, could you prepare the patch (check it mostly for 
x86-64 bootstrap and testsuite) and commit it to the trunk.  I approve it.
...

Thanks,
- Tom

[-- Attachment #2: 0001-Use-actual_call_used_reg_set-to-find-conflicting-reg.patch --]
[-- Type: text/x-patch, Size: 1002 bytes --]

2015-03-12  Tom de Vries  <tom@codesourcery.com>

	PR rtl-optimization/64895
	* lra-lives.c (check_pseudos_live_through_calls): Use
	actual_call_used_reg_set instead of call_used_reg_set, if available.

diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c
index 9dfffb6..5d759ca 100644
--- a/gcc/lra-lives.c
+++ b/gcc/lra-lives.c
@@ -636,8 +636,12 @@ check_pseudos_live_through_calls (int regno)
   if (! sparseset_bit_p (pseudos_live_through_calls, regno))
     return;
   sparseset_clear_bit (pseudos_live_through_calls, regno);
+  bool actual_call_used_reg_set_available_p
+    = !hard_reg_set_empty_p (lra_reg_info[regno].actual_call_used_reg_set);
   IOR_HARD_REG_SET (lra_reg_info[regno].conflict_hard_regs,
-		    call_used_reg_set);
+		    (actual_call_used_reg_set_available_p
+		     ? lra_reg_info[regno].actual_call_used_reg_set
+		     : call_used_reg_set));
 
   for (hr = 0; hr < FIRST_PSEUDO_REGISTER; hr++)
     if (HARD_REGNO_CALL_PART_CLOBBERED (hr, PSEUDO_REGNO_MODE (regno)))
-- 
1.9.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-12 12:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12 12:17 [Committed][PR64895] Use actual_call_used_reg_set to find conflicting regs Tom de Vries

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