llvm-project/llvm/lib/Target/CSKY/MCTargetDesc
David Green 3e0bf1c7a9 [CodeGen] Move instruction predicate verification to emitInstruction
D25618 added a method to verify the instruction predicates for an
emitted instruction, through verifyInstructionPredicates added into
<Target>MCCodeEmitter::encodeInstruction. This is a very useful idea,
but the implementation inside MCCodeEmitter made it only fire for object
files, not assembly which most of the llvm test suite uses.

This patch moves the code into the <Target>_MC::verifyInstructionPredicates
method, inside the InstrInfo.  The allows it to be called from other
places, such as in this patch where it is called from the
<Target>AsmPrinter::emitInstruction methods which should trigger for
both assembly and object files. It can also be called from other places
such as verifyInstruction, but that is not done here (it tends to catch
errors earlier, but in reality just shows all the mir tests that have
incorrect feature predicates). The interface was also simplified
slightly, moving computeAvailableFeatures into the function so that it
does not need to be called externally.

The ARM, AMDGPU (but not R600), AVR, Mips and X86 backends all currently
show errors in the test-suite, so have been disabled with FIXME
comments.

Recommitted with some fixes for the leftover MCII variables in release
builds.

Differential Revision: https://reviews.llvm.org/D129506
2022-07-14 09:33:28 +01:00
..
CMakeLists.txt [CSKY] Enable TargetAsmStreamer/ELFStreamer and support asm directive of csky_attribute 2022-03-08 14:00:38 +08:00
CSKYAsmBackend.cpp [CSKY] AsmBackend: Wrap Inst.dump() in LLVM_DEBUG 2022-03-31 23:27:10 -07:00
CSKYAsmBackend.h [CSKY] Enhance asm parser and relocation fixup for some special symbol address instruction 2022-03-24 14:14:04 +08:00
CSKYBaseInfo.h
CSKYELFObjectWriter.cpp [CSKY] Fix some Clang warnings. NFC 2022-04-06 20:09:32 -07:00
CSKYELFStreamer.cpp [MC] De-capitalize SwitchSection. NFC 2022-06-10 22:50:55 -07:00
CSKYELFStreamer.h [CSKY] Fix some Clang warnings. NFC 2022-04-06 20:09:32 -07:00
CSKYFixupKinds.h
CSKYInstPrinter.cpp [CSKY] Add CSKYDisassembler.cpp to construct objdump 2022-02-08 16:02:59 +08:00
CSKYInstPrinter.h
CSKYMCAsmInfo.cpp
CSKYMCAsmInfo.h
CSKYMCCodeEmitter.cpp [CSKY] Enhance asm parser and relocation fixup for some special symbol address instruction 2022-03-24 14:14:04 +08:00
CSKYMCCodeEmitter.h [CSKY] Enhance asm parser and relocation fixup for some special symbol address instruction 2022-03-24 14:14:04 +08:00
CSKYMCExpr.cpp [CSKY] Add missing header include in cpp files because of LLVM headers refactor work 2022-02-10 13:41:55 +08:00
CSKYMCExpr.h
CSKYMCTargetDesc.cpp [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
CSKYMCTargetDesc.h [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
CSKYTargetStreamer.cpp [MC] De-capitalize SwitchSection. NFC 2022-06-10 22:50:55 -07:00
CSKYTargetStreamer.h [CSKY] Enable TargetAsmStreamer/ELFStreamer and support asm directive of csky_attribute 2022-03-08 14:00:38 +08:00