Patent ID: 8689197
Filing Date: 2014-04-01
Classification: G06F

Abstract:
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.