|
26 | 26 |
|
27 | 27 | #include "llvm/ADT/APFloat.h" |
28 | 28 | #include "llvm/ADT/TypeSwitch.h" |
29 | | -#include "llvm/IR/Function.h" |
30 | | -#include "llvm/IR/Type.h" |
| 29 | +#include "llvm/IR/DataLayout.h" |
31 | 30 | #include "llvm/Support/Error.h" |
32 | 31 |
|
33 | 32 | #include <numeric> |
@@ -4063,29 +4062,10 @@ void LLVM::AssumeOp::build(OpBuilder &builder, OperationState &state, |
4063 | 4062 | /*op_bundle_tags=*/ArrayAttr{}); |
4064 | 4063 | } |
4065 | 4064 |
|
4066 | | -void LLVM::AssumeOp::build(OpBuilder &builder, OperationState &state, |
4067 | | - Value cond, |
4068 | | - ArrayRef<llvm::OperandBundleDefT<Value>> opBundles) { |
4069 | | - SmallVector<ValueRange> opBundleOperands; |
4070 | | - SmallVector<Attribute> opBundleTags; |
4071 | | - opBundleOperands.reserve(opBundles.size()); |
4072 | | - opBundleTags.reserve(opBundles.size()); |
4073 | | - |
4074 | | - for (const llvm::OperandBundleDefT<Value> &bundle : opBundles) { |
4075 | | - opBundleOperands.emplace_back(bundle.inputs()); |
4076 | | - opBundleTags.push_back( |
4077 | | - StringAttr::get(builder.getContext(), bundle.getTag())); |
4078 | | - } |
4079 | | - |
4080 | | - auto opBundleTagsAttr = ArrayAttr::get(builder.getContext(), opBundleTags); |
4081 | | - return build(builder, state, cond, opBundleOperands, opBundleTagsAttr); |
4082 | | -} |
4083 | | - |
4084 | 4065 | void LLVM::AssumeOp::build(OpBuilder &builder, OperationState &state, |
4085 | 4066 | Value cond, llvm::StringRef tag, ValueRange args) { |
4086 | | - llvm::OperandBundleDefT<Value> opBundle( |
4087 | | - tag.str(), SmallVector<Value>(args.begin(), args.end())); |
4088 | | - return build(builder, state, cond, opBundle); |
| 4067 | + return build(builder, state, cond, ArrayRef<ValueRange>(args), |
| 4068 | + builder.getStrArrayAttr(tag)); |
4089 | 4069 | } |
4090 | 4070 |
|
4091 | 4071 | void LLVM::AssumeOp::build(OpBuilder &builder, OperationState &state, |
|
0 commit comments