llvm-project/llvm/lib/Target/CSKY
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 [MC] Change EndOfStatement "unexpected tokens in .xxx directive " to "expected newline" 2022-06-05 15:11:01 -07: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
CMakeLists.txt [CSKY] Add CSKYTargetObjectFile to support exception handling 2022-03-29 16:05:30 +08:00
CSKY.h [CSKY] Add missing codegen pattern for 16-bit instruction 2022-03-29 16:05:30 +08:00
CSKY.td [CSKY] Add CK800 series ProcessorModel and complete related SubtargetFeatures 2022-02-08 16:02:59 +08:00
CSKYAsmPrinter.cpp [CodeGen] Move instruction predicate verification to emitInstruction 2022-07-14 09:33:28 +01:00
CSKYAsmPrinter.h [CSKY] Enable TargetAsmStreamer/ELFStreamer and support asm directive of csky_attribute 2022-03-08 14:00:38 +08:00
CSKYCallingConv.h
CSKYCallingConv.td
CSKYConstantIslandPass.cpp [Target] use getSubtarget<> instead of static_cast<>(getSubtarget()) 2022-05-26 11:22:41 -07:00
CSKYConstantPoolValue.cpp [CSKY] Ensure a newline at the end of a file (NFC) 2022-01-12 22:11:57 -08:00
CSKYConstantPoolValue.h [CSKY] Lower leaf DAG node such as global symbol, frame address and jumptable, etc. 2022-01-10 14:35:07 +08:00
CSKYFrameLowering.cpp [CSKY] Fix error of underestimated function size by save/restore R15(LR) when we use BSR far jump. 2022-06-01 11:05:19 +08:00
CSKYFrameLowering.h [CSKY] Add codegen of select/br/cmp instruction and some frame lowering infra 2022-01-05 15:59:03 +08:00
CSKYISelDAGToDAG.cpp [CSKY] Support bitcast operation from/to double to/from two GPRs 2022-04-07 18:36:04 +08:00
CSKYISelLowering.cpp [CSKY] support select instruction in floating type 2022-04-08 12:38:50 +08:00
CSKYISelLowering.h [CSKY] Add inline asm constraints and related codegen support 2022-02-07 17:45:37 +08:00
CSKYInstrAlias.td [CSKY] Enhance asm parser and relocation fixup for some special symbol address instruction 2022-03-24 14:14:04 +08:00
CSKYInstrFormats.td [CSKY] Fix some Clang warnings. NFC 2022-04-06 20:09:32 -07:00
CSKYInstrFormats16Instr.td
CSKYInstrFormatsF1.td [CSKY] Add floating operation support including float and double 2022-01-27 15:54:04 +08:00
CSKYInstrFormatsF2.td [CSKY] Add floating operation support including float and double 2022-01-27 15:54:04 +08:00
CSKYInstrInfo.cpp [CSKY] Fix the assert in eliminateFrameIndex when the offset is negative 2022-06-15 09:54:21 +08:00
CSKYInstrInfo.h [CSKY] Fix the assert in eliminateFrameIndex when the offset is negative 2022-06-15 09:54:21 +08:00
CSKYInstrInfo.td [CSKY] Fix the br target operand type in td 2022-07-14 11:27:31 +08:00
CSKYInstrInfo16Instr.td [CSKY] Fix the br target operand type in td 2022-07-14 11:27:31 +08:00
CSKYInstrInfoF1.td [CSKY] Add floating operation support including float and double 2022-01-27 15:54:04 +08:00
CSKYInstrInfoF2.td [CSKY] Add floating operation support including float and double 2022-01-27 15:54:04 +08:00
CSKYMCInstLower.cpp
CSKYMCInstLower.h
CSKYMachineFunctionInfo.h llvm-reduce: Add cloning of target MachineFunctionInfo 2022-06-07 10:14:48 -04:00
CSKYRegisterInfo.cpp [CSKY] Fix the assert in eliminateFrameIndex when the offset is negative 2022-06-15 09:54:21 +08:00
CSKYRegisterInfo.h
CSKYRegisterInfo.td [CSKY] Correct the alignment of FPR register 2022-04-08 14:37:07 +08:00
CSKYSubtarget.cpp Cleanup codegen includes 2022-03-16 08:43:00 +01:00
CSKYSubtarget.h [CSKY] Add CK800 series ProcessorModel and complete related SubtargetFeatures 2022-02-08 16:02:59 +08:00
CSKYTargetMachine.cpp [llvm] Use value_or instead of getValueOr (NFC) 2022-06-18 23:07:11 -07:00
CSKYTargetMachine.h
CSKYTargetObjectFile.cpp [CSKY] Add CSKYTargetObjectFile to support exception handling 2022-03-29 16:05:30 +08:00
CSKYTargetObjectFile.h [CSKY] Add CSKYTargetObjectFile to support exception handling 2022-03-29 16:05:30 +08:00