summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beuses.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-06-09 17:43:54 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2018-06-09 17:43:54 +0200
commitfc02cafd2cf4d9401ea60cf184115443a2d17cc4 (patch)
tree2b0045f791f1af1c8b59ccb7a195e778131f09a3 /ir/be/beuses.c
parent26140a74223e9bd1fab6152d0b50dae2ce9df04d (diff)
beuses: Assert that get_step() and set_step() are not used with blocks.
Only instructions have a sensible time step.
Diffstat (limited to 'ir/be/beuses.c')
-rw-r--r--ir/be/beuses.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ir/be/beuses.c b/ir/be/beuses.c
index cb62278..460e7a8 100644
--- a/ir/be/beuses.c
+++ b/ir/be/beuses.c
@@ -145,6 +145,7 @@ static bool be_is_phi_argument(const ir_node *block, const ir_node *def)
*/
static inline unsigned get_step(const ir_node *node)
{
+ assert(!is_Block(node));
return (unsigned)PTR_TO_INT(get_irn_link(node));
}
@@ -153,6 +154,7 @@ static inline unsigned get_step(const ir_node *node)
*/
static inline void set_step(ir_node *node, unsigned step)
{
+ assert(!is_Block(node));
set_irn_link(node, INT_TO_PTR(step));
}