diff --git a/mlir/include/mlir/IR/Value.h b/mlir/include/mlir/IR/Value.h --- a/mlir/include/mlir/IR/Value.h +++ b/mlir/include/mlir/IR/Value.h @@ -220,6 +220,9 @@ } friend ::llvm::hash_code hash_value(Value arg); + bool operator<(const Value &rhs) const { + return ownerAndKind.getOpaqueValue() < rhs.ownerAndKind.getOpaqueValue(); + } protected: /// Returns true if the given operation result can be packed inline.