summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bera.c
diff options
context:
space:
mode:
authorSebastian Hack <hack@ipd.info.uni-karlsruhe.de>2006-08-08 10:18:02 +0200
committerSebastian Hack <hack@ipd.info.uni-karlsruhe.de>2006-08-08 10:18:02 +0200
commit55c672a6f8b81bbd1e9614fbcb85230fe0402ddd (patch)
tree6cf9f9650f5b0ee150df176cbf70867309fc9d02 /ir/be/bera.c
parent693d8f30cce7910cee31756db96a32e7a1c65ad9 (diff)
Added support for memory phis in liveness
Diffstat (limited to 'ir/be/bera.c')
-rw-r--r--ir/be/bera.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ir/be/bera.c b/ir/be/bera.c
index 9a1bb75..97369e1 100644
--- a/ir/be/bera.c
+++ b/ir/be/bera.c
@@ -18,6 +18,11 @@
#include "besched_t.h"
#include "belive_t.h"
+static sched_timestep_t get_time_step(const ir_node *irn)
+{
+ return is_Phi(irn) ? 0 : sched_get_time_step(irn);
+}
+
int value_dominates(const ir_node *a, const ir_node *b)
{
int res = 0;
@@ -35,8 +40,8 @@ int value_dominates(const ir_node *a, const ir_node *b)
* Dominance is determined by the time steps of the schedule.
*/
} else {
- sched_timestep_t as = sched_get_time_step(a);
- sched_timestep_t bs = sched_get_time_step(b);
+ sched_timestep_t as = get_time_step(a);
+ sched_timestep_t bs = get_time_step(b);
res = as <= bs;
}