public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/26421]  New: tree-ssa-alias.c:find_used_portions considers foo(&var) use all elements of var
@ 2006-02-22 15:57 rguenth at gcc dot gnu dot org
  2006-02-22 16:02 ` [Bug tree-optimization/26421] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-02-22 15:57 UTC (permalink / raw)
  To: gcc-bugs

The function in question should ignore ADDR_EXPRs that appear inside CALL_EXPR
parameter lists so that we, for

typedef struct {
  int i;
  int j;
  int k;
} Foo;

void bar(Foo*);
void foo(void)
{
  Foo a;
  a.i = 1;
  bar(&a);
}

do not create SFTs for all elements of a, but only for the first.  This
will reduce clobbers at call sites from

<bb 2>:
  #   SFT.2_2 = V_MUST_DEF <SFT.2_1>;
  a.i = 1;
  #   SFT.0_5 = V_MAY_DEF <SFT.0_3>;
  #   SFT.1_6 = V_MAY_DEF <SFT.1_4>;
  #   SFT.2_7 = V_MAY_DEF <SFT.2_2>;
  bar (&a);

to

<bb 2>:
  #   SFT.2_2 = V_MUST_DEF <SFT.2_1>;
  a.i = 1;
  #   SFT.2_7 = V_MAY_DEF <SFT.2_2>;
  bar (&a);

it especially would reduce the amounts of SFTs we generate for gfortran
struct st_parm, which usually only gets a few fields written to and then
it's address is passed to a function.


-- 
           Summary: tree-ssa-alias.c:find_used_portions considers foo(&var)
                    use all elements of var
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: memory-hog, compile-time-hog, alias
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26421


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

end of thread, other threads:[~2006-02-28 14:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-22 15:57 [Bug tree-optimization/26421] New: tree-ssa-alias.c:find_used_portions considers foo(&var) use all elements of var rguenth at gcc dot gnu dot org
2006-02-22 16:02 ` [Bug tree-optimization/26421] " pinskia at gcc dot gnu dot org
2006-02-22 16:23 ` rguenth at gcc dot gnu dot org
2006-02-22 21:32 ` rguenth at gcc dot gnu dot org
2006-02-23 13:45 ` rguenth at gcc dot gnu dot org
2006-02-23 15:00 ` patchapp at dberlin dot org
2006-02-26 16:19 ` rguenth at gcc dot gnu dot org
2006-02-26 21:11 ` rguenth at gcc dot gnu dot org
2006-02-26 21:38 ` rguenth at gcc dot gnu dot org
2006-02-27  3:42 ` pinskia at gcc dot gnu dot org
2006-02-28 14:24 ` pinskia at gcc dot gnu dot org
2006-02-28 14:40 ` rguenth at gcc dot gnu dot org

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