From 26277d41791a5f1817fbd3412ddb06f6efc961b9 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 22 Jul 2004 08:20:40 +0000 Subject: tree-cfg.c (gimplify_val): Move from tree-complex.c. 2004-07-22 Paolo Bonzini * tree-cfg.c (gimplify_val): Move from tree-complex.c. (gimplify_build1): Move from tree-complex.c do_unop. (gimplify_build2): Move from tree-complex.c do_binop. (gimplify_build3): New. * tree-complex.c (gimplify_val, do_unop, do_binop): Remove. Adjust throughout to call the functions above. * tree-flow.h: Declare the functions above. * tree-nested.c (gimplify_val): Rename to... (tsi_gimplify_val): ... this. * Makefile.in (tree_complex.o): Update dependencies. (stor-layout.o): Depend on regs.h. * c-common.c (handle_vector_size_attribute): Update for vector types without corresponding vector modes. * expr.c (expand_expr): Treat VECTOR_CST's like CONSTRUCTORS if a corresponding vector mode is not available. * print-tree.c (print_node): Print nunits for vector types * regclass.c (have_regs_of_mode): New. (init_reg_sets_1): Initialize it and use it instead of allocatable_regs_of_mode. * regs.h (have_regs_of_mode): Declare it. * stor-layout.c (layout_type): Pick a mode for vector types. * tree-complex.c (build_word_mode_vector_type, tree_vec_extract, build_replicated_const, do_unop, do_binop, do_plus_minus, do_negate, expand_vector_piecewise, expand_vector_parallel, expand_vector_addition, expand_vector_operations_1, expand_vector_operations, tree_lower_operations, pass_lower_vector_ssa, pass_pre_expand): New. (expand_complex_operations, pass_lower_complex): Remove. * tree-optimize.c (init_tree_optimization_passes): Adjust pass ordering for changes in tree-complex.c. * tree-pass.h: Declare new passes. * tree.c (finish_vector_type): Remove. (make_vector_type): New. (build_vector_type_for_mode, build_vector_type): Rewritten. * tree.def (VECTOR_TYPE): Document where the number of subparts is stored. * tree.h (TYPE_VECTOR_SUBPARTS): Use TYPE_PRECISION field. (make_vector): Remove declaration. From-SVN: r85039 --- gcc/regclass.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gcc/regclass.c') diff --git a/gcc/regclass.c b/gcc/regclass.c index 5bc6cc8..f341c39 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -191,6 +191,10 @@ const char * reg_names[] = REGISTER_NAMES; enum machine_mode reg_raw_mode[FIRST_PSEUDO_REGISTER]; +/* 1 if there is a register of given mode. */ + +bool have_regs_of_mode [MAX_MACHINE_MODE]; + /* 1 if class does contain register of given mode. */ static char contains_reg_of_mode [N_REG_CLASSES] [MAX_MACHINE_MODE]; @@ -305,7 +309,6 @@ init_reg_sets_1 (void) { unsigned int i, j; unsigned int /* enum machine_mode */ m; - char allocatable_regs_of_mode [MAX_MACHINE_MODE]; /* This macro allows the fixed or call-used registers and the register classes to depend on target flags. */ @@ -469,8 +472,8 @@ init_reg_sets_1 (void) SET_HARD_REG_BIT (regs_invalidated_by_call, i); } + memset (have_regs_of_mode, 0, sizeof (have_regs_of_mode)); memset (contains_reg_of_mode, 0, sizeof (contains_reg_of_mode)); - memset (allocatable_regs_of_mode, 0, sizeof (allocatable_regs_of_mode)); for (m = 0; m < (unsigned int) MAX_MACHINE_MODE; m++) for (i = 0; i < N_REG_CLASSES; i++) if ((unsigned) CLASS_MAX_NREGS (i, m) <= reg_class_size[i]) @@ -479,7 +482,7 @@ init_reg_sets_1 (void) && HARD_REGNO_MODE_OK (j, m)) { contains_reg_of_mode [i][m] = 1; - allocatable_regs_of_mode [m] = 1; + have_regs_of_mode [m] = 1; break; } @@ -487,7 +490,7 @@ init_reg_sets_1 (void) and take the maximum cost of moving any subset to any other. */ for (m = 0; m < (unsigned int) MAX_MACHINE_MODE; m++) - if (allocatable_regs_of_mode [m]) + if (have_regs_of_mode [m]) { for (i = 0; i < N_REG_CLASSES; i++) if (contains_reg_of_mode [i][m]) -- cgit v1.1