[AArch64][RegisterBankInfo] Use the statically computed mappings for COPY
authorQuentin Colombet <qcolombet@apple.com>
Sat, 14 Oct 2017 00:43:48 +0000 (00:43 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Sat, 14 Oct 2017 00:43:48 +0000 (00:43 +0000)
commitdc2da06c55f052c14c146217d6edc7a7aa1b73e1
treec6b055646864cd871d95c000503650928e55a02b
parentbfa9e2cae7ad18ab62f933acb0d2cd5d281741cb
[AArch64][RegisterBankInfo] Use the statically computed mappings for COPY

We use to resort on the generic implementation to get the mappings for
COPYs. The generic implementation resorts on table lookup and
dynamically allocated objects to get the valid mappings.

Given we already know how to map G_BITCAST and have the static mappings
for them, use that code path for COPY as well. This is much more
efficient.

Improve the compile time of RegBankSelect by up to 20%.

Note: When we eventually generate all the mappings via TableGen, we
wouldn't have to do that dance to shave compile time. The intent of this
change was to make sure that moving to static structure really pays off.

NFC.

llvm-svn: 315781
llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp