public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/5] New implementation of SRA
@ 2009-04-28 10:10 Martin Jambor
  2009-04-28 10:10 ` [PATCH 4/5] Fix indirect inlining fallout with new intra-SRA Martin Jambor
                   ` (4 more replies)
  0 siblings, 5 replies; 25+ messages in thread
From: Martin Jambor @ 2009-04-28 10:10 UTC (permalink / raw)
  To: GCC Patches; +Cc: Richard Guenther, Jan Hubicka


Hi,

this  patch  set contains  my  new  implementation of  intraprocedural
Scalar Replacement of Aggregates (SRA)  that I would like to commit to
trunk first.  It is essentially a  part of the merge of the pretty-ipa
branch   because  a   (only  slightly   different)  variant   of  this
implementation   was  on  that   branch  for   a  number   of  months.
Nevertheless,  this patch  set  does not  contain the  interprocedural
variant, IPA-SRA  that I posted here  earlier.  I will send  that as a
followup patch later (hopefully once this is in).

Unlike  the  previous  SRA,  this  one is  not  based  on  decomposing
aggregate  types and references  but on  get_ref_base_and_extent() and
classifying accesses into aggregates on the basis of their offsets and
sizes.   It  only  creates  scalar  replacements and  only  for  those
components that are actually individually accessed in a function.  The
main advantages of this new implementation are that:

  - It is able to scalarize unions and aggregates that contain unions
    (PR 32964).  Moreover, there are potentially other scalarizable
    accesses caught by get_ref_base_and_extent() that are not by
    simple reference analysis, an example is an access to a
    one-element array that is not at the end of a structure.

  - It is simpler.  In fact, simplicity was the main objective of this
    new implementation.   On the  other hand, whenever  performance or
    bogus warning avoidance required  it (the two were usually tightly
    connected), necessary computations and data structures were added,
    even though some are not super simple.

    Still, with comments stripped off, the new implementation has 2246
    lines of code  whereas the old one has 3375.   I also believe it's
    easier to grasp how the new one works, though my view is obviously
    skewed.  Hopefully, it contains less bugs and makes those that are
    there easier to hunt down.   Avoiding all sorts of trickeries also
    makes reasoning of SRA's effects on the code easier.


Its behavior  on the  branch shows  that it does  not bring  about any
non-noise compile  time or run  time regressions.  My isolated  and so
far rather  sloppy benchmarks of  this particular version  suggest the
same thing.  Nevertheless, I am  about to test it thoroughly using one
of our  automated testers.   If there are  indeed no problems,  I will
propose that these patches are committed to trunk.

Because I belive  that the final version will be  very similar to this
one, I'd like to  invite others, especially middle-end maintainers, to
review it.

I have bootstrapped and tested the patches on x86_64-linux-gnu without
any problems.  I intend to do that  on i686 and I'd like to do that on
hppa-linux-gnu  too  but trunk  does  not  bootstrap  there as  it  is
(probably one of the post expand-from-SSA issues).  I'll keep trying.

Thank you very much in advance,

Martin

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

end of thread, other threads:[~2009-05-20 10:23 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-28 10:10 [PATCH 0/5] New implementation of SRA Martin Jambor
2009-04-28 10:10 ` [PATCH 4/5] Fix indirect inlining fallout with new intra-SRA Martin Jambor
2009-04-28 12:15   ` Richard Guenther
2009-04-29 12:39     ` Martin Jambor
2009-04-29 13:13       ` Richard Guenther
2009-05-20 10:23         ` Martin Jambor
2009-04-28 10:10 ` [PATCH 2/5] Make tree-complex.c:extract_component() handle V_C_Es Martin Jambor
2009-04-28 11:52   ` Richard Guenther
2009-05-20 10:20     ` Martin Jambor
2009-04-28 10:11 ` [PATCH 1/5] Get rid off old external tree-sra.c stuff Martin Jambor
2009-04-28 12:55   ` Richard Guenther
2009-05-20 10:19     ` Martin Jambor
2009-04-28 10:12 ` [PATCH 5/5] "Fix" the rest of the fallouts of new intra-SRA Martin Jambor
2009-04-28 13:05   ` Richard Guenther
2009-04-28 10:14 ` [PATCH 3/5] New intraprocedural Scalar Reduction of Aggregates Martin Jambor
2009-04-28 10:27   ` Martin Jambor
2009-04-29 12:56     ` Richard Guenther
2009-05-10 10:33       ` Martin Jambor
2009-05-10 11:48         ` Richard Guenther
2009-05-12  0:24           ` Martin Jambor
2009-05-18 13:26             ` Richard Guenther
2009-05-10 10:39       ` Martin Jambor
2009-05-12  9:49         ` Martin Jambor
2009-04-29 10:59   ` Richard Guenther
2009-04-29 12:16     ` Martin Jambor

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