OSDN Git Service

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