Merge lp:~rsandifo/gcc-linaro/lp721531-4.6 into lp:gcc-linaro/4.6
- lp721531-4.6
- Merge into 4.6
Status: | Merged |
---|---|
Merged at revision: | 106768 |
Proposed branch: | lp:~rsandifo/gcc-linaro/lp721531-4.6 |
Merge into: | lp:gcc-linaro/4.6 |
Diff against target: |
199 lines (+97/-20) (has conflicts) 5 files modified
ChangeLog.linaro (+53/-0) gcc/builtins.c (+23/-2) gcc/fold-const.c (+6/-14) gcc/testsuite/gcc.dg/torture/pr49169.c (+15/-0) gcc/tree-ssa-ccp.c (+0/-4) Text conflict in ChangeLog.linaro |
To merge this branch: | bzr merge lp:~rsandifo/gcc-linaro/lp721531-4.6 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ramana Radhakrishnan (community) | Approve | ||
Review via email: mp+66763@code.launchpad.net |
This proposal supersedes a proposal from 2011-06-29.
Commit message
Description of the change
This version includes some branch-local changes to account
for differences in the handling of PR 35705. In mainline,
get_pointer_
but that improvement isn't in 4.6and earlier. This backport
just reuses get_object_
case of DECLs.
(PR 35705 was about optimising away checks for bit 1 (rather than bit 0)
in a HPPA function address. This patch subsumes that one.
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal | # |
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal | # |
cbuild successfully built this on i686-lucid-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106753:
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: g++.dg/
+FAIL: g++.dg/
-PASS: g++.dg/
+FAIL: g++.dg/
The full testsuite results are at:
http://
cbuild-checked: i686-lucid-
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal | # |
cbuild has taken a snapshot of this branch at r106755 and queued it for build.
The snapshot is available at:
http://
and will be built on the following builders:
a9-builder armv5-builder i686 x86_64
You can track the build queue at:
http://
cbuild-snapshot: gcc-linaro-
cbuild-ancestor: lp:gcc-linaro/4.6+bzr106753
cbuild-state: check
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal | # |
cbuild successfully built this on i686-lucid-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106753:
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
The full testsuite results are at:
http://
cbuild-checked: i686-lucid-
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal | # |
cbuild successfully built this on armv7l-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106753:
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+FAIL: gcc.dg/
+FAIL: gcc.dg/
+FAIL: gcc.dg/
+FAIL: gcc.dg/
+FAIL: gcc.dg/
+FAIL: gcc.dg/
+FAIL: gcc.dg/
+PASS: gcc.dg/
The full testsuite results are at:
http://
cbuild-checked: armv7l-
Michael Hope (michaelh1) wrote : Posted in a previous version of this proposal | # |
Does the test case assume the compiler is built for a certain mode?
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal | # |
cbuild successfully built this on x86_64-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106753:
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
The full testsuite results are at:
http://
cbuild-checked: x86_64-
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal | # |
cbuild successfully built this on armv7l-
The build results are available at:
http://
The test suite was not checked as the branch point lp:gcc-linaro/4.6+bzr106753 has nothing to compare against.
The full testsuite results are at:
http://
cbuild-checked: armv7l-
Richard Sandiford (rsandifo) wrote : Posted in a previous version of this proposal | # |
Michael Hope <email address hidden> writes:
> Does the test case assume the compiler is built for a certain mode?
It isn't supposed to. Investigating...
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild has taken a snapshot of this branch at r106756 and queued it for build.
The snapshot is available at:
http://
and will be built on the following builders:
a9-builder armv5-builder i686 x86_64
You can track the build queue at:
http://
cbuild-snapshot: gcc-linaro-
cbuild-ancestor: lp:gcc-linaro/4.6+bzr106753
cbuild-state: check
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on x86_64-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106753:
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
The full testsuite results are at:
http://
cbuild-checked: x86_64-
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on armv7l-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106753:
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
-WARNING: program timed out.
The full testsuite results are at:
http://
cbuild-checked: armv7l-
Ramana Radhakrishnan (ramana) wrote : | # |
This is Ok.
Ramana
Preview Diff
1 | === modified file 'ChangeLog.linaro' |
2 | --- ChangeLog.linaro 2011-07-03 09:08:14 +0000 |
3 | +++ ChangeLog.linaro 2011-07-04 10:08:02 +0000 |
4 | @@ -1,3 +1,4 @@ |
5 | +<<<<<<< TREE |
6 | 2011-07-03 Ira Rosen <ira.rosen@linaro.org> |
7 | |
8 | Backport from FSF: |
9 | @@ -293,6 +294,58 @@ |
10 | gcc/testsuite/ |
11 | * gcc.target/arm/mla-2.c: New test. |
12 | |
13 | +======= |
14 | +2011-07-04 Richard Sandiford <richard.sandiford@linaro.org> |
15 | + |
16 | + gcc/ |
17 | + * builtins.c (get_object_alignment): Fix comment. |
18 | + * fold-const.c (get_pointer_modulus_and_residue): Remove |
19 | + allow_func_align. Use get_object_alignment. |
20 | + (fold_binary_loc): Update caller. |
21 | + |
22 | +2011-06-29 Richard Sandiford <richard.sandiford@linaro.org> |
23 | + |
24 | + gcc/ |
25 | + Backport from mainline: |
26 | + |
27 | + 2011-06-29 Richard Sandiford <richard.sandiford@linaro.org> |
28 | + |
29 | + PR tree-optimization/49545 |
30 | + * builtins.c (get_object_alignment_1): Update function comment. |
31 | + Do not use DECL_ALIGN for functions, but test |
32 | + TARGET_PTRMEMFUNC_VBIT_LOCATION instead. |
33 | + * fold-const.c (get_pointer_modulus_and_residue): Don't check |
34 | + for functions here. |
35 | + * tree-ssa-ccp.c (get_value_from_alignment): Likewise. |
36 | + |
37 | + gcc/testsuite/ |
38 | + Backport from mainline: |
39 | + |
40 | + 2011-06-29 Richard Sandiford <richard.sandiford@linaro.org> |
41 | + |
42 | + * gcc.dg/torture/pr49169.c: Restrict to ARM and MIPS targets. |
43 | + |
44 | +2011-06-27 Richard Sandiford <richard.sandiford@linaro.org> |
45 | + |
46 | + gcc/ |
47 | + Backport from mainline: |
48 | + |
49 | + 2011-07-27 Richard Guenther <rguenther@suse.de> |
50 | + |
51 | + PR tree-optimization/49169 |
52 | + * fold-const.c (get_pointer_modulus_and_residue): Don't rely on |
53 | + the alignment of function decls. |
54 | + |
55 | + gcc/testsuite/ |
56 | + Backport from mainline: |
57 | + |
58 | + 2011-07-27 Michael Hope <michael.hope@linaro.org> |
59 | + Richard Sandiford <richard.sandiford@linaro.org> |
60 | + |
61 | + PR tree-optimization/49169 |
62 | + * gcc.dg/torture/pr49169.c: New test. |
63 | + |
64 | +>>>>>>> MERGE-SOURCE |
65 | 2001-06-02 Richard Sandiford <richard.sandiford@linaro.org> |
66 | |
67 | gcc/ |
68 | |
69 | === modified file 'gcc/builtins.c' |
70 | --- gcc/builtins.c 2011-03-03 21:56:58 +0000 |
71 | +++ gcc/builtins.c 2011-07-04 10:08:02 +0000 |
72 | @@ -264,7 +264,14 @@ |
73 | } |
74 | |
75 | /* Return the alignment in bits of EXP, an object. |
76 | - Don't return more than MAX_ALIGN no matter what. */ |
77 | + Don't return more than MAX_ALIGN no matter what. |
78 | + |
79 | + Note that the address (and thus the alignment) computed here is based |
80 | + on the address to which a symbol resolves, whereas DECL_ALIGN is based |
81 | + on the address at which an object is actually located. These two |
82 | + addresses are not always the same. For example, on ARM targets, |
83 | + the address &foo of a Thumb function foo() has the lowest bit set, |
84 | + whereas foo() itself starts on an even address. */ |
85 | |
86 | unsigned int |
87 | get_object_alignment (tree exp, unsigned int max_align) |
88 | @@ -286,7 +293,21 @@ |
89 | exp = DECL_INITIAL (exp); |
90 | if (DECL_P (exp) |
91 | && TREE_CODE (exp) != LABEL_DECL) |
92 | - align = DECL_ALIGN (exp); |
93 | + { |
94 | + if (TREE_CODE (exp) == FUNCTION_DECL) |
95 | + { |
96 | + /* Function addresses can encode extra information besides their |
97 | + alignment. However, if TARGET_PTRMEMFUNC_VBIT_LOCATION |
98 | + allows the low bit to be used as a virtual bit, we know |
99 | + that the address itself must be 2-byte aligned. */ |
100 | + if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn) |
101 | + align = 2 * BITS_PER_UNIT; |
102 | + else |
103 | + align = BITS_PER_UNIT; |
104 | + } |
105 | + else |
106 | + align = DECL_ALIGN (exp); |
107 | + } |
108 | else if (CONSTANT_CLASS_P (exp)) |
109 | { |
110 | align = TYPE_ALIGN (TREE_TYPE (exp)); |
111 | |
112 | === modified file 'gcc/fold-const.c' |
113 | --- gcc/fold-const.c 2011-05-23 20:37:18 +0000 |
114 | +++ gcc/fold-const.c 2011-07-04 10:08:02 +0000 |
115 | @@ -9232,15 +9232,10 @@ |
116 | 0 <= N < M as is common. In general, the precise value of P is unknown. |
117 | M is chosen as large as possible such that constant N can be determined. |
118 | |
119 | - Returns M and sets *RESIDUE to N. |
120 | - |
121 | - If ALLOW_FUNC_ALIGN is true, do take functions' DECL_ALIGN_UNIT into |
122 | - account. This is not always possible due to PR 35705. |
123 | - */ |
124 | + Returns M and sets *RESIDUE to N. */ |
125 | |
126 | static unsigned HOST_WIDE_INT |
127 | -get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue, |
128 | - bool allow_func_align) |
129 | +get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue) |
130 | { |
131 | enum tree_code code; |
132 | |
133 | @@ -9270,9 +9265,8 @@ |
134 | } |
135 | } |
136 | |
137 | - if (DECL_P (expr) |
138 | - && (allow_func_align || TREE_CODE (expr) != FUNCTION_DECL)) |
139 | - return DECL_ALIGN_UNIT (expr); |
140 | + if (DECL_P (expr)) |
141 | + return get_object_alignment (expr, ~0U) / BITS_PER_UNIT; |
142 | } |
143 | else if (code == POINTER_PLUS_EXPR) |
144 | { |
145 | @@ -9282,8 +9276,7 @@ |
146 | |
147 | op0 = TREE_OPERAND (expr, 0); |
148 | STRIP_NOPS (op0); |
149 | - modulus = get_pointer_modulus_and_residue (op0, residue, |
150 | - allow_func_align); |
151 | + modulus = get_pointer_modulus_and_residue (op0, residue); |
152 | |
153 | op1 = TREE_OPERAND (expr, 1); |
154 | STRIP_NOPS (op1); |
155 | @@ -11163,8 +11156,7 @@ |
156 | unsigned HOST_WIDE_INT modulus, residue; |
157 | unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (arg1); |
158 | |
159 | - modulus = get_pointer_modulus_and_residue (arg0, &residue, |
160 | - integer_onep (arg1)); |
161 | + modulus = get_pointer_modulus_and_residue (arg0, &residue); |
162 | |
163 | /* This works because modulus is a power of 2. If this weren't the |
164 | case, we'd have to replace it by its greatest power-of-2 |
165 | |
166 | === added file 'gcc/testsuite/gcc.dg/torture/pr49169.c' |
167 | --- gcc/testsuite/gcc.dg/torture/pr49169.c 1970-01-01 00:00:00 +0000 |
168 | +++ gcc/testsuite/gcc.dg/torture/pr49169.c 2011-07-04 10:08:02 +0000 |
169 | @@ -0,0 +1,15 @@ |
170 | +/* { dg-do compile { target { arm*-*-* || mips*-*-* } } } */ |
171 | + |
172 | +#include <stdlib.h> |
173 | +#include <stdint.h> |
174 | + |
175 | +int |
176 | +main (void) |
177 | +{ |
178 | + void *p = main; |
179 | + if ((intptr_t) p & 1) |
180 | + abort (); |
181 | + return 0; |
182 | +} |
183 | + |
184 | +/* { dg-final { scan-assembler "abort" } } */ |
185 | |
186 | === modified file 'gcc/tree-ssa-ccp.c' |
187 | --- gcc/tree-ssa-ccp.c 2011-05-05 15:42:22 +0000 |
188 | +++ gcc/tree-ssa-ccp.c 2011-07-04 10:08:02 +0000 |
189 | @@ -522,10 +522,6 @@ |
190 | val = bit_value_binop (PLUS_EXPR, TREE_TYPE (expr), |
191 | TREE_OPERAND (base, 0), TREE_OPERAND (base, 1)); |
192 | else if (base |
193 | - /* ??? While function decls have DECL_ALIGN their addresses |
194 | - may encode extra information in the lower bits on some |
195 | - targets (PR47239). Simply punt for function decls for now. */ |
196 | - && TREE_CODE (base) != FUNCTION_DECL |
197 | && ((align = get_object_alignment (base, BIGGEST_ALIGNMENT)) |
198 | > BITS_PER_UNIT)) |
199 | { |
cbuild has taken a snapshot of this branch at r106754 and queued it for build.
The snapshot is available at: ex.seabright. co.nz/snapshots /gcc-linaro- 4.6+bzr106754~ rsandifo~ lp721531- 4.6.tar. xdelta3. xz
http://
and will be built on the following builders:
a9-builder armv5-builder i686 x86_64
You can track the build queue at: ex.seabright. co.nz/helpers/ scheduler
http://
cbuild-snapshot: gcc-linaro- 4.6+bzr106754~ rsandifo~ lp721531- 4.6
cbuild-ancestor: lp:gcc-linaro/4.6+bzr106753
cbuild-state: check