Results 1 - 10
of
32
Engineering a simple, efficient code-generator generator
- ACM Letters on Programming Languages and Systems
, 1992
"... Many code-generator generators use tree pattern matching and dynamic programming. This paper describes a simple program that generates matchers that are fast, compact, and easy to understand. It is simpler than common alternatives: 200–700 lines of Icon or 950 lines of C versus 3000 lines of C for T ..."
Abstract
-
Cited by 107 (5 self)
- Add to MetaCart
Many code-generator generators use tree pattern matching and dynamic programming. This paper describes a simple program that generates matchers that are fast, compact, and easy to understand. It is simpler than common alternatives: 200–700 lines of Icon or 950 lines of C versus 3000 lines of C for Twig and 5000 for burg. Its matchers run up to 25 times faster than Twig’s, They are necessarily slower than burg’s BURS (bottom-up rewrite system) matchers, but they are more flexible and still practical. Categories and Subject Descriptors: D.3.4 [Programming Languages]: Processors—code gener-ation; compilers; translator writing systems and compiler generators
`C: A Language for High-Level, Efficient, and Machine-independent Dynamic Code Generation
- In Symposium on Principles of Programming Languages
, 1996
"... Dynamic code generation allows specialized code sequences to be crafted using runtime information. Since this information is by definition not available statically, the use of dynamic code generation can achieve performance inherently beyond that of static code generation. Previous attempts to sup ..."
Abstract
-
Cited by 97 (8 self)
- Add to MetaCart
Dynamic code generation allows specialized code sequences to be crafted using runtime information. Since this information is by definition not available statically, the use of dynamic code generation can achieve performance inherently beyond that of static code generation. Previous attempts to support dynamic code generation have been low-level, expensive, or machine-dependent. Despite the growing use of dynamic code generation, no mainstream language provides flexible, portable, and efficient support for it.
An Accurate Worst Case Timing Analysis for RISC Processors
- IN IEEE REAL-TIME SYSTEMS SYMPOSIUM
, 1995
"... An accurate and safe estimation of a task's worst case execution time (WCET) is crucial for reasoning about the timing properties of real-time systems. In RISC processors, the execution time of a program construct (e.g., a statement) is affected by various factors such as cache hits/misses and pi ..."
Abstract
-
Cited by 94 (3 self)
- Add to MetaCart
An accurate and safe estimation of a task's worst case execution time (WCET) is crucial for reasoning about the timing properties of real-time systems. In RISC processors, the execution time of a program construct (e.g., a statement) is affected by various factors such as cache hits/misses and pipeline hazards, and these factors impose serious problems in analyzing the WCETs of tasks. To analyze the timing effects of RISC's pipelined execution and cache memory, we propose extensions to the original timing schema where the timing information associated with each program construct is a simple time-bound. In our approach, associated with each program construct is what we call a WCTA (Worst Case Timing Abstraction), which contains detailed timing information of every execution path that might be the worst case execution path of the program construct. This extension leads to a revised timing schema that is similar to the original timing schema except that concatenation and pruning...
tcc: A System for Fast, Flexible, and High-level Dynamic Code Generation
- IN PROCEEDINGS OF THE ACM SIGPLAN '97 CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION
, 1997
"... tcc is a compiler that provides efficient and high-level access to dynamic code generation. It implements the `C ("Tick-C") programming language, an extension of ANSI C that supports dynamic code generation [15]. `C gives power and flexibility in specifying dynamically generated code: whereas most o ..."
Abstract
-
Cited by 55 (3 self)
- Add to MetaCart
tcc is a compiler that provides efficient and high-level access to dynamic code generation. It implements the `C ("Tick-C") programming language, an extension of ANSI C that supports dynamic code generation [15]. `C gives power and flexibility in specifying dynamically generated code: whereas most other systems use annotations to denote run-time invariants, `C allows the programmer to specify and compose arbitrary expressions and statements at run time. This degree of control is needed to efficiently implement some of the most important applications of dynamic code generation, such as "just in time" compilers [17] and efficient simulators [10, 48, 46]. The paper focuses on the techniques that allow tcc to provide `C's flexibility and expressiveness without sacrificing run-time code generation efficiency. These techniques include fast register allocation, efficient creation and composition of dynamic code specifications, and link-time analysis to reduce the size of dynamic code generato...
Automatic, Template-Based Run-Time Specialization: Implementation and Experimental Study
- In International Conference on Computer Languages
, 1998
"... Specializing programs with respect to run-time values has been shown to drastically improve code performance on realistic programs ranging from operating systems to graphics. Recently, various approaches to specializing code at run-time have been proposed. However, these approaches still suffer from ..."
Abstract
-
Cited by 47 (12 self)
- Add to MetaCart
Specializing programs with respect to run-time values has been shown to drastically improve code performance on realistic programs ranging from operating systems to graphics. Recently, various approaches to specializing code at run-time have been proposed. However, these approaches still suffer from shortcomings that limit their applicability: they are manual, too expensive, or require programs to be written in a dedicated language. We solve these problems by introducing new techniques to implement run-time specialization. The key to our approach is the use of code templates. Templates are automatically generated from ordinary programs and are optimized before run time, allowing high-quality code to be quickly generated at run time. Experimental results obtained on scientific and graphics code indicate that our approach is highly effective. Little run-time overhead is introduced, since code generation primarily consists of copying instructions. Run-time specialized programs run up to 1...
An Accurate Worst Case Timing Analysis Technique for RISC Processors
, 1994
"... An accurate and safe estimation of a task's worst case execution time (WCET) is crucial for reasoning about the timing properties of real-time systems. In RISC processors, the execution time of a program construct (e.g., a statement) is affected by various factors such as cache hits/misses and pipel ..."
Abstract
-
Cited by 45 (4 self)
- Add to MetaCart
An accurate and safe estimation of a task's worst case execution time (WCET) is crucial for reasoning about the timing properties of real-time systems. In RISC processors, the execution time of a program construct (e.g., a statement) is affected by various factors such as cache hits/misses and pipeline hazards, and these factors impose serious problems in analyzing the WCETs of tasks. To analyze the timing effects of RISC's pipelined execution and cache memory, this paper proposes extensions of the original timing schema [26] where the timing information associated with each program construct is a simple time-bound. We associate with each program construct what we call a WCTA (Worst Case Timing Abstraction), which contains detailed timing information of every execution path that might be the worst case execution path of the program construct. This extension leads to a revised timing schema that is similar to the original timing schema except that concatenation and pruning operations on...
A Retargetable Debugger
, 1992
"... Debuggers are specific to the machines, operating systems, and languages that they support. Much of a debugger has to be re-implemented for each new machine, so debuggers that work with a variety of machines and operating systems can get unwieldy. Improvements to debuggers may be lost unless they ar ..."
Abstract
-
Cited by 43 (14 self)
- Add to MetaCart
Debuggers are specific to the machines, operating systems, and languages that they support. Much of a debugger has to be re-implemented for each new machine, so debuggers that work with a variety of machines and operating systems can get unwieldy. Improvements to debuggers may be lost unless they are re-implemented as users move to new machines. If retargeting debuggers were easier, other improvements would be more valuable. This thesis describes the design and implementation of ldb, a prototype retargetable debugger. Dealing with symbol-table formats is one of the most machine-dependent aspects of debuggers. ldb eliminates this machine dependence by using one format on all machines. The format is a language---a dialect of PostScript, which is extensible and can represent procedures. ldb reduces retargeting effort associated with variations in run-time support by controlling its target process using a debug nub, which is a small piece of object code linked with the target program. Mu...
`C and tcc: A Language and Compiler for Dynamic Code Generation
- ACM Transactions on Programming Languages and Systems
, 1999
"... This paper makes the following contributions: ---It describes the `C language, and motivates the design of the language ..."
Abstract
-
Cited by 41 (3 self)
- Add to MetaCart
This paper makes the following contributions: ---It describes the `C language, and motivates the design of the language
tcc: A Template-Based Compiler for `C
- In Proceedings of the First Workshop on Compiler Support for Systems Software (WCSSS
, 1995
"... Dynamic code generation is an important technique for improving the performance of software by exploiting information known only at run time. `C (Tick C) is a superset of ANSI C that, unlike most prior systems, allows high-level, efficient, and machineindependent specification of dynamically generat ..."
Abstract
-
Cited by 26 (2 self)
- Add to MetaCart
Dynamic code generation is an important technique for improving the performance of software by exploiting information known only at run time. `C (Tick C) is a superset of ANSI C that, unlike most prior systems, allows high-level, efficient, and machineindependent specification of dynamically generated code. `C provides facilities for dynamic code generation within the context of a statically typed, imperative language closely related to the language most widely used in systems development. This paper describes tcc, a compiler currently being written for `C. tcc has two objectives: (1) to deliver a complete, solid implementation of `C, and (2) to minimize the run-time costs of dynamic code generation. tcc implements dynamic code generation by emitting templates, segments of binary code which at run time can be combined and completed with the values of registers, stack offsets, and constants. tcc also allows some decisions about storage allocation and instruction selection to occur at ru...
Simple Register Spilling in a Retargetable Compiler
, 1995
"... This paper describes the management of register spills in a retargetable C compiler. Spills are rare, which means that testing is a bigger problem than performance. The trade-offs have been arranged so that the common case (no spills) generates respectable code quickly and the uncommon case (spills) ..."
Abstract
-
Cited by 15 (3 self)
- Add to MetaCart
This paper describes the management of register spills in a retargetable C compiler. Spills are rare, which means that testing is a bigger problem than performance. The trade-offs have been arranged so that the common case (no spills) generates respectable code quickly and the uncommon case (spills) is less efficient but as simple as possible. The technique has proven practical and is in production use on VAX, Motorola 68020, SPARC and MIPS machines. KEY WORDS ANSI C code generation compilers register allocation register spilling INTRODUCTION When register allocators run out of registers, they generate code to spill one or more busy registers into temporaries and code to reload those values when they are needed again. The trend in compiling research is increasing the sophistication --- and the implementation and execution costs --- of the techniques that avoid spills.

