llvm-project/llvm/lib/Target/Hexagon/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
HexagonAsmBackend.cpp Cleanup LLVMMC headers 2022-02-09 11:09:17 +01:00
HexagonBaseInfo.h [Hexagon] Introduce Hexagon v69 ISA 2021-12-23 08:46:03 -08:00
HexagonELFObjectWriter.cpp
HexagonFixupKinds.h
HexagonInstPrinter.cpp
HexagonInstPrinter.h
HexagonMCAsmInfo.cpp [Hexagon] Enable IAS in the Hexagon backend 2022-06-03 18:15:12 -04:00
HexagonMCAsmInfo.h
HexagonMCChecker.cpp [llvm] Remove unneeded cl::ZeroOrMore for cl::opt options. NFC 2022-06-03 21:59:05 -07:00
HexagonMCChecker.h [Hexagon] Reject accumulating on vd.tmp 2022-01-07 11:13:19 -08:00
HexagonMCCodeEmitter.cpp [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
HexagonMCCodeEmitter.h [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
HexagonMCCompound.cpp [Hexagon] Some compound opportunities missed in presence of branches 2022-01-06 14:16:23 -08:00
HexagonMCDuplexInfo.cpp [Hexagon] Duplex error: wrong branch hint 2022-01-07 12:04:01 -08:00
HexagonMCELFStreamer.cpp [MC] De-capitalize SwitchSection. NFC 2022-06-10 22:50:55 -07:00
HexagonMCELFStreamer.h
HexagonMCExpr.cpp Cleanup LLVMMC headers 2022-02-09 11:09:17 +01:00
HexagonMCExpr.h
HexagonMCInstrInfo.cpp [Hexagon] Extract condition into function, NFC 2022-01-07 12:35:12 -08:00
HexagonMCInstrInfo.h [Hexagon] Extract condition into function, NFC 2022-01-07 12:35:12 -08:00
HexagonMCShuffler.cpp [Hexagon] s/Fatal/ReportErrors/ 2022-01-07 08:27:34 -08:00
HexagonMCShuffler.h [Hexagon] s/Fatal/ReportErrors/ 2022-01-07 08:27:34 -08:00
HexagonMCTargetDesc.cpp [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
HexagonMCTargetDesc.h [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
HexagonShuffler.cpp Don't use Optional::hasValue (NFC) 2022-06-20 20:17:57 -07:00
HexagonShuffler.h [Hexagon] Show slot resources for errors 2022-01-07 08:27:33 -08:00