re PR debug/51471 (gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla...
[gcc.git] / gcc / ChangeLog
1 2012-01-09 Tom de Vries <tom@codesourcery.com>
2 Andrew Pinski <apinski@cavium.com>
3
4 * reorg.c (fill_slots_from_thread): Don't speculate frame-related insns.
5
6 2012-01-09 Richard Sandiford <rdsandiford@googlemail.com>
7
8 * sched-int.h (bb_note): Move to...
9 * basic-block.h: ...here.
10 * haifa-sched.c (bb_note): Move to...
11 * cfgrtl.c: ...here.
12 * function.c (next_block_for_reg): New function.
13 (move_insn_for_shrink_wrap): Likewise.
14 (prepare_shrink_wrap): Rewrite to use the above.
15
16 2012-01-09 Aldy Hernandez <aldyh@redhat.com>
17
18 * gimple.c (is_gimple_non_addressable): Remove.
19 * gimple.h: Remove is_gimple_non_addressable.
20 * gimplify.c (gimplify_modify_expr_rhs): Use is_gimple_reg instead of
21 is_gimple_non_addressable.
22 * trans-mem.c (expand_assign_tm): Same.
23
24 2012-01-09 Richard Guenther <rguenther@suse.de>
25
26 PR tree-optimization/51775
27 * tree-ssa-sccvn.c (visit_use): Value-number throwing stmts.
28 * tree-ssa-pre.c (eliminate): Properly fixup EH info.
29
30 2012-01-09 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
31
32 * config/arm/arm-cores.def (cortex-a15): Use cortex_a15_tune for
33 tuning parameters.
34 * config/arm/arm.c (arm_cortex_a15_tune): New static variable.
35
36 2012-01-09 Richard Guenther <rguenther@suse.de>
37
38 * tree-streamer-out.c (write_ts_optimization): Fix spelling.
39
40 2012-01-08 Jan Hubicka <jh@suse.cz>
41
42 PR tree-optimize/51680
43 * ipa-inline-analyss.c (evaluate_properties_for_edge): Fix condition
44 on when known_vals needs to be computed; cleanup.
45
46 2012-01-08 Jan Hubicka <jh@suse.cz>
47
48 PR tree-optimize/51694
49 * ipa-cp.c (ipa_get_indirect_edge_target): Add bounds checks.
50
51 2012-01-08 Jonathan Wakely <jwakely.gcc@gmail.com>
52
53 * doc/cpp.texi (Predefined Macros): __STRICT_ANSI__ is defined
54 for -std=c++98 and -std=c++11 too.
55
56 2012-01-08 Chung-Lin Tang <cltang@codesourcery.com>
57
58 * cfgloop.c (cancel_loop): Add free() of bbs array.
59
60 2012-01-07 Jan Hubicka <jh@suse.cz>
61
62 PR tree-optimization/51600
63 * ipa-inline-analysis.c (estimate_edge_devirt_benefit): Disable code
64 that benefits small functions.
65
66 2012-01-07 Jan Hubicka <jh@suse.cz>
67
68 * ipa-inline.c (want_inline_small_function_p): Fix formating.
69
70 2012-01-07 Jan Hubicka <jh@suse.cz>
71
72 PR tree-optimization/51680
73 * ipa-inline.c (want_inline_small_function_p): Be more lax on functions
74 whose inlining reduce unit size.
75
76 2012-01-07 Alexandre Oliva <aoliva@redhat.com>
77
78 PR bootstrap/51725
79 * cselib.c (new_elt_loc_list): Promote addr_list to canonical node.
80 Add canonical node to containing_mem chain after the non-canonical
81 one, even if there weren't any locs to propagate.
82 (remove_useless_values): Keep only canonical values.
83 (add_mem_for_addr, cselib_lookup_mem): Canonicalize addr.
84 (cselib_invalidate_mem): Likewise. Ensure v is canonical, and
85 canonicalize mem_chain elements that are not discarded.
86
87 2012-01-06 Jakub Jelinek <jakub@redhat.com>
88
89 PR target/47333
90 * cgraphunit.c (cgraph_optimize): Call output_weakrefs
91 before emitting functions.
92
93 PR gcov-profile/50127
94 * bb-reorder.c (partition_hot_cold_basic_blocks): Call
95 clear_aux_for_blocks.
96
97 2012-01-06 Alexandre Oliva <aoliva@redhat.com>
98
99 PR debug/51746
100 * cselib.c (cselib_hash_rtx): Hash incoming VALUEs too.
101
102 2012-01-06 Arnaud Charlet <charlet@adacore.com>
103
104 * c-decl.c (ext_block): Moved up.
105 (collect_all_refs, for_each_global_decl): Take ext_block into account.
106
107 2012-01-06 Han Shen <shenhan@google.com>
108
109 Translate built-in include paths for sysroot.
110 * Makefile.in (gcc_gxx_include_dir_add_sysroot): New.
111 (PREPROCESSOR_DEFINES): Define GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT.
112
113 * cppdefault.c (cpp_include_defaults): Replace hard coded "0" with
114 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT for "add_sysroot" field.
115
116 * configure.ac (AC_SUBST): Add gcc_gxx_include_dir_add_sysroot to
117 control whether sysroot should be prepended to gxx include dir.
118
119 * configure: Regenerate.
120
121 2012-01-06 Torvald Riegel <triegel@redhat.com>
122
123 PR rtl-optimization/51771
124 * builtin-attrs.def (ATTR_RETURNS_TWICE, ATTR_TM_NOTHROW_RT_LIST):
125 New.
126 * gtm-builtins.def (BUILT_IN_TM_START): Add returns-twice attrib.
127
128 2012-01-05 Eric Botcazou <ebotcazou@adacore.com>
129
130 PR tree-optimization/51315
131 * tree-sra.c (tree_non_aligned_mem_for_access_p): New predicate.
132 (build_accesses_from_assign): Use it instead of tree_non_aligned_mem_p.
133
134 2012-01-05 Uros Bizjak <ubizjak@gmail.com>
135
136 PR target/51681
137 * config/ia64/ia64.c (expand_vec_perm_shrp): Use correct operands
138 for shrp pattern. Correctly handle and fixup shift variable.
139 Return false when shift > nelt for BYTES_BIG_ENDIAN target.
140
141 2012-01-05 Jakub Jelinek <jakub@redhat.com>
142
143 PR debug/51762
144 * calls.c (emit_call_1): For noreturn calls force a REG_ARGS_SIZE
145 note when !ACCUMULATE_OUTGOING_ARGS.
146
147 2012-01-05 Eric Botcazou <ebotcazou@adacore.com>
148
149 * tree-vrp.c (extract_range_from_binary_expr_1): Remove duplicated
150 condition.
151 (extract_range_from_unary_expr_1): Avoid useless computations.
152
153 2012-01-05 Jakub Jelinek <jakub@redhat.com>
154
155 PR rtl-optimization/51767
156 * cfgrtl.c (force_nonfallthru_and_redirect): Force addition
157 of jump_block and add an extra edge for degenerated asm gotos.
158
159 PR middle-end/51768
160 * stmt.c (check_unique_operand_names): Don't ICE during error
161 reporting if i is from labels chain.
162
163 PR middle-end/44777
164 * profile.c (branch_prob): Split bbs that have exit edge
165 and need a fake entry edge too.
166
167 2012-01-05 Jan Hubicka <jh@suse.cz>
168
169 PR middle-end/49710
170 * cfgloopmanip.c (remove_path): Walk loop hiearchy upwards when
171 unlooping loops.
172
173 2012-01-05 Richard Guenther <rguenther@suse.de>
174
175 PR lto/50490
176 * tree-streamer-out.c (write_ts_optimization): New function.
177 (streamer_write_tree_body): Call it.
178 * tree-streamer-in.c (lto_input_ts_optimization): New function.
179 (streamer_read_tree_body): Call it.
180 * lto-streamer-out.c (lto_is_streamable): Handle OPTIMIZATION_NODE.
181
182 2012-01-05 Jakub Jelinek <jakub@redhat.com>
183
184 PR middle-end/51761
185 * gimple.h (struct gimplify_ctx): Add in_cleanup_point_expr field.
186 * gimplify.c (gimplify_cleanup_point_expr): Save and set
187 in_cleanup_point_expr before gimplify_stmt call and restore it
188 afterwards.
189 (gimplify_target_expr): Don't add {CLOBBER} cleanup if
190 in_cleanup_point_expr is false.
191
192 2012-01-05 Richard Guenther <rguenther@suse.de>
193
194 PR middle-end/51764
195 * common.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move
196 to c.opt.
197 * toplev.c (process_options): Reject combining mudflap and LTO.
198 * tree-nomudflap.c (nogo): Use sorry instead of internal_error.
199
200 2012-01-05 Richard Guenther <rguenther@suse.de>
201
202 PR tree-optimization/51760
203 * tree-ssa-ccp.c (likely_value): Drop UNDEFINED to CONSTANT,
204 not VARYING.
205 (bit_value_unop): Handle UNDEFINED operands.
206 (bit_value_binop): Likewise.
207
208 2012-01-05 Georg-Johann Lay <avr@gjlay.de>
209
210 * config/avr/avr.c (avr_replace_prefix): Remove.
211 (avr_asm_named_section): Use ACONCAT instead of avr_replace_prefix.
212 (avr_asm_function_rodata_section): Ditto.
213 (avr_asm_select_section): Ditto.
214
215 2012-01-05 Marcus Shawcroft <marcus.shawcroft@arm.com>
216
217 * reload.c (find_reloads): Adjust LABEL_NUSES on REG_LABEL_OPERAND
218 insertion.
219
220 2012-01-05 Jakub Jelinek <jakub@redhat.com>
221
222 PR bootstrap/51648
223 * tree-cfg.c (need_fake_edge_p): Return true also for noreturn
224 calls that have any non-fake successor edges.
225
226 PR debug/51746
227 * var-tracking.c (add_stores): For COND_EXEC allow oval to be NULL.
228
229 2012-01-04 Eric Botcazou <ebotcazou@adacore.com>
230
231 PR tree-optimization/51624
232 * tree-sra.c (build_ref_for_model): When replicating a chain of
233 COMPONENT_REFs, stop as soon as the offset would become negative.
234
235 2012-01-04 Jakub Jelinek <jakub@redhat.com>
236
237 PR debug/51695
238 * dwarf2out.c (output_loc_list): For now drop >= 64KB expressions
239 in .debug_loc on the floor.
240
241 2012-01-04 Andrew Pinski <apinski@cavium.com>
242
243 * doc/invoke.texi (-march=@var{arch}): Add octeon+ and octeon2.
244
245 2012-01-04 Andrew Pinski <apinski@cavium.com>
246 Adam Nemet <anemet@caviumnetworks.com>
247
248 * config/mips/mips.md (size): Add SI and DI.
249 (SIZE): New mode attribute.
250 (U): New code attribute.
251 * config/mips/mips-dsp.md (mips_lbux): Use gen_mips_lbux_extsi.
252 (mips_lbux_<mode>): Delete.
253 (mips_l<SHORT:size><u>x_ext<GPR:mode>_<P:mode>): New pattern.
254 (mips_lhx): Use gen_mips_lhx_extsi.
255 (mips_lhx_<mode>): Delete.
256 (mips_lwx): Delete.
257 (mips_l<size>x): New expand.
258 (mips_lwx_<mode>): Delete.
259 (mips_l<GPR:size>x_<P:mode>): New pattern.
260 (*mips_lw<u>x_<P:mode>_ext): Likewise.
261 * config/mips/mips-ftypes.def: Add DI f(POINTER, SI) function type.
262 * config/mips/mips.c (mips_lx_address_p): New function.
263 (mips_rtx_costs <case MEM>): Call mips_lx_address_p.
264 (dsp64): New availability predicate.
265 (mips_builtins): Add an entry for __builtin_mips_ldx.
266 * config/mips/mips.h (ISA_HAS_LBX): New define.
267 (ISA_HAS_LBUX): Likewise.
268 (ISA_HAS_LHX): Likewise.
269 (ISA_HAS_LHUX): Likewise.
270 (ISA_HAS_LWX): Likewise.
271 (ISA_HAS_LWUX): Likewise.
272 (ISA_HAS_LDX): Likewise.
273 * doc/extend.texi (__builtin_mips_ldx): Document.
274
275 2012-01-04 Tristan Gingold <gingold@adacore.com>
276
277 * config/vms/xm-vms.h (HOST_LONG_FORMAT, HOST_PTR_PRINTF): Define
278 when long pointers are used.
279 * config.build (*-*-*vms*): Handle all OpenVMS targets.
280 (alpha64-dec-*vms*, alpha*-dec-*vms*)
281 (ia64-hp-*vms*): Remove.
282 * config/vms/xm-vms64.h: Delete.
283
284 2012-01-04 Aldy Hernandez <aldyh@redhat.com>
285
286 PR middle-end/51472
287 * trans-mem.c (expand_assign_tm): Handle TM_MEMMOVE loads correctly.
288
289 2012-01-04 Aldy Hernandez <aldyh@redhat.com>
290
291 * opts.c (finish_options): Remove duplicate sorry.
292
293 2012-01-04 Aldy Hernandez <aldyh@redhat.com>
294
295 PR middle-end/51696
296 * trans-mem.c (diagnose_tm_1): Display indirect calls with no name
297 correctly.
298
299 2012-01-04 Richard Guenther <rguenther@suse.de>
300
301 PR middle-end/51750
302 * tree.c (size_low_cst): New function.
303 * tree.h (size_low_cst): Declare.
304 * fold-const.c (fold_comparison): Use it to extract the low
305 part of the POINTER_PLUS_EXPR offset.
306
307 2012-01-04 Georg-Johann Lay <avr@gjlay.de>
308
309 Fix clearing ZERO_REG
310 * config/avr/avr.md (cc): Add alternative "ldi".
311 (movqi_insn): Use it in cc attribute.
312 * config/avr/avr.c (notice_update_cc): Handle CC_LDI.
313 (output_reload_in_const): Use CLR to move 0 to ZERO_REG.
314 (output_reload_insisf): Use ZERO_REG to pre-clear register.
315
316 2012-01-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
317
318 * configure: Regenerate.
319
320 2012-01-04 Richard Guenther <rguenther@suse.de>
321
322 PR tree-optimization/49651
323 * tree-ssa-structalias.c (type_can_have_subvars): New function.
324 (var_can_have_subvars): Use it.
325 (get_constraint_for_1): Only consider subfields if there can be any.
326
327 2012-01-03 Jakub Jelinek <jakub@redhat.com>
328
329 PR bootstrap/51725
330 * cselib.c (new_elt_loc_list): When moving locs from one cselib_val
331 to its new canonical_cselib_val and the cselib_val was in
332 first_containing_mem chain, but the canonical_cselib_val was not,
333 add the latter into the chain.
334 (cselib_invalidate_mem): Compare canonical_cselib_val of
335 addr_list chain elt with v.
336
337 PR pch/51722
338 * dwarf2out.c (dwarf2out_start_source_file, dwarf2out_define,
339 dwarf2out_undef): Allocate e.info using ggc_strdup instead
340 of xstrdup.
341 (output_macinfo_op): Don't ggc_strdup fd->filename.
342 (optimize_macinfo_range): Allocate grp_name using XALLOCAVEC,
343 then ggc_strdup it. Don't free inc->info or cur->info.
344 (output_macinfo): Don't free ref->info or file->info.
345
346 2012-01-03 Ira Rosen <irar@il.ibm.com>
347
348 PR tree-optimization/51269
349 * tree-vect-loop-manip.c (set_prologue_iterations): Make
350 first_niters a pointer.
351 (slpeel_tree_peel_loop_to_edge): Likewise.
352 (vect_do_peeling_for_loop_bound): Update call to
353 slpeel_tree_peel_loop_to_edge.
354 (vect_gen_niters_for_prolog_loop): Don't compute wide_prolog_niters
355 here. Remove it from the parameters list.
356 (vect_do_peeling_for_alignment): Update calls and compute
357 wide_prolog_niters.
358
359 2012-01-03 Richard Guenther <rguenther@suse.de>
360
361 PR tree-optimization/51070
362 * tree-loop-distribution.c (stmt_has_scalar_dependences_outside_loop):
363 Properly handle calls.
364
365 2012-01-03 Richard Guenther <rguenther@suse.de>
366
367 PR tree-optimization/51692
368 * tree-ssa-dce.c (eliminate_unnecessary_stmts): Do not remove
369 the LHS of allocation stmts.
370
371 2012-01-03 Olivier Hainque <hainque@adacore.com>
372
373 * system.h: Prior to #define, #undef fopen and freopen unconditionally.
374
375 2012-01-03 Olivier Hainque <hainque@adacore.com>
376
377 * collect2.c (main): In AIX specific computations for vector
378 insertions, use CONST_CAST2 to cast from char ** to const char **.
379
380 2012-01-03 Richard Guenther <rguenther@suse.de>
381
382 PR debug/51650
383 * dwarf2out.c (dwarf2out_finish): Always create a DIE for
384 the context of a limbo DIE when it does not already exist.
385
386 2012-01-03 Jakub Jelinek <jakub@redhat.com>
387
388 PR tree-optimization/51719
389 * value-prof.c (gimple_ic): When indirect call isn't noreturn,
390 but direct call is, clear direct call's lhs and don't add fallthrough
391 edge from dcall_bb to join_bb and PHIs.
392
393 2012-01-03 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
394
395 * config/s390/s390.md ("*cmp<mode>_ccs"): Fix comment mentioning
396 the instructions emitted by the pattern.
397 ("*TDC_insn_<mode>"): Add comment.
398
399 2012-01-03 Richard Guenther <rguenther@suse.de>
400
401 PR middle-end/51730
402 * fold-const.c (fold_comparison): Properly canonicalize
403 tree offset and HOST_WIDE_INT bit position.
404
405 2012-01-02 Uros Bizjak <ubizjak@gmail.com>
406
407 * config/ia64/ia64.c (expand_vec_perm_broadcast): Use correct
408 operands for extzv pattern.
409
410 2012-01-02 Jakub Jelinek <jakub@redhat.com>
411
412 PR bootstrap/51725
413 * cselib.c (add_mem_for_addr): Call canonical_cselib_val
414 on mem_elt first.
415
416 2012-01-02 Sandra Loosemore <sandra@codesourcery.com>
417
418 * doc/invoke.texi (-flto and related options): Copy-edit.
419
420 2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
421
422 * config/mips/mips.md (loadgp_newabi_<mode>): Add missing earlyclobber.
423
424 2012-01-02 Jakub Jelinek <jakub@redhat.com>
425
426 * config/i386/sse.md (*avx2_gatherdi<mode>_3, *avx2_gatherdi<mode>_4):
427 New patterns.
428
429 2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
430
431 * expr.h (move_by_pieces_ninsns): Declare.
432 * expr.c (move_by_pieces_ninsns): Make external.
433 * config/mips/mips-protos.h (mips_move_by_pieces_p): Declare.
434 (mips_store_by_pieces_p): Likewise.
435 * config/mips/mips.h (MOVE_BY_PIECES_P): Call mips_move_by_pieces_p.
436 (STORE_BY_PIECES_P): Likewise mips_store_by_pieces_p.
437 * config/mips/mips.c (mips_move_by_pieces_p): New function.
438 (mips_store_by_pieces_p): Likewise.
439
440 2012-01-02 Jakub Jelinek <jakub@redhat.com>
441
442 * passes.c (register_one_dump_file): Free full_name.
443
444 * reload1.c (reload): Don't allocate reg_max_ref_width here.
445 (calculate_elim_costs_all_insns): Free offsets_at and
446 offsets_known_at at the end and clear the pointers.
447
448 2012-01-02 Georg-Johann Lay <avr@gjlay.de>
449
450 * config/avr/avr.opt (-mbranch-cost): Fix double definition of
451 this option introduced in r180739.
452
453 2012-01-02 Georg-Johann Lay <avr@gjlay.de>
454
455 PR target/51345
456 * config.gcc (tm_file target=avr]): Add avr/avr-multilib.h
457 (tmake_file target=avr): Add avr/t-multilib.
458
459 * config/avr/avr-c.c (avr_cpu_cpp_builtins): Use AVR_HAVE_8BIT_SP
460 to built-in define __AVR_HAVE_8BIT_SP__, __AVR_HAVE_16BIT_SP__.
461 * config/avr/genmultilib.awk: New file.
462 * config/avr/t-multilib: New auto-generated file.
463 * config/avr/multilib.h: New auto-generated file.
464 * config/avr/t-avr (AVR_MCUS): New variable.
465 (genopt.sh): Use it.
466 (s-mlib): Depend on t-multilib.
467 (t-multilib, multilib.h): New dependencies.
468 (s-avr-mlib): New rule to build t-multilib, multilib.h from AVR_MCUS.
469 (MULTILIB_OPTIONS): Remove.
470 (MULTILIB_MATCHES): Remove.
471 (MULTILIB_DIRNAMES): Remove.
472 (MULTILIB_EXCEPTIONS): Remove:
473 * config/avr/genopt.sh: Don't use hard coded file name;
474 pass AVR_MCUS from t-avr instead.
475
476 2012-01-02 Georg-Johann Lay <avr@gjlay.de>
477
478 * config/avr/avr.c (avr_out_ashrpsi3): Fix "case 31" to "case 23".
479
480 2012-01-02 Georg-Johann Lay <avr@gjlay.de>
481
482 Implement light-weight DImode support.
483 * config/avr/avr-dimode.md: New file.
484 * config/avr/avr.md: Include it.
485 (adjust_len): Add plus64, compare64.
486 (HIDI): Remove code iterator.
487 (code_stdname): New code attribute.
488 (rotx, rotsmode): Remove DI.
489 (rotl<mode>3, *rotw<mode>, *rotb<mode>): Use HISI instead of HIDI
490 as code iterator.
491 * config/avr/avr-protos.h (avr_have_dimode): New.
492 (avr_out_plus64, avr_out_compare64): New.
493 * config/avr/avr.c (avr_out_compare): Handle DImode.
494 (avr_have_dimode): New variable definition and initialization.
495 (avr_out_compare64, avr_out_plus64): New functions.
496 (avr_out_plus_1): Use simplify_unary_operation to negate xval.
497 (adjust_insn_length): Handle ADJUST_LEN_COMPARE64, ADJUST_LEN_PLUS64.
498 (avr_compare_pattern): Skip DImode comparisons.
499
500 2012-01-02 Revital Eres <revital.eres@linaro.org>
501
502 * ddg.c (def_has_ccmode_p): New function.
503 (add_cross_iteration_register_deps,
504 create_ddg_dep_from_intra_loop_link): Call it.
505
506 2012-01-02 Richard Guenther <rguenther@suse.de>
507
508 PR other/51679
509 * invoke.texi (fassociative-math): Remove spurious paranthesis.
510
511 2012-01-01 Jakub Jelinek <jakub@redhat.com>
512
513 * gcc.c (process_command): Update copyright notice dates.
514 * gcov.c (print_version): Likewise.
515 * gcov-dump.c (print_version): Likewise.
516 * mips-tfile.c (main): Likewise.
517 * mips-tdump.c (main): Likewise.
518
519 2012-01-01 Ira Rosen <irar@il.ibm.com>
520
521 PR tree-optimization/51704
522 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Check that
523 a use is inside the basic block or loop before accessing its vect info.
524
525 2012-01-01 Jan Hubicka <jhjh@suse.cz>
526
527 PR rtl-optimization/51069
528 * cfgloopmanip.c (remove_path): Removing path making irreducible
529 region unconditional makes BB part of the region.
530
531 2012-01-01 Jakub Jelinek <jakub@redhat.com>
532
533 PR tree-optimization/51683
534 * tree-ssa-propagate.c (substitute_and_fold): Don't optimize away
535 calls with side-effects.
536 * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
537 \f
538 Copyright (C) 2012 Free Software Foundation, Inc.
539
540 Copying and distribution of this file, with or without modification,
541 are permitted in any medium without royalty provided the copyright
542 notice and this notice are preserved.