OSDN Git Service

* gcc-interface/decl.c (check_ok_for_atomic): Do nothing if the type
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2009-10-02  Uros Bizjak  <ubizjak@gmail.com>
2
3         * config/i386/i386.md (divmod<mode>4) Macroize expander from
4         divmoddi4, divmodsi4 and divmodhi4 patterns using SWI248 macro.
5         (*divmod<mode>4): Macroize insn_and_split pattern from
6         *divmoddi4_cltd_rex64, *divmodsi4_cltd and divmodhi4 insn patterns
7         and their corresponding splitters usign SWI248 macro.  Split SImode
8         insn to generate cltd and DImode insn to generate cqto instead of
9         move+shift when optimizing for size or TARGET_USE_CLTD is in effect.
10         (*divmoddi4_nocltd_rex64, *divmodsi4_nocltd): Remove insn patterns.
11         (*divmod<mode>4_noext): Macroize insn from *divmoddi_noext_rex64 and
12         *divmodsi_noext patterns using SWI248 macro.
13         (udivmod<mode>4): Macroize expander from udivmoddi4, udivmodsi4 and
14         udivmodhi4 patterns using SWI248 macro.
15         (*udivmod<mode>4): Macroize insn_and_split pattern from
16         *udivmoddi4, udivmodsi4 and udivmodhi4 patterns and their
17         corresponding splitters using SWI248 macro.
18         (*udivmod<mode>4_noext): Macroize insn from *udivmoddi4_noext,
19         *udivmodsi4_noext and *udivmodhi_noext patterns using SWI248 macro.
20
21 2009-10-02  Eric Botcazou  <ebotcazou@adacore.com>
22
23         * stor-layout.c (layout_type) <ARRAY_TYPE>: Make sure that an array
24         of zero-sized element is zero-sized regardless of its extent.
25
26 2009-10-02  Jakub Jelinek  <jakub@redhat.com>
27
28         PR debug/40521
29         * configure.ac (HAVE_GAS_CFI_SECTIONS_DIRECTIVE): New test.
30         * configure: Regenerated.
31         * config.in: Regenerated.
32         * dwarf2out.c (dwarf2out_do_cfi_asm): Return false if
33         !HAVE_GAS_CFI_SECTIONS_DIRECTIVE and not emitting .eh_frame.
34         (dwarf2out_init): If HAVE_GAS_CFI_SECTIONS_DIRECTIVE and
35         not emitting .eh_frame, emit .cfi_sections .debug_frame
36         directive.
37
38         PR debug/41404
39         PR debug/41353
40         * cfgexpand.c (expand_debug_expr) <case STRING_CST>: Don't create
41         CONST_STRING if STRING_CST contains embedded '\0's or doesn't end with
42         '\0'.
43         (expand_debug_expr) <case VAR_DECL>: For TREE_STATIC !DECL_EXTERNAL
44         vars use DECL_RTL with resetting it back to NULL afterwards.
45         * dwarf2out.c (same_dw_val_p): For dw_val_class_addr compare with
46         rtx_equal_p instead of asserting it is a SYMBOL_REF.
47         (value_format): For dw_val_class_addr only use DW_FORM_addr if
48         the attribute type allows it, otherwise use DW_FORM_dataN.
49         (mem_loc_descriptor): Handle CONST_STRING.
50         (add_const_value_attribute): Handle CONST_STRING using add_AT_addr.
51         Handle MEM with CONST_STRING address using add_AT_string.
52         (rtl_for_decl_init): Return MEM with CONST_STRING address instead of
53         CONST_STRING for const arrays initialized with a string literal.
54         (resolve_one_addr, resolve_addr_in_expr, resolve_addr): New functions.
55         (dwarf2out_finish): Call resolve_addr.
56
57 2009-10-02  Andreas Schwab  <schwab@linux-m68k.org>
58             Maxim Kuvyrkov  <maxim@codesourcery.com>
59
60         * config/m68k/lb1sf68.asm (PICCALL): Use variable sized branch.
61
62 2009-10-02  Nick Clifton  <nickc@redhat.com>
63
64         * config/mn10300/mn10300.h (USER_LABEL_PREFIX): Define.
65         (ASM_OUTPUT_LABELREF): Use asm_fprintf and %U.
66
67 2009-10-01  Jan Hubicka  <jh@suse.cz>
68
69         * cgraph.c (cgraph_clone_node): Add redirect_callers parameter.
70         (cgraph_create_virtual_clone): Just pass redirect_callers
71         around.
72         * cgraph.h (cgraph_clone_node): Update prototype.
73         * ipa-pure-const.c (self_recursive_p): New function.
74         (propagate): Use it.
75         * ipa-inline.c (cgraph_clone_inlined_nodes,
76         cgraph_decide_recursive_inlining): Update.
77
78 2009-10-01  David Daney  <ddaney@caviumnetworks.com>
79
80         * gcc/config/mips/mips.c (mips_process_sync_loop) Emit syncw
81         instructions for TARGET_OCTEON.
82
83 2009-10-01  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
84
85         * config/arm/arm.c (arm_override_options): Turn off
86         flag_dwarf2_cfi_asm for AAPCS variants.
87
88 2009-10-01  Martin Jambor  <mjambor@suse.cz>
89
90         PR middle-end/12392
91         * tree-sra.c (convert_callers): Do not call
92         compute_inline_parameters on one caller more than once.
93
94 2009-10-01  Nick Clifton  <nickc@redhat.com>
95
96         * config/vax/netbsd-elf.h (NETBSD_CC1_AND_CC1PLUS_SPEC): Define as
97         an empty string if not already defined.
98
99 2009-10-01  Martin Jambor  <mjambor@suse.cz>
100
101         PR bootstrap/41395
102         * tree-sra.c (is_va_list_type): New function.
103         (find_var_candidates): Call is_va_list_type.
104         (find_param_candidates): Check that the type or the type pointed
105         to are not va_list types.
106
107 2009-10-01  Martin Jambor  <mjambor@suse.cz>
108
109         PR c++/41503
110         * cp/pt.c (function_parameter_expanded_from_pack_p): Return false if
111         DECL_ARTIFICIAL (param_decl) is true.
112
113 2009-09-30  Gabriel Dos Reis  <gdr@cs.tamu.edu>
114
115         * tree.h (tree_decl_common::lang_flag_8): New.
116         * c-common.c (c_common_reswords): Include "constexpr" as C++0x
117         keyword.
118         * c-common.h (RID_CONSTEXPR): New.
119
120 2009-09-30  Uros Bizjak  <ubizjak@gmail.com>
121
122         * config/alpha/alpha.c (alpha_gimplify_va_arg_1):
123         Use ref-all pointers.
124         (alpha_gimplify_va_arg): Ditto.
125
126 2009-09-30  Jakub Jelinek  <jakub@redhat.com>
127
128         PR target/41279
129         * cfgloopanal.c (num_loop_insns): Don't increment ninsns for each bb
130         before insn counting loop now that BB_END (bb) is counted.  Ensure
131         the return value isn't zero.
132
133 2009-09-30  Nick Clifton  <nickc@redhat.com>
134
135         * config.gcc (sh-symbianelf): Replace definition of extra_objs
136         with separate definitions of c_target_objs and cxx_target_objs.
137         * config/sh/t-sh: Add rules to build symbian-cxx.o, symbian-c.o
138         and symbian-base.o.
139         * config/sh/sh.c (TARGET_CXX_INPUT_EXPORT_CLASS): Use
140         sh_symbian_import_export_class.
141         * config/sh/sh-protos.h: Fix names of exported symbian functions.
142         * config/sh/symbian.c: Delete, moving code into...
143         * config/sh/symbian-base.c: ... here
144         * config/sh/symbian-c.c: ... and here
145         * config/sh/symbian-cxx.c: ... and here.
146
147 2009-09-30  Uros Bizjak  <ubizjak@gmail.com>
148
149         PR target/22093
150         * config/alpha/alpha.md (unaligned_storehi_be): Force operand
151         of plus RTX into register.
152
153 2009-09-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
154
155         * doc/install.texi: Linguistic and markup fixes.
156         (Configuration) <--disable-cpp>: Remove description.
157         <--enable-maintainer-mode>: Autotools files are affected, too.
158         <--with-sysroot>: Improve description.
159         (Building): Bump required GNU make version.
160
161 2009-09-29  Harsha Jagasia  <harsha.jagasia@amd.com>
162
163         * config.gcc (i[34567]86-*-*): Include fma4intrin.h.
164         (x86_64-*-*): Ditto.
165
166         * config/i386/fma4intrin.h: New file, provide common x86 compiler
167         intrinisics for FMA4.
168         * config/i386/cpuid.h (bit_FMA4): Define FMA4 bit.
169         * config/i386/x86intrin.h: Fix typo to SSE4A instead of SSE4a.
170         Add FMA4 check and fma4intrin.h.
171         * config/i386/i386-c.c(ix86_target_macros_internal): Check
172         ISA_FLAG for FMA4.
173         * config/i386/i386.h(TARGET_FMA4): New macro for FMA4.
174         * config/i386/i386.md (UNSPEC_FMA4_INTRINSIC): Add new UNSPEC
175         constant for FMA4 support.
176         (UNSPEC_FMA4_FMADDSUB): Ditto.
177         (UNSPEC_FMA4_FMSUBADD): Ditto.
178         * config/i386/i386.opt (-mfma4): New switch for FMA4 support.
179         * config/i386/i386-protos.h (ix86_fma4_valid_op_p): Add declaration.
180         (ix86_expand_fma4_multiple_memory): Ditto.
181         * config/i386/i386.c (OPTION_MASK_ISA_FMA4_SET): New.
182         (OPTION_MASK_ISA_FMA4_UNSET): New.
183         (OPTION_MASK_ISA_SSE4A_UNSET): Change definition to depend on FMA4.
184         (OPTION_MASK_ISA_AVX_UNSET): Change definition to depend on FMA4.
185         (ix86_handle_option): Handle -mfma4.
186         (isa_opts): Handle -mfma4.
187         (enum pta_flags): Add PTA_FMA4.
188         (override_options): Add FMA4 support.
189         (IX86_BUILTIN_VFMADDSS): New for FMA4 intrinsic.
190         (IX86_BUILTIN_VFMADDSD): Ditto.
191         (IX86_BUILTIN_VFMADDPS): Ditto.
192         (IX86_BUILTIN_VFMADDPD): Ditto.
193         (IX86_BUILTIN_VFMSUBSS): Ditto.
194         (IX86_BUILTIN_VFMSUBSD): Ditto.
195         (IX86_BUILTIN_VFMSUBPS): Ditto.
196         (IX86_BUILTIN_VFMSUBPD): Ditto.
197         (IX86_BUILTIN_VFMADDSUBPS): Ditto.
198         (IX86_BUILTIN_VFMADDSUBPD): Ditto.
199         (IX86_BUILTIN_VFMSUBADDPS): Ditto.
200         (IX86_BUILTIN_VFMSUBADDPD): Ditto.
201         (IX86_BUILTIN_VFNMADDSS): Ditto.
202         (IX86_BUILTIN_VFNMADDSD): Ditto.
203         (IX86_BUILTIN_VFNMADDPS): Ditto.
204         (IX86_BUILTIN_VFNMADDPD): Ditto.
205         (IX86_BUILTIN_VFNMSUBSS): Ditto.
206         (IX86_BUILTIN_VFNMSUBSD): Ditto.
207         (IX86_BUILTIN_VFNMSUBPS): Ditto.
208         (IX86_BUILTIN_VFNMSUBPD): Ditto.
209         (IX86_BUILTIN_VFMADDPS256): Ditto.
210         (IX86_BUILTIN_VFMADDPD256): Ditto.
211         (IX86_BUILTIN_VFMSUBPS256): Ditto.
212         (IX86_BUILTIN_VFMSUBPD256): Ditto.
213         (IX86_BUILTIN_VFMADDSUBPS256): Ditto.
214         (IX86_BUILTIN_VFMADDSUBPD256): Ditto.
215         (IX86_BUILTIN_VFMSUBADDPS256): Ditto.
216         (IX86_BUILTIN_VFMSUBADDPD256): Ditto.
217         (IX86_BUILTIN_VFNMADDPS256): Ditto.
218         (IX86_BUILTIN_VFNMADDPD256): Ditto.
219         (IX86_BUILTIN_VFNMSUBPS256): Ditto.
220         (IX86_BUILTIN_VFNMSUBPD256): Ditto.
221         (enum multi_arg_type): New enum for describing the various FMA4
222         intrinsic argument types.
223         (bdesc_multi_arg): New table for FMA4 intrinsics.
224         (ix86_init_mmx_sse_builtins): Add FMA4 intrinsic support.
225         (ix86_expand_multi_arg_builtin): New function for creating FMA4
226         intrinsics.
227         (ix86_expand_builtin): Add FMA4 intrinsic support.
228         (ix86_fma4_valid_op_p): New function to validate FMA4 3 and 4
229         operand instructions.
230         (ix86_expand_fma4_multiple_memory): New function to split the
231         second memory reference from FMA4 instructions.
232         * config/i386/sse.md (ssemodesuffixf4): New mode attribute for FMA4.
233         (ssemodesuffixf2s): Ditto.
234         (fma4_fmadd<mode>4): Add FMA4 floating point multiply/add
235         instructions.
236         (fma4_fmsub<mode>4): Ditto.
237         (fma4_fnmadd<mode>4): Ditto.
238         (fma4_fnmsub<mode>4): Ditto.
239         (fma4_vmfmadd<mode>4): Ditto.
240         (fma4_vmfmsub<mode>4): Ditto.
241         (fma4_vmfnmadd<mode>4): Ditto.
242         (fma4_vmfnmsub<mode>4): Ditto.
243         (fma4_fmadd<mode>4256): Ditto.
244         (fma4_fmsub<mode>4256): Ditto.
245         (fma4_fnmadd<mode>4256): Ditto.
246         (fma4_fnmsub<mode>4256): Ditto.
247         (fma4_fmaddsubv8sf4): Ditto.
248         (fma4_fmaddsubv4sf4): Ditto.
249         (fma4_fmaddsubv4df4): Ditto.
250         (fma4_fmaddsubv2df4): Ditto.
251         (fma4_fmsubaddv8sf4): Ditto.
252         (fma4_fmsubaddv4sf4): Ditto.
253         (fma4_fmsubaddv4df4): Ditto.
254         (fma4_fmsubaddv2df4): Ditto.
255         (fma4i_fmadd<mode>4): Add FMA4 floating point multiply/add
256         instructions for intrinsics.
257         (fma4i_fmsub<mode>4): Ditto.
258         (fma4i_fnmadd<mode>4): Ditto.
259         (fma4i_fnmsub<mode>4): Ditto.
260         (fma4i_vmfmadd<mode>4): Ditto.
261         (fma4i_vmfmsub<mode>4): Ditto.
262         (fma4i_vmfnmadd<mode>4): Ditto.
263         (fma4i_vmfnmsub<mode>4): Ditto.
264         (fma4i_fmadd<mode>4256): Ditto.
265         (fma4i_fmsub<mode>4256): Ditto.
266         (fma4i_fnmadd<mode>4256): Ditto.
267         (fma4i_fnmsub<mode>4256): Ditto.
268         (fma4i_fmaddsubv8sf4): Ditto.
269         (fma4i_fmaddsubv4sf4): Ditto.
270         (fma4i_fmaddsubv4df4): Ditto.
271         (fma4i_fmaddsubv2df4): Ditto.
272         (fma4i_fmsubaddv8sf4): Ditto.
273         (fma4i_fmsubaddv4sf4): Ditto.
274         (fma4i_fmsubaddv4df4): Ditto.
275         (fma4i_fmsubaddv2df4): Ditto.
276
277         * doc/invoke.texi (-mfma4): Add documentation.
278         * doc/extend.texi (x86 intrinsics): Add FMA4 intrinsics.
279
280 2009-09-29  Richard Henderson  <rth@redhat.com>
281
282         * tree-eh.c (unsplit_eh): Do not unsplit if there's already
283         an edge to the new destination block.
284
285 2009-09-29  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
286
287         PR target/41393
288         * pa.c (hppa_profile_hook): Use
289         make_reg_eh_region_note_nothrow_nononlocal to add REG_EH_REGION note.
290
291 2009-09-29  Steve Ellcey  <sje@cup.hp.com>
292             Alexander Monakov  <amonakov@ispras.ru>
293
294         PR target/41365
295         * config/ia64/predicates.md (not_postinc_destination_operand): New.
296         (not_postinc_memory_operand): New.
297         (not_postinc_move_operand): New.
298         * config/ia64/ia64.md (*cmovdi_internal): Disallow autoincrement.
299         (*cmovsi_internal): Ditto.
300
301 2009-09-29  Pat Haugen  <pthaugen@us.ibm.com>
302
303         * config/rs6000/rs6000.c (rs6000_issue_rate): Don't artificially
304         restrict issue_rate in first pass when scheduling for register
305         pressure.
306
307 2009-09-29  Basile Starynkevitch  <basile@starynkevitch.net>
308             Rafael Avila de Espindola  <espindola@google.com>
309
310         * gengtype.c (plugin_output): New.
311         (get_output_file_with_visibility): Return plugin_output for plugins.
312         (main): Parse and use the -P option.
313         * gty.texi: Update the command line format.
314
315 2009-09-29  Jakub Jelinek  <jakub@redhat.com>
316
317         PR debug/41438
318         * dwarf2out.c (const_ok_for_output_1, const_ok_for_output): New
319         functions.
320         (mem_loc_descriptor, loc_descriptor, add_const_value_attribute): Bail
321         out if !const_ok_for_output.
322
323         PR debug/41474
324         * dwarf2out.c (mem_loc_descriptor) <case CONCAT, case CONCATN,
325         case VAR_LOCATION>: Remove gcc_unreachable ().
326
327 2009-09-29  Harsha Jagasia  <harsha.jagasia@amd.com>
328
329         * config.gcc (i[34567]86-*-*): Remove mmintrin-common.h.
330         (x86_64-*-*): Ditto.
331         * config/i386/smmintrin.h: Move instructions in mmintrin-common.h
332         back to smmintrin.h.
333         * config/i386/cpuid.h: (bit_SSE5): Remove SSE5 bit.
334         * config/i386/x86intrin.h: Remove SSE5.
335         * config/i386/mmintrin-common.h: Delete file.
336         * doc/extend.texi (x86 intrinsics): Remove SSE5 flags and builtins.
337
338 2009-09-29  Richard Guenther  <rguenther@suse.de>
339
340         * alias.c (ao_ref_from_mem): Properly deal with off decl accesses
341         resulting from stack temporaries on STRICT_ALIGNMENT targets.
342
343 2009-09-29  Nick Clifton  <nickc@redhat.com>
344
345         * function.c (current_function_name): If there is no current
346         function just return "<none>".
347
348 2009-09-28  Sriraman Tallam  <tmsriram@google.com>
349
350         * tree-pass.h (register_pass_info): New structure.
351         (pass_positioning_ops): Move enum from gcc-plugin.h.
352         (register_pass): New function.
353         * gcc-plugin.h (plugin_pass): Delete structure.
354         (pass_positioning_ops): Delete enum.
355         * plugin.c (regsiter_pass): Delete function.
356         (position_pass): Delete function.
357         (added_pass_nodes): Delete variable.
358         (prev_added_pass_nodes): Delete variable.
359         (pass_list_node): Delete structure.
360         * passes.c (make_pass_instance): New function.
361         (next_pass_1): Change to call make_pass_instance.
362         (pass_list_node): Move structure from gcc-plugin.h.
363         (added_pass_nodes): Move variable from plugin.c.
364         (prev_added_pass_nodes): Move variable from plugin.c.
365         (position_pass): New function.
366         (register_pass): New function.
367
368 2009-09-28  Easwaran Raman  <eraman@google.com>
369
370         * ifcvt.c (noce_try_abs): Recognize pattern and call
371         expand_one_cmpl_abs_nojump.
372         * optabs.c (expand_one_cmpl_abs_nojump): New function.
373         * optabs.h (expand_one_cmpl_abs_nojump): Declare.
374
375 2009-09-28  Ian Lance Taylor  <iant@google.com>
376
377         PR middle-end/40500
378         * c-opts.c (c_common_handle_option): Don't set
379         warn_jump_misses_init for -Wall.
380         * doc/invoke.texi (Warning Options): Update documentation.
381
382 2009-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
383
384         * Makefile.in ($(out_object_file)): Depend on
385         gt-$(basename $(notdir $(out_file))).h.
386
387 2009-09-28  Richard Henderson  <rth@redhat.com>
388
389         * except.h (struct eh_region_d): Add use_cxa_end_cleanup.
390         * except.c (gen_eh_region): Set it.
391         (duplicate_eh_regions_1): Copy it.
392         * tree-eh.c (lower_resx): Use it to determine which function
393         to call to resume.
394
395         * langhooks.h (struct lang_hooks): Add eh_use_cxa_end_cleanup.
396         * langhooks-def.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
397         * builtins.def (BUILT_IN_CXA_END_CLEANUP): New.
398         * tree.c (build_common_builtin_nodes): Remove parameter.  Build
399         BUILT_IN_CXA_END_CLEANUP if necessary.
400
401         * c-common.c (c_define_builtins): Update call to
402         build_common_builtin_nodes.
403
404 2009-09-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
405
406         * spu.c (get_branch_target): Return NULL for ASM_OPERANDS patterns.
407
408 2009-09-28  Michael Matz  <matz@suse.de>
409
410         * builtins.c (interclass_mathfn_icode): New helper.
411         (expand_builtin_interclass_mathfn): Use it here, and split folding
412         into ...
413         (fold_builtin_interclass_mathfn): ... this new folder.
414         (build_call_nofold_loc): New static helper.
415         (build_call_nofold): New wrapper macro for above.
416         (expand_builtin_int_roundingfn): Use it instead of build_call_expr.
417         (expand_builtin_pow): Ditto.
418         (expand_builtin_memset_args): Ditto.
419         (expand_builtin_printf): Ditto.
420         (expand_builtin_fprintf): Ditto.
421         (expand_builtin_sprintf): Ditto.
422         (expand_builtin_memory_chk): Ditto.
423         (expand_builtin_mempcpy_args): Ditto and don't call folders.
424         (expand_builtin_stpcpy): Ditto.
425         (expand_builtin_strcmp): Ditto.
426         (expand_builtin_strncmp): Ditto.
427         (expand_builtin_strcpy): Remove FNDECL and MODE arguments.
428         (expand_builtin_strcpy_args): Don't call folders.
429         (expand_builtin_memcmp): Ditto.
430         (expand_builtin_strncpy): Ditto, and use target.
431         (expand_builtin_memcpy): Ditto.
432         (expand_builtin_strstr, expand_builtin_strchr, expand_builtin_strrchr,
433         expand_builtin_strpbrk, expand_builtin_memmove,
434         expand_builtin_memmove_args, expand_builtin_bcopy,
435         expand_builtin_memchr, expand_builtin_strcat, expand_builtin_strncat,
436         expand_builtin_strspn, expand_builtin_strcspn,
437         expand_builtin_fputs): Remove these.
438         (expand_builtin): Don't call the above, change calls to other
439         expanders that changed prototype.
440         (fold_builtin_stpcpy): New folder split out from expand_builtin_stpcpy.
441         (fold_builtin_1 <ISFINITE, ISINF, ISNORMAL>): Call
442         fold_builtin_interclass_mathfn.
443         (fold_builtin_2 <STPCPY>): Call fold_builtin_stpcpy.
444         (fold_builtin_strcat): Add folding split from expand_builtin_strcat.
445
446         * fold-const.c (fold_binary_loc <NE_EXPR>): Add !exp != 0 -> !exp.
447         * passes.c (init_optimization_passes): Move pass_fold_builtins
448         after last phiopt pass.
449         * tree-inline.c (fold_marked_statements): When folding builtins
450         iterate over all instruction potentially generated.
451         * tree-ssa-ccp.c (gimplify_and_update_call_from_tree): Declare
452         earlier.
453         (fold_gimple_call): Use it to always fold calls (into potentially
454         multiple instructions).
455         * tree-ssa-dom.c (optimize_stmt): Resolve __builtin_constant_p
456         calls into zero at this time.
457         * tree-ssa-propagate.c (substitute_and_fold): Ignore multiple
458         statements generated by builtin folding.
459
460 2009-09-28  Nick Clifton  <nickc@redhat.com>
461
462         * config/m32r/m32r.c (m32r_is_insn): Return false for debugging
463         insns.
464
465 2009-09-28  Duncan Sands  <baldrick@free.fr>
466
467         * gcc-plugin.h (PLUGIN_REGISTER_GGC_CACHES): New event.
468         * plugin.c (plugin_event_name): Add PLUGIN_REGISTER_GGC_CACHES.
469         (register_callback): Dispatch it.
470         (invoke_plugin_callbacks): Incorporate in sanity check.
471         * ggc.h (ggc_register_cache_tab): Add declaration.
472         * ggc-common.c (ggc_register_root_tab): Simplify.
473         (const_ggc_cache_tab_t): New typedef.
474         (extra_cache_vec): New vector of dynamically added cache tables.
475         (ggc_register_cache_tab): New function.
476         (ggc_scan_cache_tab): New function.
477         (ggc_mark_roots): Simplify dynamic roots.  Handle dynamic caches.
478         * doc/plugins.texi: Document PLUGIN_REGISTER_GGC_CACHES.
479
480 2009-09-27  Richard Henderson  <rth@redhat.com>
481
482         * tree-ssa-ccp.c (optimize_stack_restore): Relax the conditions under
483         which we remove __builtin_stack_restore.
484
485 2009-09-27  Bernd Schmidt  <bernd.schmidt@analog.com>
486
487         * loop-iv.c (iv_analyze_op): Use function_invariant_p, not CONSTANT_P,
488         to test for GRD_INVARIANT.
489         (simple_rhs_p): Anything that's function_invariant_p is fine.
490
491 2009-09-27  Rafael Avila de Espindola  <espindola@google.com>
492
493         * gengtype.c (main): Use plunge_files instead of plugin_output.
494
495 2009-09-27  Basile Starynkevitch  <basile@starynkevitch.net>
496             Rafael Avila de Espindola  <espindola@google.com>
497
498         * gengtype.c (write_root, write_roots): Add a emit_pch argument.
499         Don't print pch related info if it is false.
500         (main): Don't print pch info in plugin mode.
501
502 2009-09-27  Eric Botcazou  <ebotcazou@adacore.com>
503
504         * dwarf2out.c (enum dw_val_class): Replace dw_val_class_long_long
505         with dw_val_class_const_double.
506         (struct dw_val_struct): Replace val_long_long with val_double and
507         adjust for above change.
508         (output_loc_operands): Likewise.
509         (add_AT_long_long): Rename into...
510         (add_AT_double): ...this.
511         (print_die): Replace dw_val_class_long_long with
512         dw_val_class_const_double and adjust.
513         (attr_checksum): Likewise.
514         (same_dw_val_p): Likewise.
515         (size_of_die): Likewise.
516         (value_format): Likewise.
517         (output_die): Likewise.
518         (loc_descriptor) <CONST_DOUBLE>: Likewise.
519         (add_const_value_attribute) <CONST_DOUBLE>: Call add_AT_double
520         instead of add_AT_long_long.
521         (add_bound_info) <INTEGER_CST>: Generate the bound as an unsigned
522         value with the precision of its type.
523
524 2009-09-27  Andreas Schwab  <schwab@linux-m68k.org>
525
526         PR c/41476
527         * c-typeck.c (build_conditional_expr): Use the readonly and
528         volatile flags of the operand types, not of the operands itself.
529
530 2009-09-27  Peter O'Gorman  <pogma@thewrittenword.com>
531
532         collect2.c (main): Look for -brtl before adding libraries.
533
534 2009-09-27  Jonathan Gray  <jsg@openbsd.org>
535
536         * config.gcc: Update OpenBSD targets.
537         * config/openbsd-stdint.h: New file.
538         * config/openbsd-libpthread.h: New file.
539         * config/openbsd.h: Update and break out LIB_SPEC definition.
540         * config/alpha/openbsd.h: Overhaul to reflect ELF migration.
541         * config/i386/openbsdelf.h: Correct types.
542         * config/m68k/openbsd.h: Likewise.
543         * config/mips/openbsd.h: Likewise.
544         * config/vax/openbsd.h: Likewise.
545
546 2009-09-27  Eric Botcazou  <ebotcazou@adacore.com>
547
548         * fold-const.c (maybe_lvalue_p): Return false for M(IN|AX)_EXPR.
549         (extract_muldiv_1) <MINUS_EXPR>: Swap operands if necessary.
550         * stor-layout.c (layout_type) <ARRAY_TYPE>: Do not take the maximum
551         of the length and zero.
552
553 2009-09-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
554
555         * Makefile.in (TOPLEV_H): Use $(INPUT_H) not input.h.
556         (FLAGS_H): Add options.h $(REAL_H).
557         (SEL_SCHED_IR_H): Add $(BITMAP_H) vecprim.h $(CFGLOOP_H).
558         (TREE_VECTORIZER_H): New.
559         (EBITMAP_H): Renamed from EBIMAP_H.
560         (c-decl.o, c-objc-common.o, c-pretty-print.o, attribs.o, c-omp.o)
561         (gtype-desc.o, ggc-common.o, ggc-page.o, ggc-zone.o, langhooks.o)
562         (tree.o, tree-ssa-structalias.o, tree-ssa-ter.o, tree-ssanames.o)
563         (tree-phinodes.o, tree-ssa-loop.o, tree-ssa-math-opts.o)
564         (gimple-low.o, omp-low.o, sese.o, graphite-blocking.o)
565         (graphite-clast-to-gimple.o, graphite-dependences.o)
566         (graphite-interchange.o, graphite-poly.o, graphite-scop-detection.o)
567         (graphite-sese-to-poly.o, tree-vect-loop.o, tree-vect-loop-manip.o)
568         (tree-vect-patterns.o, tree-vect-slp.o, tree-vect-stmts.o)
569         (tree-vect-data-refs.o, tree-vectorizer.o, gimple.o, tree-mudflap.o)
570         (targhooks.o, stmt.o, emit-rtl.o, ipa.o, matrix-reorg.o, ipa-inline.o)
571         (gcse.o, tree-ssa-ccp.o, df-byte-scan.o, vec.o, caller-save.o)
572         (ira-build.o, ira-costs.o, ira-color.o, ira-emit.o, ira.o)
573         (haifa-sched.o, sched-rgn.o, sel-sched.o, sel-sched-dump.o)
574         (sel-sched-ir.o, final.o, $(out_object_file)): Dependencies
575         updated and fixed as per above changes and per
576         check_makefile_deps.sh output.
577
578         PR bootstrap/40928
579         * configure.ac: Use $LIBS for '-ldl', not $LDFLAGS.
580         * configure: Regenerate.
581
582 2009-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
583
584         * doc/install.texi: Update minimum MPC version to 0.7.
585
586 2009-09-26  Gerald Pfeifer  <gerald@pfeifer.com>
587
588         * doc/install.texi (Binaries): Remove reference to the binary
589         distribution CD-ROM from the FSF.
590
591 2009-09-26  Michael Matz  <matz@suse.de>
592
593         PR lto/40758
594         PR middle-end/41470
595         * tree-ssa-coalesce.c (coalesce_ssa_name): Add only SSA names
596         that are mentioned in the body.
597
598 2009-09-26  Michael Matz  <matz@suse.de>
599
600         PR tree-optimization/41454
601         * tree-ssa-dom (stmts_to_rescan): Remove variable.
602         (tree_ssa_dominator_optimize): Don't allocate and free it.
603         (dom_opt_leave_block): Don't iterate over it.
604         (eliminate_redundant_computations): Don't return a value.
605         (cprop_operand, cprop_into_stmt): Ditto.
606         (optimize_stmt): Don't defer updating stmts.
607
608 2009-09-25  Dodji Seketeli  <dodji@redhat.com>
609
610         * dwarf2out.c (dwarf_tag_name, gen_generic_params_dies,
611         generic_parameter_die, template_parameter_pack_die,
612         gen_formal_parameter_die, gen_subprogram_die): Adjust after renaming
613         DW_TAG_formal_parameter_pack and DW_TAG_template_parameter_pack into
614         DW_TAG_GNU_formal_parameter_pack and DW_TAG_GNU_template_parameter_pack.
615
616 2009-09-25  Anatoly Sokolov  <aesok@post.ru>
617
618         * config/v850/v850.h (FUNCTION_VALUE): Remove.
619         * config/v850/v850.c (v850_function_value): New function.
620         (TARGET_FUNCTION_VALUE): Define.
621
622 2009-09-25  Jakub Jelinek  <jakub@redhat.com>
623
624         * tree-vect-stmts.c (vectorizable_call): Call
625         mark_symbols_for_renaming after vect_finish_stmt_generation.
626
627         * dwarf2out.c (tls_mem_loc_descriptor): Pass 1 instead of 2
628         to loc_descriptor_from_tree.
629         (add_location_or_const_value_attribute): Pass 0 instead of 2
630         for decl_by_reference_p decls.
631
632 2009-09-25  Richard Guenther  <rguenther@suse.de>
633
634         PR middle-end/41463
635         * tree-dfa.c (get_ref_base_and_extent): Fix issue with trailing
636         arrays again.
637
638 2009-09-25  Ben Elliston  <bje@au.ibm.com>
639
640         * doc/invoke.texi (RS/6000 and PowerPC Options): Add missing comma
641         after `power7'.
642
643 2009-09-25  Alan Modra  <amodra@bigpond.net.au>
644
645         * config/rs6000/rs6000.md (load_toc_v4_PIC_3c): Correct POWER
646         form of instruction.
647
648 2009-09-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
649
650         PR middle-end/41435
651         * fold-const.c (const_binop): Handle complex int division.
652         * tree-complex.c (expand_complex_div_straight,
653         expand_complex_div_wide): Update comments.
654
655 2009-09-24  DJ Delorie  <dj@redhat.com>
656
657         PR target/41456
658         * config/m32c/m32c.h (REG_CLASS_CONTENTS): Add R13.
659         (reg_class): Likewise.
660         (REG_CLASS_NAMES): Likewise.
661         * config/m32c/m32c.c (m32c_reg_class_from_constraint): Likewise.
662
663         * config/m32c/m32c.c (m32c_override_options): Disable -fivopts for
664         M32C.
665
666 2009-09-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
667
668         * config/rs6000/predicates.md (indexed_or_indirect_operand):
669         Delete VSX load/store with update support.
670         * config/rs6000/rs6000.c (rs6000_legitimate_address_p): Ditto.
671         * config/rs6000/vsx.md (vsx_mov<mode>): Ditto.
672         (vsx_movti): Ditto.
673         (VSX_U): Delete.
674         (VSbit): Ditto.
675         (VStype_load_update): Ditto.
676         (VStype_store_update): Ditto.
677         (vsx_load<VSX_U:mode>_update_<P:mptrsize>): Ditto.
678         (vsx_store<VSX_U:mode>_update_<P:mptrsize>): Ditto.
679
680         * config/rs6000/rs6000.h (enum rs6000_builtins): Delete VSX
681         load/store with update builtins.
682
683 2009-09-24  Kai Tietz  <kai.tietz@onevision.com>
684
685         * libgcc2.c (L_trampoline): Prototype for getpagesize
686         and mprotect in WINNT case.
687
688 2009-09-24  Anatoly Sokolov  <aesok@post.ru>
689
690         * config/rs6000/rs6000.h (FUNCTION_VALUE): Remove macro.
691         * config/rs6000/rs6000-protos.h (rs6000_function_value): Remove.
692         * config/rs6000/rs6000.c (rs6000_function_value): Make static, add
693         'outgoing' argument.
694         (TARGET_FUNCTION_VALUE): Define.
695
696 2009-09-24  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
697
698         * config/darwin.h (DWARF2_DEBUGGING_INFO): Define as 1.
699
700 2009-09-24  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
701
702         PR bootstrap/41405
703         * common.opt: Initialize dwarf_strict to -1.
704         * toplev.c (process_options): Catch unset dwarf_strict
705         and set to 0 for all targets not overriding.
706         * config/darwin.c (darwin_override_options): Catch unset
707         dwarf_strict and override to 1.
708
709 2009-09-24  Jeff Law  <law@redhat.com>
710
711         * tree-into-ssa.c (rewrite_into_ssa): Free interesting_blocks.
712
713 2009-09-24  Richard Guenther  <rguenther@suse.de>
714
715         PR tree-optimization/36143
716         PR tree-optimization/38747
717         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Only
718         create VIEW_CONVERT_EXPRs for TBAA compatible accesses.
719
720 2009-09-24  Jakub Jelinek  <jakub@redhat.com>
721
722         PR bootstrap/41457
723         * dwarf2out.c (add_const_value_attribute): For HIGH and CONST_FIXED,
724         return false instead of gcc_unreachable ().  For CONST return the
725         value returned by recursive call instead of always returning true.
726         (tree_add_const_value_attribute): Return the value returned by
727         add_const_value_attribute instead of always returning true if rtl
728         is non-NULL.
729
730 2009-09-23  Justin Seyster  <jrseys@gmail.com>
731
732         * Makefile.in (PLUGIN_HEADERS): Include real.h.
733
734 2009-09-24  Jakub Jelinek  <jakub@redhat.com>
735
736         * cgraphunit.c (cgraph_lower_function): Revert last change.
737         * targhooks.c (default_static_chain): Use !DECL_STATIC_CHAIN
738         instead of DECL_NO_STATIC_CHAIN.
739         * tree-cfg.c (verify_gimple_call): Likewise.
740         * tree-nested.c (get_chain_decl, get_chain_field,
741         convert_tramp_reference_op, convert_gimple_call): Likewise.
742         (convert_all_function_calls): Likewise.  Always set or clear
743         DECL_STATIC_CHAIN initially, for !n->outer clear it.
744         (lower_nested_functions): Remove DECL_NO_STATIC_CHAIN checking code.
745         * c-parser.c (c_parser_declaration_or_fndef): Set DECL_STATIC_CHAIN
746         if nested.
747         * print-tree.c (print_node): Handle DECL_STATIC_CHAIN instead of
748         DECL_NO_STATIC_CHAIN.
749         * config/i386/i386.c (ix86_static_chain): Use !DECL_STATIC_CHAIN
750         instead of DECL_NO_STATIC_CHAIN.
751         (ix86_function_regparm, find_drap_reg): Likewise.  Don't test
752         decl_function_context.
753         * varasm.c (initializer_constant_valid_p): Likewise.
754         * tree.h (DECL_NO_STATIC_CHAIN): Renamed to ...
755         (DECL_STATIC_CHAIN): ... this.
756         * config/moxie/moxie.c (moxie_static_chain): Use !DECL_STATIC_CHAIN
757         instead of DECL_NO_STATIC_CHAIN.
758
759 2009-09-23  Basile Starynkevitch  <basile@starynkevitch.net>
760             Rafael Avila de Espindola  <espindola@google.com>
761
762         * gengtype.c (nb_plugin_files): Make it unsigned to match
763         num_gt_files. Adjust other variables to avoid warnings.
764         (main): Allocate an all zero lang_bitmap before each plugin file name
765         to match regular file names.
766
767 2009-09-23  Richard Henderson  <rth@redhat.com>
768
769         * doc/tm.texi (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
770         (TARGET_STATIC_CHAIN): Mention that this hook must be used for
771         static chain passed in memory.
772         * system.h (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Poison.
773         * targhooks.c (default_static_chain): Don't handle STATIC_CHAIN,
774         STATIC_CHAIN_INCOMING.  Issue a sorry if there's no
775         STATIC_CHAIN_REGNUM defined.
776
777         * config/picochip/picochip-protos.h: s/class/klass/.
778         * config/picochip/picochip.c (TARGET_STATIC_CHAIN): New.
779         (picochip_static_chain): New.
780         * config/picochip/picochip.h (STATIC_CHAIN): Remove.
781         (STATIC_CHAIN_INCOMING): Remove.
782
783         * config/xtensa/xtensa.c (TARGET_STATIC_CHAIN): New.
784         (xtensa_static_chain): New.
785         * config/xtensa/xtensa.h (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
786
787 2009-09-23  Anatoly Sokolov  <aesok@post.ru>
788
789         * config/pa/pa.h (FUNCTION_VALUE): Remove macro.
790         * config/pa/pa-protos.h (function_value): Remove.
791         * config/pa/pa.c (pa_function_value): Rename from function_value.
792         Make static, add 'outgoing' argument.
793         (TARGET_FUNCTION_VALUE): Define.
794
795 2009-09-23  Anatoly Sokolov  <aesok@post.ru>
796
797         * config/avr/avr.c (avr_regs_to_save): Use current_function_is_leaf
798         instead of cfun->machine->is_leaf.
799         * config/avr/avr.h (machine_function): Remove is_leaf field.
800
801 2009-09-23  Jakub Jelinek  <jakub@redhat.com>
802
803         PR debug/41439
804         * dwarf2out.c (address_of_int_loc_descriptor): Don't emit
805         DW_OP_piece after DW_OP_stack_value, adjust size calculations
806         for it, when DW_OP_stack_value and DW_OP_implicit_value has
807         the same size, prefer DW_OP_stack_value.
808         (loc_descriptor, loc_list_for_address_of_addr_expr_of_indirect_ref,
809         loc_list_from_tree): Don't emit DW_OP_piece after DW_OP_stack_value.
810
811 2009-09-23  Alexandre Oliva  <aoliva@redhat.com>
812
813         PR debug/41353
814         * var-tracking.c (add_with_sets): Sort MO_VAL_LOC last among uses.
815
816 2009-09-23  Alexandre Oliva  <aoliva@redhat.com>
817
818         PR debug/41248
819         * cfgexpand.c (convert_debug_memory_address): New.
820         (expand_debug_expr): Convert base address and offset to the same
821         mode.  Use it to convert addresses to other modes.  Accept
822         ptr_mode addresses.
823
824 2009-09-23  Richard Guenther  <rguenther@suse.de>
825
826         * alias.c (ao_ref_from_mem): Correct for negative MEM_OFFSET
827         produced for bigendian targets with promoted subregs.
828
829 2009-09-23  Richard Guenther  <rguenther@suse.de>
830
831         * value-prof.c (gimple_ic): Purge old EH edges only after building
832         the new ones.
833
834 2009-09-23  Nick Clifton  <nickc@redhat.com>
835
836         * config/arc/arc.c (arc_trampoline_init): Fix typo.
837
838 2009-09-23  Jakub Jelinek  <jakub@redhat.com>
839
840         PR bootstrap/41405
841         * doc/invoke.texi: Document -gstrict-dwarf and -gno-strict-dwarf.
842
843         PR bootstrap/41436
844         * cgraphunit.c (cgraph_lower_function): Set DECL_NO_STATIC_CHAIN
845         on non-nested functions.
846
847 2009-09-23  Jakub Jelinek  <jakub@redhat.com>
848             Jan Hubicka  <jh@suse.cz>
849
850         * dwarf2out.c (loc_list_plus_const): Only define if
851         DWARF2_DEBUGGING_INFO.
852         (address_of_int_loc_descriptor): Likewise.
853
854         PR debug/41411
855         * dwarf2out.c (mem_loc_descriptor): Handle HIGH.
856
857 2009-09-23  Uros Bizjak  <ubizjak@gmail.com>
858
859         PR c/39779
860         * c-typeck.c (build_binary_op) <short_shift>: Check that integer
861         constant is more than zero.
862
863 2009-09-23  Alan Modra  <amodra@bigpond.net.au>
864
865         PR target/40473
866         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't
867         call final to emit non-scheduled prologue, instead insert at entry.
868
869 2009-09-22  Loren J. Rittle  <ljrittle@acm.org>
870             Joseph S. Myers  <joseph@codesourcery.com>
871
872         * doc/install.texi (*-*-freebsd*): Add proper format codes.
873
874 2009-09-22  Basile Starynkevitch  <basile@starynkevitch.net>
875             Rafael Avila de Espindola  <espindola@google.com>
876
877         * gengtype.c (is_file_equal): New function.
878         (close_output_files): Use is_file_equal. Free of->buf.
879
880 2009-09-22  Basile Starynkevitch  <basile@starynkevitch.net>
881             Rafael Avila de Espindola  <espindola@google.com>
882
883         * gengtype.c (write_types, write_local): Add the output_header
884         argument. Update all callers.
885
886 2009-09-22  Dodji Seketeli  <dodji@redhat.com>
887
888         * dwarf2out.c (template_parameter_pack_die,
889         gen_formal_parameter_pack_die ): New functions.
890         (make_ith_pack_parameter_name): Remove this function.
891         (dwarf_tag_name): Support printing DW_TAG_template_parameter_pack and
892         DW_TAG_formal_parameter_pack.
893         (gen_generic_params_dies): Represent each template parameter pack
894         by a DW_TAG_template_parameter_pack DIE. Argument pack elements are
895         represented by usual DW_TAG_template_*_parameter DIEs that are
896         children of the DW_TAG_template_parameter_pack element DIE.
897         (generic_parameter_die): This doesn't deal with parameter pack
898         names anymore. Don't generate DW_AT_name for some DIEs, e.g. children
899         of parameter pack DIEs.
900         (gen_formal_parameter_die): Add a flag to not emit DW_AT_name
901         in certain cases, e.g. for pack elements.
902         (gen_formal_types_die, gen_decl_die): Adjust usage of
903         gen_formal_parameter_die.
904         (gen_subprogram_die): Represent each function parameter pack by a
905         DW_TAG_formal_parameter_pack DIE. Arguments of of the pack are
906         represented by usual DW_TAG_formal_parameter DIEs that are children
907         of the DW_TAG_formal_parameter_pack DIE. Remove references to
908         ____builtin_va_alist decls as no part of the compiler uses those
909         anymore.
910         * langhooks.h (struct lang_hooks_for_decls): Add
911         function_parm_expanded_from_pack_p, get_generic_function_decl
912         and function_parameter_pack_p hooks.  Fix comment for
913         get_innermost_generic_parms hook.
914         * langhooks-def.h (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P,
915         LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P ): Declare new hook
916         macros and use them to initialize lang_hook.
917
918 2009-09-22  Richard Henderson  <rth@redhat.com>
919
920         * system.h (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE): Poison.
921         (TRAMPOLINE_ADJUST_ADDRESS): Poison.
922         * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): Don't conditionalize
923         on TRAMPOLINE_TEMPLATE.
924         (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Don't conditionalize on
925         TRAMPOLINE_ADJUST_ADDRESS.
926         * targhooks.c (default_asm_trampoline_template): Remove.
927         (default_trampoline_adjust_address): Remove.
928         (default_trampoline_init): Don't handle INITIALIZE_TRAMPOLINE.
929         * targhooks.h: Update decls.
930
931 2009-09-22  Dave Korn  <dave.korn.cygwin@gmail.com>
932
933         * config/i386/cygming.h (TARGET_USE_JCR_SECTION): Enable.
934         * config/i386/cygwin.h (LIBGCJ_SONAME): Define.
935         * config/i386/mingw32.h (LIBGCJ_SONAME): Likewise.
936
937 2009-09-22  Alexandre Oliva  <aoliva@redhat.com>
938
939         PR debug/41295
940         * reload1.c (reload): Reset debug insns with pseudos without
941         equivalences.
942
943 2009-09-22  Janis Johnson  <janis187@us.ibm.com>
944
945         * config/i386/i386.c (ix86_scalar_mode_supported_p): Don't return
946         unconditional true for decimal float modes.
947         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Ditto.
948         * config/s390/s390.c (s390_scalar_mode_supported_p): Ditto.
949
950 2009-09-22  Loren J. Rittle  <ljrittle@acm.org>
951
952         * unwind-dw2-fde-glibc.c: Define and use USE_PT_GNU_EH_FRAME.
953         Enable a new case for __FreeBSD__ >= 7.
954         * crtstuff.c:  Define USE_PT_GNU_EH_FRAME for __FreeBSD__ >= 7.
955         * config/t-freebsd: Define LIB2ADDEH and LIB2ADDEHDEP.
956         * config/freebsd-spec.h: Conditionally define LINK_EH_SPEC
957         and USE_LD_AS_NEEDED.
958
959         * doc/install.texi (*-*-freebsd*): Update target information.
960
961 2009-09-22  Richard Guenther  <rguenther@suse.de>
962
963         PR middle-end/41395
964         * tree-dfa.c (get_ref_base_and_extent): Handle trailing
965         arrays really properly.
966
967 2009-09-22  Richard Henderson  <rth@redhat.com>
968
969         PR target/41246
970         * target.h (struct gcc_target): Add asm_out.trampoline_template,
971         calls.static_chain, calls.trampoline_init,
972         calls.trampoline_adjust_address.
973         * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
974         (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
975         (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
976         * builtins.c (expand_builtin_setjmp_receiver): Use
977         targetm.calls.static_chain; only clobber registers.
978         (expand_builtin_init_trampoline): Use targetm.calls.trampoline_init;
979         set up memory attributes properly for the trampoline block.
980         (expand_builtin_adjust_trampoline): Use
981         targetm.calls.trampoline_adjust_address.
982         * calls.c (prepare_call_address): Add fndecl argument.  Use
983         targetm.calls.static_chain.
984         * df-scan.c (df_need_static_chain_reg): Remove.
985         (df_get_entry_block_def_set): Use targetm.calls.static_chain;
986         consolodate static chain handling.
987         * doc/tm.texi: Document new hooks.
988         * emit-rtl.c (static_chain_rtx, static_chain_incoming_rtx): Remove.
989         (init_emit_regs): Don't initialize them.
990         * expr.h (prepare_call_address): Update decl.
991         * final.c (profile_function): Use targetm.calls.static_chain.
992         * function.c (expand_function_start): Likewise.
993         * rtl.h (static_chain_rtx, static_chain_incoming_rtx): Remove.
994         * stmt.c (expand_nl_goto_receiver): Use targetm.calls.static_chain;
995         only clobber registers.
996         * targhooks.c (default_static_chain): New.
997         (default_asm_trampoline_template, default_trampoline_init): New.
998         (default_trampoline_adjust_address): New.
999         * targhooks.h: Declare them.
1000         * varasm.c (assemble_trampoline_template): Use
1001         targetm.asm_out.trampoline_template.  Make the memory block const
1002         and set its size.
1003
1004         * config/alpha/alpha.c (alpha_trampoline_init): Rename from
1005         alpha_initialize_trampoline.  Make static.  Merge VMS parameter
1006         differences into the TARGET_ABI_OPEN_VMS code block.
1007         (TARGET_TRAMPOLINE_INIT): New.
1008         * config/alpha/alpha.h (TRAMPOLINE_TEMPLATE): Remove.
1009         (TRAMPOLINE_SECTION, INITIALIZE_TRAMPOLINE): Remove.
1010         * config/alpha/vms.h (TRAMPOLINE_SIZE, TRAMPOLINE_ALIGNMENT): Remove.
1011         (INITIALIZE_TRAMPOLINE): Remove.
1012
1013         * config/arc/arc.h (TRAMPOLINE_ALIGNMENT): New.
1014         (TRAMPOLINE_TEMPLATE): Merge with ...
1015         (INITIALIZE_TRAMPOLINE): ... this and move ...
1016         * config/arc/arc.c (arc_trampoline_init): ... here.
1017         (TARGET_TRAMPOLINE_INIT): New.
1018
1019         * config/arm/arm.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1020         (TARGET_TRAMPOLINE_INIT, TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
1021         (arm_asm_trampoline_template): New.
1022         (arm_trampoline_init, arm_trampoline_adjust_address): New.
1023         * config/arm/arm.h (TRAMPOLINE_TEMPLATE, ARM_TRAMPOLINE_TEMPLATE,
1024         THUMB2_TRAMPOLINE_TEMPLATE, THUMB1_TRAMPOLINE_TEMPLATE): Move all
1025         code to arm_asm_trampoline_template.
1026         (TRAMPOLINE_ADJUST_ADDRESS): Move code to
1027         arm_trampoline_adjust_address.
1028         (INITIALIZE_TRAMPOLINE): Move code to arm_trampoline_init;
1029         adjust for target hook parameters.
1030
1031         * config/avr/avr.h (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE):
1032         Remove.
1033
1034         * config/bfin/bfin-protos.h (initialize_trampoline): Remove.
1035         * config/bfin/bfin.c (bfin_asm_trampoline_template): New.
1036         (bfin_trampoline_init): Rename from initialize_trampoline;
1037         make static; update for target hook parameters.
1038         (TARGET_ASM_TRAMPOLINE_TEMPLATE, TARGET_TRAMPOLINE_INIT): New.
1039         * config/bfin/bfin.h (TRAMPOLINE_TEMPLATE): Move code to
1040         bfin_asm_trampoline_template.
1041         (INITIALIZE_TRAMPOLINE): Remove.
1042
1043         * config/cris/cris.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
1044         TARGET_TRAMPOLINE_INIT, cris_asm_trampoline_template,
1045         cris_trampoline_init): New.
1046         * config/cris/cris.h (TRAMPOLINE_TEMPLATE): Move code to
1047         cris_asm_trampoline_template.
1048         (INITIALIZE_TRAMPOLINE): Move code to cris_trampoline_init;
1049         adjust for target hook parameters.
1050
1051         * config/crx/crx.h (INITIALIZE_TRAMPOLINE): Remove.
1052
1053         * config/fr30/fr30.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
1054         TARGET_TRAMPOLINE_INIT, fr30_asm_trampoline_template,
1055         fr30_trampoline_init): New.
1056         * config/fr30/fr30.h (TRAMPOLINE_TEMPLATE): Move code to
1057         fr30_asm_trampoline_template.
1058         (INITIALIZE_TRAMPOLINE): Move code to fr30_trampoline_init;
1059         adjust for target hook parameters.
1060
1061         * config/frv/frv.c (TARGET_TRAMPOLINE_INIT): New.
1062         (frv_trampoline_init): Rename from frv_initialize_trampoline;
1063         make static, adjust arguments for TARGET_TRAMPOLINE_INIT hook.
1064         * config/frv/frv.h (INITIALIZE_TRAMPOLINE): Remove.
1065         * config/frv/frv-protos.h (frv_initialize_trampoline): Remove.
1066
1067         * config/h8300/h8300.c (h8300_trampoline_init): New.
1068         (TARGET_TRAMPOLINE_INIT): New.
1069         * config/h8300/h8300.h (INITIALIZE_TRAMPOLINE): Move code
1070         to h8300_trampoline_init and adjust for hook parameters.
1071
1072         * config/ia64/ia64-protos.h (ia64_initialize_trampoline): Remove.
1073         * config/ia64/ia64.c (TARGET_TRAMPOLINE_INIT): New.
1074         (ia64_trampoline_init): Rename from ia64_initialize_trampoline;
1075         make static; adjust for hook parameters.
1076         * config/ia64/ia64.h (INITIALIZE_TRAMPOLINE): Remove.
1077
1078         * config/iq2000/iq2000.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1079         (TARGET_TRAMPOLINE_INIT): New.
1080         (iq2000_asm_trampoline_template, iq2000_trampoline_init): New.
1081         * config/iq2000/iq2000.h (TRAMPOLINE_TEMPLATE): Move code to
1082         iq2000_asm_trampoline_template.
1083         (INITIALIZE_TRAMPOLINE): Move code to iq2000_trampoline_init.
1084         (TRAMPOLINE_CODE_SIZE): New.
1085         (TRAMPOLINE_SIZE): Use it.
1086         (TRAMPOLINE_ALIGNMENT): Follow Pmode.
1087
1088         * config/m32c/m32c-protos.h (m32c_initialize_trampoline): Remove.
1089         * config/m32c/m32c.c (TARGET_TRAMPOLINE_INIT): New.
1090         (m32c_trampoline_init): Rename from m32c_initialize_trampoline;
1091         adjust for hook parameters.
1092         * config/m32c/m32c.h (INITIALIZE_TRAMPOLINE): Remove.
1093
1094         * config/m32r/m32r.c (TARGET_TRAMPOLINE_INIT): New.
1095         (m32r_trampoline_init): New.
1096         * config/m32r/m32r.h (INITIALIZE_TRAMPOLINE): Move code to
1097         m32r_trampoline_init.
1098
1099         * config/m68hc11/m68hc11.c (TARGET_TRAMPOLINE_INIT): New.
1100         (m68hc11_trampoline_init): Rename from m68hc11_initialize_trampoline;
1101         make static; update for hook parameters.
1102         * config/m68hc11/m68hc11-protos.h: Update.
1103         * config/m68hc11/m68hc11.h (INITIALIZE_TRAMPOLINE): Remove.
1104
1105         * config/mcore/mcore.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1106         (TARGET_TRAMPOLINE_INIT): New.
1107         (mcore_function_value): Fix typo.
1108         (mcore_asm_trampoline_template, mcore_trampoline_init): New.
1109         * config/mcore/mcore.h (TRAMPOLINE_TEMPLATE): Move code
1110         to mcore_asm_trampoline_template.
1111         (INITIALIZE_TRAMPOLINE): Move code to mcore_trampoline_init.
1112
1113         * config/mep/mep.h (INITIALIZE_TRAMPOLINE): Remove.
1114         * config/mep/mep.c (TARGET_TRAMPOLINE_INIT): New.
1115         (mep_trampoline_init): Rename from mep_init_trampoline; make static;
1116         update for hook parameters.
1117         * config/mep/mep-protos.h (mep_init_trampoline): Remove.
1118
1119         * config/mips/mips.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
1120         mips_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
1121         mips_trampoline_init): New.
1122         * config/mips/mips.h (TRAMPOLINE_TEMPLATE): Move code to
1123         mips_asm_trampoline_template.
1124         (INITIALIZE_TRAMPOLINE): Move code to mips_trampoline_init;
1125         update for hook parameters.
1126
1127         * gcc/config/mmix/mmix.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1128         (TARGET_TRAMPOLINE_INIT): New.
1129         (mmix_trampoline_size): Remove.
1130         (mmix_asm_trampoline_template): Rename from mmix_trampoline_template;
1131         make static.  Remove out-of-date tetra vs octa comment.
1132         (mmix_trampoline_init): Rename from mmix_initialize_trampoline;
1133         make static; update for hook parameters.
1134         * config/mmix/mmix.h (TRAMPOLINE_TEMPLATE): Remove.
1135         (INITIALIZE_TRAMPOLINE): Remove.
1136         (TRAMPOLINE_SIZE): Use a constant instead of mmix_trampoline_size.
1137         (TRAMPOLINE_ALIGNMENT): New.
1138         * gcc/config/mmix/mmix-protos.h: Update.
1139
1140         * config/mn10300/mn10300.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
1141         mn10300_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
1142         mn10300_trampoline_init): New.
1143         * config/mn10300/mn10300.h (TRAMPOLINE_TEMPLATE): Move code to
1144         mn10300_asm_trampoline_template.
1145         (INITIALIZE_TRAMPOLINE): Move code to mn10300_trampoline_init.
1146
1147         * config/moxie/moxie.c (moxie_static_chain,
1148         moxie_asm_trampoline_template, moxie_trampoline_init,
1149         TARGET_STATIC_CHAIN, TARGET_ASM_TRAMPOLINE_TEMPLATE,
1150         TARGET_TRAMPOLINE_INIT): New.
1151         * config/moxie/moxie.h (INITIALIZE_TRAMPOLINE): Move code to
1152         moxie_trampoline_init.
1153         (TRAMPOLINE_TEMPLATE): Move code to moxie_asm_trampoline_template.
1154         (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
1155
1156         * gcc/config/pa/pa.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
1157         pa_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
1158         pa_trampoline_init, TARGET_TRAMPOLINE_ADJUST_ADDRESS,
1159         pa_trampoline_adjust_address): New.
1160         * config/pa/pa.h (TRAMPOLINE_TEMPLATE): Move code to
1161         pa_asm_trampoline_template.
1162         (TRAMPOLINE_ALIGNMENT): New.
1163         (TRAMPOLINE_CODE_SIZE): Move to pa.c.
1164         (INITIALIZE_TRAMPOLINE): Move code to pa_trampoline_init;
1165         adjust for hook parameters.
1166         (TRAMPOLINE_ADJUST_ADDRESS): Move code to pa_trampoline_adjust_address.
1167
1168         * config/pdp11/pdp11.c (pdp11_trampoline_init): New.
1169         (TARGET_TRAMPOLINE_INIT): New.
1170         * config/pdp11/pdp11.h (TRAMPOLINE_TEMPLATE): Remove.
1171         (INITIALIZE_TRAMPOLINE): Move code to pdp11_trampoline_init.
1172
1173         * config/picochip/picochip.h (INITIALIZE_TRAMPOLINE): Remove.
1174
1175         * config/rs6000/rs6000-protos.h (rs6000_initialize_trampoline): Remove.
1176         * config/rs6000/rs6000.c (TARGET_TRAMPOLINE_INIT): New.
1177         (rs6000_trampoline_init): Rename from rs6000_initialize_trampoline;
1178         make static; adjust parameters for the hook.
1179         * config/rs6000/rs6000.h (INITIALIZE_TRAMPOLINE): Remove.
1180
1181         * config/s390/s390.c (s390_asm_trampoline_template): Rename from
1182         s390_trampoline_template; make static.
1183         (s390_trampoline_init): Rename from s390_initialize_trampoline;
1184         make static; adjust for target hook.
1185         (TARGET_ASM_TRAMPOLINE_TEMPLATE, TARGET_TRAMPOLINE_INIT): New.
1186         * config/s390/s390-protos.h: Remove trampoline decls.
1187         * config/s390/s390.h (INITIALIZE_TRAMPOLINE): Remove.
1188         (TRAMPOLINE_TEMPLATE): Remove.
1189         (TRAMPOLINE_ALIGNMENT): New.
1190
1191         * config/score/score-protos.h (score_initialize_trampoline): Remove.
1192         * config/score/score.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1193         (TARGET_TRAMPOLINE_INIT): New.
1194         (score_asm_trampoline_template): New.
1195         (score_trampoline_init): Rename from score_initialize_trampoline;
1196         make static; adjust for hook parameters.
1197         * config/score/score.h (TRAMPOLINE_TEMPLATE): Move code to
1198         score[37]_asm_trampoline_template.
1199         (INITIALIZE_TRAMPOLINE): Remove.
1200         * config/score/score3.c (score3_asm_trampoline_template): New.
1201         (score3_trampoline_init): Rename from score3_initialize_trampoline;
1202         adjust for target hook.
1203         * config/score/score7.c (score7_asm_trampoline_template): New.
1204         (score7_trampoline_init): Rename from score7_initialize_trampoline;
1205         adjust for target hook.
1206         * config/score/score3.h, config/score/score7.h: Update.
1207
1208         * config/sh/sh-protos.h (sh_initialize_trampoline): Remove.
1209         * config/sh/sh.c (TARGET_TRAMPOLINE_INIT): New.
1210         (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
1211         (sh_trampoline_init): Rename from sh_initialize_trampoline;
1212         make static; adjust for target hook parameters.
1213         (sh_trampoline_adjust_address): New.
1214         * config/sh/sh.h (INITIALIZE_TRAMPOLINE): New.
1215         (TRAMPOLINE_ADJUST_ADDRESS): Move code to sh_trampoline_adjust_address.
1216
1217         * config/sparc/sparc.c (TARGET_TRAMPOLINE_INIT): New.
1218         (sparc32_initialize_trampoline): Rename from
1219         sparc_initialize_trampoline; make static; replace tramp parameter
1220         with m_tramp and update memory accesses.
1221         (sparc64_initialize_trampoline): Similarly.
1222         (sparc_trampoline_init): New.
1223         * config/sparc/sparc-protos.h: Remove trampoline decls.
1224         * config/sparc/sparc.h (INITIALIZE_TRAMPOLINE): Remove.
1225         * config/sparc/sparc.md (nonlocal_goto): Don't use static_chain_rtx.
1226
1227         * config/spu/spu.c (TARGET_TRAMPOLINE_INIT): New.
1228         (array_to_constant): Make ARR parameter const.
1229         (spu_trampoline_init): Rename from spu_initialize_trampoline;
1230         make static; update for hook parameters.
1231         * config/spu/spu-protos.h: Update decls.
1232         * config/spu/spu.h (INITIALIZE_TRAMPOLINE): Remove.
1233
1234         * config/stormy16/stormy16.c (xstormy16_trampoline_init): Rename
1235         from xstormy16_initialize_trampoline; make static; update for
1236         hook parameters.
1237         (TARGET_TRAMPOLINE_INIT): New.
1238         * config/stormy16/stormy16.h (INITIALIZE_TRAMPOLINE): Remove.
1239
1240         * config/v850/v850.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1241         (TARGET_TRAMPOLINE_INIT): New.
1242         (v850_can_eliminate): Make static.
1243         (v850_asm_trampoline_template, v850_trampoline_init): New.
1244         * config/v850/v850.h (TRAMPOLINE_TEMPLATE): Move code to
1245         v850_asm_trampoline_template.
1246         (INITIALIZE_TRAMPOLINE): Move code to v850_trampoline_init
1247         and adjust for target hook parameters.
1248
1249         * config/vax/vax.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1250         (TARGET_TRAMPOLINE_INIT): New.
1251         (vax_asm_trampoline_template, vax_trampoline_init): New.
1252         * config/vax/vax.h (TRAMPOLINE_TEMPLATE): Move code to
1253         vax_asm_trampoline_template.
1254         (INITIALIZE_TRAMPOLINE): Move code to vax_trampoline_init.
1255
1256         * config/xtensa/xtensa.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1257         (TARGET_TRAMPOLINE_INIT): New.
1258         (xtensa_asm_trampoline_template): Rename from
1259         xtensa_trampoline_template; make static.
1260         (xtensa_trampoline_init): Rename from xtensa_initialize_trampoline;
1261         make static; update for hook parameters.
1262         * config/xtensa/xtensa-protos.h: Remove trampoline decls.
1263         * config/xtensa/xtensa.h (TRAMPOLINE_TEMPLATE): Remove.
1264         (INITIALIZE_TRAMPOLINE): Remove.
1265
1266         * config/i386/i386.c (ix86_function_regparm): Do not issue an
1267         error for nested functions with regparm=3.
1268         (ix86_compute_frame_layout): Adjust frame pointer offset for
1269         ix86_static_chain_on_stack.
1270         (ix86_expand_prologue): Handle ix86_static_chain_on_stack.
1271         (ix86_emit_restore_reg_using_pop): Increment ix86_cfa_state->offset,
1272         don't reset to UNITS_PER_WORD.
1273         (ix86_emit_leave): Adjust ix86_cfa_state.
1274         (ix86_expand_epilogue): Handle ix86_static_chain_on_stack.
1275         (ix86_static_chain): New.
1276         (ix86_trampoline_init): Rename from x86_initialize_trampoline;
1277         make static; update for target hook parameters; use ix86_static_chain.
1278         (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
1279         * config/i386/i386.h (STATIC_CHAIN_REGNUM): Remove.
1280         (INITIALIZE_TRAMPOLINE): Remove.
1281         (TRAMPOLINE_SIZE): Use 24 for 64-bit.
1282         (struct machine_function): Use BOOL_BITFIELD; rearrange bitfields
1283         to the end.  Add static_chain_on_stack.
1284         (ix86_static_chain_on_stack): New.
1285
1286         * config/m68k/m68k.c (TARGET_TRAMPOLINE_INIT): New.
1287         (m68k_output_mi_thunk): Don't use static_chain_rtx.
1288         (m68k_trampoline_init): New.
1289         * config/m68k/m68k.h (INITIALIZE_TRAMPOLINE): Move code to
1290         m68k_trampoline_init and adjust for hook parameters.
1291         * config/m68k/netbsd-elf.h (TRAMPOLINE_TEMPLATE): Remove.
1292         (TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE): Remove.
1293
1294 2009-09-22  Jakub Jelinek  <jakub@redhat.com>
1295
1296         * config/rs6000/rs6000.c (bdesc_2arg): Fix CODE_FOR_vector_gt* codes
1297         for __builtin_altivec_vcmpgt{sb,uh,sh,uw}.
1298
1299         * reload1.c (reload): Call wrap_constant when substituting
1300         reg for equiv inside of DEBUG_INSNs.
1301
1302         PR bootstrap/41405
1303         * dwarf2out.c (base_type_die, record_type_tag, gen_subprogram_die,
1304         add_call_src_coords_attributes, add_high_low_attributes,
1305         gen_compile_unit_die, gen_type_die_with_usage force_decl_die,
1306         gen_decl_die, dwarf2out_imported_module_or_decl_1, dwarf2out_finish,
1307         dwarf2out_imported_module_or_decl): Avoid using DWARF3 additions
1308         when -gdwarf-2 -gstrict-dwarf.
1309         (loc_list_from_tree): Likewise.  Avoid using DWARF4 additions when
1310         -gdwarf-[23] -gstrict-dwarf.
1311         (address_of_int_loc_descriptor, loc_descriptor,
1312         loc_list_for_address_of_addr_expr_of_indirect_ref): Avoid using
1313         DWARF4 additions when -gdwarf-[23] -gstrict-dwarf.
1314         * common.opt (gno-strict-dwarf, gstrict-dwarf): New options.
1315
1316 2009-09-22  Richard Guenther  <rguenther@suse.de>
1317
1318         PR tree-optimization/41428
1319         * tree-ssa-ccp.c (ccp_fold_stmt): New function.
1320         (ccp_finalize): Pass it to substitute_and_fold.
1321
1322 2009-09-22  Richard Guenther  <rguenther@suse.de>
1323
1324         * tree-ssa-propagate.h (ssa_prop_fold_stmt_fn): Declare.
1325         (substitute_and_fold): Adjust prototype.
1326         * tree-vrp.c (vrp_evaluate_conditional): Make static.
1327         (simplify_stmt_using_ranges): Likewise.
1328         (fold_predicate_in): Move here from tree-ssa-propagate.c.
1329         (vrp_fold_stmt): New function.
1330         (vrp_finalize): Pass it to substitute_and_fold.
1331         * tree-flow.h (vrp_evaluate_conditional): Remove.
1332         (simplify_stmt_using_ranges): Likewise.
1333         * tree-ssa-ccp.c (ccp_finalize): Adjust call to substitute_and_fold.
1334         * tree-ssa-copy.c (fini_copy_prop): Likewise.
1335         * tree-ssa-propagate.c (struct prop_stats_d): Rename num_pred_folded
1336         member.
1337         (fold_predicate_in): Move to tree-vrp.c.
1338         (substitute_and_fold): Use the callback instead of calling into
1339         tree-vrp.c functions directly.
1340
1341 2009-09-22  Jakub Jelinek  <jakub@redhat.com>
1342
1343         * dwarf2out.c (address_of_int_loc_descriptor): Avoid signed/unsigned
1344         comparison warning on rs6000.
1345
1346         PR middle-end/41429
1347         * tree-cfg.c (remove_useless_stmts_tc): Call gsi_next (gsi) even for
1348         GIMPLE_EH_MUST_NOT_THROW cleanup.
1349         (verify_types_in_gimple_stmt): Handle GIMPLE_EH_MUST_NOT_THROW.
1350
1351 2009-09-22  Jack Howarth  <howarth@bromo.med.uc.edu>
1352
1353         PR middle-end/41260
1354         * gcc/config.gcc: Use darwin9.h and darwin10.h on darwin10 and later.
1355         * gcc/config/darwin10.h: Add file to pass -no_compact_unwind on
1356         LIB_SPEC for darwin10 and later since it always uses the unwinder in
1357         libSystem which is derived from the gcc 4.2.1 unwinder.
1358
1359 2009-09-22  Dave Korn  <dave.korn.cygwin@gmail.com>
1360
1361         PR middle-end/41357
1362         * varasm.c (default_encode_section_info): Copy TLS model into
1363         sym_ref flags regardless of backend support for TLS, for all
1364         model types except TLS_MODEL_EMULATED.
1365
1366 2009-09-22  Dave Korn  <dave.korn.cygwin@gmail.com>
1367
1368         PR bootstrap/41404
1369         * dwarf2out.c (mem_loc_descriptor): Punt on CONST_STRING until
1370         we can handle it correctly.
1371
1372 2009-09-21  Gerald Pfeifer  <gerald@pfeifer.com>
1373
1374         * doc/install.texi (os2): Remove section.
1375
1376 2009-09-21  Gerald Pfeifer  <gerald@pfeifer.com>
1377
1378         * doc/standards.texi (Objective-C): Adjust two URLs.
1379
1380 2009-09-21  Giuseppe Scrivano <gscrivano@gnu.org>
1381
1382         * tree-tailcall.c (process_assignment): Don't check if a
1383         multiplication or an addition are already present.
1384         (find_tail_calls): Combine multiple additions and multiplications.
1385         (adjust_accumulator_values): Emit accumulators.
1386
1387 2009-09-21  Kai Tietz  <kai.tietz@onevision.com>
1388
1389         * config/i386/i386.c (ix86_expand_epilogue): Adjust offset for
1390         xmm register restore.
1391
1392 2009-09-21  Jan Hubicka  <jh@suse.cz>
1393
1394         * dwarf2out.c (decl_loc_table_eq): Allow decl_loc_table to be NULL.
1395         (dwarf2out_abstract_function): NULLify decl_loc_table at begginig and
1396         restore at the end.
1397
1398 2009-09-21  Eric Botcazou  <ebotcazou@adacore.com>
1399
1400         * stor-layout.c (layout_type): Remove obsolete code.
1401
1402 2009-09-20  H.J. Lu  <hongjiu.lu@intel.com>
1403
1404         PR middle-end/41395
1405         * opts.c (decode_options): Don't turn on flag_ipa_sra for opt2.
1406
1407 2009-09-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1408
1409         PR middle-end/30789
1410         * builtins.c (do_mpc_arg2): Accept DO_NONFINITE parameter.
1411         (do_mpc_ckconv): Accept FORCE_CONVERT parameter.
1412         (fold_builtin_2, do_mpc_arg1): Update accordingly.
1413         * fold-const.c (const_binop): Likewise.
1414         * real.h (do_mpc_arg2): Update prototype.
1415
1416 2009-09-20  Jan Hubicka  <jh@suse.cz>
1417
1418         * dwarf2out.c (add_const_value_attribute): Return true if successful.
1419         (add_location_or_const_value_attribute): Rewrite using
1420         loc_list_from_tree.
1421         (tree_add_const_value_attribute): Return true if successful.
1422         (tree_add_const_value_attribute_for_decl): Likewise.
1423
1424         * dwarf2out.c (address_of_int_loc_descriptor): Break out from ...
1425         (loc_descriptor): ... here;
1426         (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
1427         (cst_pool_loc_descr): Break out from ...; do not reffer constant
1428         pool items that was not marked for output.
1429         (loc_list_from_tree): ... here; handle special cases of ADDR_EXPR;
1430         (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
1431         (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
1432         handle ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF, REALPART_EXPR,
1433         IMAGPART_EXPR; handle address of INTEGER_CST; improve handling of
1434         CONSTRUCTOR; handle REAL_CST, STRING_CST, COMPLEX_CST; use
1435         DW_OP_stack_value to get address of items that are not available
1436         as addresses.
1437         (dw_loc_list): Handle single element lists correctly.
1438
1439 2009-09-20  Kai Tietz  <kai.tietz@onevision.com>
1440             Pascal Obry  <obry@adacore.com>
1441
1442         * unwind-dw2-fde.c (classify_object_over_fdes):
1443         Cast the constant 1 to _Unwind_Ptr.
1444         (add_fdes): Likewise.
1445         (linear_search_fdes): Likewise.
1446
1447 2009-09-20  Eric Botcazou  <ebotcazou@adacore.com>
1448
1449         * stor-layout.c (set_sizetype): Avoid useless type copy.
1450
1451 2009-09-20  Richard Sandiford  <rdsandiford@googlemail.com>
1452
1453         * configure.ac (gcc_cv_ld_mips_personality_relaxation): New
1454         feature check.
1455         (HAVE_LD_PERSONALITY_RELAXATION): New macro definition.
1456         * configure, config.in: Regenerate.
1457         * dwarf2asm.c (eh_data_format_name): Handle DW_EH_PE_indirect |
1458         DW_EH_PE_absptr.
1459         * config/mips/mips.h (TARGET_WRITABLE_EH_FRAME): New macro.
1460         (ASM_PREFERRED_EH_DATA_FORMAT): Define.  Use MIPS_EH_INDIRECT
1461         for global data if the output could be used in a shared library.
1462         * config/mips/mips.c (mips_override_options): Set flag_dwarf2_cfi_asm
1463         to 0 if TARGET_WRITABLE_EH_FRAME.
1464
1465 2009-09-20  Paolo Bonzini <bonzini@gnu.org>
1466
1467         PR rtl-optimization/39886
1468         * combine.c (update_cfg_for_uncondjump): Set EDGE_FALLTHRU
1469         just when insn is equal to BB_END (bb).
1470
1471 2009-09-19  Adam Nemet  <anemet@caviumnetworks.com>
1472
1473         * config/mips/mips.opt (mrelax-pic-calls): New option.
1474         * config/mips/mips.c (mips_strip_unspec_address): Move it up in
1475         the file.
1476         (mips_unspec_call): Change "unspec_call" expander into this.
1477         (mips_strip_unspec_call): New function.
1478         (mips_got_load): Call mips_unspec_call instead of
1479         gen_unspec_call<mode>.
1480         (mips16_build_call_stub): Fix comment for fp_code.  Adjust call to
1481         MIPS_CALL.
1482         (mips_cfg_in_reorg): New function.
1483         (mips16_lay_out_constants): Use it to decide whether to call
1484         CFG-aware insn splitting.
1485         (r10k_insert_cache_barriers): Move CFG set-up code from here to
1486         mips_reorg.  Move DF set-up code from here ...
1487         (mips_df_reorg): ... to here.  Call r10k_insert_cache_barriers
1488         from here.
1489         (mips_reorg): Call mips_df_reorg instead of
1490         r10k_insert_cache_barriers.  Move CFG set-up code here from
1491         r10k_insert_cache_barriers.
1492         (mips_call_expr_from_insn): New function.
1493         (mips_pic_call_symbol_from_set): Likewise.
1494         (mips_find_pic_call_symbol): Likewise.
1495         (mips_annotate_pic_call_expr): Likewise.
1496         (mips_get_pic_call_symbol): Likewise.
1497         (mips_annotate_pic_calls): Likewise.
1498         (mips_override_options): Disable -mrelax-pic-calls unless PIC
1499         calls are used.
1500         (mips_set_mips16_mode): Disable -mrelax-pic-calls for MIPS16.
1501         * config/mips/mips-protos.h (mips_get_pic_call_symbol): Declare it.
1502         * config/mips/mips.h (MIPS_CALL): Use it to print the .reloc
1503         directive.
1504         * config/mips/mips.md (UNSPEC_CALL_ATTR): New unspec.
1505         (unspec_call<mode>): Remove it.
1506         (sibcall_internal, sibcall_value_internal,
1507         sibcall_value_multiple_internal, call_internal, call_split,
1508         call_value_internal, call_value_split,
1509         call_value_multiple_internal, call_value_multiple_split): Pass
1510         SIZE_OPNO to MIPS_CALL.
1511         (call_internal_direct, call_direct_split,
1512         call_value_internal_direct, call_value_direct_split): Pass -1 as
1513         SIZE_OPNO to MIPS_CALL.
1514         * configure.ac <mips*-*-*>: Add test for .reloc R_MIPS_JALR.
1515         * configure: Regenerate.
1516         * doc/invoke.texi (Option Summary): Add -mrelax-pic-calls
1517         and -mno-relax-pic-calls.
1518         (MIPS Options): Document -mrelax-pic-calls and -mno-relax-pic-calls.
1519
1520 2009-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1521
1522         PR bootstrap/35619
1523         * Makefile.in (stmp-fixinc): Ensure `include-fixed' is created
1524         in the directory this rule is called from, rather than the
1525         toplevel 'gcc' directory, to fix in-tree build.
1526
1527 2009-09-19  Chris Demetriou  <cgd@google.com>
1528
1529         PR preprocessor/28435:
1530         * c-opts.c (c_common_handle_option): For -MD and -MMD, indicate
1531         to cpplib that the preprocessor output is needed.
1532
1533 2009-09-19  Jakub Jelinek  <jakub@redhat.com>
1534
1535         * config/rs6000/rs6000.md (*save_gpregs_<mode>, *save_fpregs_<mode>,
1536         *restore_gpregs_<mode>, *return_and_restore_gpregs_<mode>,
1537         *return_and_restore_fpregs_<mode>,
1538         *return_and_restore_fpregs_aix_<mode>): Remove 'z' operand modifier.
1539
1540         PR bootstrap/41397
1541         * dwarf2out.c (mem_loc_descriptor) <case SUBREG>: Recurse
1542         instead of assuming it has always a REG inside of it.
1543
1544 2009-09-18  Gerald Pfeifer  <gerald@pfeifer.com>
1545
1546         * config/freebsd.h: Update comment on types.
1547         (WINT_TYPE): Define.
1548
1549 2009-09-18  Jason Merrill  <jason@redhat.com>
1550
1551         * c.opt: Add -fno-deduce-init-list.
1552
1553 2009-09-18  Neil Vachharajani  <nvachhar@google.com>
1554
1555         * value-prof.c (interesting_stringop_to_profile_p): Added output
1556         argument to indicate which parameter is the size parameter.
1557         * value-prof.c (gimple_stringop_fixed_value): Use
1558         INTERESTING_STRINGOP_TO_PROFILE_P to find size argument.
1559         * value-prof.c (gimple_stringops_transform): Update call sites to
1560         INTERESTING_STRINGOP_TO_PROFILE_P to reflect parameter change.
1561
1562 2009-09-18  Uros Bizjak  <ubizjak@gmail.com>
1563
1564         PR target/38288
1565         From David Binderman <dcb314@hotmail.com>:
1566         * gcc/config/i386/i386.c (ix86_function_regparm): Remove useless
1567         local variable f.  Remove stale comments.
1568         (ix86_compute_frame_layout): Remove useless local variable total_size.
1569         Remove #if 0'd code.
1570         (legitimate_address_p): Remove useless local variables
1571         reason_rtx and reason.
1572         (ix86_split_copysign_const): Remove useless local variable op1.
1573         (scale_counter): Remove useless local variable piece_size_mask.
1574
1575 2009-09-18  Jakub Jelinek  <jakub@redhat.com>
1576
1577         * stmt.c (expand_asm_operands): Set REG_ATTRS on the temporary from
1578         output decl.
1579
1580 2009-09-17  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
1581
1582         PR target/40913
1583         * config/pa/t-hpux-shlib: Set soname in libgcc_s.sl.
1584
1585 2009-09-17  Jakub Jelinek  <jakub@redhat.com>
1586
1587         * c-decl.c (finish_struct): Adjust DECL_SOURCE_LOCATION of
1588         TYPE_STUB_DECL.
1589
1590 2009-09-17  Alexandre Oliva  <aoliva@redhat.com>
1591
1592         * dwarf2out.c (loc_descriptor): Emit DW_OP_stack_value and
1593         DW_OP_implicit_value even without dwarf_version 4.
1594
1595 2009-09-17  Jan Hubicka  <jh@suse.cz>
1596
1597         * dwarf2out.c: Include tree-pass.h and gimple.h.
1598         (loc_list_plus_const): New function.
1599         (loc_descriptor_from_tree_1): Rename to ...
1600         (loc_descriptor_from_tree): ... remove original.
1601         (loc_list_from_tree): New function.
1602         (add_AT_location_description): Accept location list.
1603         (tls_mem_loc_descriptor): Update call of loc_descriptor_from_tree.
1604         (concatn_mem_loc_descriptor): Remove.
1605         (mem_loc_descriptor): Handle CONCAT/CONCATN and VAR_LOCATION by
1606         returning NULL.
1607         (secname_for_decl): Move up.
1608         (hidden_reference_p): New function; break out from ...
1609         (loc_by_refernece): ... here; move up.
1610         (dw_loc_list): New function.
1611         (single_element_loc_list): New function.
1612         (single_element_loc_list_p): New function.
1613         (add_loc_descr_to_each): New function.
1614         (add_loc_list): New function.
1615         (loc_descr_from_tree): Make wraper of loc_list_from_tree.
1616         (loc_list_from_tree): Reroganized from loc_descr_from_tree;
1617         add diagnostics why expansion failed.
1618         (add_location_or_const_value_attribute): Support location lists.
1619         (add_bound_info): Likewise.
1620         (descr_info_loc): Update call of loc_descriptor_from_tree.
1621         (gen_variable_die): Work on location lists.
1622         * final.c (pass_final): Add dump file.
1623         * Makefile.in (dwarf2out.o): Add new dependencies.
1624
1625 2009-09-17  Janis Johnson  <janis187@us.ibm.com>
1626
1627         PR c/41049
1628         * real.c decimal_from_integer, decimal_integer_string): New.
1629         (real_from_integer): Use them as special case for decimal float.
1630         * config/dfp-bit.c (_si_to_sd, _usi_to_sd): Use default rounding.
1631         (_di_to_sd, _di_to_dd, _di_to_td, _udi_to_sd, _udi_to_dd, _udi_to_td):
1632         Do not append zero after the decimal point in string to convert.
1633
1634 2009-09-17  Alexander Monakov  <amonakov@ispras.ru>
1635
1636         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1637         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
1638
1639 2009-09-17  Martin Jambor  <mjambor@suse.cz>
1640
1641         * common.opt (fipa-sra): New switch.
1642         * opts.c (decode_options): Turn flag_ipa_sra on for opt2.
1643         * timevar.def (TV_IPA_SRA): New timevar.
1644         * params.def (ipa-sra-ptr-growth-factor): New parameter.
1645         * doc/invoke.texi: Document -fipa-sra and ipa-sra-ptr-growth-factor.
1646         * tree-sra.c: Include cgraph.c.
1647         (enum sra_mode): Added SRA_MODE_EARLY_IPA.
1648         (struct access): Added fields stmt, grp_maybe_modified, grp_scalar_ptr
1649         and grp_not_necessarilly_dereferenced.
1650         (func_param_count): New variable.
1651         (encountered_apply_args): New variable.
1652         (bb_dereferences): New variable.
1653         (final_bbs): New variable.
1654         (no_accesses_representant): New variable.
1655         (no_accesses_p): New function.
1656         (dump_access): Dump the new fields.
1657         (sra_initialize): Set encountered_apply_args to false.
1658         (get_ssa_base_param): New function.
1659         (mark_parm_dereference): New function.
1660         (create_access): Caring for INIDRECT_REFs and different handling of
1661         varialble length accesses in early IPA SRA.  Store the stmt - a new
1662         parameter - to the new access.
1663         (build_access_from_expr_1): New parameter stmt, passed to
1664         create_access.  Handle INDIRECT_REFs.
1665         (build_access_from_expr): Pass the current statement to
1666         build_access_from_expr_1.
1667         (disqualify_ops_if_throwing_stmt): Trigger only in intraprocedural
1668         passes.
1669         (build_accesses_from_assign): Pass the current statement to
1670         build_access_from_expr_1.  Do not create assign links in IPA-SRA.
1671         (scan_function): Call handle_ssa_defs on phi nodes.  Set bits in
1672         final_bbs when necessary.  Check for calls to __builtin_apply_args.
1673         Fixup EH info if anythng was changed.
1674         (is_unused_scalar_param): New function.
1675         (ptr_parm_has_direct_uses): New function.
1676         (find_param_candidates): New function.
1677         (mark_maybe_modified): New function.
1678         (analyze_modified_params): New function.
1679         (propagate_dereference_distances): New function.
1680         (dump_dereferences_table): New function.
1681         (analyze_caller_dereference_legality): New function.
1682         (unmodified_by_ref_scalar_representative): New function.
1683         (splice_param_accesses): New function.
1684         (decide_one_param_reduction): New function.
1685         (enum ipa_splicing_result): New type.
1686         (splice_all_param_accesses): New function.
1687         (get_param_index): New function.
1688         (turn_representatives_into_adjustments): New function.
1689         (analyze_all_param_acesses): New function.
1690         (get_replaced_param_substitute): New function.
1691         (get_adjustment_for_base): New function.
1692         (replace_removed_params_ssa_names): New function.
1693         (sra_ipa_reset_debug_stmts): New function.
1694         (sra_ipa_modify_expr): New function.
1695         (sra_ipa_modify_assign): New function.
1696         (convert_callers): New function.
1697         (modify_function): New function.
1698         (ipa_sra_preliminary_function_checks): New function.
1699         (ipa_early_sra): New function.
1700         (ipa_early_sra_gate): New function.
1701         (pass_early_ipa_sra): New variable.
1702         * Makefile.in (tree-sra.o): Add cgraph.h to dependencies.
1703
1704 2009-09-17  Michael Matz  <matz@suse.de>
1705
1706         PR middle-end/41347
1707         * tree.c (build_type_attribute_qual_variant): Export.
1708         * tree.h (build_type_attribute_qual_variant): Declare.
1709         * tree-inline.c (remap_type_1): Use it to build variants with
1710         the original qualifiers and attributes.
1711
1712 2009-09-17  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
1713
1714         * cfglayout.c (fixup_reorder_chain): Accept conditional jumps
1715         without a fallthrough edge.
1716
1717 2009-09-16  DJ Delorie  <dj@redhat.com>
1718
1719         * config/m32c/m32c.c (m32c_emit_epilogue): Check for R8C or M16C
1720         chip and ignore the "fast_interrupt" attribute if so.
1721
1722 2009-09-16  Richard Henderson  <rth@redhat.com>
1723
1724         PR middle-end/41360
1725         * cfgbuild.c (find_bb_boundaries): Really re-instate 2009-09-02
1726         barrier fix.
1727
1728 2009-09-16  Richard Henderson  <rth@redhat.com>
1729
1730         PR target/41246
1731         * tree-cfg.c (verify_gimple_call): Validate that gimple_call_chain
1732         is set only if DECL_NO_STATIC_CHAIN is unset.
1733         * tree-nested.c (iter_nestinfo_start, iter_nestinfo_next): New.
1734         (FOR_EACH_NEST_INFO): New.
1735         (walk_all_functions): Use it.
1736         (finalize_nesting_tree): Likewise.
1737         (unnest_nesting_tree): Likewise.
1738         (free_nesting_tree): Use iter_nestinfo_start, iter_nestinfo_next.
1739         (get_chain_decl, get_chain_field): Reset DECL_NO_STATIC_CHAIN.
1740         (convert_gimple_call): Early out if gimple_call_chain already set.
1741         (convert_all_function_calls): Iterate until no new functions
1742         require a static chain.
1743         (finalize_nesting_tree_1): Assert DECL_NO_STATIC_CHAIN is unset
1744         when building a trampoline.  Use dump_function_to_file instead
1745         of dump_function.
1746         (lower_nested_functions): Open dump_file.  Validate that decls
1747         that have DECL_NO_STATIC_CHAIN from the front end don't have that
1748         bit reset by this pass.
1749
1750 2009-09-16  Michael Matz  <matz@suse.de>
1751
1752         PR fortran/41212
1753         * tree.h (struct tree_decl_common): Add decl_restricted_flag,
1754         shorten decl_common_unused.
1755         (DECL_RESTRICTED_P): New accessor.
1756         * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Use it
1757         to disambiguate marked decls and restrict pointers.
1758
1759 2009-09-16  Richard Henderson  <rth@redhat.com>
1760
1761         PR middle-end/41360
1762         * cfgbuild.c (find_bb_boundaries): Re-instate 2009-09-02 barrier fix.
1763
1764 2009-09-16  Jakub Jelinek  <jakub@redhat.com>
1765
1766         * integrate.c (set_block_abstract_flags): Call
1767         set_decl_abstract_flags also on BLOCK_NONLOCALIZED_VARs.
1768
1769 2009-09-16  Richard Guenther  <rguenther@suse.de>
1770
1771         PR middle-end/34011
1772         * tree-flow-inline.h (may_be_aliased): Compute readonly variables
1773         as non-aliased.
1774
1775 2009-09-16  DJ Delorie  <dj@redhat.com>
1776             Kaz Kojima  <kkojima@gcc.gnu.org>
1777
1778         * config/sh/sh.c (output_stack_adjust): Add new argument frame_p.
1779         (sh_expand_prologue): Update calls to output_stack_adjust.
1780         (sh_expand_epilogue): Likewise.
1781
1782 2009-09-15  Adam Nemet  <anemet@caviumnetworks.com>
1783
1784         PR bootstrap/41349
1785         * reorg.c (redundant_insn): Don't count notes or DEBUG_INSNs when
1786         trying to limit the extent of searches in the insn stream.
1787
1788 2009-09-15  Nathan Froyd  <froydnj@codesourcery.com>
1789             Jakub Jelinek  <jakub@redhat.com>
1790
1791         PR target/41175
1792         PR target/40677
1793         * config/rs6000/rs6000.c (no_global_regs_above): Fix precedence
1794         problem.
1795         (SAVRES_NOINLINE_GPRS_SAVES_LR, SAVRES_NOINLINE_FPRS_SAVES_LR,
1796         SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR): New strategy bits.
1797         (rs6000_savres_strategy): Always save FP registers inline if the
1798         target doesn't support hardware double-precision.  Set the above
1799         bits in return value when needed.
1800         (rs6000_savres_routine_sym): Fix computation for cache selector.
1801         Mark the generated symbol as a function.  Rename exitp argument to
1802         lr.  Move code for determining the name of the symbol...
1803         (rs6000_savres_routine_name): ...here.  New function.  Add cases for
1804         getting the names right on AIX and 64-bit Linux.
1805         (savres_routine_name): New variable.
1806         (rs6000_make_savres_rtx): Rename exitp argument to lr.  Don't assert
1807         lr isn't set when savep.  Use r12 resp. r1 instead of r11 depending
1808         on what the target routine uses as a base register.  If savep && lr
1809         describe saving of r0 into memory slot.
1810         (rs6000_emit_prologue): Correct use of call_used_regs.  Fix out of
1811         line calls for AIX ABI.
1812         (rs6000_output_function_prologue): Use rs6000_savres_routine_name to
1813         determine FP save/restore functions.
1814         (rs6000_emit_stack_reset): Handle savres if sp_offset != 0 and
1815         frame_reg_rtx != sp_reg_rtx.  Use gen_add3_insn instead of
1816         gen_addsi3.
1817         (rs6000_emit_epilogue): Adjust computation of restore_lr.
1818         Duplicate restoration of LR and execute the appropriate one
1819         depending on whether GPRs are being restored inline.  Set r11 from
1820         offsetted frame_reg_rtx instead of sp_reg_rtx; if frame_reg_rtx is
1821         r11, adjust sp_offset.  Use gen_add3_insn instead of gen_addsi3.
1822         Fix out of line calls for AIX ABI.
1823         * config/rs6000/rs6000.md (*return_and_restore_fpregs_aix_<mode>):
1824         New insn.
1825         * config/rs6000/spe.md (*save_gpregs_spe): Use explicit match for
1826         register 11.
1827         (*restore_gpregs_spe): Likewise.
1828         (*return_and_restore_gpregs_spe): Likewise.
1829         * config/rs6000/linux64.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
1830         Define to empty string unconditionally.
1831         * config/rs6000/sysv4.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
1832         Define to empty string unconditionally.
1833         (GP_SAVE_INLINE, FP_SAVE_INLINE): Handle TARGET_64BIT the same as
1834         !TARGET_64BIT.
1835
1836 2009-09-15  Jan Hubicka  <jh@suse.cz>
1837
1838         * doc/invoke.texi (inline-insns-auto): Drop from 60 to 50.
1839         * params.def (inline-insns-auto): Likewise.
1840
1841 2009-09-15  Martin Jambor  <mjambor@suse.cz>
1842
1843         * ipa-inline.c (estimate_function_body_sizes): Dump info about
1844         individual statements only at TDF_DETAILS dump level.  Format
1845         source for 80 characters per line.
1846
1847 2009-09-15  Christian Bruel  <christian.bruel@st.com>
1848
1849         * regrename.c (do_replace): Update REG_DEAD notes.
1850
1851 2009-09-15  Revital Eres  <eres@il.ibm.com>
1852
1853         * doc/tm.texi (TARGET_SUPPORT_VECTOR_MISALIGNMENT): Document.
1854         * targhooks.c (default_builtin_support_vector_misalignment):
1855         New builtin function.
1856         * targhooks.h (default_builtin_support_vector_misalignment):
1857         Declare.
1858         * target.h (builtin_support_vector_misalignment):
1859         New field in struct gcc_target.
1860         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Call
1861         new builtin function.
1862         * target-def.h (TARGET_SUPPORT_VECTOR_MISALIGNMENT):
1863         Define.
1864         * config/rs6000/rs6000.c
1865         (rs6000_builtin_support_vector_misalignment): New function.
1866         (TARGET_SUPPORT_VECTOR_MISALIGNMENT): Define.
1867
1868 2009-09-15  Jie Zhang  <jie.zhang@analog.com>
1869
1870         * config/bfin/bfin.c (length_for_loop): Use NONDEBUG_INSN_P
1871         instead of INSN_P.
1872         (bfin_optimize_loop): Likewise.
1873         (bfin_gen_bundles): Likewise.
1874         (workaround_speculation): Likewise.
1875         (find_load): Return NULL_RTX for debug_insn.
1876
1877 2009-09-15  Uros Bizjak  <ubizjak@gmail.com>
1878
1879         * config/alpha/alpha.md (smaxsf3): Disable for IEEE mode.
1880         (sminsf3): Ditto.
1881
1882 2009-09-14  DJ Delorie  <dj@redhat.com>
1883
1884         * config/mep/mep.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1885         * config/mep/mep.c (mep_emit_cbranch): Don't use BEQZ/BNEI in
1886         VLIW mode.
1887
1888 2009-09-14  Richard Henderson  <rth@redhat.com>
1889             Jakub Jelinek  <jakub@redhat.com>
1890
1891         * builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec.
1892         * cfgbuild.c (make_edges): Handle asm goto.
1893         * cfglayout.c (fixup_reorder_chain): Likewise.
1894         * cfgrtl.c (patch_jump_insn): Likewise.
1895         * gimple-pretty-print.c (dump_gimple_asm): Likewise.
1896         * gimple.c (gimple_build_asm_1): Add and use nlabels parameter.
1897         (gimple_build_asm_vec): Add and use labels parameter.
1898         (gimple_build_asm): Remove.
1899         (walk_gimple_asm): Walk labels too.
1900         * gimple.def (GIMPLE_ASM): Update docs.
1901         * gimple.h: Update decls.
1902         (struct gimple_statement_asm): Change nc to use unsigned char;
1903         add nl member.
1904         (gimple_asm_nlabels): New.
1905         (gimple_asm_label_op, gimple_asm_set_label_op): New.
1906         * gimplify.c (gimplify_asm_expr): Copy labels from ASM_EXPR
1907         into gimple_build_asm_vec.
1908         * jump.c (mark_jump_label_asm): New.
1909         (mark_jump_label): Use it.
1910         (redirect_jump_1): Handle asm goto.
1911         (invert_jump_1): Soft fail if X is null.
1912         * recog.c (extract_asm_operands): New.
1913         (asm_noperands): Use it; handle asm labels.
1914         (decode_asm_operands): Use extract_asm_operands.
1915         (asm_operand_ok): Properly handle empty string.
1916         * reg-stack.c (get_asm_operands_in_out): Rename from
1917         get_asm_operand_n_inputs; use extract_asm_operands; return both
1918         inputs and outputs by reference; update all callers.
1919         * rtl.def (ASM_OPERANDS): Add label vector as operand 6.
1920         * rtl.h (ASM_OPERANDS_LABEL_VEC): New.
1921         (ASM_OPERANDS_LABEL_LENGTH, ASM_OPERANDS_LABEL): New.
1922         (ASM_OPERANDS_SOURCE_LOCATION): Renumber.
1923         (extract_asm_operands): Declare.
1924         * stmt.c (expand_asm_operands): Add and use labels parameter.
1925         (check_unique_operand_names): Likewise.
1926         (resolve_asm_operand_names, resolve_operand_name_1): Likewise.
1927         (expand_asm_stmt): Handle asm labels.
1928         * tree-cfg.c (make_gimple_asm_edges): New.
1929         (make_edges): Use it.
1930         (cleanup_dead_labels): Handle asm labels.
1931         (is_ctrl_altering_stmt): Likewise.
1932         (gimple_redirect_edge_and_branch): Likewise.
1933         * tree.def (ASM_EXPR): Add 5th operand.
1934         * tree.h (ASM_LABELS): New.
1935         (resolve_asm_operand_names): Update decl.
1936
1937         * c-parser.c (c_parser_asm_statement): Parse asm goto.
1938         (c_parser_asm_goto_operands): New.
1939         * c-tree.h (build_asm_expr): Update decl.
1940         * c-typeck.c (build_asm_expr): Add and use labels parameter.
1941         * doc/extend.texi: Document asm goto.
1942
1943 2009-09-14  Richard Henderson  <rth@redhat.com>
1944
1945         * except.h: Update declarations.
1946         (struct pointer_map_t): Forward declare.
1947         (ERT_UNKNOWN, ERT_THROW, ERT_CATCH): Remove.
1948         (struct eh_landing_pad_d, eh_landing_pad): New.
1949         (struct eh_catch_d, eh_catch): New.
1950         (struct eh_region_d): Remove next_region_sharing_label, aka,
1951         label, tree_label, landing_pad, post_landing_pad, resume,
1952         may_contain_throw.  Rename region_number to index.  Remove
1953         u.eh_catch, u.eh_throw.  Rename u.eh_try.eh_catch to first_catch.
1954         Add u.must_not_throw, landing_pads, exc_ptr_reg, filter_reg.
1955         (VEC(eh_landing_pad,gc)): New.
1956         (struct eh_status): Remove last_region_number.  Add lp_array,
1957         throw_stmt_table, ttype_data, ehspec_data.
1958         (ehr_next, FOR_ALL_EH_REGION_AT): New.
1959         (FOR_ALL_EH_REGION_FN, FOR_ALL_EH_REGION): New.
1960         * except.c (lang_protect_cleanup_actions): Return tree.
1961         (struct ehl_map_entry): Remove.
1962         (init_eh_for_function): Push zero entries for region and lp_array.
1963         (gen_eh_region): Add to region_array immediately.
1964         (gen_eh_region_catch): Operate on eh_catch objects.
1965         (gen_eh_landing_pad): New.
1966         (get_eh_region_may_contain_throw, get_eh_region_tree_label): Remove.
1967         (get_eh_region_no_tree_label, set_eh_region_tree_label): Remove.
1968         (get_eh_region_from_number, get_eh_region_from_number_fn): New.
1969         (get_eh_landing_pad_from_number_fn): New.
1970         (get_eh_landing_pad_from_number): New.
1971         (get_eh_region_from_lp_number_fn): New.
1972         (get_eh_region_from_lp_number): New.
1973         (expand_resx_stmt, note_eh_region_may_contain_throw): Remove.
1974         (get_exception_pointer, get_exception_filter): Remove.
1975         (collect_eh_region_array, can_be_reached_by_runtime): Remove.
1976         (current_function_has_exception_handlers): Simplify.
1977         (bring_to_root, eh_region_replaceable_by_p): Remove.
1978         (replace_region, hash_type_list, hash_eh_region): Remove.
1979         (eh_regions_equal_p, merge_peers, remove_unreachable_regions): Remove.
1980         (label_to_region_map, num_eh_regions): Remove.
1981         (get_next_region_sharing_label, must_not_throw_labels): Remove.
1982         (find_exception_handler_labels): Remove.
1983         (duplicate_eh_regions_0, find_prev_try): Remove.
1984         (struct duplicate_eh_regions_data): New.
1985         (duplicate_eh_regions_1): Rewrite.
1986         (duplicate_eh_regions): Return a pointer map instead of an
1987         integer offset.
1988         (copy_eh_region_1, copy_eh_region, push_reachable_handler): Remove.
1989         (redirect_eh_edge_to_label): Remove.
1990         (eh_region_outermost): Rewrite using eh_region pointers
1991         instead of integers.
1992         (add_ttypes_entry): Update for ttype_data move to eh_status.
1993         (add_ehspec_entry): Rewrite with VEC instead of varray.
1994         (assign_filter_values): Likewise.  Export.
1995         (build_post_landing_pads, connect_post_landing_pads): Remove.
1996         (dw2_build_landing_pads): Rewrite to use lp_array.
1997         (struct sjlj_lp_info, sjlj_find_directly_reachable_regions): Remove.
1998         (sjlj_assign_call_site_values): Rewrite to use lp_array.
1999         (sjlj_emit_dispatch_table, sjlj_build_landing_pads): Likewise.
2000         (sjlj_mark_call_sites): Update for landing pad numbers.
2001         (finish_eh_generation): Rewrite.
2002         (gate_handle_eh): Do nothing for no eh tree.
2003         (pass_rtl_eh): Move up near finish_eh_generation.
2004         (remove_eh_landing_pad): New.
2005         (remove_eh_handler): Export.
2006         (remove_eh_region, remove_eh_handler_and_replace): Remove.
2007         (for_each_eh_label): Rewrite to use lp_array.
2008         (make_reg_eh_region_note): New.
2009         (make_reg_eh_region_note_nothrow_nononlocal): New.
2010         (insn_could_throw_p): New.
2011         (copy_reg_eh_region_note_forward): New.
2012         (copy_reg_eh_region_note_backward): New.
2013         (check_handled, add_reachable_handler): Remove.
2014         (reachable_next_level, foreach_reachable_handler): Remove.
2015         (arh_to_landing_pad, arh_to_label, reachable_handlers): Remove.
2016         (get_eh_region_and_lp_from_rtx): New.
2017         (get_eh_region_from_rtx): New.
2018         (can_throw_internal_1, can_throw_external_1): Remove.
2019         (can_throw_internal): Use get_eh_region_from_rtx.
2020         (can_throw_external): Use get_eh_region_and_lp_from_rtx.
2021         (insn_nothrow_p, can_nonlocal_goto): New.
2022         (expand_builtin_eh_common, expand_builtin_eh_pointer): New.
2023         (expand_builtin_eh_filter, expand_builtin_eh_copy_values): New.
2024         (add_action_record): Use VEC not varray.
2025         (collect_one_action_chain): Update for eh_region changes.
2026         (convert_to_eh_region_ranges): Make static.  Use VEC not varray.
2027         Use get_eh_region_and_lp_from_rtx.
2028         (gate_convert_to_eh_region_ranges): New.
2029         (pass_convert_to_eh_region_ranges): Use it.
2030         (push_uleb128, push_sleb128): Use VEC not varray.
2031         (output_one_function_exception_table): Likewise.
2032         (dump_eh_tree): Update for eh_region changes.
2033         (verify_eh_tree): Likewise.
2034         (verify_eh_region, default_init_unwind_resume_libfunc): Remove.
2035         * tree-eh.c: Include target.h.
2036         (add_stmt_to_eh_lp_fn): Rename from add_stmt_to_eh_region_fn.
2037         Don't disallow GIMPLE_RESX; adjust argument check.
2038         (add_stmt_to_eh_lp): Rename from add_stmt_to_eh_region.
2039         (record_stmt_eh_region): Update for landing pad numbers;
2040         generate a landing pad if necessary.
2041         (remove_stmt_from_eh_lp): Rename from remove_stmt_from_eh_region.
2042         (remove_stmt_from_eh_lp_fn): Similarly.
2043         (lookup_stmt_eh_lp_fn): Rename from lookup_stmt_eh_region_fn.
2044         Update for lp numbers; don't special case missing throw_stmt_table.
2045         (lookup_expr_eh_lp): Similarly.
2046         (lookup_stmt_eh_lp): Rename from lookup_stmt_eh_region.
2047         (eh_seq, eh_region_may_contain_throw): New.
2048         (struct leh_state): Add ehp_region.
2049         (struct leh_tf_state): Remove eh_label.
2050         (emit_post_landing_pad): New.
2051         (emit_resx, emit_eh_dispatch): New.
2052         (note_eh_region_may_contain_throw): New.
2053         (frob_into_branch_around): Take eh_region not eh label;
2054         emit eh code into eh_seq.
2055         (honor_protect_cleanup_actions): Early exit for no actions.  Don't
2056         handle EXC_PTR_EXPR, FILTER_EXPR.  Use gimple_build_eh_must_not_throw,
2057         lower_eh_must_not_throw.  Emit code to eh_seq.
2058         (lower_try_finally_nofallthru): Emit eh code to eh_seq.
2059         (lower_try_finally_onedest): Likewise.
2060         (lower_try_finally_copy): Likewise.
2061         (lower_try_finally_switch): Likewise.
2062         (lower_try_finally): Initialize ehp_region.
2063         (lower_catch): Update for eh_catch objects.
2064         (lower_eh_filter): Don't handle must_not_throw.
2065         (lower_eh_must_not_throw): New.
2066         (lower_cleanup): Don't set eh_label.
2067         (lower_eh_constructs_2): Resolve eh builtins.
2068         Handle GIMPLE_EH_MUST_NOT_THROW.
2069         (lower_eh_constructs): Initialize eh_region_may_contain_throw.
2070         Add eh_seq to the end of the function body.
2071         (make_eh_dispatch_edges): New.
2072         (make_eh_edge): Remove.
2073         (make_eh_edges): Simplify for landing pads.
2074         (redirect_eh_edge_1): New.
2075         (redirect_eh_edge): Use it.
2076         (redirect_eh_dispatch_edge): New.
2077         (stmt_could_throw_p): Use a switch.  Allow RESX.
2078         (stmt_can_throw_external): Use lookup_stmt_eh_lp.
2079         (stmt_can_throw_internal): Likewise.
2080         (maybe_clean_eh_stmt_fn, maybe_clean_eh_stmt): New.
2081         (maybe_clean_or_replace_eh_stmt): Update for landing pads.
2082         (maybe_duplicate_eh_stmt_fn, maybe_duplicate_eh_stmt): New.
2083         (gate_refactor_eh): New.
2084         (pass_refactor_eh): Use it.
2085         (lower_resx, execute_lower_resx, pass_lower_resx): New.
2086         (lower_eh_dispatch, execute_lower_eh_dispatch): New.
2087         (gate_lower_ehcontrol, pass_lower_eh_dispatch): New.
2088         (remove_unreachable_handlers): Rename from
2089         tree_remove_unreachable_handlers; rewrite for landing pads;
2090         call remove_eh_handler directly.
2091         (remove_unreachable_handlers_no_lp): New.
2092         (unsplit_eh, unsplit_all_eh): New.
2093         (tree_empty_eh_handler_p, all_phis_safe_to_merge): Remove.
2094         (cleanup_empty_eh_merge_phis, cleanup_empty_eh_move_lp): New.
2095         (cleanup_empty_eh_unsplit): New.
2096         (cleanup_empty_eh): Rewrite.
2097         (cleanup_all_empty_eh): New.
2098         (execute_cleanup_eh): Rename from cleanup_eh.  Remove unreachable
2099         handlers first.  Use unsplit_all_eh, cleanup_all_empty_eh.
2100         (gate_cleanup_eh): New.
2101         (pass_cleanup_eh): Use it.
2102         (verify_eh_edges): Move later in file.  Expect one EH edge.
2103         (verify_eh_dispatch_edge): New.
2104
2105         * Makefile.in (FUNCTION_H): Use vecprim.h, not varray.h.
2106         (gtype-desc.o): Add TARGET_H.
2107         (tree.o): Use EXCEPT_H, not except.h.
2108         (cfgbuild.o): Add EXPR_H.
2109         (GTFILES): Add vecprim.h.
2110         * builtins.c (expand_builtin): Handle BUILT_IN_EH_POINTER,
2111         BUILT_IN_EH_FILTER, BUILT_IN_EH_COPY_VALUES.
2112         * builtins.def (BUILT_IN_UNWIND_RESUME, BUILT_IN_EH_POINTER,
2113         BUILT_IN_EH_FILTER, BUILT_IN_EH_COPY_VALUES): New.
2114         * calls.c (emit_call_1): Use make_reg_eh_region_note.
2115         * cfgbuild.c (control_flow_insn_p): Use can_nonlocal_goto; tidy
2116         calls to can_throw_internal.
2117         (rtl_make_eh_edge): Use get_eh_landing_pad_from_rtx.
2118         (make_edges): Don't handle RESX; use can_nonlocal_goto.
2119         * cfgexpand.c (expand_gimple_stmt_1): Don't handle RESX.
2120         (expand_gimple_stmt): Use make_reg_eh_region_note.
2121         (expand_debug_expr): Don't handle EXC_PTR_EXPR and FILTER_EXPR.
2122         (gimple_expand_cfg): Don't call convert_from_eh_region_ranges,
2123         or find_exception_handler_labels.
2124         * cfgrtl.c (rtl_verify_flow_info_1): Don't handle RESX.  Assert
2125         there is exacly one EH edge.  Use can_nonlocal_goto and
2126         can_throw_internal.
2127         * cgraphunit.c (update_call_expr): Use maybe_clean_eh_stmt_fn.
2128         (cgraph_materialize_all_clones): Use maybe_clean_or_replace_eh_stmt.
2129         * combine.c (can_combine_p, try_combine): Use insn_nothrow_p.
2130         * cse.c (count_reg_usage, insn_live_p): Use insn_could_throw_p.
2131         * dce.c (deletable_insn_p_1): Don't test may_trap_p.
2132         (deletable_insn_p): Use insn_nothrow_p; reorder nonjump insn test.
2133         * dse.c (scan_insn): Use insn_could_throw_p.
2134         * emit-rtl.c (try_split): Use copy_reg_eh_region_note_backward.
2135         * expr.c (expand_expr_real): Use make_reg_eh_region_note.
2136         (expand_expr_real_1): Don't handle RESX, EXC_PTR, or FILTER_EXPR.
2137         * fold-const.c (tree_expr_nonnegative_warnv_p): Don't handle
2138         EXC_PTR_EXPR or FILTER_EXPR.
2139         (tree_expr_nonzero_warnv_p): Likewise.
2140         * function.h: Include vecprim.h, not varray.h
2141         (struct rtl_eh): Remove filter, exc_ptr, built_landing_pad members;
2142         move ttype_data and ehspec_data members to struct eh_status; change
2143         action_record_data member to a VEC.
2144         * gcse.c (hash_scan_set): Use can_throw_internal.
2145         * gengtype.c (open_base_files): Add target.h to gtype-desc.c.
2146         * gimple-iterator.c (gsi_replace): Use maybe_clean_or_replace_eh_stmt.
2147         * gimple-low.c (lower_stmt): Handle GIMPLE_EH_MUST_NOT_THROW.
2148         (block_may_fallthru): Don't handle RESX_EXPR.
2149         * gimple-pretty-print.c (dump_gimple_label): Dump EH_LANDING_PAD_NR.
2150         (dump_gimple_eh_must_not_throw, dump_gimple_eh_dispatch): New.
2151         (dump_gimple_stmt): Dump landing pad information with TDF_EH;
2152         handle GIMPLE_EH_MUST_NOT_THROW, GIMPLE_EH_DISPATCH.
2153         * gimple.c (gss_for_code): Handle GIMPLE_EH_MUST_NOT_THROW,
2154         GIMPLE_EH_DISPATCH, GIMPLE_RESX.
2155         (gimple_size): Likewise.
2156         (gimple_build_eh_dispatch, gimple_build_eh_must_not_throw): New.
2157         (gimple_build_resx): Use gimple_build_with_ops.
2158         (DEFTREECODE): Don't handle EXC_PTR_EXPR, FILTER_EXPR.
2159         (is_gimple_val): Likewise.
2160         (is_gimple_stmt): Remove RESX_EXPR.
2161         * gimple.def (GIMPLE_EH_MUST_NOT_THROW, GIMPLE_EH_DISPATCH): New.
2162         (GIMPLE_RESX): Reorder with other EH constructs.
2163         * gimple.h (struct gimple_statement_eh_mnt): New.
2164         (struct gimple_statement_eh_ctrl): Rename from gimple_statement_resx.
2165         (gimple_eh_filter_must_not_throw): Remove.
2166         (gimple_eh_filter_set_must_not_throw): Remove.
2167         (gimple_eh_must_not_throw_fndecl): New.
2168         (gimple_eh_dispatch_region, gimple_eh_dispatch_set_region): New.
2169         (is_gimple_resx): New.
2170         * gimplify.c (gimplify_expr): Don't handle EXC_PTR_EXPR, RESX_EXPR.
2171         Don't copy EH_FILTER_MUST_NOT_THROW.
2172         * gsstruct.def (GSS_EH_MNT, GSS_EHCONTROL): New.
2173         * ipa-inline.c (estimate_function_body_sizes): Don't try to
2174         handle must_not_throw_labels specially.
2175         * ipa-pure-const.c (check_call): Update debug statement for LP.
2176         * ipa-type-escape.c (check_operand): Don't handle EXC_PTR or FILTER.
2177         * ipa-utils.c (get_base_var): Likewise.
2178         * libfunc.h (LTI_unwind_resume, unwind_resume_libfunc): Remove.
2179         * lower-subreg.c (move_eh_region_note): Remove.
2180         (resolve_simple_move): Use copy_reg_eh_region_note_forward.
2181         * omp-low.c (new_omp_context): Update for eh_lp_nr.
2182         (create_task_copyfn): Likewise.
2183         (maybe_catch_exception): Use gimple_build_eh_filter.
2184         * optabs.c (emit_libcall_block): Update test for no-nonlocal-goto
2185         REG_EH_REGION.  Use make_reg_eh_region_note_nothrow_nononlocal.
2186         * passes.c (init_optimization_passes): Add pass_lower_eh_dispatch
2187         and pass_lower_resx.
2188         * print-tree.c (print_node): Dump EH_LANDING_PAD_NR.
2189         * recog.c (peephole2_optimize): Use copy_reg_eh_region_note_backward,
2190         can_throw_internal, can_nonlocal_goto.
2191         * reload1.c (fixup_eh_region_note): Use insn_could_throw_p,
2192         copy_reg_eh_region_note_forward.
2193         (emit_input_reload_insns): Use copy_reg_eh_region_note_forward.
2194         (emit_output_reload_insns): Likewise.
2195         (copy_eh_notes): Remove.
2196         * rtl.def (RESX): Remove.
2197         * rtl.h: Update declarations.
2198         * sese.c (graphite_copy_stmts_from_block): Use maybe_duplicate_eh_stmt.
2199         * tree-cfg.c (make_edges): Handle GIMPLE_EH_DISPATCH.
2200         (update_eh_label): Remove.
2201         (cleanup_dead_labels_eh): New.
2202         (cleanup_deal_labels): Use it instead of update_eh_label.
2203         (gimple_merge_blocks): Update landing pad data structure when
2204         removing a landing pad label.
2205         (remove_useless_stmts_tc): Remove gimple_eh_filter_must_not_throw
2206         test; handle GIMPLE_EH_MUST_NOT_THROW.
2207         (is_ctrl_altering_stmt): Handle GIMPLE_EH_DISPATCH.
2208         (verify_gimple_assign_single): Don't handle EXC_PTR or FILTER_EXPR.
2209         (verify_types_in_gimple_stmt): Handle GIMPLE_EH_DISPATCH.
2210         (verify_stmt): Likewise.  Verify landing pads.
2211         (gimple_redirect_edge_and_branch): Handle GIMPLE_EH_DISPATCH.
2212         (gimple_duplicate_bb): Use maybe_duplicate_eh_stmt.
2213         (struct move_stmt_d): Add eh_map.
2214         (move_stmt_eh_region_nr, move_stmt_eh_region_tree_nr): New.
2215         (move_stmt_r): Remap eh region numbers in builtin calls,
2216         resx and eh_dispatch.
2217         (move_block_to_fn): Remove eh_offset parameter.  Use
2218         maybe_duplicate_eh_stmt_fn.
2219         (find_outermost_region_in_block): Operate on eh_region pointers
2220         instead of region numbers.
2221         (move_sese_region_to_fn): Expect eh_map instead of eh_offset from
2222         duplicate_eh_regions.
2223         * tree-cfgcleanup.c (tree_forwarder_block_p): Move entry block edge
2224         test earlier.  Disallow EH landing pads.
2225         * tree-cfa.c (create_tree_common_ann): Don't set ann->rn.
2226         * tree-flow.h: Update declarations.
2227         (struct tree_ann_common_d): Replace rn with lp_nr.
2228         * tree-inline.c (copy_tree_body_r): Don't handle RESX_EXPR.
2229         (remap_eh_region_nr, remap_eh_region_tree_nr): New.
2230         (remap_gimple_stmt): Remap eh region numbers in builtin calls,
2231         resx and eh_dispatch.
2232         (copy_bb): Use maybe_duplicate_eh_stmt_fn.
2233         (copy_edges_for_bb): Use make_eh_dispatch_edges.
2234         (copy_cfg_body): Expect eh_map instead of eh_region_offset
2235         from duplicate_eh_regions.
2236         (estimate_num_insns): Don't handle EXC_PTR_EXPR or FILTER_EXPR;
2237         update RESX; handle EH_DISPATCH.
2238         (expand_call_inline): Set eh_lp_nr, not eh_region.
2239         (maybe_inline_call_in_expr): Likewise.
2240         * tree-inline.h (struct copy_body_data): Replace eh_region with
2241         eh_lp_nr, eh_region_offset with eh_map.
2242         * tree-optimize.c (execute_fixup_cfg): Use maybe_clean_eh_stmt.
2243         * tree-pass.h (pass_lower_eh_dispatch, pass_lower_resx): New.
2244         * tree-pretty-print.c (dump_generic_node): Don't handle
2245         EXC_PTR_EXPR, FILTER_EXPR, RESX_EXPR.
2246         * tree-sra.c (scan_function): Use maybe_clean_eh_stmt.
2247         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Don't handle
2248         EXC_PTR_EXPR, FILTER_EXPR.
2249         * tree-ssa-operands.c (get_expr_operands): Likewise.
2250         * tree-ssa-propagate.c (valid_gimple_rhs_p): Likewise.
2251         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
2252         (ao_ref_init_from_vn_reference): Likewise.
2253         * tree-ssa-sink.c (statement_sink_location): Likewise.
2254         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
2255         (mark_virtual_phi_result_for_renaming): Export.  Tidy.
2256         * tree-ssa-pre.c (get_or_alloc_expr_for): Don't handle
2257         EXC_PTR_EXPR, FILTER_EXPR.
2258         (is_exception_related): Remove.
2259         (compute_avail): Don't call it.
2260         * tree-ssa-structalias.c: Remove VEC definitions for int and unsigned.
2261         * tree.c (find_decls_types_in_eh_region): Update for eh_region changes.
2262         (find_decls_types_in_node): Use FOR_ALL_EH_REGION_FN.
2263         (build_common_builtin_nodes): Add enable_cxa_end_cleanup parameter.
2264         Build EH builtins.
2265         (build_resx): Remove.
2266         * tree.def (EXC_PTR_EXPR, FILTER_EXPR, RESX_EXPR): Remove.
2267         * tree.h: Update declarations.
2268         (EH_FILTER_MUST_NOT_THROW): Remove.
2269         (struct tree_label_decl): Add eh_landing_pad_nr.
2270         (EH_LANDING_PAD_NR): New.
2271         * value-prof.c (gimple_ic): Tidy variable names.  Update for
2272         landing pad numbers.
2273         (gimple_stringop_fixed_value): Tidy variable names.  Assert
2274         that neither call stmt can throw.
2275         * vecprim.h (uchar): New.
2276         (VEC(uchar,heap), VEC(uchar,gc)): New.
2277
2278         * c-common.c (c_define_builtins): Update call to
2279         build_common_builtin_nodes.
2280         * c-parser.c (c_parse_file): Don't call
2281         default_init_unwind_resume_libfunc.
2282
2283 2009-09-14  Richard Sandiford  <rdsandiford@googlemail.com>
2284
2285         * config/mips/mips-protos.h (mips_cfun_has_cprestore_slot_p): Declare.
2286         (mips_cprestore_address_p): Likewise.
2287         (mips_save_gp_to_cprestore_slot): Likewise.
2288         (mips_restore_gp): Rename to...
2289         (mips_restore_gp_from_cprestore_slot): ...this.
2290         (mips_must_initialize_gp_p): Declare.
2291         (mips_emit_save_slot_move): Likewise.
2292         (mips_output_load_label): Return nothing.
2293         (mips_eh_uses): Declare.
2294         * config/mips/mips.h (TARGET_SPLIT_CALLS): Require epilogue_completed.
2295         (TARGET_CPRESTORE_DIRECTIVE): New macro.
2296         (TARGET_ABSOLUTE_JUMPS): Likewise.
2297         (EH_USES): Likewise.
2298         (FIRST_PSEUDO_REGISTER): Update comment.
2299         (MIPS_ABSOLUTE_JUMP): New macro, extracted from...
2300         (MIPS_CALL): ...here.
2301         (REGISTER_NAMES): Add $cprestore.
2302         * config/mips/mips.c (machine_function): Remove has_gp_insn_p.
2303         Add load_label_length, has_inflexible_gp_insn_p,
2304         has_flexible_gp_insn_p, must_initialize_gp_p and
2305         must_restore_gp_when_clobbered_p.
2306         (mips_expand_call): Don't generate split instructions here.
2307         (mips_split_call): Update the call to mips_restore_gp after
2308         the above name change.
2309         (mips16_cfun_returns_in_fpr_p): Move earlier in file.
2310         (mips_find_gp_ref): New function.
2311         (mips_insn_has_inflexible_gp_ref_p): Likewise.
2312         (mips_cfun_has_inflexible_gp_ref_p): Likewise.
2313         (mips_insn_has_flexible_gp_ref_p): Likewise.
2314         (mips_cfun_has_flexible_gp_ref_p): Likewise.
2315         (mips_function_has_gp_insn): Delete.
2316         (mips_global_pointer): Drop the df_regs_ever_live_p check.
2317         Use the new functions above.  Only return INVALID_REGNUM
2318         for TARGET_ABSOLUTE_JUMPS.
2319         (mips_must_initialize_gp_p): New function.
2320         (mips_get_cprestore_base_and_offset): New function, extracted from...
2321         (mips_cprestore_slot): ...here.  Take a bool parameter.
2322         (mips_cfun_has_cprestore_slot_p): New function.
2323         (mips_cprestore_address_p): Likewise.
2324         (mips_save_gp_to_cprestore_slot): Likewise.
2325         (mips_restore_gp): Rename to...
2326         (mips_restore_gp_from_cprestore_slot): ...this.  Assert
2327         epilogue_completed.  Update the call to mips_cprestore_slot.
2328         Test cfun->machine->must_restore_gp_when_clobbered_p.
2329         (mips_direct_save_slot_move_p): New function.
2330         (mips_emit_save_slot_move): Likewise.
2331         (mips_output_cplocal): Test mips_must_initialize_gp_p () instead
2332         of cfun->machine->global_pointer.
2333         (mips_output_function_prologue): Check mips_must_initialize_gp_p ().
2334         (mips_save_reg): Use mips_emit_save_slot_move.
2335         (mips_expand_prologue): Set must_initialize_gp_p.
2336         Use mips_cfun_has_cprestore_slot_p.  Use gen_potential_cprestore
2337         for all cprestore saves.  Emit a use_cprestore instruction after
2338         setting up the cprestore slot.
2339         (mips_restore_reg): Use mips_emit_save_slot_move.
2340         (mips_process_load_label): New function.
2341         (mips_load_label_length): Likewise.
2342         (mips_output_load_label): Don't return asm: output it here instead.
2343         Use mips_process_load_label.
2344         (mips_adjust_insn_length): Adjust the length of branch instructions
2345         that have length MAX_PIC_BRANCH_LENGTH.
2346         (mips_output_conditional_branch): Update the call to
2347         mips_output_load_label.  Assume the branch target is OPERANDS[0]
2348         rather than OPERANDS[1].  Use MIPS_ABSOLUTE_JUMP for absolute jumps.
2349         (mips_output_order_conditional_branch): Swap the meaning of
2350         OPERANDS[0] and OPERANDS[1].
2351         (mips_variable_issue): Don't count ghost instructions.
2352         (mips_expand_ghost_gp_insns): New function.
2353         (mips_reorg): Rerun mips_reorg_process_insns if it returns true.
2354         (mips_output_mi_thunk): Set must_initialize_gp_p.
2355         (mips_eh_uses): New function.
2356         * config/mips/predicates.md (cprestore_save_slot_operand)
2357         (cprestore_load_slot_operand): New predicates.
2358         * config/mips/mips.md (UNSPEC_POTENTIAL_CPRESTORE): New unspec.
2359         (UNSPEC_MOVE_GP): Likewise.
2360         (UNSPEC_CPRESTORE, UNSPEC_RESTORE_GP, UNSPEC_EH_RETURN)
2361         (UNSPEC_CONSTTABLE_INT, UNSPEC_CONSTTABLE_FLOAT): Bump to make room.
2362         (CPRESTORE_SLOT_REGNUM): New register.
2363         (MAX_PIC_BRANCH_LENGTH): New constant.
2364         (jal_macro): Use MIPS_ABSOLUTE_JUMPS.
2365         (length): Use MAX_PIC_BRANCH_LENGTH as a placeholder for PIC long
2366         branches.  Fix commentary.
2367         (loadgp_newabi_<mode>): Change from unspec_volatile to unspec.
2368         Only split if mips_must_initialize_gp_p; expand to nothing otherwise.
2369         Change type to "ghost".
2370         (loadgp_absolute_<mode>): Likewise.
2371         (loadgp_rtp_<mode>): Likewise.
2372         (copygp_mips16): Likewise.
2373         (loadgp_blockage): Remove redundant mode attribute.
2374         (potential_cprestore): New instruction.
2375         (cprestore): Turn into an unspec set.
2376         (use_cprestore): New instruction.
2377         (*branch_fp): Swap operands 0 and 1.  Remove redundant mode attribute.
2378         (*branch_fp_inverted): Likewise.
2379         (*branch_order<mode>): Likewise.
2380         (*branch_order<mode>_inverted): Likewise.
2381         (*branch_equality<mode>): Likewise.
2382         (*branch_equality<mode>_inverted): Likewise.
2383         (*branch_bit<bbv><mode>): Likewise.
2384         (*branch_bit<bbv><mode>_inverted): Likewise.
2385         (*branch_equality<mode>_mips16): Remove redundant mode.
2386         (jump): Turn into a define_expand.
2387         (*jump_absolute): New instruction.
2388         (*jump_pic): Likewise.
2389         (*jump_mips16): Rename previously-unnamed pattern.  Remove
2390         redundant mode attribute.
2391         (restore_gp): Split on epilogue_completed rather than
2392         reload_completed.  Change type to "ghost".
2393         (move_gp<mode>): New instruction.
2394         * config/mips/mips-dsp.md (mips_bposge): Swap operands 0 and 1.
2395         Remove redundant mode attribute.
2396         * config/mips/mips-ps-3d.md (bc1any4t): Likewise.
2397         (bc1any4f, bc1any2t, bc1any2f): Likewise.
2398         (*branch_upper_lower, *branch_upper_lower_inverted): Likewise.
2399
2400 2009-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
2401
2402         PR target/41210
2403         * config/rs6000/rs6000.c (rs6000_function_value): V2DF and V2DI
2404         are returned in the same register (vs34 or v2) that Altivec vector
2405         types are returned in.
2406         (rs6000_libcall_value): Ditto.
2407
2408         PR target/41331
2409         * config/rs6000/rs6000.c (rs6000_emit_move): Use gen_add3_insn
2410         instead of explicit addsi3/adddi3 calls.
2411         (rs6000_split_multireg_move): Ditto.
2412         (rs6000_emit_allocate_stack): Ditto.
2413         (rs6000_emit_prologue): Ditto.
2414         (rs6000_output_mi_thunk): Ditto.
2415
2416         * config/rs6000/rs6000.md (bswapdi*): Don't assume the pointer
2417         size is 64 bits if we can use 64-bit registers.
2418
2419 2009-09-14  Bernd Schmidt  <bernd.schmidt@analog.com>
2420
2421         * config/bfin/bfin.c (bfin_longcall_p): Don't use short calls for weak
2422         symbols.
2423
2424         From Jie Zhang <jie.zhang@analog.com>:
2425         * config/bfin/bfin.c (bfin_expand_prologue): Ask do_link to
2426         save FP and RETS with saveall attribute.
2427         (bfin_expand_epilogue): Ask do_unlink to restore FP and RETS
2428         with saveall attribute.
2429
2430         * config/bfin/bfin.c (bfin_expand_builtin,
2431         case BFIN_BUILTIN_MULT_1X32X32): Force constants to registers for the
2432         operands.
2433
2434         From Jie Zhang <jie.zhang@analog.com>:
2435         * config/bfin/bfin.c (bfin_expand_builtin): Initialize icodes
2436         before use in two places.
2437         * config/bfin/bfin.md (AREG): Define mode iterator.
2438         (reload_in, reload_out): Use mode iterator AREG.
2439
2440 2009-09-14  Richard Guenther  <rguenther@suse.de>
2441
2442         PR middle-end/41350
2443         * dwarf2out.c (dwarf2out_begin_prologue): Adjust non-CFI asm
2444         EH personality path.
2445
2446 2009-09-13  Richard Guenther  <rguenther@suse.de>
2447             Rafael Avila de Espindola  <espindola@google.com>
2448
2449         * langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
2450         (LANG_HOOKS_EH_PERSONALITY): Likewise.
2451         (LANG_HOOKS_INITIALIZER): Adjust.
2452         (lhd_pass_through_t): Declare.
2453         * langhooks.h (struct lang_hooks): Add eh_runtime_type and
2454         eh_personality.
2455         * langhooks.c (lhd_pass_through_t): New function.
2456         * dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc,
2457         dwarf2out_begin_prologue): Use personality from current_function_decl.
2458         * expr.h (get_personality_function): Declare.
2459         * expr.c (get_personality_function): New function.
2460         (build_personality_function): Likewise.
2461         * libfuncs.h (libfunc_index): Remove LTI_eh_personality.
2462         (eh_personality_libfunc): Remove.
2463         * optabs.c (build_libfunc_function): New function split out from ...
2464         (init_one_libfunc): ... here.
2465         * tree.h (DECL_FUNCTION_PERSONALITY): New.
2466         (tree_function_decl): Add personality.
2467         (lhd_gcc_personality): Declare.
2468         (build_personality_function): Likewise.
2469         * tree.c (gcc_eh_personality_decl): New.
2470         (lhd_gcc_personality): New function.
2471         * except.h (lang_eh_runtime_type): Remove.
2472         (enum eh_personality_kind): New.
2473         (build_personality_function): Declare.
2474         (function_needs_eh_personality): Declare.
2475         * except.c (lang_eh_runtime_type): Remove.
2476         (function_needs_eh_personality): New function.
2477         (add_type_for_runtime): Call lang_hooks.type_for_runtime instead.
2478         (sjlj_emit_function_enter, output_function_exception_table):
2479         Use personality from current_function_decl.
2480         * tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY.
2481         * tree-inline.c (tree_can_inline_p): Do not inline across different
2482         EH personalities.
2483         (expand_call_inline): Likewise.  Adjust the callers EH personality.
2484         (tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY.
2485         * cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY.
2486         * Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency.
2487         (c-parser.o): Likewise
2488         * c-tree.h (c_eh_initialized_p): Remove.
2489         (c_maybe_initialize_eh): Likewise.
2490         * c-decl.c (finish_decl): Don't call c_maybe_initialize_eh.
2491         (finish_decl): Don't call c_maybe_initialize_eh.
2492         (c_eh_initialized_p): Remove.
2493         (c_maybe_initialize_eh): Likewise.
2494         * c-parser.c (c_parser_omp_construct): Likewise.
2495         (c_parse_file): Initialize exception handling.
2496
2497 2009-09-13  Kai Tietz  <kai.tietz@onevision.com>
2498
2499         * config.gcc (tm_file): Remove i386/biarch32.h
2500         for i?86-w64-mingw* case.
2501         (i?86-*-mingw* andx86_64-*-mingw*): Add multilib
2502         support.
2503         * config.host: Set for x64 mingw the option
2504         use_long_long_for_widest_fast_int to yes.
2505
2506 2009-09-13  Eric Botcazou  <ebotcazou@adacore.com>
2507
2508         * tree.h (DECL_IGNORED_P): Document further effect for FUNCTION_DECL.
2509         * dbxout.c (dbxout_function_end): Do not test DECL_IGNORED_P.
2510         (dbxout_begin_function): Likewise.
2511         * final.c (dwarf2_debug_info_emitted_p): New predicate.
2512         (final_start_function): Do not emit debug info if DECL_IGNORED_P is
2513         set on the function.
2514         (final_end_function): Likewise.
2515         (final_scan_insn): Likewise.
2516         (rest_of_handle_final): Likewise.
2517         * varasm.c (assemble_start_function): Likewise.
2518         * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
2519
2520 2009-09-12  Jason Merrill  <jason@redhat.com>
2521
2522         * dbgcnt.c (dbg_cnt_process_single_pair): constify.
2523         * opts.c (common_handle_option): constify.
2524
2525 2009-09-12  Gerald Pfeifer  <gerald@pfeifer.com>
2526
2527         * doc/install.texi (avr): Remove obsolete reference site.
2528
2529 2009-09-12  Gerald Pfeifer  <gerald@pfeifer.com>
2530
2531         * doc/install.texi (Binaries): Adjust AIX link.
2532
2533 2009-09-12  Akim Demaille  <demaille@gostai.com>
2534
2535         * doc/invoke.texi (-fstrict-aliasing): Correct two examples.
2536         Use an imperative sentence.
2537
2538 2009-09-11  Richard Henderson  <rth@redhat.com>
2539
2540         * gsstruct.def (DEFGSSTRUCT): Remove printable-name argument; add
2541         structure-name and has-tree-operands arguments; update all entries.
2542         * gimple.def (DEFGSCODE): Replace 3rd argument with GSS_symbol;
2543         update all entries.
2544         * gimple.c (gimple_ops_offset_): Use HAS_TREE_OP argument.
2545         (gsstruct_code_size): New.
2546         (gss_for_code_): New.
2547         (gss_for_code): Remove.
2548         (gimple_size): Rewrite using gsstruct_code_size.
2549         (gimple_statement_structure): Move to gimple.h.
2550         * gimple.h (gimple_ops_offset_, gss_for_code_): Declare.
2551         (gss_for_code, gimple_statement_structure): New.
2552         (gimple_ops): Use new arrays; tidy.
2553
2554 2009-09-11  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2555
2556         * config/pa/predicates.md (symbolic_operand): Require a CONST symbolic
2557         operand to be a PLUS expression.
2558         * config/pa/pa.c (pa_secondary_reload): Likewise.
2559
2560 2009-09-11  Jakub Jelinek  <jakub@redhat.com>
2561
2562         * combine.c (propagate_for_debug_subst): Call wrap_constant on top.
2563
2564         * print-rtl.c (print_rtx): Use JUMP_LABEL (in_rtx) instead of
2565         XEXP (in_rtx, 8).
2566
2567 2009-09-11  Bernd Schmidt  <bernd.schmidt@analog.com>
2568
2569         From Jie Zhang <jie.zhang@analog.com>:
2570         * doc/extend.texi (node Function Attributes): Document l2
2571         function attribute.
2572         (node Blackfin Variable Attributes): Document l2 variable attributes.
2573
2574 2009-09-11  Loren J. Rittle  <ljrittle@acm.org>
2575
2576         * config.gcc (*-*-freebsd*): Enable default_use_cxa_atexit
2577         to match the system compiler's configuration at inflection point.
2578         Add comment to remark a remaining difference with system compiler.
2579
2580         * configure.ac (*-*-freebsd*): Enable check for __stack_chk_fail.
2581         * configure: Regenerate.
2582
2583 2009-09-11  Bernd Schmidt  <bernd.schmidt@analog.com>
2584
2585         From Jie Zhang <jie.zhang@analog.com>:
2586         * config/bfin/bfin.c (bfin_expand_call): Handle L2 functions.
2587         (bfin_handle_l2_attribute): New.
2588         (bfin_attribute_table): Add l2 attribute.
2589
2590 2009-09-11  Michael Matz  <matz@suse.de>
2591
2592         PR middle-end/41275
2593         * tree-inline.c (remap_decls): Don't put DECL_EXTERNAL decls
2594         on the local_decls list.
2595
2596 2009-09-11  Alexandre Oliva  <aoliva@redhat.com>
2597
2598         PR debug/41276
2599         PR debug/41307
2600         * cselib.c (cselib_expand_value_rtx_cb): Document callback
2601         interface.
2602         (cselib_expand_value_rtx_1): Use callback for SUBREGs.  Adjust
2603         for VALUEs, to implement the documented interface.
2604         * var-tracking.c (vt_expand_loc_callback): Handle SUBREGs.
2605         Adjust for VALUEs and anything else, to implement the
2606         documented interface.
2607
2608 2009-09-10  Nathan Froyd  <froydnj@codesourcery.com>
2609
2610         * config/rs6000/rs6000.h (DATA_ALIGNMENT): Check that we are dealing
2611         with actual SPE/paired vector modes before using 64-bit alignment.
2612         Check that TYPE is a REAL_TYPE for TARGET_E500_DOUBLE.
2613
2614 2009-09-10  DJ Delorie  <dj@redhat.com>
2615
2616         * config/mep/mep.md (eh_epilogue): Defer until after epilogue is
2617         emitted.
2618
2619         * config/mep/mep.h (LEGITIMATE_CONSTANT_P): New.
2620         * config/mep/mep.c (mep_legitimate_constant_p): New.
2621         * config/mep/mep-protos.h: Prototype it.
2622
2623 2009-09-10  Richard Henderson  <rth@redhat.com>
2624
2625         * print-rtl.c (print_rtx): Fix JUMP_LABEL index.
2626
2627 2009-09-10  Jason Merrill  <jason@redhat.com>
2628
2629         * tree.c (chain_index): New fn.
2630         * tree.h: Declare it.
2631
2632 2009-09-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2633
2634         * config/sol2-c.c (cmn_err_length_specs): Initialize
2635         scalar_identity_flag.
2636
2637 2009-09-10  Richard Henderson  <rth@redhat.com>
2638
2639         * tree.h (struct tree_decl_common): Move align member earlier;
2640         move label_decl_uid member ...
2641         (struct tree_label_decl): ... here.
2642         (LABEL_DECL_UID): Update to match.
2643
2644         * tree-cfg.c (dump_function_to_file): Dump eh tree with TDF_EH,
2645         not TDF_DETAILS.
2646
2647         * tree-cfg.c (gimple_redirect_edge_and_branch): Do
2648         gimple_try_redirect_by_replacing_jump test after no-op and EH tests.
2649
2650         * tree-cfg.c (split_edge_bb_loc): Don't disallow placement at
2651         dest_prev if the edge is complex.
2652
2653         * tree-cfg.c (is_ctrl_stmt): Use a switch.
2654
2655         * tree-cfg.c (gimple_can_merge_blocks_p): Move label and
2656         loop latch tests earlier.
2657
2658         * gimple-iterator.c (gimple_find_edge_insert_loc): Insert
2659         before GIMPLE_RETURN, not after its predecessor; insert
2660         before GIMPLE_RESX.
2661
2662         * gimple-iterator.c (gimple_find_edge_insert_loc): Use
2663         gimple_seq_empty_p to test for no PHI nodes.
2664         * tree-cfg.c (split_critical_edges): Likewise.
2665
2666         * c-common.h (c_dialect_cxx, c_dialect_objc): Boolify.
2667
2668 2009-09-10  Hariharan Sandanagobalane  <hariharan@picochip.com>
2669
2670         * final.c (shorten_branches) : Ignore DEBUG_INSN_P instructions
2671         introduced by the VTA branch merge.
2672
2673 2009-09-10  Uros Bizjak  <ubizjak@gmail.com>
2674
2675         * ira-conflicts.c: Use fputs or putc instead of fprintf
2676         where appropriate.
2677         * cfg.c: Ditto.
2678         * toplev.c: Ditto.
2679         * tree-switch-conversion.c: Ditto.
2680
2681 2009-09-10  Hariharan Sandanagobalane  <hariharan@picochip.com>
2682
2683         * config/picochip/picochip.c : Ignore DEBUG_INSN_P instructions
2684         introduced by the VTA branch merge.
2685
2686 2009-09-10  Uros Bizjak  <ubizjak@gmail.com>
2687
2688         Revert:
2689         2009-09-09  Uros Bizjak  <ubizjak@gmail.com>
2690
2691         PR rtl-optimization/39779
2692         * expr.c (convert_modes): Return when mode == oldmode after
2693         CONST_INTs are processed.
2694
2695 2009-09-10  Nick Clifton  <nickc@redhat.com>
2696
2697         * config/mep/mep.c (mep_encode_section_info): Copy weakness
2698         attribute and referring decl when creating renamed symbol.
2699
2700 2009-09-10  Richard Guenther  <rguenther@suse.de>
2701
2702         PR middle-end/41257
2703         * cgraphunit.c (cgraph_emit_thunks): Emit thunks only for
2704         reachable nodes.
2705         (cgraph_finalize_compilation_unit): Compute reachability
2706         before emitting thunks.  Properly process aliases before
2707         possibly removing unreachable nodes.
2708
2709 2009-09-10  Richard Guenther  <rguenther@suse.de>
2710
2711         PR middle-end/41254
2712         * tree.c (struct free_lang_data_d): Add worklist member.
2713         (find_decls_types_r): Push onto the worklist instead of recursing.
2714         Handle TREE_BINFOs properly.
2715         (find_decls_types): New function wrapped around find_decls_types_r
2716         to process the worklist.
2717         (find_decls_types_in_eh_region): Use it.
2718         (find_decls_types_in_node): Likewise.
2719         (find_decls_types_in_var): Likewise.
2720         (free_lang_data_in_cgraph): Likewise.  Free the worklist.
2721         * tree.h (RECORD_OR_UNION_TYPE_P): New.
2722         (AGGREGATE_TYPE_P): Adjust.
2723
2724 2009-09-09  Jason Merrill  <jason@redhat.com>
2725
2726         * configure.ac: Check glibc version even if we have an in-tree
2727         assembler.
2728
2729 2009-09-09  Anthony Green  <green@moxielogic.com>
2730
2731         * config/moxie/moxie.md (*movsi, *movhi, *movqi): Use xor to load
2732         the constant 0 when appropriate.
2733         * config/moxie/constraints.md: Add constraint O.
2734
2735         * config/moxie/moxie.c (moxie_setup_incoming_varargs): Adjust
2736         to pass up to 6 32-bit argument values in registers.
2737         (moxie_function_arg): Ditto.
2738         (moxie_arg_partial_bytes): Ditto.
2739         * config/moxie/moxie.h (FUNCTION_ARG_ADVANCE): Ditto.
2740         (REG_PARM_STACK_SPACE): Ditto.
2741         (FUNCTION_ARG_REGNO_P): Ditto.
2742
2743         * config/moxie/moxie.c (moxie_expand_prologue): Use dec
2744         instruction to allocate stack space.
2745
2746 2009-09-09  Segher Boessenkool  <segher@kernel.crashing.org>
2747
2748         * config/rs6000/rs6000.md (bswapdi2_64bit): Fix
2749         unnecessarily stringent constraints.  Fix address
2750         calculation in the splitters.
2751
2752 2009-09-09  Uros Bizjak  <ubizjak@gmail.com>
2753
2754         PR rtl-optimization/39779
2755         * expr.c (convert_modes): Return when mode == oldmode after
2756         CONST_INTs are processed.
2757
2758 2009-09-09  Kai Tietz  <kai.tietz@onevision.com>
2759
2760         PR/41315
2761         * config/i386.c (ix86_can_use_return_insn_p): Check for padding0, too.
2762         (ix86_expand_prologue): Take frame.padding0 into logic of
2763         to_allocate checks.
2764         (ix86_expand_epilogue): Likewise.
2765
2766 2009-09-09  Jakub Jelinek  <jakub@redhat.com>
2767
2768         * config/t-slibgcc-elf-ver (SHLIB_MAKE_SOLINK, SHLIB_INSTALL_SOLINK):
2769         New variables.
2770         (SHLIB_LINK, SHLIB_INSTALL): Use them.
2771         * config/t-slibgcc-libgcc: New file.
2772         * config.gcc (powerpc*-*-linux*, powerpc*-*-gnu*): Use it.
2773
2774 2009-09-09  Martin Jambor  <mjambor@suse.cz>
2775
2776         PR tree-optimization/41089
2777         * tree-sra.c (find_var_candidates): Do not consider va_lists in
2778         early SRA.
2779
2780 2009-09-09  Richard Henderson  <rth@redhat.com>
2781
2782         * gimple.h (CASE_GIMPLE_OMP): New.
2783         (is_gimple_omp): Use it.
2784         * tree-cfg.c (is_ctrl_altering_stmt): Likewise.
2785         (verify_gimple_debug): Likewise.
2786
2787 2009-09-09  Richard Guenther  <rguenther@suse.de>
2788
2789         PR tree-optimization/41101
2790         * tree-ssa-pre.c (maximal_set): Remove.
2791         (compute_antic_aux): Treat the maximal set as implicitly all ones.
2792         Defer all blocks we didn't visit at least one successor.
2793         (add_to_exp_gen): Do not add to the maximal set.
2794         (make_values_for_phi): Likewise.
2795         (compute_avail): Likewise.
2796         (init_pre): Do not allocate the maximal set.
2797         (execute_pre): Do not dump it.
2798
2799 2009-09-09  Martin Jambor  <mjambor@suse.cz>
2800
2801         * tree-cfg.c (verify_gimple_phi): Check that gimple_phi_result is
2802         an SSA_NAME rather than a is_gimple_variable.
2803
2804 2009-09-09  Richard Guenther  <rguenther@suse.de>
2805
2806         PR middle-end/41317
2807         * tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Remove
2808         code dealing with plain pointer bases.
2809         (maybe_fold_offset_to_reference): Likewise.
2810         (maybe_fold_stmt_addition): Adjust.
2811
2812 2009-09-09  Richard Guenther  <rguenther@suse.de>
2813
2814         * tree.c (free_lang_data_in_type): Do not free the type variant
2815         chains.
2816         (free_lang_data): Merge char_type_node with its properly signed
2817         variant.
2818         (pass_ipa_free): Collect after freeing language specific data.
2819
2820 2009-09-09  Michael Matz  <matz@suse.de>
2821
2822         PR middle-end/41268
2823         * cfgexpand.c (expand_gimple_stmt_1): Use an int for storing
2824         SUBREG_PROMOTED_UNSIGNED_P, instead of a bool.
2825         * rtl.h (struct rtx, SUBREG_PROMOTED_UNSIGNED_P): Update comments
2826         to reflect reality.
2827
2828 2009-09-08  DJ Delorie  <dj@redhat.com>
2829
2830         * config/mep/mep.c (conversions[]): Add "ml" pattern.
2831
2832 2009-09-04  Jason Merrill  <jason@redhat.com>
2833
2834         * tree.c (tree_find_value): Remove.
2835         * tree.h: Remove prototype.
2836         * varasm.c (assemble_external): Use value_member instead.
2837
2838 2009-09-08  Alexandre Oliva  <aoliva@redhat.com>
2839
2840         * toplev.c (process_options): Choose default debugging type when
2841         gtoggle enables debug info and type is unset.
2842
2843 2009-09-08  Alexandre Oliva  <aoliva@redhat.com>
2844
2845         PR debug/41276
2846         PR debug/41307
2847         * cselib.c (cselib_expand_value_rtx_1): Don't return copy of
2848         invalid subreg.
2849
2850 2009-09-08  Alexandre Oliva  <aoliva@redhat.com>
2851
2852         * configure: Rebuilt with modified libtool.m4.
2853
2854 2009-09-08  Alexandre Oliva  <aoliva@redhat.com>
2855
2856         PR debug/41229
2857         PR debug/41291
2858         PR debug/41300
2859         * tree-ssa.c (execute_update_addresses_taken): Update debug insns.
2860
2861 2009-09-08  Alexandre Oliva  <aoliva@redhat.com>
2862
2863         * tree-ssa-loop-ivopts.c (get_phi_with_result): Remove.
2864         (remove_statement): Likewise.
2865         (rewrite_use_nonlinear_expr): Adjust.
2866         (remove_unused_ivs): Collect SSA NAMEs to remove and call...
2867         * tree-ssa.c (release_defs_bitset): ... this.  New.
2868         * tree-flow.h (release_defs_bitset): Declare.
2869
2870 2009-09-08  Alexandre Oliva  <aoliva@redhat.com>
2871
2872         PR debug/41232
2873         * tree-ssa-phiopt.c (minmax_replacement): Skip debug stmts
2874         in the middle block.
2875
2876 2009-09-08  Kai Tietz  <kai.tietz@onevision.com>
2877
2878         * tree-ssa-reassoc.c (find_operand_rank): Cast pointer
2879         via intptr_t to long type.
2880         (insert_operand_rank): Cast long type via intptr_t to
2881         pointer type.
2882         * genattrtab.c (RTL_HASH): Use intptr_t to cast from
2883         pointer to scalar.
2884         * c-pretty-print.c (pp_c_tree_decl_identifier): Cast
2885         from pointer to unsigned via uintptr_t.
2886
2887         * configure.ac (GCC_STDINT_TYPES): Initialize intptr_t,
2888         uintptr_t, HAVE_INTTYPES_H, HAVE_STDINT_H, HAVE_UINTPTR_T,
2889         and HAVE_INTPTR_T.
2890         * configure: Regenerated.
2891         * config.in: Regenerated
2892         * system.h (stdint.h): Add include.
2893         (inttypes.h): Likewise.
2894         * Makefile.in (aclocal): Add config/stdint.m4.
2895         * aclocal.m4: Regenerated.
2896
2897 2009-09-08  Bernd Schmidt  <bernd.schmidt@analog.com>
2898
2899         * config/bfin/bfin.c (np_check_regno, np_after_branch): New static
2900         variables.
2901         (note_np_check_stores): New function.
2902         (harmless_null_pointer_p): New function.
2903         (trapping_loads_p): New args NP_REG and AFTER_NP_BRANCH.  Callers
2904         changed.  Take into account whether we're in the shadow of a condjump
2905         that tested NP_REG for NULL.
2906         Lose all code that tested for SEQUENCEs.
2907         (workaround_speculation): Avoid inserting NOPs for loads that are
2908         either always executed or a NULL pointer.
2909
2910 2009-09-08  Jan Hubicka  <jh@suse.cz>
2911
2912         * doc/invoke.texi (early-inlining-insns): Reduce from 12 to 8.
2913         * params.def (early-inlining-insns): Likewise.
2914
2915 2009-09-08  Jakub Jelinek  <jakub@redhat.com>
2916
2917         PR rtl-optimization/41239
2918         * sched-int.h (struct deps): Add last_function_call_may_noreturn field.
2919         * sched-rgn.c (deps_join): Join also last_function_call_may_noreturn
2920         lists.
2921         * sched-deps.c (sched_analyze_insn): Prevent moving trapping insns
2922         across calls, as the calls might not always return normally.
2923         (call_may_noreturn_p): New function.
2924         (deps_analyze_insn): Update last_function_call_may_noreturn list.
2925         (init_deps): Initialize it.
2926         (remove_from_deps): Also remove calls from
2927         last_function_call_may_noreturn list.
2928
2929 2009-09-07  Richard Henderson  <rth@redhat.com>
2930
2931         * tree-ssa-sccvn.c (vn_reference_lookup_3): Don't assume there are
2932         more VR->OPERANDS than LHS operands.  Free LHS before returning.
2933
2934 2009-09-07  Bernd Schmidt  <bernd.schmidt@analog.com>
2935
2936         * config/bfin/bfin.md (UNSPEC_VOLATILE_STALL): New constant.
2937         (attr "addrtype"): New member "spreg".
2938         Use it if mem_spfp_address_operand is true for the address.
2939         (attr "type"): New entry "stall".
2940         (cpu_unit "load"): New.
2941         (insn_reservations "load32", "loadp", "loadi"): Add reservation of
2942         "load".
2943         (insn_reservation "loadsp"): New.
2944         (insn_reservation "load_stall1"): New.
2945         (insn_reservation "load_stall3"): New.
2946         (stall): New insn.
2947         * config/bfin/predicates.md (const1_operand, const3_operand): New.
2948         (mem_p_address_operand): Exclude stack and frame pointer based
2949         addresses.
2950         (mem_spfp_address_operand): New; match them here.
2951         * config/bfin/bfin.c (add_sched_insns_for_speculation): New function.
2952         (bfin_reorg): Call it if scheduling insns.
2953         (bfin_gen_bundles): Remove dummy insns created by
2954         add_sched_insns_for_speculation.
2955
2956         From Jie Zhang <jie.zhang@analog.com>:
2957         * config/bfin/bfin-protos.h (enum bfin_cpu_type, bfin_cpu_type,
2958         bfin_si_revision, bfin_workarounds): Move these ...
2959         * config/bfin/bfin.h: ... here.
2960
2961         From Mike Frysinger  <michael.frysinger@analog.com>
2962         * config/bfin/bfin-protos.h (bfin_cpu_type): Add BFIN_CPU_BF542M,
2963         BFIN_CPU_BF544M, BFIN_CPU_BF547M, BFIN_CPU_BF548M, and BFIN_CPU_BF549M.
2964         * config/bfin/bfin.c (bfin_cpus[]): Add 0.3 for bf542m, bf544m,
2965         bf547m, bf548m, and bf549m.
2966         * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Define __ADSPBF542M__
2967         for BFIN_CPU_BF542M, __ADSPBF544M__ for BFIN_CPU_BF544M,
2968         __ADSPBF547M__ for BFIN_CPU_BF547M, __ADSPBF548M__ for
2969         BFIN_CPU_BF548M, and __ADSPBF549M__ for BFIN_CPU_BF549M.
2970         * config/bfin/t-bfin-elf (MULTILIB_MATCHES): Select bf532-none for
2971         bf542m-none, bf544m-none, bf547m-none, bf548m-none, and bf549m-none.
2972         * config/bfin/t-bfin-linux (MULTILIB_MATCHES): Likewise.
2973         * config/bfin/t-bfin-uclinux (MULTILIB_MATCHES): Likewise.
2974         * doc/invoke.texi (Blackfin Options): Document that -mcpu now accepts
2975         bf542m, bf544m, bf547m, bf548m, and bf549m.
2976
2977         From Jie Zhang <jie.zhang@analog.com>:
2978         * config/bfin/predicates.md (p_register_operand): New predicate.
2979         (dp_register_operand): New predicate.
2980         * config/bfin/bfin-protos.h (WA_05000074): Define.
2981         (ENABLE_WA_05000074): Define.
2982         * config/bfin/bfin.c (bfin_cpus[]): Add WA_05000074 for all cpus.
2983         (bfin_gen_bundles): Put dsp32shiftimm instruction in slot[0].
2984         * config/bfin/bfin.md (define_attr type): Add dsp32shiftimm.
2985         (define_attr addrtype): Allow load/store register to be P register.
2986         (define_attr storereg): New.
2987         (define_cpu_unit anomaly_05000074): New.
2988         (define_insn_reservation dsp32shiftimm): New.
2989         (define_insn_reservation dsp32shiftimm_anomaly_05000074): New.
2990         (define_insn_reservation loadp): Cannot use slot2.
2991         (define_insn_reservation loadsp): Cannot use slot2.
2992         (define_insn_reservation storep): Cannot use slot2. Does not
2993         apply when working around 05000074.
2994         (define_insn_reservation storep_anomaly_05000074): New.
2995         (define_insn_reservation storei): Does not apply when working
2996         around 05000074.
2997         (define_insn_reservation storei_anomaly_05000074): New.
2998         (define_attr length): Add dsp32shiftimm case.
2999         (define_insn movsi_insn32, movsi_insv, ashlsi3_insn, ashrsi3,
3000         ror_one, rol_one, lshrsi3, lshrpdi3, ashrpdi3, movhiv2hi_low,
3001         movhiv2hi_high, composev2hi, packv2hi, movv2hi_hi,
3002         ssashiftv2hi3, ssashifthi3, ssashiftsi3, lshiftv2hi3, lshifthi3):
3003         Set type as dsp32shiftimm for dsp32shiftimm alternatives.
3004
3005 2009-09-07  Martin Jambor  <mjambor@suse.cz>
3006
3007         PR middle-end/41282
3008         * tree-sra.c (create_artificial_child_access): Return NULL if
3009         build_ref_for_offset fails.
3010         (propagate_subacesses_accross_link): Allow build_ref_for_offset
3011         and create_artificial_child_access to fail.
3012
3013 2009-09-06  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
3014
3015         PR c++/41214
3016         * unwind-dw2.c (uw_init_context_1): Mark noinline.
3017         * config/ia64/unwind-ia64.c (uw_init_context_1): Likewise.
3018         * config/xtensa/unwind-dw2-xtensa.c (uw_init_context_1): Likewise.
3019
3020 2009-09-07  Bernd Schmidt  <bernd.schmidt@analog.com>
3021
3022         * config/bfin/bfin.c (bfin_optimize_loop): When creating a new basic
3023         block, ensure it has an exit edge.  Emit a barrier after a jump.
3024
3025 2009-09-07  Nick Clifton  <nickc@redhat.com>
3026
3027         * gcc.c (this_is_linker_script): New variable.  Like
3028         this_is_library_file but for the %T constructor.
3029         (end_going_arg): If this_is_linker_script is set then locate the
3030         script and insert a --script switch before it
3031         (do_spec_2): Initialise this_is_linker_script.
3032         (do_spec_1): Likewise.  Handle %T construct.
3033         (eval_spec_function): Preserve this_is_linker_script.
3034         * doc/invoke.texi: Document %T construct in spec files.
3035         * config/m32c/m32c.h (LIB_SPEC): Use it.
3036
3037 2009-09-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
3038
3039         * rtl.h (PREFETCH_SCHEDULE_BARRIER_P): New macro.
3040         * sched-deps.c (sched_analyze_2): Make prefetches a hard barrier
3041         when volatile flag is set.
3042         * doc/rtl.texi (PREFETCH_SCHEDULE_BARRIER_P): Add documentation pieces.
3043
3044 2009-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3045
3046         PR bootstrap/41241
3047         * combine-stack-adj.c (try_apply_stack_adjustment): Handle stores.
3048         (combine_stack_adjustments_for_block): Allow insns between stack
3049         adjustments and stores with corresponding pre-(dec|inc)rement or
3050         pre-modify operation.
3051
3052 2009-09-06  Jakub Jelinek  <jakub@redhat.com>
3053
3054         PR bootstrap/41241
3055         * combine-stack-adj.c (struct csa_memlist): Rename to...
3056         (struct csa_reflist): ... this.  Rename mem field to ref.
3057         (free_csa_memlist): Rename to...
3058         (free_csa_reflist): ... this.
3059         (record_one_stack_memref): Rename to...
3060         (record_one_stack_ref): ... this.  Handle also REG_P.
3061         (try_apply_stack_adjustment): Handle also REG_P.
3062         (struct record_stack_memrefs_data): Rename to...
3063         (struct record_stack_refs_data): ... this.  Rename memlist field to
3064         reflist.
3065         (record_stack_memrefs): Rename to...
3066         (record_stack_refs): ... this.  For DEBUG_INSNs keep traversing
3067         subexpressions instead of failing when a MEM contains SP references.
3068         For SP itself in DEBUG_INSNs queue it also onto reflist chain.
3069         (combine_stack_adjustments_for_block): Adjust for mem to ref renaming.
3070
3071 2009-09-06  Richard Guenther  <rguenther@suse.de>
3072
3073         PR middle-end/41144
3074         * tree.c (build_array_type): Do not record types marked
3075         with structural equality in the canonical type hashtable.
3076
3077 2009-09-06  Richard Guenther  <rguenther@suse.de>
3078
3079         PR middle-end/41261
3080         * tree-ssa-alias.c (refs_may_alias_p_1): Bail out for function decls.
3081
3082 2009-09-05  Richard Guenther  <rguenther@suse.de>
3083
3084         PR middle-end/41181
3085         * tree-ssa-ccp.c (maybe_fold_stmt_addition): Use the correct type.
3086
3087 2009-09-05  Richard Guenther  <rguenther@suse.de>
3088
3089         PR debug/41273
3090         * tree-ssa-operands.c (get_tmr_operands): Pass through opf_no_vops.
3091
3092 2009-09-05  Richard Guenther  <rguenther@suse.de>
3093
3094         PR middle-end/41271
3095         * tree-ssa.c (useless_type_conversion_p): Drop qualifiers
3096         before comparing function argument types.
3097
3098 2009-09-05  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3099
3100         PR target/41024
3101         * config/i386/mingw-w64.h (ASM_SPEC): Pass -v instead of -V to
3102         the assembler.
3103
3104 2009-09-04  Uros Bizjak  <ubizjak@gmail.com>
3105
3106         Revert:
3107         2009-08-18  Uros Bizjak  <ubizjak@gmail.com>
3108
3109         * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Allocate insn
3110         locators before emit_insn is called.
3111
3112 2009-09-04  Vladimir Makarov  <vmakarov@redhat.com>
3113
3114         PR bootstrap/41241
3115         * ira.c (update_equiv_reg): Revert my previous patch for the PR.
3116         * reginfo.c (resize_reg_info): Call allocate_reg_info if necessary.
3117         (reginfo_init): Don't call allocate_reg_info.
3118
3119 2009-09-04  Uros Bizjak  <ubizjak@gmail.com>
3120
3121         PR target/41262
3122         * config/alpha/alpha.c (alpha_does_function_need_gp): Use
3123         NONDEBUG_INSN_P instead of INSN_P.
3124
3125 2009-09-04  Alexandre Oliva  <aoliva@redhat.com>
3126
3127         PR debug/41225
3128         * tree-vect-stmts.c (vect_stmt_relevant_p): Skip debug uses.
3129
3130 2009-09-04  Alexandre Oliva  <aoliva@redhat.com>
3131
3132         PR target/41252
3133         * config/arm/vfp.md (*cmpdf_split_vfp): Fix src mode in the second
3134         pattern of the split.
3135
3136 2009-09-04  Alexandre Oliva  <aoliva@redhat.com>
3137
3138         * toplev.c (process_options): Move setter of flag_var_tracking
3139         before other tests that depend on it.  Move down setter of
3140         flag_rename_registers.  Don't enable var-tracking-assignments
3141         by default if selective scheduling is enabled.  Warn if both
3142         are enabled.
3143
3144 2009-09-04  Alexandre Oliva  <aoliva@redhat.com>
3145
3146         * var-tracking.c (dv_is_decl_p): Adjust NULL behavior to match
3147         comment.  Use switch statement to catch overlaps between rtx
3148         and tree codes.  Accept FUNCTION_DECLs in addition to those in...
3149         (IS_DECL_CODE): ... here. Remove.
3150         (check_value_is_not_decl): Remove.
3151         (dv_from_decl, dv_from_value): Check after conversion.
3152
3153 2009-09-04  Richard Guenther  <rguenther@suse.de>
3154
3155         PR middle-end/41257
3156         * (cgraph_finalize_compilation_unit): Move finalizing aliases
3157         after emitting tunks.  Move emitting thunks and ctors from ...
3158         (cgraph_optimize): ... here.  Remove redundant
3159         cgraph_analyze_functions.
3160         * varasm.c (find_decl_and_mark_needed): Remove no longer
3161         necessary check.
3162         (finish_aliases_1): Adjust check for thunk aliases.
3163
3164 2009-09-04  Daniel Gutson  <dgutson@codesourcery.com>
3165
3166         * config/arm/arm.md (ctzsi2): Added braces
3167         to avoid warning that broke booststrap.
3168
3169 2009-09-04  Martin Jambor  <mjambor@suse.cz>
3170
3171         PR tree-optimization/41112
3172         * tree-sra.c (build_ref_for_offset_1): Signal that we cannot
3173         handle variable-bounded arrays.
3174         (expr_with_var_bounded_array_refs_p): New function.
3175         (analyze_access_subtree): Call expr_with_var_bounded_array_refs_p.
3176
3177 2009-09-04  Wolfgang Gellerich  <gellerich@de.ibm.com>
3178
3179         * config/s390/2097.md: Removed two incorrect bypasses.
3180         (z10_fsimpdf): Fixed latency.
3181         (z10_fhex): New insn_reservation.
3182         (z10_floaddf): Fixed latency.
3183         (z10_floadsf): Fixed latency.
3184         (z10_ftrunctf): Fixed latency.
3185         (z10_ftruncdf): Fixed latency.
3186         * config/s390/s390.c (z10_cost): Fixed values.
3187         (s390_adjust_priority): Added z10 path.
3188         * config/s390/s390.md (type): Added fhex.
3189         (*mov<mode>_64dfp): Updated type attribute.
3190         (*mov<mode>_64): Updated type attribute.
3191         (*mov<mode>_31): Updated type attribute.
3192         (*mov<mode>"): Likewise.
3193         * config/s390/2084.md (x_fsimpdf): Updated condition.
3194
3195 2009-09-04  Andreas Krebbel  <krebbel1@de.ibm.com>
3196
3197         * config/s390/s390.md ("*fmadd<mode>", "*fmsub<mode>"): Enable mem
3198         RTXs in the predicate for operand 1.
3199
3200 2009-09-03  Daniel Gutson  <dgutson@codesourcery.com>
3201
3202         * config/arm/arm.md (UNSPEC_RBIT): New constant.
3203         (rbitsi2): New insn.
3204         (ctzsi2): New expand.
3205         * config/arm/arm.h (CTZ_DEFINED_VALUE_AT_ZERO): New macro.
3206
3207 2009-09-03  Martin Jambor  <mjambor@suse.cz>
3208
3209         * tree-sra.c (duplicate_expr_for_different_base): Removed.
3210         (create_artificial_child_access): Use build_ref_for_offset instead
3211         of duplicate_expr_for_different_base.
3212         (propagate_subacesses_accross_link): Likewise.
3213
3214 2009-09-03  Richard Sandiford  <rdsandiford@googlemail.com>
3215
3216         * config/mips/mips.c (USEFUL_INSN_P): Use NONDEBUG_INSN_P instead
3217         of INSN_P.
3218         (mips16e_collect_argument_saves): Skip debug instructions.
3219         (mips_74k_agen_init): Use CALL_P || JUMP_P instead of !NONJUMP_INSN_P.
3220         (mips16_lay_out_constants): Use USEFUL_INSN_P instead of INSN_P.
3221         (r10k_insert_cache_barriers): Likewise.
3222         (mips_reorg_process_insns): Likewise.
3223
3224 2009-09-03  Vladimir Makarov  <vmakarov@redhat.com>
3225
3226         PR bootstrap/41241
3227         * ira.c (update_equiv_reg): Remove check on class likely spill.
3228
3229 2009-09-03  Jakub Jelinek  <jakub@redhat.com>
3230
3231         PR debug/41236
3232         * dwarf2out.c (loc_descriptor): Don't use SUBREG_REG macro on
3233         SIGN_EXTEND or ZERO_EXTEND.  Don't assume there is a REG inside of
3234         it or SUBREG.
3235
3236         PR debug/41238
3237         * function.c (assign_parm_find_stack_rtl): Don't set mem attributes on
3238         the stack slot if it is passed by invisible reference.
3239         * var-tracking.c (vt_add_function_parameters): Handle arguments passed
3240         by invisible reference.
3241
3242 2009-09-03  Bernd Schmidt  <bernd.schmidt@analog.com>
3243
3244         * config/bfin/linux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
3245         * config/bfin/uclinux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
3246         * config/bfin/bfin.h (TARGET_SUPPORTS_SYNC_CALLS): Provide default of
3247         0.
3248         * config/bfin/sync.md: New file.
3249         * config/bfin/bfin.md: Include it.
3250         (UNSPEC_ATOMIC): New.
3251         (UNSPEC_ONES): Provide a unique number.
3252
3253         From Jie Zhang <jie.zhang@analog.com>:
3254         * config/bfin/bfin.c (ret_regs): New.
3255         (must_save_fp_p): Don't return true because of frame_pointer_needed.
3256         (must_save_rets_p): New.
3257         (n_regs_saved_by_prologue): Use must_save_rets_p instead of
3258         current_function_is_leaf.
3259         (do_link): Likewise.
3260         (do_unlink): Likewise.
3261         (expand_interrupt_handler_prologue): Use ret_regs array.
3262         (expand_interrupt_handler_epilogue): Use ret_regs array and
3263         pass return register to gen_return_internal.
3264         (bfin_expand_epilogue): Pass return register to
3265         gen_return_internal.
3266         (bfin_expand_call): Explicitly clobber RETS.
3267         * config/bfin/bfin.h (FUNCTION_RETURN_REGISTERS): Define.
3268         * config/bfin/bfin.md (call_symbol_fdpic, call_value_symbol_fdpic,
3269         call_insn_fdpic, call_value_insn_fdpic, call_symbol,
3270         call_value_symbol, call_insn, call_value_insn): Explicitly clobber
3271         RETS.
3272         (return_internal): Take a reg rtx rather than the register number.
3273
3274 2009-09-03  H.J. Lu  <hongjiu.lu@intel.com>
3275
3276         * tree-parloops.c (parallelize_loops): Cast to HOST_WIDE_INT
3277         when comparing against estimated_loop_iterations_int return.
3278
3279 2009-09-03  Richard Guenther  <rguenther@suse.de>
3280
3281         * dwarf2out.c (dwarf2out_do_cfi_asm): Remove check of
3282         eh_personality_libfunc.
3283
3284 2009-09-03  Razya Ladelsky  <razya@il.ibm.com>
3285
3286         * tree-parloops.c (separate_decls_in_region): Add space.
3287
3288 2009-09-03  Razya Ladelsky  <razya@il.ibm.com>
3289
3290         * tree-parloops.c (separate_decls_in_region): Change the condition
3291         checking if there are reductions in the loop.
3292
3293 2009-09-03  Razya Ladelsky  <razya@il.ibm.com>
3294
3295         PR tree-optimization/38275
3296         * tree-parloops.c (parallelize_loops): Replace profitability condition
3297         for expected number of iterations.
3298
3299 2009-09-03  Alexandre Oliva  <aoliva@redhat.com>
3300
3301         * doc/invoke.texi (BUILD_CONFIG): Document --with-build-config.
3302         (bootstrap-debug): Explain conditions in which it becomes default.
3303         (bootstrap-debug-big): Rather than duplicate bootstrap-debug,
3304         make it add to it.
3305
3306 2009-09-03  Namhyung Kim  <namhyung@gmail.com>
3307
3308         * doc/invoke.texi (Optimize Options): Move
3309         -finline-small-functions to the -O2 list.
3310
3311 2009-09-03  Alexandre Oliva  <aoliva@redhat.com>
3312
3313         * toplev.c (process_options): Enable var-tracking-assignments
3314         by default if var-tracking is enabled.
3315
3316 2009-09-02  David Daney  <ddaney@caviumnetworks.com>
3317
3318         * cfgbuild.c (find_bb_boundaries): Split blocks containing a
3319         barrier.
3320         * emit-rtl.c (prev_nonnote_insn_bb): New function.
3321         * rtl.h (prev_nonnote_insn_bb): Declare it.
3322
3323 2009-09-03  Diego Novillo  <dnovillo@google.com>
3324
3325         * cgraph.c (cgraph_node_for_decl): New.
3326         * cgraph.h (cgraph_node_for_decl): Declare.
3327         * tree.c (host_integerp): Return 0 if T is NULL.
3328
3329 2009-09-03  Diego Novillo  <dnovillo@google.com>
3330
3331         * tree.h (struct alias_pair): Move from varasm.c.
3332         (alias_pairs): Likewise.
3333         (TYPE_MAXVAL): Define.
3334         (TYPE_MINVAL): Define.
3335         (iterative_hash_host_wide_int): Declare.
3336         (remove_unreachable_alias_pairs): Declare.
3337         * tree-pass.h (pass_ipa_free_lang_data): Declare.
3338         * diagnostic.c (default_diagnostic_starter): Make extern.
3339         (default_diagnostic_finalizer): Make extern.
3340         * diagnostic.h (default_diagnostic_starter): Declare.
3341         (default_diagnostic_finalizer): Declare.
3342         (default_tree_printer): Declare.
3343         * toplev.c (default_tree_printer): Make extern.
3344
3345 2009-09-03  Richard Guenther  <rguenther@suse.de>
3346             Diego Novillo  <dnovillo@google.com>
3347
3348         * cgraph.c (cgraph_add_new_function): Remove gimplification.
3349         * cgraphunit.c (cgraph_expand_function): Do not emit
3350         associated thunks from here.
3351         (cgraph_emit_thunks): New.
3352         (cgraph_optimize): Call it.
3353         Return if any IPA pass finds an error.
3354         * varasm.c (finish_aliases_1): Ignore errorneous aliases used
3355         by thunks.
3356
3357 2009-09-03  Simon Baldwin  <simonb@google.com>
3358             Rafael Espindola  <espindola@google.com>
3359             Richard Guenther  <rguenther@suse.de>
3360             Doug Kwan  <dougkwan@google.com>
3361             Diego Novillo  <dnovillo@google.com>
3362
3363         * tree.c: Include tree-pass.h, langhooks-def.h,
3364         diagnostic.h, cgraph.h, timevar.h, except.h and debug.h.
3365         (free_lang_data_in_type): New.
3366         (need_assembler_name_p): New.
3367         (free_lang_data_in_block): New.
3368         (free_lang_data_in_decl): New.
3369         (struct free_lang_data_d): New.
3370         (add_tree_to_fld_list): New.
3371         (find_decls_types_r): New.
3372         (get_eh_types_for_runtime): New.
3373         (find_decls_types_in_eh_region): New.
3374         (find_decls_types_in_node): New.
3375         (find_decls_types_in_var): New.
3376         (free_lang_data_in_cgraph): New.
3377         (free_lang_data): New.
3378         (gate_free_lang_data): New.
3379         (pass_ipa_free_lang_data): New.
3380
3381 2009-09-03  Diego Novillo  <dnovillo@google.com>
3382
3383         * timevar.def (TV_IPA_FREE_LANG_DATA): Define.
3384         * langhooks.h (struct lang_hooks): Add field free_lang_data.
3385         (lang_hooks): Remove const qualifier.
3386         * ipa.c (cgraph_remove_unreachable_nodes): Call
3387         remove_unreachable_alias_pairs.
3388         * except.c (add_type_for_runtime): Check if TYPE has
3389         already been converted.
3390         (lookup_type_for_runtime): Likewise.
3391         (check_handled): Handle converted types.
3392         * varasm.c (remove_unreachable_alias_pairs): New.
3393         * gimple.c: Include demangle.h.
3394         (gimple_decl_printable_name): New.
3395         (gimple_fold_obj_type_ref): New.
3396         * gimple.h (gimple_decl_printable_name): Declare.