From f10df9ffcd7ae1bebf9747d1ba68dd45aa41984b Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 15 Oct 2014 17:02:40 -0400 Subject: [PATCH] P4 to Git Change 1087805 by yaxunl@yaxunl_stg_win50 on 2014/10/15 16:07:03 EPR #407587 - Fix llvm -stats not printing out statistics. Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/codegen.cpp#59 edit --- rocclr/compiler/lib/backends/common/codegen.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rocclr/compiler/lib/backends/common/codegen.cpp b/rocclr/compiler/lib/backends/common/codegen.cpp index 3e1fa16653..ae2b091cf6 100644 --- a/rocclr/compiler/lib/backends/common/codegen.cpp +++ b/rocclr/compiler/lib/backends/common/codegen.cpp @@ -7,6 +7,14 @@ #include "os/os.hpp" #include "jit/src/jit.hpp" #include "utils/target_mappings.h" +#ifdef _MSC_VER +/* for disabling warning in llvm/ADT/Statistic.h */ +#pragma warning(disable:4146) +#endif +#include "llvm/ADT/Statistic.h" +#ifdef _MSC_VER +#pragma warning(default:4146) +#endif #include "llvm/Support/FormattedStream.h" #include "llvm/Support/Host.h" #include "llvm/Support/raw_ostream.h" @@ -315,7 +323,7 @@ llvmCodeGen( } Passes.run(mod); - + llvm::PrintStatistics(); delete Out; return 0; }