apache / apache/tvm

[Bug] LLVM version=20.0.0,compiler falied

Open
#18,693 4 comments 0 reactions 0 assignees View on GitHub
needs-triage type: bug
Dominant language
Python
Stars
13.7k
Forks
4k
Avg merge
2d 1h
Merged PRs (30d)
112

Description

/home/richard/tvm-build/tvm/src/target/llvm/codegen_llvm.cc:2279:29: error: no matching member function for call to 'insertDeclare'
2279 | dbg_info_->di_builder_->insertDeclare(
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/richard/rocm-all-libs-build/rocm-install/include/llvm/IR/DIBuilder.h:1018:16: note: candidate function not viable: no known conversion from 'llvm::BasicBlock::iterator' (aka 'ilist_iterator_w_bits, false, false>') to 'BasicBlock *' for 5th argument
1018 | DbgInstPtr insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
| ^
1019 | DIExpression *Expr, const DILocation *DL,
1020 | BasicBlock *InsertAtEnd);
| ~~~~~~~~~~~~~~~~~~~~~~~
/home/richard/rocm-all-libs-build/rocm-install/include/llvm/IR/DIBuilder.h:1047:16: note: candidate function not viable: no known conversion from 'llvm::BasicBlock::iterator' (aka 'ilist_iterator_w_bits, false, false>') to 'Instruction *' for 5th argument
1047 | DbgInstPtr insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
| ^
1048 | DIExpression *Expr, const DILocation *DL,
1049 | Instruction *InsertBefore);
| ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/richard/rocm-all-libs-build/rocm-install/include/llvm/IR/DIBuilder.h:98:16: note: candidate function not viable: requires 6 arguments, but 5 were provided
98 | DbgInstPtr insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99 | DIExpression *Expr, const DILocation *DL,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100 | BasicBlock *InsertBB, Instruction *InsertBefore);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/richard/tvm-build/tvm/src/target/llvm/codegen_llvm.cc:2323:29: error: no matching member function for call to 'insertDeclare'
2323 | dbg_info_->di_builder_->insertDeclare(
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/richard/rocm-all-libs-build/rocm-install/include/llvm/IR/DIBuilder.h:1018:16: note: candidate function not viable: no known conversion from 'llvm::BasicBlock::iterator' (aka 'ilist_iterator_w_bits, false, false>') to 'BasicBlock *' for 5th argument
1018 | DbgInstPtr insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
| ^
1019 | DIExpression *Expr, const DILocation *DL,
1020 | BasicBlock *InsertAtEnd);
| ~~~~~~~~~~~~~~~~~~~~~~~
/home/richard/rocm-all-libs-build/rocm-install/include/llvm/IR/DIBuilder.h:1047:16: note: candidate function not viable: no known conversion from 'llvm::BasicBlock::iterator' (aka 'ilist_iterator_w_bits, false, false>') to 'Instruction *' for 5th argument
1047 | DbgInstPtr insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
| ^
1048 | DIExpression *Expr, const DILocation *DL,
1049 | Instruction *InsertBefore);
| ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/richard/rocm-all-libs-build/rocm-install/include/llvm/IR/DIBuilder.h:98:16: note: candidate function not viable: requires 6 arguments, but 5 were provided
98 | DbgInstPtr insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99 | DIExpression *Expr, const DILocation *DL,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100 | BasicBlock *InsertBB, Instruction *InsertBefore);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated when compiling for gfx1201.
failed to execute:/home/richard/rocm-all-libs-build/rocm-install/bin/clang++ --offload-arch=gfx1201 -faligned-new -O2 -Wall -fPIC -O3 -std=gnu++17 -Wno-c++98-compat -Wno-c++98-compat-extra-semi -Wno-c++98-compat-pedantic -Wno-padded -Wno-extra-semi -Wno-extra-semi-stmt -Wno-unused-parameter -Wno-sign-conversion -Wno-weak-vtables -Wno-deprecated-copy-dtor -Wno-global-constructors -Wno-double-promotion -Wno-float-equal -Wno-missing-prototypes -Wno-implicit-int-float-conversion -Wno-implicit-float-conversion -Wno-implicit-int-conversion -Wno-float-conversion -Wno-shorten-64-to-32 -Wno-covered-switch-default -Wno-unused-exception-parameter -Wno-return-std-move -Wno-over-aligned -Wno-undef -Wno-inconsistent-missing-destructor-override -Wno-unreachable-code -Wno-deprecated-copy -Wno-implicit-fallthrough -Wno-unreachable-code-return -Wno-non-virtual-dtor -Wreserved-id-macro -Wused-but-marked-unused -Wdocumentation-unknown-command -Wcast-qual -Wzero-as-null-pointer-constant -Wno-documentation -Wno-shadow-uncaptured-local -Wno-shadow-field-in-constructor -Wno-shadow -Wno-shadow-field -Wno-exit-time-destructors -Wno-switch-enum -Wno-old-style-cast -Wno-gnu-anonymous-struct -Wno-nested-anon-types -fno-rtti -DDMLC_USE_FOPEN64=0 -DDMLC_USE_LOGGING_LIBRARY=\ -DNDEBUG=1 -DTVM_FFI_CMAKE_LITTLE_ENDIAN=1 -DTVM_INDEX_DEFAULT_I64=1 -DTVM_LLVM_HAS_AARCH64_TARGET=0 -DTVM_LLVM_VERSION=200 -DTVM_THREADPOOL_USE_OPENMP=0 -DUSE_FALLBACK_STL_MAP=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__HIP_PLATFORM_AMD__=1 -D__HIP_PLATFORM_HCC__=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DDMLC_ENABLE_RTTI=0 -I/home/richard/tvm-build/tvm/include -I/home/richard/tvm-build/tvm/3rdparty/libcrc/include -I/home/richard/tvm-build/tvm/3rdparty/tvm-ffi/include -I/home/richard/tvm-build/tvm/3rdparty/tvm-ffi/3rdparty/dlpack/include -isystem /home/richard/tvm-build/tvm/3rdparty/dmlc-core/include -isystem /home/richard/tvm-build/tvm/3rdparty/rang/include -isystem /home/richard/tvm-build/tvm/3rdparty/compiler-rt -isystem /home/richard/tvm-build/tvm/3rdparty/picojson -DNDEBUG -c -MD -MT CMakeFiles/tvm_objs.dir/src/target/llvm/codegen_llvm.cc.o -MF CMakeFiles/tvm_objs.dir/src/target/llvm/codegen_llvm.cc.o.d -o "CMakeFiles/tvm_objs.dir/src/target/llvm/codegen_llvm.cc.o" -x hip /home/richard/tvm-build/tvm/src/target/llvm/codegen_llvm.cc

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/target/llvm/codegen_llvm.cc at lines 2279 and 2323, then compare the insertDeclare calls with the LLVM 20 DIBuilder signatures shown in the build error. Rebuild the TVM LLVM target for gfx1201 with the reported compiler setup; done means codegen_llvm.cc compiles successfully without these errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.