Optimization of Data Remapping in Data-Parallel Languages

The user-controlled mapping of data across the local memories of processing nodes is one of the central features of data-parallel languages like High Performance Fortran (HPF). Since many scienti c applications typically consist of di erent computational phases owning each a best data mapping, dynamic remappings have proven useful in maintaining good data locality and workload balance. HPF supports remappings by procedure calls and by executing redistribute/realigndirectives. But remappings can be quite expensive as communication is required to migrate the array elements to their new owning processors and can signi cantly degrade a program's performance. Hence, elimination of unnecessary remappings is of key importance. It is essential because even well-written HPF programs may result in unnecessary remappings. In this thesis we optimize the overall time spent for dynamic data remappings in a program run by reducing the number of executed remappings. Elimination of redundant and dead remappings does not su ce. Code motion to eliminate remappings further is required as well. Our approach eliminates unnecessary remappings by combining both partial dead code elimination and partial redundancy elimination. In this way we succeed in sinking and hoisting remappings out of loops and eliminating them on straight-line code as well. For both partial dead code elimination and partial redundancy elimination we present a bidirectional and unidirectional approach and discuss the di erences. It has been shown that partial dead code elimination and partial redundancy elimination can be solved optimally when applied separately. Here we show that in general an optimal solution does not exist any more if both algorithms are combined. Further it turns out that a straight-forward interprocedural adaption of the intraprocedural approach fails. For the intraprocedural as well as interprocedural approach we arrive at a uniform framework which can be applied for both ordinary and mapping assignments. The framework provides a hierarchy of algorithms of varying power and e ciency supporting user-customized solutions. The power and exibility of our approach are demonstrated by illustrating examples. Acknowledgments I would like to thank my advisor, Professor Hans P. Zima, for his support and advice throughout the thesis and for providing the opportunity to work in the stimulating research environment of his Institute. Further I am grateful to my co-advisor, Professor Manfred Brockhaus, who gave me a rst introduction on compilation techniques while I was an undergraduate student and who supervised my diploma thesis. Throughout the course of my research many people have contributed to this work. I would especially like to thank Jens Knoop from the University of Passau, with whom I have had numerous discussions on analysis that have resulted in joint publications and helped to improve this thesis considerably. From our research group I would like to thank Siegfried Benkner for valuable discussions on HPF and for the support he gave me on our parallelization system VFC. Further I am indebted to Thomas Fahringer for discussing performance related issues, especially strategies for optimizing communication. Finally, I am grateful to Siegfried Benkner and Bernd Wender for partially proofreading this work and to the latter for being such a helpful and stimulating o cemate. Last, but by no means least, I am particularly indebted to my parents, Franz and Anna Mehofer, for supporting my academic career.