File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 10
10
//
11
11
// ===----------------------------------------------------------------------===//
12
12
13
- #include " swift/Basic/Assertions.h"
14
13
#include " swift/SILOptimizer/Utils/BasicBlockOptUtils.h"
14
+ #include " swift/Basic/Assertions.h"
15
+ #include " swift/SIL/LoopInfo.h"
16
+ #include " swift/SIL/StackList.h"
15
17
#include " swift/SILOptimizer/Utils/CFGOptUtils.h"
16
18
#include " swift/SILOptimizer/Utils/InstOptUtils.h"
17
19
#include " swift/SILOptimizer/Utils/OwnershipOptUtils.h"
18
20
#include " swift/SILOptimizer/Utils/SILSSAUpdater.h"
19
- #include " swift/SIL/LoopInfo.h"
20
21
21
22
using namespace swift ;
22
23
@@ -25,9 +26,8 @@ using namespace swift;
25
26
bool ReachableBlocks::visit (function_ref<bool (SILBasicBlock *)> visitor) {
26
27
// Walk over the CFG, starting at the entry block, until all reachable blocks
27
28
// are visited.
28
- SILBasicBlock *entryBB = visited.getFunction ()->getEntryBlock ();
29
- SmallVector<SILBasicBlock *, 8 > worklist = {entryBB};
30
- visited.insert (entryBB);
29
+ StackList<SILBasicBlock *> worklist (visited.getFunction ());
30
+ visited.insert (visited.getFunction ()->getEntryBlock ());
31
31
while (!worklist.empty ()) {
32
32
SILBasicBlock *bb = worklist.pop_back_val ();
33
33
if (!visitor (bb))
You can’t perform that action at this time.
0 commit comments