[globalisel][tablegen] Add support for multi-insn emission
authorDaniel Sanders <daniel_l_sanders@apple.com>
Wed, 1 Nov 2017 19:57:57 +0000 (19:57 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Wed, 1 Nov 2017 19:57:57 +0000 (19:57 +0000)
commit9cbe7c7f9348762c59c42fcad54df742180786bd
tree88d566b177b37791376c0adc519dc4b00a553206
parent7b861f08cd007bcdb18c6d2895ecc4b17b686d06
[globalisel][tablegen] Add support for multi-insn emission

The importer will now accept nested instructions in the result pattern such as
(ADDWrr $a, (SUBWrr $b, $c)). This is only valid when the nested instruction
def's a single vreg and the parent instruction consumes a single vreg where a
nested instruction is specified. The importer will automatically create a vreg
to connect the two using the type information from the pattern. This vreg will
be constrained to the register classes given in the instruction definitions*.

* REG_SEQUENCE is explicitly rejected because of this. The definition doesn't
  constrain to a register class and it therefore needs special handling.

llvm-svn: 317117
llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h
llvm/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
llvm/test/CodeGen/AArch64/GlobalISel/select-bitcast-bigendian.mir [new file with mode: 0644]
llvm/test/CodeGen/AArch64/GlobalISel/select-intrinsic-crypto-aesmc.mir [new file with mode: 0644]
llvm/test/TableGen/GlobalISelEmitter.td
llvm/utils/TableGen/GlobalISelEmitter.cpp