Next: Analysis Effectiveness
Up: Automatic Inline Allocation of
Previous: Assignment Specialization
To evaluate our optimization, we implemented it in the Concert
compiler, and ran it with a suite of object-oriented benchmarks. We
report on the effectiveness, costs and benefits of our
optimization. Effectiveness covers whether our analysis can
inline all slots for which it is appropriate; the benefits are
performance gains. The costs are both compile time and code size; we
quantify compile time by measuring the additional analysis sensitivity
object inlining requires. We choose the following benchmark programs
to stress all aspects of our implementation:
- OOPACK
- is a set of kernels from KAI that demonstrate the
compiler's ability to perform simple object-oriented
optimizations. One kernel (the ComplexBenchmark) uses arrays of
complex number objects; these numbers are inline allocated in C++, but
would be references in Java or Lisp. Our transformation inlines these
objects into their containing arrays. We include timings only for this
kernel.
- Richards
- is an operating system simulator benchmark. It has
some array objects that can be inlined into containing objects; more
interestingly, the Task object has a private data pointer (declared as
void * in C++ and accessed using casts). Various subclasses use
different types in this slot, and hence it cannot be declared inlined
in C++. Our transformation inlines the private data independently for
each subclass.
- Silo
- is an event-driven simulator benchmark from the repository
at Colorado
. Some wrapper
objects for queues can be inlined into their containers, and list
items (essentially cons cells) can be eliminated by combining them
with their data. The queue wrappers are inline allocated in C++, but
the cons cells cannot be.
- polyOver
- is the benchmark from [28];
it computes an overlay of two polygon maps; it uses several algorithms
employing arrays and lists of polygons. Our transformation inlines
cons cells as in Silo, contents of arrays, and, most
interestingly, an array of cons cells. These cells stored references
to each other, and hence inlining them requires our analysis' ability
to flow thru data. The arrays are inline allocated in C++, but the
cons cells cannot be.
These benchmarks are all pre-existing C++ codes; since the Concert
Compiler accepts ICC++ [9], a
C++-derived language, only minor changes were required for our
compiler to accept them. These were mostly declaration and array
access syntax. However, the Concert Compiler assumes an object model
in which all objects are accessed via references, so syntactic inline
allocation is ignored.
Next: Analysis Effectiveness
Up: Automatic Inline Allocation of
Previous: Assignment Specialization
Julian Dolby
dolby@cs.uiuc.edu