8689197

Instruction Cache

PublishedApril 1, 2014
Assigneenot available in USPTO data we have
Technical Abstract

Patent Claims
29 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. A method of optimising an executable program to improve instruction cache hit rate when executed on a processor, the method comprising: receiving a plurality of object files each comprising one or more functions, at least some of said functions in at least one of said object files each comprising one or more function calls to a dependent function in another of said object files; supplying said object files to a linker; generating a first executable file comprising instructions of executable machine code by running the linker a first time to link the object files; disassembling instructions of said machine code of said first executable file to determine which of said functions are dependent from calls in which others of said functions; based on the determined dependencies, determining an order of said functions in address space such that functions are grouped together with their dependent functions; and generating a second executable program by running the linker a second time to re-link the object file, wherein the second executable program has the functions rearranged into said grouped order, such that, when the program is executed on a processor comprising an instruction cache having portions mapped to respective regions of memory in which the program is to be stored, then the chance of a function being cached together with its dependent function is greater than if the first executable file were to be executed on that processor.

2

2. The method of claim 1 , further comprising determining a respective ordering priority for each of a plurality of said functions, wherein the determination of said order is additionally based on said priorities.

3

3. The method of claim 2 , wherein the determination of said order comprises: first grouping the highest priority function with its dependent functions, then in turn grouping each next highest priority un-grouped function with any of its yet ungrouped dependent functions.

4

4. The method of claim 1 , wherein the determination of said order comprises: within each group of a function and its dependent functions, arranging the dependent functions in order of their priorities.

5

5. The method of claim 2 , wherein the determination of said order comprises: within each group of a function and its dependent functions, arranging the dependent functions in order of their priorities.

6

6. The method of claim 2 , wherein the determination of each priority is based on the number of calls to the respective function by others of said functions.

7

7. The method of claim 2 , wherein the determination of each priority is based on a user-assigned priority specified in the respective object file.

8

8. The method of claim 2 , wherein the determination of each priority is based on the kind of memory from which the respective function is to be fetched when the program is executed.

9

9. The method of claims 2 , wherein the grouping of functions together with their dependent functions is such that functions are grouped together with their dependent functions and the dependent functions of their dependent functions to a limiting hierarchical level of dependency, and the determination of each priority is based on the hierarchical level of the respective function within its group.

10

10. The method of claim 1 , comprising determining a respective ordering decision for each function specifying whether or not to group that function, and the determination of said order comprises grouping only those functions whose ordering decision specifies to do so.

11

11. The method of claim 10 , wherein the determination of each ordering decision is based on a user-assigned exclusion.

12

12. The method of claim 10 , wherein the determination of each ordering decision is based on the kind of memory from which the respective function is to be fetched when the program is executed.

13

13. The method of claim 11 , wherein the determination of each ordering decision is based on the kind of memory from which the respective function is to be fetched when the program is executed.

14

14. The method of claim 1 , wherein the determination of said dependencies comprises parsing symbols in the first executable file to determine the names and addresses of the functions.

15

15. The method of claim 1 , wherein the disassembly of instructions comprises identifying opcodes instructing the processor to jump program counter, identifying the respective operands of those opcodes, and determining the respective dependent functions from the opcodes.

16

16. The method of claim 15 , wherein one or more of said operands comprises a pointer to a memory location, and said disassembly comprises determining an address value to be stored in that location and using that value to determine the respective dependent function.

17

17. The method of claim 15 , wherein one or more of said operands comprises a reference to a register, and said disassembly comprises determining an address value to be stored in that register and using that value to determine the respective dependent function.

18

18. The method of claim 16 , wherein one or more of said operands comprises a reference to a register, and said disassembly comprises determining an address value to be stored in that register and using that value to determine the respective dependent function.

19

19. The method of claim 15 , wherein one or more of said operands is defined by an arithmetic operation, and said disassembly comprises evaluating the arithmetic operation to determine the respective dependent function.

20

20. The method of claim 16 , wherein one or more of said operands is defined by an arithmetic operation, and said disassembly comprises evaluating the arithmetic operation to determine the respective dependent function.

21

21. The method of claim 1 , wherein said disassembly comprises identifying a wait instruction instructing the processor to wait for an interrupt, and identifying a corresponding interrupt handler as the respective dependent function.

22

22. The method of claim 1 , wherein said disassembly comprises identifying one of the instructions as a system call to an operating system and identifying one or more corresponding arguments of the system call, the system call being such as to result in a call by the operating system to the respective dependent function so that the function will indirectly call its dependent function via the operating system; and said disassembly comprises using the system call and arguments to predict the call by the operating system to the respective dependent function.

23

23. The method of claim 22 , wherein the system call comprises a request to switch thread or initiate a thread in a multi-threaded operating system, and the subsequent call by the operating system comprises switching to or initiating a thread comprising the respective dependent function.

24

24. The method of claim 1 , wherein the grouping of functions together with their dependent functions is such that functions are grouped together with their dependent functions and the dependent functions of their dependent functions to a limiting hierarchical level of dependency.

25

25. The method of claim 24 , wherein the limiting level of a dependent function is determined by a loop from that function back to a function of a higher hierarchical level of dependency.

26

26. The method of claim 1 , wherein the linking into the first executable file is performed based on a first linker script, the determination of said order comprises generating a modified linker script specifying said order, and the linking into the second executable file is performed based on the modified linker script.

27

27. The method of claim 1 , wherein the object files comprise code of a software modem for processing signals for communication over a wireless cellular communication network.

28

28. A software development tool product comprising code which when executed on a computer will perform a method of optimising an executable program comprising: receiving a plurality of object files each comprising one or more functions, at least some of said functions in at least one of said object files each comprising one or more function calls to a dependent function in another of said object files; supplying the object files to a linker; generating into a first executable file comprising instructions of executable machine code by running the linker a first time to link the object files; disassembling instructions of said machine code of said first executable file to determine which of said functions are dependent from calls in which others of said functions; based on the determined dependencies, determining an order of said functions in address space such that functions are grouped together with their dependent functions; and generating a second executable program by running the linker a second time to re-link the object files, wherein the second executable program has the functions rearranged into said grouped order, such that, when the program is executed on a processor comprising an instruction cache having portions mapped to respective regions of memory in which the program is to be stored, then the chance of a function being cached together with its dependent function is greater than if the first executable file were to be executed on that processor.

29

29. A linker product comprising code stored on a non-transitory computer readable medium which when executed on a computer will perform a method of optimising an executable program comprising: receiving a plurality of object files each comprising one or more functions, at least some of said functions in at least one of said object files each comprising one or more function calls to a dependent function in another of said object files; supplying the object files to the linker; generating a first executable file comprising instructions of executable machine code by running the linker a first time to link the object files; disassembling instructions of said machine code of said first executable file to determine which of said functions are dependent from calls in which others of said functions; based on the determined dependencies, determining an order of said functions in address space such that functions are grouped together with their dependent functions; and generating a second executable program by running the linker a second time to re-link the object files, wherein the second executable program has the functions rearranged into said grouped order, such that, when the program is executed on a processor comprising an instruction cache having portions mapped to respective regions of memory in which the program is to be stored, then the chance of a function being cached together with its dependent function is greater than if the first executable file were to be executed on that processor.

Patent Metadata

Filing Date

Unknown

Publication Date

April 1, 2014

Inventors

David Alan Edwards
Alan Alexander

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “INSTRUCTION CACHE” (8689197). https://patentable.app/patents/8689197

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.