[llvm-commits] [llvm] r152764 - /llvm/trunk/lib/Analysis/InlineCost.cpp
Chandler Carruth
chandlerc at gmail.com
Wed Mar 14 17:55:51 PDT 2012
Author: chandlerc
Date: Wed Mar 14 19:55:51 2012
New Revision: 152764
URL: http://llvm.org/viewvc/llvm-project?rev=152764&view=rev
Log:
Make the swap code here a bit more obvious what its doing... We're
essentially sorting the pair's arguments. I'd love to actually call sort
here, but I'm just not that crazy. ;]
Modified:
llvm/trunk/lib/Analysis/InlineCost.cpp
Modified: llvm/trunk/lib/Analysis/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InlineCost.cpp?rev=152764&r1=152763&r2=152764&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
+++ llvm/trunk/lib/Analysis/InlineCost.cpp Wed Mar 14 19:55:51 2012
@@ -435,7 +435,7 @@
if (ArgIt == PointerArgs.end())
continue;
std::pair<unsigned, unsigned> ArgPair(ArgIt->second, ArgIdx);
- if (ArgIt->second > ArgIdx)
+ if (ArgPair.first > ArgPair.second)
std::swap(ArgPair.first, ArgPair.second);
PointerArgPairWeights[ArgPair]
More information about the llvm-commits
mailing list