Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers > Re: Which part ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 8 Topic 2368 of 2534
Post > Topic >>

Re: Which part of optimization is most im****tant in a compiler?

by Brooks Moses <bmoses-nospam@[EMAIL PROTECTED] > Mar 25, 2008 at 02:46 PM

joggingsong@[EMAIL PROTECTED]
 wrote:
>    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?

"Most im****tant" is an impossible question to answer -- it depends on
which one is being done badly.  If the instruction scheduling is done
badly, the compiled program will spend all its time with stalled
pipelines and run slowly, and the best register allocation in the world
won't fix it.  If the register allocation is done badly, the compiled
program will spend all its time in memory fetches and stores and run
slowly, and the best instruction scheduling in the world won't fix it.

It also depends heavily on the processor architecture and the program.
On a Cell SPE, instruction ordering can make an order-of-magnitude
difference in execution time, but with 128 registers, allocating the
registers in an optimum way is often not especially critical.  On a
processor that does instruction-reordering in hardware but has a
half-dozen registers, however, the register allocation is critical and
the instruction ordering much less so.  I don't know where your DSP
would fit in this spectrum.

With that said, a program with poor instruction scheduling will still
run, whereas the registers have to be allocated _somehow_ in order to
get a running program, so you might as well learn about register
allocation first.

Also, if you have any experience with writing assembly-code programs for
your DSP, that should give you some insight into what's most im****tant
to get things to run fast on your processor.  (If you don't have
experience with that, it's probably useful to get some -- it's hard to
write a program to produce something that you don't know how to produce
yourself!)

- Brooks


--
The "bmoses-nospam" address is valid; no unmunging needed.
 




 8 Posts in Topic:
Which part of optimization is most important in a compiler?
joggingsong@[EMAIL PROTEC  2008-03-23 20:38:16 
RE: Which part of optimization is most important in a compiler?
"Murugesh" <  2008-03-25 17:57:21 
Re: Which part of optimization is most important in a compiler?
torbenm@[EMAIL PROTECTED]  2008-03-25 15:30:44 
Re: Which part of optimization is most important in a compiler?
kphillips <kevin.phill  2008-03-27 03:18:51 
Re: Which part of optimization is most important in a compiler?
=?ISO-8859-1?Q?Pertti_Kel  2008-03-28 10:05:01 
Re: Which part of optimization is most important in a compiler?
Nils <n.pipenbrinck@[E  2008-03-30 15:59:23 
Re: Which part of optimization is most important in a compiler?
Brooks Moses <bmoses-n  2008-03-25 14:46:17 
Re: Which part of optimization is most important in a compiler?
joggingsong@[EMAIL PROTEC  2008-04-02 06:15:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 22:21:27 CDT 2008.