[polly] r276632 - GPURuntime: Drop polly_cleanupGPGPUResources

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 05:47:23 PDT 2016


Author: grosser
Date: Mon Jul 25 07:47:22 2016
New Revision: 276632

URL: http://llvm.org/viewvc/llvm-project?rev=276632&view=rev
Log:
GPURuntime: Drop polly_cleanupGPGPUResources

This function is currently unused and won't be used in this form again. Instead
of freeing many unrelated items at the same time, we will instead explicitly
call free function from the host-IR we generate for each object we want to free.
These specific free functions will be added together with the corresponding
host-IR generation code.

Modified:
    polly/trunk/tools/GPURuntime/GPUJIT.c
    polly/trunk/tools/GPURuntime/GPUJIT.h

Modified: polly/trunk/tools/GPURuntime/GPUJIT.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/tools/GPURuntime/GPUJIT.c?rev=276632&r1=276631&r2=276632&view=diff
==============================================================================
--- polly/trunk/tools/GPURuntime/GPUJIT.c (original)
+++ polly/trunk/tools/GPURuntime/GPUJIT.c Mon Jul 25 07:47:22 2016
@@ -339,30 +339,6 @@ void polly_launchKernel(PollyGPUFunction
   debug_print("CUDA kernel launched.\n");
 }
 
-void polly_cleanupGPGPUResources(void *HostData, PollyGPUDevicePtr *DevData,
-                                 PollyGPUModule *Module,
-                                 PollyGPUFunction *Kernel) {
-  dump_function();
-
-  if (HostData) {
-    free(HostData);
-    HostData = 0;
-  }
-
-  if (DevData->Cuda) {
-    CuMemFreeFcnPtr(DevData->Cuda);
-    free(DevData);
-  }
-
-  if (Module->Cuda) {
-    CuModuleUnloadFcnPtr(Module->Cuda);
-    free(Module);
-  }
-  if (Kernel) {
-    free(Kernel);
-  }
-}
-
 void polly_freeContext(PollyGPUContext *Context) {
 
   if (Context->Cuda) {

Modified: polly/trunk/tools/GPURuntime/GPUJIT.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/tools/GPURuntime/GPUJIT.h?rev=276632&r1=276631&r2=276632&view=diff
==============================================================================
--- polly/trunk/tools/GPURuntime/GPUJIT.h (original)
+++ polly/trunk/tools/GPURuntime/GPUJIT.h Mon Jul 25 07:47:22 2016
@@ -62,7 +62,6 @@
  *   polly_setKernelParameters(Kernel, BlockWidth, BlockHeight, DevData);
  *   polly_launchKernel(Kernel, GridWidth, GridHeight);
  *   polly_copyFromDeviceToHost(HostData, DevData, MemSize);
- *   polly_cleanupGPGPUResources(HostData, DevData, Module, Kernel);
  *   polly_freeContext(Context);
  * }
  *
@@ -85,8 +84,5 @@ void polly_setKernelParameters(PollyGPUF
                                int BlockHeight, PollyGPUDevicePtr *DevData);
 void polly_launchKernel(PollyGPUFunction *Kernel, int GridWidth,
                         int GridHeight);
-void polly_cleanupGPGPUResources(void *HostData, PollyGPUDevicePtr *DevData,
-                                 PollyGPUModule *Module,
-                                 PollyGPUFunction *Kernel);
 void free_Context(PollyGPUContext *Context);
 #endif /* GPUJIT_H_ */




More information about the llvm-commits mailing list