Add TRI::getSubClassWithSubReg(RC, Idx) function.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 5 Oct 2011 00:35:49 +0000 (00:35 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 5 Oct 2011 00:35:49 +0000 (00:35 +0000)
commit845d2c0c776abce551d16f7b1b7dc1f4d4df1a27
tree204c79f6f26643a182bb869965b36795d212421e
parent2a85015313b585c2a6d2a59d5bfc99a5ebe88f30
Add TRI::getSubClassWithSubReg(RC, Idx) function.

This function is used to constrain a register class to a sub-class that
supports the given sub-register index.

For example, getSubClassWithSubReg(GR32, sub_8bit) -> GR32_ABCD.

The function will be used to compute register classes when emitting
INSERT_SUBREG and EXTRACT_SUBREG nodes and for register class inflation
of sub-register operations.

The version provided by TableGen is usually adequate, but targets can
override.

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