aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/CodeGenRegisters.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen/CodeGenRegisters.h')
-rw-r--r--llvm/utils/TableGen/CodeGenRegisters.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/CodeGenRegisters.h b/llvm/utils/TableGen/CodeGenRegisters.h
index 5228e6518fe5..6a0696011a40 100644
--- a/llvm/utils/TableGen/CodeGenRegisters.h
+++ b/llvm/utils/TableGen/CodeGenRegisters.h
@@ -151,7 +151,7 @@ namespace llvm {
struct CodeGenRegister {
Record *TheDef;
unsigned EnumValue;
- unsigned CostPerUse;
+ std::vector<int64_t> CostPerUse;
bool CoveredBySubRegs;
bool HasDisjunctSubRegs;
bool Artificial;
@@ -738,9 +738,8 @@ namespace llvm {
// Get the sum of unit weights.
unsigned getRegUnitSetWeight(const std::vector<unsigned> &Units) const {
unsigned Weight = 0;
- for (std::vector<unsigned>::const_iterator
- I = Units.begin(), E = Units.end(); I != E; ++I)
- Weight += getRegUnit(*I).Weight;
+ for (unsigned Unit : Units)
+ Weight += getRegUnit(Unit).Weight;
return Weight;
}