diff options
| author | Jeff Niu <jeff@modular.com> | 2024-05-23 10:49:47 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-23 10:49:47 -0700 |
| commit | 264aaa5f9038a7e575b3aa1ae67bceabd65ee13a (patch) | |
| tree | 510d7d03b0985483b253afeef72006f4edb2a88e /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
| parent | 0f6c4d8b0653d75cf944278337e69771857ee4d7 (diff) | |
[mlir][ods] Optimize FoldAdaptor constructor (#93219)
FoldAdaptor is generated as a subclass of the operation's generic
adaptor, which requires an OperationName instance. It called into the
generic base constructor that constructed the OperationName from a
string, requiring a StringMap lookup inside the MLIRContext.
This makes constructing FoldAdaptors really slow, which is a shame
because the `Operation *` is right there. This PR changes GenericAdaptor
constructor from an operation to grab the OperationName directly from
the `Operation *`. In addition, it generates the constructor inline if
the operation doesn't have properties, since otherwise it requires the
definition of the op.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions
