]> granicus.if.org Git - llvm/commit
[globalisel][tablegen] Simplify named operand/operator lookups and fix a wrong-code...
authorDaniel Sanders <daniel_l_sanders@apple.com>
Sat, 14 Oct 2017 00:31:58 +0000 (00:31 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Sat, 14 Oct 2017 00:31:58 +0000 (00:31 +0000)
commit6648a9bc9dbe4301163d99a912c440fd6689c692
tree09cd0e56697728d9588a8ee46b2fc379c3d6715e
parent9330bcf1ae0ccde630e34a4eec8120dbdd44bcc4
[globalisel][tablegen] Simplify named operand/operator lookups and fix a wrong-code bug this revealed.

Summary:
Operand variable lookups are now performed by the RuleMatcher rather than
searching the whole matcher hierarchy for a match. This revealed a wrong-code
bug that currently affects ARM and X86 where patterns that use a variable more
than once in the match pattern will be imported but won't check that the
operands are identical. This can cause the tablegen-erated matcher to
accept matches that should be rejected.

Depends on D36569

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

Subscribers: aemerson, igorb, llvm-commits, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315780 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/GlobalISel/InstructionSelector.h
include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
test/CodeGen/X86/GlobalISel/select-blsr.mir [new file with mode: 0644]
test/TableGen/GlobalISelEmitter.td
utils/TableGen/GlobalISelEmitter.cpp