Percentage memory indirect accesses

58 Views Asked by At

I want to find what percentage of the memory load accesses in a program is memory indirect, for example, A[B[i]], A[(B[i]&mask)+c], A[B[C[i]]], etc.

My idea (have not started implementation) is to track if any register holds a value that has been loaded from memory. For ALU or bit operations, if one of the source registers is being tracked, then the destination will also be tracked. If such a register value is used to perform a memory access, then flag it as a memory indirect access.

Is there a better way to do it? How can I go about implementing it?

0

There are 0 best solutions below