public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][PR48170] Remove bogus asserts from gcse.c
@ 2011-03-18 11:09 Maxim Kuvyrkov
  2011-03-18 14:04 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Maxim Kuvyrkov @ 2011-03-18 11:09 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jeff Law

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

PR48170 is about an ICE in code hoisting when using non-default parameter value.  The ICE is due to an outdated assert; the attached patch simply removes it.  I will commit the patch under the trivial rule if no one objects in 24 hours.

The asserts used to verify an invariant that held true before a subsequent improvement to code hoisting was committed.  The asserts were active only when a non-default value is used for the max-hoist-depth parameter, so no one noticed the outdated sanity checks before now.

Thanks,

--
Maxim Kuvyrkov
Mentor Graphics / CodeSourcery
+7-812-677-6839


[-- Attachment #2: gcse-assert-1.ChangeLog --]
[-- Type: application/octet-stream, Size: 127 bytes --]

2011-03-18  Maxim Kuvyrkov  <maxim@codesourcery.com>

	PR rtl-optimization/48170
	* gcse.c (hoist_code): Remove bogus asserts.

[-- Attachment #3: gcse-assert-1.patch --]
[-- Type: application/octet-stream, Size: 790 bytes --]

diff --git a/gcc/gcse.c b/gcc/gcse.c
index 27f7e8f..c010d86 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -4520,9 +4520,7 @@ hoist_code (void)
 		    {
 		      /* An occurence might've been already deleted
 			 while processing a dominator of BB.  */
-		      if (occr->deleted_p)
-			gcc_assert (MAX_HOIST_DEPTH > 1);
-		      else
+		      if (!occr->deleted_p)
 			{
 			  gcc_assert (NONDEBUG_INSN_P (occr->insn));
 			  hoistable++;
@@ -4554,10 +4552,7 @@ hoist_code (void)
 		  /* An occurence might've been already deleted
 		     while processing a dominator of BB.  */
 		  if (occr->deleted_p)
-		    {
-		      gcc_assert (MAX_HOIST_DEPTH > 1);
-		      continue;
-		    }
+		    continue;
 		  gcc_assert (NONDEBUG_INSN_P (occr->insn));
 
 		  max_distance = expr->max_distance;

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

* Re: [PATCH][PR48170] Remove bogus asserts from gcse.c
  2011-03-18 11:09 [PATCH][PR48170] Remove bogus asserts from gcse.c Maxim Kuvyrkov
@ 2011-03-18 14:04 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2011-03-18 14:04 UTC (permalink / raw)
  To: Maxim Kuvyrkov; +Cc: gcc-patches

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/18/11 05:09, Maxim Kuvyrkov wrote:
> PR48170 is about an ICE in code hoisting when using non-default parameter value.  The ICE is due to an outdated assert; the attached patch simply removes it.  I will commit the patch under the trivial rule if no one objects in 24 hours.
> 
> The asserts used to verify an invariant that held true before a subsequent improvement to code hoisting was committed.  The asserts were active only when a non-default value is used for the max-hoist-depth parameter, so no one noticed the outdated sanity checks before now.
> 
OK.
jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNg2ZgAAoJEBRtltQi2kC7et8H/jksKM/N+A6ckuS7eQiYeILX
m7AsYYwuk0x7zKzEXXUAwMJJNMxWW1OWdF0TSh9KaC9rTLvSIiC/riO2qJYS82ty
k2TfaTWOMNNBHzHAoDe5HeNW36QCAdwL/pkcmWrR0Kxx1VxE3JAJXD8m5ZbUOJyO
32EEAHCxGfv8LTI1ueItN3XznxmDlNnD82YZAFi/o5rJPNFzTdj07AptRHpCvjby
PE6R2ls7DK1+U0Npl/kVdGiZy9k4IVN7qecFLdQ0bGDd6vuhhMS/mLhtXqivvSTE
u9d2xELYEtBeRya1wAucAdH7kH5eH4H5TQWjXZ1GxaNElxVPm3FUSVR/Z5PrBDI=
=Kv2/
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~2011-03-18 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-18 11:09 [PATCH][PR48170] Remove bogus asserts from gcse.c Maxim Kuvyrkov
2011-03-18 14:04 ` 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).