File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 54
54
55
55
#include " swift/SILOptimizer/Utils/CanonicalOSSALifetime.h"
56
56
#include " swift/SIL/InstructionUtils.h"
57
+ #include " swift/SIL/NodeDatastructures.h"
57
58
#include " swift/SIL/OwnershipUtils.h"
58
59
#include " swift/SILOptimizer/Utils/CFGOptUtils.h"
59
60
#include " swift/SILOptimizer/Utils/DebugOptUtils.h"
@@ -609,7 +610,7 @@ void CanonicalizeOSSALifetime::findOrInsertDestroys() {
609
610
void CanonicalizeOSSALifetime::rewriteCopies () {
610
611
assert (getCurrentDef ()->getOwnershipKind () == OwnershipKind::Owned);
611
612
612
- SmallSetVector<SILInstruction *, 8 > instsToDelete;
613
+ InstructionSetVector instsToDelete ( getCurrentDef ()-> getFunction ()) ;
613
614
defUseWorklist.clear ();
614
615
615
616
// Visit each operand in the def-use chain.
@@ -707,8 +708,9 @@ void CanonicalizeOSSALifetime::rewriteCopies() {
707
708
}
708
709
709
710
// Remove the leftover copy_value and destroy_value instructions.
710
- for (unsigned idx = 0 , eidx = instsToDelete.size (); idx != eidx; ++idx) {
711
- deleter.forceDelete (instsToDelete[idx]);
711
+ for (auto iter = instsToDelete.begin (), end = instsToDelete.end ();
712
+ iter != end; ++iter) {
713
+ deleter.forceDelete (*iter);
712
714
}
713
715
}
714
716
You can’t perform that action at this time.
0 commit comments