This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/16447] New: out of ssa generates bloated code
- From: "dann at godzilla dot ics dot uci dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jul 2004 03:29:07 -0000
- Subject: [Bug tree-optimization/16447] New: out of ssa generates bloated code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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