This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Value Range Propagation Pass Status
- To: law at cygnus dot com
- Subject: Re: Value Range Propagation Pass Status
- From: John Wehle <john at feith dot com>
- Date: Fri, 4 Feb 2000 19:05:02 -0500 (EST)
- cc: gcc at gcc dot gnu dot org
> I doubt there's much benefit in running it twice. I suspect we can get 99%
> of the benefit by running it once, probably before loop.
Running a second time after loop occurred to me in order to handle
unnecessary condition jumps resulting from loop unrolling which I've
seen happen. For example using -O2 -funroll-all-loops on a x86 platform
to compile:
volatile int a;
int b;
int
func()
{
unsigned int i;
i = 1;
while (i & 1)
{
a = b;
i += 2;
}
return 0;
}
produces:
pushl %ebp
movl %esp, %ebp
movl $1, %edx
movl b, %eax
.align 4
.L5:
testl $1, %edx
movl %eax, a
je .L7
movl %eax, a
je .L7
movl %eax, a
je .L7
movl %eax, a
je .L7
movl %eax, a
je .L7
movl %eax, a
je .L7
movl %eax, a
je .L7
addl $16, %edx
testl $1, %edx
movl %eax, a
jne .L5
.L7:
xorl %eax, %eax
leave
ret
There may be better answers. I'll ignore this issue for now,
we can always choose to run it a second time later if it actually
ends up making sense.
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------