abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
rwt.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "misc/vec/vec.h"
#include "misc/extra/extra.h"
#include "misc/mem/mem.h"

Go to the source code of this file.

Data Structures

struct  Rwt_Man_t_
 
struct  Rwt_Node_t_
 

Macros

#define RWT_LIMIT   1048576/4
 INCLUDES ///. More...
 
#define RWT_MIN(a, b)   (((a) < (b))? (a) : (b))
 
#define RWT_MAX(a, b)   (((a) > (b))? (a) : (b))
 

Typedefs

typedef struct Rwt_Man_t_ Rwt_Man_t
 
typedef struct Rwt_Node_t_ Rwt_Node_t
 

Functions

static int Rwt_IsComplement (Rwt_Node_t *p)
 
static Rwt_Node_tRwt_Regular (Rwt_Node_t *p)
 
static Rwt_Node_tRwt_Not (Rwt_Node_t *p)
 
static Rwt_Node_tRwt_NotCond (Rwt_Node_t *p, int c)
 
void Rwt_ManPreprocess (Rwt_Man_t *p)
 MACRO DEFINITIONS ///. More...
 
Rwt_Man_tRwt_ManStart (int fPrecompute)
 
void Rwt_ManStop (Rwt_Man_t *p)
 
void Rwt_ManPrintStats (Rwt_Man_t *p)
 
void Rwt_ManPrintStatsFile (Rwt_Man_t *p)
 
void * Rwt_ManReadDecs (Rwt_Man_t *p)
 
Vec_Ptr_tRwt_ManReadLeaves (Rwt_Man_t *p)
 
int Rwt_ManReadCompl (Rwt_Man_t *p)
 
void Rwt_ManAddTimeCuts (Rwt_Man_t *p, abctime Time)
 
void Rwt_ManAddTimeUpdate (Rwt_Man_t *p, abctime Time)
 
void Rwt_ManAddTimeTotal (Rwt_Man_t *p, abctime Time)
 
void Rwt_ManLoadFromArray (Rwt_Man_t *p, int fVerbose)
 
char * Rwt_ManGetPractical (Rwt_Man_t *p)
 
Rwt_Node_tRwt_ManAddVar (Rwt_Man_t *p, unsigned uTruth, int fPrecompute)
 
void Rwt_ManIncTravId (Rwt_Man_t *p)
 

Macro Definition Documentation

#define RWT_LIMIT   1048576/4

INCLUDES ///.

CFile****************************************************************

FileName [rwt.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [DAG-aware AIG rewriting package.]

Synopsis [External declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id:
rwt.h,v 1.00 2005/06/20 00:00:00 alanmi Exp

]PARAMETERS ///BASIC TYPES ///

Definition at line 51 of file rwt.h.

#define RWT_MAX (   a,
 
)    (((a) > (b))? (a) : (b))

Definition at line 53 of file rwt.h.

#define RWT_MIN (   a,
 
)    (((a) < (b))? (a) : (b))

Definition at line 52 of file rwt.h.

Typedef Documentation

typedef struct Rwt_Man_t_ Rwt_Man_t

Definition at line 55 of file rwt.h.

typedef struct Rwt_Node_t_ Rwt_Node_t

Definition at line 56 of file rwt.h.

Function Documentation

static int Rwt_IsComplement ( Rwt_Node_t p)
inlinestatic

Definition at line 122 of file rwt.h.

122 { return (int)(((ABC_PTRUINT_T)p) & 01); }
void Rwt_ManAddTimeCuts ( Rwt_Man_t p,
abctime  Time 
)

Function*************************************************************

