+2004-11-25 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR middle-end/17957
+ * tree-complex.c (vector_inner_type): New variable moved from
+ build_word_mode_vector_type.
+ (vector_last_type): Likewise.
+ (vector_last_nunits): Likewise.
+ (build_word_mode_vector_type): Use the new variables.
+ * Makefile.in (tree-complex.o): Add gt-tree-complex.h $(GGC_H).
+ (GTFILES): Add tree-complex.c.
+ (gt-tree-complex.h): New rule, add it to the rest of the gt-* rules.
+
2004-11-25 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.h (TARGET_CPU_CPP_BUILTINS): Define
tree-complex.o : tree-complex.c $(CONFIG_H) system.h $(TREE_H) \
$(TM_H) $(TREE_FLOW_H) $(TREE_GIMPLE_H) tree-iterator.h tree-pass.h \
$(FLAGS_H) $(OPTABS_H) $(RTL_H) $(MACHMODE_H) $(EXPR_H) \
- langhooks.h $(FLAGS_H) $(DIAGNOSTIC_H)
+ langhooks.h $(FLAGS_H) $(DIAGNOSTIC_H) gt-tree-complex.h $(GGC_H)
df.o : df.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
insn-config.h $(RECOG_H) function.h $(REGS_H) alloc-pool.h hard-reg-set.h \
$(BASIC_BLOCK_H) $(DF_H)
$(srcdir)/tree-phinodes.c $(srcdir)/tree-cfg.c \
$(srcdir)/tree-dfa.c $(srcdir)/tree-ssa-propagate.c \
$(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \
- $(srcdir)/tree-chrec.h \
+ $(srcdir)/tree-chrec.h $(srcdir)/tree-complex.c \
$(srcdir)/tree-ssa-operands.h $(srcdir)/tree-ssa-operands.c \
$(srcdir)/tree-profile.c $(srcdir)/rtl-profile.c $(srcdir)/tree-nested.c \
$(out_file) \
gt-dwarf2out.h gt-ra-build.h gt-reg-stack.h gt-dwarf2asm.h \
gt-dbxout.h gt-c-common.h gt-c-decl.h gt-c-parse.h \
gt-c-pragma.h gtype-c.h gt-input.h gt-cfglayout.h \
-gt-tree-mudflap.h \
+gt-tree-mudflap.h gt-tree-complex.h \
gt-tree-ssa-ccp.h gt-tree-eh.h \
gt-tree-ssanames.h gt-tree-iterator.h gt-gimplify.h \
gt-tree-phinodes.h gt-tree-cfg.h gt-tree-nested.h \
+2004-11-25 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR middle-end/17957
+ * testsuite/gcc.dg/pr17957.c: New test.
+
2004-11-25 Mark Mitchell <mark@codesourcery.com>
PR c++/18445
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "--param ggc-min-expand=0 -param ggc-min-heapsize=0" } */
+__attribute__ ((vector_size (64))) unsigned char v1, v2, v3;
+void
+vadd (void)
+{
+ v1 = v2 + v3;
+}
+void
+test_add (void)
+{
+ vadd ();
+}
+void
+vsub (void)
+{
+ v1 = v2 - v3;
+}
#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.
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 *,
| TODO_verify_stmts, /* todo_flags_finish */
0 /* letter */
};
+
+#include "gt-tree-complex.h"