Feedback-Directed Switch-Case Statement Optimization

  • Authors:
  • Jose Nelson Amaral

  • Affiliations:
  • University of Alberta

  • Venue:
  • ICPPW '05 Proceedings of the 2005 International Conference on Parallel Processing Workshops
  • Year:
  • 2005

Quantified Score

Hi-index 0.01

Visualization

Abstract

This paper presents two new feedback-guided techniques to generate code for switch-case statements: hot default case promotion (DP) and switch-case statement partitioning (SP). DP improves case dispatch while SP simplifies case dispatch, improves instruction layout and enables further inlining. An extensive experimental study reveals up to 4.9% performance variations among different strategies. The largest performance improvement of DP and SP over existing O3 optimization in the Open Research Compiler (ORC) is 1.7%. A micro-architecture level performance study provides insights on the basis for this performance improvement.