发明名称 METHOD AND APPARATUS FOR CODE SIZE REDUCTION
摘要 A method for code size reduction, which comprises determining basic blocks in an IR module; grouping the basic blocks having duplicate code into groups; providing weighting values corresponding to different instructions of the module, wherein the weighting values are determined based on a plurality of intermediate representation program codes; determining a weighted size of the module, wherein the weighted size of the module is determined by summing weighted sizes of the basic blocks of the module, and the weighted size of each basic block is determined by summing products of numbers of different instructions of the basic blocks and the corresponding weighting values; removing duplicates in one group to obtain a module having one processed group; determining a weighted size of the module having one processed group; and comparing the weighted size of the module to the weighted size of the module having one processed group.
申请公布号 US2014344791(A1) 申请公布日期 2014.11.20
申请号 US201313894694 申请日期 2013.05.15
申请人 NATIONAL TSING HUA UNIVERSITY 发明人 YANG Kun Hua;WANG Shao Chung;LEE Jenq Kuen
分类号 G06F9/45 主分类号 G06F9/45
代理机构 代理人
主权项 1. A method for code size reduction, comprising the steps of: a) determining basic blocks in an intermediate representation module; b) grouping ones of the basic blocks having duplicate code into groups; c) providing weighting values corresponding to different instructions of the module, wherein the weighting values are determined based on a plurality of intermediate representation program codes of number i; d) determining a weighted size of the module, wherein the weighted size of the module is determined by summing weighted sizes of the basic blocks of the module, and the weighted size of each basic block is determined by summing products of numbers of different instructions of the basic blocks and the corresponding weighting values; e) removing duplicates in one of the groups of the module to obtain a module having one processed group; f) determining a weighted size of the module having one processed group, wherein the weighted size of the module having one processed group is determined by summing weighted sizes of the basic blocks of the module having one processed group, and the weighted size of each basic block is determined by summing products of numbers of different instructions of the basic blocks of the module having one processed group and the corresponding weighting values; and g) comparing the weighted size of the module to the weighted size of the module having one processed group.
地址 HSINCHU TW