diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-06-08 01:11:03 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-06-08 01:11:03 +0000 |
commit | edb4f7c12a2606f2949b40cec7ec096745d58ad0 (patch) | |
tree | a5aa4c6b98a1832df5f17648bbfe1c22acd2dc9f /lib/Target/AArch64/AArch64RegisterBankInfo.h | |
parent | 5c05d4112bd69fdafb2aab3a6bf704c80c514acf (diff) |
[RegisterBankInfo] Add a size argument for the cost of copy.
The cost of a copy may be different based on how many bits we have to
copy around. E.g., a 8-bit copy may be different than a 32-bit copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/AArch64RegisterBankInfo.h')
-rw-r--r-- | lib/Target/AArch64/AArch64RegisterBankInfo.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Target/AArch64/AArch64RegisterBankInfo.h b/lib/Target/AArch64/AArch64RegisterBankInfo.h index 156f9a0b7d5..69a21ec82cf 100644 --- a/lib/Target/AArch64/AArch64RegisterBankInfo.h +++ b/lib/Target/AArch64/AArch64RegisterBankInfo.h @@ -34,9 +34,13 @@ class AArch64RegisterBankInfo : public RegisterBankInfo { public: AArch64RegisterBankInfo(const TargetRegisterInfo &TRI); /// Get the cost of a copy from \p B to \p A, or put differently, - /// get the cost of A = COPY B. - unsigned copyCost(const RegisterBank &A, - const RegisterBank &B) const override; + /// get the cost of A = COPY B. Since register banks may cover + /// different size, \p Size specifies what will be the size in bits + /// that will be copied around. + /// + /// \note Since this is a copy, both registers have the same size. + unsigned copyCost(const RegisterBank &A, const RegisterBank &B, + unsigned Size) const override; /// Get a register bank that covers \p RC. /// |