llvm-project/llvm/lib/Target/Lanai
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 [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
Disassembler [MCDisassembler] Disambiguate Size parameter in tryAddingSymbolicOperand() 2022-05-25 13:44:32 -07:00
MCTargetDesc [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
TargetInfo
CMakeLists.txt
Lanai.h
Lanai.td
LanaiAluCode.h
LanaiAsmPrinter.cpp [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
LanaiCallingConv.td
LanaiCondCode.h
LanaiDelaySlotFiller.cpp
LanaiFrameLowering.cpp
LanaiFrameLowering.h
LanaiISelDAGToDAG.cpp
LanaiISelLowering.cpp [NFC][CodeGen] Add a setTargetDAGCombine use ArrayRef 2022-03-29 09:53:24 +08:00
LanaiISelLowering.h
LanaiInstrFormats.td
LanaiInstrInfo.cpp [Target] Use MachineBasicBlock::erase (NFC) 2022-06-04 22:41:24 -07:00
LanaiInstrInfo.h
LanaiInstrInfo.td
LanaiMCInstLower.cpp
LanaiMCInstLower.h
LanaiMachineFunctionInfo.cpp llvm-reduce: Add cloning of target MachineFunctionInfo 2022-06-07 10:14:48 -04:00
LanaiMachineFunctionInfo.h llvm-reduce: Add cloning of target MachineFunctionInfo 2022-06-07 10:14:48 -04:00
LanaiMemAluCombiner.cpp
LanaiRegisterInfo.cpp [NFC] Use Register instead of unsigned 2022-01-19 20:17:04 +08:00
LanaiRegisterInfo.h
LanaiRegisterInfo.td
LanaiSchedule.td
LanaiSelectionDAGInfo.cpp
LanaiSelectionDAGInfo.h
LanaiSubtarget.cpp [Target] Remove redundant member initialization (NFC) 2022-01-06 22:01:44 -08:00
LanaiSubtarget.h
LanaiTargetMachine.cpp [llvm] Use value_or instead of getValueOr (NFC) 2022-06-18 23:07:11 -07:00
LanaiTargetMachine.h mark getTargetTransformInfo and getTargetIRAnalysis as const 2022-02-25 14:30:44 -05:00
LanaiTargetObjectFile.cpp
LanaiTargetObjectFile.h
LanaiTargetTransformInfo.h