The Community for Technology Leaders
Computer and Information Technology, International Conference on (2010)
Bradford, West Yorkshire, UK
June 29, 2010 to July 1, 2010
ISBN: 978-0-7695-4108-2
pp: 2367-2372
ABSTRACT
In the C programming language standard, there are rules for implicit type conversions, including integer promotion rules. These rules, as well as the explicit type conversions imposed by the coder, may result in redundant code for 8-bit MCUs. However, code size is critical for the programs running in embedded systems, since smaller code size often means less consumption of ROM as well as energy, and thus more competitiveness for IC manufacturers. This paper presents a novel algorithm to eliminate redundant computations arising from unnecessary type conversions. Our algorithm employed the scheme of grammar attribute, and achieved remarkable performance in optimizing the code. Besides, using the scheme of grammar attribute, our algorithm is flexible and scalable to cover more syntactic elements of any programming language syntactically similar to C. Our experiment showed it achieved a reduction in code size of 36.1 percent with other traditional compiler optimization disabled, and 11.7 percent with other optimization enabled.
INDEX TERMS
Integer promotion elimination, Compiler optimization
CITATION

L. Zhou, Y. Chen, Y. He, Q. Li and W. Wu, "Integer Promotion Elimination on Abstract Syntax Tree," 2010 IEEE 10th International Conference on Computer and Information Technology (CIT), Bradford, 2010, pp. 2367-2372.
doi:10.1109/CIT.2010.407
92 ms
(Ver 3.3 (11022016))