This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 7e232264b3 [LLVM] Use DataLayout::getABITypeAlign instead of
getABITypeAlignment
7e232264b3 is described below
commit 7e232264b3be7029dfde0a9096af1855559add7b
Author: Krzysztof Parzyszek <[email protected]>
AuthorDate: Fri Apr 7 13:02:19 2023 -0700
[LLVM] Use DataLayout::getABITypeAlign instead of getABITypeAlignment
The latter has been deprecated since LLVM 16.
---
src/target/llvm/codegen_blob.cc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/target/llvm/codegen_blob.cc b/src/target/llvm/codegen_blob.cc
index 01149a1c59..5bfc69126d 100644
--- a/src/target/llvm/codegen_blob.cc
+++ b/src/target/llvm/codegen_blob.cc
@@ -109,7 +109,12 @@ std::unique_ptr<llvm::Module> CodeGenBlob(const
std::string& data, bool system_l
auto* tvm_dev_mblob_reg = new llvm::GlobalVariable(
*module, int32_ty, false, llvm::GlobalValue::InternalLinkage,
constant_zero,
std::string(runtime::symbol::tvm_dev_mblob) + "_reg_");
- auto tvm_dev_mblob_reg_alignment =
module->getDataLayout().getABITypeAlignment(int32_ty);
+ auto tvm_dev_mblob_reg_alignment =
+#if TVM_LLVM_VERSION >= 110
+ module->getDataLayout().getABITypeAlign(int32_ty);
+#else
+ module->getDataLayout().getABITypeAlignment(int32_ty);
+#endif
#if TVM_LLVM_VERSION >= 100
tvm_dev_mblob_reg->setAlignment(llvm::Align(tvm_dev_mblob_reg_alignment));
#else