summaryrefslogtreecommitdiffstats
path: root/src/aig
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig')
-rw-r--r--src/aig/hop/hop.h1
-rw-r--r--src/aig/hop/hopUtil.c25
2 files changed, 25 insertions, 1 deletions
diff --git a/src/aig/hop/hop.h b/src/aig/hop/hop.h
index 44f5ac8e..8413fb02 100644
--- a/src/aig/hop/hop.h
+++ b/src/aig/hop/hop.h
@@ -314,6 +314,7 @@ extern void Hop_TableProfile( Hop_Man_t * p );
/*=== aigUtil.c =========================================================*/
extern void Hop_ManIncrementTravId( Hop_Man_t * p );
extern void Hop_ManCleanData( Hop_Man_t * p );
+extern void Hop_ObjCleanData_rec( Hop_Obj_t * pObj );
extern void Hop_ObjCollectMulti( Hop_Obj_t * pFunc, Vec_Ptr_t * vSuper );
extern int Hop_ObjIsMuxType( Hop_Obj_t * pObj );
extern int Hop_ObjRecognizeExor( Hop_Obj_t * pObj, Hop_Obj_t ** ppFan0, Hop_Obj_t ** ppFan1 );
diff --git a/src/aig/hop/hopUtil.c b/src/aig/hop/hopUtil.c
index 9b5bf686..34f689f6 100644
--- a/src/aig/hop/hopUtil.c
+++ b/src/aig/hop/hopUtil.c
@@ -48,7 +48,7 @@ void Hop_ManIncrementTravId( Hop_Man_t * p )
/**Function*************************************************************
- Synopsis [Sets the DFS ordering of the nodes.]
+ Synopsis [Cleans the data pointers for the nodes.]
Description []
@@ -73,6 +73,29 @@ void Hop_ManCleanData( Hop_Man_t * p )
/**Function*************************************************************
+ Synopsis [Recursively cleans the data pointers in the cone of the node.]
+
+ Description [Applicable to small AIGs only because no caching is performed.]
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Hop_ObjCleanData_rec( Hop_Obj_t * pObj )
+{
+ assert( !Hop_IsComplement(pObj) );
+ assert( !Hop_ObjIsPo(pObj) );
+ if ( Hop_ObjIsAnd(pObj) )
+ {
+ Hop_ObjCleanData_rec( Hop_ObjFanin0(pObj) );
+ Hop_ObjCleanData_rec( Hop_ObjFanin1(pObj) );
+ }
+ pObj->pData = NULL;
+}
+
+/**Function*************************************************************
+
Synopsis [Detects multi-input gate rooted at this node.]
Description []