1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Hoisted some loop invariant smallvector lookups out of a MachineLICM loop

llvm-svn: 147127
This commit is contained in:
Pete Cooper 2011-12-22 02:13:25 +00:00
parent b3756d8e4d
commit 2c77045084

View File

@ -1036,9 +1036,11 @@ bool MachineLICM::CanCauseHighRegPressure(DenseMap<unsigned, int> &Cost) {
continue;
unsigned RCId = CI->first;
unsigned Limit = RegLimit[RCId];
int Cost = CI->second;
for (unsigned i = BackTrace.size(); i != 0; --i) {
SmallVector<unsigned, 8> &RP = BackTrace[i-1];
if (RP[RCId] + CI->second >= RegLimit[RCId])
if (RP[RCId] + Cost >= Limit)
return true;
}
}