[LLVMdev] Breaking changes in *RegisterInfo.td regarding SubRegIndex
ahmed.bougacha at gmail.com
Fri May 31 16:48:01 PDT 2013
I just committed r183020 and r183061, that add Size/Offset information
If you maintain an out-of-tree target, there are a few things to change:
- the SubRegIndex class has a new mandatory argument, representing
the Size (in bits) covered by the index. If it's not meaningful (ex:
same index for different kinds of registers), set it to -1 (though I
believe this isn't the intended use case of indices).
- it also has an optional argument, representing the Offset of the
first bit that can be accessed by the index. It defaults to 0, but,
again, in cases where this doesn't mean anything (a tuple of
non-contiguous registers), set it to -1.
- composed subreg indices are now defined using ComposedSubRegIndex.
The Size and Offset are automatically computed.
For in-tree targets, there should be everything. Notably missing are
some subreg indices in SystemZ and R600, because in both cases they
can represent sub-registers that have different size/offsets (for
example, the high/low elements of an arbitrary tuple). The Size/Offset
aren't used by anything in tree yet, so it's not dramatic anyway.
-- Ahmed Bougacha
More information about the llvm-dev