diff options
| author | Emilio Jesus Gallego Arias | 2019-05-12 01:10:50 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2019-05-12 01:10:50 +0200 |
| commit | 57ed5dbda3241eef38ebff11196bc38ca9fa3f05 (patch) | |
| tree | 38484a5b960aa28803f4185bd17fbc3cad615851 /lib/acyclicGraph.ml | |
| parent | ff58928a9ccd8d7cdf6a23a30cc569abae3e1cf7 (diff) | |
| parent | 8bb85530fbf5b6de1cb268004611c6f76fb5871e (diff) | |
Merge PR #10083: Avoid trivial (u=u) constraints in AcyclicGraph.constraints_for
Reviewed-by: ejgallego
Diffstat (limited to 'lib/acyclicGraph.ml')
| -rw-r--r-- | lib/acyclicGraph.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/acyclicGraph.ml b/lib/acyclicGraph.ml index 7d04c8f5a1..e1dcfcc6ce 100644 --- a/lib/acyclicGraph.ml +++ b/lib/acyclicGraph.ml @@ -721,7 +721,10 @@ module Make (Point:Point) = struct let rmap, csts = PSet.fold (fun u (rmap,csts) -> let arcu = repr g u in if PSet.mem arcu.canon kept then - PMap.add arcu.canon arcu.canon rmap, Constraint.add (u,Eq,arcu.canon) csts + let csts = if Point.equal u arcu.canon then csts + else Constraint.add (u,Eq,arcu.canon) csts + in + PMap.add arcu.canon arcu.canon rmap, csts else match PMap.find arcu.canon rmap with | v -> rmap, Constraint.add (u,Eq,v) csts |
