mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-02 08:26:29 +00:00
Hoisted some loop invariant smallvector lookups out of a MachineLICM loop
llvm-svn: 147127
This commit is contained in:
parent
b3756d8e4d
commit
2c77045084
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user