================
@@ -634,9 +644,22 @@ static int processDeviceOffloadPrf(void *DeviceOffloadPrf, 
int TUIndex,
     NamesOwner.reset(HostNamesBegin);
   }
 
+  if (UniformCountersSize > 0 && DevUniformCntsBegin == CachedDevUCntsBegin &&
+      UniformCountersSize == CachedUCntsSize) {
+    HostUniformCountersBegin = CachedHostUCnts;
+    UCntsReused = 1;
+    if (isVerboseMode())
+      PROF_NOTE("Reusing cached ucnts section (%zu bytes)\n",
+                UniformCountersSize);
+  } else if (UniformCountersSize > 0) {
+    HostUniformCountersBegin = (char *)malloc(UniformCountersSize);
----------------
arsenm wrote:

Move this code to be more C++ like?

https://github.com/llvm/llvm-project/pull/190708
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to