void BurnRegTree( reg_tree *tree ) /***********************************/ { if( tree != NULL ) { BurnRegTree( tree->lo ); BurnRegTree( tree->hi ); if( tree->regs != NULL ) { FreeRegSet( tree->regs ); } FreeRegTree( tree ); } }
static void TrimTree( reg_tree *tree ) /****************************************/ { if( tree->lo != NULL ) { if( !tree->lo->has_name ) { BurnRegTree( tree->lo ); tree->lo = NULL; } else { TrimTree( tree->lo ); } } if( tree->hi != NULL ) { if( !tree->hi->has_name ) { BurnRegTree( tree->hi ); tree->hi = NULL; } else { TrimTree( tree->hi ); } } }
static reg_tree *CheckTree( reg_tree *tree ) /**************************************************/ { name *alias; name *temp; alias = tree->temp; temp = alias; for( ;; ) { temp = temp->t.alias; if( ( temp->t.temp_flags & VISITED ) == EMPTY ) { BurnRegTree( tree ); tree = NULL; break; } if( temp == alias ) break; } return( tree ); }
void BurnNameTree( reg_tree *tree ) /************************************/ { BurnRegTree( tree ); }