排序方式: 共有5条查询结果,搜索用时 15 毫秒
1
1.
Emerging peephole optimizers can relieve code generators of much case analysis, but delaying code generation decisions requires register allocation algorithms that accept object code instead of the more usual intermediate code. This paper describes two programs that implement such algorithms for a retargetable optimizing compiler. In a machine-independent fashion, they allocate and assign registers, eliminate common subexpressions (including often-missed machine-specific ones), identify dead variables, and define windows for the companion peephole optimizer. Their techniques for handling machine-specific data should generalize to other optimizations as well. 相似文献
2.
Abstract machine modelling is a popular technique for developing portable compilers. A compiler can be quickly realized by translating the abstract machine operations to target machine operations. The problem with these compilers is that they trade execution efficiency for portability. Typically, the code emitted by these compilers runs two to three times slower than the code generated by compilers that employ sophisticated code generators. This paper describes a C compiler that uses abstract machine modelling to achieve portability. The emitted target machine code is improved by a simple, classical rule-directed peephole optimizer. Our experiments with this compiler on four machines show that a small number of very general handwritten patterns (under 40) yields code that is comparable to the code from compilers that use more sophisticated code generators. As an added bonus, compilation time on some machines is reduced by 10 to 20 per cent. 相似文献
3.
4.
5.
David Alex Lamb 《Software》1981,11(6):639-647
The design and construction of a peephole optimizer is described. The optimizer consists of a database of patterns, a translator that translates the patterns into an implementation language, and a pattern-matcher skeleton into which the generated pattern code is inserted. it is argued that this three-part split is a good way to approach the construction of certain kinds of programs. 相似文献
1