GCC Lands Loop Splitting Optimization
Written by Michael Larabel in GNU on 22 October 2016 at 08:26 AM EDT. 7 Comments
GNU --
The latest GCC 7 development code has an optimization pass now for loop splitting.

The GCC documentation on the loop splitting pass explains, "If a loop contains a conditional statement that is always true for one part of the iteration space and false for the other this pass splits the loop into two, one dealing with one side the other only with the other, thereby removing one inner-loop conditional."

The pass can be turned on by the -fsplit-loops switch or it's also enabled by default when building with -O3.

There are some performance measurements with loop splitting enabled via this mailing list post but at most it's making around a 1% difference for select code-bases. The splt-loops pass is now in the GCC code-base and will be found with the GCC 7.1 stable release in early 2017.
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Related GNU News
Popular News