This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Refactor byteswapped writes
ClosedPublic

Authored by beanz on Aug 1 2023, 10:27 AM.

Details

Summary

This is an extremely small refactoring to writing byte-swapped values
in the PSV data. I've broken the PPC-BE bots a few times with changes
here because of the fragility of how byte-swapping was being done. This
should make it less likely for me to break BE builders in the future.

Diff Detail

Event Timeline

beanz created this revision.Aug 1 2023, 10:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2023, 10:27 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
beanz requested review of this revision.Aug 1 2023, 10:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2023, 10:27 AM
bob80905 added inline comments.Aug 1 2023, 10:46 AM
llvm/lib/MC/DXContainerPSVInfo.cpp
19

Am I understanding this correctly:
This function is only implemented for all integral types, and always returns void?

efriedma added inline comments.
llvm/lib/MC/DXContainerPSVInfo.cpp
20

Please use the existing helpers in EndianStream.h.

beanz updated this revision to Diff 546152.Aug 1 2023, 11:02 AM

Updating to use support::endian::write. Thank you @efriedma!

bob80905 accepted this revision.Aug 1 2023, 11:28 AM
This revision is now accepted and ready to land.Aug 1 2023, 11:28 AM
This revision was automatically updated to reflect the committed changes.
beanz marked an inline comment as done.