From d8fa1abf835ef77cfbdd11e06c516611f7e403f9 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 21 May 2015 15:24:14 -0400
Subject: [PATCH] P4 to Git Change 1153222 by atimofee@atimofee-hsa on
2015/05/21 15:03:48
ECR #333753 - HSA HLC: -hsail-enable-calls=0 should switch call support off.
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/opt_level.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/IPO/AMDPassManagerBuilder.cpp#51 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/opt/amdopt.inc#24 edit
---
rocclr/compiler/lib/backends/common/opt_level.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/rocclr/compiler/lib/backends/common/opt_level.cpp b/rocclr/compiler/lib/backends/common/opt_level.cpp
index 95dd4840d9..e1130028c7 100644
--- a/rocclr/compiler/lib/backends/common/opt_level.cpp
+++ b/rocclr/compiler/lib/backends/common/opt_level.cpp
@@ -51,6 +51,8 @@ OptLevel::setup(bool isGPU, uint32_t OptLevel)
if (Options()->libraryType_ == amd::GPU_Library_HSAIL) {
if (HLC_HSAIL_Enable_Calls) {
HLC_Disable_Amd_Inline_All = true;
+ } else {
+ HLC_Disable_Amd_Inline_All = false;
}
// Always create Inliner regardless of OptLevel
if (HLC_Force_Always_Inliner_Pass) {
@@ -76,7 +78,7 @@ OptLevel::setup(bool isGPU, uint32_t OptLevel)
if (OptLevel > 0) {
Builder.Inliner = createFunctionInliningPass(Threshold);
}
- } else
+ } else
#endif
{
Builder.Inliner = createFunctionInliningPass(Threshold);
@@ -174,7 +176,7 @@ O0OptLevel::optimize(aclBinary *elf, Module *input, bool isGPU)
if (Options()->libraryType_ == amd::GPU_Library_HSAIL) {
// Mark all non-kernel functions as having internal linkage
Passes().add(createAMDSymbolLinkagePass(true, NULL));
- } else
+ } else
#endif
{
setup(false, 0);