#include "tree-iterator.h"
#include "tree-pass.h"
#include "flags.h"
+#include "ggc.h"
/* Extract the real or imaginary part of a complex variable or constant.
break;
default:
- abort ();
+ gcc_unreachable ();
}
return gimplify_val (bsi, inner_type, ret);
/* Update dominance info. Note that bb_join's data was
updated by split_block. */
- if (dom_computed[CDI_DOMINATORS] >= DOM_CONS_OK)
+ if (dom_info_available_p (CDI_DOMINATORS))
{
set_immediate_dominator (CDI_DOMINATORS, bb_true, bb_cond);
set_immediate_dominator (CDI_DOMINATORS, bb_false, bb_cond);
t1 = gimplify_build2 (bsi, MULT_EXPR, inner_type, min, ratio);
div = gimplify_build2 (bsi, PLUS_EXPR, inner_type, t1, max);
- /* Result is now ((ar + ai*ratio)/div) + i((ai - ar*ratio)/div). */
+ /* Result is now ((ar + ai*ratio)/div) + i((ai - ar*ratio)/div). */
t1 = gimplify_build2 (bsi, MULT_EXPR, inner_type, ai, ratio);
t2 = gimplify_build2 (bsi, PLUS_EXPR, inner_type, ar, t1);
rr = gimplify_build2 (bsi, code, inner_type, t2, div);
break;
default:
/* C99-like requirements for complex divide (not yet implemented). */
- abort ();
+ gcc_unreachable ();
}
}
TREE_OPERAND (stmt, 0) = cc;
break;
default:
- abort ();
+ gcc_unreachable ();
}
modify_stmt (stmt);
ar = extract_component (bsi, ac, 0);
ai = extract_component (bsi, ac, 1);
- if (TREE_CODE_CLASS (code) == '1')
+ if (TREE_CODE_CLASS (code) == tcc_unary)
bc = br = bi = NULL;
else
{
break;
default:
- abort ();
+ gcc_unreachable ();
}
}
\f
unsigned HOST_WIDE_INT low, high, mask;
tree ret;
- if (n == 0)
- abort ();
+ gcc_assert (n);
if (width == HOST_BITS_PER_WIDE_INT)
low = value;
else if (TYPE_PRECISION (type) == 2 * HOST_BITS_PER_WIDE_INT)
high = low;
else
- abort ();
+ gcc_unreachable ();
ret = build_int_cst_wide (type, low, high);
return ret;
}
+static GTY(()) tree vector_inner_type;
+static GTY(()) tree vector_last_type;
+static GTY(()) int vector_last_nunits;
+
/* Return a suitable vector types made of SUBPARTS units each of mode
"word_mode" (the global variable). */
static tree
build_word_mode_vector_type (int nunits)
{
- static tree innertype;
- static tree last;
- static int last_nunits;
-
- if (!innertype)
- innertype = lang_hooks.types.type_for_mode (word_mode, 1);
- else if (last_nunits == nunits)
- return last;
+ if (!vector_inner_type)
+ vector_inner_type = lang_hooks.types.type_for_mode (word_mode, 1);
+ else if (vector_last_nunits == nunits)
+ {
+ gcc_assert (TREE_CODE (vector_last_type) == VECTOR_TYPE);
+ return vector_last_type;
+ }
/* We build a new type, but we canonicalize it nevertheless,
because it still saves some memory. */
- last_nunits = nunits;
- last = type_hash_canon (nunits, build_vector_type (innertype, nunits));
- return last;
+ vector_last_nunits = nunits;
+ vector_last_type = type_hash_canon (nunits,
+ build_vector_type (vector_inner_type,
+ nunits));
+ return vector_last_type;
}
typedef tree (*elem_op_func) (block_stmt_iterator *,
return;
code = TREE_CODE (rhs);
- if (TREE_CODE_CLASS (code) != '1'
- && TREE_CODE_CLASS (code) != '2')
+ if (TREE_CODE_CLASS (code) != tcc_unary
+ && TREE_CODE_CLASS (code) != tcc_binary)
return;
if (code == NOP_EXPR || code == VIEW_CONVERT_EXPR)
return;
-
- if (code == CONVERT_EXPR)
- abort ();
-
+
+ gcc_assert (code != CONVERT_EXPR);
op = optab_for_tree_code (code, type);
/* Optabs will try converting a negation into a subtraction, so
break;
}
- if (TREE_CODE_CLASS (code) == '1')
+ if (TREE_CODE_CLASS (code) == tcc_unary)
*p_rhs = expand_vector_piecewise (bsi, do_unop, type, compute_type,
TREE_OPERAND (rhs, 0),
NULL_TREE, code);
0, /* todo_flags_start */
TODO_dump_func | TODO_rename_vars /* todo_flags_finish */
| TODO_ggc_collect | TODO_verify_ssa
- | TODO_verify_stmts | TODO_verify_flow
+ | TODO_verify_stmts | TODO_verify_flow,
+ 0 /* letter */
};
struct tree_opt_pass pass_pre_expand =
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_func | TODO_ggc_collect
- | TODO_verify_stmts /* todo_flags_finish */
+ | TODO_verify_stmts, /* todo_flags_finish */
+ 0 /* letter */
};
+
+#include "gt-tree-complex.h"