+typedef enum block_flags_t {
+ BF_HAS_OPERATIONS = 1 << 0,
+ BF_HAS_PHIS = 1 << 1,
+ BF_IS_UNKNOWN_JUMP_TARGET = 1 << 2,
+} block_flags_t;
+
+static bool get_phase_flag(ir_phase *block_info, ir_node *block, int flag)
+{
+ return PTR_TO_INT(phase_get_irn_data(block_info, block)) & flag;
+}
+
+static void set_phase_flag(ir_phase *block_info, ir_node *block,
+ block_flags_t flag)
+{
+ int data = PTR_TO_INT(phase_get_irn_data(block_info, block));
+ data |= flag;
+ phase_set_irn_data(block_info, block, INT_TO_PTR(data));
+}
+
+static void clear_phase_flag(ir_phase *block_info, ir_node *block)
+{
+ phase_set_irn_data(block_info, block, NULL);
+}
+
+static bool has_operations(ir_phase *block_info, ir_node *block)
+{
+ return get_phase_flag(block_info, block, BF_HAS_OPERATIONS);
+}
+
+static void set_has_operations(ir_phase *block_info, ir_node *block)
+{
+ set_phase_flag(block_info, block, BF_HAS_OPERATIONS);
+}
+
+static bool has_phis(ir_phase *block_info, ir_node *block)
+{
+ return get_phase_flag(block_info, block, BF_HAS_PHIS);
+}
+
+static void set_has_phis(ir_phase *block_info, ir_node *block)
+{
+ set_phase_flag(block_info, block, BF_HAS_PHIS);
+}
+
+static bool is_unknown_jump_target(ir_phase *block_info, ir_node *block)
+{
+ return get_phase_flag(block_info, block, BF_IS_UNKNOWN_JUMP_TARGET);
+}
+
+static void set_is_unknown_jump_target(ir_phase *block_info, ir_node *block)
+{
+ set_phase_flag(block_info, block, BF_IS_UNKNOWN_JUMP_TARGET);
+}
+
+/**
+ * Pre-Walker: fill block info information.
+ */