Translating Out of Static Single Assignment Form

  • Authors:
  • Vugranam C. Sreedhar;Roy Dz-Ching Ju;David M. Gillies;Vatsa Santhanam

  • Affiliations:
  • -;-;-;-

  • Venue:
  • SAS '99 Proceedings of the 6th International Symposium on Static Analysis
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

Programs represented in Static Single Assignment (SSA) form contain phi instructions (or functions) whose operational semantics are to merge values coming from distinct control flow paths. However, translating phi instructions into native instructions is nontrivial when transformations such as copy propagation and code motion have been performed. In this paper we present a new framework for translating out of SSA form. By appropriately placing copy instructions, we ensure that none of the resources in a phi congruence class interfere. Within our framework, we propose three methods for copy placement. The first method pessimistically places copies for all operands of phi instructions. The second method uses an interference graph to guide copy placement. The third method uses both data flow liveness sets and an interference graph to guide copy placement. We also present a new SSA-based coalescing method that can selectively remove redundant copy instructions with interfering operands. Our experimental results indicate that the third method results in 35% fewer copy instructions than the second method. Compared to the first method, the third method, on average, inserts 89.9% fewer copies during copy placement and runs 15% faster, which are significant reductions in compilation time and space.