This is an archive of the discontinued LLVM Phabricator instance.

[AVR][NFC] Merge AVRMCCodeEmitter::emitInstruction into AVRMCCodeEmitter::encodeInstruction.
ClosedPublic

Authored by jacquesguan on Jul 17 2023, 1:14 AM.

Details

Summary

The reasons are:
1, AVRMCCodeEmitter::emitInstruction has only one use which is AVRMCCodeEmitter::encodeInstruction, and the parameter STI is not used in this function. I think it might be copied from other target.
2, We do have AVRAsmPrinter::emitInstruction, and it would invoke AVRMCCodeEmitter::encodeInstruction in its calling chain, so if we call AVRMCCodeEmitter::emitInstruction in AVRMCCodeEmitter::encodeInstruction, it would be confusing.

Diff Detail

Event Timeline

jacquesguan created this revision.Jul 17 2023, 1:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 17 2023, 1:14 AM
jacquesguan requested review of this revision.Jul 17 2023, 1:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 17 2023, 1:14 AM
benshi001 accepted this revision.Jul 17 2023, 1:31 AM

LGTM。

It would be better if the commit message can be

[AVR][NFC] Merge AVRMCCodeEmitter::emitInstruction into AVRMCCodeEmitter::encodeInstruction

The reasons are
1. ...
2. ...
This revision is now accepted and ready to land.Jul 17 2023, 1:31 AM
jacquesguan retitled this revision from [AVR][NFC] Merge emitInstruction into encodeInstruction. to [AVR][NFC] Merge AVRMCCodeEmitter::emitInstruction into AVRMCCodeEmitter::encodeInstruction..Jul 17 2023, 2:08 AM
jacquesguan edited the summary of this revision. (Show Details)
This revision was landed with ongoing or failed builds.Jul 17 2023, 7:57 PM
This revision was automatically updated to reflect the committed changes.