OSDN Git Service

[globalisel][tablegen] Fuse the generated tables together.
authorDaniel Sanders <daniel_l_sanders@apple.com>
Wed, 26 Jul 2017 10:20:56 +0000 (10:20 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Wed, 26 Jul 2017 10:20:56 +0000 (10:20 +0000)
commit18698d1733557d9e92ab4cf626a5dea9bca044f4
tree3a891ff3fd1758499638ac08a01ce08a11d8470d
parent44a9a971ae0e089df0c351f2a0f998146a72c54e
[globalisel][tablegen] Fuse the generated tables together.

Summary:
Now that we have control flow in place, fuse the per-rule tables into a
single table. This is a compile-time saving at this point. However, this will
also enable the optimization of a table so that similar instructions can be
tested together, reducing the time spent on the matching the code.

This is NFC in terms of externally visible behaviour but some internals have
changed slightly. State.MIs is no longer reset between each rule that is
attempted because it's not necessary to do so. As a consequence of this the
restriction on the order that instructions are added to State.MIs has been
relaxed to only affect recorded instructions that require new elements to be
added to the vector. GIM_RecordInsn can now write to any element from 1 to
State.MIs.size() instead of just State.MIs.size().

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

Reviewed By: rovka

Subscribers: kristof.beyls, igorb, llvm-commits

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

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