• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2007, Vol. 29 ›› Issue (2): 127-128.

• 论文 • 上一篇    下一篇

基于目标代码大小的指令选择

吴圣宁 李思昆   

  • 出版日期:2007-02-01 发布日期:2010-06-01

  • Online:2007-02-01 Published:2010-06-01

摘要:

在传统编译器中,指令选择往往采用动态规划的方法,其目的是优化目标代码性能(减小程序运行时间)。在嵌入式系统中,受到成本的约束,一般只有很有限的存储空间,因此要求目标代码仅可能地小。本文针对具有可变长指令的处理器,以优化代码大小为目的,采用动态规划的方法进行指令选择;相对于优化性能的目标代码,可缩小代码大小的15%
 到20%。

关键词: 嵌入式系统 编译器 目标代码 动态规划

Abstract:

Instruction selection of traditional compilers often adopts the dynamic programming technology to optimize the object code performance (reducing code  running time). Because of the cost constraint, embedded systems always have very limited memory resources, requiring code sizes as small as possible.   This paper provides an instruction selection method based on object code sizes for a type of processors which have variable instruction sizes, using dy  namic programming. And relative to the compilers for performance, it can reduce the code size from 15% to 20%.

Key words:  (embedded system,compiler,object code,dynamic programming)