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

J4 ›› 2010, Vol. 32 ›› Issue (11): 132-135.doi: 10.3969/j.issn.1007130X.2010.

• 论文 • 上一篇    下一篇

一种实用的自动代码划分算法

杨灿群,李春江,王锋   

  1. (国防科学技术大学计算机学院,湖南 长沙 410073)
  • 收稿日期:2008-12-15 修回日期:2009-04-20 出版日期:2010-11-25 发布日期:2010-11-25
  • 通讯作者: 杨灿群
  • 作者简介:杨灿群(1968),男,湖南桃江人,博士,副研究员,研究方向为系统结构和编译技术;李春江,博士,副研究员,研究方向为系统结构和编译优化;王锋,博士生,研究方向为编译优化。
  • 基金资助:
    国家863计划资助项目(2008AA01Z110)

A Practical Automatic Code Partitioning Algorithm

YANG Canqun, LI Chunjiang,WANG Feng   

  1. (School of Computer Science,National University of Defense Technology,Changsha 410073,China)
  • Received:2008-12-15 Revised:2009-04-20 Online:2010-11-25 Published:2010-11-25

摘要: 在编译器中进行自动代码划分然后采用代码重叠技术,是内存容量较小的处理器发挥性能的关键技术之一。随着异构多核处理器的出现,这类处理器通常作为协处理器。本文提出了一种实用的自动代码划分算法,并面向Cell处理器在GNU 工具链中进行了实现。该算法首先根据调用频率发现调用热点,然后采用简化的聚类方法进行热点指导的分区聚集,最后进行容量指导的分区合并。实验结果表明,算法复杂度较低并能取得很好的效果。

关键词: 自动代码划分, GNU工具链, Cell处理器

Abstract: Automatically partitioning the code in compilers and applying the code overlay technique is one of the key techniques for exploiting the performance of processors with small memory capacity. With the occuring of heterogeneous multicore processors, such a kind of processor usually acts as a synergistic processing unit. The paper presents a practical automatic code partitioning algorithm and implements it by the GNU tool chain for the Cell processors. It finds the hot points in call graphs according to the calling frequency, and then adopts a simplified clustering method to perform hotpointdirected partition clustering. Finally, it performs capacitydirected partition merging. The experimental results show that the algorithm can work perfectly with lower complexity.

Key words: automatic code partitioning;GNU toolchain;Cell processor