From 4663600f3580347ffa3711128b724891475cde65 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 15 Jul 2014 10:56:51 -0400 Subject: [PATCH] P4 to Git Change 1055301 by emankov@em-hsa-amd on 2014/07/15 10:49:45 ECR #333753 - Compiler Lib: Added Phases info print to stdout [Reason]: unobviousness when running on different stacks with different options. As a result the reported error logs will always contain this missing info. Works only for !OPENCL_MAINLINE. Works on online & offline paths. [Example]: aoc2 -march=hsail -mdevice=Bonaire -cl-std=CL2.0 HelloWorld_Kernel_cl.cl Advanced Micro Devices Inc. OpenCL Compiler Compiler Version: 3 size: 320 Architecture: hsail Family: CI Device: Bonaire Compiling CL Source: HelloWorld_Kernel_cl.cl Input: HelloWorld_Kernel_cl.cl Output: HelloWorld_Kernel_cl.bin Options: -cl-std=CL2.0 //// added with the change: Phase: OCLFEToSPIR, FE: ClangOCLFrontend, Arch: hsail, OpenCL version: CL2.0 Phase: OCLLinkPhase, Arch: hsail, OpenCL version: CL2.0 Phase: GPUOptPhase, Arch: hsail, OpenCL version: CL2.0 Phase: CodegenPhase, Arch: hsail, OpenCL version: CL2.0 Phase: HSAILAsmPhase, Arch: hsail, OpenCL version: CL2.0 //// The binary was compiled for {hsail-CI-Bonaire}. Compiler log: Saving binary to HelloWorld_Kernel_cl.bin. [Testing]: smoke, smoke_clang, pre check-in [Reviewer]: Leonid Lobachev Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend.hpp#9 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#36 edit --- rocclr/compiler/lib/backends/common/frontend.hpp | 3 +++ rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/rocclr/compiler/lib/backends/common/frontend.hpp b/rocclr/compiler/lib/backends/common/frontend.hpp index 0c9145f84d..13686329c1 100644 --- a/rocclr/compiler/lib/backends/common/frontend.hpp +++ b/rocclr/compiler/lib/backends/common/frontend.hpp @@ -31,6 +31,7 @@ namespace amdcl // This function generates a command string for clc to execute. virtual int compileCommand(const std::string& singleSrc) = 0; + virtual std::string getClassName() = 0; }; // class Frontend /*@}*/ @@ -68,6 +69,7 @@ namespace amdcl // This function generates a command string for clc to execute. virtual int compileCommand(const std::string& singleSrc); + virtual std::string getClassName() {return "OCLFrontend";} }; // class OCLFrontend /*@}*/ @@ -93,6 +95,7 @@ namespace amdcl //! This function generates a command string for ClangOCLFE to execute. virtual int compileCommand(const std::string& singleSrc); + virtual std::string getClassName() {return "ClangOCLFrontend";} }; // class Frontend /*@}*/ } // namespac amdcl diff --git a/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp b/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp index 8f901d3ea7..d46590af92 100644 --- a/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp +++ b/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp @@ -176,6 +176,7 @@ LOADER_FUNCS(Codegen, amdcl::CLCodeGen); LOADER_FUNCS(SPIR, amdcl::SPIR); #undef LOADER_FUNCS + // CLC Frontend phase aclModule* ACL_API_ENTRY OCLFEToLLVMIR(