[PATCH] D78781: [mlir][DictionaryAttr] Add a new getWithSorted and use it when possible
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 23 19:02:08 PDT 2020
rriddle created this revision.
rriddle added reviewers: jpienaar, mehdi_amini.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen.
Herald added a project: LLVM.
The elements of a DictionaryAttr are sorted by name. In many situations, e.g NamedAttributeList, we can guarantee that the elements are sorted on construction and remove the need to perform extra checks. In places with lots of calls to attribute methods, this leads to a good performance improvement.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78781
Files:
mlir/include/mlir/IR/Attributes.h
mlir/lib/IR/Attributes.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78781.259781.patch
Type: text/x-patch
Size: 6595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200424/580e5f37/attachment-0001.bin>
More information about the llvm-commits
mailing list