OSDN Git Service

Switch TargetRegisterInfo::getSubReg() to use a lookup table.
authorJim Grosbach <grosbach@apple.com>
Wed, 29 Feb 2012 20:31:17 +0000 (20:31 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 29 Feb 2012 20:31:17 +0000 (20:31 +0000)
commit95b38aea959449461a9245b0a199758982125f01
treee60e928a4b15ec57b990161b45c70a12a76b5f02
parentacbceeae4d7bdfbbc3437c60a5a3e26449888a15
Switch TargetRegisterInfo::getSubReg() to use a lookup table.

Instead of nested switch statements, use a lookup table. On ARM, this replaces
a 23k (x86_64 release build) function with a 16k table. Its not unlikely to
be faster, as well.

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