[MLIR] [Python] Make Attribute and Type hashable
authorJohn Demme <john.demme@microsoft.com>
Thu, 23 Sep 2021 02:50:22 +0000 (19:50 -0700)
committerJohn Demme <john.demme@microsoft.com>
Thu, 23 Sep 2021 02:59:03 +0000 (19:59 -0700)
commit47cc166bc023b497bdffe0964d80f15eaee8b7da
tree836be375c462845bf3df8f52f6d7eb5372f2f384
parent13207a21a64d3a0f1537cc99efe91d757d51f46c
[MLIR] [Python] Make Attribute and Type hashable

Enables putting types and attributes in sets and in dicts as keys.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D110301
mlir/lib/Bindings/Python/IRCore.cpp
mlir/test/python/ir/attributes.py
mlir/test/python/ir/builtin_types.py