Зарегистрироваться
Восстановить пароль
FAQ по входу

Rüthing O. Interacting Code Motion Transformations. Their Impact and Their Complexity

  • Файл формата pdf
  • размером 1,56 МБ
  • Добавлен пользователем
  • Отредактирован
Rüthing O. Interacting Code Motion Transformations. Their Impact and Their Complexity
Издательство Springer, 1998, -223 pp.
Is computing an experimental science? For the roots of program optimization the answer to this question raised by Robin Milner ten years ago is clearly yes: it all started with Donald Knuth’s extensive empirical study of Fortran programs. This benchmark-driven approach is still popular, but it has in the meantime been complemented by an increasing body of foundational work, based on varying idealizing assumptions ranging from ‘space is for free’ over ‘there are sufficiently many registers’ to ‘programs consist of 3-address code’. Evaluation of the adequacy of these assumptions lacks the appeal of run-time measurements for benchmarks, which is so simple that one easily forgets about the difficulties in judging how representative the chosen set of benchmarks is. Ultimately, optimizations should pass the (orthogonal) tests of both communities.
This monograph is based on foundational, assumption-based reasoning, but it evolved under the strong pressure of the experimental community, who expressed doubts concerning the practicality of the underlying assumptions. Oliver Rüthing responded by solving a foundational problem that seemed beyond the range of efficient solutions, and proposed a polynomial algorithm general enough to overcome the expressed concerns.
Register Pressure:. A first formally complete solution to the problem of register pressure in code motion – hoisting computations enlarges the corresponding life-time ranges – was proposed for 3-address code. This assumption allowed a separate treatment of single operator expressions in terms of a bitvector analysis.
The algorithm, although it improves on all previous approaches, was criticized for not taking advantage of the flexibility provided by complex expression structures, which essentially boils down to the following trade-off patterns:
– if (two) operand expressions are only used once, within one large expression, one should hoist its evaluation and release the registers holding the operand values;
– if there are multiple uses of the operand expressions, then one should keep the operand values and delay the evaluation of the large expressions. Based on matching theory, Rüthing proposes an algorithm that optimally resolves this ‘trade-off’ problem in polynomial time.
Interacting Transformations:. Optimizing transformations may support and/ or impede each other, as illustrated by the two trade-off patterns in the previous paragraph: hoisting a large expression is supportive in the first but impeding in the second. In this sense, the corresponding optimal algorithm can be regarded as a complete solution to a quite complex interaction problem. In this spirit, Oliver Rüthing additionally investigates the complexity and the interaction potential of assignment motion algorithms comprising both hoisting and sinking, and establishes a surprisingly low complexity bound for the ‘meta-iteration cycle, resolving all the so-called second-order effects.
Finally, the monograph sketches how these two results can be combined in order to achieve independence of the assignment granularity. In particular, the combined algorithm is invariant under assignment decomposition into 3-address code, as required for many other optimization techniques. This is of high practical importance, as this increased stability under structural changes widens the range of application while maintaining the optimizing power. I am optimistic that conceptual results like this, which seriously address the concerns of the experimental community, will help to establish fruitful cross-community links.
Summarizing, this monograph, besides providing a comprehensive account of the practically most accepted program analysis and transformation methods for imperative languages, stepwise develops a scenario that overcomes structural restrictions that had previously been attacked for a long time with little success. In order to do justice to the conceptual complexity behind this breakthrough, Rüthing provides all the required formal proofs. They are not always easy to follow in full detail, but the reader is not forced to the technical level. Rather, details can be consulted on demand, providing students with a deep, yet intuitive and accessible introduction to the central principles of code motion, compiler experts with precise information about the obstacles when moving from the 3-address code to the general situation, and the algorithms’co mmunity with a striking application of matching theory.
Introduction
Basic Formalisms and Definitions
Part I. Expression Motion
Optimal Expression Motion: The Single-Expression View
Optimal Expression Motion: The Multiple-Expression View
Expression Motion in the Presence of Critical Edges
Part II. Assignment Motion
Program Transformations Based on Assignment Motion
A Framework for Assignment Motion Based Program Transformations
Assignment Motion in the Presence of Critical Edges
Conclusions and Perspectives
  • Чтобы скачать этот файл зарегистрируйтесь и/или войдите на сайт используя форму сверху.
  • Регистрация