Small simplification.
[libfirm] / ir / be / beintlive_t.h
index e0871c2..ee02f21 100644 (file)
@@ -31,8 +31,8 @@
 static INLINE int _value_dominates_intrablock(const ir_node *a, const ir_node *b)
 {
        /* TODO: ? :  can be removed?! */
-       sched_timestep_t as = is_Phi(a) ? 0 : sched_get_time_step(a);
-       sched_timestep_t bs = is_Phi(b) ? 0 : sched_get_time_step(b);
+       sched_timestep_t as = sched_is_scheduled(a) ? sched_get_time_step(a) : 0;
+       sched_timestep_t bs = sched_is_scheduled(b) ? sched_get_time_step(b) : 0;
        return as <= bs;
 }
 
@@ -45,8 +45,8 @@ static INLINE int _value_dominates_intrablock(const ir_node *a, const ir_node *b
 static INLINE int _value_strictly_dominates_intrablock(const ir_node *a, const ir_node *b)
 {
        /* TODO: ? :  can be removed?! */
-       sched_timestep_t as = is_Phi(a) ? 0 : sched_get_time_step(a);
-       sched_timestep_t bs = is_Phi(b) ? 0 : sched_get_time_step(b);
+       sched_timestep_t as = sched_is_scheduled(a) ? sched_get_time_step(a) : 0;
+       sched_timestep_t bs = sched_is_scheduled(b) ? sched_get_time_step(b) : 0;
        return as < bs;
 }
 
@@ -59,8 +59,8 @@ static INLINE int _value_strictly_dominates_intrablock(const ir_node *a, const i
  */
 static INLINE int _value_dominates(const ir_node *a, const ir_node *b)
 {
-       const ir_node *block_a = get_block(a);
-       const ir_node *block_b = get_block(b);
+       const ir_node *block_a = get_block_const(a);
+       const ir_node *block_b = get_block_const(b);
 
        /*
         * a and b are not in the same block,
@@ -85,8 +85,8 @@ static INLINE int _value_dominates(const ir_node *a, const ir_node *b)
  */
 static INLINE int _value_strictly_dominates(const ir_node *a, const ir_node *b)
 {
-       const ir_node *block_a = get_block(a);
-       const ir_node *block_b = get_block(b);
+       const ir_node *block_a = get_block_const(a);
+       const ir_node *block_b = get_block_const(b);
 
        /*
         * a and b are not in the same block,