A study of irreducibility in C programs
Version of Record online: 8 MAR 2011
Copyright © 2011 John Wiley & Sons, Ltd.
Software: Practice and Experience
Volume 42, Issue 1, pages 117–130, January 2012
How to Cite
Stanier, J. and Watson, D. (2012), A study of irreducibility in C programs. Softw: Pract. Exper., 42: 117–130. doi: 10.1002/spe.1059
- Issue online: 27 DEC 2011
- Version of Record online: 8 MAR 2011
- Manuscript Revised: 29 DEC 2010
- Manuscript Accepted: 29 DEC 2010
- Manuscript Received: 19 APR 2010
- control flow;
- structural analysis;
- open source
Compilers use a variety of techniques to optimize and transform loops. However, many of these optimizations do not work when the loop is irreducible. Node splitting techniques transform irreducible loops into reducible loops, but many real-world compilers choose to leave them unoptimized. This article describes an empirical study of irreducibility in current versions of open-source software, and then compares them with older versions. We also study machine-generated C code from a number of software tools. We find that irreducibility is extremely rare, and is becoming less common with time. We conclude that leaving irreducible loops unoptimized is a perfectly feasible future-proof option due to the rarity of its occurrence in non-trivial software. Copyright © 2011 John Wiley & Sons, Ltd.