From b67d69d714d5a89c47dbaee7c1e8987da4d52a8d Mon Sep 17 00:00:00 2001 From: Jan Rehders Date: Tue, 30 Jan 2024 16:01:42 +0000 Subject: [PATCH] Op's create methods support passing an instruction name Equivalent to CallInst, for more readable code. This allows to pass in a value name without a call to setName which is especially useful when directly returning a create op. For example: return m_builder->create(m_builder->getInt32(123), "example_123"); --- lib/TableGen/Operations.cpp | 8 +-- test/example/generated/ExampleDialect.cpp.inc | 68 +++++++++---------- test/example/generated/ExampleDialect.h.inc | 34 +++++----- 3 files changed, 55 insertions(+), 55 deletions(-) diff --git a/lib/TableGen/Operations.cpp b/lib/TableGen/Operations.cpp index b16e2e4..22244b8 100644 --- a/lib/TableGen/Operations.cpp +++ b/lib/TableGen/Operations.cpp @@ -553,7 +553,7 @@ void BuilderMethod::emitDeclaration(raw_ostream &out, FmtContext &fmt) const { for (const auto &builderArg : m_arguments) { out << ", " << builderArg.cppType << " " << builderArg.name; } - out << ");\n"; + out << ", const llvm::Twine &instName = \"\");\n"; } void BuilderMethod::emitDefinition(raw_ostream &out, FmtContext &fmt, @@ -572,7 +572,7 @@ void BuilderMethod::emitDefinition(raw_ostream &out, FmtContext &fmt, for (const auto &builderArg : m_arguments) out << tgfmt(", $0 $1", &fmt, builderArg.cppType, builderArg.name); - out << tgfmt(R"() { + out << tgfmt(R"(, const llvm::Twine &instName) { ::llvm::LLVMContext& $_context = $_builder.getContext(); (void)$_context; ::llvm::Module& $_module = *$_builder.GetInsertBlock()->getModule(); @@ -711,11 +711,11 @@ void BuilderMethod::emitDefinition(raw_ostream &out, FmtContext &fmt, out << tgfmt(R"( }; $varArgInitializer - return ::llvm::cast<$_op>($_builder.CreateCall($fn, $args)); + return ::llvm::cast<$_op>($_builder.CreateCall($fn, $args, instName)); )", &fmt); } else { - out << tgfmt("return ::llvm::cast<$_op>($_builder.CreateCall($fn));\n", + out << tgfmt("return ::llvm::cast<$_op>($_builder.CreateCall($fn, std::nullopt, instName));\n", &fmt); } diff --git a/test/example/generated/ExampleDialect.cpp.inc b/test/example/generated/ExampleDialect.cpp.inc index 7b261ee..de6b72d 100644 --- a/test/example/generated/ExampleDialect.cpp.inc +++ b/test/example/generated/ExampleDialect.cpp.inc @@ -297,7 +297,7 @@ return true; const ::llvm::StringLiteral Add32Op::s_name{"xd.add32"}; - Add32Op* Add32Op::create(llvm_dialects::Builder& b, ::llvm::Value * lhs, ::llvm::Value * rhs, uint32_t extra) { + Add32Op* Add32Op::create(llvm_dialects::Builder& b, ::llvm::Value * lhs, ::llvm::Value * rhs, uint32_t extra, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -334,7 +334,7 @@ rhs, ::llvm::ConstantInt::get(::llvm::IntegerType::get(context, 32), extra) }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -419,7 +419,7 @@ uint32_t const extra = getExtra(); const ::llvm::StringLiteral CombineOp::s_name{"xd.combine"}; - CombineOp* CombineOp::create(llvm_dialects::Builder& b, ::llvm::Value * lhs, ::llvm::Value * rhs) { + CombineOp* CombineOp::create(llvm_dialects::Builder& b, ::llvm::Value * lhs, ::llvm::Value * rhs, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -453,7 +453,7 @@ lhs, rhs }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -514,7 +514,7 @@ rhs const ::llvm::StringLiteral ExtractElementOp::s_name{"xd.extractelement"}; - ExtractElementOp* ExtractElementOp::create(llvm_dialects::Builder& b, ::llvm::Value * vector, ::llvm::Value * index) { + ExtractElementOp* ExtractElementOp::create(llvm_dialects::Builder& b, ::llvm::Value * vector, ::llvm::Value * index, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -548,7 +548,7 @@ vector, index }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -618,7 +618,7 @@ index const ::llvm::StringLiteral FromFixedVectorOp::s_name{"xd.fromfixedvector"}; - FromFixedVectorOp* FromFixedVectorOp::create(llvm_dialects::Builder& b, ::llvm::Type* resultType, ::llvm::Value * source) { + FromFixedVectorOp* FromFixedVectorOp::create(llvm_dialects::Builder& b, ::llvm::Type* resultType, ::llvm::Value * source, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -651,7 +651,7 @@ index source }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -788,7 +788,7 @@ source const ::llvm::StringLiteral HandleGetOp::s_name{"xd.handle.get"}; - HandleGetOp* HandleGetOp::create(llvm_dialects::Builder& b) { + HandleGetOp* HandleGetOp::create(llvm_dialects::Builder& b, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -815,7 +815,7 @@ source assert(fn.getFunctionType() == fnType); assert(::llvm::cast<::llvm::Function>(fn.getCallee())->getFunctionType() == fn.getFunctionType()); - return ::llvm::cast(b.CreateCall(fn)); + return ::llvm::cast(b.CreateCall(fn, std::nullopt, instName)); } @@ -850,7 +850,7 @@ source const ::llvm::StringLiteral IExtOp::s_name{"xd.iext"}; - IExtOp* IExtOp::create(llvm_dialects::Builder& b, ::llvm::Type* resultType, ::llvm::Value * source) { + IExtOp* IExtOp::create(llvm_dialects::Builder& b, ::llvm::Type* resultType, ::llvm::Value * source, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -883,7 +883,7 @@ source source }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -948,7 +948,7 @@ source const ::llvm::StringLiteral ITruncOp::s_name{"xd.itrunc"}; - ITruncOp* ITruncOp::create(llvm_dialects::Builder& b, ::llvm::Type* resultType, ::llvm::Value * source) { + ITruncOp* ITruncOp::create(llvm_dialects::Builder& b, ::llvm::Type* resultType, ::llvm::Value * source, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -981,7 +981,7 @@ source source }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -1046,7 +1046,7 @@ source const ::llvm::StringLiteral InsertElementOp::s_name{"xd.insertelement"}; - InsertElementOp* InsertElementOp::create(llvm_dialects::Builder& b, ::llvm::Value * vector, ::llvm::Value * value, ::llvm::Value * index) { + InsertElementOp* InsertElementOp::create(llvm_dialects::Builder& b, ::llvm::Value * vector, ::llvm::Value * value, ::llvm::Value * index, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -1081,7 +1081,7 @@ value, index }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -1168,7 +1168,7 @@ index const ::llvm::StringLiteral ReadOp::s_name{"xd.read"}; - ReadOp* ReadOp::create(llvm_dialects::Builder& b, ::llvm::Type* dataType) { + ReadOp* ReadOp::create(llvm_dialects::Builder& b, ::llvm::Type* dataType, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -1198,7 +1198,7 @@ index assert(fn.getFunctionType() == fnType); assert(::llvm::cast<::llvm::Function>(fn.getCallee())->getFunctionType() == fn.getFunctionType()); - return ::llvm::cast(b.CreateCall(fn)); + return ::llvm::cast(b.CreateCall(fn, std::nullopt, instName)); } @@ -1225,7 +1225,7 @@ index const ::llvm::StringLiteral SetReadOp::s_name{"xd.set.read"}; - SetReadOp* SetReadOp::create(llvm_dialects::Builder& b, ::llvm::Type* dataType) { + SetReadOp* SetReadOp::create(llvm_dialects::Builder& b, ::llvm::Type* dataType, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -1255,7 +1255,7 @@ index assert(fn.getFunctionType() == fnType); assert(::llvm::cast<::llvm::Function>(fn.getCallee())->getFunctionType() == fn.getFunctionType()); - return ::llvm::cast(b.CreateCall(fn)); + return ::llvm::cast(b.CreateCall(fn, std::nullopt, instName)); } @@ -1282,7 +1282,7 @@ index const ::llvm::StringLiteral SetWriteOp::s_name{"xd.set.write"}; - SetWriteOp* SetWriteOp::create(llvm_dialects::Builder& b, ::llvm::Value * data) { + SetWriteOp* SetWriteOp::create(llvm_dialects::Builder& b, ::llvm::Value * data, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -1312,7 +1312,7 @@ index data }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -1345,7 +1345,7 @@ data const ::llvm::StringLiteral SizeOfOp::s_name{"xd.sizeof"}; - SizeOfOp* SizeOfOp::create(llvm_dialects::Builder& b, ::llvm::Type * sizeofType) { + SizeOfOp* SizeOfOp::create(llvm_dialects::Builder& b, ::llvm::Type * sizeofType, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -1375,7 +1375,7 @@ data ::llvm::PoisonValue::get(sizeofType) }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -1419,7 +1419,7 @@ data const ::llvm::StringLiteral StreamAddOp::s_name{"xd.stream.add"}; - StreamAddOp* StreamAddOp::create(llvm_dialects::Builder& b, ::llvm::Value * ptr, ::llvm::Value * count, ::llvm::Value * initial) { + StreamAddOp* StreamAddOp::create(llvm_dialects::Builder& b, ::llvm::Value * ptr, ::llvm::Value * count, ::llvm::Value * initial, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -1454,7 +1454,7 @@ count, initial }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -1511,7 +1511,7 @@ initial const ::llvm::StringLiteral StreamMaxOp::s_name{"xd.stream.max"}; - StreamMaxOp* StreamMaxOp::create(llvm_dialects::Builder& b, ::llvm::Value * ptr, ::llvm::Value * count, ::llvm::Value * initial) { + StreamMaxOp* StreamMaxOp::create(llvm_dialects::Builder& b, ::llvm::Value * ptr, ::llvm::Value * count, ::llvm::Value * initial, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -1546,7 +1546,7 @@ count, initial }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -1603,7 +1603,7 @@ initial const ::llvm::StringLiteral StreamMinOp::s_name{"xd.stream.min"}; - StreamMinOp* StreamMinOp::create(llvm_dialects::Builder& b, ::llvm::Value * ptr, ::llvm::Value * count, ::llvm::Value * initial) { + StreamMinOp* StreamMinOp::create(llvm_dialects::Builder& b, ::llvm::Value * ptr, ::llvm::Value * count, ::llvm::Value * initial, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -1638,7 +1638,7 @@ count, initial }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -1695,7 +1695,7 @@ initial const ::llvm::StringLiteral WriteOp::s_name{"xd.write"}; - WriteOp* WriteOp::create(llvm_dialects::Builder& b, ::llvm::Value * data) { + WriteOp* WriteOp::create(llvm_dialects::Builder& b, ::llvm::Value * data, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -1725,7 +1725,7 @@ initial data }; - return ::llvm::cast(b.CreateCall(fn, args)); + return ::llvm::cast(b.CreateCall(fn, args, instName)); } @@ -1758,7 +1758,7 @@ data const ::llvm::StringLiteral WriteVarArgOp::s_name{"xd.write.vararg"}; - WriteVarArgOp* WriteVarArgOp::create(llvm_dialects::Builder& b, ::llvm::Value * data, ::llvm::ArrayRef<::llvm::Value *> args) { + WriteVarArgOp* WriteVarArgOp::create(llvm_dialects::Builder& b, ::llvm::Value * data, ::llvm::ArrayRef<::llvm::Value *> args, const llvm::Twine &instName) { ::llvm::LLVMContext& context = b.getContext(); (void)context; ::llvm::Module& module = *b.GetInsertBlock()->getModule(); @@ -1790,7 +1790,7 @@ data arguments.append(args.begin(), args.end()); - return ::llvm::cast(b.CreateCall(fn, arguments)); + return ::llvm::cast(b.CreateCall(fn, arguments, instName)); } diff --git a/test/example/generated/ExampleDialect.h.inc b/test/example/generated/ExampleDialect.h.inc index 691317a..8e875c6 100644 --- a/test/example/generated/ExampleDialect.h.inc +++ b/test/example/generated/ExampleDialect.h.inc @@ -115,7 +115,7 @@ uint32_t getNumElements() const; return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static Add32Op* create(::llvm_dialects::Builder& b, ::llvm::Value * lhs, ::llvm::Value * rhs, uint32_t extra); + static Add32Op* create(::llvm_dialects::Builder& b, ::llvm::Value * lhs, ::llvm::Value * rhs, uint32_t extra, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -142,7 +142,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static CombineOp* create(::llvm_dialects::Builder& b, ::llvm::Value * lhs, ::llvm::Value * rhs); + static CombineOp* create(::llvm_dialects::Builder& b, ::llvm::Value * lhs, ::llvm::Value * rhs, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -167,7 +167,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static ExtractElementOp* create(::llvm_dialects::Builder& b, ::llvm::Value * vector, ::llvm::Value * index); + static ExtractElementOp* create(::llvm_dialects::Builder& b, ::llvm::Value * vector, ::llvm::Value * index, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -192,7 +192,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static FromFixedVectorOp* create(::llvm_dialects::Builder& b, ::llvm::Type* resultType, ::llvm::Value * source); + static FromFixedVectorOp* create(::llvm_dialects::Builder& b, ::llvm::Type* resultType, ::llvm::Value * source, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -215,7 +215,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static HandleGetOp* create(::llvm_dialects::Builder& b); + static HandleGetOp* create(::llvm_dialects::Builder& b, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -236,7 +236,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static IExtOp* create(::llvm_dialects::Builder& b, ::llvm::Type* resultType, ::llvm::Value * source); + static IExtOp* create(::llvm_dialects::Builder& b, ::llvm::Type* resultType, ::llvm::Value * source, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -259,7 +259,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static ITruncOp* create(::llvm_dialects::Builder& b, ::llvm::Type* resultType, ::llvm::Value * source); + static ITruncOp* create(::llvm_dialects::Builder& b, ::llvm::Type* resultType, ::llvm::Value * source, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -282,7 +282,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static InsertElementOp* create(::llvm_dialects::Builder& b, ::llvm::Value * vector, ::llvm::Value * value, ::llvm::Value * index); + static InsertElementOp* create(::llvm_dialects::Builder& b, ::llvm::Value * vector, ::llvm::Value * value, ::llvm::Value * index, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -309,7 +309,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static ReadOp* create(::llvm_dialects::Builder& b, ::llvm::Type* dataType); + static ReadOp* create(::llvm_dialects::Builder& b, ::llvm::Type* dataType, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -330,7 +330,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static SetReadOp* create(::llvm_dialects::Builder& b, ::llvm::Type* dataType); + static SetReadOp* create(::llvm_dialects::Builder& b, ::llvm::Type* dataType, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -351,7 +351,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static SetWriteOp* create(::llvm_dialects::Builder& b, ::llvm::Value * data); + static SetWriteOp* create(::llvm_dialects::Builder& b, ::llvm::Value * data, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -373,7 +373,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static SizeOfOp* create(::llvm_dialects::Builder& b, ::llvm::Type * sizeofType); + static SizeOfOp* create(::llvm_dialects::Builder& b, ::llvm::Type * sizeofType, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -396,7 +396,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static StreamAddOp* create(::llvm_dialects::Builder& b, ::llvm::Value * ptr, ::llvm::Value * count, ::llvm::Value * initial); + static StreamAddOp* create(::llvm_dialects::Builder& b, ::llvm::Value * ptr, ::llvm::Value * count, ::llvm::Value * initial, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -417,7 +417,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static StreamMaxOp* create(::llvm_dialects::Builder& b, ::llvm::Value * ptr, ::llvm::Value * count, ::llvm::Value * initial); + static StreamMaxOp* create(::llvm_dialects::Builder& b, ::llvm::Value * ptr, ::llvm::Value * count, ::llvm::Value * initial, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -438,7 +438,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static StreamMinOp* create(::llvm_dialects::Builder& b, ::llvm::Value * ptr, ::llvm::Value * count, ::llvm::Value * initial); + static StreamMinOp* create(::llvm_dialects::Builder& b, ::llvm::Value * ptr, ::llvm::Value * count, ::llvm::Value * initial, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -459,7 +459,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static WriteOp* create(::llvm_dialects::Builder& b, ::llvm::Value * data); + static WriteOp* create(::llvm_dialects::Builder& b, ::llvm::Value * data, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs); @@ -481,7 +481,7 @@ bool verifier(::llvm::raw_ostream &errs); return ::llvm::isa<::llvm::CallInst>(v) && classof(::llvm::cast<::llvm::CallInst>(v)); } - static WriteVarArgOp* create(::llvm_dialects::Builder& b, ::llvm::Value * data, ::llvm::ArrayRef<::llvm::Value *> args); + static WriteVarArgOp* create(::llvm_dialects::Builder& b, ::llvm::Value * data, ::llvm::ArrayRef<::llvm::Value *> args, const llvm::Twine &instName = ""); bool verifier(::llvm::raw_ostream &errs);