This is an archive of the discontinued LLVM Phabricator instance.

Store an Identifier instead of a StringRef for the OperationName inside an AbstractOperation (NFC)
ClosedPublic

Authored by mehdi_amini on Sep 1 2020, 5:25 PM.

Details

Summary

Instead of storing a StringRef, we keep an Identifier which otherwise requires a lock on the context to retrieve.
This will allow to get an Identifier for any registered Operation for "free".

Diff Detail

Event Timeline

mehdi_amini created this revision.Sep 1 2020, 5:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2020, 5:25 PM
mehdi_amini requested review of this revision.Sep 1 2020, 5:25 PM
rriddle accepted this revision.Sep 2 2020, 11:33 AM
rriddle added inline comments.
mlir/include/mlir/IR/Identifier.h
71

Naming here should be camelCase.

mlir/include/mlir/IR/Operation.h
61 ↗(On Diff #289331)

I don't think we should provide this, it can be easily accessed from the OperationName.

This revision is now accepted and ready to land.Sep 2 2020, 11:33 AM

Address comments

This revision was landed with ongoing or failed builds.Sep 2 2020, 12:15 PM
This revision was automatically updated to reflect the committed changes.