[TableGen] Examine entire subreg compositions to detect ambiguity
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Thu, 29 Nov 2018 18:20:08 +0000 (18:20 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Thu, 29 Nov 2018 18:20:08 +0000 (18:20 +0000)
commita26a848da3c45f58abce5578a5f710734e9ee2cf
treeaf6b43689a7b29b2e1f05adf8c7a5c3c9a623d0e
parent4fe0080984899c35a27e673a098abff183a1c77e
[TableGen] Examine entire subreg compositions to detect ambiguity

When tablegen detects that there exist two subregister compositions that
result in the same value for some register, it will emit a warning. This
kind of an overlap in compositions should only happen when it is caused
by a user-defined composition. It can happen, however, that the user-
defined composition is not identically equal to another one, but it does
produce the same value for one or more registers. In such cases suppress
the warning.
This patch is to silence the warning when building the System Z backend
after D50725.

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

llvm-svn: 347894
llvm/test/TableGen/ambiguous-composition.td [new file with mode: 0644]
llvm/utils/TableGen/CodeGenRegisters.cpp