mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL optimizer: fix two non-deterministic behaviors
The problem was again iterating over pointer sets. This produced non-deterministic use list orderings, which does result in non-deterministic code generation itself. But somehow debug info generation depends on the use list ordering (which should be investigated why). And the non-deterministic debug info changes triggered re-running of the llvm pipeline.
This commit is contained in:
@@ -2530,7 +2530,9 @@ static void removeArgument(SILBasicBlock *BB, unsigned i) {
|
||||
// Determine the set of predecessors in case any predecessor has
|
||||
// two edges to this block (e.g. a conditional branch where both
|
||||
// sides reach this block).
|
||||
llvm::SmallPtrSet<SILBasicBlock *, 4> PredBBs;
|
||||
llvm::SetVector<SILBasicBlock *,SmallVector<SILBasicBlock *, 8>,
|
||||
SmallPtrSet<SILBasicBlock *, 8>> PredBBs;
|
||||
|
||||
for (auto *Pred : BB->getPredecessorBlocks())
|
||||
PredBBs.insert(Pred);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user