]> granicus.if.org Git - llvm/commit
[globalisel][tablegen] Add infrastructure to potentially allow BuildMIAction to choos...
authorDaniel Sanders <daniel_l_sanders@apple.com>
Tue, 31 Oct 2017 18:50:24 +0000 (18:50 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Tue, 31 Oct 2017 18:50:24 +0000 (18:50 +0000)
commit81bdc44b0e315876d9e76e64774472a13ccdc7ce
treeee0658e12a41095bd71471959e8ec21e08424e15
parenteeba4551b80e8e31dcedb2cb5dc38266e8b51bd7
[globalisel][tablegen] Add infrastructure to potentially allow BuildMIAction to choose a mutatable instruction. NFC

Prepare for multiple instruction emission by allowing BuildMIAction to
search for a suitable matcher that will support mutation.

This patch deliberately neglects to add matchers aside from the root to
preserve NFC. That said, it should be noted that until we support mutations
other than just the opcode the chances of finding a non-root instruction
for which canMutate() is true, is essentially zero. Furthermore in the
presence of multi-instruction emission the chances of finding any
instruction for which canMutate() is true is also zero. Nevertheless, we
can't continue to require that all BuildMIAction's consider the root of the match
to be recyclable due to the risk of recycling it twice in the same rule.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317022 91177308-0d34-0410-b5e6-96231b3b80d8
utils/TableGen/GlobalISelEmitter.cpp