From 5da9e12507fca9a66e3c8c30c130be1cc20fa1e2 Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 23 Jan 2015 11:25:27 -0500
Subject: [PATCH] P4 to Git Change 1114751 by emankov@em-hsa-amd on 2015/01/23
11:18:10
ECR #333753 - Compiler Lib: Fix for EPR 413126 "Regression: Env. var. AMD_DEBUG_DUMP_HSAIL_ALL_KERNELS has stopped working"
Tests: make smoke, pre check-in, complib
Reviewer: Artem Tamazov
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#57 edit
[ROCm/clr commit: f852a39a978ac9d86663d875085c4147f891232e]
---
.../rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp b/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp
index 56247d6f02..e3197c9231 100644
--- a/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp
+++ b/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp
@@ -1155,9 +1155,6 @@ aclCompileInternal(
goto internal_compile_failure;
}
}
- if (acl->Options()->isDumpFlagSet(amd::option::DUMP_CGIL)) {
- acl->dumpHSAIL(acl->disassembleBRIG(), ".hsail");
- }
}
// HSAIL substitution from AMD_DEBUG_HSAIL_TEXT_INPUT
else {
@@ -1202,6 +1199,10 @@ aclCompileInternal(
goto internal_compile_failure;
}
}
+ char* dumpFileName = ::getenv("AMD_DEBUG_DUMP_HSAIL_ALL_KERNELS");
+ if (acl->Options()->isDumpFlagSet(amd::option::DUMP_CGIL) || dumpFileName) {
+ acl->dumpHSAIL(acl->disassembleBRIG(), ".hsail");
+ }
bifbase *elfBin = reinterpret_cast(bin->bin);
elfBin->setType(ET_EXEC);
} else