Page MenuHomePhabricator

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

Authored by NikolaPrica on Wed, Oct 30, 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.Wed, Oct 30, 9:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Oct 30, 9:32 AM
aprantl accepted this revision.Wed, Oct 30, 10:04 AM
aprantl added a reviewer: t.p.northover.

LGTM.

This revision is now accepted and ready to land.Wed, Oct 30, 10:05 AM
vsk accepted this revision.Wed, Oct 30, 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.Thu, Oct 31, 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.