Compute lists of sub-regs, super-regs, and overlapping regs.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sun, 12 Jun 2011 03:05:52 +0000 (03:05 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sun, 12 Jun 2011 03:05:52 +0000 (03:05 +0000)
commit026dc223aeef2579d63f395007491e37d6cde3a0
treeabec90e272dbfb4d639a58ab5e95e611909fc692
parentaff232a5941c9ffb7ad52e08f81ad53794fed56b
Compute lists of sub-regs, super-regs, and overlapping regs.

Besides moving structural computations to CodeGenRegisters.cpp, this
also well-defines the order of these lists:

- Sub-register lists come from a pre-order traversal of the graph
  defined by the SubRegs lists in the .td files.

- Super-register lists are topologically ordered so no register comes
  before any of its sub-registers. When the sub-register graph is not a
  tree, independent super-registers appear in numerical order.

- Lists of overlapping registers are ordered according to register
  number.

This reverses the order of the super-regs lists, but nobody was
depending on that. The previous order of the overlaps lists was odd, and
it may have depended on the precise behavior of std::stable_sort.

The old computations are still there, but will be removed shortly.

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