New "Ranger" Infrastructure On Tap For The GCC 10 Compiler

Written by Michael Larabel in GNU on 28 May 2019 at 09:01 AM EDT. 8 Comments
GNU
Ranger is the on-demand ranger generator being worked on for the GNU Compiler Collection (GCC) by Red Hat's compiler experts for the past several years. Following a recent update on the effort, it looks like Ranger might land for next year's GCC 10 release after failing to make it in time for GCC 9.

Ranger allows for querying range information on-demand for SSA names/variables from within anywhere in the IL with minimal overhead, Ranger was originally brought up last year by Red Hat's Andrew MacLeod and the discussion over it was reignited this past week following the latest status update. With their latest code, the Ranger'ed GCC compiler can build the entire Fedora package set. Using Ranger was found to help the performance in cases where checking the ranges were needed on just a few SSA names.

MacLeod noted of the possible speed-ups in passes employing Ranger for range information, "When utilized in passes which only require ranges for a small number of ssa-names we see significant improvements. The sprintf warning pass for instance allows us to remove the calculations of dominators and the resulting forced walk order. We see a 95% speedup (yes, 1/20th of the overall time!). This is primarily due to no additional overhead and only calculating the few things that are actually needed. The walloca and wrestrict passes are a similar model, but as they have not been converted to use EVRP ranges yet, we don’t see similar speedups there."

Ranger is looking good and they are hoping to see it merged soon for stage one development of GCC 10. More details via this mailing list thread.

LLVM lead developer Chris Lattner also reviewed and commented on this value range analysis framework. Lattner's initial impressions are it's "very nicely considered approach and solves several issues in the corresponding LLVM [infrastructure]." So some of the GCC ideas might get carried over to LLVM as well moving forward after some of their earlier on-demand range code didn't perform up to expectations.
Related News
About The Author
Michael Larabel

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 20,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, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week