OSDN Git Service

Re-commit with some instrumentation: [globalisel][tablegen] Support zero-instruction...
authorDaniel Sanders <daniel_l_sanders@apple.com>
Tue, 15 Aug 2017 13:50:09 +0000 (13:50 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Tue, 15 Aug 2017 13:50:09 +0000 (13:50 +0000)
commitb5378b63e391d27ad4a6ebed1e504b4ca6886624
treeeb26b61e78c2b639705baed9a519091563610680
parent6854d8cdd02a5321a709b722582a3c1cc8c8fa00
Re-commit with some instrumentation: [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.

The previous commit failed on the windows bots and this one is likely to fail
on those same bots. However, the added instrumentation should reveal a particular
isHigherPriorityThan() evaluation which I'm expecting to expose that
these machines are weighing priority of two rules differently from the
non-windows machines.

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@310919 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstructionSelector.cpp
test/CodeGen/AArch64/GlobalISel/select-bitcast.mir
test/TableGen/GlobalISelEmitter.td
utils/TableGen/GlobalISelEmitter.cpp