• DocumentCode
    2200302
  • Title

    Integer Promotion Elimination on Abstract Syntax Tree

  • Author

    Qing´an Li ; He, Yanxiang ; Zhou, Lei ; Wu, Wei ; Chen, Yong

  • Author_Institution
    Sch. of Comput., Wuhan Univ., Wuhan, China
  • fYear
    2010
  • fDate
    June 29 2010-July 1 2010
  • Firstpage
    2367
  • Lastpage
    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.
  • Keywords
    C language; embedded systems; microprocessor chips; program compilers; tree data structures; 8-bit MCUs; C programming language; abstract syntax tree; compiler optimization; embedded systems; explicit type conversions; grammar attribute; implicit type conversions; integer promotion elimination; microcomputer unit; redundant code; Casting; Computers; Educational institutions; Grammar; Optimization; Semantics; Syntactics; Compiler optimization; Integer promotion elimination;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Computer and Information Technology (CIT), 2010 IEEE 10th International Conference on
  • Conference_Location
    Bradford
  • Print_ISBN
    978-1-4244-7547-6
  • Type

    conf

  • DOI
    10.1109/CIT.2010.407
  • Filename
    5578303