llvm-project/llvm/lib/Target/BPF
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 Cleanup MCParser headers 2022-02-11 10:39:29 +01:00
Disassembler Rename `MCFixedLenDisassembler.h` as `MCDecoderOps.h` 2022-05-15 08:44:58 +08:00
MCTargetDesc [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
TargetInfo
BPF.h Cleanup includes: LLVMTarget 2022-03-10 10:00:29 +01:00
BPF.td
BPFAbstractMemberAccess.cpp [BPF] Handle anon record for CO-RE relocations 2022-07-13 15:16:16 -07:00
BPFAdjustOpt.cpp [BPF] handle unsigned icmp ops in BPFAdjustOpt pass 2022-03-17 16:24:39 -07:00
BPFAsmPrinter.cpp [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
BPFCORE.h [BPF] Introduce support for type match relocations 2022-06-29 18:23:08 -07:00
BPFCallingConv.td
BPFCheckAndAdjustIR.cpp
BPFFrameLowering.cpp
BPFFrameLowering.h
BPFIRPeephole.cpp
BPFISelDAGToDAG.cpp
BPFISelLowering.cpp [BPF] Implement mod operation 2022-05-12 10:59:18 +08:00
BPFISelLowering.h
BPFInstrFormats.td [BPF] Implement mod operation 2022-05-12 10:59:18 +08:00
BPFInstrInfo.cpp [Target] Use MachineBasicBlock::erase (NFC) 2022-06-04 22:41:24 -07:00
BPFInstrInfo.h
BPFInstrInfo.td [BPF] Implement mod operation 2022-05-12 10:59:18 +08:00
BPFMCInstLower.cpp
BPFMCInstLower.h
BPFMIChecking.cpp Cleanup codegen includes 2022-03-16 08:43:00 +01:00
BPFMIPeephole.cpp [llvm] Call *set::insert without checking membership first (NFC) 2022-06-18 10:22:05 -07:00
BPFMISimplifyPatchable.cpp [BPF] Fix a bug in BPFMISimplifyPatchable pass 2022-04-19 15:24:26 -07:00
BPFPreserveDIType.cpp Reduce dependencies on llvm/BinaryFormat/Dwarf.h 2022-02-04 11:44:03 +01:00
BPFRegisterInfo.cpp
BPFRegisterInfo.h
BPFRegisterInfo.td
BPFSelectionDAGInfo.cpp
BPFSelectionDAGInfo.h
BPFSubtarget.cpp [Target] Remove redundant member initialization (NFC) 2022-01-06 22:01:44 -08:00
BPFSubtarget.h
BPFTargetMachine.cpp [llvm] Use value_or instead of getValueOr (NFC) 2022-06-18 23:07:11 -07:00
BPFTargetMachine.h mark getTargetTransformInfo and getTargetIRAnalysis as const 2022-02-25 14:30:44 -05:00
BPFTargetTransformInfo.h BPF: support inlining __builtin_memcmp intrinsic call 2022-03-29 15:03:26 -07:00
BTF.def [BPF] Add BTF 64bit enum value support 2022-06-06 11:35:50 -07:00
BTF.h [llvm] Make lib/Target/BPF/BTF.h self-contained 2022-07-13 20:54:26 -07:00
BTFDebug.cpp [llvm] Call *set::insert without checking membership first (NFC) 2022-06-18 10:22:05 -07:00
BTFDebug.h [BPF] Add BTF 64bit enum value support 2022-06-06 11:35:50 -07:00
CMakeLists.txt