This is the mail archive of the
mailing list for the GCC project.
loop unrolling performance regression
- From: Jan Hubicka <jh at suse dot cz>
- To: rth at cygnus dot com, gcc at gcc dot gnu dot org
- Date: Mon, 18 Feb 2002 11:45:22 +0100
- Subject: loop unrolling performance regression
I've been investigating futher the loop unrolling regression caused by Richard
fix and cleanup. The problem I see is with loop like
if (test) goto skip
The goto skip is forwarded to loop_label and resutling code is:
if (test) goto loop_beg_label
And the loop is ignored by loop optimizer as missformed one.
While the original code did jump optimized this special case by hand moving
the loop_end_note backward to re-construct proper loop.
I see three possible fixes:
1) re-incarante the ugly code to more loop_end_label around
2) teach delete_block to move loop_end note backward in such case
3) avoid forwarding of the jumps followed by loop_end note
The 3) looks most correct to me as it will solve problems with multiple
back edges that I beleive didn't happen in old jump implementation.
2) looks it can produce better code tought. So I will try to prepare both
fixes and give it benchmark run.