A simple tree pattern matching algorithm for code generator
Resource
Computer Software and Applications Conference, 1995. COMPSAC 95. Proceedings., Nineteenth Annual International
Journal
Computer Software and Applications Conference, 1995. COMPSAC 95. Proceedings.
Journal Issue
Nineteenth Annual International
Pages
-
Date Issued
1995-08
Date
1995-08
Author(s)
Chen, Tzer-Shyong
Lai, Feipei
Shang, Rung-Ji
DOI
N/A
Abstract
This paper describes a simple tree pattern matching algorithm for the code generator of compilers. The intermediate code (Register Transfer Language) is matched with the tree-rewriting rules of the instruction description which describes the target architecture to generate the assembly code. The hashing function is used in our system to transform a tree pattern matching problem into a simple number comparison. Compared with GNU C compiler (gcc), the tree pattern matching time can be reduced by 69% and the compiler time by 6%, and the space of the instruction descriptions can be reduced by 4.10 times on DLX and 2.14 on SPARC. The size of table, which is necessary for the code generator, is quite small in our method.
Type
journal article
File(s)![Thumbnail Image]()
Loading...
Name
00524775.pdf
Size
496.71 KB
Format
Adobe PDF
Checksum
(MD5):2f49a8c6e585154f0cbae2dbfddb4444
