Results 1 -
6 of
6
Effectively Exploiting Indirect Jumps
- Software Practice and Experience
, 1997
"... This dissertation 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 ..."
Abstract
-
Cited by 13 (2 self)
- Add to MetaCart
This dissertation 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. Second, 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 fact, over twice the benefit was achieved from exploiting indirect jumps as a general code-improving transformation instead of using the traditional approach of producing indirect jumps as an intermediate code generation decision. In addition, the author show that with comparable branch target buffer support, indirect jumps improve branch prediction since they cause fewer mispredictions than the set of branches they replaced.
Efficient Multiway Radix Search Trees
, 1996
"... this paper discusses only its application to switch statements. There has been considerable work in the past ([2], [3], [5], [6] and [10]) on the Pascal case statement and code generation. The generation of code for switch statements is discussed in [4] and [11]. A scheme similar to MRST, but restri ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
this paper discusses only its application to switch statements. There has been considerable work in the past ([2], [3], [5], [6] and [10]) on the Pascal case statement and code generation. The generation of code for switch statements is discussed in [4] and [11]. A scheme similar to MRST, but restricted to binary radix search trees, appears in [9]. Preprint submitted to Elsevier Preprint 8 August 1997 Applications for fast sparse switch statements are many and varied. Two examples are: -- Let L be a Common-Lisp-like language with dynamic type dispatch on function arguments. Let F be an n argument generic function in L, with
Feedback-directed switch-case statement optimization
- In 4th Workshop on Compile and Runtime Techniques for Parallel Computing
, 2005
"... 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 e ..."
Abstract
-
Cited by 3 (2 self)
- Add to MetaCart
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 microarchitecture level performance study provides insights on the basis for this performance improvement. 1
Lucid And Efficient Case Analysis
, 1995
"... . This paper describes a new scheme for building static search trees, using multiway radix search trees. We present this method for code generation of switch statements in imperative languages. We show that, for sparse case sets, the method produces faster code on average than existing methods, requ ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
. This paper describes a new scheme for building static search trees, using multiway radix search trees. We present this method for code generation of switch statements in imperative languages. We show that, for sparse case sets, the method produces faster code on average than existing methods, requiring O(1) time with a small constant for the average search. We then apply this method to the problem of code generation for generic functions in object-oriented languages, and find that its use improves clarity as well as efficiency. Keywords Algorithms, Compilers, Switch statements, Code generation, Code optimization, Object-oriented methods. 1. Introduction Switch statements in C, like case statements in Pascal and Ada, are useful conditional control constructs. These statements represent multiway tree control structures, whereas if statements represent binary tree control structures. In this paper we present a new code generation method for switch statements, which on the average gener...
RE2C - A More Versatile Scanner Generator
- ACM Lett. Program. Lang. Syst
, 1994
"... It is usually claimed that lexical analysis routines are still coded by hand, despite the widespread availability of scanner generators, for efficiency reasons. While efficiency is a consideration, there exist freely available scanner generators such as GLA [7] that can generate scanners that are ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
It is usually claimed that lexical analysis routines are still coded by hand, despite the widespread availability of scanner generators, for efficiency reasons. While efficiency is a consideration, there exist freely available scanner generators such as GLA [7] that can generate scanners that are faster than most hand-coded ones. However, most generated scanners are tailored for a particular environment, and retargetting these scanners to other environments, if possible, is usually complex enough to make a hand-coded scanner more appealing. In this paper we describe RE2C, a scanner generator that not only generates scanners which are faster (and usually smaller) than those produced by any other scanner generator known to the authors, including GLA, but also adapt easily to any environment. Categories and Subject Descriptors: D.3.2 [Programming Languages]: Language Classifications -- specialized application languages; D.3.4 [Programming Languages]: Processors General Terms: Al...

