OSDN Git Service

[GlobalISel][InstructionSelect] Switching MatchTable over opcodes, perf patch 4
authorRoman Tereshin <rtereshin@apple.com>
Tue, 22 May 2018 19:37:59 +0000 (19:37 +0000)
committerRoman Tereshin <rtereshin@apple.com>
Tue, 22 May 2018 19:37:59 +0000 (19:37 +0000)
commit792c45b7cd6667c5e90fe837d5268ea5aff93fbc
treefabe3f61853e149d54d0a527fc5312749ed8ee77
parentccf5904d1cf290f7cedface29cf5c4a4708abf85
[GlobalISel][InstructionSelect] Switching MatchTable over opcodes, perf patch 4

This patch continues a series of patches started by r332907 (reapplied
as r332917)

In this commit we introduce a new matching opcode GIM_SwitchOpcode
that implements a jump table over opcodes and start emitting them for
root instructions.

This is expected to decrease time GlobalISel spends in its
InstructionSelect pass by roughly 20% for an -O0 build as measured on
sqlite3-amalgamation (http://sqlite.org/download.html) targeting
AArch64.

To some degree, we assume here that the opcodes form a dense set,
which is true at the moment for all upstream targets given the
limitations of our rule importing mechanism.

It might not be true for out of tree targets, specifically due to
pseudo's. If so, we might noticeably increase the size of the
MatchTable with this patch due to padding zeros. This will be
addressed later.

Reviewers: qcolombet, dsanders, bogner, aemerson, javed.absar

Reviewed By: qcolombet

Subscribers: rovka, llvm-commits, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333017 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/GlobalISel/InstructionSelector.h
include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
test/TableGen/GlobalISelEmitter.td
utils/TableGen/GlobalISelEmitter.cpp