Wish Branches: Combining Conditional Branching and Predication for Adaptive Predicated Execution

  • Authors:
  • Hyesoon Kim;Onur Mutlu;Jared Stark;Yale N. Patt

  • Affiliations:
  • University of Texas at Austin;University of Texas at Austin;University of Texas at Austin;Intel Corporation

  • Venue:
  • Proceedings of the 38th annual IEEE/ACM International Symposium on Microarchitecture
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

Predicated execution has been used to reduce the number of branch mispredictions by eliminating hard-to-predict branches. However, the additional instruction overhead and additional data dependencies due to predicated execution sometimes offset the performance advantage of having fewer mispredictions. We propose a mechanism in which the compiler generates code that can be executed either as predicated code or non-predicated code (i.e., code with normal conditional branches). The hardware decides whether the predicated code or the non-predicated code is executed based on a run-time confidence estimation of the branch驴s prediction. The code generated by the compiler is the same as predicated code, except the predicated conditional branches are NOT removed - they are left intact in the program code. These conditional branches are called wish branches. The goal of wish branches is to use predicated execution for hard-to-predict dynamic branches and branch prediction for easy-to-predict dynamic branches, thereby obtaining the best of both worlds. We also introduce a class of wish branches, called wish loops, which utilize predication to reduce the misprediction penalty for hard-to-predict backward (loop) branches. We describe the semantics, types, and operation of wish branches along with the software and hardware support required to generate and utilize them. Our results show that wish branches decrease the average execution time of a subset of SPEC INT 2000 benchmarks by 14.2% compared to traditional conditional branches and by 13.3% compared to the best-performing predicated code binary.