Methods and apparatus for optimizing memory accesses in a circuit design
are described. According to one embodiment, a method comprises
identifying a subset of variables from a multi-variable memory space that
are accessed by a plurality of loops, storing the subset of variables in
a separately accessible memory space, and accessing one of the stored
subset of variables to recover a stored value of the one of the stored
subset of variables for use by at least one of the plurality of loops
during synthesis. According to another embodiment, a method comprises
identifying at least a first loop and a second loop, determining whether
a dependency exists between the first loop and the second loop, and
merging the first loop and the second loop into a single merged loop,
wherein the merging comprises mapping a plurality of memory accesses from
the first loop to a sliding window.