Patent ID: 7383401

Claim:
A method, comprising: identifying a plurality of basic blocks between an entry point and an exit point of a procedure, wherein the procedure includes a control statement governing execution of the procedure; for a given one of said plurality of basic blocks, determining whether a probability of execution of said given basic block relative to said control statement equals or exceeds a first threshold value, and in response to determining that said probability of execution relative to said control statement equals or exceeds said first threshold value, generating a respective set of one or more chains of indirect memory accesses corresponding to said given basic block, wherein each chain included in said respective set comprises at least a respective head memory access that does not depend for its memory address computation on another memory access within said given basic block; for a given chain corresponding to a particular one of said plurality of basic blocks and including a head memory access that depends for its memory address computation on another memory access included in a predecessor chain within a different basic block, determining whether a ratio of a probability of execution of said particular basic block relative to said control statement and a probability of execution of said different basic block relative to said control statement equals or exceeds a second threshold value; and in response to determining that said ratio equals or exceeds said second threshold value, joining said given chain to said predecessor chain.