+
+ if (part->on_touched == 0) {
+ part->touched_next = env->touched;
+ env->touched = part;
+ part->on_touched = 1;
+ }
+
+ check_list(part->touched, part);
+ }
+} /* add_to_touched */
+
+/**
+ * Place a node on the cprop list.
+ *
+ * @param y the node
+ * @param env the environment
+ */
+static void add_to_cprop(node_t *y, environment_t *env) {
+ /* Add y to y.partition.cprop. */
+ if (y->on_cprop == 0) {
+ partition_t *Y = y->part;
+
+ list_add_tail(&y->cprop_list, &Y->cprop);
+ y->on_cprop = 1;
+
+ DB((dbg, LEVEL_3, "Add %+F to part%u.cprop\n", y->node, Y->nr));
+
+ /* place its partition on the cprop list */
+ if (Y->on_cprop == 0) {
+ Y->cprop_next = env->cprop;
+ env->cprop = Y;
+ Y->on_cprop = 1;
+ }
+ }
+ if (get_irn_mode(y->node) == mode_T) {
+ /* mode_T nodes always produce tarval_bottom, so we must explicitly
+ add it's Proj's to get constant evaluation to work */
+ int i;
+
+ for (i = get_irn_n_outs(y->node) - 1; i >= 0; --i) {
+ node_t *proj = get_irn_node(get_irn_out(y->node, i));
+
+ add_to_cprop(proj, env);
+ }
+ } else if (is_Block(y->node)) {
+ /* Due to the way we handle Phi's, we must place all Phis of a block on the list
+ * if someone placed the block. The Block is only placed if the reachability
+ * changes, and this must be re-evaluated in compute_Phi(). */
+ ir_node *phi;
+ for (phi = get_Block_phis(y->node); phi != NULL; phi = get_Phi_next(phi)) {
+ node_t *p = get_irn_node(phi);
+ add_to_cprop(p, env);
+ }
+ /* same for Conds: they must be re-evaluated due to the way we handle Top */
+ if (y->cond != NULL)
+ add_to_cprop(y->cond, env);