OSDN Git Service

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