IP Library Granted Patent US 8,645,910
Granted Patent B2
US 8,645,910 · App. 12/391,367 · Granted Feb 4, 2014

Compiler capable of partitioning program and program partitioning method

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,645,910
App. No.
12/391,367
Granted
Feb 4, 2014
Kind
B2
Abstract

A program stored in a memory is read, and in a path representing the order of processing instruction sequences forming the program, a subgraph including a sequence of instructions that includes only one instruction at the entry and only one instruction at the exit is identified. At least a part of a source instruction sequence included in the subgraph is extracted as a new program block and stored in a memory. An instruction for calling the instruction sequence in the new program block is inserted in a program block including the source instruction sequence. The program block including the source instruction sequence is then stored in the memory.

Claims (27)

1. A compiler comprising:

Processor and memory;

a partitioning unit operative to partition an input program into cache blocks having a size within a predetermined size limit, wherein the partitioning unit comprises:

a subgraph detector operative to identify, in a path representing an order of processing instruction sequences forming the input program, a subgraph including a sequence of instructions that includes only one instruction at an entry and only one instruction at an exit;

and an extractor operative:

(i) to extract, from the subgraph, an instruction sequence of a maximum total size within the size limit as a new cache block, (ii) to substitute the extracted instruction sequence in the subgraph with an instruction for calling the source instruction sequence in the new cache block, (iii) to repeat the extraction and substitution until a size of the subgraph becomes smaller than or equal to the size limit, (iv) to extract the subgraph from the input program, (v) to substitute the extracted subgraph in the input program with an instruction for calling the extracted subgraph, (vi) to determine that each instruction sequence extracted from the subgraph as a respective cache block, (vii) to determine that the subgraph remaining after extracting the instruction sequence(s) is a further cache block, and (viii) to determine that the input program remaining after extracting the subgraph is a still further cash block;

(ix) to extract one or more of the nodes and generate a new control flow graph including the at least one basic block included in the one or more extracted nodes; and (x) to count a number of times that each basic block included in the program is extracted, and any of the nodes that include a basic block extracted a smaller number of times is given preference to other nodes for extraction that have been extracted a higher number of times;

a code generator operative to generate respective object code for each cache block determined by the extractor of the partitioning unit.

2. The compiler according to claim 1 , wherein the compiler further comprises a control flow graph generator operative to generate a control flow graph from the input program, the subgraph detector identifies a range in the subgraph, the range being defined by nodes each including at least one basic block forming the control flow graph.

3. The compiler according to claim 1 , wherein of the subgraphs included in the program, the subgraph detector identifies an atomic subgraph that does not include another subgraph.

4. The compiler according to claim 2 , wherein the extractor is operative to identify a range of linear node sequence included in the subgraph and extract a node set that is included in the range, continuous with a node selected from the nodes within the range, and of a maximum total size within the size limit.

5. The compiler according to claim 2 , further comprising:

a node substitution unit operative to substitute a single node for the subgraph identified by the subgraph detector and the range of linear node sequence identified by the extractor, wherein the subgraph detector is operative to further identify a subgraph in the control flow graph where substitution is performed by the node substitution unit.

6. A program partitioning method comprising:

reading a program stored in a memory, and identifying, in a path representing an order of processing instruction sequences forming the program, a subgraph including a sequence of instructions that includes only one instruction at an entry and only one instruction at an exit;

an extraction operation configured to:

(i) to extract, from the subgraph, an instruction sequence of a maximum total size within the size limit as a new cache block, (ii) to substitute the extracted instruction sequence in the subgraph with an instruction for calling the source instruction sequence in the new cache block, (iii) to repeat the extraction and substitution until a size of the subgraph becomes smaller than or equal to the size limit, (iv) to extract the subgraph from the input program, (v) to substitute the extracted subgraph in the input program with an instruction for calling the extracted subgraph, (vi) to determine that each instruction sequence extracted from the subgraph as a respective cache block, (vii) to determine that the subgraph remaining after extracting the instruction sequence(s) is a further cache block, and (viii) to determine that the input program remaining after extracting the subgraph is a still further cash block;

(ix) to extract one or more of the nodes and generate a new control flow graph including the at least one basic block included in the one or more extracted nodes; and

(x) to count a number of times that each basic block included in the program is extracted, and any of the nodes that include a basic block extracted a smaller number of times is given preference to other nodes for extraction that have been extracted a higher number of times;

storing as program blocks, the program blocks extracted from the subgraph, the subgraph remaining after extracting the instruction sequences, and the program remaining after extracting the subgraph in the memory.

7. A non-transitory, computer readable storage medium containing a computer program, comprising:

a module operative to read a program from a memory;

a module operative to identify, in a path representing an order of processing instruction sequences forming the program, a subgraph including a sequence of instructions that includes only one instruction at an entry and only one instruction at an exit;

an extraction module configured:

(i) to extract, from the subgraph, an instruction sequence of a maximum total size within the size limit as a new cache block, (ii) to substitute the extracted instruction sequence in the subgraph with an instruction for calling the source instruction sequence in the new cache block, (iii) to repeat the extraction and substitution until a size of the subgraph becomes smaller than or equal to the size limit, (iv) to extract the subgraph from the input program, (v) to substitute the extracted subgraph in the input program with an instruction for calling the extracted subgraph, (vi) to determine that each instruction sequence extracted from the subgraph as a respective cache block, (vii) to determine that the subgraph remaining after extracting the instruction sequence(s) is a further cache block, and (viii) to determine that the input program remaining after extracting the subgraph is a still further cash block;

(ix) to extract one or more of the nodes and generate a new control flow graph including the at least one basic block included in the one or more extracted nodes; and (x) to count a number of times that each basic block included in the program is extracted, and any of the nodes that include a basic block extracted a smaller number of times is given preference to other nodes for extraction that have been extracted a higher number of times;

a module operative to store, as program blocks, the program blocks extracted from the subgraph, the subgraph remaining after extracting the instruction sequences, and the program remaining after extracting the subgraph in the memory.

Assignments (6)
CHANGE OF NAME Recorded Sep 6, 2017
From: SONY COMPUTER ENTERTAINMENT INC.
To: SONY INTERACTIVE ENTERTAINMENT INC.
Reel/Frame 043761/0577 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 6, 2017
From: SONY CORPORATION
To: SONY INTERACTIVE ENTERTAINMENT INC.
Reel/Frame 043761/0975 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 21, 2013
From: SONY COMPUTER ENTERTAINMENT INC.
To: SONY CORPORATION
Reel/Frame 031444/0771 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 27, 2011
From: SONY NETWORK ENTERTAINMENT PLATFORM INC.
To: SONY COMPUTER ENTERTAINMENT INC.
Reel/Frame 027449/0469 →
CHANGE OF NAME Recorded Dec 26, 2011
From: SONY COMPUTER ENTERTAINMENT INC.
To: SONY NETWORK ENTERTAINMENT PLATFORM INC.
Reel/Frame 027448/0895 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 20, 2009
From: TOGAWA, ATSUSHI
To: SONY COMPUTER ENTERTAINMENT INC.
Reel/Frame 022568/0491 →