[PATCH] D39805: [Power9] Set MicroOpBufferSize for Power 9

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 08:12:57 PST 2017


stefanp created this revision.

We are going to set MicroOpBufferSize to 1 (one) for Power 9. 
Despite the fact that Power9 is an out-of-order core this value still produces the best results for us across the board for various benchmarks that we tested. 
The reason is that we are using the GenericScheduler which does not seem to update the value of CurrCycle correctly for Power PC. When we have reached the issue limit the GenericScheduler bumps the CurrCycle by 1 and then tries to fill the issue queue again. This is not always accurate since once we have reached the limit of the issue queue then we have dispatched to all of the slices and are using resources on those slices. Before issuing any more instructions some of those resources will have to become free first. 
If in the future we create a PowerPC specific scheduler we can change the value of MicroOpBufferSize to something greater than 1 to indicate an out-of-order core.


https://reviews.llvm.org/D39805

Files:
  lib/Target/PowerPC/PPCScheduleP9.td


Index: lib/Target/PowerPC/PPCScheduleP9.td
===================================================================
--- lib/Target/PowerPC/PPCScheduleP9.td
+++ lib/Target/PowerPC/PPCScheduleP9.td
@@ -22,6 +22,17 @@
   // Try to make sure we have at least 10 dispatch groups in a loop.
   let LoopMicroOpBufferSize = 60;
 
+  // Even though PowerPC is an out-of-order core this still produces the best
+  //  results for us. The reason is that the GenericScheduler does not properly
+  //  update the CurrCycle value when sceduling through instructions.
+  //  For example, when we reach the IssueWidth the scheduler simply adds one
+  //  to the CurrCycle instead of using the next ready cycle when one of the
+  //  slices will be free and allow another instruction to be issued.
+  // If, in the future, we decide to implement a PPC scheduler this value can be
+  //  changed to a value greater than 1 which will indicate an out-of-order
+  //  core.
+  let MicroOpBufferSize = 1;
+
   let CompleteModel = 1;
 
   let UnsupportedFeatures = [HasQPX];


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39805.122095.patch
Type: text/x-patch
Size: 1047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171108/3ecde227/attachment.bin>


More information about the llvm-commits mailing list