Wrap generated graphs to ensure entry and exit nodes have no extra edges
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -112,6 +112,9 @@ singleton bss = record
|
||||
; outputs = zero ∷ []
|
||||
}
|
||||
|
||||
wrap : Graph → Graph
|
||||
wrap g = singleton [] ↦ g ↦ singleton []
|
||||
|
||||
buildCfg : Stmt → Graph
|
||||
buildCfg ⟨ bs₁ ⟩ = singleton (bs₁ ∷ [])
|
||||
buildCfg (s₁ then s₂) = buildCfg s₁ ↦ buildCfg s₂
|
||||
|
||||
Reference in New Issue
Block a user