public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com
Subject: Re: [PATCH 6/6] rs6000: Clean up the various rlwinm patterns
Date: Mon, 11 May 2015 18:17:00 -0000	[thread overview]
Message-ID: <alpine.LFD.2.11.1505111844080.1538@eddie.linux-mips.org> (raw)
In-Reply-To: <20150510194453.GA2521@gate.crashing.org>

On Sun, 10 May 2015, Segher Boessenkool wrote:

> >  This clearly renames rather than removing the `rlwinm' pattern, please 
> > correctly reflect that in ChangeLog.  Some other, unnamed patterns are 
> > given names rather than deleted as well, just as you've noted at the top.  
> > And none of the other changes are mentioned in your ChangeLog entry.
> 
> The changelog says it deletes the patterns with the old names.  Which it
> does.  And it adds the ones with the new names.  Which it does.  No one
> said changelogs are useful ;-)

 No one?  Well, I'm saying it now, then. :)

> >  Would you be able to split this change up further by any chance?  
> 
> I could, but it would be a lot of extra work.  First, I haven't done those
> steps in order (they aren't "steps" at all): I take one pattern, and fix
> it up, then the next, etc.

 Yeah, I know the pain, it's usually how it happens.  You start cleaning 
up things and then you find yourself having done a number conceptually 
independent changes that overlap one another in the source modified.  
I've been through it many times.

 The thing is this extra work of untangling is worth doing as it'll help 
the maintainer and other members of the community, including those 
investigating change history months if not years from now for one reason 
or another, understand what the consequences of conceptually individual 
changes are.

 Specifically which changes are obviously harmless (e.g. formatting 
changes or the addition of debug `*' pattern names) and which are 
potential trouble makers (e.g. the reordering of operands or folding 
`define_insn' and `define_split' into `define_insn_and_split'), that e.g. 
need to be taken into account when porting changes that may rely on them.  
When all the bits are lumped together, it's very difficult to decipher 
them and easy to miss something.

 So I've done such patch splitting and rearrangement many times, using 
various techniques.  For example it's often faster and easier if you 
hand-edit the patch being split into two rather than trying to reproduce 
the intermediate stage in the source being patched.  Other people may have 
other hints and tricks.

 Of course you'll want to keep the original final version of the file 
changed around and then you can compare it to the result of applying a 
patch series, to make sure both results are identical.

> But much worse: if you do tiny pattern changes like you suggest, I can
> guarantee you the patches _will_ mis-apply.  All of the time :-(

 Well, if you get the line numbers recorded in patches right, which is how 
`diff' generates them, then it won't happen.  And as a committer you can 
verify you applied your own patches correctly, by taking a diff against 
your original patched version before pushing the changes into the repo. 
Especially when other upstream source changes have since caused line 
numbers to shift.

> > change addresses a single issue only.  That would avoid problems with 
> > ChangeLog and make the review easier.
> 
> This isn't the first patch like this, I've cleaned up most other PowerPC
> integer patterns already.  It's enough work already.  Often the changes
> cannot be separated, and even if they can you then need them in the fixed
> order you made for them, etc.

 Of course changes can be separated (if they cannot, then they weren't 
really conceptually separate in the first place), and you do need to get 
the order right.  E.g. patches that are potentially of interest to older 
release branches need to go first, followed by ones that are meant to stay 
on trunk only.

 I'll leave it up to David to decide anyway as he's the port maintainer, 
and I'm only a member of the community who happened to poke at this port 
once or twice in the past.

  Maciej

  reply	other threads:[~2015-05-11 18:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-10 16:14 [PATCH 0/6] Getting rid of some zero_ext* patterns Segher Boessenkool
2015-05-10 16:14 ` [PATCH 1/6] combine: undo_to_marker Segher Boessenkool
2015-05-11  4:10   ` Jeff Law
2015-05-10 16:15 ` [PATCH 3/6] rs6000: Don't use zero_extract in the bswap:HI splitter Segher Boessenkool
2015-05-11 15:32   ` David Edelsohn
2015-05-10 16:15 ` [PATCH 2/6] combine: If recog fails, try again with zero_ext{ract,end} simplified Segher Boessenkool
2015-05-11  4:15   ` Jeff Law
2015-05-11  6:18     ` Segher Boessenkool
2015-05-12  8:25   ` Kyrill Tkachov
2015-05-12 11:16     ` Segher Boessenkool
2015-05-10 16:16 ` [PATCH 6/6] rs6000: Clean up the various rlwinm patterns Segher Boessenkool
2015-05-10 18:02   ` Maciej W. Rozycki
2015-05-10 19:45     ` Segher Boessenkool
2015-05-11 18:17       ` Maciej W. Rozycki [this message]
2015-05-11 15:31   ` David Edelsohn
2015-05-10 16:16 ` [PATCH 4/6] rs6000: Delete some now-superfluous zero_ext{end,ract} patterns Segher Boessenkool
2015-05-11 15:29   ` David Edelsohn
2015-05-10 16:16 ` [PATCH 5/6] rs6000: Don't use gen_rlwinm Segher Boessenkool
2015-05-11 15:30   ` David Edelsohn
2015-05-12 14:01 ` [PATCH 0/6] Getting rid of some zero_ext* patterns Segher Boessenkool

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=alpine.LFD.2.11.1505111844080.1538@eddie.linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    /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).