IP Library Granted Patent US 8,352,928
Granted Patent B2
US 8,352,928 · App. 12/219,864 · Granted Jan 8, 2013

Program conversion apparatus, program conversion method, and computer product

Assignee: Fujitsu Semiconductor Limited
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,352,928
App. No.
12/219,864
Granted
Jan 8, 2013
Kind
B2
Abstract

A linker generates a simulator-use executable format program from a pre-conversion object program and a simulator-use object program. A simulator executes the simulator-use object program and acquires branch trace information. A binary program converting tool, based on the branch trace information and a branch penalty table, generates a post-conversion object program having a rewritten branching prediction bit of the pre-conversion object program. Another linker generates an actual-machine-use executable format program from the post-conversion object program and an actual-machine-use object program.

Claims (43)

1. A program converting apparatus including a processor comprising:

a data acquisition unit that executes a first executable format program generated using a pre-conversion object program and acquires branch trace information, indicating, for each of a conditional branch instruction, the number of times the conditional branch instruction is taken and the number of times the conditional branch instruction is not taken;

a converting unit that, based on the branch trace information, generates a post-conversion object program, wherein a branching prediction bit of the conditional branch instruction of the pre-conversion object program is rewritten;

a generating unit that generates a second executable format program, using the post-conversion object program; and

a merging unit that sums, for plural execution paths of the conditional branch instruction, the number of times the conditional branch instruction is taken and the number of times the conditional branch instruction is not taken, respectively, to merge the branch trace information.

2. The program converting apparatus according to claim 1 , comprising

a locating unit that obtains a relative address of the conditional branch instruction in the pre-conversion object program from a difference of a physical address of the conditional branch instruction in the first executable format program and an offset address of the pre-conversion object program in the first executable format program, and determines an instruction identified by the relative address as an object of branching prediction bit rewriting.

3. The program converting apparatus according to claim 1 , wherein the converting unit rewrites the branching prediction bit of the conditional branch instruction of the pre-conversion object program, based on branch penalty for branch prediction failure.

4. The program converting apparatus according to claim 1 , wherein the merging unit merges the branch trace information by creating an average branching ratio for each of the plural execution paths based on a sum of the number of times the conditional branch instruction is taken and a sum of the number of times the conditional branch instruction is not taken.

5. A program converting method comprising:

generating a post-conversion object program, based on branch trace information indicating, for each of a conditional branch instruction, the number of times the conditional branch instruction is taken and the number of times the conditional branch instruction is not taken wherein a branching prediction bit of a conditional branch instruction of a pre-conversion object program is rewritten;

generating an executable format program, using the post-conversion object program; and

summing, for plural execution paths of the conditional branch instruction, the number of times the conditional branch instruction is taken and the number of times the conditional branch instruction is not taken, respectively.

6. The program converting method according to claim 5 , wherein the merging includes applying weight corresponding to execution frequency of the execution paths of the conditional branch instruction.

7. The program converting method according to claim 5 , wherein the generating the post-conversion object program comprises

generating a simulator-use executable format program by linking the pre-conversion object program and a simulator-use object program;

executing the simulator-use executable format program on a simulator; and

generating the branch trace information.

8. The program converting method according to claim 7 , wherein the generating the post-conversion object program comprises

obtaining a relative address of the conditional branch instruction in the pre-conversion object program from a difference of a physical address of the conditional branch instruction in the simulator-use executable format program and an offset address of the pre-conversion object program in the simulator-use executable format program; and

rewriting the branching prediction bit when an instruction identified by the relative address is the conditional branch instruction.

9. The program converting method according to claim 5 , wherein the generating the post-conversion object program comprises

executing the executable format program on a built-in system; and

generating the branch trace information.

10. The program converting method according to claim 9 , wherein the generating the post-conversion object program comprises

obtaining a relative address of the conditional branch instruction in the pre-conversion object program from a difference of a physical address of the conditional branch instruction in the executable format program and an offset address of the pre-conversion object program in the executable format program; and

rewriting the branching prediction bit when an instruction identified by the relative address is the conditional branch instruction.

11. The program converting method according to claim 5 , wherein the generating the post-conversion object program includes rewriting the branching prediction bit of the conditional branch instruction of the pre-conversion object program, based on branch penalty for branch prediction failure.

12. The program converting method according to claim 11 , wherein the branch penalty is a value inherent in a processor that executes the executable format program.

13. The program converting method according to claim 5 , comprising merging the branch trace information by creating an average branching ratio for each of the plural execution paths based on a sum of the number of times the conditional branch instruction is taken and a sum of the number of times the conditional branch instruction is not taken.

14. A computer-readable recording medium that stores therein a computer program that causes a computer to execute the computer program comprising:

generating a post-conversion object program, based on branch trace information concerning branch-taking with respect to a conditional branch instruction, wherein a branching prediction bit of a conditional branch instruction of a pre-conversion object program is rewritten;

generating an executable format program, using the post-conversion object program; and

summing, for plural execution paths of the conditional branch instruction, the number of times the conditional branch instruction is taken and the number of times the conditional branch instruction is not taken, respectively.

15. The computer-readable recording medium according to claim 14 , comprising:

generating a simulator-use executable format program by linking the pre-conversion object program and a simulator-use object program;

executing the simulator-use executable format program on a simulator; and

generating the branch trace information.

16. The computer-readable recording medium according to claim 14 , comprising:

executing the executable format program on a built-in system; and

generating the branch trace information.

17. The computer-readable recording medium according to claim 14 , wherein the generating the post-conversion object program includes rewriting the branching prediction bit of the conditional branch instruction of the pre-conversion object program, based on branch penalty for branch prediction failure.

18. The computer-readable recording medium according to claim 14 , comprising merging the branch trace information by creating an average branching ratio for each of the plural execution paths based on a sum of the number of times the conditional branch instruction is taken and a sum of the number of times the conditional branch instruction is not taken.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 27, 2015
From: FUJITSU SEMICONDUCTOR LIMITED
To: SOCIONEXT INC.
Reel/Frame 035508/0637 →
CHANGE OF NAME Recorded Jul 27, 2010
From: FUJITSU MICROELECTRONICS LIMITED
To: FUJITSU SEMICONDUCTOR LIMITED
Reel/Frame 024794/0500 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 29, 2008
From: KIMURA, SHIGERU
To: FUJITSU MICROELECTRONICS LIMITED
Reel/Frame 021360/0942 →
Priority Claims (1)
JP 2007-244312 · Sep 20, 2007 · national
Continuity (1)
Related Publication 20090083526A1 · Mar 26, 2009