[PATCH] D68266: [MCA][LSUnit] Track loads and stores until retirement.

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 05:08:36 PDT 2019


andreadb created this revision.
andreadb added reviewers: RKSimon, lebedev.ri, courbet.
Herald added a subscriber: gbedwell.

Before this patch, loads and stores were only tracked by their corresponding queues in the LSUnit from dispatch until execute stage. In practice we should be more conservative and assume that memory opcodes leave their queues at retirement stage.

Basically, loads should leave the load queue only when they have completed and delivered their data. We conservatively assume that a load is completed when it is retired. Stores should be tracked by the store queue from dispatch until retirement. In practice, stores can only leave the store queue if their data can be written to the data cache.

This is mostly a mechanical change. With this patch, the retire stage notifies the LSUnit when a memory instruction has retired.
That would triggers the release of LDQ/STQ entries.
The only visible change is in memory tests for the bdver2 model. That is because bdver2 is the only model that defines the load/store queue size.

This patch partially addresses PR39830.


https://reviews.llvm.org/D68266

Files:
  include/llvm/MCA/HardwareUnits/LSUnit.h
  include/llvm/MCA/Stages/RetireStage.h
  lib/MCA/Context.cpp
  lib/MCA/HardwareUnits/LSUnit.cpp
  lib/MCA/Stages/RetireStage.cpp
  test/tools/llvm-mca/X86/BdVer2/load-store-throughput.s
  test/tools/llvm-mca/X86/BdVer2/load-throughput.s
  test/tools/llvm-mca/X86/BdVer2/store-throughput.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68266.222592.patch
Type: text/x-patch
Size: 25798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191001/20478624/attachment.bin>


More information about the llvm-commits mailing list