diff options
author | Andrew Trick <atrick@apple.com> | 2012-04-11 18:16:28 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-04-11 18:16:28 +0000 |
commit | ec14cd7ddc66d47cd7927f18d8c11844c400367e (patch) | |
tree | d5e211ca2188480ea99ee9dd124a05a73b176ef2 /include | |
parent | 1835547ec195c35b3a59bf834f4df942c61a5c53 (diff) | |
download | external_llvm-ec14cd7ddc66d47cd7927f18d8c11844c400367e.zip external_llvm-ec14cd7ddc66d47cd7927f18d8c11844c400367e.tar.gz external_llvm-ec14cd7ddc66d47cd7927f18d8c11844c400367e.tar.bz2 |
TableGen's regpressure: emit per-registerclass weight limits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetRegisterInfo.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h index 48b850e..7d8a46b 100644 --- a/include/llvm/Target/TargetRegisterInfo.h +++ b/include/llvm/Target/TargetRegisterInfo.h @@ -202,6 +202,13 @@ struct TargetRegisterInfoDesc { bool inAllocatableClass; // Register belongs to an allocatable regclass. }; +/// Each TargetRegisterClass has a per register weight, and weight +/// limit which must be less than the limits of its pressure sets. +struct RegClassWeight { + unsigned RegWeigt; + unsigned WeightLimit; +}; + /// TargetRegisterInfo base class - We assume that the target defines a static /// array of TargetRegisterDesc objects that represent all of the machine /// registers that the target has. As such, we simply have to track a pointer @@ -509,7 +516,8 @@ public: } /// Get the weight in units of pressure for this register class. - virtual unsigned getRegClassWeight(const TargetRegisterClass *RC) const = 0; + virtual const RegClassWeight &getRegClassWeight( + const TargetRegisterClass *RC) const = 0; /// Get the number of dimensions of register pressure. virtual unsigned getNumRegPressureSets() const = 0; |