OSDN Git Service

Implement getSubRegIndex as a linear search on the SubRegTable instead of using a...
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 29 Feb 2012 23:46:50 +0000 (23:46 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 29 Feb 2012 23:46:50 +0000 (23:46 +0000)
commit6c449ebbe6b5e9909ee7a5673b4892d30b9c3ce8
treed354bf06be589c57b5d0523811ae03071d9b84b4
parent8bee081a2cc6a84de125525215fffb4cc1cbe12a
Implement getSubRegIndex as a linear search on the SubRegTable instead of using a big switch.

- The search bounds are constant, in the worst case (ARM target) it will scan over 30 uint16_ts.
- This method isn't very hot, I had problems finding a testcase where it's called more than a dozen of times (no perf impact).

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