OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2011-12-19  Richard Sandiford  <rdsandiford@googlemail.com>
2
3         * fwprop.c (forward_propagate_subreg): Skip the SIGN/ZERO_EXTEND
4         optimization if the source register is already extended.
5
6 2011-12-19  Richard Sandiford  <rdsandiford@googlemail.com>
7
8         * lower-subreg.c (can_decompose_p): Check every word of a hard
9         register.
10
11 2011-12-19  Sandra Loosemore  <sandra@codesourcery.com>
12             Tom de Vries <tom@codesourcery.com>
13
14         PR rtl-opt/50380
15         * cse.c (find_comparison_args): Detect fixed point and
16         bail early.
17
18 2011-12-19  Aldy Hernandez  <aldyh@redhat.com>
19
20         PR middle-end/51411
21         * trans-mem.c (ipa_tm_create_version): Unset DECL_WEAK.
22
23 2011-12-19  Quentin Neill  <quentin.neill@amd.com>
24
25         PR target/48743
26         * config/i386/driver-i386.c (host_detect_local_cpu): Also check
27         family to distinguish PROCESSOR_ATHLON.
28
29 2011-12-19  Richard Guenther  <rguenther@suse.de>
30
31         PR lto/51573
32         * streamer-hooks.h (struct streamer_hooks): Add second
33         ref_p parameter to write_tree.
34         (stream_write_tree): Adjust.
35         (stream_write_tree_shallow_non_ref): New define.
36         * lto-streamer.h (lto_output_tree): Adjust.
37         * lto-streamer-out.c (lto_output_tree): Likewise.
38         * tree-streamer-out.c (streamer_write_chain): Only
39         force the immediate tree to be streamed as non-reference.
40
41 2011-12-19  Martin Jambor  <mjambor@suse.cz>
42
43         PR tree-optimization/51583
44         * tree-sra.c (load_assign_lhs_subreplacements): Call
45         force_gimple_operand_gsi when necessary also in case of no
46         corresponding replacement on the RHS.
47
48 2011-12-19  Jakub Jelinek  <jakub@redhat.com>
49
50         * gimple.h (gimplify_seq_add_stmt): Rename to...
51         (gimple_seq_add_stmt_without_update): ... this.
52         * gimplify.c (gimplify_seq_add_stmt): Rename to...
53         (gimple_seq_add_stmt_without_update): ... this.
54         (gimplify_seq_add_stmt): New inline wrapper for it.
55         * tree-vect-patterns.c (append_pattern_def_seq): Use
56         gimple_seq_add_stmt_without_update instead of gimplify_seq_add_stmt.
57
58         PR tree-optimization/51596
59         * tree-cfg.c (replace_uses_by): Call gimple_purge_dead_eh_edges
60         when needed.
61
62         PR middle-end/51590
63         PR tree-optimization/51606
64         * tree-vect-patterns.c (append_pattern_def_seq, new_pattern_def_seq):
65         New inline functions.
66         (vect_recog_over_widening_pattern,
67         vect_recog_vector_vector_shift_pattern,
68         vect_recog_sdivmod_pow2_pattern, vect_recog_mixed_size_cond_pattern,
69         adjust_bool_pattern_cast, vect_recog_bool_pattern): Use them.
70
71 2011-12-19  Richard Guenther  <rguenther@suse.de>
72
73         PR lto/51572
74         * tree.c (free_lang_data_in_type): Do not unlink TYPE_DECL
75         from TYPE_FIELDS.
76         (find_decls_types_r): Walk TYPE_DECLs in TYPE_FIELDS.
77         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Do
78         not stream TREE_CHAIN.
79         (write_ts_type_non_common_tree_pointers): Stream TYPE_FIELDS
80         using streamer_write_chain.
81         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
82         Do not stream TREE_CHAIN.
83         (lto_input_ts_type_non_common_tree_pointers): Stream TYPE_FIELDS
84         using streamer_read_chain.
85         * gimple-streamer-in.c (input_gimple_stmt): Skip non-FIELD_DECLs.
86         * gimple.c (gimple_canonical_types_compatible_p): Properly
87         handle trailing non-FIELD_DECLs in TYPE_FIELDS.
88
89 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
90
91         * configure: Regenerate.
92
93 2011-12-19  Bernd Schmidt  <bernds@codesourcery.com>
94
95         * emit-rtl.c (init_emit_once): Initialize const_tiny_rtx[3] for
96         partial integer modes.
97
98 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
99
100         PR target/51532
101         * config/m68k/m68k.h (FL_CAS, TARGET_CAS): Define.
102         * config/m68k/m68k.c (FL_FOR_isa_20): Add FL_CAS.
103         * config/m68k/sync.md: Use TARGET_CAS instead of (TARGET_68020 ||
104         TARGET_68040).
105
106 2011-12-18  Anatoly Sokolov  <aesok@post.ru>
107
108         * config/ia64/ia64.h (REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P,
109         LEGITIMATE_ADDRESS_REG, LEGITIMATE_ADDRESS_DISP,
110         GO_IF_LEGITIMATE_ADDRESS): Remove macros.
111         * config/ia64/ia64.c (TARGET_LEGITIMATE_ADDRESS_P): Define.
112         (ia64_reg_ok_for_base_p, ia64_legitimate_address_reg,
113         ia64_legitimate_address_disp, ia64_legitimate_address_p): New
114         functions.
115
116 2011-12-17  Tom de Vries  <tom@codesourcery.com>
117
118         PR tree-optimization/51491
119         * tree-ssa-ccp.c (insert_clobber_before_stack_restore)
120         (gsi_prev_dom_bb_nondebug, insert_clobbers_for_var): New function.
121         (ccp_fold_stmt): Use insert_clobbers_for_var after a successful
122         fold_builtin_alloca_with_align.
123         (ccp_visit_stmt): Calculate and free dominator info.
124
125 2011-12-16  Eric Botcazou  <ebotcazou@adacore.com>
126
127         * config/sparc/sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant.
128         (frame_blockage): New expander.
129         (frame_blockage<P:mode>): New instruction.
130         * config/sparc/sparc.c (sparc_expand_prologue): When the sequence of
131         instructions establishing the frame isn't atomic, emit frame blockage.
132
133 2011-12-16  Tristan Gingold  <gingold@adacore.com>
134
135         * config/alpha/vms.h (USE_TM_CLONE_REGISTRY): Define.
136
137 2011-12-16  Tristan Gingold  <gingold@adacore.com>
138
139         * config/alpha/alpha.c (alpha_use_linkage): Follow transparent alias.
140         (alpha_write_one_linkage): Use assemble_name to emit linkage name.
141
142 2011-12-16  Tristan Gingold  <gingold@adacore.com>
143
144         * config/vms/t-vms (vms.o, vms-c.o): Force output filename.
145
146 2011-12-16  Tristan Gingold  <gingold@adacore.com>
147
148         * config/vms/vms.c (VMS_CRTL_GLOBAL): Define.
149         (vms_patch_builtins): Handle.
150         * config/vms/vms-crtlmap.map: Add an entry for environ.
151
152 2011-12-16  Jakub Jelinek  <jakub@redhat.com>
153
154         PR debug/51557
155         * sel-sched-ir.c (create_copy_of_insn_rtx): Copy all notes
156         other than REG_EQUAL, REG_EQUIV and REG_LABEL_OPERAND.
157
158         PR tree-optimization/51576
159         * tree-cfg.c (replace_uses_by): Call maybe_clean_or_replace_eh_stmt
160         even if fold_stmt didn't change anything.
161
162 2011-12-16  Richard Guenther  <rguenther@suse.de>
163
164         PR lto/51572
165         * dwarf2out.c (gen_type_die_with_usage): Use the context of
166         the TYPE_DECL as well if it is file-scope.
167
168 2011-12-15  DJ Delorie  <dj@redhat.com>
169
170         * config/rl78/rl78.md (return): Rename to rl78_return.
171         * config/rl78/rl78.c (rl78_expand_epilogue): Use new name.
172         (rl78_expand_eh_epilogue): Use new name.
173         (rl78_calculate_death_notes): Likewise.
174
175 2011-12-15  Jakub Jelinek  <jakub@redhat.com>
176
177         * tree-vectorizer.h (struct _stmt_vec_info): Remove pattern_def_stmt
178         field, add pattern_def_seq.
179         (STMT_VINFO_PATTERN_DEF_STMT): Remove.
180         (STMT_VINFO_PATTERN_DEF_SEQ): Define.
181         (NUM_PATTERNS): Bump to 10.
182         * tree-vect-loop.c (vect_determine_vectorization_factor,
183         vect_transform_loop): Adjust for pattern def changing from a single
184         gimple stmt to gimple_seq.
185         * tree-vect-stmts.c (vect_analyze_stmt, new_stmt_vec_info,
186         free_stmt_vec_info): Likewise.
187         * tree-vect-patterns.c (vect_recog_over_widening_pattern,
188         vect_recog_vector_vector_shift_pattern,
189         vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast,
190         adjust_bool_pattern, vect_mark_pattern_stmts): Likewise.
191         (vect_recog_sdivmod_pow2_pattern): New function.
192         (vect_vect_recog_func_ptrs): Add it.
193
194         * config/i386/sse.md (vcond<V_256:mode><VI_256:mode>,
195         vcond<V_128:mode><VI124_128:mode>, vcond<VI8F_128:mode>v2di):
196         Use general_operand instead of nonimmediate_operand for
197         operand 5 and no predicate for operands 1 and 2.
198         * config/i386/i386.c (ix86_expand_int_vcond): Optimize
199         x < 0 ? -1 : 0 and x < 0 ? 1 : 0 into vector arithmetic
200         resp. logical shift.
201
202 2011-12-15  Georg-Johann Lay  <avr@gjlay.de>
203
204         * config/avr/avr-protos.h (print_operand): Remove.
205         (print_operand_address): Remove.
206         * config/avr/avr.h (PRINT_OPERAND): Remove.
207         (PRINT_OPERAND_ADDRESS): Remove.
208         (PRINT_OPERAND_PUNCT_VALID_P): Remove.
209         * config/avr/avr.c (TARGET_PRINT_OPERAND): New hook define.
210         (TARGET_PRINT_OPERAND_ADDRESS): New hook define.
211         (TARGET_PRINT_OPERAND_PUNCT_VALID_P): New hook define.
212         (print_operand_address): Rename to...
213         (avr_print_operand_address): ...this and make static.
214         (print_operand): Rename to...
215         (avr_print_operand): ...this and make static.
216         (avr_print_operand_punct_valid_p): New static function.
217
218 2011-12-15  Andreas Tobler  <andreast@fgznet.ch>
219
220         * config/i386/freebsd.h (TARGET_ASM_FILE_END): Define.
221
222 2011-12-15  Jakub Jelinek  <jakub@redhat.com>
223
224         PR c/51360
225         * c-parser.c (c_parser_omp_clause_num_threads,
226         c_parser_omp_clause_schedule): Call mark_exp_read.
227
228 2011-12-15  Romain Geissler  <romain.geissler@gmail.com>
229
230         * builtins.def (BUILT_IN_STPNCPY_CHK): New definition.
231         * builtins.c (expand_builtin, fold_builtin_4, maybe_emit_chk_warning):
232         Add BUILT_IN_STPNCPY_CHK case.
233         * gimple-fold.c (gimple_fold_builtin): Likewise.
234         * tree-object-size.c (pass_through_call): Likewise.
235         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
236         call_may_clobber_ref_p_1): Likewise.
237         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call,
238         find_func_clobbers): Likewise.
239         * tree.h (fold_builtin_strncpy_chk): Rename to fold_builtin_stxncpy_chk
240         * builtins.c (fold_builtin_strncpy_chk): Likewise.
241         Rewrite stpncpy_chk calls to strncpy_chk calls if returned value is
242         ignored.
243
244 2011-12-15  Richard Guenther  <rguenther@suse.de>
245
246         PR lto/51567
247         * gimple.c (compare_type_names_p): Also compare the TREE_CODE.
248         (iterative_hash_name): Also hash the TREE_CODE.
249         (gimple_types_compatible_p_1): For types with a TYPE_DECL
250         name and a type DECL_CONTEXT recurse to that type.
251         (iterative_hash_gimple_type): Likewise.
252
253 2011-12-15  Iain Sandoe  <iains@gcc.gnu.org>
254
255         * config/rs6000/rs6000.c  (rs6000_emit_prologue): Move update of
256         VRSave mask to save_world() when that is in use.
257
258 2011-12-15  Richard Guenther  <rguenther@suse.de>
259
260         * lto-wrapper.c (run_gcc): In non-parallel mode remove
261         ltrans inputs immediately after processing them.  In parallel
262         mode truncate the ltrans inputs in the make rule that processes
263         them if temporary files are not to be preserved.
264
265 2011-12-15  Anatoly Sokolov  <aesok@post.ru>
266
267         * config/arm/arm.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
268         * config/arm/arm.c (arm_memory_move_cost, arm_register_move_cost):
269         New functions.
270         (TARGET_REGISTER_MOVE_COST, TARGET_MEMORY_MOVE_COST): Define.
271
272 2011-12-15  Richard Guenther  <rguenther@suse.de>
273
274         PR lto/51564
275         * tree.h (REGISTER_DEFS_IN_THIS_STMT, NECESSARY,
276         STMT_IN_SSA_EDGE_WORKLIST): Remove no longer existing flag
277         uses documentation.
278         (TREE_ASM_WRITTEN): Update documentation to mention its use
279         on TYPE_DECLs from debug info generation.
280         * tree-streamer-out.c (pack_ts_base_value_fields): Stream
281         TREE_ASM_WRITTEN as always zero for TYPE_DECLs, similar to
282         all other types.
283
284 2011-12-15  Georg-Johann Lay  <avr@gjlay.de>
285
286         PR target/51050
287         * config/avr/avr.c (expand_epilogue): Don't build SUBREG of fp.
288         (avr_prologue_setup_frame): Ditto.
289
290 2011-12-15  Jakub Jelinek  <jakub@redhat.com>
291
292         PR debug/51517
293         * tree-ssa-coalesce.c (coalesce_ssa_name): For !optimize, test
294         !DECL_IGNORED_P instead of !DECL_ARTIFICIAL.
295
296 2012-12-15  Richard Guenther  <rguenther@suse.de>
297
298         Revert
299         PR lto/48437
300         * lto-streamer-out.c (tree_is_indexable): Exclude block-local
301         extern declarations.
302
303         PR lto/48508
304         PR lto/48437
305         * tree-streamer-out.c (streamer_write_chain): Stream DECL_EXTERNAL
306         VAR_DECLs and FUNCTION_DECLs locally.
307
308 2011-12-14  Richard Henderson  <rth@redhat.com>
309
310         * config/arm/arm.md (*addsi3_compare0_scratch): Set predicable.
311         (*compare_negsi_si, *compare_addsi2_op0): Likewise.
312         (*compare_addsi2_op1, *zeroextractsi_compare0_scratch): Likewise.
313         (*compareqi_eq0, *arm_cmpsi_insn, *arm_cmpsi_negshiftsi_si): Likewise.
314
315 2011-12-14  Richard Guenther  <rguenther@suse.de>
316
317         * tree-cfg.c (replace_uses_by): Fixup TREE_CONSTANT for
318         propagating all kinds of constants.
319
320 2011-12-14  Richard Guenther  <rguenther@suse.de>
321
322         PR lto/51497
323         * lto-streamer-in.c (lto_read_body): Fixup local types
324         TYPE_CANONICAL and variant chain.
325
326 2011-12-14  Richard Guenther  <rguenther@suse.de>
327
328         * tree.c (free_lang_data_in_type): Do not clear fields
329         dependent on debuginfo level setting.
330         (find_decls_types_r): Use TYPE_STUB_DECL rathern than TREE_CHAIN.
331         * tree.h (TYPE_STUB_DECL): Properly check that we access a type.
332
333 2011-12-14  Georg-Johann Lay  <avr@gjlay.de>
334
335         PR target/50931
336         * config/avr/avr.md (mulpsi3): New expander.
337         (*umulqihipsi3, *umulhiqipsi3): New insns.
338         (*mulsqipsi3.libgcc, *mulpsi3.libgcc): New insns.
339         (mulsqipsi3, *mulpsi3): New insn-and-splits.
340         (ashlpsi3): Turn to expander.  Move insn code to...
341         (*ashlpsi3): ...this new insn.
342
343 2011-12-14  Richard Guenther  <rguenther@suse.de>
344
345         * tree-cfg.c (replace_uses_by): Only mark blocks altered
346         that will make a difference.  Only recompute ADDR_EXPR
347         invariantness if it could possibly have changed.  Do so
348         before folding the statement.
349
350 2011-12-13  Eric Botcazou  <ebotcazou@adacore.com>
351
352         * lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
353         * lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets.
354         * lto-streamer-in.c (lto_read_body): Likewise.
355         (lto_input_toplevel_asms): Likewise.
356         * lto-section-in.c (lto_create_simple_input_block): Likewise.
357         * ipa-inline-analysis.c (inline_read_section): Likewise.
358         * ipa-prop.c (ipa_prop_read_section): Likewise.
359
360         * df.h (DF_NOTE): Fix typo in comment.
361
362 2011-12-13  Aldy Hernandez  <aldyh@redhat.com>
363
364         * trans-mem.c (ipa_tm_create_version_alias): Set DECL_CONTEXT and
365         DECL_LANG_SPECIFIC.
366
367 2011-12-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
368
369         * regmove.c (fixup_match_2): Only access call_used_regs with hard regs.
370
371 2011-12-13  Andrew Pinski  <apinski@cavium.com>
372             Adam Nemet  <anemet@caviumnetworks.com>
373
374         * config/mips/mips-cpus.def: Add Octeon2.
375         * config/mips/mips-tables.opt: Regenerate.
376         * config/mips/mips.md (define_attr "cpu"): Add Octeon2.
377         * config/mips/driver-native.c (host_detect_local_cpu): Support Octeon2.
378         * config/mips/octeon.md (octeon_arith): Add Octeon2.
379         (octeon_condmove): Likewise.
380         (octeon_load): Rename to ..
381         (octeon_load_o1): this.
382         (octeon_load_o2): New reserve.
383         (octeon_cop_o2): New reserve.
384         (octeon_store):  Match Octeon2 also.
385         (octeon_brj): Rename to ..
386         (octeon_brj_o1): this.
387         (octeon_brj_o2): New reserve.
388         (octeon_imul3): Rename to ...
389         (octeon_imul3_o1): this.
390         (octeon_imul3_o2): New reserve.
391         (octeon_imul): Rename to ...
392         (octeon_imul_o1): this.
393         (octeon_imul_o2): New reserve.
394         (octeon_mfhilo): Rename to ...
395         (octeon_mfhilo_o1): This.
396         (octeon_mfhilo_o2): New reserve.
397         (octeon_imadd): Rename to ...
398         (octeon_imadd_o1): this.
399         (octeon_imadd_o2): New reserve.
400         (octeon_idiv): Rename to ..
401         (octeon_idiv_o1): This.
402         (octeon_idiv_o2_si): New reserve.
403         (octeon_idiv_o2_di): Likewise.
404         (octeon_unknown): Match Octeon2 also.
405         * config/mips/mips.c (mips_rtx_cost_data): Add Octeon2 cost data.
406         (mips_issue_rate): Octeon2 can issue 2 at a time.
407         * config/mips/mips.h (TARGET_OCTEON): Match Octeon2 also.
408         (TARGET_OCTEON2): New define.
409         (TUNE_OCTEON): Match Octeon2 also.
410
411 2011-12-13  Richard Henderson  <rth@redhat.com>
412
413         * config/sparc/tso.h: New file.
414         * config.gcc (sparc-*-linux*, sparc*-*-solaris2*): Use it.
415         * config/sparc/sparc.c (sparc_option_override): Honor
416         SUBTARGET_DEFAULT_MEMORY_MODEL.
417         * config/sparc/sparc.h (SUBTARGET_DEFAULT_MEMORY_MODEL): New.
418
419 2011-12-13  Aldy Hernandez  <aldyh@redhat.com>
420
421         PR middle-end/51443
422         * trans-mem.c (struct diagnose_tm): Remove saw_unsafe.
423         (diagnose_tm_1): Same.
424         (ipa_tm_execute): Do not test tm_may_enter_irr before we set it.
425         (ipa_tm_scan_irr_function): Return gracefully when no
426         DECL_STRUCT_FUNCTION.
427         (ipa_tm_scan_irr_block): Believe the user on TM attributes.
428
429 2011-12-13  Martin Jambor  <mjambor@suse.cz>
430
431         PR middle-end/50628
432         * tree-sra.c (propagate_subaccesses_across_link): Do not propagate
433         sub-accesses of scalar accesses.
434
435 2011-12-13  Martin Jambor  <mjambor@suse.cz>
436
437         PR tree-optimization/51362
438         * ipa-cp.c (estimate_local_effects): When estimated size of a
439         specialized clone is zero, bump it to one.
440
441 2011-12-13  Richard Guenther  <rguenther@suse.de>
442
443         PR lto/48354
444         * tree.c (find_decls_types_r): Also walk DECL_ORIGINAL_TYPE.
445         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
446         Stream DECL_ORIGINAL_TYPE.
447         * tree-streamer-out.c (write_ts_decl_non_common_tree_pointers):
448         Likewise.
449
450 2011-12-13  Jakub Jelinek  <jakub@redhat.com>
451
452         Revert
453         2011-12-12  Jakub Jelinek  <jakub@redhat.com>
454
455         PR tree-optimization/51481
456         * gimple-fold.c (gimple_fold_call): Call
457         maybe_clean_or_replace_eh_stmt.  Avoid optimization if stmt has EH
458         edges, but gimple_fold_builtin result can't throw.
459
460 2011-12-13  Jakub Jelinek  <jakub@redhat.com>
461             Michael Matz  <matz@suse.de>
462
463         PR tree-optimization/51117
464         * tree-eh.c (sink_clobbers): New function.
465         (execute_lower_eh_dispatch): Call it for BBs ending with
466         internally throwing RESX.
467         * cfgexpand.c (add_scope_conflicts_1): Add all conflicts only
468         at the first real instruction.
469
470 2011-12-13  Tristan Gingold  <gingold@adacore.com>
471
472         * final.c (final_scan_insn): Guard the call to begin_epilogue
473         debug hook.
474
475 2011-12-13  Tristan Gingold  <gingold@adacore.com>
476
477         * vmsdbgout.c (vmsdbgout_write_source_line): New function.
478         (vmsdbgout_end_prologue): Call vmsdbgout_write_source_line.
479         (vmsdbgout_begin_epilogue): Likewise.
480         (vmsdbgout_end_epilogue): Likewise.
481         (vmsdbgout_source_line): Move code to vmsdbgout_write_source_line.
482
483 2011-12-13  Richard Guenther  <rguenther@suse.de>
484
485         PR middle-end/51481
486         * tree-cfg.c (replace_uses_by): Pass proper arguments to
487         maybe_clean_or_replace_eh_stmt.
488
489 2011-12-13  Richard Guenther  <rguenther@suse.de>
490
491         PR tree-optimization/51519
492         * ipa-inline.c (edge_badness): Use edge growth in non-guessed
493         branch probability case as well.
494
495 2011-12-13  Revital Eres  <revital.eres@linaro.org>
496
497         * modulo-sched.c (mark_loop_unsched): Free bbs.
498
499 2011-12-12  Jakub Jelinek  <jakub@redhat.com>
500
501         PR rtl-optimization/51495
502         * function.c (thread_prologue_and_epilogue_insns): Don't add
503         to bb_tail basic blocks that have EDGE_COMPLEX predecessor edges
504         from basic blocks not needing prologue.
505
506         PR tree-optimization/51481
507         * gimple-fold.c (gimple_fold_call): Call
508         maybe_clean_or_replace_eh_stmt.  Avoid optimization if stmt has EH
509         edges, but gimple_fold_builtin result can't throw.
510
511 2011-12-12  Vladimir Makarov  <vmakarov@redhat.com>
512
513         PR rtl-optimization/21617
514         * ira-color.c (bucket_allocno_compare_func): Don't compare
515         allocno classes.  Compare number of hard registers needed.
516
517 2011-12-12  Eric Botcazou  <ebotcazou@adacore.com>
518
519         PR tree-optimization/50569
520         * tree-sra.c (build_ref_for_model): Replicate a chain of COMPONENT_REFs
521         in the expression of MODEL instead of just the last one.
522
523 2011-12-12  Jakub Jelinek  <jakub@redhat.com>
524
525         PR middle-end/51510
526         * calls.c (internal_arg_pointer_based_exp_scan): Don't use
527         VEC_safe_grow_cleared if idx is smaller than VEC_length.
528
529 2011-12-12  Richard Sandiford  <richard.sandiford@linaro.org>
530
531         PR middle-end/50873
532         * optabs.c (maybe_legitimize_operand_same_code): Use copy_to_mode_reg
533         instead of force_reg.  Do nothing if the address is already a
534         non-virtual pseudo register.
535
536 2011-12-12  Torvald Riegel  <triegel@redhat.com>
537
538         * gimplify.c (voidify_wrapper_expr): Add default handling for
539         outermost wrapper.
540
541 2011-12-12  Torvald Riegel  <triegel@redhat.com>
542
543         * tree-ssa-tail-merge.c (gimple_equal_p): Don't treat transaction
544         commits as equal.
545
546 2011-12-12  Iain Sandoe  <iains@gcc.gnu.org>
547
548         * config/darwin-sections.def (zobj_const_data_section): Fix over-
549         length section name.
550
551 2011-12-11  Richard Henderson  <rth@redhat.com>
552
553         * config/rs6000/rs6000.c (rs6000_expand_interleave): Use
554         BYTES_BIG_ENDIAN, not TARGET_BIG_ENDIAN.
555
556 2011-12-11  Jakub Jelinek  <jakub@redhat.com>
557
558         PR tree-optimization/51485
559         * tree-vect-data-refs.c (vect_analyze_data_refs): Give up on
560         DRs in call stmts.
561
562 2011-12-11  Patrick Marlier  <patrick.marlier@gmail.com>
563
564         * trans-mem.c (ipa_tm_transform_calls_redirect): Do not remove edge.
565
566 2011-12-10  Richard Henderson  <rth@redhat.com>
567
568         * config/rs6000/altivec.md (altivec_vmrghb): Rewrite pattern as
569         vec_select + vec_concat.
570         (altivec_vmrghh, altivec_vmrghw, altivec_vmrghsf, altivec_vmrglb,
571         altivec_vmrglh, altivec_vmrglw, altivec_vmrglsf): Likewise.
572         (vec_perm_constv16qi): New.
573         (vec_extract_evenv4si, vec_extract_evenv4sf, vpkuhum_nomode,
574         vpkuwum_nomode, vec_extract_oddv8hi, vec_extract_oddv16qi,
575         vec_interleave_high<VI>, vec_interleave_low<VI>): Remove.
576         * config/rs6000/paired.md (paired_merge00): Rewrite pattern as
577         vec_select + vec_concat.
578         (paired_merge10, paired_merge01, paired_merge11): Likewise.
579         (vec_perm_constv2sf): New.
580         (vec_interleave_highv2sf, vec_interleave_lowv2sf,
581         vec_extract_evenv2sf, vec_extract_oddv2sf): Remove.
582         * config/rs6000/spe.md (spe_evmergehi): Rewrite pattern as
583         vec_select + vec_concat.
584         (spe_evmergehilo, spe_evmergelo, spe_evmergelohi): New.
585         (vec_perm_constv2si): New.
586         * config/rs6000/vector.md (vec_interleave_highv4sf,
587         vec_interleave_lowv4sf, vec_interleave_high<VEC_64>,
588         vec_interleave_low<VEC_64>): Remove.
589         * config/rs6000/vsx.md (VS_double): New mode attribute.
590         (UNSPEC_VSX_XXPERMDI): Remove.
591         (vsx_xxpermdi_<VSX_L>_1): Rewrite pattern as vec_select + vec_concat.
592         (vsx_xxmrghw_<VSX_W>, vsx_xxmrglw_<VSX_W>): Likewise.
593         (vsx_xxpermdi_<VSX_L>): Change to expander.
594         (vec_perm_const<VSX_D>): New.
595         (vsx_mergel_<VSX_D>, vsx_mergeh_<VSX_D>): New.
596         * config/rs6000/predicates.md (const_0_to_1_operand): New.
597         (const_2_to_3_operand): New.
598         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): New.
599         (altivec_expand_vec_perm_const): New.
600         (rs6000_expand_vec_perm_const_1, rs6000_expand_vec_perm_const): New.
601         (rs6000_vectorize_vec_perm_const_ok): New.
602         (rs6000_do_expand_vec_perm): New.
603         (rs6000_expand_extract_even, rs6000_expand_interleave): New.
604         * config/rs6000/rs6000-builtin.def (VEC_MERGE*): Update rtx codes.
605         * config/rs6000/rs6000-modes.def: Add double-wide vector modes.
606         * config/rs6000/rs6000-protos.h: Update.
607
608 2011-12-10  Richard Henderson  <rth@redhat.com>
609
610         * expr.c (expand_expr_real_2) [VEC_PERM_EXPR]: Avoid passing a
611         CONST_INT to expand_vec_perm as the selector.
612         * optabs.c (expand_vec_perm): Assert the selector is of a proper mode.
613
614 2011-12-10  Richard Henderson  <rth@redhat.com>
615
616         * genmodes.c (struct mode_data): Remove wider_2x member.
617         (blank_mode): Adjust initializer.
618         (calc_wider_mode): Use XALLOCAVEC.
619         (emit_move_wider): Select double-width same-element vectors for
620         2xwider vectors.
621         * machmode.h (GET_MODE_2XWIDER_MODE): Update documentation.
622         * config/i386/i386.c (doublesize_vector_mode): Remove.
623         (expand_vselect_vconcat): Use GET_MODE_2XWIDER_MODE instead.
624
625 2011-12-10  Joern Rennecke  <joern.rennecke@embecosm.com>
626
627         * config/epiphany/epiphany.h (USE_LOAD_POST_INCREMENT): Define.
628         (USE_LOAD_POST_DECREMENT, USE_STORE_POST_INCREMENT): Likewise.
629         (USE_STORE_POST_DECREMENT): Likewise.
630
631         * config/epiphany/epiphany.h (EPIPHANY_RETURN_REGNO): New macro,
632         broken out of ..
633         (INCOMING_RETURN_ADDR_RTX) .. this.  Use EPIPHANY_RETURN_REGNO.
634         (DWARF_FRAME_RETURN_COLUMN): New macro.
635
636         * config/epiphany/epiphany-protos.h (epiphany_start_function): Declare.
637         * config/epiphany/epiphany.c (epiphany_handle_interrupt_attribute):
638         Split "timer" value into "timer0" and "timer1".
639         Handle page_miss, message and wand.  Don't handle static_flag.
640         Adjust warning text.
641         (epiphany_start_function): New function.
642         (epiphany_compute_function_type): Split "timer" value into "timer0"
643         and "timer1".  Handle page_miss, message and wand.
644         Don't handle static_flag.
645         (epiphany_expand_epilogue): Don't use frame_insn for status / iret
646         restore.
647         * config/epiphany/epiphany.h: ASM_DECLARE_FUNCTION_NAME: Define.
648         (enum epiphany_function_type):
649         Split EPIPHANY_FUNCTION_TIMER value into EPIPHANY_FUNCTION_TIMER0
650         and EPIPHANY_FUNCTION_TIMER1.
651         Remove EPIPHANY_FUNCTION_ILINK1 and EPIPHANY_FUNCTION_ILINK2 values.
652         Add EPIPHANY_FUNCTION_PAGE_MISS and EPIPHANY_FUNCTION_MESSAGE values.
653         Rename EPIPHANY_FUNCTION_STATIC_FLAG to EPIPHANY_FUNCTION_WAND.
654
655 2011-12-10  Nathan Sidwell  <nathan@acm.org>
656
657         PR gcov-profile/51449
658         * coverage.c (coverage_end_function): Always process the coverage
659         variables.
660
661 2011-12-09  Aldy Hernandez  <aldyh@redhat.com>
662
663         PR/51291
664         * tree.c (build_common_builtin_nodes): Do not use TM_PURE
665         attribute unless language has support for TM.
666         * config/i386/i386.c (ix86_init_tm_builtins): Exit gracefully in
667         the absence of TM builtins.
668
669 2011-12-09  Eric Botcazou  <ebotcazou@adacore.com>
670
671         * gimple-fold.c (gimple_fold_stmt_to_constant_1) <GIMPLE_UNARY_RHS>:
672         Also check the TYPE_MODE to recognize useless pointer conversions.
673
674 2011-12-09  Jakub Jelinek  <jakub@redhat.com>
675
676         PR tree-optimization/51117
677         * tree-eh.c (optimize_clobbers): Don't remove just one
678         clobber, but all consecutive clobbers before RESX.
679         Use gimple_clobber_p predicate.
680
681 2011-12-09  Michael Meissner  <meissner@the-meissners.org>
682
683         * config/rs6000/rs6000.c (altivec_expand_builtin): Call
684         expand_call to return a valid funciton instead of return
685         cosnt0_rtx/NULL_RTX if there was an error with the builtin.
686         (altivec_expand_ld_builtin): Ditto.
687         (rs6000_inner_target_options): If VSX is selected as a target
688         attribute or pragma, enable ALTIVEC also.
689         (rs6000_pragma_target_parse): Call rs6000_option_override_internal
690         to do all of the standard processing when switching options,
691         including redefining appropriate macros.
692
693         PR rtl-optimization/51469
694         * varasm.c (default_binds_local_p_1): If the symbol is a gnu
695         indirect function, mark the symbol as non-local.
696
697 2011-12-09  H.J. Lu  <hongjiu.lu@intel.com>
698
699         PR bootstrap/51479
700         * Makefile.in (errors.o): Restored.
701
702 2011-12-09  Richard Guenther  <rguenther@suse.de>
703
704         PR lto/48042
705         * tree.c (free_lang_data_in_decl): Remove freeing conditional
706         on debuginfo level.
707
708 2011-12-09  Joern Rennecke  <joern.rennecke@embecosm.com>
709
710         PR middle-end/40154
711         * emit-rtl.c (set_dst_reg_note): New function.
712         * rtl.h (set_dst_reg_note): Declare.
713         * optabs.c (expand_binop, expand_absneg_bit): Use set_dst_reg_note.
714         (emit_libcall_block, expand_fix): Likewise.
715         * function.c (assign_parm_setup_reg, expand_function_start): Likewise.
716         * expmed.c (expand_mult_const, expand_divmod): Likewise.
717         * reload1.c (gen_reload): Likewise.
718
719         * dse.c (get_stored_val, get_call_args): Use gen_int_mode.
720         * expmed.c (expand_divmod): Likewise.
721         * combine.c (simplify_if_then_else): Likewise.
722
723 2011-12-09  Kai Tietz  <ktietz@redhat.com>
724
725         * ira-color.c (print_hard_regs_subforest): Use
726         HOST_WIDEST_INT_PRINT_DEC instead of %lld.
727         (allocno_hard_regs): Change type of cost member to HOST_WIDEST_INT.
728         (add_allocno_hard_regs): Change type of argument cost
729         to HOST_WIDEST_INT.
730         * ira-conflict.c (build_conflict_bit_table): Replace use
731         of long-long by HOST_WIDEST_INT.
732
733 2011-12-09  Georg-Johann Lay  <avr@gjlay.de>
734
735         PR target/51425
736         * config/avr/avr.md (config/avr/avr.md, *sbix_branch_tmp): Use
737         zero_extract:QIHI instead of zero_extract:HI.
738
739 2011-12-09  Jakub Jelinek  <jakub@redhat.com>
740             Andrew Pinski  <apinski@cavium.com>
741
742         PR tree-optimization/51117
743         * tree-eh.c (optimize_clobbers): New function.
744         (execute_lower_eh_dispatch): Call it.
745
746 2011-12-09  Richard Guenther  <rguenther@suse.de>
747
748         PR tree-optimization/51482
749         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size):
750         Make sure to only create REAL_TYPE and INTEGER_TYPE component vectors.
751
752 2011-12-09  Kai Tietz  <ktietz@redhat.com>
753
754         * implicit-zee.c (num_realized): Change type to long.
755         (num_ze_opportunities): Likewise.
756
757 2011-12-08  Andrew Pinski  <apinski@cavium.com>
758
759         * config/mips/mips-cpus.def (octeon+): New CPU.
760         * config/mips/mips-tables.opt: Regenerate.
761         * config/mips/mips.h (MIPS_CPP_SET_PROCESSOR): Emit '+' as 'P'.
762
763 2011-12-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
764
765         PR middle-end/39976
766         * tree-ssa-dom.c (enum expr_kind): Add EXPR_PHI.
767         (struct hashable_expr): Add struct phi field.
768         (initialize_hash_element): Handle phis; change to use XCNEWVEC.
769         (hashable_expr_equal_p): Handle phis.
770         (iterative_hash_hashable_expr): Likewise.
771         (print_expr_hash_elt): Likewise.
772         (free_expr_hash_elt): Likewise.
773         (dom_opt_enter_block): Create equivalences from redundant phis.
774         (eliminate_redundant_computations): Handle redundant phis.
775         (lookup_avail_expr): Handle phis.
776
777 2011-12-08  Jakub Jelinek  <jakub@redhat.com>
778
779         PR tree-optimization/51466
780         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also copy
781         TREE_SIDE_EFFECTS.
782
783 2011-12-08  Richard Guenther  <rguenther@suse.de>
784
785         * tree-ssa-operands.c (add_stmt_operand): Do not mark stmts
786         volatile when processing operands of an ADDR_EXPR.
787         (get_indirect_ref_operands): Likewise.
788         (get_tmr_operands): Likewise.
789         (get_expr_operands): Likewise.
790
791 2011-12-08  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
792
793         PR target/50395
794         * config/s390/s390.c (s390_mainpool_finish): Emit the jump over
795         the literal pool as jump insn.
796
797 2011-12-08  Richard Guenther  <rguenther@suse.de>
798
799         PR tree-optimization/49772
800         * tree-inline.c (optimize_inline_calls): Remove bail out on errors.
801
802 2011-12-08  Richard Guenther  <rguenther@suse.de>
803
804         PR lto/50747
805         * lto-streamer-out.c (produce_symtab): Remove asserts.
806
807 2011-12-08  Richard Guenther  <rguenther@suse.de>
808
809         PR lto/49945
810         * lto-streamer-out.c (tree_is_indexable): Localize variably
811         modified types and their FIELD_DECLs.
812
813 2011-12-08  Eric Botcazou  <ebotcazou@adacore.com>
814
815         PR tree-optimization/51315
816         * tree.h (get_object_or_type_alignment): Declare.
817         * expr.c (get_object_or_type_alignment): Move to...
818         * builtins.c (get_object_or_type_alignment): ...here.  Add assertion.
819         * tree-sra.c (tree_non_mode_aligned_mem_p): Rename to...
820         (tree_non_aligned_mem_p): ...this.  Add ALIGN parameter.  Look into
821         MEM_REFs and use get_object_or_type_alignment for them.
822         (build_accesses_from_assign): Adjust for above change.
823         (access_precludes_ipa_sra_p): Likewise.
824
825 2011-12-08  Richard Guenther  <rguenther@suse.de>
826
827         PR lto/48437
828         * lto-streamer-out.c (tree_is_indexable): Exclude block-local
829         extern declarations.
830
831 2011-12-07  Andrew Pinski  <apinski@cavium.com>
832
833         PR middle-end/45416
834         * expr.c (do_store_flag): Rewrite code that looks for BIT_AND_EXPR for
835         SSA-expand.
836
837 2011-12-07  Richard Guenther  <rguenther@suse.de>
838
839         PR tree-optimization/50823
840         * ipa-inline.c (edge_badness): Do not account for the number of
841         remaining calls.
842
843 2011-12-07  Martin Jambor  <mjambor@suse.cz>
844
845         PR tree-optimization/50744
846         * ipa-cp.c (good_cloning_opportunity_p): Assert size_cost is positive,
847         compute evaluation in HOST_WIDEST_INT.
848         (safe_add): New function
849         (propagate_effects): Use safe_add to accumulate effects.
850
851 2011-12-06  Joel Sherrill <joel.sherrill@oarcorp.com>
852
853         * config/rs6000/rtems.h: Switch to using global_options_set
854         in SUBSUBTARGET_OVERRIDE_OPTIONS.
855
856 2011-12-06  David S. Miller  <davem@davemloft.net>
857
858         * config/sparc/visintrin.h: Add appropriate __VIS__ cpp protection.
859
860 2011-12-06  Georg-Johann Lay  <avr@gjlay.de>
861
862         * config/avr/avr.c (avr_file_start): Fix missing ,
863
864 2011-12-06  Jakub Jelinek  <jakub@redhat.com>
865
866         PR target/51354
867         * config/i386/i386.c (ix86_emit_leave): Call ix86_add_cfa_restore_note
868         unconditionally.
869
870 2011-12-06  Georg-Johann Lay  <avr@gjlay.de>
871
872         Forward-port from gcc-4_6-branch r181936 2011-12-02.
873         * config/avr/avr-mcus.def (avr_mcu_types): ATtiny4313 and
874         AT86RF401 have a 16-bit SP (their manual is bogus).
875
876 2011-12-06  Georg-Johann Lay  <avr@gjlay.de>
877
878         Forward-port from gcc-4_6-branch r181936 2011-12-02.
879
880         PR target/51002
881         * config/avr/avr.md (movhi_sp_r): Set insn condition to
882         !AVR_HAVE_8BIT_SP.
883         * config/avr/avr.c (output_movhi): Use "clr%B0" instead of "in
884         %B0,__SP_H__" if AVR_HAVE_8BIT_SP.
885         (avr_file_start): Only print "__SP_H__ = 0x3e" if !AVR_HAVE_8BIT_SP.
886
887 2011-12-06  Georg-Johann Lay  <avr@gjlay.de>
888
889         PR target/51409
890         PR target/49868
891         * config/avr/avr.h (ADDR_SPACE_PGM, ADDR_SPACE_PGM1,
892         ADDR_SPACE_PGM2, ADDR_SPACE_PGM3, ADDR_SPACE_PGM4,
893         ADDR_SPACE_PGM5, ADDR_SPACE_PGMX): Write as enum.
894         (avr_addrspace_t): New typedef.
895         (avr_addrspace): New declaration.
896         * config/avr/avr-c.c (avr_toupper): New static function.
897         (avr_register_target_pragmas, avr_cpu_cpp_builtins): Use
898         avr_addrspace to get address space information.
899         * config/avr/avr.c (avr_addrspace): New variable.
900         (avr_out_lpm, avr_pgm_check_var_decl, avr_insert_attributes,
901         avr_asm_named_section, avr_section_type_flags,
902         avr_asm_select_section, avr_addr_space_address_mode,
903         avr_addr_space_convert, avr_emit_movmemhi): Use it.
904         (avr_addr_space_pointer_mode): Forward to avr_addr_space_address_mode.
905         (avr_pgm_segment): Remove.
906
907 2011-12-06  Richard Guenther  <rguenther@suse.de>
908
909         PR middle-end/50601
910         * varasm.c (assemble_alias): Move DECL_EXTERNAL implementation
911         quirk adjustjment ...
912         * passes.c (rest_of_decl_compilation): ... here.
913
914 2011-12-06  Richard Guenther  <rguenther@suse.de>
915
916         PR middle-end/51436
917         * gimple-fold.c (gimplify_and_update_call_from_tree): Guard vdef check
918         for the fact we do not have virtual operands when not optimizing.
919
920 2011-12-06  Richard Guenther  <rguenther@suse.de>
921
922         PR tree-optimization/51245
923         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_constant_for_pieces):
924         New function.
925         (vn_reference_lookup_3): Use it.  Properly valueize all refs we create.
926
927 2011-12-06  Iain Sandoe  <iains@gcc.gnu.org>
928
929         * config/rs6000/rs6000.c (darwin_rs6000_override_options): Initialize
930         rs6000_current_abi.
931
932 2011-12-06  Richard Guenther  <rguenther@suse.de>
933
934         PR tree-optimization/51363
935         * gimple.c (gimple_rhs_has_side_effects): Remove.
936         * gimple.h (gimple_rhs_has_side_effects): Likewise.
937         * tree-ssa-dom.c (optimize_stmt): Simplify conditional.
938
939 2011-12-06  Alan Modra  <amodra@gmail.com>
940
941         PR target/50906
942         * config/rs6000/rs6000.c (rs6000_emit_prologue <TARGET_SPE_ABI>):
943         Do not mark r11 setup as frame-related.  Pass correct offset to
944         rs6000_emit_savres_rtx.  Correct out-of-line rs6000_frame_related
945         arguments.  Correct sp_offset.  Remove "offset" fudge from
946         in-line rs6000_frame_related call.  Rename misleading variable.
947         Fix comments and whitespace.  Tidy some expressions.
948         (rs6000_emit_epilogue <TARGET_SPE_ABI>): Always set frame_reg_rtx
949         to r11 in out-of-line case.  Correct sp_offset.  Pass correct
950         offset to rs6000_emit_savres_rtx.  Rename misleading variable.
951         Fix comments and whitespace.  Tidy some expressions.
952         (rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Add sp_offset
953         adjustment when !saving_GPRs_inline.  Correct register mode
954         used in address calcs.
955         (rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Similarly when
956         !restoring_GPRs_inline.
957
958 2011-12-06  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
959
960         * config/arm/vfp.md (*combine_vcvt_f64_<FCVTI32typename>): Fix
961         formatting character for vmov.f64 case.
962
963 2011-12-05  Jakub Jelinek  <jakub@redhat.com>
964
965         PR tree-optimization/51396
966         * tree-ssa-math-opts.c (convert_mult_to_fma): Don't optimize
967         if MUL_RESULT has zero uses.
968
969         PR debug/51410
970         * c-decl.c (pop_scope): Don't add DECL_EXTERNAL decls
971         for debug info if scope is file_scope.
972
973         PR c/51339
974         * c-decl.c (c_finish_incomplete_decl, finish_decl): Call
975         relayout_decl instead of layout_decl.
976
977 2011-12-05  Richard Sandiford  <rdsandiford@googlemail.com>
978
979         * resource.c (init_resource_info): Only consider EXIT_IGNORE_STACK
980         if there is in epilogue.
981
982 2011-12-05  Richard Sandiford  <rdsandiford@googlemail.com>
983
984         * optabs.c (maybe_emit_sync_lock_test_and_set): Pass a null target
985         to emit_library_call_value.
986         (expand_atomic_compare_and_swap): Likewise.
987
988 2011-12-05  Vladimir Makarov  <vmakarov@redhat.com>
989
990         PR other/50775
991         * ira-int.h (struct ira_object): Remove add_data.
992         (OBJECT_ADD_DATA): Remove.
993
994         * ira-build.c (ira_create_object): Remove OBJECT_ADD_DATA
995         initialization.
996
997         * ira-color.c (object_hard_regs_t, object_hard_regs): Rename to
998         allocno_hard_regs_t, allocno_hard_regs.
999         (object_hard_regs_node_t, object_hard_regs_node): Rename to
1000         allocno_hard_regs_node_t and allocno_hard_regs_node.
1001         (struct allocno_color_data): Add new member last_process.  Move
1002         profitable_hard_regs, hard_regs_node, and hard_regs_subnodes_start
1003         from object_color_data.
1004         (object_color_data_t, object_color_data, OBJECT_COLOR_DATA): Remove.
1005         (curr_allocno_process): New static variable.
1006         (object_hard_regs_eq, object_hard_regs_htab): Rename to
1007         allocno_hard_regs_eq and allocno_hard_regs_htab.
1008         (init_object_hard_regs, finish_object_hard_regs): Rename to
1009         init_allocno_hard_regs and finish_allocno_hard_regs.
1010         (object_hard_regs_compare, object_hard_regs_node_t): Rename to
1011         allocno_hard_regs_compare and allocno_hard_regs_node_t.
1012         (create_new_object_hard_regs_node): Rename to
1013         create_new_allocno_hard_regs_node.
1014         (add_new_object_hard_regs_node_to_forest): Rename to
1015         add_new_allocno_hard_regs_node_to_forest.
1016         (add_object_hard_regs_to_forest, collect_object_hard_regs_cover):
1017         Rename to add_allocno_hard_regs_to_forest and
1018         collect_allocno_hard_regs_cover.
1019         (setup_object_hard_regs_nodes_parent): Rename to
1020         setup_allocno_hard_regs_nodes_parent.
1021         (remove_unused_object_hard_regs_nodes): Rename to
1022         remove_unused_allocno_hard_regs_nodes.
1023         (enumerate_object_hard_regs_nodes, object_hard_regs_nodes_num):
1024         Rename to enumerate_allocno_hard_regs_nodes and
1025         allocno_hard_regs_nodes_num.
1026         (object_hard_regs_nodes, object_hard_regs_subnode_t): Rename to
1027         allocno_hard_regs_nodes and allocno_hard_regs_subnode_t.
1028         (object_hard_regs_subnode, object_hard_regs_subnodes): Rename to
1029         allocno_hard_regs_subnode and allocno_hard_regs_subnodes.
1030         (object_hard_regs_subnode_index): Rename to
1031         allocno_hard_regs_subnode_index.
1032         (setup_object_hard_regs_subnode_index): Rename to
1033         setup_allocno_hard_regs_subnode_index.
1034         (get_object_hard_regs_subnodes_num): Rename to
1035         get_allocno_hard_regs_subnodes_num.
1036         (form_object_hard_regs_nodes_forest): Rename to
1037         form_allocno_hard_regs_nodes_forest.
1038         (finish_object_hard_regs_nodes_tree): Rename to
1039         form_allocno_hard_regs_nodes_forest
1040         (finish_object_hard_regs_nodes_forest): Rename to
1041         finish_allocno_hard_regs_nodes_forest.
1042         (setup_left_conflict_sizes_p): Use allocno data instead of object ones.
1043         Process conflict allocnos once.
1044         (update_left_conflict_sizes_p): Use allocno data instead of object
1045         ones.  Change prototype signature.
1046         (empty_profitable_hard_regs): Use allocno data instead of object ones.
1047         (setup_profitable_hard_regs): Ditto.
1048         (get_conflict_profitable_regs): Rename to
1049         get_conflict_and_start_profitable_regs.  Use allocno data for
1050         profitable regs calculation.
1051         (check_hard_reg_p): Change prototype signature.  Check profitable
1052         regs for allocno not the objects.
1053         (assign_hard_reg): Process conflict allocnos only once for
1054         updating conflict costs.
1055         (setup_allocno_available_regs_num): Use allocno data instead of
1056         object ones.  Modify debug output.
1057         (color_pass): Remove initialization and finalization of object
1058         color data.
1059
1060 2011-12-05  Kazu Hirata  <kazu@codesourcery.com>
1061
1062         PR target/51408
1063         * config/arm/arm.md (*minmax_arithsi): Always require the else
1064         clause in the MINUS case.
1065
1066 2011-12-05  Richard Guenther  <rguenther@suse.de>
1067
1068         PR tree-optimization/50904
1069         * tree-ssa-loop-im.c (struct mem_ref): Remove vops member.
1070         (MEM_ANALYZABLE): New.
1071         (memory_references): Remove clobbered_vops and vop_ref_map
1072         members, add all_refs_stored_in_loop member.
1073         (memref_free): Adjust.
1074         (mem_ref_alloc): Likewise.
1075         (gather_mem_refs_stmt): Do not record clobbers, instead
1076         record refs for unanalyzable stmts.
1077         (gather_mem_refs_in_loops): Do not propagate clobbers.
1078         (struct vop_to_refs_elt, vtoe_hash, vtoe_eq, vtoe_free,
1079         record_vop_access, get_vop_accesses, get_vop_stores,
1080         add_vop_ref_mapping): Remove.
1081         (create_vop_ref_mapping_loop): Adjust to simply record all stores.
1082         (analyze_memory_references): Adjust.
1083         (refs_independent_p): Check for not analyzable refs.
1084         (can_sm_ref_p): Likewise.
1085         (ref_indep_loop_p_1): Simplify.
1086         (tree_ssa_lim_finalize): Adjust.
1087
1088         * tree-ssa-loop-im.c (stmt_cost): Simplify, use LIM_EXPENSIVE
1089         rather than magic constants.  Assign zero cost to PAREN_EXPR
1090         and SSA_NAME copies.  Assign cost proportional to the vector
1091         size for vector constructors.
1092
1093 2011-12-05  Richard Guenther  <rguenther@suse.de>
1094
1095         * tree-ssa-alias.h (struct ao_ref_s): Add volatile_p field.
1096         * tree-ssa-alias.c (ao_ref_init): Initialize it.
1097         (ao_ref_init_from_ptr_and_size): Likewise.
1098         (refs_may_alias_p_1): Two volatile accesses conflict.
1099         (ref_maybe_used_by_call_p_1): Likewise.
1100         (call_may_clobber_ref_p_1): Likewise.
1101         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Initialize
1102         volatile_p field.
1103
1104 2011-12-05  Richard Guenther  <rguenther@suse.de>
1105
1106         * tree-ssa.c (verify_ssa): Verify SSA names in the loop over all SSA
1107         names.  Remove SSA operand checking, call verify_ssa_operands.
1108         * tree-ssa-operands.h (verify_ssa_operands): Declare.
1109         * tree-ssa-operands.c (verify_ssa_operands): New function.
1110
1111 2011-12-05  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
1112
1113         * config/arm/arm.c (vfp3_const_double_for_fract_bits): Define.
1114         * config/arm/arm-protos.h (vfp3_const_double_for_fract_bits): Declare.
1115         * config/arm/constraints.md ("Dt"): New constraint.
1116         * config/arm/predicates.md
1117         (const_double_vcvt_power_of_two_reciprocal): New.
1118         * config/arm/vfp.md (FCVTI32typename): New.
1119         (FCVT): New iterator.
1120         (*combine_vcvt_f32_<FCVTI32typename>): New.
1121         (*combine_vcvt_f64_<FCVTI32typename>): New.
1122
1123 2011-12-05  Richard Guenther  <rguenther@suse.de>
1124
1125         * cgraph.c (cgraph_create_edge_1): Initialize
1126         call_stmt_cannot_inline_p from the stmt if possible.
1127         (cgraph_make_edge_direct): Likewise.
1128         * gimple-streamer-in.c (input_gimple_stmt): Do not
1129         call gimple_call_set_cannot_inline.
1130         * gimple.h (enum gf_mask): Remove GF_CALL_CANNOT_INLINE, shift values.
1131         (gimple_call_set_cannot_inline): Remove.
1132         (gimple_call_cannot_inline_p): Likewise.
1133         * ipa-inline-analysis.c (initialize_inline_failed): Look
1134         at the edge call_stmt_cannot_inline_p flag.
1135         * ipa-inline.c (can_inline_edge_p): Likewise.
1136         (early_inliner): Only update the edge flag.
1137         * ipa-prop.c (update_indirect_edges_after_inlining): Likewise.
1138         (ipa_modify_call_arguments): Do not call gimple_call_set_cannot_inline.
1139         * cgraphunit.c (assemble_thunk): Likewise.
1140         * gimple-fold.c (gimple_fold_call): Likewise.
1141
1142         * tree.h (CALL_CANNOT_INLINE_P): Remove.
1143         * tree-mudflap.c (mf_xform_statements): Do not modify alloca calls.
1144         * builtins.c (expand_builtin_alloca): With -fmudflap do not expand
1145         alloca calls inline.
1146         * cfgexpand.c (expand_call_stmt): Do not set CALL_CANNOT_INLINE_P.
1147         * gimple.c (gimple_build_call_from_tree): Do not read
1148         CALL_CANNOT_INLINE_P.
1149         * gimplify.c (gimplify_call_expr): Do not copy CALL_CANNOT_INLINE_P.
1150
1151 2011-12-05  Jakub Jelinek  <jakub@redhat.com>
1152             Eric Botcazou  <ebotcazou@adacore.com>
1153
1154         PR middle-end/51323
1155         PR middle-end/50074
1156         * calls.c (internal_arg_pointer_exp_state): New variable.
1157         (internal_arg_pointer_based_exp_1,
1158         internal_arg_pointer_exp_scan): New functions.
1159         (internal_arg_pointer_based_exp): New function.
1160         (mem_overlaps_already_clobbered_arg_p): Use it.
1161         (expand_call): Free internal_arg_pointer_exp_state.cache vector
1162         and clear internal_arg_pointer_exp_state.scan_start.
1163
1164 2011-12-04  Kaz Kojima  <kkojima@gcc.gnu.org>
1165
1166         * config/sh/linux.h (TARGET_DEFAULT): Add MASK_SOFT_ATOMIC.
1167         * config/sh/sync.md: New file.
1168         * config/sh/sh.md: Include sync.md.
1169         * config/sh/sh.opt (msoft-atomic): New option.
1170         * doc/invoke.texi (SH Options): Document it.
1171
1172 2011-12-04  Nathan Sidwell  <nathan@acm.org>
1173
1174         * gcov-io.h (struct gcov_info): Replace trailing array with
1175         pointer to array.
1176         * profile.c (branch_prob): Only call renamed
1177         coverage_begin_function once.
1178         * coverage.h (coverage_begin_output): Rename to ...
1179         (coverage_begin_function): ... here.
1180         * coverage.c (struct function_list): Rename to ...
1181         (struct coverage_data): ... this.  Update all uses.
1182         (gcov_info_var, gcov_fn_info_type, gcov_fn_info_ptr_type): New globals.
1183         (bbg_file_opened, bbg_function_announced): Remove.
1184         (get_coverage_counts): Adjust message.
1185         (coverage_begin_ouput): Rename to ...
1186         (coverage_begin_function): ... here.  Move file opening to
1187         coverage_init.  Adjust for being called only once.
1188         (coverage_end_function): Remove bbg file and inhibit further
1189         output here on error.
1190         (build_info_type): Adjust for change to pointer to array.
1191         (build_info): Receive array of function pointers and adjust.
1192         (create_coverage): Break into ...
1193         (coverage_obj_init, coverage_obj_fn, coverage_obj_finish):
1194         ... these, and adjust.
1195         (coverage_init): Open the notes file here.  Tidy.
1196         (coverage_finish): Call coverage_obj_init etc.
1197
1198 2011-12-04  Ira Rosen  <ira.rosen@linaro.org>
1199
1200         PR middle-end/51285
1201         * tree-vect-loop.c (vect_create_epilog_for_reduction): Create exit
1202         phi nodes for outer loop in case of double reduction.
1203
1204 2011-12-04  Jérémie Detrey  <Jeremie.Detrey@loria.fr>
1205
1206         PR target/51393
1207         * config/i386/avxintrin.h (_mm256_insert_epi64): Declare second
1208         parameter as long long.
1209
1210 2011-12-04  Richard Sandiford  <rdsandiford@googlemail.com>
1211
1212         PR middle-end/51351
1213         * optabs.c (init_sync_libfuncs): Use "or" rather than "ior"
1214         in the external names.
1215
1216 2011-12-03  Jack Howarth <howarth@bromo.med.uc.edu>
1217
1218         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Pass -no_pie for
1219         non-PIC code when targeting 10.7 or later.
1220
1221 2011-12-03  Iain Sandoe  <iains@gcc.gnu.org>
1222
1223         * config/darwin.h (STARTFILE_SPEC): Do not use -lbundle1.o when
1224         Darwin >= 10.
1225         (DARWIN_DYLIB1_SPEC): Do not use -ldylib1.10.5.o when Darwin >= 10.
1226         (DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10.
1227
1228 2011-12-03  Jakub Jelinek  <jakub@redhat.com>
1229
1230         * fold-const.c (fold_unary_loc): Fold VEC_UNPACK_LO_EXPR,
1231         VEC_UNPACK_HI_EXPR, VEC_UNPACK_FLOAT_LO_EXPR and
1232         VEC_UNPACK_FLOAT_HI_EXPR with VECTOR_CST argument.
1233         (fold_binary_loc): Fold VEC_PACK_TRUNC_EXPR,
1234         VEC_PACK_FIX_TRUNC_EXPR, VEC_WIDEN_MULT_LO_EXPR
1235         and VEC_WIDEN_MULT_HI_EXPR with VECTOR_CST arguments.
1236
1237         PR debug/50317
1238         * tree-ssa.c (target_for_debug_bind): Also allow is_gimple_reg_type
1239         vars that aren't referenced.
1240         (tree-ssa-live.c (remove_unused_locals): Don't clear TREE_ADDRESSABLE
1241         of unreferenced local vars.
1242         * cfgexpand.c (expand_debug_expr): For DEBUG_IMPLICIT_PTR allow also
1243         TREE_ADDRESSABLE vars that satisfy target_for_debug_bind.
1244
1245 2011-12-03  Anatoly Sokolov  <aesok@post.ru>
1246
1247         * config/arm/arm.h (LIBCALL_VALUE, FUNCTION_VALUE_REGNO_P): Remove.
1248         * config/arm/arm-protos.h (aapcs_libcall_value): Remove.
1249         * config/arm/arm.c (TARGET_FUNCTION_VALUE_REGNO_P): Define.
1250         (arm_libcall_value_1, arm_function_value_regno_p): New function.
1251         (arm_function_value, arm_libcall_value): Use arm_libcall_value_1.
1252         (aapcs_libcall_value): Make static.
1253         (arm_libcall_value): Add static qualifier.
1254
1255 2011-12-02  Jakub Jelinek  <jakub@redhat.com>
1256
1257         PR target/51387
1258         * config/i386/sse.md (mul<mode>3 with VI1_AVX2 iterator): For
1259         V32QImode use { 0,2,..,14,32,34,..,46,16,18,..,30,48,50,..,62 }
1260         permutation instead of extract even permutation.
1261
1262 2011-12-02  Nathan Sidwell  <nathan@acm.org>
1263
1264         * gcov.c (struct arc_info): Add is_throw field.
1265         (struct (block_info): Add exceptional field, reduce flags size to
1266         account for it.
1267         (struct function_info): Add has_catch field.
1268         (struct line_info): Add unexceptional field.
1269         (process_file): Call find_exception_blocks if necessary.
1270         (read_graph_file): Adjust.  Note if an exceptional edge is seen.
1271         (find_exception_blocks): New.
1272         (add_line_counts): Set line's unexceptional flag if not exceptional.
1273         (output_branch_count): Note exceptional arcs, lines and blocks.
1274         * gcov-dump.c (tag_arcs): Decode arc flags.
1275         * doc/gcov.texi: Document '=====' lines.
1276
1277 2011-12-02  Anatoly Sokolov  <aesok@post.ru>
1278
1279         * config/ia64/ia64.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS,
1280         PRINT_OPERAND_PUNCT_VALID_P): Remove macros.
1281         * config/ia64/ia64-protos.h (ia64_print_operand,
1282         ia64_print_operand_address): Remove.
1283         * config/ia64/ia64.c (TARGET_PRINT_OPERAND,
1284         TARGET_PRINT_OPERAND_ADDRESS, TARGET_PRINT_OPERAND_PUNCT_VALID_P):
1285         Define.
1286         (ia64_print_operand_punct_valid_p): New function.
1287         (ia64_print_operand, ia64_print_operand_address): Make static.
1288
1289 2011-12-02  Michael Meissner  <meissner@the-meissners.org>
1290
1291         PR target/51390
1292         * config/rs6000/rs6000.c (def_builtin): Use the correct field to
1293         figure out the function's attributes.
1294         (struct builtin_description): Mark mask field as const since we no
1295         longer need to modify it for SPE and PAIRED builtins.
1296
1297 2011-12-02  Joseph Myers  <joseph@codesourcery.com>
1298
1299         Revert:
1300
1301         2008-09-18  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1302
1303         PR rtl-opt/37451
1304         * loop-doloop.c (doloop_modify): New argument zero_extend_p and
1305         zero extend count after the correction to it is done.
1306         (doloop_optimize): Update call to doloop_modify, don't zero extend
1307         count before call.
1308
1309         2008-11-03  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1310
1311         PR rtl-opt/37782
1312         * loop-doloop.c (doloop_modify): Add from_mode argument that says what
1313         mode count is in.
1314         (doloop_optimize): Update call to doloop_modify.
1315
1316 2011-12-02  Richard Guenther  <rguenther@suse.de>
1317
1318         PR lto/47259
1319         * ipa.c (varpool_externally_visible_p): Register variables
1320         are always externally visible.
1321
1322 2011-12-02  Sameera Deshpande  <sameera.deshpande@arm.com>
1323
1324         * gimple-pretty-print.c (dump_gimple_call): Dereference fn only if
1325           non-NULL.
1326
1327 2011-12-02  Martin Jambor  <mjambor@suse.cz>
1328
1329         PR tree-optimization/50622
1330         * tree-sra.c (load_assign_lhs_subreplacements): Force gimple operand
1331         if both lacc and racc are grp_partial_lhs.
1332
1333 2011-12-01  Kaz Kojima  <kkojima@gcc.gnu.org>
1334
1335         PR target/50814.
1336         * config/sh/sh.c (expand_ashiftrt): Handle TARGET_SH2A same as
1337         TARGET_SH3.
1338         (shl_sext_kind): Likewise.
1339         * config/sh/sh.h (SH_DYNAMIC_SHIFT_COST): Likewise.
1340         * config/sh/sh.md (ashlsi3_sh2a, ashrsi3_sh2a, lshrsi3_sh2a): Remove.
1341         (ashlsi3_std): Handle TARGET_SH2A same as TARGET_SH3.
1342         (ashlsi3): Likewise.
1343         (ashrsi3_d): Likewise.
1344         (lshrsi3_d): Likewise.
1345         (lshrsi3): Likewise.
1346
1347 2011-12-01  Diego Novillo  <dnovillo@google.com>
1348
1349         PR bootstrap/51346
1350         * ipa-inline.c (can_inline_edge_p): If the edge E has a statement,
1351         use the statement's inline indicator instead of E's.
1352         Remove consistency check.
1353
1354 2011-12-01  Diego Novillo  <dnovillo@google.com>
1355
1356         PR bootstrap/51346
1357         Revert
1358
1359         2011-11-29  Diego Novillo  <dnovillo@google.com>
1360
1361         * gimple.c (gimple_call_set_cannot_inline): Move from gimple.h.
1362         Update field call_stmt_cannot_inline_p from call
1363         graph edge, if needed.
1364         * gimple.h (gimple_call_set_cannot_inline): Move to gimple.c.
1365
1366 2011-12-01  Nathan Sidwell  <nathan@acm.org>
1367
1368         PR gcov-profile/51113
1369         * coverage.c (build_var): Keep coverage variables static.
1370
1371 2011-12-01  Jakub Jelinek  <jakub@redhat.com>
1372
1373         PR tree-optimization/51356
1374         * tree-vect-patterns.c (vect_recog_bool_pattern): Give up if
1375         vectype doesn't have VECTOR_MODE_P.
1376
1377         PR debug/50317
1378         * tree-ssa-dce.c (remove_dead_stmt): Add a debug stmt when removing
1379         as unnecessary a store to a variable with gimple reg type.
1380         * tree-ssa-live.c (remove_unused_locals): Clear TREE_ADDRESSABLE bit
1381         on local unreferenced variables.
1382         * cfgexpand.c (expand_gimple_basic_block): Don't emit DEBUG_INSNs
1383         for !target_for_debug_bind variables.
1384
1385 2011-12-01  Patrick Marlier  <patrick.marlier@gmail.com>
1386
1387         PR middle-end/51273
1388         * cgraph.h (cgraph_call_node_duplication_hooks): Declare.
1389         * cgraph.c (cgraph_call_node_duplication_hooks): Make global.
1390         * cgraphunit.c (cgraph_copy_node_for_versioning): Call it.
1391
1392 2011-12-01  Andrew Pinski  <apinski@cavium.com>
1393
1394         PR lto/51198
1395         * tree.c (free_lang_data_in_decl): Clear FIELD_DECL's
1396         DECL_INITIAL also.
1397
1398 2011-12-01  Jakub Jelinek  <jakub@redhat.com>
1399
1400         PR tree-optimization/51246
1401         * tree-predcom.c (replace_ref_with): Handle also clobber on the rhs.
1402
1403         PR rtl-optimization/51014
1404         * loop-unroll.c (apply_opt_in_copies): Ignore label DEBUG_INSNs
1405         both from bb and orig_bb.
1406
1407 2011-12-01  Joern Rennecke  <joern.rennecke@embecosm.com>
1408
1409         PR tree-optimization/50802
1410         * tree-vrp.c (simplify_conversion_using_ranges): Rewrite test
1411         considering what happens to ranges during sign changes and/or
1412         intermediate narrowing conversions.
1413
1414 2011-11-30  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1415
1416         PR middle-end/50283
1417         * config/pa/pa.md (in_branch_delay): Disallow frame related insns.
1418         (in_nullified_branch_delay): Likewise.
1419         (in_call_delay): Likewise.
1420
1421 2011-11-30  Richard Henderson  <rth@redhat.com>
1422
1423         * predict.c (expr_expected_value_1): Assume compare-and-swap builtin
1424         boolean return is true.
1425
1426 2011-11-30  Jakub Jelinek  <jakub@redhat.com>
1427
1428         PR rtl-optimization/51044
1429         * dse.c (emit_inc_dec_insn_before): Ensure new_insn is an instruction
1430         rather than just insn body.
1431
1432         PR target/50725
1433         * function.c (thread_prologue_and_epilogue_insns): If
1434         stack_realign_drap, add drap_reg to SET_UP_BY_PROLOGUE
1435         regset.
1436
1437         PR middle-end/51089
1438         * tree-eh.c (cleanup_empty_eh_merge_phis): Add check to
1439         avoid creating duplicate edges here.
1440         (cleanup_empty_eh_unsplit): And remove it in the caller.
1441
1442 2011-11-30  Andrew Pinski  <apinski@cavium.com>
1443
1444         PR c/51321
1445         * c-parser.c (c_parser_postfix_expression): Check groktypename results
1446         before looking at the main variant.
1447
1448 2011-11-30  Jakub Jelinek  <jakub@redhat.com>
1449
1450         PR rtl-optimization/48721
1451         * sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set
1452         reg_pending_barrier to TRUE_BARRIER.
1453
1454         PR rtl-optimization/48721
1455         * sched-ebb.c (begin_move_insn): Insert empty unreachable
1456         block after BARRIER if insn is followed by it.
1457
1458 2011-11-30  Richard Henderson  <rth@redhat.com>
1459
1460         * config/sparc/sparc-opts.h (enum sparc_memory_model_type): New.
1461         * config/sparc/sparc.opt (mmemory-model=): New option.
1462         * doc/invoke.texi (Sparc Options): Document it.
1463         * config/sparc/sparc.c (sparc_option_override): Provide default
1464         for sparc_memory_model.
1465         (sparc_emit_membar_for_model): Omit barrier combinations that are
1466         implied by the memory model.
1467
1468 2011-11-30  Richard Henderson  <rth@redhat.com>
1469
1470         * config/sparc/sync.md (I124MODE): New mode iterator.
1471         (memory_barrier): Remove.
1472         (atomic_exchangesi): New.
1473         (swapsi): Rename from *swapsi.
1474         (atomic_test_and_set<I124MODE>): New.
1475         (ldstubqi): Rename from *ldstubqi, merge with expander.
1476         (ldstub<I24MODE>): Rename from *ldstub<I24MODE>, merge with expander.
1477         (sync_lock_test_and_setsi): Remove.
1478         (sync_lock_test_and_set<I12MODE>): Remove.
1479
1480 2011-11-30  Richard Henderson  <rth@redhat.com>
1481
1482         * config/sparc/constraints.md ("w"): New.
1483         * config/sparc/predicates.md (mem_noofs_operand): New.
1484         * config/sparc/sparc.c (sparc_expand_compare_and_swap_12): Make static.
1485         Generate the boolean result of the atomic_compare_exchange.
1486         (sparc_expand_compare_and_swap): New.
1487         * config/sparc/sync.md (atomic_compare_and_swap<I>): New.
1488         (atomic_compare_and_swap<I48MODE>_1): Rename from
1489         *sync_compare_and_swap<I48MODE>, use mem_noofs_operand.
1490         (*atomic_compare_and_swapdi_v8plus): Rename from
1491         *sync_compare_and_swapdi_v8plus, use mem_noofs_operand.
1492         (sync_compare_and_swap<I12MODE>): Remove.
1493         (sync_compare_and_swap<I48MODE>): Remove.
1494
1495 2011-11-30  Richard Henderson  <rth@redhat.com>
1496
1497         * config/sparc/predicates.md (register_or_v9_zero_operand): New.
1498         * config/sparc/sparc.md (UNSPEC_ATOMIC): New.
1499         * config/sparc/sync.md (atomic_load<I>): New.
1500         (atomic_loaddi_1, atomic_store<I>, atomic_storedi_1): New.
1501
1502 2011-11-30  Richard Henderson  <rth@redhat.com>
1503
1504         * config/sparc/predicates.md (zero_or_v7_operand): New.
1505         * config/sparc/sparc.c (sparc_emit_membar_for_model): New.
1506         * config/sparc/sparc-protos.h: Update.
1507         * config/sparc/sync.md (mem_thread_fence): New.
1508         (memory_barrier): Use sparc_emit_membar_for_model.
1509         (membar, *membar_empty, *membar_storestore, *membar_storeload): New.
1510         (*membar_v8): Accept and ignore the membar mask.
1511         (*membar): Accept and print the membar mask.
1512
1513 2011-11-30  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
1514
1515         * config/arm/arm.c (arm_issue_rate): Cortex-A15 can triple issue.
1516         * config/arm/arm.md (mul64): New attribute.
1517         (generic_sched): Cortex-A15 is not scheduled generically.
1518         (cortex-a15.md): Include.
1519         * config/arm/cortex-a15.md: New machine description.
1520         * config/arm/t-arm (MD_INCLUDES): Add cortex-a15.md.
1521
1522 2011-11-30  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
1523
1524         * config/arm/t-arm (MD_INCLUDES): Ensure all md files are listed.
1525
1526 2011-11-30  Iain Sandoe  <iains@gcc.gnu.org>
1527
1528         * doc/tm.texi.in (NEXT_OBJC_RUNTIME): Update macro description.
1529         * doc/tm.texi: Regenerate.
1530         * flags.h (flag_next_runtime): Remove references.
1531         * toplev.c: Likewise.
1532         * defaults.h (NEXT_OBJC_RUNTIME): Provide default.
1533         * gccspec.c (lang_specific_driver): Adjust use of NEXT_OBJC_RUNTIME.
1534         * config/darwin.c (darwin_override_options): Provide default
1535         Objective-C abi settings and target conflict checks.
1536         * config/darwin.h (SUBTARGET_C_COMMON_OVERRIDE_OPTIONS): Remove unused
1537         code. Adjust indenting.
1538
1539 2011-11-29  Joseph Myers  <joseph@codesourcery.com>
1540
1541         * config/sh/sh.h (enum reg_class, REG_CLASS_NAMES)
1542         (REG_CLASS_CONTENTS): Add NON_SP_REGS.
1543         (REGCLASS_HAS_GENERAL_REG): Handle NON_SP_REGS.
1544         * config/sh/constraints.md (u): New constraint.
1545
1546 2011-11-29  Oleg Endo  <oleg.endo@t-online.de>
1547
1548         PR target/51337
1549         * config/sh/sh.c (sh_secondary_reload): Add case when FPUL
1550         register is being loaded from a pseudo in memory.
1551
1552 2011-11-29  DJ Delorie  <dj@redhat.com>
1553
1554         * config.gcc (rl78-*-elf): New case.
1555         * doc/extend.texi: Add RL78 documentation.
1556         * doc/invoke.texi: Likewise.
1557         * doc/md.texi: Likewise.
1558         * doc/contrib.texi: Add RL78.
1559         * doc/install.texi: Add rl78-*-elf.
1560         * config/rl78: New directory for the Renesas RL78.
1561
1562 2011-11-29  Jakub Jelinek  <jakub@redhat.com>
1563
1564         PR tree-optimization/51247
1565         * tree-vrp.c (extract_range_from_assert): For signed 1-bit precision
1566         types instead of adding 1 subtract -1 and instead of subtracting 1
1567         add -1 to avoid overflows.
1568
1569 2011-11-29  Andrew MacLeod  <amacleod@redhat.com>
1570
1571         PR target/50123
1572         * optabs.c (maybe_optimize_fetch_op): New.  Look for more optimal
1573         instructions for a FECTH_OP or OP_FECTH sequence.
1574         (expand_atomic_fetch_op): Call maybe_optimize_fetch_op.
1575
1576 2011-11-29  Uros Bizjak  <ubizjak@gmail.com>
1577
1578         * config/i386/sync.md (UNSPEC_LDA, UNSPEC_STA): New unspecs.
1579         (movdi_via_fpu): Remove.
1580         (loaddi_via_fpu): New insn pattern.
1581         (storedi_via_fpu): Ditto.
1582         (atomic_loaddi_fpu): Use loaddi_via_fpu and storedi_via_fpu.
1583         (atomic_storedi_fpu): Ditto.
1584         * reg-stack.c (get_true_reg): Handle UNSPEC_LDA.
1585         (subst_stack_regs_pat): Handle UNSPEC_STA.
1586
1587 2011-11-29  Uros Bizjak  <ubizjak@gmail.com>
1588
1589         * config/i386/i386.md (*floathi<mode>2_i387_with_temp): Do not
1590         allocate scratch memory for alternative 0.
1591
1592 2011-11-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
1593
1594         * config/rs6000/rs6000-builtins.def: Completely rewrite builtin
1595         handling to centralize more of the builtins in this file.  Change
1596         some builtin enumerations to be more consistant.  Use a new mask
1597         to hold the current builtins, including SPE and PAIRED builtins
1598         which no longer are set via target_flags masks.  Add
1599         -mdebug=builtin debug support.  For power machines, define all
1600         Altivec and VSX buitins when the compiler starts, but don't allow
1601         the use of a builtin unless the appropriate switch is used, or
1602         #pragma GCC target is used to change the options.  If the user
1603         uses #pragma GCC target, update the appropriate hardware macros.
1604         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Ditto.
1605         * config/rs6000/rs6000.opt (rs6000_builtin_mask): Ditto.
1606         * config/rs6000/rs6000-c.c (rs6000_macro_to_expand): Ditto.
1607         (rs6000_define_or_undefine_macro): Ditto.
1608         (rs6000_target_modify_macros): Ditto.
1609         (rs6000_cpu_cpp_builtins): Ditto.
1610         (altivec_overloaded_builtins): Ditto.
1611         (altivec_build_resolved_builtin): Ditto.
1612         * config/rs6000/rs6000.c (rs6000_target_modify_macros_ptr): Ditto.
1613         (rs6000_builtin_info): Ditto.
1614         (def_builtin): Ditto.
1615         (enable_mask_for_builtins): Ditto.
1616         (DEBUG_FMT_X): Ditto.
1617         (rs6000_debug_reg_global): Ditto.
1618         (rs6000_builtin_mask_calculate): Ditto.
1619         (rs6000_option_override_internal): Ditto.
1620         (rs6000_builtin_conversion): Ditto.
1621         (rs6000_builtin_vectorized_function): Ditto.
1622         (bdesc_3arg): Ditto.
1623         (bdesc_dst): Ditto.
1624         (bdesc_2arg): Ditto.
1625         (builtin_description_predicates): Ditto.
1626         (bdesc_altivec_preds): Ditto.
1627         (bdesc_spe_predicates): Ditto.
1628         (bdesc_spe_evsel): Ditto.
1629         (bdesc_paired_preds): Ditto.
1630         (bdesc_abs): Ditto.
1631         (bdesc_1arg): Ditto.
1632         (rs6000_overloaded_builtin_p): Ditto.
1633         (rs6000_expand_unop_builtin): Ditto.
1634         (bdesc_2arg_spe): Ditto.
1635         (spe_expand_builtin): Ditto.
1636         (rs6000_invalid_builtin): Ditto.
1637         (rs6000_expand_builtin): Ditto.
1638         (rs6000_init_builtins): Ditto.
1639         (spe_init_builtins): Ditto.
1640         (paired_init_builtins): Ditto.
1641         (altivec_init_builtins): Ditto.
1642         (builtin_function_type): Ditto.
1643         (rs6000_common_init_builtins): Ditto.
1644         (rs6000_builtin_reciprocal): Ditto.
1645         (rs6000_builtin_mask_names): Ditto.
1646         (rs6000_pragma_target_parse): Ditto.
1647         (rs6000_function_specific_print): Ditto.
1648         * config/rs6000/rs6000.h (MASK_DEBUG_BUILTIN): Ditto.
1649         (MASK_DEBUG_ALL): Ditto.
1650         (TARGET_DEBUG_BUILTIN): Ditto.
1651         (TARGET_EXTRA_BUILTINS): Ditto.
1652         (REGISTER_TARGET_PRAGMAS): Ditto.
1653         (enum rs6000_btc): Ditto.
1654         (RS6000_BTC_*): Ditto.
1655         (RS6000_BTM_*): Ditto.
1656         (enum rs6000_builtins): Ditto.
1657         * config/rs6000/rs6000-protos.h (rs6000_overloaded_builtin_p): Ditto.
1658         (rs6000_target_modify_macros): Ditto.
1659         (rs6000_target_modify_macros_ptr): Ditto.
1660
1661         * config/rs6000/vector.md (unsfloat<VEC_int><mode>2): Use the
1662         standard name for converting vector unsigned values to floating
1663         point.  Delete the TARGET_VECTORIZE_BUILTIN_CONVERSION hook, which
1664         is handled by machine independent code.
1665         * config/rs6000/rs6000.c (TARGET_VECTORIZE_BUILTIN_CONVERSION): Ditto.
1666         (rs6000_builtin_conversion): Ditto.
1667
1668 2011-11-29  Dodji Seketeli  <dodji@redhat.com>
1669
1670         * tree-diagnostic (struct loc_t): Rename into struct loc_map_pair.
1671         (maybe_unwind_expanded_macro_loc): Adjust.
1672
1673 2011-11-29  David Edelsohn  <dje.gcc@gmail.com>
1674             Aldy Hernandez  <aldyh@redhat.com>
1675
1676         * trans-mem.c (ipa_tm_create_version_alias): Mangle new_decl
1677         if DECL_ONE_ONLY.
1678         (ipa_tm_create_version): Same.
1679
1680 2011-11-29  Bernd Schmidt  <bernds@codesourcery.com>
1681
1682         * haifa-sched.c (recompute_todo_spec): Simplify and correct the
1683         code checking for a clobber of a condition register when deciding
1684         whether to predicate.
1685
1686 2011-11-29  Diego Novillo  <dnovillo@google.com>
1687
1688         * gimple.c (gimple_call_set_cannot_inline): Move from gimple.h.
1689         Update field call_stmt_cannot_inline_p from call graph edge, if needed.
1690         * gimple.h (gimple_call_set_cannot_inline): Move to gimple.c.
1691
1692 2011-11-29  Sameera Deshpande  <sameera.deshpande@arm.com>
1693
1694         * config/arm/arm.md (arm_movdi): Update NEG_POOL_RANGE.
1695         (movdf_soft_insn): Likewise.
1696         * config/arm/fpa.md (thumb2_movdf_fpa): Likewise.
1697         * config/arm/neon.md (neon_mov<mode>): Likewise.
1698         * config/arm/vfp.md (movdi_vfp): Likewise.
1699         (movdi_vfp_cortexa8): Likewise.
1700         (movdf_vfp): Likewise.
1701
1702 2011-11-29  Jakub Jelinek  <jakub@redhat.com>
1703
1704         PR middle-end/50074
1705         * expr.c (expand_expr_addr_expr_1): Don't call force_operand for
1706         EXPAND_SUM modifier.
1707
1708 2011-11-29  Ira Rosen  <ira.rosen@linaro.org>
1709
1710         PR tree-optimization/51301
1711         * tree-vect-patterns.c (vect_recog_over_widening_pattern): Check that
1712         the last statement doesn't convert to a bigger type than the original
1713         type of the computation.
1714
1715 2011-11-28  Richard Henderson  <rth@redhat.com>
1716
1717         * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap):
1718         Handle overlap between retval and oldval.  Always compute boolval
1719         from CR0 EQ value.
1720
1721 2011-11-28  Jakub Jelinek  <jakub@redhat.com>
1722
1723         PR debug/50317
1724         * tree-ssa.c (execute_update_addresses_taken): Remove
1725         var ={v} {CLOBBER} stmts instead of rewriting them into
1726         var_N ={v} {CLOBBER}.
1727
1728         PR middle-end/50907
1729         * function.c (convert_jumps_to_returns): When redirecting an edge
1730         succ to EXIT_BLOCK_PTR, clear EDGE_CROSSING flag.
1731
1732         PR tree-optimization/50078
1733         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Copy over
1734         TREE_THIS_VOLATILE also from the old to new lhs resp. rhs.
1735
1736         PR tree-optimization/50682
1737         * tree-eh.c (maybe_remove_unreachable_handlers): New function.
1738         * tree-flow.h (maybe_remove_unreachable_handlers): New prototype.
1739         * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Call it.
1740
1741 2011-11-28  Georg-Johann Lay  <avr@gjlay.de>
1742
1743         * doc/extend.texi (AVR Built-in Functions): Add documentation for
1744         __builtin_avr_map8 and __builtin_avr_map16.
1745
1746         * config/avr/avr.md: Document new %t and %T asm output codes.
1747         (define_c_enum "unspec"): Add UNSPEC_MAP_BITS.
1748         (adjust_len): Add map_bits.
1749         (map_bitsqi, map_bitshi): New insns.
1750         * config/avr/avr-protos.h (avr_out_map_bits): New.
1751         * config/avr/avr-protos.c (print_operand): Implement %t and %T.
1752         (adjust_insn_length): Handle ADJUST_LEN_MAP_BITS.
1753         (avr_double_int_push_digit): New function.
1754         (avr_map, avr_revert_map, avr_swap_map, avr_id_map): New functions.
1755         (avr_sig_map, avr_map_hamming_byte): New functions.
1756         (avr_out_swap_bits, avr_out_revert_bits, avr_move_bits,
1757         avr_out_map_bits): New functions.
1758         (enum avr_builtin_id): Add AVR_BUILTIN_MAP8, AVR_BUILTIN_MAP16.
1759         (avr_init_builtins): Populate __builtin_avr_map8, __builtin_avr_map16.
1760         (bdesc_2arg): Add __builtin_avr_map8, __builtin_avr_map16 ...
1761         (avr_expand_builtin): ...and expand them.
1762         * config/avr/avr-c.c (avr_cpu_cpp_builtins): New built-in defines:
1763         __BUILTIN_AVR_MAP8, __BUILTIN_AVR_MAP16.
1764
1765 2011-11-27  Richard Sandiford  <rdsandiford@googlemail.com>
1766
1767         PR target/51278
1768         * config/mips/mips.c (mips_rtx_costs): Handle baddu.
1769
1770 2011-11-27  Richard Sandiford  <rdsandiford@googlemail.com>
1771
1772         * config/mips/mips.c (mips16_unextended_reference_p): Test for BLKmode.
1773
1774 2011-11-27  Richard Sandiford  <rdsandiford@googlemail.com>
1775
1776         * config/mips/mips-protos.h (mips_emit_binary): Declare.
1777         * config/mips/mips.c (mips_emit_binary): Make global.
1778         (mips_set_mips16_mode): Turn off -mfix-r4000 in MIPS16 mode.
1779         (mips_conditional_register_usage): Don't treat LO and HI as
1780         register operands in MIPS16 mode.
1781         (mips_mulsidi3_gen_fn): Use {u,}mulsidi3_{32,64}bit_mips16
1782         for MIPS16 code.
1783         * config/mips/predicates.md (muldiv_target_operand): New predicate.
1784         (move_operand): Allow hilo_operand.
1785         * config/mips/mips.md (mul<mode>3): Explicitly specify LO as the
1786         target of MIPS16 multiplies, then move it into the target register.
1787         (mul<mode>3_internal, *macc2, *msac2): Use muldiv_target_operand.
1788         (<u>mulsidi3_32bit_mips16): New expander.
1789         (<u>mulsidi3_32bit): Use muldiv_target_operand.
1790         (<u>mulsidi3_32bit_r4000): Disable for ISA_HAS_DSP.
1791         (<u>mulsidi3_64bit): Require !TARGET_MIPS16.  Split into
1792         <u>mulsidi3_64bit_split.
1793         (<u>mulsidi3_64bit_mips16): New expander.
1794         (<u>mulsidi3_64bit_split): Likewise, using expansions from
1795         two previous define_splits.
1796         (<u>mulsidi3_64bit_hilo, *muls<u>_di, <u>msubsidi4): Use
1797         muldiv_target_operand.
1798         (<su>mulsi3_highpart): Use <su>mulsi3_highpart_split for MIPS16 code.
1799         (<su>mulsi3_highpart_internal): Require !TARGET_MIPS16.
1800         Split into <su>mulsi3_highpart_split.
1801         (<su>mulsi3_highpart_split): New expander.
1802         (<su>muldi3_highpart): Turn into a define_expand.
1803         Use <su>muldi3_highpart_split for MIPS16 code.
1804         (<su>muldi3_highpart_internal): Renamed from <su>muldi3_highpart.
1805         Require !TARGET_MIPS16.  Split into <su>muldi3_highpart_split.
1806         (<su>muldi3_highpart_split): New expander.
1807         (<u>mulditi3): Explicitly specify LO as the target of MIPS16
1808         multiplies, then move it into the target register.
1809         (<u>mulditi3_internal, <u>maddsidi4): Use muldiv_target_operand.
1810         (divmod<mode>4, udivmod<mode>4): Turn into define_expands.
1811         Use <u>divmod<mode>4_split for MIPS16 code, then explicitly
1812         move LO into operand 0.
1813         (divmod<mode>4_internal, udivmod<mode>4_internal): Renamed
1814         from <u>divmod<mode>4.  Use muldiv_target_operand.
1815         Require !TARGET_MIPS16.  Split into <u>divmod<mode>4_split.
1816         (<u>divmod<mode>4_split): New expander.
1817         (<u>divmod<GPR:mode>4_hilo_<HILO:mode>): Use muldiv_target_operand.
1818         (mfhi<GPR:mode>_<HILO:mode>): Use hilo_operand.
1819
1820 2011-11-27  Richard Sandiford  <rdsandiford@googlemail.com>
1821
1822         * hard-reg-set.h (target_hard_regs): Add x_accessible_reg_set
1823         and x_operand_reg_set.
1824         (accessible_reg_set, operand_reg_set): New macros.
1825         * reginfo.c (init_reg_sets): Initialize accessible_reg_set and
1826         operand_reg_set.
1827         (saved_accessible_reg_set, saved_operand_reg_set): New variables.
1828         (save_register_info): Save them.
1829         (restore_register_info): Restore them.
1830         (init_reg_sets_1): Limit operand_reg_set to accessible_reg_set.
1831         Remove NO_REGS registers from operand_reg_set.  Treat members
1832         of operand_reg_set as fixed.
1833         * recog.c (general_operand): Check operand_reg_set rather than NO_REGS.
1834         (register_operand, nonmemory_operand): Likewise.
1835         * varasm.c (make_decl_rtl): Always use DECL_MODE as the mode of
1836         register variables.  Check accessible_reg_set and operand_reg_set.
1837         * config/mips/mips.c (mips_conditional_register_usage): Remove
1838         inaccessible register from accessible_reg_set, rather than just
1839         making them fixed.
1840
1841 2011-11-27  Gerald Pfeifer  <gerald@pfeifer.com>
1842
1843         * config/pa/pa-linux.h (TARGET_GAS): Remove comment.
1844
1845 2011-11-26  Richard Henderson  <rth@redhat.com>
1846
1847         * config/arm/arm.c (arm_init_libfuncs): Call init_sync_libfuncs
1848         for Linux.
1849
1850 2011-11-26  Richard Henderson  <rth@redhat.com>
1851
1852         * optabs.c (expand_atomic_fetch_op): Always return result.
1853
1854         * optabs.c (init_sync_libfuncs_1): Include max in iteration.
1855
1856         * omp-low.c (expand_omp_atomic): Assume anything aligned to
1857         BIGGEST_ALIGNMENT is aligned.
1858
1859 2011-11-26  Richard Henderson  <rth@redhat.com>
1860
1861         * config/m68k/m68k.md (UNSPECV_CAS_1, UNSPECV_CAS_2): New.
1862         (UNSPECV_TAS_1, UNSPECV_TAS_2): New.
1863         (I): New mode iterator.
1864         (xz): New mode attribute.
1865         * config/m68k/sync.md: New file.
1866
1867         * config/m68k/linux.h (TARGET_INIT_LIBFUNCS): New.
1868         * config/m68k/m68k.c (m68k_init_sync_libfuncs): New.
1869
1870 2011-11-26  Nathan Sidwell  <nathan@acm.org>
1871
1872         PR gcov-profile/51297
1873         * gcov.c (main): Allocate initial names and sources arrays.
1874         (find_source): Don't check for null name or source arrays here.
1875
1876 2011-11-26  Jakub Jelinek  <jakub@redhat.com>
1877
1878         PR rtl-optimization/49912
1879         * cfgrtl.c (rtl_verify_flow_info_1): Ignore also EDGE_PRESERVE bit
1880         when counting n_branch.
1881
1882 2011-11-26  Uros Bizjak  <ubizjak@gmail.com>
1883
1884         * config/i386/sync.md (movdi_via_fpu): Add %Z insn suffixes.
1885
1886 2011-11-26  Joern Rennecke  <joern.rennecke@embecosm.com>
1887
1888         PR middle-end/50074
1889         * calls.c (mem_overlaps_already_clobbered_arg_p):
1890         Return false if no outgoing arguments have been stored so far.
1891
1892 2011-11-25  Georg-Johann Lay  <avr@gjlay.de>
1893
1894         * config/avr/avr.c (print_operand): Support code = 'i' for CONST_INT.
1895
1896 2011-11-24  Andrew MacLeod  <amacleod@redhat.com>
1897
1898         PR other/51011
1899         * tree.h (is_builtin_name): No longer external.
1900         * builtins.c (is_builtin_name): Make static.
1901         * varasm.c (incorporeal_function_p): __sync and __atomic external calls
1902         are not incorporeal and may need asm label processing.
1903
1904 2011-11-25  Georg-Johann Lay  <avr@gjlay.de>
1905
1906         PR target/50566
1907         * config/avr/avr-protos.h (avr_log_t): Add field .builtin.
1908         * config/avr/avr-log.c (avr_log_set_avr_log): Initialize it.
1909         Don't bypass TARGET_ALL_DEBUG.  Print self-info with ?.
1910         (avr_log_vadump): Support %D and %X to print double_int.
1911         (avr_double_int_pop_digit): New static function.
1912         (avr_dump_double_int_hex): New static function.
1913
1914 2011-11-24  Enkovich Ilya  <ilya.enkovich@intel.com>
1915
1916         PR target/51287
1917         * config/i386/i386.c (distance_non_agu_define_in_bb): Fix insn
1918         attr check.
1919
1920 2011-11-24  Andrew MacLeod  <amacleod@redhat.com>
1921
1922         * optab.c (maybe_emit_atomic_exchange): New.  Try to emit an
1923         atomic_exchange pattern.
1924         (maybe_emit_sync_lock_test_and_set): New.  Try to emit an exchange
1925         using __sync_lock_test_and_set.
1926         (maybe_emit_compare_and_swap_exchange_loop): New. Try to emit an
1927         exchange using a compare_and_swap loop.
1928         (expand_sync_lock_test_and_set): New.  Expand sync_lock_test_and_set.
1929         (expand_atomic_test_and_set): New.  Expand test_and_set operation.
1930         (expand_atomic_exchange): Use new maybe_emit_* functions.
1931         (expand_atomic_store): Use new maybe_emit_* functions.
1932         * builtins.c (expand_builtin_sync_lock_test_and_set): Call
1933         expand_sync_lock_test_and_set routine.
1934         (expand_builtin_atomic_exchange): Remove parameter from call.
1935         (expand_builtin_atomic_clear): Use atomic_clear pattern if present.
1936         (expand_builtin_atomic_test_and_set): Add target and simply call
1937         expand_atomic_test_and_set.
1938         (expand_builtin): Add target to expand_builtin_atomic_test_and_set.
1939         * expr.h (expand_atomic_exchange): Add parameter.
1940         (expand_sync_lock_test_and_set): New prototype.
1941         (expand_atomic_test_and_set, expand_atomic_clear): New prototypes.
1942
1943 2011-11-24  H.J. Lu  <hongjiu.lu@intel.com>
1944
1945         PR target/51134
1946         * config/i386/i386.h (processor_costs): Revert revision 181357.
1947         * config/i386/i386.c (cost models): Likewise.
1948         (core_cost): Likewise.
1949         (promote_duplicated_reg): Likewise.
1950         (promote_duplicated_reg_to_size): Likewise.
1951         (processor_target): Likewise.
1952         (expand_set_or_movmem_via_loop_with_iter): Likewise.
1953         (expand_set_or_movmem_via_loop): Likewise.
1954         (emit_strset): Likewise.
1955         (expand_movmem_epilogue): Likewise.
1956         (expand_setmem_epilogue): Likewise.
1957         (expand_movmem_prologue): Likewise.
1958         (expand_setmem_prologue): Likewise.
1959         (expand_constant_movmem_prologue): Likewise.
1960         (expand_constant_setmem_prologue): Likewise.
1961         (decide_alg): Likewise.
1962         (decide_alignment): Likewise.
1963         (ix86_expand_movmem): Likewise.
1964         (ix86_expand_setmem): Likewise.
1965         (ix86_slow_unaligned_access): Likewise.
1966         * config/i386/i386.md (strset): Likewise.
1967         * config/i386/sse.md (vec_dupv4si): Likewise.
1968         (vec_dupv2di): Likewise.
1969
1970 2011-11-24  Georg-Johann Lay  <avr@gjlay.de>
1971
1972         * config/avr/avr.md (*rotlhi2.15): Set length to 4.
1973
1974 2011-11-24  Razya Ladelsky  <razya@il.ibm.com>
1975
1976         * tree-data-ref.c (initialize_data_dependence_relation): Update
1977         comment for the self dependence case.
1978         (compute_self_dependence): Remove.
1979         * tree-vect-data-refs.c (vect_analyze_data_refs): Remove call to
1980         compute_self_dependenc.
1981
1982 2011-11-24  Alan Modra  <amodra@gmail.com>
1983
1984         * c-decl.c (warn_if_shadowing): Don't warn if shadowed
1985         identifier is from system header.
1986
1987 2011-11-23  Jakub Jelinek  <jakub@redhat.com>
1988
1989         PR target/51261
1990         * config/i386/i386.c (decide_alg): Initialize *dynamic_check
1991         even if !optimize.
1992
1993 2011-11-23  Vladimir Makarov  <vmakarov@redhat.com>
1994
1995         PR rtl-optimization/48455
1996         * doc/invoke.texi (-fira-region): Document default values.
1997
1998         * flags-types.h (enum ira_region): Add new value
1999         IRA_REGION_AUTODETECT.
2000
2001         * common.opt (fira-region): Set up initial value to
2002         IRA_REGION_AUTODETECT.
2003
2004         * toplev.c (process_options): Set up flag_ira_region depending on
2005         -O options.
2006
2007         * ira.c (ira.c): Remove optimize guard for ira_build.
2008
2009 2011-11-23  Chung-Lin Tang  <cltang@codesourcery.com>
2010
2011         PR rtl-optimization/50496
2012         * jump.c (redirect_jump): Assert fail on nlabel == NULL_RTX
2013         only after epilogue is created. Add comments.
2014
2015 2011-11-22  Richard Henderson  <rth@redhat.com>
2016
2017         * config/ia64/ia64.c (ia64_expand_atomic_op): Add model parameter.
2018         Generate the barrier required for the memory model.
2019         (rtx_needs_barrier): Handle UNSPEC_FETCHADD_REL, UNSPEC_CMPXCHG_REL.
2020         * config/ia64/ia64-protos.h: Update.
2021         * config/ia64/ia64.md (UNSPEC_FETCHADD_REL): New.
2022         (UNSPEC_CMPXCHG_REL): New.
2023         * config/ia64/sync.md (mem_thread_fence): New.
2024         (atomic_load<IMODE>, atomic_store<IMODE>): New.
2025         (atomic_compare_and_swap<IMODE>): New.
2026         (cmpxchg_acq_<I124MODE>, cmpxchg_acq_di): New.
2027         (atomic_exchange<IMODE>): New.
2028         (xchg_acq_<IMODE>): Rename from sync_lock_test_and_set<IMODE>.
2029         (atomic_<FETCHOP><IMODE>, atomic_nand<IMODE>): New.
2030         (atomic_fetch_<FETCHOP><IMODE>, atomic_fetch_nand<IMODE>): New.
2031         (atomic_<FETCHOP>_fetch<IMODE>, atomic_nand_fetch<IMODE>): New.
2032         (fetchadd_rel_<I48MODE>): New.
2033         (sync_<FETCHOP><IMODE>, sync_nand<IMODE>): Remove.
2034         (sync_old_<FETCHOP><IMODE>, sync_old_nand<IMODE>): Remove.
2035         (sync_new_<FETCHOP><IMODE>, sync_new_nand<IMODE>): Remove.
2036         (sync_compare_and_swap<IMODE>): Remove.
2037         (sync_lock_release<IMODE>): Remove.
2038
2039         * config/ia64/ia64.md: Use define_c_enum for UNSPEC_*
2040         and UNSPECV_* constants.
2041
2042 2011-11-22  Tom de Vries  <tom@codesourcery.com>
2043
2044         PR rtl-optimization/50764
2045         * sched-deps.c (sched_analyze_insn): Make sure frame-related insns are
2046         not moved past preceding jump.
2047
2048 2011-11-22  Jeff Law  <law@redhat.com>
2049
2050         * doc/contrib.texi: Add entry for David Binderman.
2051
2052 2011-11-22  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2053
2054         * postreload.c (reload_combine): Mark reg_state as invalid at
2055         volatile insns if there has been a use already.
2056
2057 2011-11-21  Aldy Hernandez  <aldyh@redhat.com>
2058
2059         * opts.c (finish_options): Do not fail for -fgnu-tm.
2060         * gimple-streamer-out.c (output_gimple_stmt): Handle
2061         GIMPLE_TRANSACTION.
2062         * gimple-streamer-in.c (input_gimple_stmt): Same.
2063         * lto-cgraph.c (input_overwrite_node): Read tm_clone bit.
2064         (lto_output_node): Write tm_clone bit.
2065
2066 2011-11-22  Ian Lance Taylor  <iant@google.com>
2067
2068         * doc/install.texi (Configuration): Correct doc of
2069         --enable-build-poststage1-with-cxx: it is not experimental.
2070
2071 2011-11-22  Jakub Jelinek  <jakub@redhat.com>
2072
2073         PR tree-optimization/51074
2074         * fold-const.c (fold_binary_loc): Fix up VEC_INTERLEAVE_*_EXPR
2075         handling for BYTES_BIG_ENDIAN.
2076         * optabs.c (can_vec_perm_for_code_p): Likewise.
2077
2078 2011-11-22  Michael Matz  <matz@suse.de>
2079
2080         PR other/51125
2081         * trans-mem.c (expand_block_tm): Ignore clobbers.
2082
2083 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
2084
2085         *  config/darwin.h (ENDFILE_SPEC): New.
2086         (DARWIN_CRT1_SPEC): Add crttms.o.
2087         (STARTFILE_SPEC): Likewise for dynamic libs and bundles.
2088         * config/i386.h (ENDFILE_SPEC): Amend to include crttme.o.
2089
2090 2011-11-22  Michael Matz  <matz@suse.de>
2091
2092         PR c++/51264
2093         * tree.c (iterative_hash_expr): Remove break after return.
2094
2095 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
2096
2097         * target.def (tm_clone_table_section): New hook.
2098         * doc/tm.texi.in (TARGET_ASM_TM_CLONE_TABLE_SECTION): Define.
2099         * doc/tm.texi: Regenerate.
2100         * varasm.c (dump_tm_clone_pairs): Use target tm_clone_table_section.
2101         * output.h (default_clone_table_section): New prototype.
2102         * config/darwin.h (TARGET_ASM_TM_CLONE_TABLE_SECTION): New.
2103         * config/darwin-protos.h (darwin_tm_clone_table_section): New prototype.
2104         * config/darwin.c (darwin_tm_clone_table_section): New.
2105
2106 2011-11-21  Torvald Riegel  <triegel@redhat.com>
2107
2108         * trans-mem.c (diagnose_tm_1): Print an expression instead of a
2109         declaration in error messages for indirect calls.
2110
2111 2011-11-21  David S. Miller  <davem@davemloft.net>
2112
2113         * config/sparc/sparc.c (sparc_regmode_natural_size): New function
2114         implementing REGMODE_NATURAL_SIZE taking into consideration vector
2115         modes.
2116         (sparc_modes_tieable_p): Similarly for MODES_TIEABLE_P.
2117         * config/sparc/sparc-protos.h (sparc_regmode_natural_size,
2118         sparc_modes_tieable_p): Declare.
2119         * gcc/config/sparc/sparc.h (REGMODE_NATURAL_SIZE,
2120         MODES_TIEABLE_P): Use new helper functions.
2121
2122         Revert
2123         2011-11-16  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2124
2125         PR middle-end/50325
2126         * expmed.c (store_bit_field_1): Use extract_bit_field on big
2127         endian targets if the source cannot be exactly covered by word
2128         mode chunks.
2129
2130 2011-11-21  Jakub Jelinek  <jakub@redhat.com>
2131
2132         PR debug/50827
2133         * var-tracking.c (loc_cmp): For ENTRY_VALUEs use ENTRY_VALUE_EXP
2134         macro instead of XEXP.
2135
2136 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
2137
2138         * configure: Regenerate.
2139
2140 2011-11-21  Georg-Johann Lay  <avr@gjlay.de>
2141
2142         * config/avr/avr.c (output_reload_in_const): Loading a byte with 0
2143         must not affect cc0.
2144         * config/avr/avr.md (*movhi, *movpsi, *movsi, *movsf): Zero to any
2145         register does not change cc0. Same for any constant to ld-register.
2146
2147 2011-11-21  Uros Bizjak  <ubizjak@gmail.com>
2148
2149         * config/i386/mmx.md (unspec) <UNSPEC_MOVNTQ, UNSPEC_PFRCP,
2150         UNSPEC_PFRCPIT1, UNSPEC_PFRCPIT2, UNSPEC_PFRSQRT, UNSPEC_PFRSQIT1>:
2151         Move from config/i386/i386.md
2152         (unspecv) <UNSPECV_EMMS, UNSPECV_FEMMS>: Ditto.
2153         * config/i386/sse.md (unspec) <UNSPEC_MOVNT,UNSPEC_MOVU, UNSPEC_LDDQU,
2154         UNSPEC_PSHUFB, UNSPEC_PSIGN, UNSPEC_PALIGNR, UNSPEC_EXTRQI,
2155         UNSPEC_EXTRQ, UNSPEC_INSERTQI, UNSPEC_INSERTQ, UNSPEC_BLENDV,
2156         UNSPEC_INSERTPS, UNSPEC_DP, UNSPEC_MOVNTDQA, UNSPEC_MPSADBW,
2157         UNSPEC_PHMINPOSUW, UNSPEC_PTEST, UNSPEC_PCMPESTR, UNSPEC_PCMPISTR,
2158         UNSPEC_FMADDSUB, UNSPEC_XOP_UNSIGNED_CMP, UNSPEC_XOP_TRUEFALSE,
2159         UNSPEC_XOP_PERMUTE, UNSPEC_FRCZ, UNSPEC_AESENC, UNSPEC_AESENCLAST,
2160         UNSPEC_AESDEC, UNSPEC_AESDECLAST, UNSPEC_AESIMC,
2161         UNSPEC_AESKEYGENASSIST, UNSPEC_PCLMUL, UNSPEC_PCMP, UNSPEC_VPERMIL,
2162         UNSPEC_VPERMIL2, UNSPEC_VPERMIL2F128, UNSPEC_CAST, UNSPEC_VTESTP,
2163         UNSPEC_VCVTPH2PS, UNSPEC_VCVTPS2PH, UNSPEC_VPERMSI, UNSPEC_VPERMDF,
2164         UNSPEC_VPERMSF, UNSPEC_VPERMTI, UNSPEC_GATHER, UNSPEC_VSIBADDR>: Ditto.
2165         (unspecv) <UNSPECV_LDMXCSR, UNSPECV_STMXCSR, UNSPECV_CLFLUSH,
2166         UNSPECV_MONITOR, UNSPECV_MWAIT, UNSPECV_VZEROALL, UNSPECV_VZEROUPPER>:
2167         Ditto.
2168         * config/i386/sync.md (unspec) <UNSPEC_LFENCE, UNSPEC_SFENCE,
2169         UNSPEC_MFENCE, UNSPEC_MOVA>: Ditto.
2170         (unspecv) <UNSPECV_CMPXCHG_1, UNSPECV_CMPXCHG_2, UNSPECV_CMPXCHG_3,
2171         UNSPECV_CMPXCHG_4, UNSPECV_XCHG, UNSPECV_LOCK>: Ditto.
2172         (sse2_lfence): Move from config/i386/sse.md.
2173         (*sse2_lfence): Ditto.
2174         (sse_sfence): Ditto.
2175         (*sse_sfence): Ditto.
2176         (sse2_mfence): Ditto.
2177         (mfence_sse2): Ditto.  Rename from *sse2_mfence.  Enable also
2178         for TARGET_64BIT.
2179         (mem_thread_fence): Use mfence_sse2.
2180
2181 2011-11-21  Georg-Johann Lay  <avr@gjlay.de>
2182
2183         * config/avr/avr.h (struct base_arch_s): Add field sfr_offset.
2184         * config/avr/avr-devices.c: Ditto. And initialize it.
2185         * config/avr/avr-c.c (avr_cpu_cpp_builtins): New built-in define
2186         __AVR_SFR_OFFSET__.
2187         * config/avr/avr-protos.h (out_movqi_r_mr, out_movqi_mr_r): Remove.
2188         (out_movhi_r_mr, out_movhi_mr_r): Remove.
2189         (out_movsi_r_mr, out_movsi_mr_r): Remove.
2190         * config/avr/avr.md (*cbi, *sbi): Use %i instead of %m-0x20.
2191         (*insv.io, *insv.not.io): Ditto.
2192         * config/avr/avr.c (out_movsi_r_mr, out_movsi_mr_r): Make static.
2193         (print_operand): Implement "%i" to print address as I/O address.
2194         (output_movqi): Clean up call of out_movqi_mr_r.
2195         (output_movhi): Clean up call of out_movhi_mr_r.
2196         (avr_file_start): Use avr_current_arch->sfr_offset instead of
2197         magic -0x20. Use TMP_REGNO, ZERO_REGNO instead of 0, 1.
2198         (avr_out_sbxx_branch): Use %i instead of %m-0x20.
2199         (out_movqi_r_mr, out_movqi_mr_r): Ditto. And make static.
2200         (out_movhi_r_mr, out_movhi_mr_r): Ditto. And use avr_asm_len.
2201         (out_shift_with_cnt): Clean up code: Use avr_asm_len.
2202         (output_movsisf): Use output_reload_insisf for all CONSTANT_P sources.
2203         (avr_out_movpsi): USE avr_out_reload_inpsi for all CONSTANT_P sources.
2204         Clean up call of avr_out_store_psi.
2205         (output_reload_in_const): Don't cut symbols longer than 2 bytes.
2206         (output_reload_insisf): Filter CONST_INT_P or CONST_DOUBLE_P to
2207         try if setting pre-cleared register is advantageous.
2208         (avr_out_plus_1): Use gen_int_mode instead of GEN_INT.
2209
2210 2011-11-20  Joey Ye  <joey.ye@arm.com>
2211
2212         * expr.c (expand_expr_real_1): Correctly handle strict volatile
2213         bitfield loads smaller than mode size.
2214
2215 2011-11-20  Richard Henderson  <rth@redhat.com>
2216
2217         * config/mips/mips.c (mips_init_libfuncs): Call init_sync_libfuncs.
2218
2219 2011-11-20  Uros Bizjak  <ubizjak@gmail.com>
2220
2221         PR target/51235
2222         * config/i386/i386.c (ix86_expand_vcond): Generate TARGET_XOP
2223         patterns for supported mode only.
2224
2225         PR target/51236
2226         * config/i386/i386.c (ix86_expand_builtin)
2227         <IX86_BUILTIN_GATHERALTSIV4DI>: Use CODE_FOR_avx2_gathersiv4di.
2228
2229 2011-11-20  Uros Bizjak  <ubizjak@gmail.com>
2230
2231         * config/i386/i386.md (UNSPEC_MOVNTI): Remove.
2232         (UNSPEC_MOVNTQ): New unspec.
2233         * config/i386/mmx.md (sse_movntq): Rename from sse_movntdi.
2234         Use UNSPEC_MOVNTQ instead of UNSPEC_MOVNT.
2235         * config/i386/sse.md (sse2_movnti<mode>): Use UNSPEC_MOVNT instead of
2236         UNSPEC_MOVNTI.
2237         (STORENT_MODE): Add DI and V4DI modes.
2238
2239 2011-11-20  Nathan Sidwell  <nathan@acm.org>
2240
2241         PR gcov-profile/51113
2242         * coverage.c (build_var): Propagate visibility for public
2243         decls.  Use make_decl_one_only for PIC correctness.
2244
2245         testsuite/
2246         * gcc.misc-tests/gcov-13.c: Check gcovpart-13b coverage
2247         * gcc.misc-tests/gcov-16.c: New.
2248         * gcc.misc-tests/gcov-17.c: New.
2249         * g++.dg/gcov/gcov-8.C: New.
2250         * g++.dg/gcov/gcov-9.C: New.
2251         * g++.dg/gcov/gcov-10.C: New.
2252
2253 2011-11-19  Eric Botcazou  <ebotcazou@adacore.com>
2254
2255         PR rtl-optimization/51187
2256         * reorg.c (relax_delay_slots): Do not consider a jump useless if there
2257         is a barrier between the jump and its target label.
2258
2259 2011-11-19  Patrick Marlier  <patrick.marlier@gmail.com>
2260
2261         PR middle-end/51211
2262         * tracer.c (ignore_bb_p): Don't copy GIMPLE_TRANSACTION.
2263
2264 2011-11-19  Eric Botcazou  <ebotcazou@adacore.com>
2265
2266         * expmed.c (store_bit_field_1): Revert bogus formatting change.
2267
2268 2011-11-19  Richard Earnshaw  <rearnsha@arm.com>
2269
2270         PR target/50493
2271         * config/arm/arm.c (neon_disambiguate_copy): Correctly handle partial
2272         overlap of src and dest operands.
2273
2274 2011-11-19  Iain Sandoe  <iains@gcc.gnu.org>
2275
2276         * config/darwin.h (ASM_DEBUG_SPEC): New.
2277         * config/darwin9.h (ASM_DEBUG_SPEC): New.
2278
2279 2011-11-18  Jan Hubicka  <jh@suse.cz>
2280
2281         * config/i386/i386.c (atom_cost): Disable SSE loop until alignment
2282         issues are fixed.
2283
2284 2011-11-18  Anatoly Sokolov  <aesok@post.ru>
2285
2286         * config/cris/cris.c (cris_function_value_regno_p): Make static.
2287         (TARGET_FUNCTION_VALUE_REGNO_P): Define.
2288         * config/cris/cris.h (FUNCTION_VALUE_REGNO_P): Remove.
2289         * config/cris/cris-protos.h (cris_function_value_regno_p): Remove.
2290
2291 2011-11-18  H.J. Lu  <hongjiu.lu@intel.com>
2292
2293         PR target/33944
2294         * doc/extend.texi: Document __builtin_ia32_movnti64.
2295
2296         * config/i386/emmintrin.h (_mm_stream_si64): New.
2297
2298         * config/i386/i386-builtin-types.def: Add VOID_FTYPE_PLONGLONG_LONGLONG.
2299
2300         * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_MOVNTI64.
2301         (bdesc_special_args): Update __builtin_ia32_movnti.  Add
2302         __builtin_ia32_movnti64.
2303         (ix86_expand_special_args_builtin): Handle
2304         VOID_FTYPE_PLONGLONG_LONGLONG.
2305
2306         * config/i386/i386.md (UNSPEC_MOVNTI): New.
2307
2308         * config/i386/sse.md (sse2_movntsi): Renamed to ...
2309         (sse2_movnti<mode>): This.
2310
2311 2011-11-18  Georg-Johann Lay  <avr@gjlay.de>
2312
2313         PR target/49868
2314         * config/avr/avr.h (base_arch_s): Add field n_segments.
2315         (ADDR_SPACE_PGM1, ADDR_SPACE_PGM2, ADDR_SPACE_PGM3,
2316         ADDR_SPACE_PGM4, ADDR_SPACE_PGM5, ADDR_SPACE_PGMX): New address spaces.
2317         (AVR_HAVE_ELPM, AVR_HAVE_ELPMX): New defines.
2318         (INIT_EXPANDERS): New define.
2319         * config/avr/avr-protos.h (avr_mem_pgmx_p): New.
2320         (avr_init_expanders): New.
2321         (avr_emit_movmemhi, avr_out_movmem): New.
2322         (avr_xload_libgcc_p): New.
2323         * config/avr/avr-c.c (avr_register_target_pragmas): Register
2324         address spaces __pgm1, __pgm2,  __pgm3,  __pgm4  __pgm5,  __pgmx.
2325         (avr_cpu_cpp_builtins): Add built-in defines __PGM1,
2326         __PGM2, __PGM3, __PGM4, __PGM5, __PGMX.
2327         * config/avr/avr-devices.c (avr_arch_types): Set field n_segments.
2328
2329         * config/avr/avr.c (AVR_SECTION_PROGMEM): Change define to cover
2330         3 bits instead of just 1.
2331         (xstring_empty, xstring_e, rampz_rtx): New static GTYed variables.
2332         (progmem_section): Change from section to array of sections.
2333         (progmem_section_prefix): New static variable.
2334         (avr_file_start): Print set for __RAMPZ__
2335         (avr_option_override): Move initialization of RTXes from here...
2336         (avr_init_expanders): ...to this new function.
2337         (avr_pgm_segment): New static function.
2338         (avr_decl_pgm_p): Handle error_mark_node.
2339         (avr_mem_pgmx_p, avr_decl_pgmx_p): New static functions.
2340         (avr_out_xload, avr_find_unused_d_reg): New static functions.
2341         (expand_prologue, expand_epilogue): Use rampz_rtx.
2342         (print_operand): Hande CONST_STRING.
2343         (avr_xload_libgcc_p): New static function.
2344         (avr_out_lpm_no_lpmx, avr_out_lpm): Handle ELPM.
2345         (avr_progmem_p): Return 2 for 24-bit flash address space.
2346         (avr_out_sbxx_branch): Clean-up code from ASn macros.
2347         (out_movqi_r_mr, out_movqi_mr_r): Ditto. And recognize RAMPZ's
2348         address and print symbolically.
2349         (avr_asm_named_section, avr_section_type_flags,
2350         avr_encode_section_info, avr_asm_select_section,
2351         avr_addr_space_address_mode, avr_addr_space_pointer_mode,
2352         avr_addr_space_legitimate_address_p, avr_addr_space_convert,
2353         avr_addr_space_legitimize_address): Handle new address spaces.
2354         (avr_output_progmem_section_asm_op): New static function.
2355         (avr_asm_init_sections): Initialize progmem_section[].
2356         (adjust_insn_length): Handle ADJUST_LEN_XLOAD, ADJUST_LEN_MOVMEM.
2357         (avr_const_address_lo16): New static function.
2358         (avr_assemble_integer): Use it to handle 3-byte integers.
2359         (avr_emit_movmemhi, avr_out_movmem): New functions.
2360
2361         * config/avr/predicates.md (nox_general_operand): Handle new
2362         address spaces.
2363         * config/avr/avr.md (unspec): Add UNSPEC_MOVMEM.
2364         (adjust_len): Add xload, movmem.
2365         (SP_ADDR): New define_constants.
2366         (isa): Add "lpm", "lpmx", "elpm", "elpmx".
2367         (enabled): Handle them.
2368         (load<mode>_libgcc): New expander.
2369         (*load.<mode>.libgcc): Rename to load_<mode>_libgcc.
2370         (xload8_A, xload<mode>_A): New insn-and-splits.
2371         (xload_8, xload_<mode>_libgcc, xload_<mode>, loadmem_elpm): New insns.
2372         (mov<mode>): Handle new address spaces.
2373         (movmemhi): Rewrite using avr_emit_movmemhi.
2374         (MOVMEM_r_d): New mode attribute.
2375         (movmem_<mode>, movmem_qi_elpm): New insns.
2376         (setmemhi, *clrmemqi, *clrmemhi, strlenhi, *strlenhi): Unquote
2377         C-code.  Use label instead of hard-coded instrunction lengths.
2378
2379 2011-11-18  Martin Jambor  <mjambor@suse.cz>
2380
2381         PR tree-optimization/50605
2382         * gimple.c (is_gimple_ip_invariant_address): Also handle MEM_REFs
2383         of IPA invariant decls.
2384
2385 2011-11-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2386
2387         * tree-outof-ssa.c (insert_back_edge_copies):  Add call to
2388         mark_dfs_back_edges.
2389
2390 2011-11-18  Iain Sandoe  <iains@gcc.gnu.org>
2391
2392         PR target/49992
2393         * configure.ac: Remove ranlib special-casing for Darwin.
2394         * configure: Regenerate.
2395
2396 2011-11-18  Uros Bizjak  <ubizjak@gmail.com>
2397
2398         PR tree-optimization/51118
2399         * fold-const.c (fold_checksum_tree): Check for TS_TYPED structure
2400         before using TREE_TYPE accessor on expr.
2401
2402 2011-11-17  Jan Hubicka  <jh@suse.cz>
2403
2404         PR bootstrap/51134
2405         * i386.c (atom_cost): Fix 32bit memset description.
2406         (expand_set_or_movmem_via_loop_with_iter): Output proper bounds check
2407         for epilogue loops.
2408         (expand_movmem_epilogue): Handle epilogues up to size 15 w/o producing
2409         byte loop.
2410         (decide_alg): sse_loop is not useable wthen SSE2 is disabled;
2411         when not optimizing always use rep movsb or lincall; do not produce
2412         word sized loops when optimizing memset for size (to avoid need
2413         for large constants).
2414         (ix86_expand_movmem): Get into sync with ix86_expand_setmem;
2415         choose unroll factors better; always do 128bit moves when producing
2416         SSE loops; do not produce loopy epilogue when size is too small.
2417         (promote_duplicated_reg_to_size): Do not look into desired alignments
2418         when doing vector expansion.
2419         (ix86_expand_setmem): Track better when promoted value is available;
2420         choose unroll factors more sanely. Output loopy epilogue only
2421         when needed.
2422
2423 2011-11-17  Steve Ellcey  <sje@cup.hp.com>
2424
2425         PR middle-end/51144
2426         * output.h (fprint_w): Remove.
2427         * final.c (fprint_w): Remove.
2428         (output_addr_const): Change fprint_w back to fprintf.
2429
2430 2011-11-17  Andrew Pinski  <apinski@cavium.com>
2431
2432         * config/host-linux.c (TRY_EMPTY_VM_SPACE): Define for MIPS.
2433
2434 2011-11-17  Andrew MacLeod  <amacleod@redhat.com>
2435
2436         * builtins.c (expand_builtin): Remove 4th parameter representing
2437         weak/strong mode when __atomic_compare_exchange becomes a library call.
2438
2439 2011-11-17  Richard Henderson  <rth@redhat.com>
2440
2441         * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap): Get
2442         new pseudo for target after convert_modes.
2443         (rs6000_expand_atomic_exchange, rs6000_expand_atomic_op): Likewise.
2444
2445 2011-11-17  Richard Henderson  <rth@redhat.com>
2446
2447         * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap): Get
2448         new pseudo for target after convert_modes.
2449         (rs6000_expand_atomic_exchange, rs6000_expand_atomic_op): Likewise.
2450
2451 2011-11-17  Richard Henderson  <rth@redhat.com>
2452
2453         * builtins.c (expand_builtin_mem_thread_fence): Remove.
2454         (expand_builtin_mem_signal_fence): Remove.
2455         (expand_builtin_atomic_thread_fence): Use expand_mem_thread_fence.
2456         (expand_builtin_sync_synchronize): Likewise.
2457         (expand_builtin_atomic_signal_fence): Use expand_mem_signal_fence.
2458         * optabs.c (expand_asm_memory_barrier): Split out from
2459         expand_builtin_mem_signal_fence.
2460         (expand_mem_thread_fence): New, a combination of code from
2461         expand_builtin_mem_thread_fence and expand_builtin_sync_synchronize.
2462         (expand_mem_signal_fence): Moved and renamed from
2463         expand_builtin_mem_signal_fence.
2464         (expand_atomic_exchange): Use expand_mem_thread_fence.
2465         (expand_atomic_load, expand_atomic_store): Likewise.
2466         * expr.h, optabs.h: Update decls.
2467
2468 2011-11-17  Bin Cheng  <bin.cheng@arm.com>
2469
2470         PR rtl-optimization/50663
2471         * cprop.c (implicit_set_indexes): New global variable.
2472         (insert_set_in_table): Add additional parameter and record implicit
2473         set information.
2474         (hash_scan_set): Add additional parameter and pass it to above.
2475         (hash_scan_insn): Pass false to hash_scan_set.
2476         (compute_hash_table_work): Pass true to hash_scan_set.
2477         (compute_cprop_data): Add implicit set to AVIN of block which the
2478         implicit set is recorded for.
2479         (one_cprop_pass): Handle implicit_set_indexes array.
2480
2481 2011-11-17  Michael Matz  <matz@suse.de>
2482
2483         PR middle-end/50644
2484         PR middle-end/50741
2485         * tree-ssa-live.c (mark_all_vars_used_1): Recurse only for decls of
2486         current function.
2487         (remove_unused_locals): Ditto.
2488
2489 2011-11-16  Richard Henderson  <rth@redhat.com>
2490
2491         * config/alpha/alpha.c (alpha_split_compare_and_swap_12): Copy
2492         ALIAS_SET_MEMORY_BARRIER when creating a new memory.
2493         (alpha_split_atomic_exchange_12): Likewise.
2494         * config/rs6000/rs6000.c (rs6000_adjust_atomic_subword): Likewise.
2495
2496 2011-11-16  Joseph Myers  <joseph@codesourcery.com>
2497
2498         * config/i386/i386elf.h (PREFERRED_DEBUGGING_TYPE): Remove.
2499
2500 2011-11-16  David Edelsohn  <dje.gcc@gmail.com>
2501
2502         * config/rs6000/rs6000.c (rs6000_xcoff_section_type_flags):
2503         Default to minimum alignment if decl is NULL.
2504
2505 2011-11-16  Uros Bizjak  <ubizjak@gmail.com>
2506
2507         * config/i386/sse.md (round<mode>2_vec_pack_sfix): Optimize V2DFmode
2508         sequence for AVX.
2509         (<sse4_1>_round<ssemodesuffix>_vec_pack_sfix<avxsizesuffix>): Ditto.
2510
2511 2011-11-16  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>
2512
2513         * doc/invoke.texi: Document AMD bdver1 and btver1.
2514
2515 2011-11-16  Richard Earnshaw  <rearnsha@arm.com>
2516             Bernd Schmidt <bernds@coudesourcery.com>
2517             Sebastian Huber <sebastian.huber@embedded-brains.de>
2518
2519         PR target/49641
2520         * config/arm/arm.c (store_multiple_sequence): Avoid cases where
2521         the base reg is stored iff compiling for Thumb1.
2522
2523 2011-11-16  Razya Ladelsky  <razya@il.ibm.com>
2524
2525         PR tree-optimization/49960
2526         * tree-data-ref.c (initialize_data_dependence_relation): Add
2527         initializations.
2528         Remove call to compute_self_dependence.
2529         (compute_affine_dependence): Remove the !DDR_SELF_REFERENCE condition.
2530         (compute_self_dependence): Remove old code. Add call to
2531         compute_affine_dependence.
2532         (compute_all_dependences): Remove call to compute_self_dependence.
2533         Add call to compute_affine_dependence.
2534
2535 2011-11-16  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2536
2537         PR middle-end/50325
2538         * expmed.c (store_bit_field_1): Use extract_bit_field on big
2539         endian targets if the source cannot be exactly covered by word
2540         mode chunks.
2541
2542 2011-11-15  Joseph Myers  <joseph@codesourcery.com>
2543
2544         * config/i386/i386elf.h (ASM_OUTPUT_ASCII): Change STRING_LIMIT to
2545         ELF_STRING_LIMIT.
2546
2547 2011-11-15  Richard Henderson  <rth@redhat.com>
2548
2549         * config/alpha/alpha.c (alpha_pre_atomic_barrier): New.
2550         (alpha_post_atomic_barrier): New.
2551         (alpha_split_atomic_op): New memmodel argument; honor it.
2552         (alpha_split_compare_and_swap): Take array of operands.  Honor
2553         memmodel; always set bool output
2554         (alpha_expand_compare_and_swap_12): Similarly.
2555         (alpha_split_compare_and_swap_12): Similarly.
2556         (alpha_split_atomic_exchange): Similarly.  Rename from
2557         alpha_split_lock_test_and_set.
2558         (alpha_expand_atomic_exchange_12): Similarly.  Rename from
2559         alpha_expand_lock_test_and_set_12.
2560         (alpha_split_atomic_exchange_12): Similarly.  Rename from
2561         alpha_split_lock_test_and_set_12.
2562         * config/alpha/alpha-protos.h: Update.
2563         * config/alpha/alpha.md (UNSPECV_CMPXCHG): New.
2564         * config/alpha/constraints.md ("w"): New.
2565         * config/alpha/predicates.md (mem_noofs_operand): New.
2566         * config/alpha/sync.md (atomic_compare_and_swap<mode>): Rename from
2567         sync_compare_and_swap<mode>; add the new parameters.
2568         (atomic_exchange<mode>): Update from sync_test_and_set<mode>.
2569         (atomic_fetch_<op><mode>): Update from sync_old_<op><mode>.
2570         (atomic_<op>_fetch<mode>): Update from sync_new_<op><mode>.
2571         (atomic_<op><mode>): Update from sync_<op><mode>.
2572
2573 2011-11-16  Tom de Vries  <tom@codesourcery.com>
2574
2575         * tree-ssa-tail-merge.c (replace_block_by): Add frequency of bb2 to bb1.
2576
2577 2011-11-16  Alan Modra  <amodra@gmail.com>
2578
2579         PR rtl-optimization/51051
2580         PR bootstrap/51086
2581         * function.c (thread_prologue_and_epilogue_insns): Guard
2582         emitting return with single_succ_p test.
2583
2584 2011-11-15  Joern Rennecke  <joern.rennecke@embecosm.com>
2585
2586         * config/epiphany/epiphany.md (mov<mode>cc): Fix code to
2587         get mode from CMP_OP1 if CMP_OP0 is VOIDmode.
2588
2589 2011-11-15  Uros Bizjak  <ubizjak@gmail.com>
2590
2591         * config/i386/sse.md (vec_pack_trunc_v2df): Optimize sequence for AVX.
2592         (vec_pack_sfix_trunc_v2df): Ditto.
2593         (vec_pack_sfix_v2df): Ditto.
2594         (vec_pack_sfix_trunc_v4df): Generate fix_truncv4dfv4si2 and
2595         avx_vec_concatv8si patterns.
2596         (vec_pack_sfix_v4df): Generate avx_cvtpd2dq256 and
2597         avx_vec_concatv8si patterns.
2598
2599 2011-11-15  Torvald Riegel  <triegel@redhat.com>
2600
2601         * c-parser.c (c_parser_transaction_expression): Require parentheses
2602         when parsing transaction expressions.
2603
2604 2011-11-15  Tristan Gingold  <gingold@adacore.com>
2605
2606         * incpath.c (get_added_cpp_dirs): New function.
2607         * incpath.h (get_added_cpp_dirs): Declare.
2608         * config/vms/vms-c.c (vms_c_register_includes): New function.
2609         (vms_std_modules): New variable.
2610         * config/vms/vms.h (TARGET_EXTRA_INCLUDES): Define.
2611         (vms_c_register_includes): Declare.
2612
2613 2011-11-15  Tristan Gingold  <gingold@adacore.com>
2614
2615         * c-family/c-pragma.h (pragma_extern_prefix): Declare.
2616         * c-family/c-pragma.c (pragma_extern_prefix): Make it public.
2617         * config/vms/vms-c.c (saved_extern_prefix): New variable.
2618         (vms_pragma_extern_prefix): New function.
2619         (vms_c_register_pragma): Register vms_pragma_extern_prefix.
2620
2621 2011-11-15  Georg-Johann Lay  <avr@gjlay.de>
2622
2623         PR target/49868
2624         * config/avr/avr.h (ADDR_SPACE_PGM): New address spaces.
2625         (REGISTER_TARGET_PRAGMAS): New define.
2626         * config/avr/avr-protos.h (avr_mem_pgm_p): New.
2627         (avr_load_libgcc_p): New.
2628         (avr_register_target_pragmas): New.
2629         (asm_output_external_libcall): Remove.
2630         (avr_log_t): Add field "progmem".  Order alphabetically.
2631         * config/avr/avr-log.c (avr_log_set_avr_log): Set avr_log.progmem.
2632         * config/avr/avr-c.c (langhooks.h): New include.
2633         (avr_register_target_pragmas): New function. Register address
2634         space __pgm.
2635         (avr_cpu_cpp_builtins): Add built-in define __PGM.
2636
2637         * config/avr/avr.c: Include "c-family/c-common.h".
2638         (TARGET_LEGITIMATE_ADDRESS_P): Remove define.
2639         (TARGET_LEGITIMIZE_ADDRESS): Remove define.
2640         (TARGET_ADDR_SPACE_SUBSET_P): Define to...
2641         (avr_addr_space_subset_p): ...this new static function.
2642         (TARGET_ADDR_SPACE_CONVERT): Define to...
2643         (avr_addr_space_convert): ...this new static function.
2644         (TARGET_ADDR_SPACE_ADDRESS_MODE): Define to...
2645         (avr_addr_space_address_mode): ...this new static function.
2646         (TARGET_ADDR_SPACE_POINTER_MODE): Define to...
2647         (avr_addr_space_pointer_mode): ...this new static function.
2648         (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define to...
2649         (avr_addr_space_legitimate_address_p): ...this new static function.
2650         (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Define to...
2651         (avr_addr_space_legitimize_address): ...this new static function.
2652         (avr_mode_code_base_reg_class): Handle address spaces.
2653         (avr_regno_mode_code_ok_for_base_p): Ditto.
2654         (lpm_addr_reg_rtx, lpm_reg_rtx, all_regs_rtx): New static variables.
2655         (avr_option_override): Initialize them.
2656         (output_reload_in_const): Use all_regs_rtx. Fix signedness of loop
2657         variables.
2658         (avr_pgm_segment): New static function.
2659         (avr_decl_pgm_p, avr_mem_pgm_p): New static functions.
2660         (avr_out_lpm, avr_out_lpm_no_lpmx): New static functions.
2661         (output_movqi, output_movhi, output_movsisf, avr_out_movpsi): Call
2662         avr_out_lpm to handle loads from progmem.
2663         (avr_load_libgcc_p): New static function.
2664         (avr_progmem_p): Test if decl is in flash.
2665         (avr_pgm_pointer_const_p): New static function.
2666         (avr_nonconst_pointer_addrspace): New static function.
2667         (avr_pgm_check_var_decl): New static function.
2668         (avr_insert_attributes): Use it.  Change error message to report
2669         cause (progmem or address space) when code wants to write to flash.
2670         (avr_section_type_flags): Unset section flag SECTION_BSS for
2671         data in progmem.
2672
2673         * config/avr/predicates.md (nop_general_operand): New predicate.
2674         (nox_general_operand): New predicate.
2675         * config/avr/avr.md (LPM_REGNO): New define_constant.
2676         (load<mode>_libgcc): New expander.
2677         (*load.<mode>.libgcc): New insn.
2678         (mov<mode>): Handle loads from non-generic AS.
2679         (movmemhi): Ditto.  Propagate address space information to newly
2680         created MEM.
2681         (movqi_insn, *movhi, *movpsi, *movsi, *movsf): Change predicate #1
2682         to nox_general_operand.
2683         (ashrqi3, ashrhi3, ashrsi3): Change predicate #1 to
2684         nop_general_operand.
2685         (ashlqi3, *ashlqi3, ashlhi3, ashlsi3): Ditto.
2686         (lshrqi3, *lshrqi3, lshrhi3, lshrsi3): Ditto.
2687         (split-lpmx): New split.
2688         (*ashlhi3_const, *ashlsi3_const, *ashrhi3_const, *ashrsi3_const,
2689         *lshrhi3_const, *lshrsi3_const): Indent, unquote C.
2690
2691 2011-11-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
2692
2693         * ipa-cp.c (ipa_value_from_jfunc): Make global.
2694         (ipa_cst_from_jfunc): Remove, use ipa_value_from_jfunc instead.
2695         (get_indirect_edge_target): Rename, make global.
2696         (devirtualization_time_bonus, estimate_local_effects,)
2697         (ipcp_discover_new_direct_edges): Update.
2698         * ipa-inline-analysis.c (evaluate_conditions_for_edge):
2699         Generalize to also handle types.  Rename to ...
2700         (evaluate_properties_for_edge): Use instead of
2701         evaluate_conditions_for_edge.
2702         (estimate_edge_devirt_benefit): New function.
2703         (estimate_calls_size_and_time): Use it.
2704         (estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,)
2705         (inline_merge_summary): Update.
2706         (do_estimate_edge_time, do_estimate_edge_growth): Update.  Calculate
2707         parameter information at the call site and pass it on to subroutines.
2708         * tree-inline.c (estimate_num_insns): Distinguish between direct and
2709         indirect calls.
2710         (init_inline_once): Set size and time costs or indirect calls.
2711         * tree-inline.h (eni_weights): Add indirect_call_cost.
2712
2713 2011-11-15  Tom de Vries  <tom@codesourcery.com>
2714
2715         PR tree-optimization/51005
2716         * tree-ssa-tail-merge.c (delete_basic_block_same_succ): Rename to
2717         mark_basic_block_deleted.
2718         (update_worklist): Inline purge_bbs.
2719         (purge_bbs, unlink_virtual_phi, update_vuses, vop_at_entry)
2720         (delete_block_update_dominator_info): Remove.
2721         (replace_block_by): Remove update_vops parameter.  Partially evaluate
2722         for update_vops == false.
2723         (apply_clusters): Remove update_vops parameter.  Remove update_vops
2724         argument in replace_block_by call.
2725         (update_debug_stmts): Remove MAY_HAVE_DEBUG_STMTS test.
2726         (tail_merge_optimize): Remove update_vops argument to apply_clusters.
2727         Remove call to purge_bbs.  Add calls to calculate_dominance_info and
2728         free_dominance_info.  Add MAY_HAVE_DEBUG_STMTS  before calling
2729         update_debug_stmts.  Mark vop var for renaming, if necessary.
2730
2731 2011-11-15  Bernd Schmidt  <bernds@codesourcery.com>
2732
2733         PR rtl-optimization/51051
2734         * cfgrtl.c (cfg_layout_can_merge_blocks_p): Return FALSE if the
2735         move would cause fallthrough into the exit block.
2736
2737 2011-11-14  Richard Henderson  <rth@redhat.com>
2738
2739         * config/rs6000/rs6000.c (emit_load_locked): Assert the mode is
2740         handled.
2741         (emit_store_conditional): Likewise.
2742         (rs6000_pre_atomic_barrier, rs6000_post_atomic_barrier): New.
2743         (rs6000_adjust_atomic_subword): New.
2744         (rs6000_mask_atomic_subword, rs6000_finish_atomic_subword): New.
2745         (rs6000_expand_atomic_op): Rename from rs6000_emit_sync; rewrite
2746         for pre-reload expansion.
2747         (rs6000_split_compare_and_swap, rs6000_split_compare_and_swapqhi,
2748         rs6000_expand_compare_and_swapqhi): Merge into ...
2749         (rs6000_expand_atomic_compare_and_swap): ... here.  New function.
2750         rs6000_split_lock_test_and_set; expand immediately.  Handle
2751         QImode and HImode.
2752         * config/rs6000/rs6000.md (UNSPEC_LWSYNC): Move and rename
2753         from UNSPECV_LWSYNC.
2754         * config/rs6000/sync.md (fetchopsi_constr, fetchopdi_constr): Remove.
2755         (mem_thread_fence): New.
2756         (hwsync): Rename from memory_barrier.
2757         (*hwsync): Rename from *sync_internal.
2758         (lwsync, *lwsync): Mirror hwsync implementation.
2759         (isync): Don't reference memory.
2760         (loadsync): New.
2761         (atomic_load<INT>, atomic_store<INT>): New.
2762         (ATOMIC): New mode iterator.
2763         (load_locked<ATOMIC>): Rename from load_locked_<GPR>.
2764         (store_conditional<ATOMIC>): Rename from store_conditional_<GPR>.
2765         (sync_compare_and_swap<GPR>): Remove.
2766         (sync_compare_and_swaphi, sync_compare_and_swapqi): Remove.
2767         (sync_compare_and_swapqhi_internal): Remove.
2768         (sync_lock_test_and_set<GPR>): Remove.
2769         (sync_<FETCHOP><INT1>): Remove.
2770         (*sync_<FETCHOP>si_internal, *sync_<FETCHOP>di_internal): Remove.
2771         (sync_nand<INT1>, *sync_nand<GPR>_internal): Remove.
2772         (sync_old_<FETCHOP><GPR>): Remove.
2773         (*sync_old_<FETCHOP>si_internal): Remove.
2774         (*sync_old_<FETCHOP>di_internal): Remove.
2775         (sync_old_nand<INT1>): Remove.
2776         (*sync_old_nand<GPR>_internal): Remove.
2777         (sync_new_<FETCHOP><GPR>): Remove.
2778         (*sync_new_<FETCHOP>si_internal): Remove.
2779         (*sync_new_<FETCHOP>di_internal): Remove.
2780         (sync_new_nand<INT1>): Remove.
2781         (*sync_new_nand<GPR>_internal): Remove.
2782         (*atomic_andsi, *atomic_anddi): Remove.
2783         (*sync_addshort_internal, *sync_subshort_internal): Remove.
2784         (*sync_andsi_internal, *sync_boolsi_internal): Remove.
2785         (*sync_boolcshort_internal): Remove.
2786         (sync_lock_release<INT1>): Remove.
2787         (atomic_compare_and_swap<INT1>): New.
2788         (atomic_exchange<INT1>): New.
2789         (atomic_<FETCHOP><INT1>, atomic_nand<INT1>): New.
2790         (atomic_fetch_<FETCHOP><INT1>, atomic_fetch_nand<INT1>): New.
2791         (atomic_<FETCHOP>_fetch<INT1>, atomic_nand_fetch<INT1>): New.
2792
2793 2011-11-14  Uros Bizjak  <ubizjak@gmail.com>
2794
2795         * config/i386/sse.md (round<mode>2): Use register_operand for
2796         operand 1 predicate.
2797         (round<mode>2_sfix): Ditto.
2798         (round<mode>2_vec_pack_sfix): Ditto for operand 1 and operand 2.
2799
2800 2011-11-14  Nathan Sidwell  <nathan@acm.org>
2801
2802         * gcov.c (canonicalize_name): Protect use of S_ISLNK.
2803
2804 2011-11-14  Jan Hubicka  <jh@suse.cz>
2805
2806         PR target/51126
2807         * config/i386/i386.c (core cost model): Correct pasto.
2808
2809 2011-11-14  Uros Bizjak  <ubizjak@gmail.com>
2810
2811         * config/i386/sse.md (round<mode>2_sfix): New expander.
2812         (round<mode>2_vec_pack_sfix): Ditto.
2813         (<sse4_1>_round<ssemodesuffix>_sfix<avxsizesuffix>): Ditto.
2814         (<sse4_1>_round<ssemodesuffix>_vec_pack_sfix<avxsizesuffix>): Ditto.
2815         * config/i386/builtin-types.def (V4SI_FTYPE_V4SF_ROUND,
2816         V8SI_FTYPE_V8SF_ROUND, V4SI_FTYPE_V2DF_V2DF_ROUND,
2817         V8SI_FTYPE_V4DF_V4DF_ROUND): New builtin types.
2818         * config/i386/i386.c (ix86_builtins): Add
2819         IX86_BUILTIN_{FLOORPD,CEILPD,ROUNDPD_AZ}_VEC_PACK_SFIX{,256} and
2820         IX86_BUILTIN_{FLOORPS,CEILPS,ROUNDPS_AZ}_SFIX{,256} defines.
2821         (bdesc_args): Add __builtin_ia32_{floorpd,ceilpd}_vec_pack_sfix{,256},
2822         __builtin_ia32_roundpd_az_vec_pack_sfix{,256},
2823         __builtin_ia32_{floorps,ceilps}_sfix{,256}and
2824         __builtin_ia32_roundps_az_sfix{,256} descriptions.
2825         (ix86_expand_sse_round_vec_pack_sfix): New.
2826         (ix86_expand_args_builtin): Handle V4SI_FTYPE_V4SF_ROUND,
2827         V8SI_FTYPE_V8SF_ROUND, V4SI_FTYPE_V2DF_V2DF_ROUND and
2828         V8SI_FTYPE_V4DF_V4DF_ROUND types.  Check last argument of
2829         CODE_FOR_sse4_1_roundpd_vec_pack_sfix, CODE_FOR_sse4_1_roundps_sfix,
2830         CODE_FOR_avx_roundpd_vec_pack_sfix256 and CODE_FOR_avx_roundps_sfix256.
2831         (ix86_builtin_vectorized_function): Handle
2832         BUILT_IN_{I,L,LL}FLOOR{,F}, BUILT_IN_{I,L,LL}CEIL{,F} and
2833         BUILT_IN_{I,L,LL}ROUND{,F}
2834
2835 2011-11-14  Jan Hubicka  <jh@suse.cz>
2836
2837         PR middle-end/50598
2838         * cgraph.h (varpool_externally_visible_p): Declare.
2839         (varpool_add_new_variable): Declare.
2840         * tree-emultls.c (get_emutls_init_templ_addr,
2841         new_emutls_decl): Use varpool_add_new_variable.
2842         * ipa.c (varpool_externally_visible_p): Export.
2843         * varpool.c (varpool_add_new_variable): New function.
2844
2845 2011-11-14  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>
2846             Jan Hubicka  <jh@suse.cz>
2847
2848         * config/i386/i386.h (processor_costs): Add second dimension to
2849         stringop_algs array.
2850         * config/i386/i386.c (cost models): Initialize second dimension of
2851         stringop_algs arrays.
2852         (core_cost): New costs based on generic64 costs with updated stringop
2853         values.
2854         (promote_duplicated_reg): Add support for vector modes, add
2855         declaration.
2856         (promote_duplicated_reg_to_size): Likewise.
2857         (processor_target): Set core costs for core variants.
2858         (expand_set_or_movmem_via_loop_with_iter): New function.
2859         (expand_set_or_movmem_via_loop): Enable reuse of the same iters in
2860         different loops, produced by this function.
2861         (emit_strset): New function.
2862         (expand_movmem_epilogue): Add epilogue generation for bigger sizes,
2863         use SSE-moves where possible.
2864         (expand_setmem_epilogue): Likewise.
2865         (expand_movmem_prologue): Likewise for prologue.
2866         (expand_setmem_prologue): Likewise.
2867         (expand_constant_movmem_prologue): Likewise.
2868         (expand_constant_setmem_prologue): Likewise.
2869         (decide_alg): Add new argument align_unknown.  Fix algorithm of
2870         strategy selection if TARGET_INLINE_ALL_STRINGOPS is set; Skip sse_loop
2871         (decide_alignment): Update desired alignment according to chosen move
2872         mode.
2873         (ix86_expand_movmem): Change unrolled_loop strategy to use SSE-moves.
2874         (ix86_expand_setmem): Likewise.
2875         (ix86_slow_unaligned_access): Implementation of new hook
2876         slow_unaligned_access.
2877         * config/i386/i386.md (strset): Enable half-SSE moves.
2878         * config/i386/sse.md (vec_dupv4si): Add expand for vec_dupv4si.
2879         (vec_dupv2di): Add expand for vec_dupv2di.
2880
2881 2011-11-14  Dimitrios Apostolou  <jimis@gmx.net>
2882
2883         PR bootstrap/51094
2884         PR middle-end/51116
2885         * config/elfos.h (TARGET_ASM_INTERNAL_LABEL): Remove.
2886         * varasm.c (default_elf_internal_label): Remove.
2887
2888 2011-11-14  Kai Tietz  <ktietz@redhat.com>
2889
2890         * gcov.c (generate_results): Add missing semicolon and correct indent.
2891
2892 2011-11-14  Ira Rosen  <ira.rosen@linaro.org>
2893
2894         PR bootstrap/51112
2895         * tree-vect-stmts.c (vectorizable_condition): Initialize comp_vectype.
2896
2897 2011-11-14  Mingjie Xing  <mingjie.xing@gmail.com>
2898
2899         * doc/invoke.texi (Wunused-result): Change @pxref{Variable Attributes}
2900         to @pxref{Function Attributes}.
2901
2902 2011-11-13  Oleg Endo  <oleg.endo@t-online.de>
2903
2904         PR target/50694
2905         * config/sh/sh.h (IS_LITTLE_ENDIAN_OPTION, UNSUPPORTED_SH2A):
2906         New macros.
2907         (DRIVER_SELF_SPECS): Use new macros to filter out unsupported options
2908         taking the default configuration into account.
2909
2910 2011-11-13  Jonathan Wakely  <jwakely.gcc@gmail.com>
2911
2912         * doc/install.texi (Specific): Fix anchor for
2913         x86_64-*-solaris2.1[0-9]*.
2914
2915 2011-11-13  Nathan Sidwell  <nathan@acm.org>
2916
2917         * gcov.c (source_prefix, source_length): New globals.
2918         (flag_relative_only): Likewise.
2919         (print_usage, options, process_args): Update.
2920         (generate_results): Use coverage.name, check
2921         flag_relative_only. Adjust messages.
2922         (find_source): Check source_prefix.
2923         (output_lines): Use coverage.name, adjust messages.
2924         * doc/gcov.texi (Invoking Gcov): Document new options.
2925
2926 2011-11-12  Jason Merrill  <jason@redhat.com>
2927
2928         PR c++/51060
2929         * gimplify.c (gimplify_target_expr): Add a clobber to the cleanup.
2930         (gimplify_modify_expr): Don't try to simplify it.
2931
2932 2011-11-12  Dimitrios Apostolou  <jimis@gmx.net>
2933
2934         PR bootstrap/51094
2935         * config/elfos.h (STRING_ASM_OP): Define.
2936         * varasm.c (default_elf_asm_output_limited_string): Use it.
2937
2938         PR bootstrap/51094
2939         * gcc/configure.ac: Check for stpcpy declaration.
2940         * system.h: Declare it if not.
2941         * config.in, configure: Regenerate.
2942
2943 2011-11-12  Richard Henderson  <rth@redhat.com>
2944
2945         * config/rs6000/rs6000.md (fix_trunc<SFDF>si2_stfiwx): Use
2946         nonimmediate_operand for the destination.
2947         (fixuns_trunc<SFDF>si2_stfiwx): Likewise.
2948
2949         * builtins.c (expand_builtin_compare_and_swap): If target is const0,
2950         don't pass the target to expand_atomic_compare_and_swap.
2951         (expand_builtin_atomic_compare_exchange): Likewise.
2952
2953         * config/sh/linux.h (TARGET_INIT_LIBFUNCS): New.
2954         * config/sh/sh.c (sh_init_sync_libfuncs): New.
2955
2956         * config/pa/pa-linux.h (TARGET_SYNC_LIBCALL): New.
2957         * config/pa/pa.h (TARGET_SYNC_LIBCALL): New default.
2958         * config/pa/pa.c (pa_init_libfuncs): Use init_sync_libfuncs.
2959
2960 2011-11-12  Iain Sandoe  <iains@gcc.gnu.org>
2961
2962         PR target/45233
2963         * config/rs6000/rs6000.c (rs6000_legitimize_reload_address):
2964         Only expand a symbol ref. into an access when the entity is defined
2965         in the TU.
2966
2967 2011-11-12  Jan Hubicka  <jh@suse.cz>
2968
2969         PR bootstrap/50822
2970         * cgraphunit.c (output_weakrefs): Output really only weakrefs.
2971
2972 2011-11-12  Nathan Sidwell  <nathan@acm.org>
2973
2974         * gcov.c (struct name_map): New.
2975         (names, n_names, a_names): New global vars.
2976         (print_usage): Adjust usage.
2977         (generate_results): Canonicalize main file name.
2978         (release_structures): Adjust.
2979         (name_search, name_sort): New callbacks.
2980         (find_source): Look for and create a canonical name.
2981         (canonicalize_name): New.
2982         (make_gcov_file_name): Reimplement and fix mangling.
2983         (mangle_name): New.
2984         * doc/gcov.texi: Update documentation about path preservation.
2985
2986 2011-11-11  David S. Miller  <davem@davemloft.net>
2987
2988         * config/sparc/linux.h (ASM_GENERATE_INTERNAL_LABEL): Delete.
2989         * config/sparc/linux64.h (ASM_GENERATE_INTERNAL_LABEL): Delete.
2990
2991 2011-11-11  Jakub Jelinek  <jakub@redhat.com>
2992
2993         * config/i386/i386-protos.h (ix86_maybe_emit_epilogue_vzeroupper):
2994         New prototype.
2995         * config/i386/i386.c (ix86_maybe_emit_epilogue_vzeroupper): New
2996         function.
2997         (ix86_expand_epilogue): Use it.
2998         * config/i386/i386.md (return, simple_return): Call it in the
2999         expanders.
3000
3001         PR tree-optimization/51091
3002         * tree-stdarg.c (execute_optimize_stdarg): Ignore TREE_CLOBBER_P
3003         rhs also in the va_list_simple_ptr case.
3004
3005         PR tree-optimization/51058
3006         * tree-vect-slp.c (vect_remove_slp_scalar_calls): New function.
3007         (vect_schedule_slp): Call it.
3008         * tree-vect-stmts.c (vectorizable_call): If slp_node != NULL,
3009         don't replace scalar calls with setting of their lhs to zero here.
3010
3011         PR tree-optimization/51074
3012         * fold-const.c (vec_cst_ctor_to_array, fold_vec_perm): New functions.
3013         (fold_binary_loc): Handle VEC_EXTRACT_EVEN_EXPR,
3014         VEC_EXTRACT_ODD_EXPR, VEC_INTERLEAVE_HIGH_EXPR and
3015         VEC_INTERLEAVE_LOW_EXPR with VECTOR_CST or CONSTRUCTOR operands.
3016         (fold_ternary_loc): Handle VEC_PERM_EXPR with VECTOR_CST or
3017         CONSTRUCTOR operands.
3018         * tree-ssa-propagate.c (valid_gimple_rhs_p): Handle ternary
3019         expressions.
3020         * tree-vect-generic.c (lower_vec_perm): Mask sel_int elements
3021         to 0 .. 2 * elements - 1.
3022
3023 2011-11-11  Richard Henderson  <rth@redhat.com>
3024
3025         * gimple-pretty-print.c (dump_gimple_omp_atomic_load): Dump needed.
3026         (dump_gimple_omp_atomic_store): Likewise.
3027         * optabs.c (can_atomic_exchange_p): New.
3028         * optabs.h (can_atomic_exchange_p): Declare.
3029         * omp-low.c (expand_omp_atomic_load): Implement.
3030         (expand_omp_atomic_store): Likewise.
3031         (expand_omp_atomic): Update for new arguments to load/store.
3032
3033 2011-11-11  Eric Botcazou  <ebotcazou@adacore.com>
3034
3035         * cprop.c: Adjust outdated comments throughout.
3036         (hash_scan_set): Rename PAT parameter into SET.
3037         (cprop_pavloc): Rename into...
3038         (cprop_avloc): ...this.
3039         (cprop_absaltered): Rename into...
3040         (cprop_kill): ...this.
3041         (alloc_cprop_mem): Adjust for above renaming.
3042         (free_cprop_mem): Likewise.
3043         (compute_cprop_data): Likewise.
3044         (compute_local_properties): Rename TRANSP parameter into KILL and
3045         adjust throughout.  Rework comments.
3046         (try_replace_reg): Fix long line.
3047         (cprop_jump): Likewise.
3048         (constprop_register): Fix prototype and take INSN last.
3049         (cprop_insn): Adjust calls to above function.  Fix long lines.
3050         (bypass_block): Likewise.
3051         (one_cprop_pass): Likewise.
3052
3053 2011-11-11  Uros Bizjak  <ubizjak@gmail.com>
3054
3055         * config/alpha/elf.h (ELF_ASCII_ESCAPES): Rename from ESCAPES.
3056         (ELF_STRING_LIMIT): Rename from STRING_LIMIT.
3057
3058 2011-11-11  Jason Merrill  <jason@redhat.com>
3059
3060         * varasm.c (default_elf_asm_output_limited_string): #ifdef
3061         ELF_ASCII_ESCAPES.
3062         (default_elf_asm_output_ascii): Likewise.
3063
3064 2011-11-11  Uros Bizjak  <ubizjak@gmail.com>
3065
3066         PR target/50762
3067         * config/i386/constraints.md (j): New address constraint.
3068         * config/i386/predicates.md (lea_address_operand): Redefine as
3069         special predicate.
3070         * config/i386/i386.md (*lea_3_zext): Use "j" constraint for operand 1.
3071         (*lea_4_zext): Ditto.
3072
3073 2011-11-11  David S. Miller  <davem@davemloft.net>
3074
3075         Revert
3076         2011-11-05  David S. Miller  <davem@davemloft.net>
3077
3078         * config/sparc/sparc.md (UNSPEC_SHORT_LOAD): New unspec.
3079         (zero-extend_v8qi_vis, zero_extend_v4hi_vis): New expanders.
3080         (*zero_extend_v8qi_<P:mode>_insn,
3081         *zero_extend_v4hi_<P:mode>_insn): New insns.
3082         * config/sparc/sparc.c (vector_init_move_words,
3083         vector_init_prepare_elts, sparc_expand_vector_init_vis2,
3084         sparc_expand_vector_init_vis1): New functions.
3085         (vector_init_bshuffle): Rewrite to handle more cases and make use
3086         of locs[] array prepared by vector_init_prepare_elts.
3087         (vector_init_fpmerge, vector_init_faligndata): Delete.
3088         (sparc_expand_vector_init): Rewrite using new infrastructure.
3089
3090 2011-11-11  Jakub Jelinek  <jakub@redhat.com>
3091
3092         * opts-common.c (generate_canonical_option): Free opt_text
3093         it it has been allocated here and not stored anywhere.
3094
3095         * tree-vect-slp.c (vect_free_slp_tree): Also free SLP_TREE_CHILDREN
3096         vector.
3097         (vect_create_new_slp_node): Don't allocate node before checking stmt
3098         type.
3099         (vect_free_oprnd_info): Remove FREE_DEF_STMTS argument, always
3100         free def_stmts vectors and additionally free oprnd_info.
3101         (vect_build_slp_tree): Adjust callers.  Call it even if
3102         stop_recursion.  If vect_create_new_slp_node or
3103         vect_build_slp_tree fails, properly handle freeing memory.
3104         If it succeeded, clear def_stmts in oprnd_info.
3105
3106 2011-11-11  Dimitrios Apostolou  <jimis@gmx.net>
3107
3108         * defaults.h (ASM_OUTPUT_LABEL, ASM_OUTPUT_INTERNAL_LABEL): Expand on
3109         multiple lines for readability.
3110         * output.h (fprint_whex, fprint_w, fprint_ul, sprint_ul): Declare.
3111         (ASM_OUTPUT_LABELREF): Call fputs instead of asm_fprintf.
3112         * dwarf2asm.c (dw2_assemble_integer, dw2_asm_output_data,
3113         dw2_asm_data_uleb128, dw2_asm_delta_uleb128,
3114         dw2_asm_delta_sleb128): Convert fprintf calls to the new functions.
3115         * dwarf2out.c (dwarf2out_source_line): Call fprint_ul instead of
3116         fprintf.
3117         * final.c (fprint_whex, fprint_w, fprint_ul, sprint_ul): New functions
3118         serving as fast replacements for fprintf integer to string conversions.
3119         (sprint_ul_rev): Internal helper for the above.
3120         (output_addr_const) <CONST_INT>: Don't use fprintf.
3121         * varasm.c: Fix some whitespace inconsistencies.
3122         (default_elf_asm_output_limited_string): New.
3123         (default_elf_asm_output_ascii): Likewise.
3124         (default_elf_internal_label): Likewise.
3125         * config/elfos.h (ASM_GENERATE_INTERNAL_LABEL): Use sprint_ul and
3126         stpcpy instead of sprintf.
3127         (TARGET_ASM_INTERNAL_LABEL): Define as default_elf_internal_label.
3128         (ELF_ASCII_ESCAPES, ELF_STRING_LIMIT): Rename from old ESCAPES and
3129         STRING_LIMIT macros.
3130         (ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII): Call functions that
3131         provide the same functionality.
3132         * config/i386/i386.c (print_reg): Call fprint_ul instead of fprintf.
3133
3134 2011-11-10  Andrew MacLeod  <amacleod@redhat.com>
3135
3136         * doc/extend.texi: Document __atomic_test_and_set and __atomic_clear.
3137
3138 2011-11-10  Andrew MacLeod  <amacleod@redhat.com>
3139
3140         PR middle-end/51038
3141         * builtins.c (expand_builtin_atomic_clear): New.  Expand atomic_clear.
3142         (expand_builtin_atomic_test_and_set): New.  Expand atomic test_and_set.
3143         (expand_builtin): Add cases for test_and_set and clear.
3144         * sync-builtins.def (BUILT_IN_ATOMIC_TEST_AND_SET): New.
3145         (BUILT_IN_ATOMIC_CLEAR): New.
3146
3147 2011-11-10  Roberto Agostino Vitillo  <ravitillo@lbl.gov>
3148
3149         PR debug/50983
3150         * dwarf2out.c (set_cur_line_info_table): Restore the last is_stmt
3151         value in the current line table.
3152
3153 2011-11-10  Nathan Sidwell  <nathan@acm.org>
3154
3155         * gcov.c (struct function_info): Make src an index, not a pointer.
3156         (struct source_info): Remove index and next source fields.
3157         (fn_end): New static var.
3158         (sources_index): Remove.
3159         (sources): Now a pointer to an array, not a list.
3160         (n_sources, a_sources): New.
3161         (process_file): Adjust for changes to read_graph_file. Insert
3162         functions into source lists and check line numbers here.
3163         (generate_results): Only allocate lines for sources with
3164         contents.  Adjust for source array.
3165         (release_structures): Likewise.
3166         (find_source): Return source index, adjust for source array.
3167         (read_graph_file): Return function list.  Don't insert into source
3168         lists here.
3169         (read_count_file): Take list of functions.
3170         (solve_flow_graph): Reverse the arc lists here.
3171         (add_line_counts): Adjust for source array.
3172
3173 2011-11-10  Jakub Jelinek  <jakub@redhat.com>
3174
3175         PR middle-end/51077
3176         * tree-object-size.c (addr_object_size): Check TREE_CODE of
3177         MEM_REF's operand rather than code of the MEM_REF itself.
3178
3179 2011-11-10  Andrew MacLeod  <amacleod@redhat.com>
3180
3181         PR rtl-optimization/51040
3182         * optabs.c (expand_atomic_fetch_op): Patchup code for NAND should
3183         be AND followed by NOT.
3184         * builtins.c (expand_builtin_atomic_fetch_op): Patchup code for NAND
3185         should be AND followed by NOT.
3186
3187 2011-11-10  Jakub Jelinek  <jakub@redhat.com>
3188
3189         * vec.h (VEC_BASE): If base is at offset 0 in the structure,
3190         use &(P)->base even if P is NULL.
3191
3192         PR rtl-optimization/51023
3193         * combine.c (simplify_comparison) <case SIGN_EXTEND>: Don't use
3194         val_signbit_known_clear_p for signed comparison narrowing
3195         optimization.  Don't check for non-VOIDmode, use
3196         HWI_COMPUTABLE_MODE_P macro.
3197         <case ZERO_EXTEND>: Don't check for non-VOIDmode.
3198         Optimize even when const_op is equal to GET_MODE_MASK (mode),
3199         don't optimize if const_op is negative.
3200
3201 2011-11-10  Richard Guenther  <rguenther@suse.de>
3202
3203         PR tree-optimization/51042
3204         * tree-ssa-pre.c (phi_translate_1): Avoid recursing on
3205         self-referential expressions.  Refactor code to avoid duplication.
3206
3207 2011-11-10  Richard Guenther  <rguenther@suse.de>
3208
3209         PR tree-optimization/51070
3210         * tree-loop-distribution.c (generate_builtin): Do not replace
3211         the loop with a builtin if the partition contains statements which
3212         results are used outside of the loop.
3213         (pass_loop_distribution): Verify and collect.
3214
3215 2011-11-10  Richard Guenther  <rguenther@suse.de>
3216
3217         PR tree-optimization/51030
3218         * tree-ssa-phiopt.c (jump_function_from_stmt): New function.
3219         (value_replacement): Use it to handle trivial non-empty
3220         intermediate blocks.
3221
3222 2011-11-10  Richard Guenther  <rguenther@suse.de>
3223
3224         PR middle-end/51071
3225         * gimple.c (gimple_has_side_effects): Remove checking code
3226         that doesn't belong here.
3227
3228 2011-11-10  Ira Rosen  <ira.rosen@linaro.org>
3229
3230         PR tree-optimization/51058
3231         * tree-vect-slp.c (vect_get_constant_vectors): Handle CALL_EXPR.
3232
3233 2011-11-10  Jakub Jelinek  <jakub@redhat.com>
3234
3235         PR tree-optimization/51000
3236         * tree-vect-patterns.c (vect_recog_bool_pattern): If adding
3237         a pattern stmt for a bool store, adjust DR_STMT too.
3238         Don't handle bool conversions to single bit precision lhs.
3239         * tree-vect-stmts.c (vect_remove_stores): If next is a pattern
3240         stmt, remove its related stmt and free its stmt_vinfo.
3241         (free_stmt_vec_info): Free also pattern stmt's vinfo and
3242         pattern def stmt's vinfo.
3243         * tree-vect-loop.c (destroy_loop_vec_info): Don't try to
3244         free pattern stmt's vinfo here.
3245         (vect_transform_loop): When calling vect_remove_stores,
3246         do gsi_next first and don't call gsi_remove.  If not strided
3247         store, free stmt vinfo for gsi_stmt (si) rather than stmt.
3248
3249 2011-11-09  Jakub Jelinek  <jakub@redhat.com>
3250
3251         PR target/50911
3252         * config/i386/i386.c (expand_vec_perm_interleave2): If d->vmode is
3253         V4SImode, !TARGET_SSE2 and punpck[lh]* is needed, change dremap.vmode
3254         to V4SFmode.
3255
3256         * function.h (requires_stack_frame_p): New prototype.
3257         * function.c (requires_stack_frame_p): No longer static.
3258         * config/i386/i386.c (ix86_finalize_stack_realign_flags): If
3259         stack_realign_fp was just a conservative guess for a function
3260         which doesn't use sp/fp/argp at all, clear frame_pointer_needed
3261         and stack realignment.
3262
3263 2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>
3264
3265         PR preprocessor/51061
3266         * incpath.c (merge_include_chains): Make sure to not pass null
3267         pointers to free_path.
3268
3269 2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>
3270
3271         * doc/invoke.texi ([Option Summary, C++ Language Options]):
3272         Add -Wzero-as-null-pointer-constant.
3273
3274 2011-11-07  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
3275
3276         * config/arm/arm-cores.def: Add -mcpu=cortex-a7.
3277         * config/arm/arm-tables.opt: Regenerate.
3278         * config/arm/arm-tune.md: Likewise.
3279         * config/arm/bpabi.h (BE8_LINK_SPEC): Add Cortex A-7.
3280         * doc/invoke.texi: Document -mcpu=cortex-a7.
3281
3282 2011-11-09  Richard Guenther  <rguenther@suse.de>
3283
3284         Revert
3285         2011-11-09  Richard Guenther  <rguenther@suse.de>
3286
3287         * tree-cfg.c (verify_gimple_call): Verify that
3288         gimple_call_cannot_inline_p is returning a conservative
3289         correct result according to gimple_check_call_matching_types.
3290
3291 2011-11-09  Richard Guenther  <rguenther@suse.de>
3292
3293         PR tree-optimization/51039
3294         * tree-cfg.c (verify_gimple_call): Verify that
3295         gimple_call_cannot_inline_p is returning a conservative
3296         correct result according to gimple_check_call_matching_types.
3297         * ipa-inline-analysis.c (estimate_function_body_sizes): Remove
3298         code dealing with un-inlinablility.
3299         * gimple-streamer-in.c (input_gimple_stmt): Update the
3300         non-inlinable flag.
3301
3302 2011-11-09  Richard Guenther  <rguenther@suse.de>
3303
3304         PR tree-optimization/51039
3305         * tree-inline.c (setup_one_parameter): Always perform a
3306         valid gimple type change.
3307         (declare_return_variable): Likewise.
3308
3309 2011-11-09  Jakub Jelinek  <jakub@redhat.com>
3310
3311         * config/rs6000/vector.md (vcondv4sfv4si, vcondv4siv4sf,
3312         vconduv4sfv4si): New patterns.
3313         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Handle
3314         different dest_mode from comparison mode.
3315
3316 2011-11-09  Richard Guenther  <rguenther@suse.de>
3317
3318         * gimple-fold.c (canonicalize_constructor_val): Mark
3319         address-taken variables addressable.
3320
3321 2011-11-09  Ira Rosen  <ira.rosen@linaro.org>
3322
3323         PR tree-optimization/51015
3324         * tree-vect-loop.c (vect_determine_vectorization_factor): Expect
3325         vectype to be set for pattern def stmts.
3326
3327 2011-11-09  Alan Modra  <amodra@gmail.com>
3328
3329         * function.c (bb_active_p): Delete.
3330         (dup_block_and_redirect, active_insn_between): New functions.
3331         (convert_jumps_to_returns, emit_return_for_exit): New functions,
3332         split out from..
3333         (thread_prologue_and_epilogue_insns): ..here.  Delete
3334         shadowing variables.  Don't do prologue register clobber tests
3335         when shrink wrapping already failed.  Delete all last_bb_active
3336         code.  Instead compute tail block candidates for duplicating
3337         exit path.  Remove these from antic set.  Duplicate tails when
3338         reached from both blocks needing a prologue/epilogue and
3339         blocks not needing such.
3340         * ifcvt.c (dead_or_predicable): Test both flag_shrink_wrap and
3341         HAVE_simple_return.
3342         * bb-reorder.c (get_uncond_jump_length): Make global.
3343         * bb-reorder.h (get_uncond_jump_length): Declare.
3344         * cfgrtl.c (rtl_create_basic_block): Comment typo fix.
3345         (rtl_split_edge): Likewise.  Warning fix.
3346         (rtl_duplicate_bb): New function.
3347         (rtl_cfg_hooks): Enable can_duplicate_block_p and duplicate_block.
3348         * Makefile.in (function.o): Update dependencies.
3349
3350 2011-11-08  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
3351             Georg-Johann Lay  <avr@gjlay.de>
3352
3353         * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space
3354         argument.
3355         (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise.
3356         * doc/tm.texi: Regenerate.
3357
3358         * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address
3359         space argument.
3360         (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise.
3361         * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise.
3362         (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise.
3363         * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space
3364         argument.
3365         (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto.
3366         * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto.
3367         (avr_regno_mode_code_ok_for_base_p): Ditto.
3368         * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto.
3369         (avr_regno_mode_code_ok_for_base_p): Ditto.
3370         (avr_reg_ok_for_addr_p): Pass AS down to
3371         avr_regno_mode_code_ok_for_base_p.
3372
3373         * addresses.h (base_reg_class): Add address space argument.
3374         Pass to MODE_CODE_BASE_REG_CLASS.
3375         (ok_for_base_p_1): Add address space argument.  Pass to
3376         REGNO_MODE_CODE_OK_FOR_BASE_P.
3377         (regno_ok_for_base_p): Add address space argument.  Pass to
3378         ok_for_base_p_1.
3379
3380         * regrename.c (scan_rtx_address): Add address space argument.
3381         Pass address space to regno_ok_for_base_p and base_reg_class.
3382         Update recursive calls.
3383         (scan_rtx): Pass address space to scan_rtx_address.
3384         (build_def_use): Likewise.
3385         * regcprop.c (replace_oldest_value_addr): Add address space
3386         argument.  Pass to regno_ok_for_base_p and base_reg_class.
3387         Update recursive calls.
3388         (replace_oldest_value_mem): Pass address space to
3389         replace_oldest_value_addr.
3390         (copyprop_hardreg_forward_1): Likewise.
3391
3392         * reload.c (find_reloads_address_1): Add address space argument.
3393         Pass address space to base_reg_class and regno_ok_for_base_p.
3394         Update recursive calls.
3395         (find_reloads_address): Pass address space to base_reg_class,
3396         regno_ok_for_base_p, and find_reloads_address_1.
3397         (find_reloads): Pass address space to base_reg_class.
3398         (find_reloads_subreg_address): Likewise.
3399
3400         * ira-costs.c (record_reg_classes): Update calls to base_reg_class.
3401         (ok_for_base_p_nonstrict): Add address space argument.  Pass to
3402         ok_for_base_p_1.
3403         (record_address_regs): Add address space argument.  Pass to
3404         base_reg_class and ok_for_base_p_nonstrict.  Update recursive calls.
3405         (record_operand_costs): Pass address space to record_address_regs.
3406         (scan_one_insn): Likewise.
3407
3408         * caller-save.c (init_caller_save): Update call to base_reg_class.
3409         * ira-conflicts.c (ira_build_conflicts): Likewise.
3410         * reload1.c (maybe_fix_stack_asms): Likewise.
3411
3412 2011-11-08  Michael Matz  <matz@suse.de>
3413
3414         * gengtype.c (write_field_root): Avoid out-of-scope access of newv.
3415
3416         * tree-stdarg.c (execute_optimize_stdarg): Accept clobbers.
3417
3418         * tree.h (TREE_CLOBBER_P): New macro.
3419         * gimple.h (gimple_clobber_p): New inline function.
3420         * gimplify.c (gimplify_bind_expr): Add clobbers for all variables
3421         that go out of scope and live in memory.
3422         * tree-ssa-operands.c (get_expr_operands): Transfer volatility also
3423         for constructors.
3424         * cfgexpand.c (decl_to_stack_part): New static variable.
3425         (add_stack_var): Allocate it, and remember mapping.
3426         (fini_vars_expansion): Deallocate it.
3427         (stack_var_conflict_p): Add early outs.
3428         (visit_op, visit_conflict, add_scope_conflicts_1,
3429         add_scope_conflicts): New static functions.
3430         (expand_used_vars_for_block): Don't call add_stack_var_conflict, tidy.
3431         (expand_used_vars): Add scope conflicts.
3432         (expand_gimple_stmt_1): Expand clobbers to nothing.
3433         (expand_debug_expr): Ditto.
3434
3435         * tree-pretty-print.c (dump_generic_node): Dump clobbers nicely.
3436         * tree-ssa-live.c (remove_unused_locals): Remove clobbers that
3437         refer to otherwise unused locals.
3438         * tree-sra.c (build_accesses_from_assign): Ignore clobbers.
3439         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Clobbers of
3440         SSA names aren't necessary.
3441         (propagate_necessity): Accept and ignore constructors on the rhs, tidy.
3442         * gimple.c (walk_gimple_op): Accept constructors like mem_rhs.
3443         * tree-ssa-structalias.c (find_func_aliases): Clobbers don't store
3444         any known value.