OSDN Git Service

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