Code specialization based on value profiles

31Citations
Citations of this article
12Readers
Mendeley users who have this article in their library.
Get full text

Abstract

It is often the case at runtime that variables and registers in programs are "quasi-invariant," i.e., the distribution of the values they take on is very skewed, with a small number of values occurring most of the time. Knowledge of such frequently occurring values can be exploited by a compiler to generate code that optimizes for the common cases without sacrificing the ability to handle the general case. The idea can be generalized to the notion of expression profiles, which profile the runtime values of arbitrary expressions and can permit optimizations that may not be possible using simple value profiles. Since this involves the introduction of runtime tests, a careful cost-benefit analysis is necessary to make sure that the benefits from executing the code specialized for the common values outweigh the cost of testing for these values. This paper describes a static cost-benefit analysis that allows us to discover when such specialization is profitable. Experimental results, using such an analysis and an implementation of low-level code specialization based on value and expression profiles within a link-time code optimizer, are given to validate our approach. © Springer-Verlag Berlin Heidelberg 2000.

Cite

CITATION STYLE

APA

Muth, R., Watterson, S., & Debray, S. (2000). Code specialization based on value profiles. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 1824 LNCS, pp. 340–361). Springer Verlag. https://doi.org/10.1007/978-3-540-45099-3_18

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free