aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-03-08 20:28:38 +0100
committerTristan Gingold <tgingold@free.fr>2023-03-08 20:28:38 +0100
commit578c1b7fcae79be63224d8d595de9a2fdc7cde2c (patch)
tree9a46790b1bbd366960e8e03a0aa9436a5104e3e7
parent92cb39fed06384917669fecc770e8ce80e9dbb8d (diff)
downloadghdl-578c1b7fcae79be63224d8d595de9a2fdc7cde2c.tar.gz
ghdl-578c1b7fcae79be63224d8d595de9a2fdc7cde2c.tar.bz2
ghdl-578c1b7fcae79be63224d8d595de9a2fdc7cde2c.zip
psl-optimize: add comments
-rw-r--r--src/psl/psl-optimize.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/psl/psl-optimize.adb b/src/psl/psl-optimize.adb
index 450a933c9..a2b5fbd9e 100644
--- a/src/psl/psl-optimize.adb
+++ b/src/psl/psl-optimize.adb
@@ -246,7 +246,8 @@ package body PSL.Optimize is
Next_E_State := Get_Edge_State (Next_E);
Next_Next_E := Get_Next_Edge_Reverse (Next_E);
if Next_E_State = E_State then
- -- Identical edge: remove the duplicate.
+ -- Identical edge (same edge expression, same states):
+ -- remove the duplicate.
Remove_Edge (Next_E);
elsif Are_States_Identical (E_State, Next_E_State) then
Merge_State_Reverse (N, E_State, Next_E_State);
@@ -308,12 +309,16 @@ package body PSL.Optimize is
while S /= No_State loop
Edges := (others => No_Edge);
+
+ -- Iterate on edges whose source is S.
E := Get_First_Src_Edge (S);
while E /= No_Edge loop
Next_E := Get_Next_Src_Edge (E);
D := Get_Edge_Dest (E);
L_D := Get_State_Label (D);
if Edges (L_D) /= No_Edge then
+ -- There is already an edge with the same source and the
+ -- same destination label.
Set_Edge_Expr
(Edges (L_D),
Build_Bool_Or (Get_Edge_Expr (Edges (L_D)),