From c285135eb903c31cd221f90f03e288a6b67770cd Mon Sep 17 00:00:00 2001 From: Derick Huth Date: Thu, 24 Sep 2015 11:26:53 -0600 Subject: pre-v0.2.1 --- ir_cuda_suif_utils.cc | 54 --------------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 ir_cuda_suif_utils.cc (limited to 'ir_cuda_suif_utils.cc') diff --git a/ir_cuda_suif_utils.cc b/ir_cuda_suif_utils.cc deleted file mode 100644 index f15c190..0000000 --- a/ir_cuda_suif_utils.cc +++ /dev/null @@ -1,54 +0,0 @@ -/***************************************************************************** - Copyright (C) 2008 University of Southern California - Copyright (C) 2009 University of Utah - All Rights Reserved. - - Purpose: - SUIF interface utilities. - - Notes: - - Update history: - 01/2006 created by Chun Chen -*****************************************************************************/ - -#include -#include "ir_suif_utils.hh" - - -/** - * Returns the body of the for loop found by finding the first loop in - * code, and if level > 1 recursively calling on the body of the found - * loop and (level-1) - */ -tree_node_list* loop_body_at_level(tree_node_list* tnl, int level) -{ - tree_node_list *inner_nl = 0; - //Now strip out the tnl on the inner level of the for loop - tree_node_list_iter tnli(tnl); - while (!tnli.is_empty()) { - tree_node *node = tnli.step(); - if(node->kind() == TREE_FOR) - { - //Found the first tree_for, call sibling function - inner_nl = loop_body_at_level((tree_for*)node, level); - break; - } - } - return inner_nl; -} - -tree_node_list* loop_body_at_level(tree_for* loop, int level) -{ - if(level > 1) - return loop_body_at_level(loop->body(), level-1); - return loop->body(); -} - -tree_node_list* swap_node_for_node_list(tree_node* tn, tree_node_list* new_tnl) -{ - tree_node_list* tnl = tn->parent(); - tnl->insert_after(new_tnl, tn->list_e()); - delete tnl->remove(tn->list_e()); - return tnl; -} -- cgit v1.2.3-70-g09d2