[9dc416eb] | 1 | Submitted By: Jim Gifford (jim at cross-lfs dot org)
|
---|
| 2 | Date: 07-22-2009
|
---|
| 3 | Initial Package Version: 4.4.1
|
---|
| 4 | Origin: Upstream
|
---|
| 5 | Upstream Status: Applied
|
---|
| 6 | Description: This is a branch update for gcc-4.4.1, and should be
|
---|
| 7 | rechecked periodically.
|
---|
| 8 |
|
---|
| 9 | This patch was made from Revision # 149965.
|
---|
| 10 |
|
---|
| 11 | diff -Naur gcc-4.4.1.orig/gcc/resource.c gcc-4.4.1/gcc/resource.c
|
---|
| 12 | --- gcc-4.4.1.orig/gcc/resource.c 2009-05-21 16:17:37.000000000 -0700
|
---|
| 13 | +++ gcc-4.4.1/gcc/resource.c 2009-07-22 16:22:24.000000000 -0700
|
---|
| 14 | @@ -945,10 +945,11 @@
|
---|
| 15 |
|
---|
| 16 | /* If we found a basic block, get the live registers from it and update
|
---|
| 17 | them with anything set or killed between its start and the insn before
|
---|
| 18 | - TARGET. Otherwise, we must assume everything is live. */
|
---|
| 19 | + TARGET; this custom life analysis is really about registers so we need
|
---|
| 20 | + to use the LR problem. Otherwise, we must assume everything is live. */
|
---|
| 21 | if (b != -1)
|
---|
| 22 | {
|
---|
| 23 | - regset regs_live = df_get_live_in (BASIC_BLOCK (b));
|
---|
| 24 | + regset regs_live = DF_LR_IN (BASIC_BLOCK (b));
|
---|
| 25 | rtx start_insn, stop_insn;
|
---|
| 26 |
|
---|
| 27 | /* Compute hard regs live at start of block. */
|
---|
| 28 | @@ -1052,7 +1053,7 @@
|
---|
| 29 | {
|
---|
| 30 | HARD_REG_SET extra_live;
|
---|
| 31 |
|
---|
| 32 | - REG_SET_TO_HARD_REG_SET (extra_live, df_get_live_in (bb));
|
---|
| 33 | + REG_SET_TO_HARD_REG_SET (extra_live, DF_LR_IN (bb));
|
---|
| 34 | IOR_HARD_REG_SET (current_live_regs, extra_live);
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
| 37 | diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40321.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40321.c
|
---|
| 38 | --- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40321.c 1969-12-31 16:00:00.000000000 -0800
|
---|
| 39 | +++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40321.c 2009-07-22 07:45:21.000000000 -0700
|
---|
| 40 | @@ -0,0 +1,12 @@
|
---|
| 41 | +struct X { int flag; int pos; };
|
---|
| 42 | +int foo(struct X *a, struct X *b)
|
---|
| 43 | +{
|
---|
| 44 | + while (1)
|
---|
| 45 | + {
|
---|
| 46 | + if (a->flag)
|
---|
| 47 | + break;
|
---|
| 48 | + ({ struct X *tmp = a; a = b; b = tmp; });
|
---|
| 49 | + }
|
---|
| 50 | +
|
---|
| 51 | + return a->pos + b->pos;
|
---|
| 52 | +}
|
---|
| 53 | diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40321.C gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40321.C
|
---|
| 54 | --- gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40321.C 1969-12-31 16:00:00.000000000 -0800
|
---|
| 55 | +++ gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40321.C 2009-07-22 07:45:21.000000000 -0700
|
---|
| 56 | @@ -0,0 +1,25 @@
|
---|
| 57 | +/* { dg-do compile } */
|
---|
| 58 | +
|
---|
| 59 | +struct VectorD2
|
---|
| 60 | +{
|
---|
| 61 | + VectorD2() : x(0), y(0) { }
|
---|
| 62 | + VectorD2(int _x, int _y) : x(_x), y(_y) { }
|
---|
| 63 | + int x, y;
|
---|
| 64 | + int GetLength2() const { return x*x + y*y; };
|
---|
| 65 | + VectorD2 operator+(const VectorD2 vec) const {
|
---|
| 66 | + return VectorD2(x+vec.x,y+vec.y);
|
---|
| 67 | + }
|
---|
| 68 | +};
|
---|
| 69 | +struct Shape
|
---|
| 70 | +{
|
---|
| 71 | + enum Type { ST_RECT, ST_CIRCLE } type;
|
---|
| 72 | + VectorD2 pos;
|
---|
| 73 | + VectorD2 radius;
|
---|
| 74 | + bool CollisionWith(const Shape& s) const;
|
---|
| 75 | +};
|
---|
| 76 | +bool Shape::CollisionWith(const Shape& s) const
|
---|
| 77 | +{
|
---|
| 78 | + if(type == ST_CIRCLE && s.type == ST_RECT)
|
---|
| 79 | + return s.CollisionWith(*this);
|
---|
| 80 | + return (pos + s.pos).GetLength2() < (radius + s.radius).GetLength2();
|
---|
| 81 | +}
|
---|
| 82 | diff -Naur gcc-4.4.1.orig/gcc/tree-ssa-pre.c gcc-4.4.1/gcc/tree-ssa-pre.c
|
---|
| 83 | --- gcc-4.4.1.orig/gcc/tree-ssa-pre.c 2009-02-20 07:20:38.000000000 -0800
|
---|
| 84 | +++ gcc-4.4.1/gcc/tree-ssa-pre.c 2009-07-22 07:45:21.000000000 -0700
|
---|
| 85 | @@ -3507,11 +3507,7 @@
|
---|
| 86 | }
|
---|
| 87 |
|
---|
| 88 |
|
---|
| 89 | -/* Add OP to EXP_GEN (block), and possibly to the maximal set if it is
|
---|
| 90 | - not defined by a phi node.
|
---|
| 91 | - PHI nodes can't go in the maximal sets because they are not in
|
---|
| 92 | - TMP_GEN, so it is possible to get into non-monotonic situations
|
---|
| 93 | - during ANTIC calculation, because it will *add* bits. */
|
---|
| 94 | +/* Add OP to EXP_GEN (block), and possibly to the maximal set. */
|
---|
| 95 |
|
---|
| 96 | static void
|
---|
| 97 | add_to_exp_gen (basic_block block, tree op)
|
---|
| 98 | @@ -3523,9 +3519,7 @@
|
---|
| 99 | return;
|
---|
| 100 | result = get_or_alloc_expr_for_name (op);
|
---|
| 101 | bitmap_value_insert_into_set (EXP_GEN (block), result);
|
---|
| 102 | - if (TREE_CODE (op) != SSA_NAME
|
---|
| 103 | - || gimple_code (SSA_NAME_DEF_STMT (op)) != GIMPLE_PHI)
|
---|
| 104 | - bitmap_value_insert_into_set (maximal_set, result);
|
---|
| 105 | + bitmap_value_insert_into_set (maximal_set, result);
|
---|
| 106 | }
|
---|
| 107 | }
|
---|
| 108 |
|
---|
| 109 | @@ -3544,6 +3538,20 @@
|
---|
| 110 | add_to_value (get_expr_value_id (e), e);
|
---|
| 111 | bitmap_insert_into_set (PHI_GEN (block), e);
|
---|
| 112 | bitmap_value_insert_into_set (AVAIL_OUT (block), e);
|
---|
| 113 | + if (!in_fre)
|
---|
| 114 | + {
|
---|
| 115 | + unsigned i;
|
---|
| 116 | + for (i = 0; i < gimple_phi_num_args (phi); ++i)
|
---|
| 117 | + {
|
---|
| 118 | + tree arg = gimple_phi_arg_def (phi, i);
|
---|
| 119 | + if (TREE_CODE (arg) == SSA_NAME)
|
---|
| 120 | + {
|
---|
| 121 | + e = get_or_alloc_expr_for_name (arg);
|
---|
| 122 | + add_to_value (get_expr_value_id (e), e);
|
---|
| 123 | + bitmap_value_insert_into_set (maximal_set, e);
|
---|
| 124 | + }
|
---|
| 125 | + }
|
---|
| 126 | + }
|
---|
| 127 | }
|
---|
| 128 | }
|
---|
| 129 |
|
---|
| 130 | @@ -4254,11 +4262,12 @@
|
---|
| 131 | FOR_ALL_BB (bb)
|
---|
| 132 | {
|
---|
| 133 | print_bitmap_set (dump_file, EXP_GEN (bb), "exp_gen", bb->index);
|
---|
| 134 | - print_bitmap_set (dump_file, TMP_GEN (bb), "tmp_gen",
|
---|
| 135 | - bb->index);
|
---|
| 136 | - print_bitmap_set (dump_file, AVAIL_OUT (bb), "avail_out",
|
---|
| 137 | - bb->index);
|
---|
| 138 | + print_bitmap_set (dump_file, PHI_GEN (bb), "phi_gen", bb->index);
|
---|
| 139 | + print_bitmap_set (dump_file, TMP_GEN (bb), "tmp_gen", bb->index);
|
---|
| 140 | + print_bitmap_set (dump_file, AVAIL_OUT (bb), "avail_out", bb->index);
|
---|
| 141 | }
|
---|
| 142 | +
|
---|
| 143 | + print_bitmap_set (dump_file, maximal_set, "maximal", 0);
|
---|
| 144 | }
|
---|
| 145 |
|
---|
| 146 | /* Insert can get quite slow on an incredibly large number of basic
|
---|
| 147 | diff -Naur gcc-4.4.1.orig/gcc/version.c gcc-4.4.1/gcc/version.c
|
---|
| 148 | --- gcc-4.4.1.orig/gcc/version.c 2007-08-21 08:35:30.000000000 -0700
|
---|
| 149 | +++ gcc-4.4.1/gcc/version.c 2009-07-22 17:04:03.000000000 -0700
|
---|
| 150 | @@ -14,4 +14,4 @@
|
---|
| 151 | Makefile. */
|
---|
| 152 |
|
---|
| 153 | const char version_string[] = BASEVER DATESTAMP DEVPHASE REVISION;
|
---|
| 154 | -const char pkgversion_string[] = PKGVERSION;
|
---|
| 155 | +const char pkgversion_string[] = "(GCC for Cross-LFS 4.4.1.20090722) ";
|
---|
| 156 | diff -Naur gcc-4.4.1.orig/libstdc++-v3/include/std/valarray gcc-4.4.1/libstdc++-v3/include/std/valarray
|
---|
| 157 | --- gcc-4.4.1.orig/libstdc++-v3/include/std/valarray 2009-04-09 16:23:07.000000000 -0700
|
---|
| 158 | +++ gcc-4.4.1/libstdc++-v3/include/std/valarray 2009-07-22 03:25:53.000000000 -0700
|
---|
| 159 | @@ -1,7 +1,7 @@
|
---|
| 160 | // The template and inlines for the -*- C++ -*- valarray class.
|
---|
| 161 |
|
---|
| 162 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
---|
| 163 | -// 2006, 2007, 2009
|
---|
| 164 | +// 2006, 2007, 2008, 2009
|
---|
| 165 | // Free Software Foundation, Inc.
|
---|
| 166 | //
|
---|
| 167 | // This file is part of the GNU ISO C++ Library. This library is free
|
---|
| 168 | @@ -647,7 +647,7 @@
|
---|
| 169 | template<typename _Tp>
|
---|
| 170 | inline
|
---|
| 171 | valarray<_Tp>::valarray(initializer_list<_Tp> __l)
|
---|
| 172 | - : _M_size(__l.size()), _M_data(__valarray_get_storage<_Tp>(__l.size()))
|
---|
| 173 | + : _M_size(__l.size()), _M_data(__valarray_get_storage<_Tp>(__l.size()))
|
---|
| 174 | { std::__valarray_copy_construct (__l.begin(), __l.end(), _M_data); }
|
---|
| 175 | #endif
|
---|
| 176 |
|
---|
| 177 | @@ -681,6 +681,7 @@
|
---|
| 178 | {
|
---|
| 179 | _GLIBCXX_DEBUG_ASSERT(_M_size == __l.size());
|
---|
| 180 | std::__valarray_copy(__l.begin(), __l.size(), _M_data);
|
---|
| 181 | + return *this;
|
---|
| 182 | }
|
---|
| 183 | #endif
|
---|
| 184 |
|
---|