Related articles |
---|
Industrial Compiler Optimization Features Survey lxu@rice.edu (Li Xu) (2002-01-24) |
Re: Industrial Compiler Optimization Features Survey cdg@nullstone.com (Christopher Glaeser) (2002-01-28) |
From: | "Christopher Glaeser" <cdg@nullstone.com> |
Newsgroups: | comp.compilers |
Date: | 28 Jan 2002 01:05:08 -0500 |
Organization: | Concentric Internet Services |
References: | 02-01-123 |
Keywords: | optimize |
Posted-Date: | 28 Jan 2002 01:05:08 EST |
> I am working on a survey on the optimization features of industrial
> compilers, especially those machine independent optimizations. In
> literature, there are numerous optimization/transformation
> documented, I am interested to know what subset of those are
> considered important and got implemented in the industrial
> compilers.
Most commercial compilers are promoted with marketing literature using
the industry standard laundry list of optimizations. That is, most of
these compilers perform constant propagation, common subexpression
elimination, strength reduction, instruction scheduling, and so on and
so on. The hard part is determining the sophistication of each of
these optimizers. For the relatively weak optimizers, some of the
optimizations performed are best characterized as an existence proof,
which is to say, there exists at least one program fragment for which
the optimizer will perform that optimization. In contrast, the more
powerful optimizers can perform that optimization for many different
program fragments.
Let me give a simple example. Consider the following code fragment and
common subexpression elimination.
x = a + b;
y = a + b;
Weak optimizers will only perform this optimization if and only if
- x, y, a, and b are local or register
- x, y, a, and b must be int
- the operator must be addition or subtraction or possibly multiplication
- the two statements must occur in the same basic block
Sophisticated optimizers can perform this optimization when
- x, y, a, and b can be local, register, static, or extern
- x, y, a, and b can be char, short, int, long, float, double
- CSE is performed for all operators such as and, or, not, left shift,
right shift, etc, etc
- the two statements can be in the same basic block, extended basic block,
or more complex control flow
This is just one simple example, but the concept holds true for all other
optimizations. Something to consider as you collect information for your
survey. Hope that helps.
Best,
Christopher Glaeser cdg@nullstone.com
Nullstone Corporation http://www.nullstone.com
Return to the
comp.compilers page.
Search the
comp.compilers archives again.