A Code Placement Framework and its Application to Communication Generation
暂无分享,去创建一个
We present a dataaow framework that extends classical partial redundancy elimination techniques and uses a general producer-consumer concept. Consumers express a demand for certain computations to be performed, either before or after consumption takes place, depending on the kind of problem to be solved. Producers satisfy this demand, unless it is already satissed as a side eeect by some other operations. Production can be viewed not only as an atomic operation, but it can also be separated into a beginning and an end. Beyond the safety requirements of classical code motion techniques, the option of splitting production implies a need for Balancedness, where a production, once started, is guaranteed to be nished, without an intervening restart. We describe the general framework and its application to the problem of generating communication statements for distributed memory machines. In the communication generation problem, we assume that references to distributed data result in global reads, which can be split into a send from the owner of the data and a receive at the processor referencing the data. We also assume that a deenition of distributed data may result in a global write, which can be split into a send from the processor writing the data and a receive at the processor owning them. This presents four diierent problems, all of which can be solved with the same framework. We implemented the framework as part of a Fortran D compiler prototype, where it is used to solve communication generation problems including the ones described in this paper.
[1] J. Cocke. Global common subexpression elimination , 1970, Symposium on Compiler Optimization.