This is an archive of the discontinued LLVM Phabricator instance.

Finish renaming getOperandSegmentSizeAttr() from `operand_segment_sizes` to `operandSegmentSizes`
ClosedPublic

Authored by mehdi_amini on Aug 4 2023, 10:26 PM.

Details

Summary

This renaming started with the native ODS support for properties, this is completing it.

A mass automated textual rename seems safe for most codebases.
Drop also the ods prefix to keep the accessors the same as they were before
this change:
properties.odsOperandSegmentSizes
reverts back to:
properties.operandSegementSizes

The ODS prefix was creating divergence between all the places and make it harder to
be consistent.

Diff Detail

Event Timeline

mehdi_amini created this revision.Aug 4 2023, 10:26 PM
Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a reviewer: kuhar. · View Herald Transcript
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
mehdi_amini requested review of this revision.Aug 4 2023, 10:26 PM

Looks mechanical and making things consistent, seems still a mix of property and attribute and not sure if on purpose/follow up cleanup.

mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
876–877

Are these still attributes here?

strip out dead code from Linalg interface

mehdi_amini added inline comments.Aug 6 2023, 10:32 PM
mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
876–877

This was dead code, but inherent attributes stored as properties are still attributes :)
Technically we need to migrate all uses of setAttr to setInherentAttr instead in the codebase for now this all "just works"

jpienaar accepted this revision.Aug 9 2023, 12:17 PM

Looks good to me, thanks!

mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
1300

Prefix with FIXME or TODO to make it easier to discover ?

1473

So this is moving from one back compat to the next?

This revision is now accepted and ready to land.Aug 9 2023, 12:17 PM
mehdi_amini added inline comments.Aug 9 2023, 12:49 PM
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
1473

The comparison does not change, it was already testing for the two names, but now the one formatted on the next line is reversed.

mehdi_amini marked an inline comment as done.Aug 9 2023, 12:54 PM
This revision was landed with ongoing or failed builds.Aug 9 2023, 7:38 PM
This revision was automatically updated to reflect the committed changes.