public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/16447] New: out of ssa generates bloated code
@ 2004-07-09  3:29 dann at godzilla dot ics dot uci dot edu
  2004-07-09  3:30 ` [Bug tree-optimization/16447] " dann at godzilla dot ics dot uci dot edu
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2004-07-09  3:29 UTC (permalink / raw)
  To: gcc-bugs

The the .tailc dump for the function combine.c:cant_combine_insn_p
looks like this: 
[snip]
<L23>:;
  T.150_24 = dest_5->u.fld[0].rtuint;
  if (T.150_24 > 52) goto <L35>; else goto <L24>;

<L24>:;
  T.151_26 = fixed_regs[T.150_24];
  if (T.151_26 != 0) goto <L35>; else goto <L25>;

<L25>:;
  T.152_29 = regclass_map[T.150_24];
  T.153_30 = T.152_29 - 1;
  if (T.153_30 <= 3) goto <L35>; else goto <L26>;

<L26>:;
  if (T.152_29 == 7) goto <L35>; else goto <L27>;

<L27>:;
  if (T.152_29 == 5) goto <L35>; else goto <L28>;

<L28>:;
  if (T.152_29 == 6) goto <L35>; else goto <L29>;

<L29>:;
  if (T.152_29 == 13) goto <L35>; else goto <L30>;

<L30>:;
  if (T.152_29 == 14) goto <L31>; else goto <L35>;

<L31>:;

  # T.139_1 = PHI <0(7), 1(25), 0(2), 1(0), 0(24), 0(8), 1(23), 1(22), 1(21),
1(20), 1(19), 0(18), 0(17), 1(16), 1(15), 1(14), 1(13), 1(12), 1(11)>;
<L35>:;
  return T.139_1;

Note the return value T.139_1

The .optimized dump looks like: 

[snip]
<L75>:;
  T.139 = 1;
  goto <bb 26> (<L35>);

<L27>:;
  if (T.152 == 5) goto <L76>; else goto <L28>;

<L76>:;
  T.139 = 1;
  goto <bb 26> (<L35>);

<L28>:;
  if (T.152 == 6) goto <L77>; else goto <L29>;

<L77>:;
  T.139 = 1;
  goto <bb 26> (<L35>);

<L29>:;
  if (T.152 == 13) goto <L78>; else goto <L30>;

<L78>:;
  T.139 = 1;
  goto <bb 26> (<L35>);

<L30>:;
  if (T.152 == 14) goto <L31>; else goto <L79>;

<L79>:;
  T.139 = 0;
  goto <bb 26> (<L35>);

<L31>:;
  T.139 = 1;

<L35>:;
  return T.139;

Not that T.139 is assigned 1 in a lot of BBs, followed by a jumb to the return
statement. 
The code would be much smaller if there was a only 1 assignment that all the ifs
jump to.

-- 
           Summary: out of ssa generates bloated code
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dann at godzilla dot ics dot uci dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2004-11-02  1:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-09  3:29 [Bug tree-optimization/16447] New: out of ssa generates bloated code dann at godzilla dot ics dot uci dot edu
2004-07-09  3:30 ` [Bug tree-optimization/16447] " dann at godzilla dot ics dot uci dot edu
2004-07-09  3:57 ` pinskia at gcc dot gnu dot org
2004-07-09  4:02 ` pinskia at gcc dot gnu dot org
2004-09-28 20:12 ` pinskia at gcc dot gnu dot org
2004-09-29 20:21 ` amacleod at redhat dot com
2004-10-06 12:46 ` cvs-commit at gcc dot gnu dot org
2004-10-06 13:03 ` pinskia at gcc dot gnu dot org
2004-11-02  0:23 ` cvs-commit at gcc dot gnu dot org
2004-11-02  1:29 ` pinskia 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).