Invention Grant
- Patent Title: Method and apparatus for code size reduction
- Patent Title (中): 减少代码大小的方法和装置
-
Application No.: US13894694Application Date: 2013-05-15
-
Publication No.: US09122494B2Publication Date: 2015-09-01
- Inventor: Kun Hua Yang , Shao Chung Wang , Jenq Kuen Lee
- Applicant: NATIONAL TSING HUA UNIVERSITY
- Applicant Address: TW Hsinchu
- Assignee: NATIONAL TSING HUA UNIVERSITY
- Current Assignee: NATIONAL TSING HUA UNIVERSITY
- Current Assignee Address: TW Hsinchu
- Agency: WPAT, P. C.
- Agent Anthony King
- Main IPC: G06F9/45
- IPC: G06F9/45

Abstract:
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.
Public/Granted literature
- US20140344791A1 METHOD AND APPARATUS FOR CODE SIZE REDUCTION Public/Granted day:2014-11-20
Information query