From 7f2f55567c971b2478e84657ba701856109c56a9 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 20 Jul 2019 11:02:39 +0200 Subject: synth: add and merge phi within a function. --- src/synth/synth-expr.adb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index 0f954eb0d..25efc8a56 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -35,6 +35,7 @@ with Synth.Errors; use Synth.Errors; with Synth.Types; use Synth.Types; with Synth.Stmts; use Synth.Stmts; with Synth.Decls; +with Synth.Environment; use Synth.Environment; with Netlists.Gates; use Netlists.Gates; with Netlists.Builders; use Netlists.Builders; @@ -1477,6 +1478,8 @@ package body Synth.Expr is Synth_Subprogram_Association (Subprg_Inst, Syn_Inst, Inter_Chain, Assoc_Chain); + Push_Phi; + Decls.Synth_Declarations (Subprg_Inst, Get_Declaration_Chain (Bod)); Synth_Sequential_Statements @@ -1484,6 +1487,8 @@ package body Synth.Expr is Res := Subprg_Inst.Return_Value; + Pop_And_Merge_Phi (Build_Context, Bod); + Free_Instance (Subprg_Inst); Areapools.Release (M, Instance_Pool.all); -- cgit v1.2.3