mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Don't assume that the arguments are processed in some particular order.
This appears to not be the case with dragonegg at least in some contexts. Hopefully will fix the bootstrap assert failure there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152763 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
38ca0d78a2
commit
0e33d9fea2
@ -434,9 +434,11 @@ void InlineCostAnalyzer::FunctionInfo::countCodeReductionForPointerPair(
|
||||
= PointerArgs.find(OtherArg);
|
||||
if (ArgIt == PointerArgs.end())
|
||||
continue;
|
||||
assert(ArgIt->second < ArgIdx);
|
||||
std::pair<unsigned, unsigned> ArgPair(ArgIt->second, ArgIdx);
|
||||
if (ArgIt->second > ArgIdx)
|
||||
std::swap(ArgPair.first, ArgPair.second);
|
||||
|
||||
PointerArgPairWeights[std::make_pair(ArgIt->second, ArgIdx)]
|
||||
PointerArgPairWeights[ArgPair]
|
||||
+= countCodeReductionForConstant(Metrics, I);
|
||||
}
|
||||
} while (!Worklist.empty());
|
||||
|
Loading…
x
Reference in New Issue
Block a user