summaryrefslogtreecommitdiff
path: root/chill/include/ir_rose_utils.hh
blob: 350aa24ae1c692daa351dd2aa51077b79f99d4fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef IR_ROSE_UTILS_HH
#define IR_ROSE_UTILS_HH

/*!
 * \file
 * \brief ROSE interface utilities
 */
#include <vector>
#include <rose.h>
#include <sageBuilder.h>

std::vector<SgForStatement *> find_deepest_loops(SgNode *tnl);
std::vector<SgForStatement *> find_loops(SgNode *tnl);

SgNode* loop_body_at_level(SgNode* tnl, int level);
SgNode* loop_body_at_level(SgForStatement* loop, int level);
void swap_node_for_node_list(SgNode* tn, SgNode* new_tnl);

#endif