Skip to content

Commit

Permalink
Bump LLVM to b6772e6e2045ab491b41d3767f788250800f97ea. (#4444)
Browse files Browse the repository at this point in the history
This is NFC. The only change is related to the transition from
llvm::None to std::nullopt, so I cleaned those up.

This LLVM commit includes a few additions to the MLIR Python API that
will be good to build on top of.
  • Loading branch information
mikeurbach authored Dec 16, 2022
1 parent acf3e44 commit d0462e7
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/circt/Dialect/FSM/FSMOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def OutputOp : FSMOp<"output", [HasParent<"StateOp">, ReturnLike, Terminator]> {

let arguments = (ins Variadic<AnyType>:$operands);

let builders = [ OpBuilder<(ins), "build($_builder, $_state, llvm::None);"> ];
let builders = [ OpBuilder<(ins), "build($_builder, $_state, std::nullopt);"> ];

let assemblyFormat = [{ attr-dict ($operands^ `:` qualified(type($operands)))? }];

Expand Down
2 changes: 1 addition & 1 deletion include/circt/Dialect/HW/HWStructure.td
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def OutputOp : HWOp<"output", [Terminator, HasParent<"HWModuleOp">,
let arguments = (ins Variadic<AnyType>:$outputs);

let builders = [
OpBuilder<(ins), "build($_builder, $_state, llvm::None);">
OpBuilder<(ins), "build($_builder, $_state, std::nullopt);">
];

let assemblyFormat = "attr-dict ($outputs^ `:` qualified(type($outputs)))?";
Expand Down
2 changes: 1 addition & 1 deletion include/circt/Dialect/Interop/Interop.td
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def ReturnOp : InteropOp<"return", [
let arguments = (ins Variadic<AnyType>:$returnValues);

let builders = [OpBuilder<(ins), [{
build($_builder, $_state, llvm::None);
build($_builder, $_state, std::nullopt);
}]>];

let assemblyFormat = "attr-dict ($returnValues^ `:` type($returnValues))?";
Expand Down
2 changes: 1 addition & 1 deletion include/circt/Dialect/SystemC/SystemCStructure.td
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def ReturnOp : SystemCOp<"cpp.return", [
let arguments = (ins Variadic<AnyType>:$returnValues);

let builders = [OpBuilder<(ins), [{
build($_builder, $_state, llvm::None);
build($_builder, $_state, std::nullopt);
}]>];

let assemblyFormat = "attr-dict ($returnValues^ `:` type($returnValues))?";
Expand Down
4 changes: 2 additions & 2 deletions lib/Dialect/FIRRTL/FIRRTLUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,12 +663,12 @@ circt::firrtl::maybeStringToLocation(StringRef spelling, bool skipParsing,
unsigned lineNo = 0, columnNo = 0;
StringRef filename = decodeLocator(spelling, lineNo, columnNo);
if (filename.empty())
return {false, llvm::None};
return {false, std::nullopt};

// If info locators are ignored, don't actually apply them. We still do all
// the verification above though.
if (skipParsing)
return {true, llvm::None};
return {true, std::nullopt};

/// Return an FileLineColLoc for the specified location, but use a bit of
/// caching to reduce thrasing the MLIRContext.
Expand Down
6 changes: 4 additions & 2 deletions lib/Dialect/MSFT/DeviceDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ void PlacementDB::walkPlacements(
// X loop.
SmallVector<std::pair<size_t, DimYMap>> cols(placements.begin(),
placements.end());
maybeSort(cols, walkOrder.transform([](auto wo) { return wo.columns; }));
maybeSort(cols, llvm::transformOptional(walkOrder,
[](auto wo) { return wo.columns; }));
for (auto colF : cols) {
size_t x = colF.first;
if (x < xmin || x > xmax)
Expand All @@ -388,7 +389,8 @@ void PlacementDB::walkPlacements(

// Y loop.
SmallVector<std::pair<size_t, DimNumMap>> rows(yMap.begin(), yMap.end());
maybeSort(rows, walkOrder.transform([](auto wo) { return wo.rows; }));
maybeSort(rows, llvm::transformOptional(walkOrder,
[](auto wo) { return wo.rows; }));
for (auto rowF : rows) {
size_t y = rowF.first;
if (y < ymin || y > ymax)
Expand Down
2 changes: 1 addition & 1 deletion lib/Dialect/Moore/MooreTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ Optional<Range> PackedDim::getRange() const {
}

Optional<unsigned> PackedDim::getSize() const {
return getRange().transform([](auto r) { return r.size; });
return llvm::transformOptional(getRange(), [](auto r) { return r.size; });
}

const detail::DimStorage *PackedDim::getImpl() const {
Expand Down
2 changes: 1 addition & 1 deletion llvm
Submodule llvm updated 5421 files
2 changes: 1 addition & 1 deletion tools/circt-reduce/Tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ bool Tester::isInteresting(StringRef testCase) const {
// Run the tester.
std::string errMsg;
int result = llvm::sys::ExecuteAndWait(
testScript, testerArgs, /*Env=*/None, /*Redirects=*/None,
testScript, testerArgs, /*Env=*/std::nullopt, /*Redirects=*/std::nullopt,
/*SecondsToWait=*/0, /*MemoryLimit=*/0, &errMsg);
if (result < 0)
llvm::report_fatal_error(
Expand Down

0 comments on commit d0462e7

Please sign in to comment.