This is an archive of the discontinued LLVM Phabricator instance.

[mlir][NFC] Add a new getStridesAndOffset function
ClosedPublic

Authored by qcolombet on Dec 7 2022, 4:46 AM.

Details

Summary

The new function is a wrapper around the regular getStridesAndOffset that offers a more compact way (as in writing less code) of getting the relevant information.

This method is intended to be used only when it is known that the LogicalResult of the regular getStridesAndOffset must be "succeeded".

This wrapper will assert on that.

Note: I feel we may want to give this function a different name so that it is explicit that it should be used only when we know it is valid. I couldn't come up with a good name though. What do people think?

Diff Detail

Event Timeline

qcolombet created this revision.Dec 7 2022, 4:46 AM
Herald added a project: Restricted Project. · View Herald Transcript
qcolombet requested review of this revision.Dec 7 2022, 4:46 AM
jreiffers accepted this revision.Dec 7 2022, 4:55 AM

Thanks for the cleanup!

This revision is now accepted and ready to land.Dec 7 2022, 4:55 AM
This revision was landed with ongoing or failed builds.Dec 7 2022, 6:06 AM
This revision was automatically updated to reflect the committed changes.