SCoP Detection: A Fast Algorithm for Industrial Compilers

SCoP detection is a search algorithm that a compiler for imperative programming languages is using to nd loops to be represented and optimized in the polyhedral model. We improved the current algorithms for SCoP detection by operating on the natural loops tree, a higher level representation of the CFG, in order to lower the overall compilation time. The algorithm described in this paper has been implemented in GCC 6.0 as a requirement to enable by default the isl schedule optimizer at \-O3 -fprole-use" . We present evidence that the new SCoP detection algorithm improves the overall compilation time: on a large C++ application, the overall compilation time spent in SCoP detection was reduced from 7% to 0:3%. Experimental results also show that GCC detects larger SCoPs on Polybench: 6:09 loops per SCoP as compared to 2:59 loops per SCoP with the previous algorithm.

[1]  Uday Bondhugula,et al.  A practical automatic polyhedral parallelizer and locality optimizer , 2008, PLDI '08.

[2]  Hongbin Zheng,et al.  Polly – Polyhedral optimization in LLVM , 2012 .

[3]  Christian Lengauer,et al.  Polly - Performing Polyhedral Optimizations on a Low-Level Intermediate Representation , 2012, Parallel Process. Lett..

[4]  G. Ramalingam,et al.  On loops, dominators, and dominance frontiers , 2002, TOPL.

[5]  Albert Cohen,et al.  Induction Variable Analysis with Delayed Abstractions , 2005, HiPEAC.

[6]  Albert Cohen,et al.  GRAPHITE Two Years After First Lessons Learned From Real-World Polyhedral Compilation , 2010 .

[7]  Ron K. Cytron,et al.  Efficiently computing φ-nodes on-the-fly , 1993 .

[8]  J. Ramanujam,et al.  Optimistic Delinearization of Parametrically Sized Arrays , 2015, ICS.

[9]  Pierre Jouvelot,et al.  In and Out of SSA : a Denotational Specification , 2009 .

[10]  J. Ramanujam,et al.  On Recovering Multi-Dimensional Arrays in Polly , 2015 .

[11]  Guang R. Gao,et al.  Identifying loops using DJ graphs , 1996, TOPL.

[12]  Keshav Pingali,et al.  The program structure tree: computing control regions in linear time , 1994, PLDI '94.

[13]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[14]  Albert Cohen,et al.  The Polyhedral Model Is More Widely Applicable Than You Think , 2010, CC.

[15]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..

[16]  Sven Verdoolaege,et al.  isl: An Integer Set Library for the Polyhedral Model , 2010, ICMS.

[17]  David Parello,et al.  Semi-Automatic Composition of Loop Transformations for Deep Parallelism and Memory Hierarchies , 2006, International Journal of Parallel Programming.

[18]  Mark N. Wegman,et al.  An efficient method of computing static single assignment form , 1989, POPL '89.