diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-09-19 01:35:01 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-09-19 01:35:01 +0000 |
commit | a3ca3149f2b59c512c50aab330b5a0d8efddeffa (patch) | |
tree | faf1320f6091e715c283687ab2a5247ca2e74d46 /include/llvm | |
parent | babbe27007b6b418706d4fe1de3092c8a88fd314 (diff) | |
download | external_llvm-a3ca3149f2b59c512c50aab330b5a0d8efddeffa.zip external_llvm-a3ca3149f2b59c512c50aab330b5a0d8efddeffa.tar.gz external_llvm-a3ca3149f2b59c512c50aab330b5a0d8efddeffa.tar.bz2 |
Add CopyCost to TargetRegisterClass. This specifies the cost of copying a value
between two registers in the specific class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Target/MRegisterInfo.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/llvm/Target/MRegisterInfo.h b/include/llvm/Target/MRegisterInfo.h index a4846d8..dab5d20 100644 --- a/include/llvm/Target/MRegisterInfo.h +++ b/include/llvm/Target/MRegisterInfo.h @@ -70,6 +70,7 @@ private: const sc_iterator SubRegClasses; const sc_iterator SuperRegClasses; const unsigned RegSize, Alignment; // Size & Alignment of register in bytes + const int CopyCost; const iterator RegsBegin, RegsEnd; public: TargetRegisterClass(unsigned id, @@ -78,10 +79,11 @@ public: const TargetRegisterClass * const *supcs, const TargetRegisterClass * const *subregcs, const TargetRegisterClass * const *superregcs, - unsigned RS, unsigned Al, iterator RB, iterator RE) + unsigned RS, unsigned Al, int CC, + iterator RB, iterator RE) : ID(id), VTs(vts), SubClasses(subcs), SuperClasses(supcs), SubRegClasses(subregcs), SuperRegClasses(superregcs), - RegSize(RS), Alignment(Al), RegsBegin(RB), RegsEnd(RE) {} + RegSize(RS), Alignment(Al), CopyCost(CC), RegsBegin(RB), RegsEnd(RE) {} virtual ~TargetRegisterClass() {} // Allow subclasses /// getID() - Return the register class ID number. @@ -258,6 +260,10 @@ public: /// getAlignment - Return the minimum required alignment for a register of /// this class. unsigned getAlignment() const { return Alignment; } + + /// getCopyCost - Return the cost of copying a value between two registers in + /// this class. + int getCopyCost() const { return CopyCost; } }; |