diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-09-30 22:18:51 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-09-30 22:18:51 +0000 |
commit | e27e1ca3c90b69e78242c98a669337f84ccded7f (patch) | |
tree | 46c5577b0314d95b12d2d0a32ad58725458f6403 /include | |
parent | f9a4bb78dadc12c7c1e604c6f17b63a71305c2ca (diff) | |
download | llvm-e27e1ca3c90b69e78242c98a669337f84ccded7f.tar.gz llvm-e27e1ca3c90b69e78242c98a669337f84ccded7f.tar.bz2 llvm-e27e1ca3c90b69e78242c98a669337f84ccded7f.tar.xz |
Move getCommonSubClass() into TRI.
It will soon need the context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140896 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/LiveStackAnalysis.h | 2 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineRegisterInfo.h | 2 | ||||
-rw-r--r-- | include/llvm/Target/TargetRegisterInfo.h | 11 |
3 files changed, 10 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/LiveStackAnalysis.h b/include/llvm/CodeGen/LiveStackAnalysis.h index 8a8dcaf572..86c4d7c110 100644 --- a/include/llvm/CodeGen/LiveStackAnalysis.h +++ b/include/llvm/CodeGen/LiveStackAnalysis.h @@ -25,6 +25,8 @@ namespace llvm { class LiveStacks : public MachineFunctionPass { + const TargetRegisterInfo *TRI; + /// Special pool allocator for VNInfo's (LiveInterval val#). /// VNInfo::Allocator VNInfoAllocator; diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h index db9352ff88..3866b2650d 100644 --- a/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/include/llvm/CodeGen/MachineRegisterInfo.h @@ -25,6 +25,8 @@ namespace llvm { /// registers, including vreg register classes, use/def chains for registers, /// etc. class MachineRegisterInfo { + const TargetRegisterInfo *const TRI; + /// IsSSA - True when the machine function is in SSA form and virtual /// registers have a single def. bool IsSSA; diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h index 60cead6bac..e0e40054d2 100644 --- a/include/llvm/Target/TargetRegisterInfo.h +++ b/include/llvm/Target/TargetRegisterInfo.h @@ -481,6 +481,12 @@ public: return RegClassBegin[i]; } + /// getCommonSubClass - find the largest common subclass of A and B. Return + /// NULL if there is no common subclass. + const TargetRegisterClass * + getCommonSubClass(const TargetRegisterClass *A, + const TargetRegisterClass *B) const; + /// getPointerRegClass - Returns a TargetRegisterClass used for pointer /// values. If a target supports multiple different pointer register classes, /// kind specifies which one is indicated. @@ -701,11 +707,6 @@ struct VirtReg2IndexFunctor : public std::unary_function<unsigned, unsigned> { } }; -/// getCommonSubClass - find the largest common subclass of A and B. Return NULL -/// if there is no common subclass. -const TargetRegisterClass *getCommonSubClass(const TargetRegisterClass *A, - const TargetRegisterClass *B); - /// PrintReg - Helper class for printing registers on a raw_ostream. /// Prints virtual and physical registers with or without a TRI instance. /// |