Definition
Load Queue
A load queue is a queue that tracks all in-flight load instructions that have been issued but not yet completed.
Each entry records the load address, the destination register, and the load’s age relative to other in-flight instructions. The load queue lives inside the load unit of the load-store unit.
Violation detection
When an older store resolves its address, the load-store unit checks the load queue for younger loads that have already executed and read the same address. If one is found, a memory ordering violation has occurred: the load read a stale value from the cache instead of the value the store will produce.
The violating load and all its dependent instructions are squashed and replayed, this time receiving the correct value from the store buffer.
In-order vs. out-of-order
In a static in-order pipeline, loads execute in program order and at most one load is in flight, so the load queue is shallow or absent.
In an out-of-order pipelined processor, multiple loads can be outstanding at once. The load queue must be sized to hold every in-flight load that has not yet written back.