OSDN Git Service

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