[ARM][MC] Move information about variadic register defs into tablegen
authorOliver Stannard <oliver.stannard@arm.com>
Mon, 3 Dec 2018 10:32:42 +0000 (10:32 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Mon, 3 Dec 2018 10:32:42 +0000 (10:32 +0000)
commit4cf35b4ab0bd34f23a986a2dc6b2fafc953f434f
tree989f30cf88875938637802bdabbfda3e5cce5e2d
parentc588110f1340d997fb18f4fbbc7d363dc150cd71
[ARM][MC] Move information about variadic register defs into tablegen

Currently, variadic operands on an MCInst are assumed to be uses,
because they come after the defs. However, this is not always the case,
for example the Arm/Thumb LDM instructions write to a variable number of
registers.

This adds a property of instruction definitions which can be used to
mark variadic operands as defs. This only affects MCInst, because
MachineInstruction already tracks use/def per operand in each instance
of the instruction, so can already represent this.

This property can then be checked in MCInstrDesc, allowing us to remove
some special cases in ARMAsmParser::isITBlockTerminator.

Differential revision: https://reviews.llvm.org/D54853

llvm-svn: 348114
llvm/include/llvm/MC/MCInstrDesc.h
llvm/include/llvm/Target/Target.td
llvm/lib/MC/MCInstrDesc.cpp
llvm/lib/Target/ARM/ARMInstrInfo.td
llvm/lib/Target/ARM/ARMInstrThumb.td
llvm/lib/Target/ARM/ARMInstrThumb2.td
llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/utils/TableGen/CodeGenInstruction.cpp
llvm/utils/TableGen/CodeGenInstruction.h
llvm/utils/TableGen/InstrDocsEmitter.cpp
llvm/utils/TableGen/InstrInfoEmitter.cpp