[Mlir-commits] [mlir] 8297306 - [MLIR] Fix build breakage due to 5c5af910fefbea943a11452b63e2424e5f823470
Uday Bondhugula
llvmlistbot at llvm.org
Wed Aug 10 17:32:24 PDT 2022
Author: Uday Bondhugula
Date: 2022-08-11T05:58:38+05:30
New Revision: 82973067acb1b92de1e0176b8407c65f152c320a
URL: https://github.com/llvm/llvm-project/commit/82973067acb1b92de1e0176b8407c65f152c320a
DIFF: https://github.com/llvm/llvm-project/commit/82973067acb1b92de1e0176b8407c65f152c320a.diff
LOG: [MLIR] Fix build breakage due to 5c5af910fefbea943a11452b63e2424e5f823470
Fix build breakage due to 5c5af910fefbea943a11452b63e2424e5f823470.
```commit 5c5af910fefbea943a11452b63e2424e5f823470
Author: Jeff Niu <jeff at modular.com>
Date: Tue Aug 9 22:07:35 2022 -0400
[mlir][LLVMIR] "Modernize" Insert/ExtractValueOp ```
results in
```lib/Conversion/LLVMCommon/MemRefBuilder.cpp:170:70: error: call of overloaded ‘makeArrayRef<int64_t>(<brace-enclosed initializer list>)’ is ambiguous
llvm::makeArrayRef<int64_t>({kStridePosInMemRefDescriptor,
pos}));
llvm/include/llvm/ADT/ArrayRef.h:505:15: note: candidate: ‘llvm::ArrayRef<T> llvm::makeArrayRef(const std::vector<T>&) [with T = long int]’
ArrayRef<T> makeArrayRef(const std::vector<T> &Vec) {
^~~~~~~~~~~~
llvm/include/llvm/ADT/ArrayRef.h:516:37: note: candidate: ‘llvm::ArrayRef<T> llvm::makeArrayRef(const llvm::ArrayRef<T>&) [with T = long int]’
template <typename T> ArrayRef<T> makeArrayRef(const ArrayRef<T> &Vec) {
^
Differential Revision: https://reviews.llvm.org/D131637
Added:
Modified:
mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp
mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp b/mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp
index 1081635ea9b0a..a65ac51c31c63 100644
--- a/mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp
+++ b/mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp
@@ -125,8 +125,7 @@ void MemRefDescriptor::setConstantOffset(OpBuilder &builder, Location loc,
/// Builds IR extracting the pos-th size from the descriptor.
Value MemRefDescriptor::size(OpBuilder &builder, Location loc, unsigned pos) {
return builder.create<LLVM::ExtractValueOp>(
- loc, value,
- llvm::makeArrayRef<int64_t>({kSizePosInMemRefDescriptor, pos}));
+ loc, value, ArrayRef<int64_t>({kSizePosInMemRefDescriptor, pos}));
}
Value MemRefDescriptor::size(OpBuilder &builder, Location loc, Value pos,
@@ -153,8 +152,7 @@ Value MemRefDescriptor::size(OpBuilder &builder, Location loc, Value pos,
void MemRefDescriptor::setSize(OpBuilder &builder, Location loc, unsigned pos,
Value size) {
value = builder.create<LLVM::InsertValueOp>(
- loc, value, size,
- llvm::makeArrayRef<int64_t>({kSizePosInMemRefDescriptor, pos}));
+ loc, value, size, ArrayRef<int64_t>({kSizePosInMemRefDescriptor, pos}));
}
void MemRefDescriptor::setConstantSize(OpBuilder &builder, Location loc,
@@ -166,8 +164,7 @@ void MemRefDescriptor::setConstantSize(OpBuilder &builder, Location loc,
/// Builds IR extracting the pos-th stride from the descriptor.
Value MemRefDescriptor::stride(OpBuilder &builder, Location loc, unsigned pos) {
return builder.create<LLVM::ExtractValueOp>(
- loc, value,
- llvm::makeArrayRef<int64_t>({kStridePosInMemRefDescriptor, pos}));
+ loc, value, ArrayRef<int64_t>({kStridePosInMemRefDescriptor, pos}));
}
/// Builds IR inserting the pos-th stride into the descriptor
@@ -175,7 +172,7 @@ void MemRefDescriptor::setStride(OpBuilder &builder, Location loc, unsigned pos,
Value stride) {
value = builder.create<LLVM::InsertValueOp>(
loc, value, stride,
- llvm::makeArrayRef<int64_t>({kStridePosInMemRefDescriptor, pos}));
+ ArrayRef<int64_t>({kStridePosInMemRefDescriptor, pos}));
}
void MemRefDescriptor::setConstantStride(OpBuilder &builder, Location loc,
diff --git a/mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp b/mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
index c15dafd14f32e..aefe6e539faea 100644
--- a/mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
+++ b/mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
@@ -700,7 +700,7 @@ class ExecutionModePattern
auto attr = values.getValue()[i];
Value entry = rewriter.create<LLVM::ConstantOp>(loc, llvmI32Type, attr);
structValue = rewriter.create<LLVM::InsertValueOp>(
- loc, structValue, entry, llvm::makeArrayRef<int64_t>({1, i}));
+ loc, structValue, entry, ArrayRef<int64_t>({1, i}));
}
rewriter.create<LLVM::ReturnOp>(loc, ArrayRef<Value>({structValue}));
rewriter.eraseOp(op);
More information about the Mlir-commits
mailing list