diff mbox

[PR43920,4/9] Cross-jumping - Don't count use or clobber.

Message ID 4D94C957.6010800@codesourcery.com
State New
Headers show

Commit Message

Tom de Vries March 31, 2011, 6:35 p.m. UTC
Currently uses and clobbers are counted as insns in crossjumping, which
can cause undesirable crossjumping.  The patch fixes this.

Thanks,
- Tom

Comments

Jeff Law March 31, 2011, 6:36 p.m. UTC | #1
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/31/11 12:35, Tom de Vries wrote:
> Currently uses and clobbers are counted as insns in crossjumping, which
> can cause undesirable crossjumping.  The patch fixes this.
OK.  Please install.

jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNlMmRAAoJEBRtltQi2kC7ywUH/ivnGe5uPvAimV15fE8GzqYa
4wIwiffn/8+Rc+0aallBeyFsz85oAVjb7WpgkHQK1JI1n/EBEutIAQgyyKU07OaR
GFaylhyll4UgMaAN6Z1Czoy4a02KD7DgqBqIlBDZScikQiLPrFB7Awm/3sX+g/cD
5u2PODqwNa2lVT4Ob7+a6tuovUC7QfZgojeQ3OK5BEzJRENA2OcGavRIQAdr8nio
NIG4NTOrN8YpL08o8xOW5HImDeA1uxvH1ejYt11S8z00DtlFgqMMoQBVcHJ1yfg7
nXUmKRpSTrQcuQ2fEbKIIE/bI56X/FuTJ2FnA4bq/llSyBmpbzNmmWXeVz0dW4M=
=oLgw
-----END PGP SIGNATURE-----
Tom de Vries March 31, 2011, 7:02 p.m. UTC | #2
Hi Jeff,

On 03/31/2011 08:36 PM, Jeff Law wrote:

> On 03/31/11 12:35, Tom de Vries wrote:
>> Currently uses and clobbers are counted as insns in crossjumping, which
>> can cause undesirable crossjumping.  The patch fixes this.
> OK.  Please install.
> 
> jeff

I don't have an account at sourceware.org. Can I ask you to sponsor my
application?

Thanks,
- Tom
Jeff Law March 31, 2011, 7:09 p.m. UTC | #3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/31/11 13:02, Tom de Vries wrote:
> Hi Jeff,
> 
> On 03/31/2011 08:36 PM, Jeff Law wrote:
> 
>> On 03/31/11 12:35, Tom de Vries wrote:
>>> Currently uses and clobbers are counted as insns in crossjumping, which
>>> can cause undesirable crossjumping.  The patch fixes this.
>> OK.  Please install.
>>
>> jeff
> 
> I don't have an account at sourceware.org. Can I ask you to sponsor my
> application?
Of course.  Though you'll want an account on gcc.gnu.org -- while
sourceware.org and gcc.gnu.org share a physical machine, most of their
infrastructure is separate...

jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNlNF0AAoJEBRtltQi2kC7SAwH/jK5o8ptAOTXlVpjF1rz6Vly
iUWPjStMShkyhYuq7qZh4g0mOqVc6yibrkiaXFlURYi+LCxgkA7cxmA7CxVeHReM
jl2FJKjQcHO1FJxOELfHY5U8J51sf7x7ccCiaNYau7Wmb0FylEPpWn/9p7Yjar0l
qNx+BmY6NyXRYddQI8pSxI8fl2ishOCi3bOAS4X36N+YxbfjYHkjxgQ3BC0W2uKp
b7hviW8QWaJx/cQr+dyxLQNrHrMZ20Vzur8mIFY1vn4+Ms/VQktLsOaXsX4egVRC
iDLLAsLtGq1xXjhEaaCDfEUK7U5V2ipNMEbiS+NwCu6R3B2oCTeFET6BL2eWTl4=
=VCx+
-----END PGP SIGNATURE-----
diff mbox

Patch

Index: gcc/cfgcleanup.c
===================================================================
--- gcc/cfgcleanup.c	(revision 170556)
+++ gcc/cfgcleanup.c	(working copy)
@@ -1074,6 +1074,7 @@  flow_find_cross_jump (basic_block bb1, b
 {
   rtx i1, i2, last1, last2, afterlast1, afterlast2;
   int ninsns = 0;
+  rtx p1;
 
   /* Skip simple jumps at the end of the blocks.  Complex jumps still
      need to be compared for equivalence, which we'll do below.  */
@@ -1122,7 +1123,9 @@  flow_find_cross_jump (basic_block bb1, b
 
 	  afterlast1 = last1, afterlast2 = last2;
 	  last1 = i1, last2 = i2;
-	  ninsns++;
+	  p1 = PATTERN (i1);
+	  if (!(GET_CODE (p1) == USE || GET_CODE (p1) == CLOBBER))
+            ninsns++;
 	}
 
       i1 = PREV_INSN (i1);