OSDN Git Service

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