summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2019-04-05 21:03:35 -1000
committerAlan Mishchenko <alanmi@berkeley.edu>2019-04-05 21:03:35 -1000
commit0739bd7f03eacdb11034d166e5b799f2e59796fc (patch)
treef50d39ac16f79f26a71227c83422d68dbc19b5cf /src
parentc24fd01f19fdea21b2bb9dd494f7d1fa328261b3 (diff)
downloadabc-0739bd7f03eacdb11034d166e5b799f2e59796fc.tar.gz
abc-0739bd7f03eacdb11034d166e5b799f2e59796fc.tar.bz2
abc-0739bd7f03eacdb11034d166e5b799f2e59796fc.zip
Converting dch-style equivalences into scorr-style ones.
Diffstat (limited to 'src')
-rw-r--r--src/aig/gia/giaEquiv.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/aig/gia/giaEquiv.c b/src/aig/gia/giaEquiv.c
index 20987687..c87d1cd5 100644
--- a/src/aig/gia/giaEquiv.c
+++ b/src/aig/gia/giaEquiv.c
@@ -581,6 +581,18 @@ Gia_Man_t * Gia_ManEquivReduce( Gia_Man_t * p, int fUseAll, int fDualOut, int fS
Gia_Man_t * pNew;
Gia_Obj_t * pObj;
int i;
+ if ( !p->pReprs && p->pSibls )
+ {
+ p->pReprs = ABC_CALLOC( Gia_Rpr_t, Gia_ManObjNum(p) );
+ for ( i = 0; i < Gia_ManObjNum(p); i++ )
+ Gia_ObjSetRepr( p, i, GIA_VOID );
+ for ( i = 0; i < Gia_ManObjNum(p); i++ )
+ if ( p->pSibls[i] > 0 )
+ Gia_ObjSetRepr( p, i, p->pSibls[i] );
+ printf( "Created equivalence classes.\n" );
+ ABC_FREE( p->pNexts );
+ p->pNexts = Gia_ManDeriveNexts( p );
+ }
if ( !p->pReprs )
{
Abc_Print( 1, "Gia_ManEquivReduce(): Equivalence classes are not available.\n" );