summaryrefslogtreecommitdiffstats
path: root/src/opt/sfm/sfmLib.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-10-27 10:48:40 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2015-10-27 10:48:40 -0700
commit35143e830b9a05ed5f4c6f522a609f88ef726708 (patch)
tree32e745eee9539880284d60b4d2d259d1a17d8323 /src/opt/sfm/sfmLib.c
parentbd586dd3558e4b967a2e3f569b89c9c35a8f548b (diff)
downloadabc-35143e830b9a05ed5f4c6f522a609f88ef726708.tar.gz
abc-35143e830b9a05ed5f4c6f522a609f88ef726708.tar.bz2
abc-35143e830b9a05ed5f4c6f522a609f88ef726708.zip
Experiments with precomputation and matching.
Diffstat (limited to 'src/opt/sfm/sfmLib.c')
-rw-r--r--src/opt/sfm/sfmLib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opt/sfm/sfmLib.c b/src/opt/sfm/sfmLib.c
index 8d41f2e3..f9b2ef6a 100644
--- a/src/opt/sfm/sfmLib.c
+++ b/src/opt/sfm/sfmLib.c
@@ -605,7 +605,8 @@ int Sfm_LibFindAreaMatch( Sfm_Lib_t * p, word * pTruth, int nFanins, int * piObj
return -1;
Sfm_LibForEachSuper( p, pObj, iFunc )
break;
- *piObj = pObj - p->pObjs;
+ if ( piObj )
+ *piObj = pObj - p->pObjs;
return pObj->Area;
}
int Sfm_LibFindDelayMatches( Sfm_Lib_t * p, word * pTruth, int * pFanins, int nFanins, Vec_Ptr_t * vGates, Vec_Ptr_t * vFans )