Re: math expressions optimalization

"Allyn Dimock" <>
14 Jun 2002 15:26:41 -0400

          From comp.compilers

Related articles
math expressions optimalization (Trix) (2002-06-13)
Re: math expressions optimalization (Sid Ahmed Ali TOUATI) (2002-06-14)
Re: math expressions optimalization (Walter Misar) (2002-06-14)
Re: math expressions optimalization (Allyn Dimock) (2002-06-14)
Re: math expressions optimalization (Tomasz Kowaltowski) (2002-06-17)
| List of all articles for this month |

From: "Allyn Dimock" <>
Newsgroups: comp.compilers
Date: 14 Jun 2002 15:26:41 -0400
Organization: Harvard University, Cambridge, Massachusetts
References: 02-06-032
Keywords: registers, optimize
Posted-Date: 14 Jun 2002 15:26:41 EDT

"Trix" <> writes:

> I`m going to implement simple alghoritm to
> optimalize math expressions in terms of
> use of memory cells.
> I don`t know the name of such alghoritm in English
> and can find it on the net.

Normally the temporaries generated in evaluating expressions are
allocated in registers rather than in memory cells. I don't know a
particular name for your algorithm. However, see "the dragon book"
page 535 in the 1986 edition "Storage for Temporary Names" in Section
9.5: "Next-Use information". Or see Appel's books "Modern Compiler
Implementation in ..." under "Register Allocation for Trees".

In the case of register allocation, it is sometimes the case that
reusing a register name too soon limits the ability of the machine to
find instruction-level parallelism.

The same algorithm (reusing locations that are no longer live) is also
used to minimize the size of stack frames.

  -- Allyn Dimock

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.