[tree-ssa] doloop problems
Andrew Pinski
pinskia@physics.uc.edu
Mon Jun 16 04:41:00 GMT 2003
On the SSA branch for loops for some reason do not produce doloops
optimizations.
This patch makes the for loops to cause it to happen.
Now gimplify for a for loop is from:
for (INIT;COND;INCREMENT)
BODY
to:
INIT
if (COND)
{
while (1)
{
BODY
INCREMENT
if (!COND)
goto OUTOFLOOP;
}
OUTOFLOOP:
}
Yes this makes increases the initial number of rtl (and trees)
generated by 3 (4 from the mainline)
but by the time it gets written out as asm, there will be less rtl than
what is generated
currently on the branch.
Testcase:
void temp(int limit, float *x)
{
int i;
for(i=0;i<limit;i++)
x[i] = 0;
}
ChangeLog:
2003-06-16 Andrew Pinski <pinskia@physics.uc.edu>
* c-simplify.c (gimplify_for_stmt): Add if before loop and
move the condition to the end of the loop.
Patch:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: temp1.diff
Type: application/octet-stream
Size: 810 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030616/305d34f1/attachment.obj>
-------------- next part --------------
Thanks,
Andrew Pinski
More information about the Gcc-patches
mailing list