Software Practice and Experience · 1999 · 20 citations · 16 references
ComputingComputer EngineeringComputer ScienceCompilersComputer ArchitectureProgramming LanguagesBranch PredictionCode GenerationControl-flow AnalysisData-flow AnalysisInstruction SelectionMemory Hierarchy OptimizationBranch AnalysisBranch Prediction AnalysisBranch Prediction OptimizationBranch Target BuffersControl Flow ControlExecution Time AnalysisInterprocedural Dataflow AnalysisJump Detection
This paper describes a general code-improving transformation that can coalesce conditional branches into an indirect jump from a table. Applying this transformation allows an optimizer to exploit indirect jumps for many other coalescing opportunities besides the translation of multiway branch statements. First, dataflow analysis is performed to detect a set of coalescent conditional branches, which are often separated by blocks of intervening instructions. Secondly, several techniques are applied to reduce the cost of performing an indirect jump operation, often requiring the execution of only two instructions on a SPARC. Finally, the control flow is restructured using code duplication to replace the set of branches with an indirect jump. Thus, the transformation essentially provides early resolution of conditional branches that may originally have been some distance from the point where the indirect jump is inserted. The transformation can be frequently applied with often significant reductions in the number of instructions executed, total cache work, and execution time. In addition, we show that with branch target buffer support, indirect jumps improve branch prediction since they cause fewer mispredictions than the set of branches they replaced. Copyright © 1999 John Wiley & Sons, Ltd.
16
Limits of instruction-level parallelism
David W. Wall · 1991 · 631 citations
Reducing indirect function call overhead in C++ programs
Brad Calder, Dirk Grunwald · 1994 · 182 citations
A portable global optimizer and linker
Manuel E. Benitez, Jack W. Davidson · ACM SIGPLAN Notices · 1988 · 178 citations · Full text
Target prediction for indirect jumps
Po-Yung Chang, Eric Hao, Yale N. Patt · 1997 · 149 citations · Full text