diff options
author | Andrew Trick <atrick@apple.com> | 2013-06-21 18:32:58 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2013-06-21 18:32:58 +0000 |
commit | 1f8b48ab3262bd5623ecbda7b0c024884e8169d3 (patch) | |
tree | 5b5c541c9346838f09f413d72760f997059b49ab /include/llvm/CodeGen | |
parent | 84569698f01bcb49afe5b6140bf0d61cf4f3cf5a (diff) | |
download | external_llvm-1f8b48ab3262bd5623ecbda7b0c024884e8169d3.zip external_llvm-1f8b48ab3262bd5623ecbda7b0c024884e8169d3.tar.gz external_llvm-1f8b48ab3262bd5623ecbda7b0c024884e8169d3.tar.bz2 |
MI-Sched: Adjust regpressure limits for reserved regs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184564 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/RegisterClassInfo.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/RegisterClassInfo.h b/include/llvm/CodeGen/RegisterClassInfo.h index 3ad22e6..9ec12bd 100644 --- a/include/llvm/CodeGen/RegisterClassInfo.h +++ b/include/llvm/CodeGen/RegisterClassInfo.h @@ -62,6 +62,8 @@ class RegisterClassInfo { // Reserved registers in the current MF. BitVector Reserved; + OwningArrayPtr<unsigned> PSetLimits; + // Compute all information about RC. void compute(const TargetRegisterClass *RC) const; @@ -126,8 +128,19 @@ public: unsigned getLastCostChange(const TargetRegisterClass *RC) { return get(RC).LastCostChange; } + + /// Get the register unit limit for the given pressure set index. + /// + /// RegisterClassInfo adjusts this limit for reserved registers. + unsigned getRegPressureSetLimit(unsigned Idx) const { + if (!PSetLimits[Idx]) + PSetLimits[Idx] = computePSetLimit(Idx); + return PSetLimits[Idx]; + } + +protected: + unsigned computePSetLimit(unsigned Idx) const; }; } // end namespace llvm #endif - |