diff options
author | Tristan Gingold | 2015-09-08 21:59:33 +0200 |
---|---|---|
committer | Tristan Gingold | 2015-09-08 21:59:33 +0200 |
commit | ade2729c338050c7b248ff1b0ac7e7118083597c (patch) | |
tree | 1230202d04b07a5114556a3d63e742388710c676 | |
parent | 01451cf740c46f26c50676effc753b6774fe6739 (diff) | |
download | ghdl-ade2729c338050c7b248ff1b0ac7e7118083597c.tar.gz ghdl-ade2729c338050c7b248ff1b0ac7e7118083597c.tar.bz2 ghdl-ade2729c338050c7b248ff1b0ac7e7118083597c.zip |
canon: do not optimize concurrent procedure calls if not whole_analyze.
-rw-r--r-- | src/ghdldrv/ghdldrv.adb | 8 | ||||
-rw-r--r-- | src/vhdl/canon.adb | 8 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb index b92a02e..e3008b8 100644 --- a/src/ghdldrv/ghdldrv.adb +++ b/src/ghdldrv/ghdldrv.adb @@ -27,7 +27,6 @@ with Std_Package; with Types; use Types; with Iirs; use Iirs; with Files_Map; -with Flags; with Configuration; --with Disp_Tree; with Default_Pathes; @@ -447,11 +446,7 @@ package body Ghdldrv is declare Pos : constant Natural := Get_Basename_Pos (Toolname); begin - if Pos = 0 then - return Locate_Exec_On_Path (Toolname); - else - return Locate_Exec_On_Path (Toolname (Pos .. Toolname'Last)); - end if; + return Locate_Exec_On_Path (Toolname (Pos + 1 .. Toolname'Last)); end; end Locate_Exec_Tool; @@ -1209,7 +1204,6 @@ package body Ghdldrv is if Elab_Index < 0 then Analyze_Files (Args, True); else - Flags.Flag_Whole_Analyze := True; Set_Elab_Units ("-c", Args (Elab_Index + 1 .. Args'Last)); Setup_Compiler (False); diff --git a/src/vhdl/canon.adb b/src/vhdl/canon.adb index b8c9d3d..e5cd488 100644 --- a/src/vhdl/canon.adb +++ b/src/vhdl/canon.adb @@ -18,6 +18,7 @@ with Errorout; use Errorout; with Iirs_Utils; use Iirs_Utils; with Types; use Types; +with Flags; with Name_Table; with Sem; with Iir_Chains; use Iir_Chains; @@ -1244,8 +1245,11 @@ package body Canon is Is_Sensitized : Boolean; begin -- Optimization: the process is a sensitized process only if the - -- procedure is known not to have wait statement. - Is_Sensitized := Get_Wait_State (Imp) = False; + -- procedure is known not to have wait statement. This is possible only + -- when generating code at once for the whole design, otherwise this + -- may create discrepencies in translate structures due to states. + Is_Sensitized := + (Get_Wait_State (Imp) = False) and Flags.Flag_Whole_Analyze; -- LRM93 9.3 -- The equivalent process statement has also no sensitivity list, an |