Extracting the parallelism in program with unstructured control statements
Fubo Zhang, Erik H. D'Hollander · 2002
Program parallelization is inhibited by unstructured control statements such as GOTOs, causing interacting and overlapping execution trajectories. In this contribution, a program restructuring method is proposed to convert unstructured control statements into block if statements and while loops. Furthermore, an algorithm is presented to transform a common type of while loops into do loops. The technique works for while loops of which the control variables satisfy a linear recurrence relation. As a result, the loop carried dependencies generated by the control variables are removed. If there are no other loop carried dependencies, the do loop may then be converted into a doall loop. The algorithm has been used to test and convert a significant number of while loops into doall loops for a suite of well-known numerical benchmarks.