Abstract
Expressing algorithms using immutable arrays greatly simplifies the challenges of automatic SIMD vectorization, since several important classes of dependency violations cannot occur. The Haskell programming language provides libraries for programming with immutable arrays, and compiler support for optimizing them to eliminate the overhead of intermediate temporary arrays. We describe an implementation of automatic SIMD vectorization in a Haskell compiler which gives substantial vector speedups for a range of programs written in a natural programming style. We compare performance with that of programs compiled by the Glasgow Haskell Compiler.
- T. Anderson, N. Glew, P. Guo, B. T. Lewis,W. Liu, Z. Liu, L. Petersen, M. Rajagopalan, J. M. Stichnoth, G. Wu, and D. Zhang. Pillar: A parallel implementation language. In V. Adve, M. J. Garzaran, and P. Petersen, editors, Languages and Compilers for Parallel Computing, pages 141--155. Springer-Verlag, Berlin, Heidelberg, 2008. Google Scholar
Digital Library
- A. Appel and T. Jim. Shrinking lambda expressions in linear time. Journal of Functional Programming, 7(5), Sept. 1997. Google Scholar
Digital Library
- A. J. C. Bik. The Software Vectorization Handbook. Intel Press, 2004. Google Scholar
Digital Library
- G. E. Blelloch. Programming parallel algorithms. Communications of the ACM, 39(3):85--97, Mar. 1996. ISSN 0001-0782. Google Scholar
Digital Library
- M. Fluet and S. Weeks. Contification using dominators. In International Conference on Functional Programming, pages 2--13, Florence, Italy, 2001. ACM. Google Scholar
Digital Library
- G. Keller, M. M. Chakravarty, R. Leshchinskiy, S. Peyton Jones, and B. Lippmeier. Regular, shape-polymorphic, parallel arrays in Haskell. In International Conference on Functional Programming, pages 261--272, Baltimore, Maryland, USA, 2010. ACM. Google Scholar
Digital Library
- K. Kennedy, C. Koelbel, and H. Zima. The rise and fall of High Performance Fortran: an historical object lesson. In History of Programming Languages, pages 1--22. ACM, 2007. Google Scholar
Digital Library
- R. Leshchinskiy. Recycle your arrays! In Practical Aspects of Declarative Languages, pages 209--223. Springer, 2009. Google Scholar
Digital Library
- B. Lippmeier and G. Keller. Efficient parallel stencil convolution in haskell. In Haskell Symposium, pages 59--70. ACM, 2011. Google Scholar
Digital Library
- G. Mainland, R. Leshchinskiy, and S. Peyton Jones. Exploiting Vector Instructions with Generalized Stream Fusion. In International Conference on Functional Programming. ACM, 2013. Google Scholar
Digital Library
- L. Petersen and N. Glew. GC-safe interprocedural unboxing. In Compiler Construction, pages 165--184, Tallinn, Estonia, 2012. Springer-Verlag. Google Scholar
Digital Library
- S. Peyton Jones. Harnessing the multicores: Nested data parallelism in Haskell. In Asian Symposium on Programming Languages and Systems, pages 138--138, Bangalore, India, 2008. Springer-Verlag. Google Scholar
Digital Library
- W. Pugh. A practical algorithm for exact array dependence analysis. Communications of the ACM, 35(8):102--114, 1992. Google Scholar
Digital Library
- D. A. Terei and M. M. Chakravarty. An LLVM backend for GHC. SIGPLAN Notices, 45(11):109--120, 2010. Google Scholar
Digital Library
- N. Vasilache, C. Bastoul, A. Cohen, and S. Girbal. Violated dependence analysis. In International Conference on Supercomputing, pages 335--344. ACM, 2006. Google Scholar
Digital Library
- S. Weeks. Whole-program compilation in MLton. In Workshop on ML, pages 1--1, Portland, Oregon, USA, 2006. ACM. Google Scholar
Digital Library
Index Terms
Automatic SIMD vectorization for Haskell
Recommendations
The Intel labs Haskell research compiler
Haskell '13The Glasgow Haskell Compiler (GHC) is a well supported optimizing compiler for the Haskell programming language, along with its own extensions to the language and libraries. Haskell's lazy semantics imposes a runtime model which is in general difficult ...
The Intel labs Haskell research compiler
Haskell '13: Proceedings of the 2013 ACM SIGPLAN symposium on HaskellThe Glasgow Haskell Compiler (GHC) is a well supported optimizing compiler for the Haskell programming language, along with its own extensions to the language and libraries. Haskell's lazy semantics imposes a runtime model which is in general difficult ...
Automatic SIMD vectorization for Haskell
ICFP '13: Proceedings of the 18th ACM SIGPLAN international conference on Functional programmingExpressing algorithms using immutable arrays greatly simplifies the challenges of automatic SIMD vectorization, since several important classes of dependency violations cannot occur. The Haskell programming language provides libraries for programming ...







Comments