diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-04-30 21:23:32 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-04-30 21:23:32 +0000 |
commit | ba67d87fe4f0ec9a3d9729f1b0f3b70d85ac8357 (patch) | |
tree | f0eb8ee79cb727d08cb6f1a2a3f497650c9e9fed /include | |
parent | 7afcc6aa270ca51e502de9f826ecdf61568a73b9 (diff) |
getCommonSubClass() - Calculate the largest common sub-class of two register
classes.
This is implemented as a function rather than a method on TargetRegisterClass
because it is symmetric in its arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetRegisterInfo.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h index 16cec2d647..fbb8ffe812 100644 --- a/include/llvm/Target/TargetRegisterInfo.h +++ b/include/llvm/Target/TargetRegisterInfo.h @@ -254,6 +254,10 @@ public: int getCopyCost() const { return CopyCost; } }; +/// 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); /// TargetRegisterInfo base class - We assume that the target defines a static /// array of TargetRegisterDesc objects that represent all of the machine |