Poster about Simulation based Code Duplication (abstract from associated DocSymp paper)
The scope of compiler optimizations is often limited by con-
trol flow, which prohibits optimizations across basic block
boundaries. Code duplication can solve this problem by ex-
tending basic block sizes, thus enabling subsequent opti-
mizations. However, duplicating code for every optimization
opportunity may lead to excessive code growth. Therefore,
a holistic approach is required that is capable of finding
optimization opportunities and classifying their impact.
This paper presents a novel approach to determine which
code should be duplicated in order to improve peak perfor-
mance. The approach analyzes duplication candidates for
subsequent optimizations opportunities. It does so by simu-
lating a duplication operation and analyzing its impact on
other optimizations. This allows a compiler to weight up
multiple success metrics in order to choose the code duplica-
tion operations with the maximum optimization potential.
We further show how to map code duplication opportunities
to an optimization cost model that allows us to maximize
performance while minimizing code size increase.