• DocumentCode
    927421
  • Title

    Using hammock graphs to structure programs

  • Author

    Zhang, Fubo ; D´Hollander, Erik H.

  • Author_Institution
    Platform Comput. Inc., Markham, Ont., Canada
  • Volume
    30
  • Issue
    4
  • fYear
    2004
  • fDate
    4/1/2004 12:00:00 AM
  • Firstpage
    231
  • Lastpage
    245
  • Abstract
    Advanced computer architectures rely mainly on compiler optimizations for parallelization, vectorization, and pipelining. Efficient-code generation is based on a control dependence analysis to find the basic blocks and to determine the regions of control. However, unstructured branch statements, such as jumps and goto´s, render the control flow analysis difficult, time-consuming, and result in poor code generation. Branches are part of many programming languages and occur in legacy and maintenance code as well as in assembler, intermediate languages, and byte code. A simple and effective technique is presented to convert unstructured branches into hammock graph control structures. Using three basic transformations, an equivalent program is obtained in which all control statements have a well-defined scope. In the interest of predication and branch prediction, the number of control variables has been minimized, thereby allowing a limited code replication. The correctness of the transformations has been proven using an axiomatic proof rule system. With respect to previous work, the algorithm is simpler and the branch conditions are less complex, making the program more readable and the code generation more efficient. Additionally, hammock graphs define single entry single exit regions and therefore allow localized optimizations. The restructuring method has been implemented into the parallelizing compiler FPT and allows to extract parallelism in unstructured programs. The use of hammock graph transformations in other application areas such as vectorization, decompilation, and assembly program restructuring is also demonstrated.
  • Keywords
    optimising compilers; parallel architectures; parallelising compilers; program control structures; program verification; structured programming; branch prediction; compiler optimizations; computer architecture; efficient-code generation; hammock graph control structures; parallel processing; parallelizing compiler; program correctness; program transformation; program verification; proof rule system; software verification; structured programming; Application software; Assembly; Computer architecture; Computer languages; Flow graphs; Optimizing compilers; Parallel processing; Parallel programming; Pipeline processing; Program processors;
  • fLanguage
    English
  • Journal_Title
    Software Engineering, IEEE Transactions on
  • Publisher
    ieee
  • ISSN
    0098-5589
  • Type

    jour

  • DOI
    10.1109/TSE.2004.1274043
  • Filename
    1274043