gif up gif gif
Next: 2.4 Causes of loss Up: 2. A Compilation Model Previous: 2.2 A dynamic execution

2.3 The experimental compiler

 

As part of the research and development project for the ACRI system, a small group at Edinburgh University developed an experimental compiler with which to research compilation techniques for decoupled architectures. The experimental compiler accepts Fortran 77, which it translates into a tuple-based intermediate code. A series of standard optimizations are performed to produce an efficient scalar representation of the original program, after which the optimized intermediate code is decoupled. The optimization flow is illustrated in figure 2.

  
Figure 2: Optimization phase ordering prior to decoupling (click on image to view at full scale)

The compiler transformation which implements decoupling uses a global dataflow approach to generate an approximate solution to what is in principle an NP-complete problem; the goal of decoupling is to minimize program execution time by hiding memory access latency. In fact, without detailed information on how the program will behave, it is impossible to generate a guaranteed optimal decoupling. In practice, by using a combination of global dataflow analysis and a suitable set of heuristics, it is possible to generate a high quality decoupling of the intermediate code in linear time. Full details of the decoupling algorithm are beyond the scope of this paper.

The final phase of the decoupling algorithm detects inter-unit data transfers and memory hazards, reporting those which cause a loss of decoupling. These LODs are reported using interactive LOD display windows; the compiler produces a display of the source code together with a frequency-prioritized list of LODs. This permits the expert programmer to focus rapidly on those sections of code which have the most profound effect on overall program performance. It also permits compiler writers to focus on the types of program construct for which idiomatic transformations will be particularly beneficial.

The experimental compiler uses the Sigma [11] Fortran front-end and parse tree representation. It also uses a modified unparser from the Sigma library to create the HTML source code for each LOD display (this example was generated directly by the experimental compiler from TRFD in the Perfect Club)

When the decoupler finds an LOD in the intermediate representation, it attaches annotations to the parse tree nodes that are implicated by the LOD event. The unparser converts the annotated parse tree into HTML source code, which is then displayed alongside the sorted list of LOD events. It seems probable that HTML could be used to display many different types of internal compiler information that could be useful to the (expert) programmer.

You can view sample displays for LODs in various programs from the Perfect Club.



gif up gif gif
Next: 2.4 Causes of loss Up: 2. A Compilation Model Previous: 2.2 A dynamic execution



npt@dcs.ed.ac.uk