[EGCS] Does egcs do performance regression tests?
Iain McClatchie
iainmcc@ix.netcom.com
Sat Dec 27 10:11:00 GMT 1997
Iain> The 23 line program at the end of this email compiles to different
Iain> assembly through gcc and g++, and demonstrates this problem.
Iain> I tested this code against gcc 2.7.2.
Excuse me for leaving out important information: the program was
compiled by the following two command lines:
gcc -m486 -O3 -S -c tmp.cc
gives this loop:
.L9:
testl %eax,%eax
je .L10
movl %edx,4(%eax)
movl (%eax),%eax
jmp .L9
gcc -m486 -O3 -S -c tmp2.c
gives this loop:
.L13:
movl %edx,4(%eax)
movl (%eax),%eax
testl %eax,%eax
jne .L13
The source code once again:
extern inline void *
stalloc( void *stack )
{
void *ret= stack;
return ret;
}
typedef struct net_list_t {
struct net_list_t *next;
void *net;
} net_list_t;
void
initialize_connectivity( void *temppool, net_list_t *list )
{
net_list_t *netp;
for( netp = list; netp != 0; netp = netp->next ) {
netp->net = stalloc( temppool );
}
}
More information about the Gcc
mailing list