From c5265e08c6182c450aed33f6a58d44c3af30bbbb Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 9 Feb 2016 02:52:58 -0500 Subject: [PATCH] P4 to Git Change 1235456 by kebai@kebai_win1 on 2016/02/09 02:47:34 SWDEV-86836 - Enhance caching library class to prepare one-stage kernel caching by: 0. Moving cache storage setup into constructor 1. Controlling cache storage size 2. Explicit cache cleanup a. -kcache-wipe is off by default; when turned on, the caching directory would be wiped off b. Here it's just an option. The implementation (the call of wipeCacheFolders()) will be added in the compiler library 3. Enforcing cache miss (actual compilation enforcing and adding a new entry to the cache storage). a. -kcache-enforce-miss is off by default; when turned on, the real compilation will be enforced b. Here it's just an option. The implementation will be added in the compiler library ReviewBoardURL = http://ocltc.amd.com/reviews/r/9726/ Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#134 edit ... //depot/stg/opencl/drivers/opencl/compiler/tools/caching/cache.cpp#12 edit ... //depot/stg/opencl/drivers/opencl/compiler/tools/caching/cache.hpp#7 edit --- rocclr/compiler/lib/utils/OPTIONS.def | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/rocclr/compiler/lib/utils/OPTIONS.def b/rocclr/compiler/lib/utils/OPTIONS.def index 9b8b18f4c2..c814ee7554 100644 --- a/rocclr/compiler/lib/utils/OPTIONS.def +++ b/rocclr/compiler/lib/utils/OPTIONS.def @@ -1063,13 +1063,29 @@ OPTION(OT_BOOL, \ false, 0, 0, NULL, \ "Enable timing for Kernel build.") -// -kcache-disable +// -kernel-cache OPTION(OT_BOOL, \ OA_RUNTIME|OVIS_SUPPORT|OVA_DISALLOWED, \ - "kcache-disable", NULL, \ - DisableKernelCaching, \ + "kernel-cache", NULL, \ + EnableKernelCaching, \ + true, 0, 0, NULL, \ + "Enable kernel caching functionality.") + +// -kernel-cache-wipe +OPTION(OT_BOOL, \ + OA_RUNTIME|OVIS_SUPPORT|OVA_DISALLOWED, \ + "kernel-cache-wipe", NULL, \ + WipeKernelCache, \ false, 0, 0, NULL, \ - "Disable kernel caching functionality.") + "Wipe out kernel cache storage.") + +// -kernel-cache-enforce-miss +OPTION(OT_BOOL, \ + OA_RUNTIME|OVIS_SUPPORT|OVA_DISALLOWED, \ + "kernel-cache-enforce-miss", NULL, \ + EnforceKernelCacheMiss, \ + false, 0, 0, NULL, \ + "Enforce kernel cache miss (actual compilation).") // -print-compile-phases OPTION(OT_BOOL, \