We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
InstructionWorklist.pushSuccessors
1 parent 54bc9f3 commit 0518ad1Copy full SHA for 0518ad1
SwiftCompilerSources/Sources/Optimizer/DataStructures/Worklist.swift
@@ -93,5 +93,20 @@ extension InstructionWorklist {
93
}
94
95
96
+
97
+ mutating func pushSuccessors(of inst: Instruction, ignoring ignoreInst: Instruction) {
98
+ if let succ = inst.next {
99
+ if succ != ignoreInst {
100
+ pushIfNotVisited(succ)
101
+ }
102
+ } else {
103
+ for succBlock in inst.parentBlock.successors {
104
+ let firstInst = succBlock.instructions.first!
105
+ if firstInst != ignoreInst {
106
+ pushIfNotVisited(firstInst)
107
108
109
110
111
112
0 commit comments