diff options
author | Pete Cooper <peter_cooper@apple.com> | 2011-12-22 02:13:25 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2011-12-22 02:13:25 +0000 |
commit | 1c3b1efa58a0365a4e0a2a77c4e1baf1b4ce7466 (patch) | |
tree | 9049ae905df4c9359eef7d04e6974ea20cd963fe /llvm/lib/CodeGen | |
parent | 428b9ee036403c9d0559222a51745d62ceded43b (diff) | |
download | bcm5719-llvm-1c3b1efa58a0365a4e0a2a77c4e1baf1b4ce7466.tar.gz bcm5719-llvm-1c3b1efa58a0365a4e0a2a77c4e1baf1b4ce7466.zip |
Hoisted some loop invariant smallvector lookups out of a MachineLICM loop
llvm-svn: 147127
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/MachineLICM.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp index 3a8270002dd..68548387976 100644 --- a/llvm/lib/CodeGen/MachineLICM.cpp +++ b/llvm/lib/CodeGen/MachineLICM.cpp @@ -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; } } |