Grant Wallace
CS597d
Observation 13:
Dynamic Memory Disambiguation Using the Memory Conflict Buffer [1]
Strengths:
1. Allows for aggressive reordering of load instructions above ambiguous
memory stores.
2. Memory disambiguation is performed at run-time with the support
of two new instructions supplied by the ISA (preload and check) and recovery
blocks inserted by the compiler.
3. Achieves an average speedup of about 1.5 over static (compile time)
disambiguation (Figure 10).
4. Similar performance gains were achieved even when the preload instruction
was removed from the ISA (all loads are processed by the MCB). The check
instruction still must be inserted to indicate the recovery block for a
load conflict.
Weaknesses:
1. If there is an actual memory dependence that can’t be determined
at compile time, then there could be a significant performance decrease
if the load is moved above the dependent store by the compiler (the recover
block would have to be executed every time).
2. Can suffer from excessive load-load, and load-store conflicts depending
on set associativity and number of address hash bits in the preload array.
3. Code size increases (average of 15.7% on benchmarks tested).
In general the true memory dependence conflicts
were a small percentage of the total conflicts (true memory dependence,
load-load, and load-store). But in some cases the true-conflicts were a
large percentage (eqn and espresso). This indicates that some programs
will have frequently executed memory dependencies that can’t be determined
at compile time, but if optimizations are used assuming these aren’t dependencies,
performance can suffer.
On a load-load conflict, a preload entry currently
in the set is removed and the new preload inserted. The removed preload
has its conflict bit set. Note that alternatively the new preload could
have been thrown out and its conflict bit set. They chose the former because
there can be situations where a preload is executed but its check is never
executed due to the control flow. So there may be "stale" preloads in the
preload array.
[1] D. M. Gallagher, ... "Dynamic Memory Disambiguation Using the Memory
Conflict Buffer", Proceedings of the 6th International Conference on Architecture
Support for Programming Languages and Operating Systems, San Jose, California,
October, 1994. pp.183-195.