From c561c14861b29b906255c2d2f1c8bf7e5d1aaabb Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Mon, 6 Aug 2012 15:05:12 +0100 Subject: Smart block predicator: move *Map from parameters to fields --- Source/VCGeneration/SmartBlockPredicator.cs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Source/VCGeneration/SmartBlockPredicator.cs b/Source/VCGeneration/SmartBlockPredicator.cs index 704709f4..57a6dcdb 100644 --- a/Source/VCGeneration/SmartBlockPredicator.cs +++ b/Source/VCGeneration/SmartBlockPredicator.cs @@ -184,10 +184,7 @@ public class SmartBlockPredicator { DomRelation pdom, IEnumerator> i, Variable headPredicate, - ref int predCount, - Dictionary predMap, - Dictionary defMap, - Dictionary> ownedMap) { + ref int predCount) { var header = i.Current.Item1; var regionPreds = new List>(); var ownedPreds = new HashSet(); @@ -208,8 +205,7 @@ public class SmartBlockPredicator { if (blockGraph.Headers.Contains(block.Item1)) { var loopPred = FreshPredicate(ref predCount); ownedPreds.Add(loopPred); - AssignPredicates(blockGraph, dom, pdom, i, loopPred, ref predCount, - predMap, defMap, ownedMap); + AssignPredicates(blockGraph, dom, pdom, i, loopPred, ref predCount); } else { bool foundExisting = false; foreach (var regionPred in regionPreds) { @@ -232,9 +228,7 @@ public class SmartBlockPredicator { } while (i.MoveNext()); } - void AssignPredicates(out Dictionary predMap, - out Dictionary defMap, - out Dictionary> ownedMap) { + void AssignPredicates() { DomRelation dom = blockGraph.DominatorMap; Graph dualGraph = blockGraph.Dual(new Block()); @@ -253,7 +247,7 @@ public class SmartBlockPredicator { ownedMap = new Dictionary>(); AssignPredicates(blockGraph, dom, pdom, iter, useProcedurePredicates ? impl.InParams[0] : null, - ref predCount, predMap, defMap, ownedMap); + ref predCount); } IEnumerable LoopsExited(Block src, Block dest) { @@ -337,7 +331,7 @@ public class SmartBlockPredicator { blockGraph = prog.ProcessLoops(impl); sortedBlocks = blockGraph.LoopyTopSort(); - AssignPredicates(out predMap, out defMap, out ownedMap); + AssignPredicates(); partInfo = BuildPartitionInfo(); if (useProcedurePredicates) -- cgit v1.2.3