summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-03-15 00:55:51 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-03-15 00:55:51 +0000
commit6d64bd463935c09a388137889df0dea20efb8aa2 (patch)
treeed19bf6c0b6e1f35d6cfbb245b001e6e3d47c91c /llvm/lib/Analysis/InlineCost.cpp
parent899e439aeaded7689ab79f49f28b8f0801403c6d (diff)
downloadbcm5719-llvm-6d64bd463935c09a388137889df0dea20efb8aa2.tar.gz
bcm5719-llvm-6d64bd463935c09a388137889df0dea20efb8aa2.zip
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. ;] llvm-svn: 152764
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 37aa729552b..3754e923ceb 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -435,7 +435,7 @@ void InlineCostAnalyzer::FunctionInfo::countCodeReductionForPointerPair(
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]
OpenPOWER on IntegriCloud