Thanks for the report. I'll take a look... Than
On Wed, Feb 9, 2022 at 2:33 PM Zhen Huang <james.huang...@gmail.com> wrote: > Thank you for the prompt response! I checked out the updated code and the > previous compilation error is gone. However, another compilation error came > up: > > [183/1626] Building CXX object > tools/g...LVMCppGoPasses.dir/GoStatepoints.cpp.o > FAILED: > tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o > /usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS > -Itools/gollvm/passes > -I/home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes -Iinclude > -I/home/user/code/llvm/llvm-project/llvm/include -fPIC > -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time > -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual > -Wno-missing-field-initializers -pedantic -Wno-long-long > -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess > -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type > -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment > -Wmisleading-indentation -fdiagnostics-color -g -fno-exceptions > -fno-rtti -fcf-protection=none -std=c++14 -MD -MT > tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o -MF > tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o.d -o > tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o -c > /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp > /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp: > In function ‘void makeStatepointExplicitImpl(llvm::CallBase*, > llvm::SmallVectorImpl<llvm::Value*>&, llvm::SmallVectorImpl<llvm::Value*>&, > {anonymous}::PartiallyConstructedSafepointRecord&, > std::vector<{anonymous}::DeferredReplacement>&)’: > /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1433:65: > warning: ‘llvm::Type* llvm::PointerType::getElementType() const’ is > deprecated: Pointer element types are deprecated. You can *temporarily* use > Type::getPointerElementType() instead [-Wdeprecated-declarations] > 1433 | Type *T = cast<PointerType>(V->getType())->getElementType(); > | ^ > In file included from > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/Function.h:29, > from > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/PassManager.h:45, > from > /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.h:20, > from > /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:15: > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/DerivedTypes.h:675:9: > note: declared here > 675 | Type *getElementType() const { > | ^~~~~~~~~~~~~~ > /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1517:27: > error: no matching function for call to > ‘llvm::IRBuilder<>::CreateGCStatepointInvoke(uint64_t&, uint32_t&, > llvm::Value*&, llvm::BasicBlock*, llvm::BasicBlock*, > llvm::ArrayRef<llvm::Use>&, llvm::ArrayRef<llvm::Value*>&, > llvm::ArrayRef<llvm::Value*>, const char [17])’ > 1517 | "statepoint_token"); > | ^ > In file included from > /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:45: > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:809:3: > note: candidate: ‘llvm::InvokeInst* > llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t, > llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*, > llvm::ArrayRef<llvm::Value*>, llvm::Optional<llvm::ArrayRef<llvm::Value*> > >, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&)’ > 809 | CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes, > | ^~~~~~~~~~~~~~~~~~~~~~~~ > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:810:43: > note: no known conversion for argument 3 from ‘llvm::Value*’ to > ‘llvm::FunctionCallee’ > 810 | FunctionCallee ActualInvokee, > BasicBlock *NormalDest, > | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~ > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:817:15: > note: candidate: ‘llvm::InvokeInst* > llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t, > llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*, uint32_t, > llvm::ArrayRef<llvm::Value*>, llvm::Optional<llvm::ArrayRef<llvm::Use> >, > llvm::Optional<llvm::ArrayRef<llvm::Use> >, llvm::ArrayRef<llvm::Value*>, > const llvm::Twine&)’ > 817 | InvokeInst *CreateGCStatepointInvoke( > | ^~~~~~~~~~~~~~~~~~~~~~~~ > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:817:15: > note: candidate expects 11 arguments, 9 provided > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:828:3: > note: candidate: ‘llvm::InvokeInst* > llvm::IRBuilderBase::CreateGCStatepointInvoke(uint64_t, uint32_t, > llvm::FunctionCallee, llvm::BasicBlock*, llvm::BasicBlock*, > llvm::ArrayRef<llvm::Use>, llvm::Optional<llvm::ArrayRef<llvm::Value*> >, > llvm::ArrayRef<llvm::Value*>, const llvm::Twine&)’ > 828 | CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes, > | ^~~~~~~~~~~~~~~~~~~~~~~~ > /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/IRBuilder.h:829:43: > note: no known conversion for argument 3 from ‘llvm::Value*’ to > ‘llvm::FunctionCallee’ > 829 | FunctionCallee ActualInvokee, > BasicBlock *NormalDest, > | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~ > > On Wed, Feb 9, 2022 at 1:45 AM eric...@arm.com <eric.f...@arm.com> wrote: > >> I just filed a patch for this issue, see >> https://go-review.googlesource.com/c/gollvm/+/384394 >> >> 在2022年2月9日星期三 UTC+8 14:57:08<james.h...@gmail.com> 写道: >> >>> I tried to build gollvm with the latest llvm, but it failed with several >>> compilation errors, such as the one below. Using llvm-13.0.0 resulted in >>> compilation errors too. Did anyone get into similar errors? >>> >>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp: >>> In function ‘llvm::AttributeList legalizeCallAttributes(llvm::LLVMContext&, >>> llvm::AttributeList)’: >>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1286:38: >>> error: conversion from ‘llvm::AttributeSet’ to non-scalar type >>> ‘llvm::AttrBuilder’ requested >>> 1286 | AttrBuilder FnAttrs = AL.getFnAttrs(); >>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1292:22: >>> error: cannot convert ‘llvm::Attribute’ to ‘const llvm::AttributeMask&’ >>> 1292 | FnAttrs.remove(A); >>> | ^ >>> | | >>> | llvm::Attribute >>> In file included from >>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/Argument.h:18, >>> from >>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/Function.h:25, >>> from >>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/PassManager.h:45, >>> from >>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.h:20, >>> from >>> /home/user/code/llvm/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:15: >>> /home/user/code/llvm/llvm-project/llvm/include/llvm/IR/Attributes.h:1041:44: >>> note: initializing argument 1 of ‘llvm::AttrBuilder& >>> llvm::AttrBuilder::remove(const llvm::AttributeMask&)’ >>> 1041 | AttrBuilder &remove(const AttributeMask &AM); >>> | ~~~~~~~~~~~~~~~~~~~~~^~ >>> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "golang-nuts" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/golang-nuts/X_MOYeEsoRA/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> golang-nuts+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/golang-nuts/e8fe8444-f303-426c-992a-f347e5b106a1n%40googlegroups.com >> <https://groups.google.com/d/msgid/golang-nuts/e8fe8444-f303-426c-992a-f347e5b106a1n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/CAK0UAmUXwKYuiZtv5zPJAbr3vJpgNVbh7yJ1jJSJVvi9P3EPWQ%40mail.gmail.com > <https://groups.google.com/d/msgid/golang-nuts/CAK0UAmUXwKYuiZtv5zPJAbr3vJpgNVbh7yJ1jJSJVvi9P3EPWQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CA%2BUr55HHX6ZTGjC5smOr36ZN1nQcMQhUR3f8nvyosyRvHYB1Qw%40mail.gmail.com.