Re: Code optimization <LEA Instruction>

From: Jeffrey B. Siegal (jbs@quiotix.com)
Date: Sun Jan 30 2000 - 16:22:02 EST


Jamie Lokier wrote:
> Not necessarily. The smallest instructions tend to be more complicated
> and expand to more basic operations, so decoding cost _may_ be reduced,
> but the next step in translation, and the area used in the cache, and
> the execution time, may be longer.

-Os doesn't just use the smallest instructions (and note my use of the phrase
"or something like it"; it also indicates to the compiler that it should
generate *fewer* instructions. Fewer instructions means faster translation
and it also means more of the program can fit into the translation cache.

I'm suspicious that that (gcc's) code generation in fact "matters" quite a lot
for an architecture like Crusoe. There is a cooperative relationship between
high level code generation and low level translation. Currently gcc is
optimized to generate code for conventional processors, and Crusoe is
optimized to translate code generated for conventional processors, so the two
are roughly in sync. But I suspect there is a much better equilibrium that
has not yet been identified.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:26 EST