[polly] r289808 - [NFC] Fix typos in getMacroKernelParams.

Roman Gareev via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 04:00:58 PST 2016


Author: romangareev
Date: Thu Dec 15 06:00:57 2016
New Revision: 289808

URL: http://llvm.org/viewvc/llvm-project?rev=289808&view=rev
Log:
[NFC] Fix typos in getMacroKernelParams.

Modified:
    polly/trunk/lib/Transform/ScheduleOptimizer.cpp

Modified: polly/trunk/lib/Transform/ScheduleOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/ScheduleOptimizer.cpp?rev=289808&r1=289807&r2=289808&view=diff
==============================================================================
--- polly/trunk/lib/Transform/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/Transform/ScheduleOptimizer.cpp Thu Dec 15 06:00:57 2016
@@ -610,17 +610,15 @@ getMacroKernelParams(const MicroKernelPa
         CacheLevelSizes[0] > 0 && CacheLevelSizes[1] > 0 &&
         CacheLevelAssociativity[0] > 2 && CacheLevelAssociativity[1] > 2))
     return {1, 1, 1};
-  int Cbr = floor(
+  int Car = floor(
       (CacheLevelAssociativity[0] - 1) /
       (1 + static_cast<double>(MicroKernelParams.Nr) / MicroKernelParams.Mr));
-  int Kc = (Cbr * CacheLevelSizes[0]) /
+  int Kc = (Car * CacheLevelSizes[0]) /
            (MicroKernelParams.Mr * CacheLevelAssociativity[0] * 8);
   double Cac = static_cast<double>(Kc * 8 * CacheLevelAssociativity[1]) /
                CacheLevelSizes[1];
-  double Cbc = static_cast<double>(Kc * 8 * CacheLevelAssociativity[1]) /
-               CacheLevelSizes[1];
   int Mc = floor((CacheLevelAssociativity[1] - 2) / Cac);
-  int Nc = floor(1 / Cbc);
+  int Nc = floor(1 / Cac);
   return {Mc, Nc, Kc};
 }
 




More information about the llvm-commits mailing list