Related articles |
---|
Which part of optimization is most important in a compiler? joggingsong@gmail.com (2008-03-23) |
Re: Which part of optimization is most important in a compiler? torbenm@app-2.diku.dk (2008-03-25) |
Re: Which part of optimization is most important in a compiler? bmoses-nospam@mail.dpdx.net (Brooks Moses) (2008-03-25) |
Re: Which part of optimization is most important in a compiler? kevin.phillips83@yahoo.com (kphillips) (2008-03-27) |
Re: Which part of optimization is most important in a compiler? pertti.kellomaki@tut.fi (=?ISO-8859-1?Q?Pertti_Kellom=E4ki?=) (2008-03-28) |
Re: Which part of optimization is most important in a compiler? n.pipenbrinck@cubic.org (Nils) (2008-03-30) |
Re: Which part of optimization is most important in a compiler? joggingsong@gmail.com (2008-04-02) |
From: | torbenm@app-2.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen) |
Newsgroups: | comp.compilers |
Date: | Tue, 25 Mar 2008 15:30:44 +0100 |
Organization: | Department of Computer Science, University of Copenhagen |
References: | 08-03-094 |
Keywords: | optimize |
Posted-Date: | 26 Mar 2008 23:08:56 EDT |
joggingsong@gmail.com 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 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).
Torben
Return to the
comp.compilers page.
Search the
comp.compilers archives again.