The ACK intermediate code optimizer generates a good code through performing a peephole optimization over the EM intermediate code. The peephole optimization is very cost efficient and should use a string pattern matching algorithm to find the optimization pattern corresponding to the EM intermediate code when it is in the optimization. The authors have designed and implemented a tree pattern matching algorithm for more efficient optimization by improving the string pattern matching method of the ACK intermediate code optimizer. For this, an appropriate EM tree is constructed to the tree pattern matching of the EM code with a sequential structure from the front end of the ACK. Also, the pattern described in the optimization pattern table and the replacement should be reconstructed as a tree structure. The tree pattern matching optimizer conducting an optimization in real-time, applies a tree pattern matching algorithm in order to find an optimization pattern more efficiently while it circulates in the top-down method. Thus the tree pattern matching method requires a searching time to find an optimization pattern that is less than the string pattern matching method of ACK.
展开▼