Method to partition large code across multiple e-caches
View Patent ↗A method for executing an instruction stream includes partitioning the instruction stream using a partition point to obtain a first partition of the instruction stream and a second partition of the instruction stream, configuring the first partition and the second partition to fit separate e-caches, analyzing the first partition and the second partition to generate a runtime execution facility and a data transfer facility, and executing the first partition and the second partition on separate processors using the runtime execution facility and the data transfer facility.
1. A method for executing an instruction stream, comprising:
partitioning the instruction stream using a partition point to obtain a first partition of the instruction stream and a second partition of the instruction stream;
configuring the first partition and the second partition to fit separate e-caches;
analyzing the first partition and the second partition to generate a runtime execution facility and a data transfer facility; and
executing the first partition and the second partition on separate processors using the runtime execution facility and the data transfer facility.
2. The method of claim 1 , wherein the second partition executes after the first partition.
3. The method of claim 2 , wherein the second partition executes simultaneously with the first partition.
4. The method of claim 2 , further comprising:
storing the first partition and the second partition at separate addresses in a memory.
5. The method of claim 4 , further comprising:
retrieving the first partition and the second partition from the memory;
storing the first partition and the second partition in the separate e-caches; and
aligning a data segment in the memory.
6. The method of claim 5 , further comprising:
retrieving the first partition and the second partition from the separate e-caches.
7. The method of claim 1 , further comprising:
generating a plurality of basic blocks by analyzing the instruction stream, wherein the plurality of basic blocks is used in partitioning the instruction stream; and
assigning the first partition to a first processor and assigning the second partition to a second processor.
8. The method of claim 7 , wherein partitioning the instruction stream comprises:
locating a stride block within the instruction stream; and
locating the partition point within the stride block.
9. The method of claim 8 , wherein the partition point comprises an instruction of an unconditional basic block.
10. The method of claim 1 , wherein generating the runtime execution facility comprises:
determining an execution order of the first partition and the second partition;
generating an instruction to enforce execution order of the first partition and the second partition; and
inserting the instruction into the second partition.
11. The method of claim 10 , wherein the instruction implements a semaphore.
12. The method of claim 1 , wherein generating the data transfer facility comprises:
adding a STORE instruction to the first partition and adding a LOAD instruction to the second partition; and
allocating memory for a partition spill used for executing the first partition and the second partition.
13. The method of claim 12 , wherein generating the data transfer facility comprises:
executing the STORE instruction and the LOAD instruction to make data available for execution of the second partition.
14. The method of claim 1 , wherein a size of the instruction stream is greater than a size of the e-cache.
15. A method for executing an instruction stream, comprising:
partitioning the instruction stream using a partition point to obtain a first partition of the instruction stream and a second partition of the instruction stream;
configuring the first partition and the second partition to fit separate e-caches;
analyzing the first partition and the second partition to generate a runtime execution facility and a data transfer facility;
executing the first partition and the second partition on separate processors using the runtime execution facility and the data transfer facility;
retrieving the first partition and the second partition from the memory;
storing the first partition and the second partition in the separate e-caches;
aligning a data segment in the memory; and
retrieving the first partition and the second partition from the separate e-caches.
16. A system for executing an instruction stream, comprising:
a partitioning program configured to partition the instruction stream into a first partition of the instruction stream and a second partition of the instruction stream, store the first partition at a first address in a memory, and store the second partition at a second address in the memory;
wherein the first partition and the second partition are fitted to separate e-caches by the partitioning program;
a runtime execution facility configured to enforce execution order of the first partition and the second partition; and
a data transfer facility configured to transfer data required by execution of the second partition and supplied by execution of the first partition.
17. The system of claim 16 , further comprising:
a data segment in memory aligned with a third address in the memory.
18. The system of claim 16 , wherein the runtime execution facility comprises a semaphore.
19. The system of claim 16 , wherein the data transfer facility comprises a STORE instruction, a LOAD instruction, and a partition spill.
20. The system of claim 16 , wherein a size of a first e-cache of the separate e-caches is greater than a size of the first partition.
21. The system of claim 16 , further comprising:
a third partition of the instruction stream fitted to the first e-cache.
22. The system of claim 16 , wherein the first partition is included in a stride block.
23. A system for executing an instruction stream, comprising:
a partitioning program configured to partition the instruction stream into a first partition of the instruction stream and a second partition of the instruction stream, store the first partition at a first address in a memory, and store the second partition at a second address in the memory;
wherein the first partition and the second partition are fitted to separate e-caches by the partitioning program;
a runtime execution facility configured to enforce execution order of the first partition and the second partition;
a data transfer facility configured to transfer data required by execution of the second partition and supplied by execution of the first partition; and
a data segment in memory aligned with a third address in the memory.
24. An apparatus for executing an instruction stream, comprising:
means for partitioning the instruction stream using a partition point to obtain a first partition of the instruction stream and a second partition of the instruction stream;
means for configuring the first partition and the second partition to fit separate e-caches;
means for analyzing the first partition and the second partition to generate a runtime execution facility and a data transfer facility; and
means for executing the first partition and the second partition on separate processors using the runtime execution facility and the data transfer facility.