Skip to content

Commit

Permalink
Remove feature introduced in c++20 to avoid hard dependence to c++20
Browse files Browse the repository at this point in the history
  • Loading branch information
erwei-xilinx committed Jan 23, 2025
1 parent 1c31263 commit 29be78b
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions mlir/lib/Util/Dependency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,12 +963,17 @@ getAllReadAccessedMemrefOperandsFromOp(Operation *op) {
std::get<2>(entry.second) = strides;
return entry;
};
auto pushMemrefEntryToVector = []<typename T>(T entry,
SmallVector<T> &vector) {
if (!isa<MemRefType>(entry.first.getType()))
return;
vector.push_back(entry);
};
auto pushMemrefEntryToVector =
[](std::pair<Value, std::tuple<SmallVector<Value>, SmallVector<Value>,
SmallVector<Value>>>
entry,
SmallVector<
std::pair<Value, std::tuple<SmallVector<Value>, SmallVector<Value>,
SmallVector<Value>>>> &vector) {
if (!isa<MemRefType>(entry.first.getType()))
return;
vector.push_back(entry);
};
// Below is an incomplete list of common mlir ops that provide interfaces
// allowing for separating read and write accesses in its operands.
if (auto linalgop = dyn_cast<linalg::LinalgOp>(op)) {
Expand Down

0 comments on commit 29be78b

Please sign in to comment.