summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-comment-out-dump-functions.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-comment-out-dump-functions.patch')
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-comment-out-dump-functions.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-comment-out-dump-functions.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-comment-out-dump-functions.patch
new file mode 100644
index 00000000..c9128a0a
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-comment-out-dump-functions.patch
@@ -0,0 +1,86 @@
1From f56b781c244347158467a01aef65d2787afd1366 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Sat, 17 Aug 2019 21:25:06 +0800
4Subject: [PATCH] comment out dump functions
5
6Otherwise it leads to errors when linking with lld:
7
8| ld.lld: error: undefined symbol: llvm::Value::dump() const
9| >>> 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)
10| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpDDGContents()) in archive IGC/Release/libCompiler.a
11|
12| ld.lld: error: undefined symbol: llvm::Value::dump() const
13| >>> 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)
14| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a
15|
16| ld.lld: error: undefined symbol: llvm::Value::dump() const
17| >>> 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)
18| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a
19|
20| ld.lld: error: undefined symbol: llvm::Value::dump() const
21| >>> 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)
22| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a
23|
24| ld.lld: error: undefined symbol: llvm::Value::dump() const
25| >>> 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)
26| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a
27| clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
28| ninja: build stopped: subcommand failed.
29
30Upstream-Status: Submitted [https://github.com/intel/intel-graphics-compiler/pull/105]
31
32Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
33---
34 IGC/Compiler/CISACodeGen/PreRAScheduler.cpp | 6 ++++++
35 1 file changed, 6 insertions(+)
36
37diff --git a/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp b/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp
38index 587e491..4effa80 100644
39--- a/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp
40+++ b/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp
41@@ -178,8 +178,10 @@ namespace IGC{
42 AU.addRequired<RegisterEstimator>();
43 }
44
45+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
46 void dumpDDGContents();
47 void dumpPriorityQueueContents();
48+#endif
49
50 void clearDDG();
51
52@@ -228,6 +230,7 @@ IGC_INITIALIZE_PASS_DEPENDENCY(RegisterEstimator)
53 IGC_INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
54 IGC_INITIALIZE_PASS_END(PreRAScheduler, PASS_FLAG, PASS_DESC, PASS_CFG_ONLY, PASS_ANALYSIS)
55
56+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
57 void PreRAScheduler::dumpDDGContents()
58 {
59 IGC_SET_FLAG_VALUE(PrintToConsole, 1);
60@@ -259,6 +262,7 @@ void PreRAScheduler::dumpDDGContents()
61
62 IGC_SET_FLAG_VALUE(PrintToConsole, 0);
63 }
64+#endif
65
66 void PreRAScheduler::clearDDG()
67 {
68@@ -841,6 +845,7 @@ bool PreRAScheduler::ScheduleReadyNodes(
69 return Changed;
70 }
71
72+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
73 void PreRAScheduler::dumpPriorityQueueContents()
74 {
75 llvm::PriorityQueue<Node*, std::vector<Node*>, PreRAScheduler::OrderByLatency> longLatencyQueueCopy = longLatencyDelaySortedReadyQueue;
76@@ -912,6 +917,7 @@ void PreRAScheduler::dumpPriorityQueueContents()
77
78 IGC_SET_FLAG_VALUE(PrintToConsole, 0);
79 }
80+#endif
81
82 bool PreRAScheduler::runOnFunction(Function &F) {
83 CodeGenContext *ctx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext();
84--
852.7.4
86