summaryrefslogtreecommitdiffstats
path: root/src/aig/gia
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-05-07 20:48:05 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-05-07 20:48:05 -0700
commite7e21b00fe979b5a8f91341c83caa21809e8b105 (patch)
tree2500b8b571d52c7956f34cb1f07fe0d680bb9618 /src/aig/gia
parent027dbbd492967e067f140c9540e009359db9680b (diff)
downloadabc-e7e21b00fe979b5a8f91341c83caa21809e8b105.tar.gz
abc-e7e21b00fe979b5a8f91341c83caa21809e8b105.tar.bz2
abc-e7e21b00fe979b5a8f91341c83caa21809e8b105.zip
Bug fix in the sweeper.
Diffstat (limited to 'src/aig/gia')
-rw-r--r--src/aig/gia/giaSweeper.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/aig/gia/giaSweeper.c b/src/aig/gia/giaSweeper.c
index 91b4c17b..1b1abece 100644
--- a/src/aig/gia/giaSweeper.c
+++ b/src/aig/gia/giaSweeper.c
@@ -275,8 +275,12 @@ int Gia_SweeperProbeCreate( Gia_Man_t * p, int iLit )
int Gia_SweeperProbeFind( Gia_Man_t * p, int iLit )
{
Swp_Man_t * pSwp = (Swp_Man_t *)p->pData;
- if ( iLit < Vec_IntSize(pSwp->vLit2Prob) && Vec_IntEntry(pSwp->vLit2Prob, iLit) >= 0 )
- return Vec_IntEntry(pSwp->vLit2Prob, iLit);
+ int ProbeId = -1;
+ if ( iLit < Vec_IntSize(pSwp->vLit2Prob) && (ProbeId = Vec_IntEntry(pSwp->vLit2Prob, iLit)) >= 0 )
+ {
+ Vec_IntAddToEntry( pSwp->vProbRefs, ProbeId, 1 );
+ return ProbeId;
+ }
return Gia_SweeperProbeCreate( p, iLit );
}
// dereferences the probe