1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[MachineBlockPlacment] Add an assert to ensure there is no order dependency on DenseMap iteration order.

llvm-svn: 300060
This commit is contained in:
Benjamin Kramer 2017-04-12 13:26:31 +00:00
parent 78d1a38817
commit 467066b926

View File

@ -1160,8 +1160,8 @@ void MachineBlockPlacement::precomputeTriangleChains() {
TriangleChainMap.insert(std::make_pair(Chain.getKey(), std::move(Chain)));
} else {
auto InsertResult = TriangleChainMap.try_emplace(PDom, &BB, PDom);
assert (InsertResult.second && "Block seen twice.");
(void) InsertResult;
assert(InsertResult.second && "Block seen twice.");
(void)InsertResult;
}
}
@ -1177,7 +1177,11 @@ void MachineBlockPlacement::precomputeTriangleChains() {
for (MachineBasicBlock *src : reverse(Chain.Edges)) {
DEBUG(dbgs() << "Marking edge: " << getBlockName(src) << "->" <<
getBlockName(dst) << " as pre-computed based on triangles.\n");
ComputedEdges[src] = { dst, true };
auto InsertResult = ComputedEdges.insert({src, {dst, true}});
assert(InsertResult.second && "Block seen twice.");
(void)InsertResult;
dst = src;
}
}