{
struct int_tree_map *h, in;
in.uid = uid;
- h = htab_find_with_hash (complex_variable_components, &in, uid);
+ h = (struct int_tree_map *) htab_find_with_hash (complex_variable_components, &in, uid);
return h ? h->to : NULL;
}
tree ar, tree ai, tree br, tree bi,
enum tree_code code)
{
- tree rr, ri, ratio, div, t1, t2, tr, ti, cond;
+ tree rr, ri, ratio, div, t1, t2, tr, ti, compare;
basic_block bb_cond, bb_true, bb_false, bb_join;
/* Examine |br| < |bi|, and branch. */
t1 = gimplify_build1 (bsi, ABS_EXPR, inner_type, br);
t2 = gimplify_build1 (bsi, ABS_EXPR, inner_type, bi);
- cond = fold_build2 (LT_EXPR, boolean_type_node, t1, t2);
- STRIP_NOPS (cond);
+ compare = fold_build2 (LT_EXPR, boolean_type_node, t1, t2);
+ STRIP_NOPS (compare);
bb_cond = bb_true = bb_false = bb_join = NULL;
rr = ri = tr = ti = NULL;
- if (!TREE_CONSTANT (cond))
+ if (!TREE_CONSTANT (compare))
{
edge e;
+ tree cond, tmp;
- cond = build3 (COND_EXPR, void_type_node, cond, NULL_TREE, NULL_TREE);
+ tmp = create_tmp_var (boolean_type_node, NULL);
+ cond = build_gimple_modify_stmt (tmp, compare);
+ if (gimple_in_ssa_p (cfun))
+ tmp = make_ssa_name (tmp, cond);
+ GIMPLE_STMT_OPERAND (cond, 0) = tmp;
+ bsi_insert_before (bsi, cond, BSI_SAME_STMT);
+
+ cond = build3 (COND_EXPR, void_type_node, tmp, NULL_TREE, NULL_TREE);
bsi_insert_before (bsi, cond, BSI_SAME_STMT);
/* Split the original block, and create the TRUE and FALSE blocks. */
ti = (ai * ratio) - ar;
tr = tr / div;
ti = ti / div; */
- if (bb_true || integer_nonzerop (cond))
+ if (bb_true || integer_nonzerop (compare))
{
if (bb_true)
{
ti = b - (a * ratio);
tr = tr / div;
ti = ti / div; */
- if (bb_false || integer_zerop (cond))
+ if (bb_false || integer_zerop (compare))
{
if (bb_false)
{
return 0;
}
-struct tree_opt_pass pass_lower_complex =
+struct gimple_opt_pass pass_lower_complex =
{
+ {
+ GIMPLE_PASS,
"cplxlower", /* name */
0, /* gate */
tree_lower_complex, /* execute */
TODO_dump_func
| TODO_ggc_collect
| TODO_update_ssa
- | TODO_verify_stmts, /* todo_flags_finish */
- 0 /* letter */
+ | TODO_verify_stmts /* todo_flags_finish */
+ }
};
\f
return optimize == 0 || sorrycount || errorcount;
}
-struct tree_opt_pass pass_lower_complex_O0 =
+struct gimple_opt_pass pass_lower_complex_O0 =
{
+ {
+ GIMPLE_PASS,
"cplxlower0", /* name */
gate_no_optimization, /* gate */
tree_lower_complex_O0, /* execute */
0, /* todo_flags_start */
TODO_dump_func | TODO_ggc_collect
| TODO_verify_stmts, /* todo_flags_finish */
- 0 /* letter */
+ }
};