DocumentCode
3379311
Title
A simple tree pattern matching algorithm for code generator
Author
Chen, Tzer-Shyong ; Lai, Feipei ; Shang, Rung-Ji
Author_Institution
Dept. of Electr. Eng., Nat. Taiwan Univ., Taipei, Taiwan
fYear
1995
fDate
9-11 Aug 1995
Firstpage
162
Lastpage
167
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
Keywords
assembly language; compiler generators; file organisation; pattern matching; tree searching; DLX; GNU C compiler; Register Transfer Language; SPARC; assembly code; code generator; compiler generator; compiler time; hashing function; instruction description; tree pattern matching algorithm; tree pattern matching time; tree-rewriting rules; Assembly; Character generation; Costs; Dynamic programming; Flowcharts; Heuristic algorithms; Instruction sets; Pattern matching;
fLanguage
English
Publisher
ieee
Conference_Titel
Computer Software and Applications Conference, 1995. COMPSAC 95. Proceedings., Nineteenth Annual International
Conference_Location
Dallas, TX
ISSN
0730-3157
Print_ISBN
0-8186-7119-X
Type
conf
DOI
10.1109/CMPSAC.1995.524775
Filename
524775
Link To Document