From: Mark Mitchell <mark@codesourcery.com>
To: Steven Bosscher <stevenb.gcc@gmail.com>
Cc: Paul Brook <paul@codesourcery.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix CSE bogus RTL creation
Date: Tue, 15 Jun 2010 14:52:00 -0000 [thread overview]
Message-ID: <4C178976.1060707@codesourcery.com> (raw)
In-Reply-To: <AANLkTinoWv90ExwsZ4gBivLTGDQwjBx87Lq2RQ0VGgY-@mail.gmail.com>
Steven Bosscher wrote:
>>> 2010-06-14 Paul Brook <paul@codesourcery.com>
>>>
>>> gcc/
>>> * cse.c (cse_process_notes_1): Call simplify_rtx is a substitution
>>> was made.
> How is this obvious?
> It makes me suspect that this change only papers over a bug elsewhere,
> where a note replacement in an insn is not validated properly.
I think we worry too much about that. Or, rather, we confuse
*suboptimal* patches with *wrong* patches.
A wrong patch is one that will make the compiler generate wrong code, or
slow code, or cause an ICE, or do some other user-observable bad thing.
A suboptimal patch is one for which there exists a superior
implementation technique, possibly involving some much larger reworking
of the sourcebase, that would produce a solution to more problems, a
more elegant solution to the same problem, or in some other way be superior.
Of course, I am all for superior patches, good infrastructure,
clean-ups, and so forth. But, it seemed clear to me that (a)
validate_change wasn't in the business of making canonical RTL, and (b)
simplify_rtx was, and (c) this patch made the compiler better from a
user-observable point of view, in that it eliminated crashes, and (d)
there had been some previous discussion suggesting this approach, and
(e) I couldn't see any user-observable harm it would do, and (f) it was
a small local change.
I think that should be good enough. Now, of course, if you have an idea
about how to do it better, I think that's great! A more general, more
elegant solution would be terrific. But, I don't want perfect to be the
enemy of good.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
next prev parent reply other threads:[~2010-06-15 14:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-15 2:33 Paul Brook
2010-06-15 2:35 ` Mark Mitchell
2010-06-15 8:21 ` Steven Bosscher
2010-06-15 9:47 ` Paolo Bonzini
2010-06-15 10:07 ` Paolo Bonzini
2010-06-15 10:44 ` Steven Bosscher
2010-06-15 12:35 ` Paolo Bonzini
2010-06-15 14:52 ` Mark Mitchell [this message]
2010-06-15 16:17 ` Paolo Bonzini
2010-07-22 22:17 ` Steven Bosscher
2010-08-04 22:28 ` Mark Mitchell
2010-08-04 23:07 ` Paolo Bonzini
2010-08-05 0:16 ` Mark Mitchell
2010-09-09 20:46 ` Steven Bosscher
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=4C178976.1060707@codesourcery.com \
--to=mark@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=paul@codesourcery.com \
--cc=stevenb.gcc@gmail.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).