Emit register unit lists for each register.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 29 May 2012 23:40:00 +0000 (23:40 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 29 May 2012 23:40:00 +0000 (23:40 +0000)
commitf52baf72c116d9cf8680d25a8e751ce354c7d44b
tree27377be4daa61fc002a16a1a3600ed9ce06a4bac
parent988a089164fe88a9e1c95a5a94f93f377d017f77
Emit register unit lists for each register.

Register units are already used internally in TableGen to compute
register pressure sets and overlapping registers. This patch makes them
available to the code generators.

The register unit lists are differentially encoded so they can be reused
for many related registers. This keeps the total size of the lists below
200 bytes for most targets. ARM has the largest table at 560 bytes.

Add an MCRegUnitIterator for traversing the register unit lists. It
provides an abstract interface so the representation can be changed in
the future without changing all clients.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157650 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCRegisterInfo.h
utils/TableGen/CodeGenRegisters.cpp
utils/TableGen/CodeGenRegisters.h
utils/TableGen/RegisterInfoEmitter.cpp