Optimizations performed at link time or directly applied to final program executables have received increased attention in recent years. This paper discusses the discovery and elimination of redundant conditional branches in the context of a link-time optimizer, an optimization that we call Conditional Branch Redundancy Elimination (CBRE). Our experiments show that around 20% of conditional branches in a program can be considered redundant because their outcomes can be determined from a previous short dynamic execution frame. Then, we present several CBRE algorithms targeted at optimizing away these redundancies. Our results show that around 5% of the conditional branch redundancy detected can indeed be eliminated, which translates into execution time reductions of around 4%. We also give accurate measures of the impact of applying CBRE in code growth.
Citation:
Manel Fernández, Roger Espasa, "Link-Time Optimization Techniques for Eliminating Conditional Branch Redundancies," interact, pp.87-96, Eighth Annual Workshop on Interaction between Compilers and Computer Architectures (INTERACT'04), 2004