From 00dc0f3daab81e3a30b7fae3ec4f2c191fce114c Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 6 Apr 2007 08:01:00 -0700 Subject: Version abc70406 --- src/aig/hop/hop.h | 1 + src/aig/hop/hopUtil.c | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'src/aig/hop') 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 [] @@ -71,6 +71,29 @@ void Hop_ManCleanData( Hop_Man_t * p ) pObj->pData = NULL; } +/**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.] -- cgit v1.2.3