This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Slowdowns in code generated by GCC>=3.3
Hi,
> Which x86 architecture variant?
I measured in on a Pentium 4.
> Filing a bug report is only going to be useful if you can report your
> problem in a way such that we can reproduce it: test case, output of
> "gcc -v", etc. See http://gcc.gnu.org/bugs.html for the details ;-)
Okay, but then i'll have to reduce the 7000 lines of code in the crucial
file to something smaller ;)
> Is the program counter a global variable, or local?
It's local.
> And if you remove those hints, does that make your code worse?
Removing 'register ... asm(bx)' makes it a bit worse. Removing only
'asm(bx)' makes it worser than that. Although the difference in time is
not very big.
> Yes. Indirect jumps are incredibly expensive at compile time, so what
> the compiler does is "factor" the computed jump, i.e. given,
This is indeed what happens.
> I can tell almost for sure that this is not the problem. In GCC 3.3,
> only the pentium has a DFA scheduler description, all other
> architecture variants still use the old scheduler.
Okay. It just seemed like the only change looking at the changelog, but
it doesn't sound like it has anything to do with it indeed. I just
didn't know exactly what it was.
> try to optimize for something more advanced than i386 (which is the
> default x86 architecture, see the manual, -march=*).
I tried it with -march=pentium4 this time. Strangely enough, this makes
matters even worse.
thanks,
Remko