Regular Papers

Programming Languages and Systems

Volume 1381 of the series Lecture Notes in Computer Science pp 154-169


Code motion and code placement: Just synonyms?

  • Jens KnoopAffiliated withUniversität Passau
  • , Oliver RüthingAffiliated withUniversität Dortmund
  • , Bernhard SteffenAffiliated withUniversität Dortmund


We prove that there is no difference between code motion (CM) and code placement (CP) in the traditional syntactic setting, however, a dramatic difference in the semantic setting. We demonstrate this by re-investigating semantic CM under the perspective of the recent development of syntactic CM. Besides clarifying and highlighting the analogies and essential differences between the syntactic and the semantic approach, this leads as a side-effect to a drastical reduction of the conceptual complexity of the value-flow based procedure for semantic CM of [20], as the original bidirectional analysis is decomposed into purely unidirectional components. On the theoretical side, this establishes a natural semantical understanding in terms of the Herbrand interpretation (transparent equivalence), and thus eases the proof of correctness; moreover, it shows the frontier of semantic CM, and gives reason for the lack of algorithms going beyond. On the practical side, it simplifies the implementation and increases the efficiency, which, like for its syntactic counterpart, can be the catalyst for its migration from academia into industrial practice.


Program optimization data-flow analysis code motion code placement partial redundancy elimination transparent equivalence Her-brand interpretation