diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-07-20 11:02:39 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-07-20 11:02:39 +0200 |
commit | 7f2f55567c971b2478e84657ba701856109c56a9 (patch) | |
tree | 061e549fd7f994437c44ab3314422573c0bd743d | |
parent | 817670af605bad21b3a872cb14b8d04b85b2d466 (diff) | |
download | ghdl-7f2f55567c971b2478e84657ba701856109c56a9.tar.gz ghdl-7f2f55567c971b2478e84657ba701856109c56a9.tar.bz2 ghdl-7f2f55567c971b2478e84657ba701856109c56a9.zip |
synth: add and merge phi within a function.
-rw-r--r-- | src/synth/synth-expr.adb | 5 |
1 files changed, 5 insertions, 0 deletions
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); |