[polly] r276621 - GPURuntime: Check for debug-mode early on

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 02:15:53 PDT 2016


Author: grosser
Date: Mon Jul 25 04:15:53 2016
New Revision: 276621

URL: http://llvm.org/viewvc/llvm-project?rev=276621&view=rev
Log:
GPURuntime: Check for debug-mode early on

Before this change, the debug statements in polly_initDevice would all be
skipped, as debug-mode would only be enabled _after_ they have already been run.

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

Modified: polly/trunk/tools/GPURuntime/GPUJIT.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/tools/GPURuntime/GPUJIT.c?rev=276621&r1=276620&r2=276621&view=diff
==============================================================================
--- polly/trunk/tools/GPURuntime/GPUJIT.c (original)
+++ polly/trunk/tools/GPURuntime/GPUJIT.c Mon Jul 25 04:15:53 2016
@@ -220,6 +220,8 @@ static int initialDeviceAPIs() {
 }
 
 void polly_initDevice(PollyGPUContext **Context, PollyGPUDevice **Device) {
+  DebugMode = getenv("POLLY_DEBUG") != 0;
+
   dump_function();
 
   int Major = 0, Minor = 0, DeviceID = 0;
@@ -264,8 +266,6 @@ void polly_initDevice(PollyGPUContext **
     exit(-1);
   }
   CuCtxCreateFcnPtr(&((*Context)->Cuda), 0, (*Device)->Cuda);
-
-  DebugMode = getenv("POLLY_DEBUG") != 0;
 }
 
 void polly_getPTXModule(void *PTXBuffer, PollyGPUModule **Module) {




More information about the llvm-commits mailing list