Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
da9a0330
Commit
da9a0330
authored
Nov 21, 2019
by
masahi
Committed by
Zhi
Nov 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build with llvm trunk (#4386)
parent
eca26032
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
6 deletions
+30
-6
src/codegen/llvm/codegen_amdgpu.cc
+10
-2
src/codegen/llvm/codegen_nvptx.cc
+5
-1
src/codegen/llvm/llvm_module.cc
+15
-3
No files found.
src/codegen/llvm/codegen_amdgpu.cc
View file @
da9a0330
...
@@ -271,10 +271,14 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) {
...
@@ -271,10 +271,14 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) {
CHECK
(
tm
->
addPassesToEmitFile
(
CHECK
(
tm
->
addPassesToEmitFile
(
pass
,
destObj
,
llvm
::
TargetMachine
::
CGFT_ObjectFile
)
==
0
)
pass
,
destObj
,
llvm
::
TargetMachine
::
CGFT_ObjectFile
)
==
0
)
<<
"Cannot emit target CGFT_ObjectFile"
;
<<
"Cannot emit target CGFT_ObjectFile"
;
#el
se
#el
if TVM_LLVM_VERSION <= 90
CHECK
(
tm
->
addPassesToEmitFile
(
CHECK
(
tm
->
addPassesToEmitFile
(
pass
,
destObj
,
nullptr
,
llvm
::
TargetMachine
::
CGFT_ObjectFile
)
==
0
)
pass
,
destObj
,
nullptr
,
llvm
::
TargetMachine
::
CGFT_ObjectFile
)
==
0
)
<<
"Cannot emit target CGFT_ObjectFile"
;
<<
"Cannot emit target CGFT_ObjectFile"
;
#else
CHECK
(
tm
->
addPassesToEmitFile
(
pass
,
destObj
,
nullptr
,
llvm
::
CGFT_ObjectFile
)
==
0
)
<<
"Cannot emit target CGFT_ObjectFile"
;
#endif
#endif
pass
.
run
(
*
mObj
);
pass
.
run
(
*
mObj
);
std
::
string
obj
(
dataObj
.
begin
(),
dataObj
.
end
());
std
::
string
obj
(
dataObj
.
begin
(),
dataObj
.
end
());
...
@@ -284,10 +288,14 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) {
...
@@ -284,10 +288,14 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) {
CHECK
(
tm
->
addPassesToEmitFile
(
passAsm
,
destAsm
,
CHECK
(
tm
->
addPassesToEmitFile
(
passAsm
,
destAsm
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
<<
"Cannot emit target CGFT_AssemblyFile"
;
<<
"Cannot emit target CGFT_AssemblyFile"
;
#el
se
#el
if TVM_LLVM_VERSION <= 90
CHECK
(
tm
->
addPassesToEmitFile
(
passAsm
,
destAsm
,
nullptr
,
CHECK
(
tm
->
addPassesToEmitFile
(
passAsm
,
destAsm
,
nullptr
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
<<
"Cannot emit target CGFT_AssemblyFile"
;
<<
"Cannot emit target CGFT_AssemblyFile"
;
#else
CHECK
(
tm
->
addPassesToEmitFile
(
passAsm
,
destAsm
,
nullptr
,
llvm
::
CGFT_AssemblyFile
)
==
0
)
<<
"Cannot emit target CGFT_AssemblyFile"
;
#endif
#endif
passAsm
.
run
(
*
mAsm
);
passAsm
.
run
(
*
mAsm
);
std
::
string
assembly
(
dataAsm
.
begin
(),
dataAsm
.
end
());
std
::
string
assembly
(
dataAsm
.
begin
(),
dataAsm
.
end
());
...
...
src/codegen/llvm/codegen_nvptx.cc
View file @
da9a0330
...
@@ -240,10 +240,14 @@ runtime::Module BuildNVPTX(Array<LoweredFunc> funcs, std::string target) {
...
@@ -240,10 +240,14 @@ runtime::Module BuildNVPTX(Array<LoweredFunc> funcs, std::string target) {
CHECK
(
tm
->
addPassesToEmitFile
(
CHECK
(
tm
->
addPassesToEmitFile
(
pass
,
dest_ptx
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
pass
,
dest_ptx
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
<<
"Cannot emit target CGFT_ObjectFile"
;
<<
"Cannot emit target CGFT_ObjectFile"
;
#el
se
#el
if TVM_LLVM_VERSION <= 90
CHECK
(
tm
->
addPassesToEmitFile
(
CHECK
(
tm
->
addPassesToEmitFile
(
pass
,
dest_ptx
,
nullptr
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
pass
,
dest_ptx
,
nullptr
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
<<
"Cannot emit target CGFT_ObjectFile"
;
<<
"Cannot emit target CGFT_ObjectFile"
;
#else
CHECK
(
tm
->
addPassesToEmitFile
(
pass
,
dest_ptx
,
nullptr
,
llvm
::
CGFT_AssemblyFile
)
==
0
)
<<
"Cannot emit target CGFT_ObjectFile"
;
#endif
#endif
pass
.
run
(
*
module
);
pass
.
run
(
*
module
);
std
::
string
ptx
(
data_ptx
.
begin
(),
data_ptx
.
end
());
std
::
string
ptx
(
data_ptx
.
begin
(),
data_ptx
.
end
());
...
...
src/codegen/llvm/llvm_module.cc
View file @
da9a0330
...
@@ -91,10 +91,14 @@ class LLVMModuleNode final : public runtime::ModuleNode {
...
@@ -91,10 +91,14 @@ class LLVMModuleNode final : public runtime::ModuleNode {
CHECK
(
tm_
->
addPassesToEmitFile
(
CHECK
(
tm_
->
addPassesToEmitFile
(
pass
,
dest
,
llvm
::
TargetMachine
::
CGFT_ObjectFile
)
==
0
)
pass
,
dest
,
llvm
::
TargetMachine
::
CGFT_ObjectFile
)
==
0
)
<<
"Cannot emit target CGFT_ObjectFile"
;
<<
"Cannot emit target CGFT_ObjectFile"
;
#el
se
#el
if TVM_LLVM_VERSION <= 90
CHECK
(
tm_
->
addPassesToEmitFile
(
CHECK
(
tm_
->
addPassesToEmitFile
(
pass
,
dest
,
nullptr
,
llvm
::
TargetMachine
::
CGFT_ObjectFile
)
==
0
)
pass
,
dest
,
nullptr
,
llvm
::
TargetMachine
::
CGFT_ObjectFile
)
==
0
)
<<
"Cannot emit target CGFT_ObjectFile"
;
<<
"Cannot emit target CGFT_ObjectFile"
;
#else
CHECK
(
tm_
->
addPassesToEmitFile
(
pass
,
dest
,
nullptr
,
llvm
::
CGFT_ObjectFile
)
==
0
)
<<
"Cannot emit target CGFT_ObjectFile"
;
#endif
#endif
pass
.
run
(
*
m
);
pass
.
run
(
*
m
);
}
else
if
(
fmt
==
"s"
||
fmt
==
"asm"
)
{
}
else
if
(
fmt
==
"s"
||
fmt
==
"asm"
)
{
...
@@ -109,10 +113,14 @@ class LLVMModuleNode final : public runtime::ModuleNode {
...
@@ -109,10 +113,14 @@ class LLVMModuleNode final : public runtime::ModuleNode {
CHECK
(
tm_
->
addPassesToEmitFile
(
CHECK
(
tm_
->
addPassesToEmitFile
(
pass
,
dest
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
pass
,
dest
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
<<
"Cannot emit target CGFT_AssemblyFile"
;
<<
"Cannot emit target CGFT_AssemblyFile"
;
#el
se
#el
if TVM_LLVM_VERSION <= 90
CHECK
(
tm_
->
addPassesToEmitFile
(
CHECK
(
tm_
->
addPassesToEmitFile
(
pass
,
dest
,
nullptr
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
pass
,
dest
,
nullptr
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
<<
"Cannot emit target CGFT_AssemblyFile"
;
<<
"Cannot emit target CGFT_AssemblyFile"
;
#else
CHECK
(
tm_
->
addPassesToEmitFile
(
pass
,
dest
,
nullptr
,
llvm
::
CGFT_AssemblyFile
)
==
0
)
<<
"Cannot emit target CGFT_AssemblyFile"
;
#endif
#endif
pass
.
run
(
*
m
);
pass
.
run
(
*
m
);
}
else
if
(
fmt
==
"ll"
)
{
}
else
if
(
fmt
==
"ll"
)
{
...
@@ -152,10 +160,14 @@ class LLVMModuleNode final : public runtime::ModuleNode {
...
@@ -152,10 +160,14 @@ class LLVMModuleNode final : public runtime::ModuleNode {
CHECK
(
tm_
->
addPassesToEmitFile
(
CHECK
(
tm_
->
addPassesToEmitFile
(
pass
,
rso
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
pass
,
rso
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
<<
"Cannot emit target CGFT_AssemblyFile"
;
<<
"Cannot emit target CGFT_AssemblyFile"
;
#el
se
#el
if TVM_LLVM_VERSION <= 90
CHECK
(
tm_
->
addPassesToEmitFile
(
CHECK
(
tm_
->
addPassesToEmitFile
(
pass
,
rso
,
nullptr
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
pass
,
rso
,
nullptr
,
llvm
::
TargetMachine
::
CGFT_AssemblyFile
)
==
0
)
<<
"Cannot emit target CGFT_AssemblyFile"
;
<<
"Cannot emit target CGFT_AssemblyFile"
;
#else
CHECK
(
tm_
->
addPassesToEmitFile
(
pass
,
rso
,
nullptr
,
llvm
::
CGFT_AssemblyFile
)
==
0
)
<<
"Cannot emit target CGFT_AssemblyFile"
;
#endif
#endif
pass
.
run
(
*
m
);
pass
.
run
(
*
m
);
return
rso
.
str
().
str
();
return
rso
.
str
().
str
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment