summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-comment-out-dump-functions.patch
blob: c9128a0a4aabdd7afc9aeadff9ee632c112ccfc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
From f56b781c244347158467a01aef65d2787afd1366 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Sat, 17 Aug 2019 21:25:06 +0800
Subject: [PATCH] comment out dump functions

Otherwise it leads to errors when linking with lld:

| ld.lld: error: undefined symbol: llvm::Value::dump() const
| >>> referenced by PreRAScheduler.cpp:252 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:252)
| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpDDGContents()) in archive IGC/Release/libCompiler.a
|
| ld.lld: error: undefined symbol: llvm::Value::dump() const
| >>> referenced by PreRAScheduler.cpp:855 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:855)
| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a
|
| ld.lld: error: undefined symbol: llvm::Value::dump() const
| >>> referenced by PreRAScheduler.cpp:876 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:876)
| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a
|
| ld.lld: error: undefined symbol: llvm::Value::dump() const
| >>> referenced by PreRAScheduler.cpp:888 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:888)
| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a
|
| ld.lld: error: undefined symbol: llvm::Value::dump() const
| >>> referenced by PreRAScheduler.cpp:902 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:902)
| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a
| clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
| ninja: build stopped: subcommand failed.

Upstream-Status: Submitted [https://github.com/intel/intel-graphics-compiler/pull/105]

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 IGC/Compiler/CISACodeGen/PreRAScheduler.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp b/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp
index 587e491..4effa80 100644
--- a/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp
+++ b/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp
@@ -178,8 +178,10 @@ namespace IGC{
             AU.addRequired<RegisterEstimator>();
         }
 
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
         void dumpDDGContents();
         void dumpPriorityQueueContents();
+#endif
 
         void clearDDG();
 
@@ -228,6 +230,7 @@ IGC_INITIALIZE_PASS_DEPENDENCY(RegisterEstimator)
 IGC_INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
 IGC_INITIALIZE_PASS_END(PreRAScheduler, PASS_FLAG, PASS_DESC, PASS_CFG_ONLY, PASS_ANALYSIS)
 
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void PreRAScheduler::dumpDDGContents()
 {
     IGC_SET_FLAG_VALUE(PrintToConsole, 1);
@@ -259,6 +262,7 @@ void PreRAScheduler::dumpDDGContents()
 
     IGC_SET_FLAG_VALUE(PrintToConsole, 0);
 }
+#endif
 
 void PreRAScheduler::clearDDG()
 {
@@ -841,6 +845,7 @@ bool PreRAScheduler::ScheduleReadyNodes(
     return Changed;
 }
 
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void PreRAScheduler::dumpPriorityQueueContents()
 {
     llvm::PriorityQueue<Node*, std::vector<Node*>, PreRAScheduler::OrderByLatency> longLatencyQueueCopy = longLatencyDelaySortedReadyQueue;
@@ -912,6 +917,7 @@ void PreRAScheduler::dumpPriorityQueueContents()
 
     IGC_SET_FLAG_VALUE(PrintToConsole, 0);
 }
+#endif
 
 bool PreRAScheduler::runOnFunction(Function &F) {
     CodeGenContext *ctx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext();
-- 
2.7.4