spv-in: fix flowgraph (#247)

Header blocks were incorrectly overwritten.
format
This commit is contained in:
Matus Talcik authored and GitHub committed 2020-10-29 10:43:12 -04:00
1 parent 587dc01a2c
commit 4b43e282fc
1 file changed
+6
+6
View File
@@ -152,6 +152,12 @@ impl FlowGraph {
let (node_source_index, node_target_index) =
self.flow.edge_endpoints(edge_index).unwrap();
if self.flow[node_source_index].ty == Some(ControlFlowNodeType::Header)
|| self.flow[node_source_index].ty == Some(ControlFlowNodeType::Loop)
{
continue;
}
// Back
if self.flow[node_target_index].ty == Some(ControlFlowNodeType::Loop)
&& self.flow[node_source_index].id > self.flow[node_target_index].id