OSDN Git Service

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