Skip to content

Commit c16f4cc

Browse files
authored
Carrying-over previous reverts: - llvm/llvm-project@ee070d0 and llvm/llvm-project@a1c2a71: after making the necessary C++ fixes to unbreak the build (https://gist.github.com/bjacob/a132e70ea0f7ceba4554f352a45bcd1c), these break bufferization and eliminate-empty-tensors tests that I don't understand. Corresponding Bazel changes also reverted: llvm/llvm-project@2a41350, llvm/llvm-project@8fc20bf. - llvm/llvm-project@eb694b2 and llvm/llvm-project@e33f13b : these break arith.trunci with destination type i1, which occurs at least in the jit_globals.mlir test. --------- Signed-off-by: yzhang93 <[email protected]>
1 parent 8074a80 commit c16f4cc

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

compiler/src/iree/compiler/Codegen/Common/FlattenMemRefs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static std::tuple<Value, OpFoldResult, SmallVector<OpFoldResult>, OpFoldResult,
6565
OpFoldResult>
6666
getFlatOffsetAndStrides(OpBuilder &rewriter, Location loc, Value source,
6767
ArrayRef<OpFoldResult> subOffsets,
68-
ArrayRef<OpFoldResult> subStrides = std::nullopt) {
68+
ArrayRef<OpFoldResult> subStrides = {}) {
6969
auto sourceType = cast<MemRefType>(source.getType());
7070
auto sourceRank = static_cast<unsigned>(sourceType.getRank());
7171

compiler/src/iree/compiler/Dialect/VM/IR/VMOpFolders.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2335,8 +2335,8 @@ static TypedAttr constFoldBinaryCmpFOp(Attribute rawLhs, Attribute rawRhs,
23352335
calculate);
23362336
if (!elementResult)
23372337
return {};
2338-
auto resultType = lhs.getType().clone(
2339-
std::nullopt, IntegerType::get(lhs.getContext(), 32));
2338+
auto resultType =
2339+
lhs.getType().clone({}, IntegerType::get(lhs.getContext(), 32));
23402340
return DenseElementsAttr::get(resultType, elementResult);
23412341
} else if (auto lhs = llvm::dyn_cast_if_present<ElementsAttr>(rawLhs)) {
23422342
auto rhs = llvm::dyn_cast_if_present<ElementsAttr>(rawRhs);
@@ -2353,8 +2353,8 @@ static TypedAttr constFoldBinaryCmpFOp(Attribute rawLhs, Attribute rawRhs,
23532353
++lhsIt;
23542354
++rhsIt;
23552355
}
2356-
auto resultType = lhs.getShapedType().clone(
2357-
std::nullopt, IntegerType::get(lhs.getContext(), 32));
2356+
auto resultType =
2357+
lhs.getShapedType().clone({}, IntegerType::get(lhs.getContext(), 32));
23582358
return DenseElementsAttr::get(resultType, resultAttrs);
23592359
}
23602360
return {};

compiler/src/iree/compiler/Dialect/VM/IR/VMOps.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void FuncOp::build(OpBuilder &builder, OperationState &result, StringRef name,
121121
assert(type.getNumInputs() == argAttrs.size() &&
122122
"expected as many argument attribute lists as arguments");
123123
call_interface_impl::addArgAndResultAttrs(builder, result, argAttrs,
124-
/*resultAttrs=*/std::nullopt,
124+
/*resultAttrs=*/{},
125125
getArgAttrsAttrName(result.name),
126126
getResAttrsAttrName(result.name));
127127
}
@@ -290,7 +290,7 @@ ParseResult ImportOp::parse(OpAsmParser &parser, OperationState &result) {
290290
<< "invalid result type list";
291291
}
292292
call_interface_impl::addArgAndResultAttrs(builder, result, argAttrs,
293-
/*resultAttrs=*/std::nullopt,
293+
/*resultAttrs=*/{},
294294
getArgAttrsAttrName(result.name),
295295
getResAttrsAttrName(result.name));
296296
if (failed(parser.parseOptionalAttrDictWithKeyword(result.attributes))) {
@@ -359,7 +359,7 @@ void ImportOp::build(OpBuilder &builder, OperationState &result, StringRef name,
359359
assert(type.getNumInputs() == argAttrs.size() &&
360360
"expected as many argument attribute lists as arguments");
361361
call_interface_impl::addArgAndResultAttrs(builder, result, argAttrs,
362-
/*resultAttrs=*/std::nullopt,
362+
/*resultAttrs=*/{},
363363
getArgAttrsAttrName(result.name),
364364
getResAttrsAttrName(result.name));
365365
}

compiler/src/iree/compiler/Reducer/Framework/Oracle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ bool Oracle::isInteresting(WorkItem &workItem) {
7373

7474
std::string errMsg;
7575
int exitCode = llvm::sys::ExecuteAndWait(testScript, testerArgs, std::nullopt,
76-
std::nullopt, 0, 0, &errMsg);
76+
{}, 0, 0, &errMsg);
7777

7878
if (exitCode < 0) {
7979
llvm::report_fatal_error(llvm::Twine("Failed to run oracle: ") + errMsg);

third_party/llvm-project

Submodule llvm-project updated 1549 files

0 commit comments

Comments
 (0)