[llvm-commits] [llvm] r44458 - /llvm/trunk/lib/VMCore/Function.cpp
Duncan Sands
baldrick at free.fr
Fri Nov 30 10:20:59 PST 2007
Author: baldrick
Date: Fri Nov 30 12:20:58 2007
New Revision: 44458
URL: http://llvm.org/viewvc/llvm-project?rev=44458&view=rev
Log:
Small optimization of parameter attribute lookup.
Modified:
llvm/trunk/lib/VMCore/Function.cpp
Modified: llvm/trunk/lib/VMCore/Function.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Function.cpp?rev=44458&r1=44457&r2=44458&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Function.cpp (original)
+++ llvm/trunk/lib/VMCore/Function.cpp Fri Nov 30 12:20:58 2007
@@ -79,7 +79,7 @@
uint16_t
ParamAttrsList::getParamAttrs(uint16_t Index) const {
unsigned limit = attrs.size();
- for (unsigned i = 0; i < limit; ++i)
+ for (unsigned i = 0; i < limit && attrs[i].index <= Index; ++i)
if (attrs[i].index == Index)
return attrs[i].attrs;
return ParamAttr::None;
More information about the llvm-commits
mailing list