This is an archive of the discontinued LLVM Phabricator instance.

[TII] Use optional destination and source pair as a return value (NFC)
ClosedPublic

Authored by NikolaPrica on Oct 30 2019, 9:31 AM.

Details

Summary

Refactor usage of isCopyInstrImpl, isCopyInstr and isAddImmediate methods to return optional machine operand pair of destination and source registers.

Diff Detail

Event Timeline

NikolaPrica created this revision.Oct 30 2019, 9:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 30 2019, 9:32 AM
aprantl accepted this revision.Oct 30 2019, 10:04 AM
aprantl added a reviewer: t.p.northover.

LGTM.

This revision is now accepted and ready to land.Oct 30 2019, 10:05 AM
vsk accepted this revision.Oct 30 2019, 10:06 AM

Lgtm, thanks for cleaning this up.

This revision was automatically updated to reflect the committed changes.

@NikolaPrica This is failing on MSVC builds - do you have a fix or should I revert?

This revision is now accepted and ready to land.Oct 31 2019, 11:32 AM

Thanks @RKSimon !

DestSourcePair was not is_trivially_copyable with MSVC toolchain so I've updated its members to be pointers instead of references.

This revision was automatically updated to reflect the committed changes.