This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Store segment sizes in std::array
ClosedPublic

Authored by gysit on Aug 2 2023, 6:27 AM.

Details

Summary

This revision uses std::array instead of normal c arrays to store the
operand and result segment sizes. This is a follow up to
https://reviews.llvm.org/D155919, which converted the operand and result
segment sizes to properties. Its use of c arrays triggered warnings in
downstream projects due to the direct comparison of c arrays. This
revision fixes the warnings using std::arrays that implement a
proper comparison operator, which compares the array elements rather
that the array pointers.

Note: it seems the comparison operator is effectively dead code for now.
It still seems useful to fix the warning and ensure the comparison works
as expected assume someone starts using it at some point in time.

Diff Detail

Event Timeline

gysit created this revision.Aug 2 2023, 6:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2023, 6:27 AM
gysit requested review of this revision.Aug 2 2023, 6:27 AM
mehdi_amini accepted this revision.Aug 2 2023, 2:47 PM
This revision is now accepted and ready to land.Aug 2 2023, 2:47 PM
This revision was automatically updated to reflect the committed changes.