mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 21:34:23 +00:00
Hoisted some loop invariant smallvector lookups out of a MachineLICM loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147127 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dcc557f146
commit
3cfecf5cc2
@ -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…
x
Reference in New Issue
Block a user