promote it directly below. Nevertheless, we sometimes reach a block
the first time through a dataflow node. In this case we optimized the
block as such and have to promote the Bad here. */
promote it directly below. Nevertheless, we sometimes reach a block
the first time through a dataflow node. In this case we optimized the
block as such and have to promote the Bad here. */
* prevented, so just set it's cf to Bad.
*/
if (is_Block_dead(new_block)) {
* prevented, so just set it's cf to Bad.
*/
if (is_Block_dead(new_block)) {
ir_node *pred_bl = get_nodes_block(skip_Proj(skipped));
if (is_Block_dead(pred_bl) || (get_Block_dom_depth(pred_bl) < 0)) {
ir_node *pred_bl = get_nodes_block(skip_Proj(skipped));
if (is_Block_dead(pred_bl) || (get_Block_dom_depth(pred_bl) < 0)) {
*changed = 1;
} else if (skipped != pred_X) {
set_Block_cfgpred(block, i, skipped);
*changed = 1;
} else if (skipped != pred_X) {
set_Block_cfgpred(block, i, skipped);
/* Seems to be empty. At least we detected this in collect_nodes. */
if (get_irn_link(b) == NULL) {
/* There are no Phi nodes ==> all predecessors are dispensable. */
/* Seems to be empty. At least we detected this in collect_nodes. */
if (get_irn_link(b) == NULL) {
/* There are no Phi nodes ==> all predecessors are dispensable. */
if (get_Block_idom(b) != predb) {
/* predb is not the dominator. There can't be uses of pred's Phi nodes, kill them .*/
if (get_Block_idom(b) != predb) {
/* predb is not the dominator. There can't be uses of pred's Phi nodes, kill them .*/
} else {
/* predb is the direct dominator of b. There might be uses of the Phi nodes from
predb in further block, so move this phi from the predecessor into the block b */
} else {
/* predb is the direct dominator of b. There might be uses of the Phi nodes from
predb in further block, so move this phi from the predecessor into the block b */
- long num = get_tarval_long(tv);
- long def_num = get_Cond_default_proj(cond);
+ long num = get_tarval_long(tv);
+ long def_num = get_Cond_default_proj(cond);
+ ir_graph *irg = get_irn_irg(cond);
if (def_num == get_Proj_proj(proj1)) {
/* first one is the defProj */
if (num == get_Proj_proj(proj2)) {
jmp = new_r_Jmp(blk);
exchange(proj2, jmp);
if (def_num == get_Proj_proj(proj1)) {
/* first one is the defProj */
if (num == get_Proj_proj(proj2)) {
jmp = new_r_Jmp(blk);
exchange(proj2, jmp);
assert(get_irg_pinned(irg) != op_pin_state_floats &&
"Control flow optimization need a pinned graph");
assert(get_irg_pinned(irg) != op_pin_state_floats &&
"Control flow optimization need a pinned graph");
if (is_Bad(block) || is_Block_dead(block) || get_Block_dom_depth(block) < 0) {
/* do NOT keep nodes in dead blocks */
if (is_Bad(block) || is_Block_dead(block) || get_Block_dom_depth(block) < 0) {
/* do NOT keep nodes in dead blocks */
if (is_Bad(block) || is_Block_dead(block) || get_Block_dom_depth(block) < 0) {
/* do NOT keep nodes in dead blocks */
if (is_Bad(block) || is_Block_dead(block) || get_Block_dom_depth(block) < 0) {
/* do NOT keep nodes in dead blocks */