public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [C Patch]: pr52543
@ 2012-03-30 14:40 Georg-Johann Lay
  2012-03-30 15:36 ` Kenneth Zadeck
  2012-03-30 15:46 ` Richard Sandiford
  0 siblings, 2 replies; 38+ messages in thread
From: Georg-Johann Lay @ 2012-03-30 14:40 UTC (permalink / raw)
  To: Kenneth Zadeck, gcc-patches
  Cc: Ian Lance Taylor, Richard Sandiford, Mike Stump, Kenneth Zadeck, avr

> This patch takes a different approach to fixing PR52543 than does the 
> patch in
> 
> http://gcc.gnu.org/ml/gcc-patches/2012-03/msg00641.html
> 
> This patch transforms the lower-subreg pass(es) from unconditionally 
> splitting wide moves, zero extensions, and shifts, so that it now takes 
> into account the target specific costs and only does the transformations 
> if it is profitable.

As far as I understand the pass, it's not only about splitting these instructions
but also to the additional benefits of the split, i.e.  AND 0xfffffffe will only need
one QI operation instead of 1 SI operation that costs 4 QI.

And in fact, the positive benefit of subreg-lowering occurs with bit-wise operations
like AND, IOR, EOR etc.

And one problem is that the pass is not sensitive to address spaces.
For example, HI splits for generic space are profitable, for non-generic
they are not. 

Thus, a patch should also address address-space sensivity.

> Unconditional splitting is a problem that not only occurs on the AVR but 
> is also a problem on the ARM NEON and my private port.  Furthermore, it 
> is a problem that is likely to occur on most modern larger machines 
> since these machines are more likely to have fast instructions for 
> moving things that are larger than word mode.
> 
> At compiler initialization time, each mode that is larger that a word 
> mode is examined to determine if the cost of moving a value of that mode 
> is less expensive that inserting the proper number of word sided 
> moves.   If it is cheaper to split it up, a bit is set to allow moves of 
> that mode to be lowered.

As written above, the mode is *not* enough. For MEM there are is also
address space involved.

Johann

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

end of thread, other threads:[~2012-07-12 21:14 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4F67D595.9030700@naturalbridge.com>
     [not found] ` <mcrd387n9bf.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
     [not found]   ` <4F6881EA.9080306@naturalbridge.com>
     [not found]     ` <mcrvclzl7b7.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
     [not found]       ` <4F6889CC.8080302@naturalbridge.com>
     [not found]         ` <mcrr4wnl6lb.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
2012-03-29 21:10           ` [C Patch]: pr52543 Kenneth Zadeck
2012-03-30  8:34             ` Ramana Radhakrishnan
2012-03-30 10:09             ` Richard Sandiford
2012-03-30 15:25               ` Kenneth Zadeck
2012-03-30 15:41                 ` Richard Sandiford
2012-03-31 16:21                   ` Kenneth Zadeck
2012-04-03 13:53                     ` Richard Sandiford
2012-04-03 15:33                       ` Kenneth Zadeck
2012-04-03 19:20                         ` Richard Sandiford
2012-04-03 20:36                           ` Ian Lance Taylor
2012-05-01 14:47                             ` Richard Sandiford
2012-05-01 17:51                               ` H.J. Lu
2012-05-03 19:52                               ` Georg-Johann Lay
2012-05-03 22:14                                 ` Mike Stump
2012-05-04 23:02                                   ` Georg-Johann Lay
2012-05-06 18:55                                     ` [committed] Fix lower-subreg cost calculation Richard Sandiford
2012-05-08 15:26                                       ` Richard Earnshaw
2012-05-08 21:42                                         ` Richard Sandiford
2012-05-09  9:48                                           ` Richard Earnshaw
2012-05-07 19:01                                     ` [C Patch]: pr52543 Mike Stump
2012-05-09  6:02                               ` Fix gcc.dg/lower-subreg-1.c failure (was: [C Patch]: pr52543) Hans-Peter Nilsson
2012-05-09  9:15                                 ` Fix gcc.dg/lower-subreg-1.c failure Richard Sandiford
2012-05-09 16:37                                   ` Hans-Peter Nilsson
2012-07-07 23:03                                   ` Fix gcc.dg/lower-subreg-1.c failure, revisited Hans-Peter Nilsson
2012-07-08 12:14                                     ` Richard Sandiford
2012-07-12 21:14                                     ` Hans-Peter Nilsson
2012-05-16  6:25                                 ` ping: Fix gcc.dg/lower-subreg-1.c failure (was: [C Patch]: pr52543) Hans-Peter Nilsson
2012-05-23  4:42                                   ` ping*2: " Hans-Peter Nilsson
2012-05-30  2:49                                     ` ping*3: " Hans-Peter Nilsson
2012-06-07  5:39                                       ` ping*4: " Hans-Peter Nilsson
2012-04-03 16:22                       ` [C Patch]: pr52543 Ian Lance Taylor
2012-05-10  6:45               ` Paolo Bonzini
2012-05-10  6:54                 ` Paolo Bonzini
     [not found]             ` <CACUk7=XVO=yHrPBFtAVfPxMtViYthtGGfuQSVGHNqHE7ibER0g@mail.gmail.com>
2012-03-30 19:29               ` Kenneth Zadeck
2012-03-30 22:38                 ` Ramana Radhakrishnan
2012-03-30 14:40 Georg-Johann Lay
2012-03-30 15:36 ` Kenneth Zadeck
2012-03-30 15:46 ` Richard Sandiford

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