The high-level debugging of parallelized code using code liberation
Patricia Prather Pineo · 1993
Code Liberation is a technique that supports the debugging of FORTRAN code transformed for parallelization. The technique tracks the values of variables made non-current through the action of the transformations. When a programmer, who may be unaware of the transformations, requests values during the debugging of parallelized code, a report of the actual values of non-current variables may be confusing or misleading. Code Liberation reports the expected values of such variables thus encouraging debugging to proceed from the viewpoint of the original sequential code even though the transformed code is executing in its final form. The technique is independent of the transformations chosen and therefore is also applicable to the debugging of optimized code. Code Liberation approaches the debugging problem through the production of single assignment code. In the first stage, original code is globally renamed. The renamed code is relieved of about half of its data dependencies, thus improving efforts to parallelize the code. A Partial Renaming method that uses less storage is also developed. After Global Renaming, code may be parallelized by any desired parallelizing software. The code is then reinspected in the Name Reclamation stage. Unnecessary names are reclaimed in a process analogous to graph coloring. Only names required for debugging or correct parallel execution are retained. It is shown that globally renamed code summarizes dataflow information in a way that persists through transformations. Thus it is a useful form for problems relying on dataflow information. It is also shown that Code Liberation is useful in program partitioning, parallelization, optimization, and register allocation. Experimental results show that an average of 10% of variables are non-current (reporting misleading values) at any breakpoint placed in conventionally parallelized code. If Code Liberation is used the transformations render only 0.01% of variables unreportable. All variables that are reported are accurate. Applying Global Renaming before parallelization increases the number of program lines in parallel constructs by 6.4 times, representing a substantial increase in parallelization. After Name Reclamation the reduced name space averages 2.53 times the size of the original name space. About 18% of these names enable debugging whereas about 82% enable additional parallelization.