This is an archive of the discontinued LLVM Phabricator instance.

Eliminate all uses of Identifier::is() in the source tree, this doesn't remove the definition of it (yet). NFC.
ClosedPublic

Authored by lattner on Apr 13 2020, 11:19 AM.

Diff Detail

Event Timeline

lattner created this revision.Apr 13 2020, 11:19 AM
rriddle accepted this revision.Apr 13 2020, 11:23 AM
rriddle added inline comments.
mlir/include/mlir/IR/Identifier.h
85–86

nit: Can we use /// here?

mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
830

Do you even need the lambda anymore, i.e., could you use llvm::is_contained now?

898

Same here.

mlir/test/lib/Dialect/Test/TestDialect.cpp
411

Same here.

mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
619

Same here

This revision is now accepted and ready to land.Apr 13 2020, 11:23 AM
lattner marked 4 inline comments as done.Apr 13 2020, 11:49 AM
lattner added inline comments.
mlir/include/mlir/IR/Identifier.h
85–86

This is a general comment, not a doc comment for that operator.

mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
830

I don't think that is_contained works for any of these, because it is only comparing against the first element of the pair, not against the element of the sequence.

That said, I think the real issue here is that attribute lists are being processed pervasively as ArrayRef<NamedAttributes>, which doesn't have useful helper functions. Defining a proper type for this could make sense, but that is beyond the scope of this patch.

This revision was automatically updated to reflect the committed changes.
lattner marked 2 inline comments as done.