Abstract
In this paper we propose a compile-time system that adds support for Thread-Level Speculation (TLS) into OpenMP. Our solution augments the original user code with calls to a TLS library that handles the speculative parallel execution of a given loop, with the help of a new OpenMP speculative clause for variable usage classification. To support it, we have developed a plugin-based compiler pass for GCC that augments the code of the loop. With this approach, we only need one additional code line to speculatively parallelize the code, compared with the tens or hundreds of changes needed (depending on the number of accesses to speculative variables) to manually apply the required transformations. Moreover, the plugin leads to a faster performance than the manual parallelization.
Chapter PDF
Similar content being viewed by others
References
Chandra, R., Menon, R., et al.: Parallel Programming in OpenMP, 1st edn. Morgan Kaufmann (October 2000)
Aldea, S., Llanos, D.R., González-Escribano, A.: Support for thread-level speculation into OpenMP. In: Chapman, B.M., Massaioli, F., Müller, M.S., Rorro, M. (eds.) IWOMP 2012. LNCS, vol. 7312, pp. 275–278. Springer, Heidelberg (2012)
Estebanez, A., Llanos, D.R., Gonzalez-Escribano, A.: New Data Structures to Handle Speculative Parallelization at Runtime. In: Proceedings of HLPP 2014 (2014)
Cintra, M., Llanos, D.R.: Toward efficient and robust software speculative parallelization on multiprocessors. In: Proceedings of PPoPP 2003 , pp. 13–24 (June 2003)
Cintra, M., Llanos, D.R.: Design space exploration of a software speculative parallelization scheme. IEEE Trans. Parallel Distrib. Syst. 16(6), 562–576 (2005)
Kulkarni, M., Pingali, K., et al.: Optimistic parallelism requires abstractions. In: Proceedings of PLDI 2007, pp. 211–222 (2007)
Gupta, M., Nim, R.: Techniques for speculative run-time parallelization of loops. In: Proc. of the 1998 ACM/IEEE Conference on Supercomputing, pp. 1–12 (1998)
Rauchwerger, L., Padua, D.: The LRPD test: Speculative run-time parallelization of loops with privatization and reduction parallelization. In: Proceedings of PLDI 1995, pp. 218–232 (1995)
Dang, F.H., Yu, H., Rauchwerger, L.: The R-LRPD test: Speculative parallelization of partially parallel loops. In: Proceedings of 16th IPDPS, pp. 20–29 (2002)
Xekalakis, P., Ioannou, N., Cintra, M.: Combining thread level speculation helper threads and runahead execution. In: Proceedings of ICS 2009, pp. 410–420 (2009)
Gao, L., Li, L., et al.: SEED: A statically greedy and dynamically adaptive approach for speculative loop execution. IEEE Trans. Comput. 62(5), 1004–1016 (2013)
GNU Project: GCC internals (2013), http://gcc.gnu.org/onlinedocs/gccint/
Novillo, D.: GCC an architectural overview, current status, and future directions. In: Proceedings of the Linux Symposium, Tokyo, Japan, pp. 185–200 (September 2006)
Novillo, D.: OpenMP and automatic parallelization in GCC. In: Proceedings of the 2006 GCC Developers’ Summit, Ottawa, Canada (2006)
Clarkson, K.L., Mehlhorn, K., Seidel, R.: Four results on randomized incremental constructions. Comput. Geom. Theory Appl. 3(4), 185–212 (1993)
Devroye, L., Mücke, E.P., Zhu, B.: A note on point location in Delaunay triangulations of random points. Algorithmica 22, 477–482 (1998)
Welzl, E.: Smallest enclosing disks (balls and ellipsoids). In: Maurer, H. (ed.) New Results and New Trends in Computer Science. LNCS, vol. 555, pp. 359–370. Springer, Heidelberg (1991)
Barnes, J.E.: TREE. Institute for Astronomy. University of Hawaii (1997), ftp://hubble.ifa.hawaii.edu/pub/barnes/treecode/
Larus, J., Kozyrakis, C.: Transactional memory. Commun. ACM 51(7), 80–88 (2008)
IBM: Thread-level speculative execution for C/C++. IBM XL C/C++ for Blue Gene, Tech. report (2012)
Packirisamy, V., Barathvajasankar, H.: OpenMP in multicore architectures. University of Minnesota, Tech. Rep (2005)
Martínez, J.F., Torrellas, J.: Speculative synchronization: Applying thread-level speculation to explicitly parallel applications. In: Proceedings of ASPLOS 2002, pp. 18–29 (2002)
Baek, W., Minh, C.C., et al.: The OpenTM transactional application programming interface. In: Proceedings of 16th ISCA, pp. 376–387. IEEE Computer Society (2007)
Milovanović, M., Ferrer, R., Unsal, O.S., Cristal, A., Martorell, X., Ayguadé, E., Labarta, J., Valero, M.: Transactional memory and OpenMP. In: Chapman, B., Zheng, W., Gao, G.R., Sato, M., Ayguadé, E., Wang, D. (eds.) IWOMP 2007. LNCS, vol. 4935, pp. 37–53. Springer, Heidelberg (2008)
Wong, M., Bihari, B.L., de Supinski, B.R., Wu, P., Michael, M., Liu, Y., Chen, W.: A case for including transactions in OpenMP. In: Sato, M., Hanawa, T., Müller, M.S., Chapman, B.M., de Supinski, B.R. (eds.) IWOMP 2010. LNCS, vol. 6132, pp. 149–160. Springer, Heidelberg (2010)
Ferri, C., Marongiu, A., et al.: SoC-TM: Integrated HW/SW support for transactional memory programming on embedded MPSoCs. In: Proceedings of CODES+ISSS 2011, pp. 39–48. ACM Press (2011)
Starynkevitch, B.: MELT: A translated domain specific language embedded in the GCC compiler. In: Proceedings of IFIP DSL 2011, pp. 118–142 (2011)
Fursin, G., Kashnikov, Y., et al.: Milepost GCC: machine learning enabled self-tuning compiler. Int’l. Journal of Parallel Programming 39(3), 296–327 (2011)
Malcolm, D.: GCC python plugin v0.12.(2013), https://fedorahosted.org/gcc-python-plugin/ (last visit: May 2014)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Aldea, S., Estebanez, A., Llanos, D.R., Gonzalez-Escribano, A. (2014). A New GCC Plugin-Based Compiler Pass to Add Support for Thread-Level Speculation into OpenMP. In: Silva, F., Dutra, I., Santos Costa, V. (eds) Euro-Par 2014 Parallel Processing. Euro-Par 2014. Lecture Notes in Computer Science, vol 8632. Springer, Cham. https://doi.org/10.1007/978-3-319-09873-9_20
Download citation
DOI: https://doi.org/10.1007/978-3-319-09873-9_20
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-09872-2
Online ISBN: 978-3-319-09873-9
eBook Packages: Computer ScienceComputer Science (R0)