[all-commits] [llvm/llvm-project] 0d6530: [AVR][NFC] Merge AVRMCCodeEmitter::emitInstruction...
Jianjian Guan via All-commits
all-commits at lists.llvm.org
Mon Jul 17 19:58:00 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0d6530728ff202849a5d30d0db4e1fdb5b11ce7b
https://github.com/llvm/llvm-project/commit/0d6530728ff202849a5d30d0db4e1fdb5b11ce7b
Author: Jianjian GUAN <jacquesguan at me.com>
Date: 2023-07-18 (Tue, 18 Jul 2023)
Changed paths:
M llvm/lib/Target/AVR/MCTargetDesc/AVRMCCodeEmitter.cpp
M llvm/lib/Target/AVR/MCTargetDesc/AVRMCCodeEmitter.h
Log Message:
-----------
[AVR][NFC] Merge AVRMCCodeEmitter::emitInstruction into AVRMCCodeEmitter::encodeInstruction.
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.
Reviewed By: benshi001
Differential Revision: https://reviews.llvm.org/D155426
More information about the All-commits
mailing list