Procedural Abstraction with Reverse Prefix Tees

被引:1
作者
Schaeckeler, Stefan [1 ]
Shang, Weijia [1 ]
机构
[1] Santa Clara Univ, Dept Comp Engn, Santa Clara, CA 95053 USA
来源
CGO 2009: INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION, PROCEEDINGS | 2009年
关键词
embedded systems; code compaction; code size reduction; post-pass optimization; procedural abstraction; suffix tree; reverse prefix tree; program visualization; CONSTRUCTION;
D O I
10.1109/CGO.2009.25
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
For memory constrained environments like embedded systems, optimization for size is often as important as, if not more important than, optimization for execution speed. A common technique for compacting code is procedural abstraction. Equivalent code fragments are identified and abstracted into a procedure. The standard algorithm for identifying these fragments is based on suffix trees. We propose in this paper the calculation of suffix trees over the program text not in the common top-down fashion, but reversed, i.e. bottom-up. With this simple modification, not only equivalent fragments can be identified, but also fragments equivalent to (possibly often differently long) suffixes of the longest fragments. A longest fragment is then abstracted, and all fragments are replaced by procedure calls to their corresponding start instruction somewhere in the abstracted procedure. This allows us to harvest more and longer fragments than with standard suffix trees, improving code size reductions on average by 8.277% over standard suffix trees.
引用
收藏
页码:243 / 253
页数:11
相关论文
共 15 条
  • [1] [Anonymous], 1997, ACM SIGACT NEWS
  • [2] BAKER BS, 1995, WCRE 95
  • [3] COOPER K, 1999, P ACM SIGPLAN C PROG, P139
  • [4] Compiler techniques for code compaction
    Debray, SK
    Evans, W
    Muth, R
    De Sutter, B
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2000, 22 (02): : 378 - 415
  • [5] DESUTTER B, 2003, LCTES 03, P244
  • [6] Dreweke A, 2007, INT SYM CODE GENER, P259
  • [7] FRASER ICW, 1984, SIGPLAN 84, P117
  • [8] Gyimothy T., 2005, US patent nr, Patent No. [7,293,264, 7293264]
  • [9] He HF, 2007, INT SYM CODE GENER, P283
  • [10] Kim YS, 2002, ELEC SOC S, V2002, P277