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: memory oper...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 2336 of 2472
Post > Topic >>

Re: memory operands and Register allocation

by Hans-Peter Diettrich <DrDiettrich1@[EMAIL PROTECTED] > Feb 24, 2008 at 09:27 AM

shrey wrote:

>     Traditional RA algorithms are designed to provide a register for
> every operand. But some architectures can access memory directly.
>   So instead of add ra, rb, rc -> add memloc1, memloc2, memloc3.

That's okay for one operation, no need to optimize further. When more
operations are involved, intermediate results better should reside in
registers.

> Is there any work on how to extend some of traditional algorithms to
> provide for this possibility ?

I'm not sure about algorithms. The costs of using registers vs. memory
are different, and it's only agreed that the cost of memory access is
higher than register access. Now it depends on the actual
(architectural) weights, whether it's cheaper to use an memory operand
instead of reserving a register for it. IMO an optimization problem of
higher order, e.g. linear programming, Simplex algorithm...

Another practical way may be a transformation of the register based
solution into final mixed mode code. Or a quick look at the number of
available registers will show, that for CISC machines (like x86) a
traditional register allocation optimization will be of little use.

DoDi
 




 2 Posts in Topic:
memory operands and Register allocation
shrey <shreyas76@[EMAI  2008-02-21 16:54:19 
Re: memory operands and Register allocation
Hans-Peter Diettrich <  2008-02-24 09:27:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Thu Jul 24 14:33:02 CDT 2008.