-static sched_timestep_t get_time_step(const ir_node *irn)
-{
- if(is_Phi(irn))
- return 0;
-
- return sched_get_time_step(irn);
-}
-
-static int my_value_dominates(const ir_node *a, const ir_node *b)
-{
- int res = 0;
- const ir_node *ba = get_block(a);
- const ir_node *bb = get_block(b);
-
- /*
- * a and b are not in the same block,
- * so dominance is determined by the dominance of the blocks.
- */
- if(ba != bb) {
- res = block_dominates(ba, bb);
-
- /*
- * Dominance is determined by the time steps of the schedule.
- */
- } else {
- sched_timestep_t as = get_time_step(a);
- sched_timestep_t bs = get_time_step(b);
- res = as <= bs;
- }
-
- return res;
-}
-