OSDN Git Service

PR c++/14179
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2012-01-16  Jason Merrill  <jason@redhat.com>
2
3         PR c++/14179
4         * vec.c (vec_gc_o_reserve_1): Use ggc_round_alloc_size.
5
6 2012-01-16  Jakub Jelinek  <jakub@redhat.com>
7
8         PR bootstrap/51860
9         * config/s390/s390.c (s390_chunkify_start): Don't skip
10         call insns followed by NOTE_INSN_CALL_ARG_LOCATION note.  Skip
11         NOTE_INSN_VAR_LOCATION and NOTE_INSN_CALL_ARG_LOCATION notes.
12         If insn is followed by NOTE_INSN_VAR_LOCATION or
13         NOTE_INSN_CALL_ARG_LOCATION notes, insert jump after all those notes.
14         Don't use location of note insns.
15
16         PR tree-optimization/51865
17         * tree-inline.c (tree_function_versioning): Call remap_decl
18         on DECL_RESULT whenever it has VOID_TYPE_P type.
19
20 2012-01-15  Richard Sandiford  <rdsandiford@googlemail.com>
21
22         * config/mips/mips.c (mips16_build_call_stub): Don't use a stub
23         for calls to locally-binding MIPS16 functions if only the return
24         type uses float regs.
25
26 2012-01-15  Chung-Lin Tang  <cltang@codesourcery.com>
27             Richard Sandiford  <rdsandiford@googlemail.com>
28
29         * config/mips/mips-protos.h (SYMBOL_FORCE_TO_MEM): Delete.
30         (SYMBOL_32_HIGH): Likewise.
31         (mips_output_tls_reloc_directive): Declare.
32         * config/mips/mips.h (PIC_FUNCTION_ADDR_REGNUM): Move to mips.md.
33         (mips_use_pcrel_pool_p, mips_lo_relocs, mips_hi_relocs): Declare.
34         * config/mips/mips.c (mips_use_pcrel_pool_p): New variable.
35         (mips_lo_relocs, mips_hi_relocs): Make extern.
36         (mips16_stub_function): Move up file.
37         (mips_classify_symbol): Remove SYMBOL_FORCE_TO_MEM handling.
38         (mips_symbolic_constant_p): Likewise.  Remove SYMBOL_32_HIGH too.
39         (mips_symbol_insns_1): Likewise.  Check mips_use_pcrel_pool_p.
40         (mips_cannot_force_const_mem): Use mips_use_pcrel_pool_p instead
41         of SYMBOL_FORCE_TO_MEM.  Only check mips_tls_symbol_ref_1
42         if it's false.
43         (mips_get_tp): Add MIPS16 support.
44         (mips_legitimize_tls_address): Remove MIPS16 sorry().
45         Generalize DTPREL and TPREL handling.
46         (mips_init_relocs): Initialize mips_use_pcrel_pool_p.
47         Add MIPS16 TLS support.
48         (mips_output_tls_reloc_directive): New function.
49         (mips16_rewrite_pool_refs): Ignore UNSPEC_TLS_GET_TPs.
50         * config/mips/predicates.md (symbolic_operand_with_high)
51         (tls_reloc_operand): New predicates.
52         (force_to_mem_operand): Use mips_use_pcrel_pool_p.
53         * config/mips/mips.md (UNSPEC_UNSHIFTED_HIGH): New unspec.
54         (PIC_FUNCTION_ADDR_REGNUM): Moved from mips.h.
55         (*unshifted_high): New instruction.  Use it for MIPS16
56         high splitter.
57         (consttable_tls_reloc, tls_get_tp_mips16_<mode>): New patterns.
58         (*tls_get_tp_mips16_call_<mode>): Likewise.
59
60 2012-01-15  Uros Bizjak  <ubizjak@gmail.com>
61
62         PR rtl-optimization/51821
63         * recog.c (peep2_find_free_register): Determine clobbered registers
64         from insn pattern.
65
66 2012-01-14  Denis Chertykov  <chertykov@gmail.com>
67
68         PR target/50925
69         * config/avr/avr-protos.h: Revert change of 2012-01-09.
70         * config/avr/avr.c: Likewise.
71         * config/avr/avr.h: Likewise.
72
73 2012-01-13  Ian Lance Taylor  <iant@google.com>
74
75         PR c++/50012
76         * tree.h (TYPE_QUALS): Add cast to int.
77         (TYPE_QUALS_NO_ADDR_SPACE): Likewise.
78
79 2012-01-13  Ian Lance Taylor  <iant@google.com>
80
81         * ipa-cp.c (ipa_get_indirect_edge_target): Add typecasts when
82         comparing param_index to VEC_length result.
83
84 2012-01-13  Steven Bosscher  <steven@gcc.gnu.org>
85
86         * c-decl.c: Do not include tree-mudflap.h
87         * tree-optimize.c: Likewise.
88         * Makefile.in: Update dependencies.
89
90 2012-01-13  Richard Guenther  <rguenther@suse.de>
91
92         PR middle-end/8081
93         * gimplify.c (gimplify_modify_expr_rhs): For calls with a
94         variable-sized result always use RSO.
95
96 2012-01-12  DJ Delorie  <dj@redhat.com>
97
98         * cfgexpand.c (convert_debug_memory_address): Allow any valid
99         pointer type, not just the default pointer type.
100
101 2012-01-09  Richard Henderson  <rth@redhat.com>
102             Denis Chertykov  <chertykov@gmail.com>
103
104         PR target/50925
105         * config/avr/avr-protos.h (avr_hard_regno_nregs): Declare.
106         * config/avr/avr.c (avr_can_eliminate): Simplify.
107         (avr_initial_elimination_offset): Likewise.
108         (avr_prologue_setup_frame): Use hard_frame_pointer_rtx.
109         (expand_epilogue): Likewise.
110         (avr_legitimize_address): Gut.
111         (avr_legitimize_reload_address): Use hard_frame_pointer_rtx.
112         (avr_hard_regno_nregs): New.
113         (avr_hard_regno_ok): Allow only Pmode for arg and frame_pointers.
114         (avr_regno_mode_code_ok_for_base_b): Handle arg and frame pointers.
115         * config/avr/avr.h (FIXED_REGISTERS): Adjust arg pointer,
116         add soft frame pointer.
117         (CALL_USED_REGISTERS): Likewise.
118         (REG_CLASS_CONTENTS): Likewise.
119         (REGISTER_NAMES): Likewise.
120         (HARD_REGNO_NREGS): Use avr_hard_regno_nregs.
121         (HARD_FRAME_POINTER_REGNUM): New.
122         (FRAME_POINTER_REGNUM): Use soft frame pointer.
123         (ELIMINABLE_REGS): Eliminate from the soft frame pointer,
124         remove the HARD_FRAME_POINTER self-elimination.
125
126 2012-01-12  Georg-Johann Lay  <avr@gjlay.de>
127
128         PR target/51756
129         * config/avr/avr.c (avr_encode_section_info): Test for absence of
130         DECL_EXTERNAL when checking for initializers of progmem variables.
131
132 2012-01-12  Ira Rosen  <irar@il.ibm.com>
133
134         PR tree-optimization/51799
135         * tree-vect-patterns.c (vect_recog_over_widening_pattern): Check
136         that the last operation is a type demotion.
137
138 2012-01-12  Uros Bizjak  <ubizjak@gmail.com>
139
140         * config/i386/i386.md (*zero_extendsidi2_rex64): Correct movl template.
141         (x86_shift<mode>_adj_1): Remove operand constraint from operand 3.
142
143 2012-01-11  Jakub Jelinek  <jakub@redhat.com>
144
145         PR bootstrap/51796
146         * combine.c (distribute_notes): If i3 is a noreturn call,
147         allow old_size to be equal to args_size and make sure the
148         noreturn call gets REG_ARGS_SIZE note.
149         * expr.c (fixup_args_size_notes): Put REG_ARGS_SIZE notes
150         on noreturn calls even when the delta is 0.
151
152 2012-01-11  Nathan Sidwell  <nathan@acm.org>
153
154         * gcov.c (STRING_SIZE): Remove.
155         (generate_results): Erase annotations for source files with no
156         coverage information.
157         (read_line): New.
158         (output_lines): Use it.
159
160 2012-01-11  Eric Botcazou  <ebotcazou@adacore.com>
161
162         * gimple.h (gimplify_body): Remove first argument.
163         * gimplify.c (copy_if_shared): Add DATA argument.  Do not create the
164         pointer set here, instead just pass DATA to walk_tree.
165         (unshare_body): Remove BODY_P argument and adjust.  Create the pointer
166         set here and invoke copy_if_shared on the size trees of DECL_RESULT.
167         (unvisit_body): Likewise, but with unmark_visited.
168         (gimplify_body): Remove BODY_P argument and adjust.
169         (gimplify_function_tree): Adjust call to gimplify_body.
170         * omp-low.c (finalize_task_copyfn): Likewise.
171
172 2012-01-11  Eric Botcazou  <ebotcazou@adacore.com>
173
174         * tree.h (build_function_decl_skip_args): Add boolean parameter.
175         (build_function_type_skip_args): Delete.
176         * tree.c (build_function_type_skip_args): Make static and add
177         SKIP_RETURN parameter.  Fix thinko in the handling of variants.
178         (build_function_decl_skip_args): Add SKIP_RETURN parameter and
179         pass it to build_function_type_skip_args.
180         * cgraph.h (cgraph_function_versioning): Add boolean parameter.
181         (tree_function_versioning): Likewise.
182         * cgraph.c (cgraph_create_virtual_clone): Adjust call to
183         build_function_decl_skip_args.
184         * cgraphunit.c (cgraph_function_versioning): Add SKIP_RETURN parameter
185         and pass it to build_function_decl_skip_args/tree_function_versioning.
186         (cgraph_materialize_clone): Adjust call to tree_function_versioning.
187         * ipa-inline-transform.c (save_inline_function_body): Likewise.
188         * trans-mem.c (ipa_tm_create_version): Likewise.
189         * tree-sra.c (modify_function): Ditto for cgraph_function_versioning.
190         * tree-inline.c (declare_return_variable): Remove always-true test.
191         (tree_function_versioning): Add SKIP_RETURN parameter.  If the function
192         returns non-void and SKIP_RETURN, create a void-typed RESULT_DECL.
193         * ipa-split.c (split_function): Skip the return value for the split
194         part if it doesn't return.
195
196 2012-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
197
198         PR tree-optimization/49642
199         * ipa-split.c (forbidden_dominators): New variable.
200         (check_forbidden_calls): New function.
201         (dominated_by_forbidden): Likewise.
202         (consider_split): Check for forbidden dominators.
203         (execute_split_functions): Initialize and free forbidden
204         dominators info; call check_forbidden_calls.
205
206 2012-01-11  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
207
208         * config/arm/arm.md (mov_notscc): Use MVN for false condition.
209
210 2012-01-11  Nick Clifton  <nickc@redhat.com>
211
212         * config/rx/rx.md (return): Define pattern.
213
214 2012-01-11  Richard Guenther  <rguenther@suse.de>
215
216         * doc/extend.texi (malloc attribute): Adjust according to
217         implementation.
218
219 2012-01-10  Aldy Hernandez  <aldyh@redhat.com>
220             Patrick Marlier  <patrick.marlier@gmail.com>
221
222         PR middle-end/51516
223         * trans-mem.c (get_cg_data): Traverse aliases if requested.
224         (ipa_tm_scan_calls_block): Update parameters to get_cg_data.
225         (ipa_tm_note_irrevocable): Same.
226         (ipa_tm_scan_irr_block): Same.
227         (ipa_tm_decrement_clone_counts): Same.
228         (ipa_tm_scan_irr_function): Same.
229         (ipa_tm_create_version_alias): Same.
230         (ipa_tm_create_version): Same.
231         (ipa_tm_transform_calls_redirect): Same.
232         (ipa_tm_transform_calls): Same.
233         (ipa_tm_transform_transaction): Same.
234         (ipa_tm_execute): Same.
235
236 2012-01-10  Richard Guenther  <rguenther@suse.de>
237
238         PR middle-end/51806
239         * opts.c (common_handle_option): Handle -Werror.
240
241 2012-01-10  Andreas Schwab  <schwab@linux-m68k.org>
242
243         * config/m68k/sync.md ("atomic_compare_and_swap<mode>_1"): Fix
244         operand number.
245
246 2012-01-10  Jason Merrill  <jason@redhat.com>
247
248         * doc/invoke.texi (C++ Dialect Options): Update -fabi-version=6
249         information.
250
251 2012-01-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
252
253         * configure.ac (gcc_cv_as_ix86_tlsgdplt): Check if linker
254         supports R_386_TLS_GD_PLT reloc.
255         (gcc_cv_as_ix86_tlsldmplt): Check if linker
256         supports R_386_TLS_LDM_PLT reloc.
257         * configure: Regenerate.
258         * config.in: Regenerate.
259
260 2012-01-10  Georg-Johann Lay  <avr@gjlay.de>
261
262         PR target/49868
263         Extend __pgmx semantics to linearize memory.
264         * config/avr/avr.md (mov<mode>): Use avr_xload_libgcc_p to
265         determine if code comes inline or from libgcc.
266         (MOVMEM_r_d:HI): Add "w" to constraint for better preference.
267         (movmem_qi, movmem_qi): Set constraint #2 to "n".
268         (movmem_qi_elpm, movmem_hi_elpm): Remove insns.
269         (movmemx_qi, movmemx_hi): New insns.
270         (xload_<mode>_libgcc): Rewrite to new insn condition.
271         (xload_<mode>): Remove insns.
272         * config/avr/avr.c (avr_out_xload): Rewrite: Only need to handle
273         cases that don't satisfy avr_xload_libgcc_p().
274         (avr_addr_space_convert): Allow converting in any direction.
275         (avr_addr_space_subset_p): Return always true.
276         (avr_xload_libgcc_p): Rewrite to fit new __pgmx semantics.
277         (avr_emit_movmemhi): Ditto.
278         (avr_out_lpm): No need to handle ADDR_SPACE_PGMX any more.
279         (avr_out_movmem): Ditto.
280         (AVR_SYMBOL_FLAG_PROGMEM): New macro.
281         (AVR_SYMBOL_SET_ADDR_SPACE): New macro.
282         (AVR_SYMBOL_GET_ADDR_SPACE): New macro.
283         (avr_encode_section_info): Encode 'progmem' in symbol flags.
284         (output_reload_in_const): Don't zero-extend any 24-bit symbols.
285
286 2012-01-10  Richard Guenther  <rguenther@suse.de>
287
288         PR tree-optimization/50913
289         * graphite-scop-detection.c (stmt_has_simple_data_refs_p):
290         Require data-refs to be representable by Graphite with respect
291         to any loop nest.
292
293 2012-01-10  Uros Bizjak  <ubizjak@gmail.com>
294
295         * config/i386/constraints.md ("L"): Return true for 0xffffffff.
296         * config/i386/i386.c (*anddi_1): Emit AND with 0xffffffff as MOV.
297
298 2012-01-10  Tom de Vries  <tom@codesourcery.com>
299
300         PR rtl-optimization/51271
301         * dwarf2cfi.c (scan_trace): Save and restore cur_row->reg_save when
302         handling annulled branch.
303
304 2012-01-10  Richard Henderson  <rth@redhat.com>
305
306         * config/arm/arm.c (arm_vectorize_vec_perm_const_ok,
307         TARGET_VECTORIZE_VEC_PERM_CONST_OK, neon_split_vcombine, MAX_VECT_LEN,
308         struct expand_vec_perm_d, arm_expand_vec_perm_1, arm_expand_vec_perm,
309         arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev,
310         arm_evpc_neon_vtrn, arm_evpc_neon_vtbl, arm_expand_vec_perm_const_1,
311         arm_expand_vec_perm_const): New.
312         * config/arm/arm-protos.h: Update.
313         * config/arm/neon.md (UNSPEC_VCONCAT): New.
314         (*neon_vswp<VDQX>): New.
315         (neon_vcombine<VDX>): Use neon_split_vcombine.
316         (neon_vtbl1v16qi, neon_vtbl2v16qi, neon_vcombinev16qi): New.
317         * config/arm/vec-common.md (vec_perm_const<VALL>): New.
318         (vec_perm<VE>): New.
319
320 2012-01-10  Richard Henderson  <rth@redhat.com>
321
322         * config/arm/arm.c (arm_gen_compare_reg): Add scratch argument;
323         use it if reload_completed.
324         (arm_legitimize_sync_memory, arm_emit, arm_insn_count, arm_count,
325         arm_output_asm_insn, arm_process_output_memory_barrier,
326         arm_output_memory_barrier, arm_ldrex_suffix, arm_output_ldrex,
327         arm_output_strex, arm_output_it, arm_output_op2, arm_output_op3,
328         arm_output_sync_loop, arm_get_sync_operand, FETCH_SYNC_OPERAND,
329         arm_process_output_sync_insn, arm_output_sync_insn,
330         arm_sync_loop_insns, arm_call_generator, arm_expand_sync): Remove.
331         (arm_pre_atomic_barrier, arm_post_atomic_barrier): New.
332         (arm_emit_load_exclusive, arm_emit_store_exclusive): New.
333         (emit_unlikely_jump): New.
334         (arm_expand_compare_and_swap, arm_split_compare_and_swap): New.
335         (arm_split_atomic_op): New.
336         * config/arm/arm-protos.h: Update.
337         * config/arm/arm.h (enum arm_sync_generator_tag): Remove.
338         (struct arm_sync_generator): Remove.
339         * config/arm/arm.md (VUNSPEC_SYNC_COMPARE_AND_SWAP, VUNSPEC_SYNC_LOCK,
340         VUNSPEC_SYNC_OP, VUNSPEC_SYNC_NEW_OP, VUNSPEC_SYNC_OLD_OP): Remove.
341         (VUNSPEC_ATOMIC_CAS, VUNSPEC_ATOMIC_XCHG, VUNSPEC_ATOMIC_OP): New.
342         (VUNSPEC_LL, VUNSPEC_SC): New.
343         (sync_result, sync_memory, sync_required_value, sync_new_value,
344         sync_t1, sync_t2, sync_release_barrier, sync_op): Remove.
345         (attr length): Don't use arm_sync_loop_insns.
346         (cbranch_cc, cstore_cc): Update call to arm_gen_compare_reg.
347         (movsfcc, movdfcc): Likewise.
348         * config/arm/constraints.md (Ua): New.
349         * config/arm/prediates.md (mem_noofs_operand): New.
350         (sync_compare_and_swap<QHSD>, sync_lock_test_and_set<QHSD>): Remove.
351         (sync_clobber, sync_t2_reqd): Remove.
352         (sync_<syncop><QHSD>, sync_nand<QHSD>): Remove.
353         (sync_new_<syncop><QHSD>, sync_new_nand<QHSD>): Remove.
354         (sync_old_<syncop><QHSD>, sync_old_nand<QHSD>): Remove.
355         (arm_sync_compare_and_swap<SIDI>): Remove.
356         (arm_sync_compare_and_swap<NARROW>): Remove.
357         (arm_sync_lock_test_and_set<SIDI>): Remove.
358         (arm_sync_lock_test_and_set<NARROW>): Remove.
359         (arm_sync_new_<syncop><SIDI>): Remove.
360         (arm_sync_new_<syncop><NARROW>): Remove.
361         (arm_sync_new_nand<SIDI>): Remove.
362         (arm_sync_new_nand<NARROW>): Remove.
363         (arm_sync_old_<syncop><SIDI>): Remove.
364         (arm_sync_old_<syncop><NARROW>): Remove.
365         (arm_sync_old_nand<SIDI>): Remove.
366         (arm_sync_old_nand<NARROW>): Remove.
367         (*memory_barrier): Merge arm_output_memory_barrier.
368         (atomic_compare_and_swap<QHSD>): New.
369         (atomic_compare_and_swap<NARROW>_1): New.
370         (atomic_compare_and_swap<SIDI>_1): New.
371         (atomic_exchange<QHSD>): New.
372         (cas_cmp_operand, cas_cmp_str): New.
373         (atomic_op_operand, atomic_op_str): New.
374         (atomic_<syncop><QHSD>, atomic_nand<QHSD>): New.
375         (atomic_fetch_<syncop><QHSD>, atomic_fetch_nand<QHSD>): New.
376         (atomic_<syncop>_fetch<QHSD>, atomic_nand_fetch<QHSD>): New.
377         (arm_load_exclusive<NARROW>): New.
378         (arm_load_exclusivesi, arm_load_exclusivedi): New.
379         (arm_store_exclusive<QHSD>): New.
380
381 2012-01-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
382
383         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add DF
384         reload patterns if -mvsx-scalar-memory.
385
386         * config/rs6000/vsx.md (vsx_xscvspdp): Allow xscvspdp to be
387         generated, even -mno-vsx-scalar-double was used.
388         (vsx_xscvdpsp_scalar): Likewise.
389         (vsx_xscvspdp_scalar2): Likewise.
390
391 2012-01-09  Tom de Vries  <tom@codesourcery.com>
392             Andrew Pinski  <apinski@cavium.com>
393
394         PR debug/51471
395         * reorg.c (fill_slots_from_thread): Don't speculate
396         frame-related insns.
397
398 2012-01-09  Richard Sandiford  <rdsandiford@googlemail.com>
399
400         * sched-int.h (bb_note): Move to...
401         * basic-block.h: ...here.
402         * haifa-sched.c (bb_note): Move to...
403         * cfgrtl.c: ...here.
404         * function.c (next_block_for_reg): New function.
405         (move_insn_for_shrink_wrap): Likewise.
406         (prepare_shrink_wrap): Rewrite to use the above.
407
408 2012-01-09  Aldy Hernandez  <aldyh@redhat.com>
409
410         * gimple.c (is_gimple_non_addressable): Remove.
411         * gimple.h: Remove is_gimple_non_addressable.
412         * gimplify.c (gimplify_modify_expr_rhs): Use is_gimple_reg instead of
413         is_gimple_non_addressable.
414         * trans-mem.c (expand_assign_tm): Same.
415
416 2012-01-09  Richard Guenther  <rguenther@suse.de>
417
418         PR tree-optimization/51775
419         * tree-ssa-sccvn.c (visit_use): Value-number throwing stmts.
420         * tree-ssa-pre.c (eliminate): Properly fixup EH info.
421
422 2012-01-09  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
423
424         * config/arm/arm-cores.def (cortex-a15): Use cortex_a15_tune for
425         tuning parameters.
426         * config/arm/arm.c (arm_cortex_a15_tune): New static variable.
427
428 2012-01-09  Richard Guenther  <rguenther@suse.de>
429
430         * tree-streamer-out.c (write_ts_optimization): Fix spelling.
431
432 2012-01-08  Jan Hubicka  <jh@suse.cz>
433
434         PR tree-optimize/51680
435         * ipa-inline-analyss.c (evaluate_properties_for_edge): Fix condition
436         on when known_vals needs to be computed; cleanup.
437
438 2012-01-08  Jan Hubicka  <jh@suse.cz>
439
440         PR tree-optimize/51694
441         * ipa-cp.c (ipa_get_indirect_edge_target): Add bounds checks.
442
443 2012-01-08  Jonathan Wakely  <jwakely.gcc@gmail.com>
444
445         * doc/cpp.texi (Predefined Macros): __STRICT_ANSI__ is defined
446         for -std=c++98 and -std=c++11 too.
447
448 2012-01-08  Chung-Lin Tang  <cltang@codesourcery.com>
449
450         * cfgloop.c (cancel_loop): Add free() of bbs array.
451
452 2012-01-07  Jan Hubicka  <jh@suse.cz>
453
454         PR tree-optimization/51600
455         * ipa-inline-analysis.c (estimate_edge_devirt_benefit): Disable code
456         that benefits small functions.
457
458 2012-01-07  Jan Hubicka  <jh@suse.cz>
459
460         * ipa-inline.c (want_inline_small_function_p): Fix formating.
461
462 2012-01-07  Jan Hubicka  <jh@suse.cz>
463
464         PR tree-optimization/51680
465         * ipa-inline.c (want_inline_small_function_p): Be more lax on functions
466         whose inlining reduce unit size.
467
468 2012-01-07  Alexandre Oliva  <aoliva@redhat.com>
469
470         PR bootstrap/51725
471         * cselib.c (new_elt_loc_list): Promote addr_list to canonical node.
472         Add canonical node to containing_mem chain after the non-canonical
473         one, even if there weren't any locs to propagate.
474         (remove_useless_values): Keep only canonical values.
475         (add_mem_for_addr, cselib_lookup_mem): Canonicalize addr.
476         (cselib_invalidate_mem): Likewise.  Ensure v is canonical, and
477         canonicalize mem_chain elements that are not discarded.
478
479 2012-01-06  Jakub Jelinek  <jakub@redhat.com>
480
481         PR target/47333
482         * cgraphunit.c (cgraph_optimize): Call output_weakrefs
483         before emitting functions.
484
485         PR gcov-profile/50127
486         * bb-reorder.c (partition_hot_cold_basic_blocks): Call
487         clear_aux_for_blocks.
488
489 2012-01-06  Alexandre Oliva  <aoliva@redhat.com>
490
491         PR debug/51746
492         * cselib.c (cselib_hash_rtx): Hash incoming VALUEs too.
493
494 2012-01-06  Arnaud Charlet  <charlet@adacore.com>
495
496         * c-decl.c (ext_block): Moved up.
497         (collect_all_refs, for_each_global_decl): Take ext_block into account.
498
499 2012-01-06  Han Shen  <shenhan@google.com>
500
501         Translate built-in include paths for sysroot.
502         * Makefile.in (gcc_gxx_include_dir_add_sysroot): New.
503         (PREPROCESSOR_DEFINES): Define GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT.
504
505         * cppdefault.c (cpp_include_defaults): Replace hard coded "0" with
506         GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT for "add_sysroot" field.
507
508         * configure.ac (AC_SUBST): Add gcc_gxx_include_dir_add_sysroot to
509         control whether sysroot should be prepended to gxx include dir.
510
511         * configure: Regenerate.
512
513 2012-01-06  Torvald Riegel  <triegel@redhat.com>
514
515         PR rtl-optimization/51771
516         * builtin-attrs.def (ATTR_RETURNS_TWICE, ATTR_TM_NOTHROW_RT_LIST): New.
517         * gtm-builtins.def (BUILT_IN_TM_START): Add returns-twice attrib.
518
519 2012-01-05  Eric Botcazou  <ebotcazou@adacore.com>
520
521         PR tree-optimization/51315
522         * tree-sra.c (tree_non_aligned_mem_for_access_p): New predicate.
523         (build_accesses_from_assign): Use it instead of tree_non_aligned_mem_p.
524
525 2012-01-05  Uros Bizjak  <ubizjak@gmail.com>
526
527         PR target/51681
528         * config/ia64/ia64.c (expand_vec_perm_shrp): Use correct operands
529         for shrp pattern.  Correctly handle and fixup shift variable.
530         Return false when shift > nelt for BYTES_BIG_ENDIAN target.
531
532 2012-01-05  Jakub Jelinek  <jakub@redhat.com>
533
534         PR debug/51762
535         * calls.c (emit_call_1): For noreturn calls force a REG_ARGS_SIZE
536         note when !ACCUMULATE_OUTGOING_ARGS.
537
538 2012-01-05  Eric Botcazou  <ebotcazou@adacore.com>
539
540         * tree-vrp.c (extract_range_from_binary_expr_1): Remove duplicated
541         condition.
542         (extract_range_from_unary_expr_1): Avoid useless computations.
543
544 2012-01-05  Jakub Jelinek  <jakub@redhat.com>
545
546         PR rtl-optimization/51767
547         * cfgrtl.c (force_nonfallthru_and_redirect): Force addition
548         of jump_block and add an extra edge for degenerated asm gotos.
549
550         PR middle-end/51768
551         * stmt.c (check_unique_operand_names): Don't ICE during error
552         reporting if i is from labels chain.
553
554         PR middle-end/44777
555         * profile.c (branch_prob): Split bbs that have exit edge
556         and need a fake entry edge too.
557
558 2012-01-05  Jan Hubicka  <jh@suse.cz>
559
560         PR middle-end/49710
561         * cfgloopmanip.c (remove_path): Walk loop hiearchy upwards when
562         unlooping loops.
563
564 2012-01-05  Richard Guenther  <rguenther@suse.de>
565
566         PR lto/50490
567         * tree-streamer-out.c (write_ts_optimization): New function.
568         (streamer_write_tree_body): Call it.
569         * tree-streamer-in.c (lto_input_ts_optimization): New function.
570         (streamer_read_tree_body): Call it.
571         * lto-streamer-out.c (lto_is_streamable): Handle OPTIMIZATION_NODE.
572
573 2012-01-05  Jakub Jelinek  <jakub@redhat.com>
574
575         PR middle-end/51761
576         * gimple.h (struct gimplify_ctx): Add in_cleanup_point_expr field.
577         * gimplify.c (gimplify_cleanup_point_expr): Save and set
578         in_cleanup_point_expr before gimplify_stmt call and restore it
579         afterwards.
580         (gimplify_target_expr): Don't add {CLOBBER} cleanup if
581         in_cleanup_point_expr is false.
582
583 2012-01-05  Richard Guenther  <rguenther@suse.de>
584
585         PR middle-end/51764
586         * common.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move
587         to c.opt.
588         * toplev.c (process_options): Reject combining mudflap and LTO.
589         * tree-nomudflap.c (nogo): Use sorry instead of internal_error.
590
591 2012-01-05  Richard Guenther  <rguenther@suse.de>
592
593         PR tree-optimization/51760
594         * tree-ssa-ccp.c (likely_value): Drop UNDEFINED to CONSTANT,
595         not VARYING.
596         (bit_value_unop): Handle UNDEFINED operands.
597         (bit_value_binop): Likewise.
598
599 2012-01-05  Georg-Johann Lay  <avr@gjlay.de>
600
601         * config/avr/avr.c (avr_replace_prefix): Remove.
602         (avr_asm_named_section): Use ACONCAT instead of avr_replace_prefix.
603         (avr_asm_function_rodata_section): Ditto.
604         (avr_asm_select_section): Ditto.
605
606 2012-01-05  Marcus Shawcroft  <marcus.shawcroft@arm.com>
607
608         * reload.c (find_reloads): Adjust LABEL_NUSES on REG_LABEL_OPERAND
609         insertion.
610
611 2012-01-05  Jakub Jelinek  <jakub@redhat.com>
612
613         PR bootstrap/51648
614         * tree-cfg.c (need_fake_edge_p): Return true also for noreturn
615         calls that have any non-fake successor edges.
616
617         PR debug/51746
618         * var-tracking.c (add_stores): For COND_EXEC allow oval to be NULL.
619
620 2012-01-04  Eric Botcazou  <ebotcazou@adacore.com>
621
622         PR tree-optimization/51624
623         * tree-sra.c (build_ref_for_model): When replicating a chain of
624         COMPONENT_REFs, stop as soon as the offset would become negative.
625
626 2012-01-04  Jakub Jelinek  <jakub@redhat.com>
627
628         PR debug/51695
629         * dwarf2out.c (output_loc_list): For now drop >= 64KB expressions
630         in .debug_loc on the floor.
631
632 2012-01-04  Andrew Pinski  <apinski@cavium.com>
633
634         * doc/invoke.texi (-march=@var{arch}): Add octeon+ and octeon2.
635
636 2012-01-04  Andrew Pinski  <apinski@cavium.com>
637             Adam Nemet  <anemet@caviumnetworks.com>
638
639         * config/mips/mips.md (size): Add SI and DI.
640         (SIZE): New mode attribute.
641         (U): New code attribute.
642         * config/mips/mips-dsp.md (mips_lbux): Use gen_mips_lbux_extsi.
643         (mips_lbux_<mode>): Delete.
644         (mips_l<SHORT:size><u>x_ext<GPR:mode>_<P:mode>): New pattern.
645         (mips_lhx): Use gen_mips_lhx_extsi.
646         (mips_lhx_<mode>): Delete.
647         (mips_lwx): Delete.
648         (mips_l<size>x): New expand.
649         (mips_lwx_<mode>): Delete.
650         (mips_l<GPR:size>x_<P:mode>): New pattern.
651         (*mips_lw<u>x_<P:mode>_ext): Likewise.
652         * config/mips/mips-ftypes.def: Add DI f(POINTER, SI) function type.
653         * config/mips/mips.c (mips_lx_address_p): New function.
654         (mips_rtx_costs <case MEM>): Call mips_lx_address_p.
655         (dsp64): New availability predicate.
656         (mips_builtins): Add an entry for __builtin_mips_ldx.
657         * config/mips/mips.h (ISA_HAS_LBX): New define.
658         (ISA_HAS_LBUX): Likewise.
659         (ISA_HAS_LHX): Likewise.
660         (ISA_HAS_LHUX): Likewise.
661         (ISA_HAS_LWX): Likewise.
662         (ISA_HAS_LWUX): Likewise.
663         (ISA_HAS_LDX): Likewise.
664         * doc/extend.texi (__builtin_mips_ldx): Document.
665
666 2012-01-04  Tristan Gingold  <gingold@adacore.com>
667
668         * config/vms/xm-vms.h (HOST_LONG_FORMAT, HOST_PTR_PRINTF): Define
669         when long pointers are used.
670         * config.build (*-*-*vms*): Handle all OpenVMS targets.
671         (alpha64-dec-*vms*, alpha*-dec-*vms*)
672         (ia64-hp-*vms*): Remove.
673         * config/vms/xm-vms64.h: Delete.
674
675 2012-01-04  Aldy Hernandez  <aldyh@redhat.com>
676
677         PR middle-end/51472
678         * trans-mem.c (expand_assign_tm): Handle TM_MEMMOVE loads correctly.
679
680 2012-01-04  Aldy Hernandez  <aldyh@redhat.com>
681
682         * opts.c (finish_options): Remove duplicate sorry.
683
684 2012-01-04  Aldy Hernandez  <aldyh@redhat.com>
685
686         PR middle-end/51696
687         * trans-mem.c (diagnose_tm_1): Display indirect calls with no name
688         correctly.
689
690 2012-01-04  Richard Guenther  <rguenther@suse.de>
691
692         PR middle-end/51750
693         * tree.c (size_low_cst): New function.
694         * tree.h (size_low_cst): Declare.
695         * fold-const.c (fold_comparison): Use it to extract the low
696         part of the POINTER_PLUS_EXPR offset.
697
698 2012-01-04  Georg-Johann Lay  <avr@gjlay.de>
699
700         Fix clearing ZERO_REG
701         * config/avr/avr.md (cc): Add alternative "ldi".
702         (movqi_insn): Use it in cc attribute.
703         * config/avr/avr.c (notice_update_cc): Handle CC_LDI.
704         (output_reload_in_const): Use CLR to move 0 to ZERO_REG.
705         (output_reload_insisf): Use ZERO_REG to pre-clear register.
706
707 2012-01-04  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
708
709         * configure: Regenerate.
710
711 2012-01-04  Richard Guenther  <rguenther@suse.de>
712
713         PR tree-optimization/49651
714         * tree-ssa-structalias.c (type_can_have_subvars): New function.
715         (var_can_have_subvars): Use it.
716         (get_constraint_for_1): Only consider subfields if there can be any.
717
718 2012-01-03  Jakub Jelinek  <jakub@redhat.com>
719
720         PR bootstrap/51725
721         * cselib.c (new_elt_loc_list): When moving locs from one cselib_val
722         to its new canonical_cselib_val and the cselib_val was in
723         first_containing_mem chain, but the canonical_cselib_val was not,
724         add the latter into the chain.
725         (cselib_invalidate_mem): Compare canonical_cselib_val of
726         addr_list chain elt with v.
727
728         PR pch/51722
729         * dwarf2out.c (dwarf2out_start_source_file, dwarf2out_define,
730         dwarf2out_undef): Allocate e.info using ggc_strdup instead
731         of xstrdup.
732         (output_macinfo_op): Don't ggc_strdup fd->filename.
733         (optimize_macinfo_range): Allocate grp_name using XALLOCAVEC,
734         then ggc_strdup it.  Don't free inc->info or cur->info.
735         (output_macinfo): Don't free ref->info or file->info.
736
737 2012-01-03  Ira Rosen  <irar@il.ibm.com>
738
739         PR tree-optimization/51269
740         * tree-vect-loop-manip.c (set_prologue_iterations): Make
741         first_niters a pointer.
742         (slpeel_tree_peel_loop_to_edge): Likewise.
743         (vect_do_peeling_for_loop_bound): Update call to
744         slpeel_tree_peel_loop_to_edge.
745         (vect_gen_niters_for_prolog_loop): Don't compute wide_prolog_niters
746         here.  Remove it from the parameters list.
747         (vect_do_peeling_for_alignment): Update calls and compute
748         wide_prolog_niters.
749
750 2012-01-03  Richard Guenther  <rguenther@suse.de>
751
752         PR tree-optimization/51070
753         * tree-loop-distribution.c (stmt_has_scalar_dependences_outside_loop):
754         Properly handle calls.
755
756 2012-01-03  Richard Guenther  <rguenther@suse.de>
757
758         PR tree-optimization/51692
759         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Do not remove
760         the LHS of allocation stmts.
761
762 2012-01-03  Olivier Hainque  <hainque@adacore.com>
763
764         * system.h: Prior to #define, #undef fopen and freopen unconditionally.
765
766 2012-01-03  Olivier Hainque  <hainque@adacore.com>
767
768         * collect2.c (main): In AIX specific computations for vector
769         insertions, use CONST_CAST2 to cast from char ** to const char **.
770
771 2012-01-03  Richard Guenther  <rguenther@suse.de>
772
773         PR debug/51650
774         * dwarf2out.c (dwarf2out_finish): Always create a DIE for
775         the context of a limbo DIE when it does not already exist.
776
777 2012-01-03  Jakub Jelinek  <jakub@redhat.com>
778
779         PR tree-optimization/51719
780         * value-prof.c (gimple_ic): When indirect call isn't noreturn,
781         but direct call is, clear direct call's lhs and don't add fallthrough
782         edge from dcall_bb to join_bb and PHIs.
783
784 2012-01-03  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
785
786         * config/s390/s390.md ("*cmp<mode>_ccs"): Fix comment mentioning
787         the instructions emitted by the pattern.
788         ("*TDC_insn_<mode>"): Add comment.
789
790 2012-01-03  Richard Guenther  <rguenther@suse.de>
791
792         PR middle-end/51730
793         * fold-const.c (fold_comparison): Properly canonicalize
794         tree offset and HOST_WIDE_INT bit position.
795
796 2012-01-02  Uros Bizjak  <ubizjak@gmail.com>
797
798         * config/ia64/ia64.c (expand_vec_perm_broadcast): Use correct
799         operands for extzv pattern.
800
801 2012-01-02  Jakub Jelinek  <jakub@redhat.com>
802
803         PR bootstrap/51725
804         * cselib.c (add_mem_for_addr): Call canonical_cselib_val
805         on mem_elt first.
806
807 2012-01-02  Sandra Loosemore  <sandra@codesourcery.com>
808
809         * doc/invoke.texi (-flto and related options): Copy-edit.
810
811 2012-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
812
813         * config/mips/mips.md (loadgp_newabi_<mode>): Add missing earlyclobber.
814
815 2012-01-02  Jakub Jelinek  <jakub@redhat.com>
816
817         * config/i386/sse.md (*avx2_gatherdi<mode>_3, *avx2_gatherdi<mode>_4):
818         New patterns.
819
820 2012-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
821
822         * expr.h (move_by_pieces_ninsns): Declare.
823         * expr.c (move_by_pieces_ninsns): Make external.
824         * config/mips/mips-protos.h (mips_move_by_pieces_p): Declare.
825         (mips_store_by_pieces_p): Likewise.
826         * config/mips/mips.h (MOVE_BY_PIECES_P): Call mips_move_by_pieces_p.
827         (STORE_BY_PIECES_P): Likewise mips_store_by_pieces_p.
828         * config/mips/mips.c (mips_move_by_pieces_p): New function.
829         (mips_store_by_pieces_p): Likewise.
830
831 2012-01-02  Jakub Jelinek  <jakub@redhat.com>
832
833         * passes.c (register_one_dump_file): Free full_name.
834
835         * reload1.c (reload): Don't allocate reg_max_ref_width here.
836         (calculate_elim_costs_all_insns): Free offsets_at and
837         offsets_known_at at the end and clear the pointers.
838
839 2012-01-02  Georg-Johann Lay  <avr@gjlay.de>
840
841         * config/avr/avr.opt (-mbranch-cost): Fix double definition of
842         this option introduced in r180739.
843
844 2012-01-02  Georg-Johann Lay  <avr@gjlay.de>
845
846         PR target/51345
847         * config.gcc (tm_file target=avr]): Add avr/avr-multilib.h
848         (tmake_file target=avr): Add avr/t-multilib.
849
850         * config/avr/avr-c.c (avr_cpu_cpp_builtins): Use AVR_HAVE_8BIT_SP
851         to built-in define __AVR_HAVE_8BIT_SP__, __AVR_HAVE_16BIT_SP__.
852         * config/avr/genmultilib.awk: New file.
853         * config/avr/t-multilib: New auto-generated file.
854         * config/avr/multilib.h: New auto-generated file.
855         * config/avr/t-avr (AVR_MCUS): New variable.
856         (genopt.sh): Use it.
857         (s-mlib): Depend on t-multilib.
858         (t-multilib, multilib.h): New dependencies.
859         (s-avr-mlib): New rule to build t-multilib, multilib.h from AVR_MCUS.
860         (MULTILIB_OPTIONS): Remove.
861         (MULTILIB_MATCHES): Remove.
862         (MULTILIB_DIRNAMES): Remove.
863         (MULTILIB_EXCEPTIONS): Remove:
864         * config/avr/genopt.sh: Don't use hard coded file name;
865         pass AVR_MCUS from t-avr instead.
866
867 2012-01-02  Georg-Johann Lay  <avr@gjlay.de>
868
869         * config/avr/avr.c (avr_out_ashrpsi3): Fix "case 31" to "case 23".
870
871 2012-01-02  Georg-Johann Lay  <avr@gjlay.de>
872
873         Implement light-weight DImode support.
874         * config/avr/avr-dimode.md: New file.
875         * config/avr/avr.md: Include it.
876         (adjust_len): Add plus64, compare64.
877         (HIDI): Remove code iterator.
878         (code_stdname): New code attribute.
879         (rotx, rotsmode): Remove DI.
880         (rotl<mode>3, *rotw<mode>, *rotb<mode>): Use HISI instead of HIDI
881         as code iterator.
882         * config/avr/avr-protos.h (avr_have_dimode): New.
883         (avr_out_plus64, avr_out_compare64): New.
884         * config/avr/avr.c (avr_out_compare): Handle DImode.
885         (avr_have_dimode): New variable definition and initialization.
886         (avr_out_compare64, avr_out_plus64): New functions.
887         (avr_out_plus_1): Use simplify_unary_operation to negate xval.
888         (adjust_insn_length): Handle ADJUST_LEN_COMPARE64, ADJUST_LEN_PLUS64.
889         (avr_compare_pattern): Skip DImode comparisons.
890
891 2012-01-02  Revital Eres  <revital.eres@linaro.org>
892
893         * ddg.c (def_has_ccmode_p): New function.
894         (add_cross_iteration_register_deps,
895         create_ddg_dep_from_intra_loop_link): Call it.
896
897 2012-01-02  Richard Guenther  <rguenther@suse.de>
898
899         PR other/51679
900         * invoke.texi (fassociative-math): Remove spurious paranthesis.
901
902 2012-01-01  Jakub Jelinek  <jakub@redhat.com>
903
904         * gcc.c (process_command): Update copyright notice dates.
905         * gcov.c (print_version): Likewise.
906         * gcov-dump.c (print_version): Likewise.
907         * mips-tfile.c (main): Likewise.
908         * mips-tdump.c (main): Likewise.
909
910 2012-01-01  Ira Rosen  <irar@il.ibm.com>
911
912         PR tree-optimization/51704
913         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Check that
914         a use is inside the basic block or loop before accessing its vect info.
915
916 2012-01-01  Jan Hubicka  <jhjh@suse.cz>
917
918         PR rtl-optimization/51069
919         * cfgloopmanip.c (remove_path): Removing path making irreducible
920         region unconditional makes BB part of the region.
921
922 2012-01-01  Jakub Jelinek  <jakub@redhat.com>
923
924         PR tree-optimization/51683
925         * tree-ssa-propagate.c (substitute_and_fold): Don't optimize away
926         calls with side-effects.
927         * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
928 \f
929 Copyright (C) 2012 Free Software Foundation, Inc.
930
931 Copying and distribution of this file, with or without modification,
932 are permitted in any medium without royalty provided the copyright
933 notice and this notice are preserved.