forked from OSchip/llvm-project
e4e31e19bb
Operations currently rely on the string name of attributes during attribute lookup/removal/replacement, in build methods, and more. This unfortunately means that some of the most used APIs in MLIR require string comparisons, additional hashing(+mutex locking) to construct Identifiers, and more. This revision remedies this by caching identifiers for all of the attributes of the operation in its corresponding AbstractOperation. Just updating the autogenerated usages brings up to a 15% reduction in compile time, greatly reducing the cost of interacting with the attributes of an operation. This number can grow even higher as we use these methods in handwritten C++ code. Methods for accessing these cached identifiers are exposed via `<attr-name>AttrName` methods on the derived operation class. Moving forward, users should generally use these methods over raw strings when an attribute name is necessary. Differential Revision: https://reviews.llvm.org/D104167 |
||
---|---|---|
.. | ||
Analysis | ||
Dialect | ||
ExecutionEngine | ||
IR | ||
Interfaces | ||
Pass | ||
Rewrite | ||
SDBM | ||
Support | ||
TableGen | ||
CMakeLists.txt |