[llvm] e4abfc4 - [CSKY] Fix errors caused by change of compressInst
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 01:01:28 PST 2023
Author: wangpc
Date: 2023-01-18T17:01:16+08:00
New Revision: e4abfc4c3cf47297136bbf06b0f59da50d3f260e
URL: https://github.com/llvm/llvm-project/commit/e4abfc4c3cf47297136bbf06b0f59da50d3f260e
DIFF: https://github.com/llvm/llvm-project/commit/e4abfc4c3cf47297136bbf06b0f59da50d3f260e.diff
LOG: [CSKY] Fix errors caused by change of compressInst
We don't need MCContext since D141951.
Reviewed By: zixuan-wu
Differential Revision: https://reviews.llvm.org/D141995
Added:
Modified:
llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp b/llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
index 01b59d4a509ca..94ef40e658a33 100644
--- a/llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
+++ b/llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
@@ -1747,7 +1747,7 @@ void CSKYAsmParser::emitToStreamer(MCStreamer &S, const MCInst &Inst) {
MCInst CInst;
bool Res = false;
if (EnableCompressedInst)
- Res = compressInst(CInst, Inst, getSTI(), S.getContext());
+ Res = compressInst(CInst, Inst, getSTI());
if (Res)
++CSKYNumInstrsCompressed;
S.emitInstruction((Res ? CInst : Inst), getSTI());
diff --git a/llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp b/llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp
index 49e4b1fa7b6a6..7d121b8d24f05 100644
--- a/llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp
+++ b/llvm/lib/Target/CSKY/CSKYAsmPrinter.cpp
@@ -58,7 +58,7 @@ bool CSKYAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
#include "CSKYGenCompressInstEmitter.inc"
void CSKYAsmPrinter::EmitToStreamer(MCStreamer &S, const MCInst &Inst) {
MCInst CInst;
- bool Res = compressInst(CInst, Inst, *Subtarget, OutStreamer->getContext());
+ bool Res = compressInst(CInst, Inst, *Subtarget);
if (Res)
++CSKYNumInstrsCompressed;
AsmPrinter::EmitToStreamer(*OutStreamer, Res ? CInst : Inst);
More information about the llvm-commits
mailing list