joggingsong@[EMAIL PROTECTED]
writes:
> I haven't taken the compiler course at college. Because my job is
> to optimize code on DSP, I hope to understand compiler deep and begin
> to read a compiler textbook. There are a lot of materials in a book,
> but the overview of advanced compiling is not given in the book.
>
> Maybe every part is im****tant for a optimized compiler. I hope to know
> which part of a compiler is most im****tant in a compiler. Instruction
> scheduling, or register allocation?
This depends a lot on both the target processor and the types of
programs you want to run.
If the target processor does out-of-order run-time scheduling of
instructions, compile-time scheduling is less im****tant than if the
processor runs instructions in the order they appear but with
pipelining or multiple simultanious instructions (that don't have
overlapping resource needs). Scheduling is even more im****tant if you
need to explicitly group instructions that start at the same time, as
some DSPs (and Intel's Itanium) do.
Register allocation is im****tant if you have a limited number of
registers and register access is much more efficient than memory
access (which is usually the case). It becomes even more im****tant
(and complex) if different instructions use different registers or if
there are instructions that can operate on multiple adjacent registers
or on parts of registers (which may allow allocating several small
values in on register).
DSPs are notoriously difficult for compilers to generate optimal code
for, since they commonly have specialised registers,
multiple/part-register operations and need for explicit grouping of
instructions (or at least compile-time scheduling).
Torben


|