llvm-project/llvm/lib/Target/M68k
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
..
AsmParser [M68k] Add missing include 2022-02-11 10:17:39 +00:00
Disassembler [M68k][Disassembler] Cleanup unused variables. NFC 2022-05-21 17:23:51 -07:00
GISel Fix M68k missing header errors. 2022-03-10 13:18:20 +00:00
MCTargetDesc [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
TargetInfo
CMakeLists.txt [TableGen] Remove code beads 2022-05-30 14:27:37 +08:00
M68k.h [M68k][NFC] Add missing #endif comment 2022-01-12 13:07:57 +08:00
M68k.td
M68kAsmPrinter.cpp [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
M68kAsmPrinter.h [M68k][NFC] Add missing #endif comment 2022-01-12 13:07:57 +08:00
M68kCallingConv.h [M68k][NFC] Add missing #endif comment 2022-01-12 13:07:57 +08:00
M68kCallingConv.td
M68kCollapseMOVEMPass.cpp [Target] use getSubtarget<> instead of static_cast<>(getSubtarget()) 2022-05-26 11:22:41 -07:00
M68kExpandPseudo.cpp [Target] use getSubtarget<> instead of static_cast<>(getSubtarget()) 2022-05-26 11:22:41 -07:00
M68kFrameLowering.cpp [M68k][NFC] Use Register instead of unsigned int 2022-01-13 15:49:39 +08:00
M68kFrameLowering.h [M68k][NFC] Add missing #endif comment 2022-01-12 13:07:57 +08:00
M68kISelDAGToDAG.cpp [M68k] Instruction selection to choose neg x when mul x -1 (Fix issue 48588) 2022-06-03 13:20:30 +08:00
M68kISelLowering.cpp Target: Use getPointerSizeInBits instead of 8 * getPointerSize 2022-03-31 18:49:23 -04:00
M68kISelLowering.h m68k: Support bit shifts on 64-bit integers 2022-02-12 06:11:49 +08:00
M68kInstrArithmetic.td [M68k][Disassembler] Fix decoding conflict 2022-05-19 09:10:50 +08:00
M68kInstrBits.td [M68k] Adopt VarLenCodeEmitter for bits instructions 2022-02-17 14:16:19 -08:00
M68kInstrBuilder.h [NFC] Fix endif comments to match with include guard 2022-01-07 15:52:59 +08:00
M68kInstrCompiler.td
M68kInstrControl.td Revert "Revert "[M68k] Adopt VarLenCodeEmitter for control instructions"" 2022-02-16 17:41:49 +08:00
M68kInstrData.td [M68k][Disassembler] Fix decoding conflict 2022-05-22 10:35:12 +08:00
M68kInstrFormats.td [M68k] Adopt VarLenCodeEmitter for move instructions 2022-04-04 23:02:27 -07:00
M68kInstrInfo.cpp [TableGen] Remove code beads 2022-05-30 14:27:37 +08:00
M68kInstrInfo.h [M68k][NFC] Add missing #endif comment 2022-01-12 13:07:57 +08:00
M68kInstrInfo.td [M68k] Adopt VarLenCodeEmitter for move instructions 2022-04-04 23:02:27 -07:00
M68kInstrShiftRotate.td [M68k] Adopt VarLenCodeEmitter for shift / rotate instructions 2022-04-03 22:52:32 -07:00
M68kMCInstLower.cpp
M68kMCInstLower.h [M68k][NFC] Add missing #endif comment 2022-01-12 13:07:57 +08:00
M68kMachineFunction.cpp llvm-reduce: Add cloning of target MachineFunctionInfo 2022-06-07 10:14:48 -04:00
M68kMachineFunction.h M68k: Fix build 2022-06-08 09:26:27 -04:00
M68kRegisterInfo.cpp Fix M68k missing header errors. 2022-03-10 13:18:20 +00:00
M68kRegisterInfo.h m68k: Support bit shifts on 64-bit integers 2022-02-12 06:11:49 +08:00
M68kRegisterInfo.td
M68kSchedule.td
M68kSubtarget.cpp
M68kSubtarget.h [nfc][codegen] Move RegisterBank[Info].h under CodeGen 2022-03-01 21:53:25 -08:00
M68kTargetMachine.cpp
M68kTargetMachine.h [M68k][NFC] Add missing #endif comment 2022-01-12 13:07:57 +08:00
M68kTargetObjectFile.cpp
M68kTargetObjectFile.h [M68k][NFC] Add missing #endif comment 2022-01-12 13:07:57 +08:00