This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Scheduling complete loop unrolling early and unconditional?
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: Dorit Naishlos <DORIT at il dot ibm dot com>
- Cc: David Edelsohn <dje at watson dot ibm dot com>, Diego Novillo <dnovillo at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 22 Dec 2004 19:19:04 +0100
- Subject: Re: Scheduling complete loop unrolling early and unconditional?
- References: <OF48F65E49.25F39C8C-ONC2256F72.00504A1A-C2256F72.0062D361@il.ibm.com>
Dorit Naishlos wrote:
just a comment -
for better or for worse, scheduling complete-unrolling early would take
away opportunities from autovectorization (at least as long as we're
looking for vectorization opportunities only across loop iterations and not
in straight-line code). Indeed if a loop gets completely unrolled then in
many cases it may be too short to gain much if anything from
vectorization, but ideally the vectorizer would decide what's worth while
to vectorize and what not before such opportunities are eliminated (of
course we do not have such a cost model yet).
Yes, of course. But there is also a huge amount of manually unrolled
code around like autogenerated stuff, but I also do manual unrolling
sometimes. So the best thing would be if the autovectorizer recognizes
such straight-line "loop" code and other optimizations like SRA
recognize constant-small-times running loops.
Richard.