Atomic Operation Predictor
AssigneeApple Inc.
InventorsBrian R. Mestan, Gideon N. Levinsky, Michael L. Karm
Life of this patent
Estimating the term…
Abstract
In an embodiment, a processor comprises an atomic predictor circuit to predict whether or not an atomic operation will complete successfully. The prediction may be used when a subsequent load operation to the same memory location as the atomic operation is executed, to determine whether or not to forward store data from the atomic operation to the subsequent load operation. If the prediction is successful, the store data may be forwarded. If the prediction is unsuccessful, the store data may not be forwarded. In cases where an atomic operation has been failing (not successfully performing the store operation), the prediction may prevent the forwarding of the store data and thus may prevent a subsequent flush of the load.
Claims21
1-20. (canceled)
A predictor circuit comprising:
- a storage circuit configured to store data indicative of previous executions of atomic operations, wherein a given atomic operation specifies a load operation from a memory location, a data operation on first data from the load operation, and a store operation to write second data to the memory location, wherein the store operation is conditional on a result of the data operation, and wherein the given atomic operation is defined to complete unsuccessfully based on the store operation not being performed;
- and
- a control circuit coupled to the storage circuit and to an input indicating that a current execution of an atomic operation is occurring, wherein the control circuit is configured to generate a prediction of whether or not the atomic operation will complete successfully based on the data from the storage circuit, and wherein the control circuit is configured to output the prediction.
An apparatus comprising:
- a predictor circuit configured to generate a prediction of whether or not an atomic operation will complete successfully, wherein the atomic operation specifies a load operation from a memory location, a data operation on first data from the load operation, and a store operation to write second data to the memory location, wherein the store operation is conditional on a result of the data operation, and wherein the atomic operation is defined to complete unsuccessfully based on the store operation not being performed;
- and
- an execute circuit coupled to the predictor circuit and configured to perform the atomic operation, wherein the execute circuit is configured to associate the prediction from the predictor circuit with the store operation, and wherein the execute circuit is configured to select the second data as predicted result data accessed by a subsequent load operation based on the prediction of successful completion by the predictor circuit, and wherein the execute circuit is configured to select data from the memory location is the predicted result data based on the prediction of unsuccessful completion by the predictor circuit.
A method comprising:
- executing an atomic operation, wherein the atomic operation includes a load operation from a memory location, a data operation preformed on first data read from the memory location, and a store operation to write second data to the memory location based on a result of the data operation;
- predicting whether or not the store operation will be performed;
- and
- selectively determining that the second data is result data for a subsequent load operation based on the predicting.
Dependencies are inferred from the claim text.