[llvm-commits] [llvm] r147127 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp
Pete Cooper
peter_cooper at apple.com
Wed Dec 21 18:13:25 PST 2011
Author: pete
Date: Wed Dec 21 20:13:25 2011
New Revision: 147127
URL: http://llvm.org/viewvc/llvm-project?rev=147127&view=rev
Log:
Hoisted some loop invariant smallvector lookups out of a MachineLICM loop
Modified:
llvm/trunk/lib/CodeGen/MachineLICM.cpp
Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=147127&r1=147126&r2=147127&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Wed Dec 21 20:13:25 2011
@@ -1036,9 +1036,11 @@
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;
}
}
More information about the llvm-commits
mailing list