Store sub-class lists as a bit vector.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 30 Sep 2011 22:19:07 +0000 (22:19 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 30 Sep 2011 22:19:07 +0000 (22:19 +0000)
commitc8e2bb68bbc4a71cc10084c8f89565b9f05e12ef
tree448a32becddd445e4db4fc224447d7de768021a7
parentb7359e384f7d15d3e24b3763ed66546e497fe213
Store sub-class lists as a bit vector.

This uses less memory and it reduces the complexity of sub-class
operations:

- hasSubClassEq() and friends become O(1) instead of O(N).

- getCommonSubClass() becomes O(N) instead of O(N^2).

In the future, TableGen will infer register classes.  This makes it
cheap to add them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140898 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetRegisterInfo.h
lib/Target/ARM/ARMBaseRegisterInfo.cpp
lib/Target/TargetRegisterInfo.cpp
lib/Target/X86/X86RegisterInfo.cpp
utils/TableGen/RegisterInfoEmitter.cpp