OSDN Git Service

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