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 | 1 | <<<<<<< TREE | ||
6 | 1 | 2011-07-03 Ira Rosen <ira.rosen@linaro.org> | 2 | 2011-07-03 Ira Rosen <ira.rosen@linaro.org> |
7 | 2 | 3 | ||
8 | 3 | Backport from FSF: | 4 | Backport from FSF: |
9 | @@ -293,6 +294,58 @@ | |||
10 | 293 | gcc/testsuite/ | 294 | gcc/testsuite/ |
11 | 294 | * gcc.target/arm/mla-2.c: New test. | 295 | * gcc.target/arm/mla-2.c: New test. |
12 | 295 | 296 | ||
13 | 297 | ======= | ||
14 | 298 | 2011-07-04 Richard Sandiford <richard.sandiford@linaro.org> | ||
15 | 299 | |||
16 | 300 | gcc/ | ||
17 | 301 | * builtins.c (get_object_alignment): Fix comment. | ||
18 | 302 | * fold-const.c (get_pointer_modulus_and_residue): Remove | ||
19 | 303 | allow_func_align. Use get_object_alignment. | ||
20 | 304 | (fold_binary_loc): Update caller. | ||
21 | 305 | |||
22 | 306 | 2011-06-29 Richard Sandiford <richard.sandiford@linaro.org> | ||
23 | 307 | |||
24 | 308 | gcc/ | ||
25 | 309 | Backport from mainline: | ||
26 | 310 | |||
27 | 311 | 2011-06-29 Richard Sandiford <richard.sandiford@linaro.org> | ||
28 | 312 | |||
29 | 313 | PR tree-optimization/49545 | ||
30 | 314 | * builtins.c (get_object_alignment_1): Update function comment. | ||
31 | 315 | Do not use DECL_ALIGN for functions, but test | ||
32 | 316 | TARGET_PTRMEMFUNC_VBIT_LOCATION instead. | ||
33 | 317 | * fold-const.c (get_pointer_modulus_and_residue): Don't check | ||
34 | 318 | for functions here. | ||
35 | 319 | * tree-ssa-ccp.c (get_value_from_alignment): Likewise. | ||
36 | 320 | |||
37 | 321 | gcc/testsuite/ | ||
38 | 322 | Backport from mainline: | ||
39 | 323 | |||
40 | 324 | 2011-06-29 Richard Sandiford <richard.sandiford@linaro.org> | ||
41 | 325 | |||
42 | 326 | * gcc.dg/torture/pr49169.c: Restrict to ARM and MIPS targets. | ||
43 | 327 | |||
44 | 328 | 2011-06-27 Richard Sandiford <richard.sandiford@linaro.org> | ||
45 | 329 | |||
46 | 330 | gcc/ | ||
47 | 331 | Backport from mainline: | ||
48 | 332 | |||
49 | 333 | 2011-07-27 Richard Guenther <rguenther@suse.de> | ||
50 | 334 | |||
51 | 335 | PR tree-optimization/49169 | ||
52 | 336 | * fold-const.c (get_pointer_modulus_and_residue): Don't rely on | ||
53 | 337 | the alignment of function decls. | ||
54 | 338 | |||
55 | 339 | gcc/testsuite/ | ||
56 | 340 | Backport from mainline: | ||
57 | 341 | |||
58 | 342 | 2011-07-27 Michael Hope <michael.hope@linaro.org> | ||
59 | 343 | Richard Sandiford <richard.sandiford@linaro.org> | ||
60 | 344 | |||
61 | 345 | PR tree-optimization/49169 | ||
62 | 346 | * gcc.dg/torture/pr49169.c: New test. | ||
63 | 347 | |||
64 | 348 | >>>>>>> MERGE-SOURCE | ||
65 | 296 | 2001-06-02 Richard Sandiford <richard.sandiford@linaro.org> | 349 | 2001-06-02 Richard Sandiford <richard.sandiford@linaro.org> |
66 | 297 | 350 | ||
67 | 298 | gcc/ | 351 | gcc/ |
68 | 299 | 352 | ||
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 | 264 | } | 264 | } |
74 | 265 | 265 | ||
75 | 266 | /* Return the alignment in bits of EXP, an object. | 266 | /* Return the alignment in bits of EXP, an object. |
77 | 267 | Don't return more than MAX_ALIGN no matter what. */ | 267 | Don't return more than MAX_ALIGN no matter what. |
78 | 268 | |||
79 | 269 | Note that the address (and thus the alignment) computed here is based | ||
80 | 270 | on the address to which a symbol resolves, whereas DECL_ALIGN is based | ||
81 | 271 | on the address at which an object is actually located. These two | ||
82 | 272 | addresses are not always the same. For example, on ARM targets, | ||
83 | 273 | the address &foo of a Thumb function foo() has the lowest bit set, | ||
84 | 274 | whereas foo() itself starts on an even address. */ | ||
85 | 268 | 275 | ||
86 | 269 | unsigned int | 276 | unsigned int |
87 | 270 | get_object_alignment (tree exp, unsigned int max_align) | 277 | get_object_alignment (tree exp, unsigned int max_align) |
88 | @@ -286,7 +293,21 @@ | |||
89 | 286 | exp = DECL_INITIAL (exp); | 293 | exp = DECL_INITIAL (exp); |
90 | 287 | if (DECL_P (exp) | 294 | if (DECL_P (exp) |
91 | 288 | && TREE_CODE (exp) != LABEL_DECL) | 295 | && TREE_CODE (exp) != LABEL_DECL) |
93 | 289 | align = DECL_ALIGN (exp); | 296 | { |
94 | 297 | if (TREE_CODE (exp) == FUNCTION_DECL) | ||
95 | 298 | { | ||
96 | 299 | /* Function addresses can encode extra information besides their | ||
97 | 300 | alignment. However, if TARGET_PTRMEMFUNC_VBIT_LOCATION | ||
98 | 301 | allows the low bit to be used as a virtual bit, we know | ||
99 | 302 | that the address itself must be 2-byte aligned. */ | ||
100 | 303 | if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn) | ||
101 | 304 | align = 2 * BITS_PER_UNIT; | ||
102 | 305 | else | ||
103 | 306 | align = BITS_PER_UNIT; | ||
104 | 307 | } | ||
105 | 308 | else | ||
106 | 309 | align = DECL_ALIGN (exp); | ||
107 | 310 | } | ||
108 | 290 | else if (CONSTANT_CLASS_P (exp)) | 311 | else if (CONSTANT_CLASS_P (exp)) |
109 | 291 | { | 312 | { |
110 | 292 | align = TYPE_ALIGN (TREE_TYPE (exp)); | 313 | align = TYPE_ALIGN (TREE_TYPE (exp)); |
111 | 293 | 314 | ||
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 | 9232 | 0 <= N < M as is common. In general, the precise value of P is unknown. | 9232 | 0 <= N < M as is common. In general, the precise value of P is unknown. |
117 | 9233 | M is chosen as large as possible such that constant N can be determined. | 9233 | M is chosen as large as possible such that constant N can be determined. |
118 | 9234 | 9234 | ||
124 | 9235 | Returns M and sets *RESIDUE to N. | 9235 | Returns M and sets *RESIDUE to N. */ |
120 | 9236 | |||
121 | 9237 | If ALLOW_FUNC_ALIGN is true, do take functions' DECL_ALIGN_UNIT into | ||
122 | 9238 | account. This is not always possible due to PR 35705. | ||
123 | 9239 | */ | ||
125 | 9240 | 9236 | ||
126 | 9241 | static unsigned HOST_WIDE_INT | 9237 | static unsigned HOST_WIDE_INT |
129 | 9242 | get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue, | 9238 | get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue) |
128 | 9243 | bool allow_func_align) | ||
130 | 9244 | { | 9239 | { |
131 | 9245 | enum tree_code code; | 9240 | enum tree_code code; |
132 | 9246 | 9241 | ||
133 | @@ -9270,9 +9265,8 @@ | |||
134 | 9270 | } | 9265 | } |
135 | 9271 | } | 9266 | } |
136 | 9272 | 9267 | ||
140 | 9273 | if (DECL_P (expr) | 9268 | if (DECL_P (expr)) |
141 | 9274 | && (allow_func_align || TREE_CODE (expr) != FUNCTION_DECL)) | 9269 | return get_object_alignment (expr, ~0U) / BITS_PER_UNIT; |
139 | 9275 | return DECL_ALIGN_UNIT (expr); | ||
142 | 9276 | } | 9270 | } |
143 | 9277 | else if (code == POINTER_PLUS_EXPR) | 9271 | else if (code == POINTER_PLUS_EXPR) |
144 | 9278 | { | 9272 | { |
145 | @@ -9282,8 +9276,7 @@ | |||
146 | 9282 | 9276 | ||
147 | 9283 | op0 = TREE_OPERAND (expr, 0); | 9277 | op0 = TREE_OPERAND (expr, 0); |
148 | 9284 | STRIP_NOPS (op0); | 9278 | STRIP_NOPS (op0); |
151 | 9285 | modulus = get_pointer_modulus_and_residue (op0, residue, | 9279 | modulus = get_pointer_modulus_and_residue (op0, residue); |
150 | 9286 | allow_func_align); | ||
152 | 9287 | 9280 | ||
153 | 9288 | op1 = TREE_OPERAND (expr, 1); | 9281 | op1 = TREE_OPERAND (expr, 1); |
154 | 9289 | STRIP_NOPS (op1); | 9282 | STRIP_NOPS (op1); |
155 | @@ -11163,8 +11156,7 @@ | |||
156 | 11163 | unsigned HOST_WIDE_INT modulus, residue; | 11156 | unsigned HOST_WIDE_INT modulus, residue; |
157 | 11164 | unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (arg1); | 11157 | unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (arg1); |
158 | 11165 | 11158 | ||
161 | 11166 | modulus = get_pointer_modulus_and_residue (arg0, &residue, | 11159 | modulus = get_pointer_modulus_and_residue (arg0, &residue); |
160 | 11167 | integer_onep (arg1)); | ||
162 | 11168 | 11160 | ||
163 | 11169 | /* This works because modulus is a power of 2. If this weren't the | 11161 | /* This works because modulus is a power of 2. If this weren't the |
164 | 11170 | case, we'd have to replace it by its greatest power-of-2 | 11162 | case, we'd have to replace it by its greatest power-of-2 |
165 | 11171 | 11163 | ||
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 | 1 | /* { dg-do compile { target { arm*-*-* || mips*-*-* } } } */ | ||
171 | 2 | |||
172 | 3 | #include <stdlib.h> | ||
173 | 4 | #include <stdint.h> | ||
174 | 5 | |||
175 | 6 | int | ||
176 | 7 | main (void) | ||
177 | 8 | { | ||
178 | 9 | void *p = main; | ||
179 | 10 | if ((intptr_t) p & 1) | ||
180 | 11 | abort (); | ||
181 | 12 | return 0; | ||
182 | 13 | } | ||
183 | 14 | |||
184 | 15 | /* { dg-final { scan-assembler "abort" } } */ | ||
185 | 0 | 16 | ||
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 | 522 | val = bit_value_binop (PLUS_EXPR, TREE_TYPE (expr), | 522 | val = bit_value_binop (PLUS_EXPR, TREE_TYPE (expr), |
191 | 523 | TREE_OPERAND (base, 0), TREE_OPERAND (base, 1)); | 523 | TREE_OPERAND (base, 0), TREE_OPERAND (base, 1)); |
192 | 524 | else if (base | 524 | else if (base |
193 | 525 | /* ??? While function decls have DECL_ALIGN their addresses | ||
194 | 526 | may encode extra information in the lower bits on some | ||
195 | 527 | targets (PR47239). Simply punt for function decls for now. */ | ||
196 | 528 | && TREE_CODE (base) != FUNCTION_DECL | ||
197 | 529 | && ((align = get_object_alignment (base, BIGGEST_ALIGNMENT)) | 525 | && ((align = get_object_alignment (base, BIGGEST_ALIGNMENT)) |
198 | 530 | > BITS_PER_UNIT)) | 526 | > BITS_PER_UNIT)) |
199 | 531 | { | 527 | { |
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