NFC: Change DictionaryAttr::get(StringRef) to use binary search instead of a linear...
authorRiver Riddle <riverriddle@google.com>
Tue, 12 Nov 2019 21:03:39 +0000 (13:03 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Tue, 12 Nov 2019 21:04:14 +0000 (13:04 -0800)
commit8082e3a687da76929e469ec76f86957c534f59db
tree93ffa090b22d1768fa1e79b3c248f4507d2e398c
parent9d985141ef848f352c444cb950096c1e7ccadad9
NFC: Change DictionaryAttr::get(StringRef) to use binary search instead of a linear scan.

The elements of a DictionaryAttr are guaranteed to be sorted by name, so we can use a more efficient lookup when searching for an attribute.

PiperOrigin-RevId: 280035488
mlir/lib/IR/Attributes.cpp