This is an archive of the discontinued LLVM Phabricator instance.

[MachineCSE] Use isAsCheapAsAMove in TargetInstrInfo
AbandonedPublic

Authored by pcwang-thead on Nov 15 2021, 4:14 AM.

Details

Summary

Use target dependent isAsCheapAsAMove in TargetInstrInfo
instead of the default implementation in MachineInstr.

Diff Detail

Event Timeline

pcwang-thead requested review of this revision.Nov 15 2021, 4:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 15 2021, 4:14 AM
lkail added a comment.Nov 15 2021, 4:30 AM

IIUC, this shouldn't be an NFC change, please provide test cases.

IIUC, this shouldn't be an NFC change, please provide test cases.

I haven't found any cases, but I think it's obvious we should use the target dependent one.

The default implementation of TargetInstrInfo.isAsCheapAsAMove is just a call to MachineInstr.isAsCheapAsAMove, but targets for different archs may override it.

Herald added a project: Restricted Project. · View Herald TranscriptOct 27 2022, 2:03 AM