A method and system for identifying multi-block indirect memory access
chains. A method may include identifying basic blocks between an entry
point and an exit point of a procedure, where the procedure includes a
control statement governing its execution. It may be determined whether a
probability of execution of a given basic block relative to the control
statement equals or exceeds a first threshold value. If so, a respective
set of one or more chains of indirect memory accesses may be generated,
where each chain includes at least a respective head memory access that
does not depend for its memory address computation on another memory
access within the given basic block. Chains may be joined across basic
blocks dependent upon whether the relative execution probabilities of the
blocks exceed a threshold value.