1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

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
This commit is contained in:
Chandler Carruth 2012-03-15 00:55:51 +00:00
parent 8b3b2be7c0
commit a9f0dc35d3

View File

@ -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]