[RegisterBankInfo] Change the default mapping for Copy and PHI.
authorQuentin Colombet <qcolombet@apple.com>
Thu, 29 Sep 2016 19:51:46 +0000 (19:51 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Thu, 29 Sep 2016 19:51:46 +0000 (19:51 +0000)
commit1b01677e61677d63cfe9739e65d8d4ba55b623c4
tree032ba8eca044f93ce7d6e73b7b06fa6d037a2ed5
parent93a9a8397acd9ad2ac65462725a8b794cc5b28ce
[RegisterBankInfo] Change the default mapping for Copy and PHI.

Instead of producing a mapping for all the operands, we only generate a
mapping for the definition. Indeed, the other operands are not
constrained by the instruction and thus, we should leave the choice to
the actual definition to do the right thing.

In pratice this is almost NFC, but with one advantage. We will have only
one instance of OperandsMapping for each copy and phi that map to one
register bank instead of one different instance for each different
number of operands for each copy and phi.

llvm-svn: 282756
llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp