OSDN Git Service

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