summaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetRegisterInfo.h
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-04-11 18:16:28 +0000
committerAndrew Trick <atrick@apple.com>2012-04-11 18:16:28 +0000
commitec14cd7ddc66d47cd7927f18d8c11844c400367e (patch)
treed5e211ca2188480ea99ee9dd124a05a73b176ef2 /include/llvm/Target/TargetRegisterInfo.h
parent1835547ec195c35b3a59bf834f4df942c61a5c53 (diff)
downloadllvm-ec14cd7ddc66d47cd7927f18d8c11844c400367e.tar.gz
llvm-ec14cd7ddc66d47cd7927f18d8c11844c400367e.tar.bz2
llvm-ec14cd7ddc66d47cd7927f18d8c11844c400367e.tar.xz
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/llvm/Target/TargetRegisterInfo.h')
-rw-r--r--include/llvm/Target/TargetRegisterInfo.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h
index 48b850e49f..7d8a46b49a 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;