Synopsis [Stops the resynthesis manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 301 of file rwtMan.c.

302 {
303  p->timeCut += Time;
304 }
abctime timeCut
Definition: rwt.h:99
void Rwt_ManAddTimeTotal ( Rwt_Man_t p,
abctime  Time 
)

Function*************************************************************

Synopsis [Stops the resynthesis manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 333 of file rwtMan.c.

334 {
335  p->timeTotal += Time;
336 }
abctime timeTotal
Definition: rwt.h:104
void Rwt_ManAddTimeUpdate ( Rwt_Man_t p,
abctime  Time 
)

Function*************************************************************

Synopsis [Stops the resynthesis manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 317 of file rwtMan.c.

318 {
319  p->timeUpdate += Time;
320 }
abctime timeUpdate
Definition: rwt.h:103
Rwt_Node_t* Rwt_ManAddVar ( Rwt_Man_t p,
unsigned  uTruth,
int  fPrecompute 
)

Function*************************************************************

Synopsis [Adds one node.]

Description []

SideEffects []

SeeAlso []

Definition at line 446 of file rwtUtil.c.

447 {
448  Rwt_Node_t * pNew;
449  pNew = (Rwt_Node_t *)Mem_FixedEntryFetch( p->pMmNode );
450  pNew->Id = p->vForest->nSize;
451  pNew->TravId = 0;
452  pNew->uTruth = uTruth;
453  pNew->Level = 0;
454  pNew->Volume = 0;
455  pNew->fUsed = 1;
456  pNew->fExor = 0;
457  pNew->p0 = NULL;
458  pNew->p1 = NULL;
459  pNew->pNext = NULL;
460  Vec_PtrPush( p->vForest, pNew );
461  if ( fPrecompute )
462  Rwt_ListAddToTail( p->pTable + uTruth, pNew );
463  return pNew;
464 }
int Id
Definition: rwt.h:109
Rwt_Node_t * p1
Definition: rwt.h:117
Rwt_Node_t * pNext
Definition: rwt.h:118
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
unsigned uTruth
Definition: rwt.h:111
Rwt_Node_t ** pTable
Definition: rwt.h:71
Mem_Fixed_t * pMmNode
Definition: rwt.h:73
unsigned Level
Definition: rwt.h:113
unsigned Volume
Definition: rwt.h:112
void Rwt_ListAddToTail(Rwt_Node_t **ppList, Rwt_Node_t *pNode)
FUNCTION DEFINITIONS ///.
Definition: rwtUtil.c:425
Rwt_Node_t * p0
Definition: rwt.h:116
unsigned fExor
Definition: rwt.h:115
unsigned fUsed
Definition: rwt.h:114
int TravId
Definition: rwt.h:110
char * Mem_FixedEntryFetch(Mem_Fixed_t *p)
Definition: mem.c:168
Vec_Ptr_t * vForest
Definition: rwt.h:70
char* Rwt_ManGetPractical ( Rwt_Man_t p)

Function*************************************************************

Synopsis [Create practical classes.]

Description []

SideEffects []

SeeAlso []

Definition at line 640 of file rwtUtil.c.

641 {
642  char * pPractical;
643  int i;
644  pPractical = ABC_ALLOC( char, p->nFuncs );
645  memset( pPractical, 0, sizeof(char) * p->nFuncs );
646  pPractical[0] = 1;
647  for ( i = 1; ; i++ )
648  {
649  if ( s_RwtPracticalClasses[i] == 0 )
650  break;
651  pPractical[ s_RwtPracticalClasses[i] ] = 1;
652  }
653  return pPractical;
654 }
char * memset()
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
int nFuncs
Definition: rwt.h:61
static unsigned short s_RwtPracticalClasses[]
Definition: rwtUtil.c:393
void Rwt_ManIncTravId ( Rwt_Man_t p)

Function*************************************************************

Synopsis [Adds one node.]

Description []

SideEffects []

SeeAlso []

Definition at line 547 of file rwtUtil.c.

548 {
549  Rwt_Node_t * pNode;
550  int i;
551  if ( p->nTravIds++ < 0x8FFFFFFF )
552  return;
553  Vec_PtrForEachEntry( Rwt_Node_t *, p->vForest, pNode, i )
554  pNode->TravId = 0;
555  p->nTravIds = 1;
556 }
int nTravIds
Definition: rwt.h:75
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
Vec_Ptr_t * vForest
Definition: rwt.h:70
void Rwt_ManLoadFromArray ( Rwt_Man_t p,
int  fVerbose 
)

Function*************************************************************

Synopsis [Loads data.]

Description []

SideEffects []

SeeAlso []

Definition at line 589 of file rwtUtil.c.

590 {
591  unsigned short * pArray = s_RwtAigSubgraphs;
592  Rwt_Node_t * p0, * p1;
593  unsigned Entry0, Entry1;
594  int Level, Volume, nEntries, fExor;
595  int i;
596  abctime clk = Abc_Clock();
597 
598  // reconstruct the forest
599  for ( i = 0; ; i++ )
600  {
601  Entry0 = pArray[2*i + 0];
602  Entry1 = pArray[2*i + 1];
603  if ( Entry0 == 0 && Entry1 == 0 )
604  break;
605  // get EXOR flag
606  fExor = (Entry0 & 1);
607  Entry0 >>= 1;
608  // get the nodes
609  p0 = (Rwt_Node_t *)p->vForest->pArray[Entry0 >> 1];
610  p1 = (Rwt_Node_t *)p->vForest->pArray[Entry1 >> 1];
611  // compute the level and volume of the new nodes
612  Level = 1 + RWT_MAX( p0->Level, p1->Level );
613  Volume = 1 + Rwt_ManNodeVolume( p, p0, p1 );
614  // set the complemented attributes
615  p0 = Rwt_NotCond( p0, (Entry0 & 1) );
616  p1 = Rwt_NotCond( p1, (Entry1 & 1) );
617  // add the node
618 // Rwt_ManTryNode( p, p0, p1, Level, Volume );
619  Rwt_ManAddNode( p, p0, p1, fExor, Level, Volume + fExor );
620  }
621  nEntries = i - 1;
622  if ( fVerbose )
623  {
624  printf( "The number of classes = %d. Canonical nodes = %d.\n", p->nClasses, p->nAdded );
625  printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", Abc_Clock() - clk );
626  }
627 }
int nAdded
Definition: rwt.h:77
#define RWT_MAX(a, b)
Definition: rwt.h:53
static ABC_NAMESPACE_IMPL_START unsigned short s_RwtAigSubgraphs[]
DECLARATIONS ///.
Definition: rwtUtil.c:31
static abctime Abc_Clock()
Definition: abc_global.h:279
unsigned Level
Definition: rwt.h:113
Rwt_Node_t * Rwt_ManAddNode(Rwt_Man_t *p, Rwt_Node_t *p0, Rwt_Node_t *p1, int fExor, int Level, int Volume)
Definition: rwtUtil.c:477
static Rwt_Node_t * Rwt_NotCond(Rwt_Node_t *p, int c)
Definition: rwt.h:125
#define ABC_PRT(a, t)
Definition: abc_global.h:220
int nClasses
Definition: rwt.h:78
int Rwt_ManNodeVolume(Rwt_Man_t *p, Rwt_Node_t *p0, Rwt_Node_t *p1)
Definition: rwtUtil.c:569
ABC_INT64_T abctime
Definition: abc_global.h:278
Vec_Ptr_t * vForest
Definition: rwt.h:70
void Rwt_ManPreprocess ( Rwt_Man_t p)

MACRO DEFINITIONS ///.

FUNCTION DECLARATIONS ///

MACRO DEFINITIONS ///.

Function*************************************************************

Synopsis [Preprocesses computed library of subgraphs.]

Description []

SideEffects []

SeeAlso []

Definition at line 49 of file rwtDec.c.

50 {
51  Dec_Graph_t * pGraph;
52  Rwt_Node_t * pNode;
53  int i, k;
54  // put the nodes into the structure
55  p->pMapInv = ABC_ALLOC( unsigned short, 222 );
56  memset( p->pMapInv, 0, sizeof(unsigned short) * 222 );
57  p->vClasses = Vec_VecStart( 222 );
58  for ( i = 0; i < p->nFuncs; i++ )
59  {
60  if ( p->pTable[i] == NULL )
61  continue;
62  // consider all implementations of this function
63  for ( pNode = p->pTable[i]; pNode; pNode = pNode->pNext )
64  {
65  assert( pNode->uTruth == p->pTable[i]->uTruth );
66  assert( p->pMap[pNode->uTruth] < 222 ); // Always >= 0 b/c unsigned.
67  Vec_VecPush( p->vClasses, p->pMap[pNode->uTruth], pNode );
68  p->pMapInv[ p->pMap[pNode->uTruth] ] = p->puCanons[pNode->uTruth];
69  }
70  }
71  // compute decomposition forms for each node and verify them
72  Vec_VecForEachEntry( Rwt_Node_t *, p->vClasses, pNode, i, k )
73  {
74  pGraph = Rwt_NodePreprocess( p, pNode );
75  pNode->pNext = (Rwt_Node_t *)pGraph;
76 // assert( pNode->uTruth == (Dec_GraphDeriveTruth(pGraph) & 0xFFFF) );
77  }
78 }
char * memset()
Rwt_Node_t * pNext
Definition: rwt.h:118
static void Vec_VecPush(Vec_Vec_t *p, int Level, void *Entry)
Definition: vecVec.h:456
unsigned short * pMapInv
Definition: rwt.h:66
#define Vec_VecForEachEntry(Type, vGlob, pEntry, i, k)
Definition: vecVec.h:87
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
unsigned uTruth
Definition: rwt.h:111
int nFuncs
Definition: rwt.h:61
Rwt_Node_t ** pTable
Definition: rwt.h:71
static ABC_NAMESPACE_IMPL_START Dec_Graph_t * Rwt_NodePreprocess(Rwt_Man_t *p, Rwt_Node_t *pNode)
DECLARATIONS ///.
Definition: rwtDec.c:91
static Vec_Vec_t * Vec_VecStart(int nSize)
Definition: vecVec.h:168
Vec_Vec_t * vClasses
Definition: rwt.h:72
unsigned char * pMap
Definition: rwt.h:65
#define assert(ex)
Definition: util_old.h:213
unsigned short * puCanons
Definition: rwt.h:62
void Rwt_ManPrintStats ( Rwt_Man_t p)

Function*************************************************************

Synopsis [Stops the resynthesis manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 183 of file rwtMan.c.

184 {
185  int i, Counter = 0;
186  for ( i = 0; i < 222; i++ )
187  Counter += (p->nScores[i] > 0);
188 
189  printf( "Rewriting statistics:\n" );
190  printf( "Total cuts tries = %8d.\n", p->nCutsGood );
191  printf( "Bad cuts found = %8d.\n", p->nCutsBad );
192  printf( "Total subgraphs = %8d.\n", p->nSubgraphs );
193  printf( "Used NPN classes = %8d.\n", Counter );
194  printf( "Nodes considered = %8d.\n", p->nNodesConsidered );
195  printf( "Nodes rewritten = %8d.\n", p->nNodesRewritten );
196  printf( "Calculated gain = %8d.\n", p->nNodesGained );
197  ABC_PRT( "Start ", p->timeStart );
198  ABC_PRT( "Cuts ", p->timeCut );
199  ABC_PRT( "Truth ", p->timeTruth );
200  ABC_PRT( "Resynthesis ", p->timeRes );
201  ABC_PRT( " Mffc ", p->timeMffc );
202  ABC_PRT( " Eval ", p->timeEval );
203  ABC_PRT( "Update ", p->timeUpdate );
204  ABC_PRT( "TOTAL ", p->timeTotal );
205 
206 /*
207  printf( "The scores are:\n" );
208  for ( i = 0; i < 222; i++ )
209  if ( p->nScores[i] > 0 )
210  {
211  extern void Ivy_TruthDsdComputePrint( unsigned uTruth );
212  printf( "%3d = %8d canon = %5d ", i, p->nScores[i], p->pMapInv[i] );
213  Ivy_TruthDsdComputePrint( (unsigned)p->pMapInv[i] | ((unsigned)p->pMapInv[i] << 16) );
214  }
215  printf( "\n" );
216 */
217 }
abctime timeMffc
Definition: rwt.h:102
int nNodesGained
Definition: rwt.h:91
abctime timeEval
Definition: rwt.h:101
abctime timeTotal
Definition: rwt.h:104
int nNodesRewritten
Definition: rwt.h:90
static int Counter
int nNodesConsidered
Definition: rwt.h:89
abctime timeTruth
Definition: rwt.h:98
int nSubgraphs
Definition: rwt.h:95
#define ABC_PRT(a, t)
Definition: abc_global.h:220
int nScores[222]
Definition: rwt.h:92
abctime timeUpdate
Definition: rwt.h:103
abctime timeStart
Definition: rwt.h:97
abctime timeCut
Definition: rwt.h:99
int nCutsBad
Definition: rwt.h:94
int nCutsGood
Definition: rwt.h:93
abctime timeRes
Definition: rwt.h:100
void Rwt_ManPrintStatsFile ( Rwt_Man_t p)

Function*************************************************************

Synopsis [Stops the resynthesis manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 230 of file rwtMan.c.

231 {
232  FILE * pTable;
233  pTable = fopen( "stats.txt", "a+" );
234  fprintf( pTable, "%d ", p->nCutsGood );
235  fprintf( pTable, "%d ", p->nSubgraphs );
236  fprintf( pTable, "%d ", p->nNodesRewritten );
237  fprintf( pTable, "%d", p->nNodesGained );
238  fprintf( pTable, "\n" );
239  fclose( pTable );
240 }
int nNodesGained
Definition: rwt.h:91
int nNodesRewritten
Definition: rwt.h:90
int nSubgraphs
Definition: rwt.h:95
int nCutsGood
Definition: rwt.h:93
int Rwt_ManReadCompl ( Rwt_Man_t p)

Function*************************************************************

Synopsis [Stops the resynthesis manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 285 of file rwtMan.c.

286 {
287  return p->fCompl;
288 }
int fCompl
Definition: rwt.h:80
void* Rwt_ManReadDecs ( Rwt_Man_t p)

Function*************************************************************

Synopsis [Stops the resynthesis manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 253 of file rwtMan.c.

254 {
255  return p->pGraph;
256 }
void * pGraph
Definition: rwt.h:82
Vec_Ptr_t* Rwt_ManReadLeaves ( Rwt_Man_t p)

Function*************************************************************

Synopsis [Stops the resynthesis manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 269 of file rwtMan.c.

270 {
271  return p->vFanins;
272 }
Vec_Ptr_t * vFanins
Definition: rwt.h:84
Rwt_Man_t* Rwt_ManStart ( int  fPrecompute)

Function*************************************************************

Synopsis [Starts rewriting manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 87 of file rwtMan.c.

88 {
89  Rwt_Man_t * p;
90  abctime clk = Abc_Clock();
91 clk = Abc_Clock();
92  p = ABC_ALLOC( Rwt_Man_t, 1 );
93  memset( p, 0, sizeof(Rwt_Man_t) );
94  p->nFuncs = (1<<16);
95  // copy the global tables
97  p->puCanons = s_puCanons;
98  p->pPhases = s_pPhases;
99  p->pPerms = s_pPerms;
100  p->pMap = s_pMap;
101  // initialize practical NPN classes
103  // create the table
104  p->pTable = ABC_ALLOC( Rwt_Node_t *, p->nFuncs );
105  memset( p->pTable, 0, sizeof(Rwt_Node_t *) * p->nFuncs );
106  // create the elementary nodes
107  p->pMmNode = Mem_FixedStart( sizeof(Rwt_Node_t) );
108  p->vForest = Vec_PtrAlloc( 100 );
109  Rwt_ManAddVar( p, 0x0000, fPrecompute ); // constant 0
110  Rwt_ManAddVar( p, 0xAAAA, fPrecompute ); // var A
111  Rwt_ManAddVar( p, 0xCCCC, fPrecompute ); // var B
112  Rwt_ManAddVar( p, 0xF0F0, fPrecompute ); // var C
113  Rwt_ManAddVar( p, 0xFF00, fPrecompute ); // var D
114  p->nClasses = 5;
115  // other stuff
116  p->nTravIds = 1;
117  p->pPerms4 = Extra_Permutations( 4 );
118  p->vLevNums = Vec_IntAlloc( 50 );
119  p->vFanins = Vec_PtrAlloc( 50 );
120  p->vFaninsCur = Vec_PtrAlloc( 50 );
121  p->vNodesTemp = Vec_PtrAlloc( 50 );
122  if ( fPrecompute )
123  { // precompute subgraphs
124 // Rwt_ManPrecompute( p );
125 // Rwt_ManPrint( p );
126 // Rwt_ManWriteToArray( p );
127  }
128  else
129  { // load saved subgraphs
130  Rwt_ManLoadFromArray( p, 0 );
131 // Rwt_ManPrint( p );
132  Rwt_ManPreprocess( p );
133  }
134 p->timeStart = Abc_Clock() - clk;
135  return p;
136 }
char * memset()
Rwt_Node_t * Rwt_ManAddVar(Rwt_Man_t *p, unsigned uTruth, int fPrecompute)
Definition: rwtUtil.c:446
void Rwt_ManGlobalStart()
FUNCTION DEFINITIONS ///.
Definition: rwtMan.c:51
static Llb_Mgr_t * p
Definition: llb3Image.c:950
char ** pPerms4
Definition: rwt.h:68
static char * s_pPerms
Definition: rwtMan.c:33
static char * s_pPhases
Definition: rwtMan.c:32
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
static abctime Abc_Clock()
Definition: abc_global.h:279
int nFuncs
Definition: rwt.h:61
Rwt_Node_t ** pTable
Definition: rwt.h:71
Mem_Fixed_t * pMmNode
Definition: rwt.h:73
char ** Extra_Permutations(int n)
Vec_Ptr_t * vNodesTemp
Definition: rwt.h:87
Mem_Fixed_t * Mem_FixedStart(int nEntrySize)
FUNCTION DEFINITIONS ///.
Definition: mem.c:100
void Rwt_ManLoadFromArray(Rwt_Man_t *p, int fVerbose)
Definition: rwtUtil.c:589
char * pPerms
Definition: rwt.h:64
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
Vec_Ptr_t * vFaninsCur
Definition: rwt.h:85
int nTravIds
Definition: rwt.h:75
char * pPhases
Definition: rwt.h:63
static ABC_NAMESPACE_IMPL_START unsigned short * s_puCanons
DECLARATIONS ///.
Definition: rwtMan.c:31
void Rwt_ManPreprocess(Rwt_Man_t *p)
MACRO DEFINITIONS ///.
Definition: rwtDec.c:49
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
Definition: rwt.h:58
abctime timeStart
Definition: rwt.h:97
unsigned char * pMap
Definition: rwt.h:65
Vec_Ptr_t * vFanins
Definition: rwt.h:84
int nClasses
Definition: rwt.h:78
ABC_INT64_T abctime
Definition: abc_global.h:278
Vec_Int_t * vLevNums
Definition: rwt.h:86
Vec_Ptr_t * vForest
Definition: rwt.h:70
char * pPractical
Definition: rwt.h:67
unsigned short * puCanons
Definition: rwt.h:62
static unsigned char * s_pMap
Definition: rwtMan.c:34
char * Rwt_ManGetPractical(Rwt_Man_t *p)
Definition: rwtUtil.c:640
void Rwt_ManStop ( Rwt_Man_t p)

Function*************************************************************

Synopsis [Stops rewriting manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 149 of file rwtMan.c.

150 {
151  if ( p->vClasses )
152  {
153  Rwt_Node_t * pNode;
154  int i, k;
155  Vec_VecForEachEntry( Rwt_Node_t *, p->vClasses, pNode, i, k )
156  Dec_GraphFree( (Dec_Graph_t *)pNode->pNext );
157  }
158  if ( p->vClasses ) Vec_VecFree( p->vClasses );
159  Vec_PtrFree( p->vNodesTemp );
160  Vec_PtrFree( p->vForest );
161  Vec_IntFree( p->vLevNums );
162  Vec_PtrFree( p->vFanins );
163  Vec_PtrFree( p->vFaninsCur );
164  Mem_FixedStop( p->pMmNode, 0 );
165  ABC_FREE( p->pMapInv );
166  ABC_FREE( p->pTable );
167  ABC_FREE( p->pPractical );
168  ABC_FREE( p->pPerms4 );
169  ABC_FREE( p );
170 }
#define Vec_VecForEachEntry(Type, vGlob, pEntry, i, k)
Definition: vecVec.h:87
void Mem_FixedStop(Mem_Fixed_t *p, int fVerbose)
Definition: mem.c:139
static void Vec_VecFree(Vec_Vec_t *p)
Definition: vecVec.h:347
if(last==0)
Definition: sparse_int.h:34
Vec_Vec_t * vClasses
Definition: rwt.h:72
#define ABC_FREE(obj)
Definition: abc_global.h:232
static void Dec_GraphFree(Dec_Graph_t *pGraph)
Definition: dec.h:307
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
static Rwt_Node_t* Rwt_Not ( Rwt_Node_t p)
inlinestatic

Definition at line 124 of file rwt.h.

124 { return (Rwt_Node_t *)((ABC_PTRUINT_T)(p) ^ 01); }
static Rwt_Node_t* Rwt_NotCond ( Rwt_Node_t p,
int  c 
)
inlinestatic

Definition at line 125 of file rwt.h.

125 { return (Rwt_Node_t *)((ABC_PTRUINT_T)(p) ^ (c)); }
static Rwt_Node_t* Rwt_Regular ( Rwt_Node_t p)
inlinestatic

Definition at line 123 of file rwt.h.

123 { return (Rwt_Node_t *)((ABC_PTRUINT_T)(p) & ~01); }