/** * cloog_block_list_free function: * This function frees the allocated memory for a CloogBlockList structure. * - June 11th 2005: first version. */ void cloog_block_list_free(CloogBlockList * blocklist) { CloogBlockList * temp ; while (blocklist != NULL) { temp = blocklist->next ; cloog_block_free(blocklist->block) ; free(blocklist) ; blocklist = temp ; } }
/** * cloog_block_list_free function: * This function frees the allocated memory for a CloogBlockList structure. * - June 11th 2005: first version. */ void cloog_block_list_free(CloogBlockList * blocklist) { CloogBlockList * temp ; while (blocklist != NULL) { temp = cloog_block_list_next (blocklist); cloog_block_free (cloog_block_list_block (blocklist)); free(blocklist) ; blocklist = temp ; } }
/** * cloog_block_merge function: * this function adds at the end of the statement list of the block 'block', * the statement list of the block 'merged'. Then the CloogBlock structure * of 'merged' is freed (obviously not its statement list that is now * included in 'block'). * - June 11th 2005: first version. */ void cloog_block_merge(CloogBlock * block, CloogBlock * merged) { CloogStatement * statement ; if ((block == NULL) || (merged == NULL)) return ; if (block->statement != NULL) { statement = block->statement ; while (statement->next != NULL) statement = statement->next ; statement->next = merged->statement ; } else block->statement = merged->statement ; merged->statement = NULL; cloog_block_free(merged); }