Unified Parallel C (UPC) is a parallel language that uses a Single Program Multiple Data (SPMD) model of parallelism within a global address space. The Berkeley UPC Compiler is an open source and high-performance implementation of the language. The choice of C as the code generation target greatly enhances the compiler's portability, as evidenced by its support of a wide range of supercomputing platforms, including large-scale multiprocessors, vector machines, and network of workstations. In this paper I describe the translator component of the Berkeley UPC Compiler, which is responsible for performing UPC-to-C transformation and generating the necessary runtime calls for communication. The goal of the translator is to generate high quality C code while enabling easy porting of the compiler, and also provide a framework that allows for extensive high-level optimizations. We use a combination of micro-benchmarks and application kernels to show that our compiler can output C code that achieves good performance on both superscalar and vector environments, despite the source-to-source transformation process. We also investigate several communication optimizations, specifically targeting two optimizations can get significantly improve the performance of fine-grained programs: message coalescing and split-phase communication generation.




Download Full History