OSDN Git Service

[globalisel][tablegen] Support zero-instruction emission.
authorDaniel Sanders <daniel_l_sanders@apple.com>
Fri, 11 Aug 2017 15:40:32 +0000 (15:40 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Fri, 11 Aug 2017 15:40:32 +0000 (15:40 +0000)
commit85e8bedc1ae075a5333da48090dfb17cef759b72
tree2ffdc2a9b44942f8b2547a6ffd8e694f586babf6
parent9ac295da5f10f680a3d9f931d9c5ff6ab141e582
[globalisel][tablegen] Support zero-instruction emission.

Summary:
Support the case where an operand of a pattern is also the whole of the
result pattern. In this case the original result and all its uses must be
replaced by the operand. However, register class restrictions can require
a COPY. This patch handles both cases by always emitting the copy and
leaving it for the register allocator to optimize.

Depends on D35833

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Subscribers: javed.absar, kristof.beyls, igorb, llvm-commits

Differential Revision: https://reviews.llvm.org/D36084

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310716 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstructionSelector.cpp
test/CodeGen/AArch64/GlobalISel/select-bitcast.mir
utils/TableGen/GlobalISelEmitter.cpp