Commit 64eae41a authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Add is_cdep_on

[r7795]
parent 85b5dacc
......@@ -134,6 +134,17 @@ void free_cdep(ir_graph* irg)
}
int is_cdep_on(const ir_node* dependee, const ir_node* candidate)
{
const cdep* dep;
for (dep = find_cdep(dependee); dep != NULL; dep = dep->next) {
if (dep->node == candidate) return 1;
}
return 0;
}
int is_iterated_cdep_on(ir_node* dependee, ir_node* candidate)
{
const cdep* dep;
......
......@@ -14,6 +14,8 @@ void free_cdep(ir_graph*);
cdep* find_cdep(const ir_node* block);
int is_cdep_on(const ir_node* dependee, const ir_node* candidate);
int is_iterated_cdep_on(ir_node* dependee, ir_node* candidate);
ir_node* get_unique_cdep(const ir_node* block);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment