summaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenRegisters.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-11 19:01:01 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-11 19:01:01 +0000
commit79e2045531cb4d1978be42591e9254c38a463d30 (patch)
tree713d5c56474358def3f6b7d154651e59e12b403a /utils/TableGen/CodeGenRegisters.h
parent2a2e9d54e95f01eaa5626dcdf57950e9e6f95f2c (diff)
downloadllvm-79e2045531cb4d1978be42591e9254c38a463d30.tar.gz
llvm-79e2045531cb4d1978be42591e9254c38a463d30.tar.bz2
llvm-79e2045531cb4d1978be42591e9254c38a463d30.tar.xz
Defer computation of SuperRegs.
Don't compute the SuperRegs list until the sub-register graph is completely finished. This guarantees that the list of super-registers is properly topologically ordered, and has no duplicates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenRegisters.h')
-rw-r--r--utils/TableGen/CodeGenRegisters.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenRegisters.h b/utils/TableGen/CodeGenRegisters.h
index 23cc53932d..f5413b6a74 100644
--- a/utils/TableGen/CodeGenRegisters.h
+++ b/utils/TableGen/CodeGenRegisters.h
@@ -112,6 +112,10 @@ namespace llvm {
// Compute extra sub-registers by combining the existing sub-registers.
void computeSecondarySubRegs(CodeGenRegBank&);
+ // Add this as a super-register to all sub-registers after the sub-register
+ // graph has been built.
+ void computeSuperRegs();
+
const SubRegMap &getSubRegs() const {
assert(SubRegsComplete && "Must precompute sub-registers");
return SubRegs;
@@ -169,6 +173,7 @@ namespace llvm {
private:
bool SubRegsComplete;
+ bool SuperRegsComplete;
// The sub-registers explicit in the .td file form a tree.
SmallVector<CodeGenSubRegIndex*, 8> ExplicitSubRegIndices;