This is an archive of the discontinued LLVM Phabricator instance.

[NFC][compiler-rt] Factor out __mulo[sdt]i3 implementations to .inc file
ClosedPublic

Authored by atrosinenko on Aug 20 2020, 7:13 AM.

Details

Summary

The existing implementations are almost identical except for width of the integer type.

Factor them out to int_mulo_impl.inc for better maintainability.

The following command may help understanding the changes:

diff int_mulo_impl.inc \
     <(git show master:./mulosi4.c | sed 's/si_int/fixint_t/g')

The si and di variants has three lines different (with two of them being comments) and ti has a bit larger diff.

Note: this patch is almost identical to D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file.

Diff Detail

Event Timeline

atrosinenko created this revision.Aug 20 2020, 7:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2020, 7:13 AM
Herald added subscribers: Restricted Project, dberris. · View Herald Transcript
atrosinenko requested review of this revision.Aug 20 2020, 7:13 AM

Explicitly mark .inc file as a C source like is already done for almost all *_impl.inc files.

MaskRay accepted this revision.Aug 21 2020, 8:57 AM

LGTM, but let's give others a chance to comment.

This revision is now accepted and ready to land.Aug 21 2020, 8:57 AM
This revision was landed with ongoing or failed builds.Aug 27 2020, 4:36 AM
This revision was automatically updated to reflect the committed changes.

Uploaded because it was already approved and no other review comments received since then. Anyway, please feel free to request followup changes if needed.