|Which part of optimization is most important in a compiler? email@example.com (2008-03-23)|
|Re: Which part of optimization is most important in a compiler? firstname.lastname@example.org (2008-03-25)|
|Re: Which part of optimization is most important in a compiler? email@example.com (Brooks Moses) (2008-03-25)|
|Re: Which part of optimization is most important in a compiler? firstname.lastname@example.org (kphillips) (2008-03-27)|
|Re: Which part of optimization is most important in a compiler? email@example.com (=?ISO-8859-1?Q?Pertti_Kellom=E4ki?=) (2008-03-28)|
|Re: Which part of optimization is most important in a compiler? firstname.lastname@example.org (Nils) (2008-03-30)|
|Re: Which part of optimization is most important in a compiler? email@example.com (2008-04-02)|
|From:||firstname.lastname@example.org (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)|
|Date:||Tue, 25 Mar 2008 15:30:44 +0100|
|Organization:||Department of Computer Science, University of Copenhagen|
|Posted-Date:||26 Mar 2008 23:08:56 EDT|
> 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 important for a optimized compiler. I hope to know
> which part of a compiler is most important 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 important 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 important if you
need to explicitly group instructions that start at the same time, as
some DSPs (and Intel's Itanium) do.
Register allocation is important 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 important
(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).
Return to the
Search the comp.compilers archives again.