[llvm] 2dc16fb - [RISCV] Duplicate pseudo expansion comment to RISCVMCCodeEmitter
Jessica Clarke via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 15 02:54:17 PDT 2020
Author: Jessica Clarke
Date: 2020-07-15T10:52:42+01:00
New Revision: 2dc16fbdf0f24b0b9fd529932e7ee0d1960fc8b0
URL: https://github.com/llvm/llvm-project/commit/2dc16fbdf0f24b0b9fd529932e7ee0d1960fc8b0
DIFF: https://github.com/llvm/llvm-project/commit/2dc16fbdf0f24b0b9fd529932e7ee0d1960fc8b0.diff
LOG: [RISCV] Duplicate pseudo expansion comment to RISCVMCCodeEmitter
Follow-on from D77443. Although we're not fixing any of these
pseudo-instructions, the potential for them to be out of sync still
exists.
Added:
Modified:
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
index ae13c00565c4..816206c477df 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
@@ -189,6 +189,9 @@ void RISCVMCCodeEmitter::encodeInstruction(const MCInst &MI, raw_ostream &OS,
// Get byte count of instruction.
unsigned Size = Desc.getSize();
+ // RISCVInstrInfo::getInstSizeInBytes hard-codes the number of expanded
+ // instructions for each pseudo, and must be updated when adding new pseudos
+ // or changing existing ones.
if (MI.getOpcode() == RISCV::PseudoCALLReg ||
MI.getOpcode() == RISCV::PseudoCALL ||
MI.getOpcode() == RISCV::PseudoTAIL ||
More information about the llvm-commits
mailing list