A method of managing a cache memory in an apparatus having processing circuitry for performing data processing operations in response to instructions, the processing circuitry having transactional memory support circuitry to support execution of a transaction, the transaction comprising a sequence of instructions executed speculatively and for which the processing circuitry is configured to prevent commitment of results of the speculatively executed instructions until the transaction has reached a transaction end point, the method comprising:
- providing the cache memory with a plurality of cache entries for storing data for access by the processing circuitry, with each cache entry having associated therewith an allocation tag;
- employing allocation tag control circuitry to control use of a plurality of allocation tags and to maintain an indication of a current state of each of those allocation tags;
- when initial data in a chosen cache entry of the cache memory is to be written to during the transaction, storing a backup copy of the initial data in a further cache entry of the cache memory, and causing the allocation tag control circuitry to associate a selected allocation tag selected for the transaction with that further cache entry, and to update the current state of the selected allocation tag to a first state which prevents the processing circuitry from accessing that further cache entry;
- and
- in the event that the transaction is aborted prior to reaching the transaction end point, invalidating the chosen cache entry of the cache memory, and causing the allocation tag control circuitry to change the state of the selected allocation tag to a second state that allows the processing circuitry to access the further cache entry,
- wherein the change of the state of the selected allocation tag enables a hit to subsequently be detected within the cache memory for the initial data without a requirement to re-fetch the initial data into the cache memory.