]> granicus.if.org Git - llvm/commit
[globalisel][tablegen] Compute available feature bits correctly.
authorDaniel Sanders <daniel_l_sanders@apple.com>
Sat, 29 Apr 2017 17:30:09 +0000 (17:30 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Sat, 29 Apr 2017 17:30:09 +0000 (17:30 +0000)
commitf31ac9d1e8c0e0ffcba84a24f1e8689e5724fba3
treed0e66c5a61d118c1bea686ffd385073af94323e2
parent6c030ac85c2aeb636b57269202968c93ac1a5304
[globalisel][tablegen] Compute available feature bits correctly.

Summary:
Predicate<> now has a field to indicate how often it must be recomputed.
Currently, there are two frequencies, per-module (RecomputePerFunction==0)
and per-function (RecomputePerFunction==1). Per-function predicates are
currently recomputed more frequently than necessary since the only predicate
in this category is cheap to test. Per-module predicates are now computed in
getSubtargetImpl() while per-function predicates are computed in selectImpl().

Tablegen now manages the PredicateBitset internally. It should only be
necessary to add the required includes.

Also fixed a problem revealed by the test case where
constrainSelectedInstRegOperands() would attempt to tie operands that
BuildMI had already tied.

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

Reviewed By: rovka

Subscribers: kristof.beyls, igorb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301750 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
include/llvm/CodeGen/GlobalISel/InstructionSelector.h
include/llvm/Target/Target.td
lib/CodeGen/GlobalISel/InstructionSelector.cpp
lib/Target/AArch64/AArch64InstrInfo.td
lib/Target/AArch64/AArch64InstructionSelector.cpp
lib/Target/AArch64/AArch64Subtarget.cpp
lib/Target/AArch64/AArch64Subtarget.h
lib/Target/AArch64/AArch64TargetMachine.cpp
lib/Target/X86/X86InstrInfo.td
lib/Target/X86/X86InstructionSelector.cpp
lib/Target/X86/X86Subtarget.cpp
lib/Target/X86/X86Subtarget.h
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/X86/GlobalISel/select-inc.mir [new file with mode: 0644]
test/TableGen/GlobalISelEmitter.td
unittests/Target/AArch64/InstSizes.cpp
utils/TableGen/GlobalISelEmitter.cpp
utils/TableGen/SubtargetFeatureInfo.cpp
utils/TableGen/SubtargetFeatureInfo.h