OSDN Git Service

87ccb792d568043816c9f58ce657a634c1a6e4e9
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2009-10-19  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2
3         * config/s390/s390.c (s390_z10_optimize_cmp): Use
4         next/prev_active_insn to skip DEBUG_INSNs as well.
5
6 2009-10-19  Joseph Myers  <joseph@codesourcery.com>
7
8         * config/arm/arm.c (output_move_neon): Use DImode in call to
9         adjust_address.
10
11 2009-10-19  Matthias Klose  <doko@ubuntu.com>
12
13         PR target/40134
14         * config.gcc (arm*-*-linux-*eabi): Use config/t-slibgcc-libgcc.
15
16 2009-10-19  Jakub Jelinek  <jakub@redhat.com>
17
18         * cfgexpand.c (expand_debug_expr): Fail if bitpos < 0 for non-MEM
19         op0.
20
21 2009-10-17  Andy Hutchinson  <hutchinsonandy@gcc.gnu.org>
22
23         PR middle-end/41738
24         * optabs.c (expand_binop): Make mode of shift count expression mode
25         of shift count not target.
26         Remove indent nit.
27
28 2009-10-17  Eric Botcazou  <ebotcazou@adacore.com>
29
30         * tree-nested.c (convert_nonlocal_reference_stmt) <GIMPLE_COND>: New
31         case.  Force using values to replace references within the statement.
32         (convert_local_reference_stmt): Likewise.
33
34 2009-10-17  Eric Botcazou  <ebotcazou@adacore.com>
35
36         * gimple-low.c (lower_stmt) <GIMPLE_CALL>: If the call is noreturn,
37         remove a subsequent GOTO or RETURN statement.
38
39 2009-10-17  Andy Hutchinson  <hutchinsonandy@aim.com>
40
41         * config/avr.md (*movqi): Add zero as equally preferable constraint
42         as general register.
43         (*movhi): Ditto.
44
45 2009-10-17  Eric Botcazou  <ebotcazou@adacore.com>
46
47         * print-tree.c (print_node): Fix string for DECL_STRUCT_FUNCTION.
48
49 2009-10-17  Richard Guenther  <rguenther@suse.de>
50
51         * lto-streamer-in.c (lto_input_location): Try to reuse
52         previous maps.
53
54 2009-10-17  Richard Guenther  <rguenther@suse.de>
55
56         * lto-streamer-in.c (input_gimple_stmt): Fixup FIELD_DECL
57         operands in COMPONENT_REFs.
58
59 2009-10-17  Anatoly Sokolov  <aesok@post.ru>
60
61         * targhooks.c (default_libcall_value): Don't use LIBCALL_VALUE macro
62         if not defined. Change type of second argument to const_rtx.
63         (default_function_value): Call gcc_unreachable if FUNCTION_VALUE
64         macro not defined.
65         * targhooks.h (default_libcall_value): Update prototype.
66         * target.h (struct gcc_target): Change type of second argument of
67         libcall_value to const_rtx.
68         * config/arm/arm.c (arm_libcall_value): Change type of second argument
69         to const_rtx.
70         (arm_libcall_uses_aapcs_base): Change type of argument to const_rtx.
71         * doc/tm.texi (TARGET_LIBCALL_VALUE):  Revise documentation.
72
73 2009-10-17  Jakub Jelinek  <jakub@redhat.com>
74
75         PR debug/40521
76         * debug.h (struct gcc_debug_hooks): Add assembly_start hook.
77         * cgraphunit.c (cgraph_optimize): Call it.
78         * dwarf2out.c (dwarf2out_init): Move .cfi_sections printing into...
79         (dwarf2out_assembly_start): ... here.  New hook.
80         (dwarf2out_debug_hooks): Add dwarf2out_assembly_start.
81         * debug.c (do_nothing_debug_hooks): Do nothing for assembly_start
82         hook.
83         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
84         * sdbout.c (sdb_debug_hooks): Likewise.
85         * vmsdbgout.c (vmsdbg_debug_hooks): Add vmsdbgout_assembly_start.
86         (vmsdbgout_assembly_start): New hook.
87
88 2009-10-17  Alexandre Oliva  <aoliva@redhat.com>
89
90         * rtl.h (RTL_LOCATION): Fix typo.
91
92 2009-10-17  Alexandre Oliva  <aoliva@redhat.com>
93
94         * print-rtl.c (print_rtx): Print locators in asm_operands
95         and asm_input.
96
97 2009-10-17  Alexandre Oliva  <aoliva@redhat.com>
98
99         PR debug/41535
100         * sched-deps.c (depl_on_debug_p): New.
101         (attach_dep_link): Reject debug deps before nondebug deps.
102         (add_to_deps_list): Insert debug deps after nondebug deps.
103         (sd_lists_empty_p): Stop at first nonempty list.  Disregard debug
104         deps.
105         (sd_add_dep): Do not reject debug deps.
106         (add_insn_mem_dependence): Don't count debug deps.
107         (remove_from_deps): Likewise.
108         (sched_analyze_2): Set up mem deps on debug insns.
109         (sched_analyze_insn): Record reg uses for deps on debug insns.
110         * haifa-sched.c (schedule_insn): Reset deferred debug insn.  Don't
111         try_ready nondebug insn after debug insn.
112         * ddg.c (create_ddg_dep_from_intra_loop_link,
113         create_ddg_dep_no_link): Don't reject debug deps.
114
115 2009-10-16  Richard Guenther  <rguenther@suse.de>
116
117         * lto-symtab.c (merge_incomplete_and_complete_type): Remove.
118         (maybe_merge_incomplete_and_complete_type): Likewise.
119         (lto_symtab_merge): Do not call them.  Do not warn for
120         complete vs. incomplete compatible types.
121         (lto_symtab_merge_decls_2): Simplify.
122         * gimple.c (gimple_force_type_merge): Remove.
123         (gimple_types_compatible_p): Make it static.
124         * gimple.h (gimple_force_type_merge): Remove.
125         (gimple_types_compatible_p): Likewise.
126
127 2009-10-16  Jakub Jelinek  <jakub@redhat.com>
128
129         * dwarf2out.c (mem_loc_descriptor) <case ZERO_EXTRACT>: Cast
130         DWARF2_ADDR_SIZE to int to avoid signed vs. unsigned warnings.
131
132 2009-10-16  Richard Guenther  <rguenther@suse.de>
133
134         PR tree-optimization/41728
135         * tree-ssa-dom.c (optimize_stmt): Mark the stmt modified
136         if fold_stmt did anything.
137
138 2009-10-16  Richard Guenther  <rguenther@suse.de>
139
140         PR lto/41715
141         * lto-streamer-in.c (lto_input_tree_ref): Revert last change.
142         (maybe_fixup_handled_component): New function.
143         (input_gimple_stmt): Fixup mismatched decl replacements.
144
145 2009-10-16  Richard Guenther  <rguenther@suse.de>
146
147         PR lto/41713
148         * lto-streamer-out.c (lto_output_tree_ref): Handle DEBUG_EXPR_DECL
149         the same as VAR_DECL.
150
151 2009-10-16  Richard Guenther  <rguenther@suse.de>
152
153         * gimple.c (iterative_hash_gimple_type): For integer types
154         also hash their minimum and maximum values and the string flag.
155         For array types hash their domain and the string flag.
156
157 2009-10-16  Richard Guenther  <rguenther@suse.de>
158
159         * gimple.c (gimple_types_compatible_p): Restrict completing
160         types to record or unions.  Simplify completion.
161         Do not merge records or unions with different
162         TYPE_STRUCTURAL_EQUALITY_P tag.
163         (iterative_hash_gimple_type): Restrict non-recursing into
164         pointer targets for records and unions.
165
166 2009-10-15  Jakub Jelinek  <jakub@redhat.com>
167
168         PR debug/41717
169         * cfgexpand.c (expand_debug_expr): Handle CONJ_EXPR.
170         * dwarf2out.c (mem_loc_descriptor): Don't handle
171         POST_INT/POST_DEC/POST_MODIFY like SUBREG.  For SUBREG
172         punt if it is not lowpart subreg or if inner mode isn't
173         MODE_INT.
174
175 2009-10-16  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
176
177         * config/s390/s390.c (s390_z10_optimize_cmp): Skip notes when
178         investigating previous or next insns.
179
180 2009-10-16  Eric Botcazou  <ebotcazou@adacore.com>
181
182         * tree-sra.c (build_ref_for_offset_1): Update comment.
183
184 2009-10-16  Wolfgang Gellerich  <gellerich@de.ibm.com>
185
186         * config/s390/s390.md (atype): Added missing values.
187
188 2009-10-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
189
190         PR target/41702
191         * pa.md (casesi): Use sign extended index in call to
192         gen_casesi64p.
193         (casesi64p): Update pattern to reflect above.
194
195 2009-10-15  Steve Ellcey  <sje@cup.hp.com>
196
197         PR rtl-optimization/41697
198         * sel-sched-ir.h (_eligible_successor_edge_p): Check successor count.
199
200 2009-10-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
201
202         PR target/23983
203         * config/rs6000/predicates.md: Update copyright year.
204         * config/rs6000/altivec.md: Ditto.
205         
206         * config/rs6000/t-rs6000 (TM_H): Add rs6000-builtin.def.
207         (MD_INCLUDES): Add a2.md.
208         
209         * config/rs6000/rs6000.c (rs6000_builtin_decls): Change
210         RS6000_BUILTIN_COUNT to MAX_RS6000_BUILTINS.
211         (builtin_classify): New static vector to classify various builtins
212         to get the tree attributes correct.
213         (def_builtin): Set the attributes of builtins based on what the
214         builtin does (i.e. memory operation, floating point, saturation
215         need special attributes, others are pure functions).
216
217         * config/rs6000/rs6000.h (enum rs6000_btc): New enum to classify
218         the builtins.
219         (enum rs6000_builtins): Include rs6000-builtin.def to define the
220         builtins.  Change the end marker to MAX_RS6000_BUILTINS from
221         RS6000_BUILTIN_COUNT.
222         (rs6000_builtin_decls): Change RS6000_BUILTIN_COUNT to
223         MAX_RS6000_BUILTINS.
224
225         * config/rs6000/rs6000-builtin.def: New file that combines the
226         builtin enumeration name and attributes.
227
228 2009-10-15  H.J. Lu  <hongjiu.lu@intel.com>
229
230         * config/i386/linux.h (ASM_SPEC): Add --32.
231
232 2009-10-15  Jakub Jelinek  <jakub@redhat.com>
233
234         * dwarf2out.c (dwarf_tag_name): Handle DW_TAG_rvalue_reference_type
235         and DW_TAG_template_alias.
236         (dwarf_attr_name): Handle DW_AT_main_subprogram,
237         DW_AT_data_bit_offset, DW_AT_const_expr, DW_AT_enum_class,
238         DW_AT_linkage_name, DW_AT_GNU_guarded_by, DW_AT_GNU_pt_guarded_by,
239         DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded, DW_AT_GNU_locks_excluded,
240         DW_AT_GNU_exclusive_locks_required, DW_AT_GNU_shared_locks_required
241         and DW_AT_GNU_odr_signature.
242         (dwarf_form_name): Handle DW_FORM_sec_offset, DW_FORM_exprloc,
243         DW_FORM_flag_present and DW_FORM_ref_sig8.
244         (output_signature): Only print name on the first byte.
245         (output_die): Likewise for dw_val_class_data8.
246
247 2009-10-15  Alexander Monakov  <amonakov@ispras.ru>
248
249         * doc/invoke.texi: Clarify that most optimizations are not enabled
250         without -O.
251
252 2009-10-15  Richard Guenther  <rguenther@suse.de>
253
254         PR lto/41668
255         * gimple.c (compare_type_names_p): Handle anonymous names
256         differently based on new mode argument.
257         (gimple_types_compatible_p): For structs also compare the tags.
258         (iterative_hash_type_name): Rename to ...
259         (iterative_hash_name): ... this.  Hash all names.
260         (iterative_hash_gimple_type): Fix hashing the struct tag of
261         pointer targets.  Hash field decl names.
262
263 2009-10-15  Richard Guenther  <rguenther@suse.de>
264
265         PR lto/41669
266         * gimple.c (gimple_get_alias_set): Avoid recursing on
267         invalid type topology.
268
269 2009-10-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
270
271         * config/spu/spu.c (get_branch_target): Use extract_asm_operands.
272
273 2009-10-15  Richard Guenther  <rguenther@suse.de>
274
275         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
276
277 2009-10-15  Jakub Jelinek  <jakub@redhat.com>
278
279         * config/rs6000/option-defaults.h (OPTION_DEFAULT_SPECS): Don't
280         add --with-tune{,-32,-64} configured default for -mtune if explicit
281         -mcpu is used.
282
283 2009-10-14  Daniel Gutson  <dgutson@codesourcery.com>
284
285         * config/arm/neon.md (neon_vshll_n<mode>): Checking Bounds
286         fixed.
287
288 2009-10-14  DJ Delorie  <dj@redhat.com>
289         
290         * config/h8300/h8300.c (F): New.
291         (Fpa): New.
292         (h8300_emit_stack_adjustment): Call them.
293         (push): Likewise.
294         (h8300_push_pop): Likewise.
295         (h8300_expand_prologue): Likewise.
296         * config/h8300/h8300.h (DWARF2_DEBUGGING_INFO): Define.
297         (MUST_USE_SJLJ_EXCEPTIONS): Define.
298         (INCOMING_RETURN_ADDR_RTX): Define.
299         (INCOMING_FRAME_SP_OFFSET): Define.
300         (DWARF_CIE_DATA_ALIGNMENT): Define.
301
302 2009-10-14  Jakub Jelinek  <jakub@redhat.com>
303
304         * stor-layout.c (place_field): Don't emit -Wpadded warnings for
305         fields in builtin structs.
306         (finalize_record_size): Likewise.
307
308 2009-10-14  Richard Guenther  <rguenther@suse.de>
309
310         * gimple.c (gtc_ob): New global.
311         (struct type_pair_d): Replace pointers with type UIDs.
312         (type_pair_hash): Adjust.
313         (type_pair_eq): Likewise.
314         (lookup_type_pair): Likewise.  Allocate from an obstack.
315         (gimple_force_type_merge): Adjust.
316         (gimple_types_compatible_p): Likewise.
317         (free_gimple_type_tables): Free the obstack.
318
319 2009-10-14  Jakub Jelinek  <jakub@redhat.com>
320
321         * tree-parloops.c (separate_decls_in_region_debug_bind): Drop debug
322         stmts setting DEBUG_EXPR_DECLs.
323
324         * cfgexpand.c (expand_debug_expr): Ignore zero-length bitfields.
325         Don't crash if mode1 is VOIDmode.
326
327 2009-09-26  Vladimir Makarov  <vmakarov@redhat.com>
328
329         * params.def (PARAM_IRA_LOOP_RESERVED_REGS): New.
330         * params.h (IRA_LOOP_RESERVED_REGS): New
331         * tree-pass.h (pass_subregs_of_mode_init,
332         pass_subregs_of_mode_finish): Remove.
333         * passes.c (pass_subregs_of_mode_init,
334         pass_subregs_of_mode_finish): Remove.
335         (pass_reginfo_init): Move before loop optimizations.
336         * config/i386/i386.h (STACK_REG_COVER_CLASS): Define.
337         * common.opt (fira-loop-pressure): New.
338         * toplev.h (flag_ira_loop_pressure): New.
339         * rtl.h (init_subregs_of_mode, finish_subregs_of_mode): New
340         externals.
341         * reginfo.c (init_subregs_of_mode, finish_subregs_of_mode):
342         Make external and void type functions.
343         (gate_subregs_of_mode_init, pass_subregs_of_mode_init,
344         pass_subregs_of_mode_finish): Remove.
345         * ira-costs.c (init_costs): Call init_subregs_of_mode.
346         * regmove.c: Include ira.h.
347         (regmove_optimize): Call ira_set_pseudo_classes after IRA based
348         register pressure calculation in loops.
349         * loop-invariant.c: Include REGS_H and ira.h.
350         (struct loop_data): New members max_reg_pressure, regs_ref, and
351         regs_live.
352         (struct invariant): New member orig_regno.
353         (curr_loop): New variable.
354         (find_exits): Initialize regs_ref and regs_live.
355         (create_new_invariant): Initialize orig_regno.
356         (get_cover_class_and_nregs): New.
357         (get_inv_cost): Make aregs_needed an array.  Use regs_needed as an
358         array.  Add code for flag_ira_loop_pressure.
359         (gain_for_invariant): Make new_regs an array.  Add code for
360         flag_ira_loop_pressure.
361         (best_gain_for_invariant): Ditto.
362         (set_move_mark): New parameter gain.  Use it for debugging output.
363         (find_invariants_to_move): Make regs_needed and new_regs an array.
364         Add code for flag_ira_loop_pressure.
365         (move_invariant_reg): Set up orig_regno.
366         (move_invariants): Set up reg classes for pseudos for
367         flag_ira_loop_pressure.
368         (free_loop_data): Clear regs_ref and regs_live.
369         (curr_regs_live, curr_reg_pressure, regs_set, n_regs_set,
370         get_regno_cover_class, change_pressure, mark_regno_live,
371         mark_regno_death, mark_reg_store, mark_reg_clobber,
372         mark_reg_death, mark_ref_regs, calculate_loop_reg_pressure): New.
373         (move_loop_invariants): Calculate pressure.  Initialize curr_loop.
374         * ira.c (ira): Call ira_set_pseudo_classes after IRA based
375         register pressure calculation in loops if new regs were added.
376         Call finish_subregs_of_mode.
377         * opts.c (decode_options): Set up flag_ira_loop_pressure.
378         * Makefile.in (loop-invariant.o): Add ira.h.
379         (regmove.o): Ditto.
380         * doc/invoke.texi (-fira-loop-pressure, ira-loop-reserved-regs):
381         Describe.
382         * doc/tm.texi (STACK_REG_COVER_CLASS): Describe.
383         
384 2009-10-14  Richard Guenther  <rguenther@suse.de>
385
386         * lto-symtab.c (lto_symtab_compatible): Fold in ...
387         (lto_symtab_merge): ... here.  Rewrite both to take the
388         prevailing and a to-be-merged entry and to queue diagnostics
389         properly.
390         (lto_symtab_resolve_replaceable_p): New predicate for
391         symbol resolution.
392         (lto_symtab_resolve_can_prevail_p): Likewise.
393         (lto_symtab_resolve_symbols): Rewrite.  Fold in code that
394         handles merging commons by choosing the largest decl.  Fold
395         in code that gives ODR errors.
396         (lto_symtab_merge_decls_2): Simplify a lot.  Emit queued
397         diagnostics here.
398         (lto_symtab_merge_decls_1): Re-structure.  Deal with the
399         case of no prevailing decl here.  Diagnose mismatches
400         in object types here.  Drop all but the prevailing decls.
401         (lto_symtab_prevailing_decl): Return the single prevailing decl.
402         * lto-streamer-in.c (lto_input_tree_ref): Deal with
403         VIEW_CONVERT_EXPRs in decl slots.  Unshare the tree in this case.
404
405 2009-10-14  Richard Guenther  <rguenther@suse.de>
406
407         PR lto/41521
408         * lto-streamer-in.c (input_bb): Replace debug stmts with
409         nops instead of dropping them.
410
411 2009-10-14  Nick Clifton  <nickc@redhat.com>
412
413         * gcc/doc/extended.texi: Replace the dash character with
414         @minus{} in situations where it is being used as a minus
415         symbol.
416         * gcc/doc/tm.texi: Likewise.
417         * gcc/doc/md.texi: Likewise.
418
419 2009-10-14  Jakub Jelinek  <jakub@redhat.com>
420
421         PR preprocessor/41543
422         * input.h (BUILTINS_LOCATION): Change to 1 from 2.
423         Assert BUILTINS_LOCATION < RESERVED_LOCATION_COUNT.
424         * tree.c: Include intl.h.
425         (expand_location): Handle BUILTINS_LOCATION.
426         * Makefile.in (tree.o): Depend on intl.h.
427
428         PR debug/41695
429         * dwarf2out.c (dwarf2out_var_location): Always clear
430         last_postcall_label when changing last_label.
431
432 2009-10-14  Pascal Obry  <obry@adacore.com>
433
434         * gcc.c (DEFAULT_SWITCH_CURTAILS_COMPILATION): Add -E.
435         (process_command): Handle -E as done with -c and -S.  Do not add
436         the target executable suffix to the output file when -E is used.
437         (main): Adjust error message accordingly.
438
439 2009-10-14  Alexandre Oliva  <aoliva@redhat.com>
440
441         PR debug/41343
442         PR debug/41447
443         PR debug/41264
444         PR debug/41338
445         * tree.c (tree_node_structure_for_code): DEBUG_EXPR_DECL uses
446         decl with rtl.
447         (tree_code_size): Likewise.
448
449 2009-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
450
451         * builtins.c (fold_builtin_1): Support complex "arc" functions.
452         * real.h (HAVE_mpc_arc): Define.
453
454 2009-10-14  Kaz Kojima  <kkojima@gcc.gnu.org>
455
456         * config/sh/sh.c (TARGET_BUILTIN_DECL): Define.
457         (struct builtin_description): Add fndecl field.
458         (bdesc): Remove const qualifier.  Update initializer.
459         (sh_media_init_builtins): Remove const qualifier for d.  Record
460         the result of add_builtin_function to the fndecl field.
461         (sh_builtin_decl): New.
462         (sh_media_builtin_decl): New.
463
464 2009-10-14  Hans-Peter Nilsson  <hp@axis.com>
465
466         PR target/38948
467         * config/cris/cris.h (SECONDARY_RELOAD_CLASS): Handle reload
468         requests between special registers.
469
470 2009-10-13  Eric Botcazou  <ebotcazou@adacore.com>
471
472         * dwarf2out.c (mem_loc_descriptor): Accept UNGT as well.
473
474 2009-10-13  Richard Henderson  <rth@redhat.com>
475
476         PR tree-optimization/41377
477         * tree-eh.c (unsplit_eh): Propagate degenerate PHIs.
478         (cleanup_empty_eh_merge_phis): New change_region parameter;
479         pass it on to redirect_eh_edge_1.  Update callers.
480         (cleanup_empty_eh_unsplit): Don't require an existing EH label
481         at the destination block.
482
483 2009-10-13  Basile Starynkevitch  <basile@starynkevitch.net>
484
485         * passes.c (register_pass): Replaced gcc_unreachable by
486         fatal_error on failure. Mentions plugins in comments & messages.
487
488 2009-10-13  Jakub Jelinek  <jakub@redhat.com>
489
490         PR target/41693
491         * rtl.h (DEBUG_EXPR_TREE_DECL): Define.
492         * sched-vis.c (print_value): Use it.
493         * cselib.c (cselib_hash_rtx): Likewise.
494         * print-rtl.c (print_rtx): Likewise.
495         * cfgexpand.c (expand_debug_rtx): Likewise.
496         * var-tracking.c (vt_expand_loc_callback): Likewise.
497
498 2009-10-13  Richard Guenther  <rguenther@suse.de>
499
500         PR lto/41565
501         * opts.c (handle_option): Split out code to handle setting
502         the options flag var ...
503         (set_option): ... here.
504         * opts.h (set_option): Declare.
505         * lto-opts.c (register_user_option_p): Include -fexceptions
506         and all position independent code variants.
507         (handle_common_option): Remove.
508         (lto_reissue_options): Use set_option.
509
510 2009-10-13  Martin Jambor  <mjambor@suse.cz>
511
512         PR tree-optimization/41661
513         * ipa-prop.c (compute_complex_pass_through): Allow only operations
514         that are tcc_comparisons or do not change the type in any
515         un-usleless way.
516         * ipa-cp.c (ipcp_lattice_from_jfunc): Request boolean type when
517         folding tcc_comparison operations.
518
519 2009-10-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
520
521         * config/s390/s390.c (s390_encode_section_info): Handle BLKmode
522         properly.
523
524 2009-10-12  Alexandre Oliva  <aoliva@redhat.com>
525
526         PR debug/41343
527         PR debug/41447
528         PR debug/41264
529         PR debug/41338
530         * tree.def (DEBUG_EXPR_DECL): New.
531         * rtl.def (DEBUG_EXPR): New.
532         * gengtype.c (adjust_field_rtx_def): Handle it.
533         * tree-ssa.c (propagate_var_def_into_debug_stmts): Rename to...
534         (insert_debug_temp_for_var_def): ... this.  Drop support for
535         moving.  Take iterator for def stmt; insert debug stmt before it.
536         Scan early for use count and kind in debug stmts.
537         (propagate_defs_into_debug_stmts): Rename to...
538         (insert_debug_temps_for_defs): ... this.  Likewise.
539         * tree.h (DEBUG_TEMP_UID): New.
540         * tree.c (next_debug_decl_uid): New.
541         (make_node_stat): Count debug decls separately.
542         (copy_node_stat): Likewise.
543         * cfgexpand.c (expand_debug_expr): Handle DEBUG_EXPR_DECL.
544         * var-tracking.c (dv_is_decl_p): Recognize it.
545         (VALUE_RECURSED_INTO): Apply to DEBUG_EXPRs too.
546         (track_expr_p): Track expanded DEBUG_EXPR_DECLs.
547         (vt_expand_loc_callback): Expand DEBUG_EXPRs.
548         (emit_note_insn_var_location): Don't emit notes for DEBUG_EXPR_DECLs.
549         * cselib.c (rtx_equal_for_cselib_p): Handle DEBUG_EXPR.
550         (cselib_hash_rtx): Likewise.
551         (cselib_expand_value_rtx_1): Use callback for DEBUG_EXPR.
552         * tree-ssa-operands.c (get_expr_operands): Skip DEBUG_EXPR_DECLs in
553         debug bind stmts.
554         * emit-rtl.c (verify_rtx_sharing): Handle DEBUG_EXPR and VALUE.
555         (copy_rtx_if_shared_1, reset_used_flags, set_used_flags): Likewise.
556         * rtl.c (copy_rtx): Likewise.
557         (rtx_equal_p_cb, rtx_equal_p): Handle DEBUG_EXPR.
558         * print-rtl.c (print_rtx): Likewise.
559         * sched-vis.c (print_value): Likewise.
560         (print_insn): Handle DEBUG_EXPR_DECL.
561         * tree-dump.c (dequeue_and_dump): Likewise.
562         * tree-pretty-print.c (dump_decl_name, dump_generic_node): Likewise.
563         * gimple-iterator (gsi_replace): Check for same lhs.
564         (gsi_remove): Insert debug temps.
565         * tree-ssa-loop-im.c (rewrite_reciprocal): Replace with same lhs.
566         (move_computations_stmt): Drop explicit propagation into debug stmts.
567         (rewrite_bittest): Likewise.  Use gsi_remove for propagation.
568         * tree-ssa-reassoc.c (rewrite_expr_tree, linearize_expr): Likewise.
569         * tree-ssa-sink.c (statement_sink_location): Likewise.
570         * tree-ssa-forwprop (forward_propagate_addr_expr): Likewise.
571         * tree-ssanames.c (release_ssa_name): Adjust for rename.
572         * tree-flow.h: Likewise.
573         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Don't mark
574         debug temps without values.
575         (eliminate_unnecessary_stmts): Don't discard just-inserted
576         debug stmts.
577
578 2009-10-12  Hans-Peter Nilsson  <hp@axis.com>
579
580         PR target/26515
581         * config/cris/cris.md (andu): Check that operand 1 is one of the
582         general registers.  Fix typo in head comment.
583
584 2009-10-12  Stefan Dösinger  <stefan@codeweavers.com>
585
586         * config/i386/i386.md (vswapmov): New.
587         * config/i386/i386.c (ix86_handle_fndecl_attribute): New.
588         (ix86_function_ms_hook_prologue): New.
589         (ix86_expand_prologue): Handle ms_hook_prologue attribute.
590         * configure.ac: Test for swap suffix support in as.
591         * configure: Rebuild.
592
593 2009-10-12  Jakub Jelinek  <jakub@redhat.com>
594
595         PR target/41680
596         * config/i386/i386.md (split after *testqi_ext_3_rex64): Only narrow
597         paradoxical subregs to prevent partial register stalls if the inner
598         mode is integer mode.
599
600 2009-10-12  Uros Bizjak  <ubizjak@gmail.com>
601
602         * config/i386/i386.md (*setcc_<mode>_2): Remove insn pattern.
603
604 2009-10-12  Dodji Seketeli  <dodji@redhat.com>
605
606         PR c++/41570
607         * gcc/dwarf2out.c (template_parameter_pack_die,
608         gen_formal_parameter_pack_die): Use add_name_and_src_coords_attributes.
609
610 2009-10-12  Alexandre Oliva  <aoliva@redhat.com>
611
612         PR debug/41616
613         * tree-into-ssa.c (insert_phi_nodes_for): Build debug bind stmts
614         on updates too.
615         (maybe_register_def): Likewise.  Take stmt iterator.
616         (rewrite_update_stmt): Take stmt iterator and pass it on.
617         (rewrite_update_enter_block): Pass stmt iterator.
618
619 2009-10-11  Andrew Pinski  <andrew_pinski@playstation.sony.com>
620
621         * config/spu/spu.c (TARGET_BUILTIN_DECL): Define.
622         (spu_builtin_decl): New function.
623
624 2009-10-12  Uros Bizjak  <ubizjak@gmail.com>
625
626         * config/i386/i386.md (SWIM): New mode iterator.
627         (mov<mode>cc): Macroize expander from mov{qi,hi,si,di}cc patterns
628         using SWIM mode iterator.
629         (x86_mov<mode>cc_0_m1): Macroize insn from x86_mov{si,di}cc_0_m1
630         patterns using SWI48 mode iterator.
631         (*x86_mov<mode>cc_0_m1_se):  Macroize insn from
632         *x86_mov{si,di}cc_0_m1_se patterns using SWI48 mode iterator.
633         (*x86_mov<mode>cc_0_m1_neg): New insn pattern.
634         (*mov<mode>cc_noc): Macroize insn from *mov{hi,si,di}cc_noc
635         patterns using SWI248 mode iterator.
636         * config/i386/i386.c (ix86_expand_int_movcc): Update the call to
637         gen_x86_movdicc_0_m1_rex64 for renamed function
638
639 2009-10-11  Jose Ruiz  <ruiz@adacore.com>
640             Eric Botcazou  <ebotcazou@adacore.com>
641
642         PR target/33743
643         * config/sparc/sol2.h (MD_UNWIND_SUPPORT): Define.
644         * config/sparc/sol2-unwind.h: New file.
645
646 2009-10-11  Olivier Hainque  <hainque@adacore.com>
647             Eric Botcazou  <ebotcazou@adacore.com>
648
649         PR target/33743
650         * config/i386/sol2.h (MD_UNWIND_SUPPORT): Define.
651         * config/i386/sol2-unwind.h: New file.
652
653 2009-10-11  H.J. Lu  <hongjiu.lu@intel.com>
654
655         PR target/41665
656         * config/i386/i386.md (addsi_1_zext): Get the proper second
657         operand for lea.
658
659 2009-10-11  Richard Sandiford  <rdsandiford@googlemail.com>
660
661         * simplify-rtx.c (simplify_replace_rtx): Use rtx_equal_p for
662         all OLD_RTXes, not just REGs.  Use copy_rtx to create the
663         replacement value.
664
665 2009-10-11  Richard Guenther  <rguenther@suse.de>
666
667         * gimple.c (iterative_hash_type_name): Do not handle special
668         anonymous names.
669
670 2009-10-11  Uros Bizjak  <ubizjak@gmail.com>
671
672         * config/i386/i386.md (*setcc_di_1): New insn_and_split pattern.
673         (*setcc_si_1_and): Ditto.
674         (*setcc_si_1_movzbl): Ditto.
675         (*setcc_<mode>_2): Ditto.
676         (*setcc_qi): Rename from *setcc_1.
677         (*setcc_qi_slp): Rename from *setcc_2.
678
679         (*zero_extendqihi2_movzbw_and splitter): Use ix86_expand_clear.
680         (*zero_extendqisi2_movzbw_and splitter): Ditto.
681
682         * config/i386/i386.c (ix86_expand_clear): Remove reload_completed from
683         "if" condition, there is already assert with reload_completed present.
684
685 2009-10-11  Gerald Pfeifer  <gerald@pfeifer.com>
686
687         * plugin.c (try_init_one_plugin): Improve constness of variable err.
688
689 2009-10-10  Gerald Pfeifer  <gerald@pfeifer.com>
690
691         * doc/install.texi (Final install): Refer to
692         http://gcc.gnu.org/bugs/ for bug reporting.
693
694 2009-10-10  Peter Bergner  <bergner@vnet.ibm.com>
695
696         * configure.ac: Add test for dci instruction.
697         * configure: Regenerate.
698         * config.in: Likewise.
699         * config.gcc: Handle --with-cpu=476 and --with-cpu=476fp.
700         * doc/invoke.texi: Add cpu_type 476 and 476fp.
701         (-mmulhw): Add 476 to description.
702         (-mdlmzb): Likewise.
703         * config/rs6000/t-fprules (MULTILIB_MATCHES_FLOAT): Include -mcpu=476.
704         * config/rs6000/rs6000.c (processor_costs): Add ppc476_cost.
705         (processor_target_table): Add 476 and 476fp entries.
706         (rs6000_override_options): Use ppc476_cost for PROCESSOR_PPC476.
707         (rs6000_issue_rate): Add CPU_PPC476.
708         * config/rs6000/rs6000.h (ASM_CPU_476_SPEC): Define.
709         (ASM_CPU_SPEC): Pass %(asm_cpu_476) for -mcpu=476 and -mcpu=476fp.
710         (processor_type): Add PROCESSOR_PPC476.
711         (EXTRA_SPECS): Add asm_cpu_476 string.
712         * config/rs6000/rs6000.md: (define_attr "type"): Add isel attribute.
713         (define_attr "cpu"): Add ppc476.
714         Include 476.md.
715         Update comments for 476.
716         (isel_signed, isel_unsigned): Change to use "isel" type attribute.
717         * config/rs6000/vxworks.h (CPP_SPEC): Handle 464 and 476.
718         Update copyright year.
719         * config/rs6000/476.md: New file.
720         * config/rs6000/40x.md: Add description for "isel" attribute.
721         Update copyright year.
722         * config/rs6000/440.md: Likewise.
723         * config/rs6000/603.md: Likewise.
724         * config/rs6000/6xx.md: Likewise.
725         * config/rs6000/7450.md: Likewise.
726         * config/rs6000/7xx.md: Likewise.
727         * config/rs6000/8540.md: Likewise.
728         * config/rs6000/cell.md: Likewise.
729         * config/rs6000/e300c2c3.md: Likewise.
730         * config/rs6000/e500mc.md: Likewise.
731         * config/rs6000/mpc.md: Likewise.
732         * config/rs6000/power4.md: Likewise.
733         * config/rs6000/power5.md: Likewise.
734         * config/rs6000/power6.md: Likewise.
735         * config/rs6000/power7.md: Likewise.
736         * config/rs6000/rios1.md: Likewise.
737         * config/rs6000/rios2.md: Likewise.
738         * config/rs6000/rs64.md: Likewise.
739
740 2009-10-10  Richard Guenther  <rguenther@suse.de>
741
742         PR tree-optimization/41654
743         * tree-ssa-ifcombine.c (ifcombine_ifandif): Properly canonicalize
744         a cond expr before calling gimple_cond_set_condition_from_tree.
745         (ifcombine_iforif): Likewise.
746
747 2009-10-09  Ian Lance Taylor  <iant@google.com>
748
749         * configure.ac: Use AC_SEARCH_LIBS to find dlopen.
750         * configure: Rebuild.
751
752 2009-10-09  Neil Vachharajani <nvachhar@google.com>
753
754         * doc/cpp.texi (Other Directives): Do not list #ident and #sccs as
755         deprecated.
756
757 2009-10-09  Richard Guenther  <rguenther@suse.de>
758
759         PR lto/41638
760         * target-def.h (TARGET_BUILTIN_DECL): Define.
761         (TARGET_INITIALIZER): Add TARGET_BUILTIN_DECL.
762         * target.h (struct gcc_target): Add builtin_decl target hook.
763         * doc/tm.texi (TARGET_BUILTIN_DECL): Document.
764         * lto-streamer-in.c (lto_get_builtin_tree): Fix handling of
765         target builtins.
766         * lto-streamer-out.c (lto_output_tree_pointers): Use sorry,
767         not gcc_unreachable.
768         (lto_output_builtin_tree): Sorry if the target does not support
769         streaming target builtins.
770         * config/rs6000/rs6000.c (TARGET_BUILTIN_DECL): Define.
771         (rs6000_builtin_decl): New function.
772         * config/i386/i386.c (TARGET_BUILTIN_DECL): Define.
773         (ix86_builtin_decl): New function.
774
775 2009-10-09  Jakub Jelinek  <jakub@redhat.com>
776
777         PR preprocessor/41445
778         * c-ppoutput.c (do_line_change): New function.
779         (cb_line_change): Use it.
780         (scan_translation_unit): Call do_line_change if
781         avoid_paste or PREV_WHITE and token location is on a different line
782         than print.src_line.
783
784         PR debug/40521
785         * dwarf2out.c (dwarf2out_init): Test whether
786         HAVE_GAS_CFI_SECTIONS_DIRECTIVE is non-zero instead of checking
787         it is defined.
788
789         PR rtl-optimization/41646
790         * calls.c (expand_call): For BLKmode types returned in registers
791         avoid likely spilled hard regs in copy_blkmode_from_reg generated
792         insns.
793
794 2009-10-09  Richard Guenther  <rguenther@suse.de>
795
796         PR tree-optimization/41634
797         * tree-ssa-dom.c (remove_local_expressions_from_table): Assert
798         we remove the correct elements.
799         (optimize_stmt): Make sure to update stmt operands before
800         optimizing redundancies.
801
802 2009-10-09  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
803
804         * config/s390/s390.md ("prefetch"): Remove stcmh for prefetching.
805
806 2009-10-09  Richard Guenther  <rguenther@suse.de>
807
808         PR driver/41637
809         * lto-wrapper.c (ltrans_output_file, flto_out, args_name): New
810         globals.
811         (lto_wrapper_exit): New function.
812         (fatal): Use it.
813         (fatal_perror): Likewise.
814         (fork_execute): Use global args_name, do not free it.
815         (run_gcc): Use global ltrans_output_file, flto_out, do not free them.
816         * lto-streamer.h: Remove duplicate prototypes.
817
818 2009-10-09  Richard Guenther  <rguenther@suse.de>
819
820         * cgraph.c (cgraph_create_edge): Check for NULL call_stmt
821         before calling stmt_can_throw_external.
822
823 2009-10-09  Eric Botcazou  <ebotcazou@adacore.com>
824
825         PR tree-optimization/40071
826         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Build a ref-all
827         pointer if the original data reference doesn't conflict with the
828         created vector data reference.  Fix long line.
829
830 2009-10-09  Uros Bizjak  <ubizjak@gmail.com>
831
832         * config/i386/i386.md (any_div): New code iterator.
833         (u): Handle div and udiv.
834         (sgnprefix): Ditto.
835         (<u>divqi3): Macroize insn from {,u}divqi3  using any_div
836         code iterator.
837         (lfloor<MODEF:mode><SWI48:mode>2): Macroize insn from
838         lfloor<mode>{si,di}2 patterns using SWI48 mode iterator.
839         (lceil<MODEF:mode><SWI48:mode>2): Macroize insn from
840         lceil<mode>{si,di}2 patterns using SWI48 mode iterator.
841
842 2009-10-08  Joseph Myers  <joseph@codesourcery.com>
843
844         * gcc.c (main): Remove trailing "." from diagnostics.
845
846 2009-10-08  Cary Coutant  <ccoutant@google.com>
847
848         Add support for debugging with ICF (Identical Code Folding).
849         * calls.c (debug.h): New #include.
850         (emit_call_1): Call virtual_call_token debug hook.
851         * common.opt (-fenable-icf-debug): New option.
852         * dwarf2out.c (dwarf2_debug_hooks): Add entries for new hooks (two
853         locations in the source).
854         (poc_label_num): New variable.
855         (dcall_entry, vcall_entry): New typedefs.
856         (dcall_table, vcall_table): New variables.
857         (struct vcall_insn): New type.
858         (vcall_insn_table): New variable.
859         (DEBUG_DCALL_SECTION, DEBUG_VCALL_SECTION): New macros.
860         (size_of_dcall_table): New function.
861         (output_dcall_table): New function.
862         (size_of_vcall_table): New function.
863         (output_vcall_table): New function.
864         (dwarf2out_direct_call): New function.
865         (vcall_insn_table_hash): New function.
866         (vcall_insn_table_eq): New function.
867         (dwarf2out_virtual_call_token): New function.
868         (dwarf2out_virtual_call): New function.
869         (dwarf2out_init): Allocate new tables and sections.
870         (prune_unused_types): Mark DIEs referenced from direct call table.
871         (dwarf2out_finish): Output direct and virtual call tables.
872         * final.c (final_scan_insn): Call direct_call and virtual_call
873         debug hooks.
874         * debug.h (struct gcc_debug_hooks): Add direct_call,
875         virtual_call_token, virtual_call hooks.
876         (debug_nothing_uid): New function.
877         * debug.c (do_nothing_debug_hooks): Add dummy entries for new hooks.
878         (debug_nothing_uid): New function.
879         * dbxout.c (dbx_debug_hooks): Add dummy entries for new hooks.
880         (xcoff_debug_hooks): Likewise.
881         * sdbout.c (sdb_debug_hooks): Likewise.
882         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
883         * doc/invoke.texi (-fenable-icf-debug): New option.
884
885 2009-10-08  Alexandre Oliva  <aoliva@redhat.com>
886
887         PR debug/41353
888         * regmove.c (regmove_backward_pass): Replace src with dst in the
889         debug insn, and check for dst before rather than after.
890
891 2009-10-08  Janis Johnson <janis187@us.ibm.com>
892
893         * config/rs6000/rs6000.c (rs6000_delegitimize_address): Remove.
894         (TARGET_DELEGITIMIZE_ADDRESS): Likewise.
895
896 2009-10-08  Jan Hubicka  <jh@suse.cz>
897
898         PR middle-end/41626
899         * cgraphbuild.c (record_reference): When parameter DATA is NULL,
900         do not mark cgraph nodes as needed.
901         (record_references_in_initializer): Add new only_vars parameter.
902         * cgraph.h (record_references_in_initializer): New parameter.
903         * varasm.c (assemble_variable): Update call.
904         * varpool.c (varpool_analyze_pending_decls): Always look for
905         referenced vars.
906
907 2009-10-08  Anatoly Sokolov  <aesok@post.ru>
908
909         * config/avr/avr.c (last_insn_address) Remove variable.
910         (expand_prologue): Don't initialise last_insn_address variable.
911         (final_prescan_insn): Don't output insn size.
912         * config/avr/avr.opt (msize): Remove switch.
913         * doc/invoke.texi (AVR Options): Remove documentation of -msize
914         switch.
915
916 2009-10-08  Adam Nemet  <anemet@caviumnetworks.com>
917
918         * combine.c (label_tick_ebb_start): Fix comment.
919         (combine_instructions): Set label_tick and label_tick_ebb_start before
920         calling setup_incoming_promotions.  Start them from 1.  Increment
921         label_tick instead of deriving it from the BB index.  Rather than
922         comparing ticks use the block from the previous iteration to decide
923         whether to start a new EBB.  Remove empty lines before function.
924
925 2009-10-08  Michael Matz  <matz@suse.de>
926
927         PR middle-end/41573
928         * builtins.c (fold_builtin_isascii): Use fold_build2.
929         (fold_builtin_isdigit): Ditto.
930         * except.c (duplicate_eh_regions_1): Tolerate NULL labels.
931         * tree-cfg.c (struct rus_data, remove_useless_stmts_warn_notreached,
932         remove_useless_stmts_cond, remove_useless_stmts_tf,
933         remove_useless_stmts_tc, remove_useless_stmts_bind,
934         remove_useless_stmts_goto, remove_useless_stmts_label,
935         remove_useless_stmts_1, remove_useless_stmts,
936         pass_remove_useless_stmts): Remove.
937         * tree-pass.h (pass_remove_useless_stmts): Don't declare.
938         * passes.c (init_optimization_passes): Don't add
939         pass_remove_useless_stmts.
940         * tree-eh.c (lower_eh_constructs_2): Handle empty cleanups.
941         * tree.c (free_lang_data_in_decl): Don't clear DECL_INITIAL of
942         static constants.
943         * lto-symtab.c (lto_symtab_register_decl): Accepts DECL_INITIAL
944         for static constants.
945         * lto-streamer-out.c (output_gimple_stmt): Handle GIMPLE_NOP.
946         * lto-streamer-in.c (input_gimple_stmt): Handle GIMPLE_NOP.
947
948 2009-10-08  Richard Guenther  <rguenther@suse.de>
949
950         * gimple.c (free_gimple_type_tables): New function.
951         * gimple.h (free_gimple_type_tables): Declare.
952
953 2009-10-07  Mark Heffernan  <meheff@google.com>
954
955         * ipa-prop.c (ipa_print_node_params) Only print
956         names of named arguments.
957
958 2009-10-08  Rafael Avila de Espindola  <espindola@google.com>
959
960         * gcc.c (LINK_COMMAND_SPEC): Pass libc with -pass-through if it is
961         being statically linked.
962
963 2009-10-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
964
965         * collect2.c (add_lto_object): Only define if OBJECT_FORMAT_NONE.
966
967 2009-10-08  Jan Hubicka  <jh@suse.cz>
968
969         PR bootstrap/41620
970         * ipa.c (cgraph_externally_visible_p,
971         function_and_variable_visibility,
972         whole_program_function_and_variable_visibility): Skip non-finalized
973         nodes.
974
975 2009-10-08  Nick Clifton  <nickc@redhat.com>
976
977         * config/mn10300/mn10300.h (CONSTANT_ADDRESS_P): Do not allow
978         CONST_DOUBLEs.
979
980 2009-10-08  Andreas Tobler  <a.tobler@schweiz.org>
981
982         PR bootstrap/37739
983         * config.host: Use config/x-cflags-O1 for powerpc FreeBSD.
984
985 2009-10-07  Joseph Myers  <joseph@codesourcery.com>
986
987         PR c/41182
988         * c-common.c (c_fully_fold_internal): Strip nops from the result
989         of recursive calls to c_fully_fold_internal.
990         (c_wrap_maybe_const): New.
991         (c_save_expr): Use c_wrap_maybe_const.
992         * c-common.h (c_wrap_maybe_const): Declare.
993         * c-typeck.c (build_conditional_expr, c_finish_stmt_expr,
994         build_binary_op): Use c_wrap_maybe_const.
995
996 2009-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
997
998         * real.c: Fix comment to reflect actual exponent size.
999
1000 2009-10-08  Ben Elliston  <bje@au.ibm.com>
1001
1002         * config/rs6000/a2.md: Add FSF comment header.
1003
1004 2009-10-07  Uros Bizjak  <ubizjak@gmail.com>
1005
1006         * config/i386/i386.md (any_extend): New code iterator.
1007         (u, s): New code attributes.
1008         (sgnprefix): Ditto.
1009         (DWIH): Rewrite as code iterator for SI and DI modes.
1010         (DWI): Rewrite as mode attribute.
1011         (dwi): New mode attribute.
1012         (di): Depend on SI mode and DI mode.
1013         (doubleint_general_operand): Remove mode attribute.
1014
1015         (*lea_1): Macroize insn from *lea_1_rex64 and *lea_1 patterns using
1016         DWIH mode iterator.
1017
1018         (*add<mode>3_doubleword): Use DWIH as the base mode iterator.
1019         (*sub<mode>3_doubleword): Ditto.
1020
1021         (mul<mode>3): Macroize expander from mul{hi,si,di}3 patterns
1022         using SWIM248 mode iterator.
1023         (*mul<mode>3_1): Macroize insn from mul{si,di}3_1 patterns
1024         using SWI48 mode iterator.
1025         (<u>mul<mode><dwi>3): Macroize expander from {,u}mul{sidi,diti}3
1026         patterns using DWIH mode iterator and any_extend code iterator.
1027         (<u>mulqihi3): Macroize expander from {,u}mulqihi3 patterns
1028         using any_extend code iterator.
1029         (*<u>mul<mode><dwi>3_1): Macroize insn from {,u}mul{sidi,diti}3_1
1030         patterns using DWIH mode iterator and any_extend code iterator.
1031         (*<u>mulqihi3_1): Macroize insn from {,u}mulqihi3_1 patterns
1032         using any_extend code iterator.
1033         (<s>mul<mode>3_highpart): Macroize expander from
1034         {s,u}mul{si,di}3_highpart patterns using DWIH mode iterator
1035         and any_extend code iterator.
1036         (*<s>muldi3_highpart_1): Macroize insn from
1037         *{s,u}muldi3_highpart_rex64 patterns using any_extend code iterator.
1038         (*<s>mulsi3_highpart_1): Macroize insn from *{s,u}mulsi3_highpart_1
1039         patterns using any_extend code iterator.
1040         (*<s>mulsi3_highpart_zext): Macroize insn from
1041         *{s,u}mulsi3_highpart_zext patterns using any_extend code iterator.
1042
1043 2009-10-07  Jakub Jelinek  <jakub@redhat.com>
1044
1045         * dwarf2out.c (tree_add_const_value_attribute_for_decl): Don't add
1046         DW_AT_const_value if VAR_DIE already has DW_AT_abstract_origin
1047         refering to a DIE with DW_AT_const_value.
1048
1049 2009-10-07  Vladimir Makarov  <vmakarov@redhat.com>
1050
1051         PR middle-end/22072
1052         * ira-lives.c (check_and_make_def_conflict): Process all operands.
1053
1054 2009-10-06  Jan Hubicka  <jh@suse.cz>
1055
1056         * cgraph.c (cgraph_node_can_be_local): Handle externally visible nodes
1057         correctly.
1058
1059 2009-10-06  Uros Bizjak  <ubizjak@gmail.com>
1060
1061         * config/i386/i386.md (*lea_1_rex64, *lea_1, *lea_1_zext,
1062         *lea_2_rex64): Move before *add<mode>_1 pattern.
1063
1064 2009-10-07  Jan Hubicka  <jh@suse.cz>
1065
1066         * collect2.c (main): Add -fno-whole-program.
1067         * gcc.c (set_collect_gcc_options): Do not remove whole program here.
1068
1069 2009-10-07  Jan Hubicka  <jh@suse.cz>
1070
1071         * lto-symtab.c (lto_cgraph_replace_node): Assert that inline clones
1072         has no address taken.
1073         * cgraph.c (cgraph_mark_needed_node): Assert that inline clones are
1074         never needed.
1075         (cgraph_clone_node): Clear externally_visible flag for clones.
1076         * cgraph.h (cgraph_only_called_directly_p,
1077         cgraph_can_remove_if_no_direct_calls_p): New predicates.
1078         * tree-pass.h (pass_ipa_whole_program_visibility): Declare.
1079         * ipa-cp.c (ipcp_cloning_candidate_p): Use new predicate.
1080         (ipcp_initialize_node_lattices, ipcp_estimate_growth,
1081         ipcp_insert_stage): Likwise.
1082         * cgraphunit.c (cgraph_decide_is_function_needed): Do not compute
1083         externally_visible flag.
1084         (verify_cgraph_node): Verify that inline clones look right.
1085         (process_function_and_variable_attributes): Do not set
1086         externally_visible flags.
1087         (ipa_passes): Avoid executing small_ipa_passes at LTO stage; they've
1088         been already run.
1089         * lto-cgraph.c (lto_output_node): Assert that inline clones are not
1090         boundaries.
1091         * ipa-inline.c (cgraph_clone_inlined_nodes): Use new predicates;
1092         clear externally_visible when turning into inline clones
1093         (cgraph_mark_inline_edge): Use new predicates.
1094         (cgraph_estimate_growth): Likewise.
1095         (cgraph_decide_inlining): Likewise.
1096         * ipa.c (cgraph_postorder): Likewise.
1097         (cgraph_remove_unreachable_nodes): Likewise; sanity check
1098         that inline clones are not needed.
1099         (cgraph_externally_visible_p): New predicate.
1100         (function_and_variable_visibility): Add whole_program parameter;
1101         always set externally_visible flag; handle COMDAT function
1102         privatization.
1103         (local_function_and_variable_visibility): New function.
1104         (gate_whole_program_function_and_variable_visibility): New function.
1105         (whole_program_function_and_variable_visibility): New function.
1106         (pass_ipa_whole_program_visibility): New function.
1107         * passes.c  (init_optimization_passes): Add whole program visibility
1108         pass.
1109         (do_per_function_toporder, function_called_by_processed_nodes_p): Do
1110         not care about needed/reachable flags.
1111         * varpool.c: Include flags.h
1112         (decide_is_variable_needed): When doing LTO assume whole-program mode.
1113         (varpool_finalize_decl): When we are in LTO read-back, all variables
1114         are analyzed.
1115         (varpool_analyze_pending_decls): Skip analyzis of analyzed vars.
1116
1117 2009-10-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
1118
1119         * config/s390/tpf.h (TARGET_DEFAULT): Remove MASK_HARD_FLOAT and
1120         add MASK_HARD_DFP.
1121
1122 2009-10-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
1123
1124         * config.gcc: Don't include the makefile fragments intended for
1125         libgcc.
1126         * config/s390/fixdfdi.h: File removed.
1127         * config/s390/libgcc-glibc.ver: File removed.
1128         * config/s390/s390.h: Remove the fixdfdi.h hack.
1129         * config/s390/t-crtstuff: File moved to libgcc dir.
1130         * config/s390/t-linux: Likewise.
1131         * config/s390/t-tpf: libgcc specific parts removed.
1132         * config/s390/t-linux64: Likewise.
1133
1134 2009-10-06  Jerry Quinn  <jlquinn@optonline.net>
1135
1136         * Makefile.in (lto-wrapper): Use COMPILER and ALL_COMPILERFLAGS.
1137         (lto-compress.o): Likewise.
1138
1139 2009-10-07  Danny Smith  <dannysmith@users.sourceforge.net>
1140
1141         PR target/41512
1142         * config/i386/winnt.c (i386_pe_determine_dllexport_p): Don't propagate
1143         dllexport to class members here.
1144         (i386_pe_determine_dllimport_p): Only check static class data for
1145         definition.
1146         (i386_pe_encode_section_info): Don't recheck DECL_DLLIMPORT_P.
1147         * config/i386/winnt-cxx.c (i386_pe_type_dllimport_p): Only check
1148         functions for vague linkage.
1149         (i386_pe_type_dllexport_p): Fix formatting.
1150         (maybe_add_dllexport) New function.
1151         (i386_pe_adjust_class_at_definition): Use it to propagate dllexport
1152         to class members.
1153
1154 2009-10-07  Ben Elliston  <bje@au.ibm.com>
1155
1156         * config/rs6000/a2.md: Remove duplicated lines.
1157
1158 2009-10-07  Ben Elliston  <bje@au.ibm.com>
1159
1160         * config.gcc (powerpc*-*-*): Handle a2.
1161         * config/rs6000/rs6000.md (cpu): Add ppca2.  Include "a2.md".
1162         * config/rs6000/a2.md: New file.
1163         * config/rs6000/rs6000.opt (mno-update): New.
1164         (mupdate): Return to using a mask, not a var.
1165         * config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for a2.
1166         (enum processor_type): Add PROCESSOR_PPCA2.
1167         * config/rs6000/rs6000.c (ppca2_cost): New costs.
1168         (rs6000_override_options): Add "a2" to processor_target_table.
1169         Update rs6000_always_hint logic.  Correctly set rs6000_cost for a2.
1170         * doc/invoke.texi (RS/6000 and PowerPC Options): Document -mcpu=a2.
1171
1172 2009-10-06  Uros Bizjak  <ubizjak@gmail.com>
1173
1174         * config/i386/i386.md (float<SSEMODEI24:mode><X87MODEF:mode>2):
1175         Use explicit gen_truncxfsf2 and gen_truncxfdf2 references to avoid
1176         reference to nonexistent gen_truncxfxf2 function.
1177
1178 2009-10-06  Uros Bizjak  <ubizjak@gmail.com>
1179
1180         * config/i386/i386.md (SWI48, SDWIM, DWI): New mode iterators.
1181         (DWIH, g, di, doubleint_general_operand): New mode attributes.
1182         (general_operand): Handle TI mode.
1183         (add<mode>3): Macroize expander from add{qi,hi,si,di,ti}3 patterns
1184         using SDWIM mode iterator.
1185         (*add<mode>3_doubleword): New insn_and_split pattern.  Macroize
1186         pattern from *add{di,ti}3_1 patterns and corresponding splitters
1187         using DWI mode iterator.
1188         (add<mode>3_carry): Macroize insn from add{qi,hi,si,di}3_carry
1189         patterns using SWI mode iterator.
1190         (*add<mode>3_cc): Macroize insn from add{si,di}3_cc patterns
1191         using SWI48 mode iterator.
1192         (*add<mode>_1): Ditto from add{si,di}_1 patterns.
1193         (*add<mode>_2): Ditto from add{si,di}_2 patterns.
1194         (*add<mode>_3): Ditto from add{si,di}_3 patterns.
1195         (*add<mode>_5): Ditto from add{si,di}_5 patterns.
1196         (sub<mode>3): Macroize expander from sub{qi,hi,si,di,ti}3 patterns
1197         using SDWIM mode iterator.
1198         (*sub<mode>3_doubleword): New insn_and_split pattern.  Macroize
1199         pattern from *sub{di,ti}3_1 patterns and corresponding splitters
1200         using DWI mode iterator.
1201         (sub<mode>3_carry): Macroize insn from sub{qi,hi,si,di}3_carry
1202         patterns using SWI mode iterator.
1203         (*sub<mode>_1): Ditto from from sub{qi,hi,si,di}_1 patterns.
1204         (*sub<mode>_2): Ditto from sub{qi,hi,si,di}_2 patterns.
1205         (*sub<mode>_3): Ditto from sub{qi,hi,si,di}_3 patterns.
1206         (<plusminus_insn>xf3): Macroize expander from addxf3 and subxf3
1207         patterns using plusminus code iterator.
1208         (<plusminus_insn><mode>3): Macroize expander from add<mode>3 and
1209         sub<mode>3 patterns using plusminus code iterator.
1210         * config/i386/i386.c (override_options): Update the call to
1211         gen_subdi_carry_rex64 for renamed function.
1212         (ix86_expand_int_addcc): Update calls to gen_subdi3_carry_rex64
1213         and gen_adddi3_carry_rex64 for renamed functions.  Use indirect
1214         calls to instruction expanders.
1215
1216 2009-10-06  Martin Jambor  <mjambor@suse.cz>
1217
1218         PR bootstrap/41395
1219         * opts.c (decode_options): Run IPA-SRA at -O2.
1220
1221 2009-10-06  Richard Guenther  <rguenther@suse.de>
1222
1223         * lto-symtab.c (lto_symtab_entry_hash): Hash strings, not pointers.
1224
1225 2009-10-06  Tobias Burnus  <burnus@net-b.de>
1226
1227         PR lto/41591
1228         * doc/invoke.texi (-flto,-fwhole-program): Make clear that the
1229         -flto and -fwhole-program flags can be combined.
1230
1231 2009-10-06  Ryan Mansfield  <rmansfield@qnx.com>
1232
1233         PR driver/41217
1234         * gcc.c (process_command): Check that -o argument was specified.
1235
1236 2009-10-06  Jerry Quinn  <jlquinn@optonline.net>
1237
1238         * gimple.c (gimple_type_hash): Use CONST_CAST_TREE to fix compilation.
1239
1240 2009-10-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1241
1242         * c.opt (Wjump-misses-init): Fix typo to enable for ObjC.
1243         * doc/invoke.texi (Warning Options): Annotate allowed languages
1244         for -Wunsuffixed-float-constants.
1245
1246 2009-10-05  Jakub Jelinek  <jakub@redhat.com>
1247
1248         * dwarf2out.c (modified_type_die): Don't add DW_AT_name to
1249         DW_TAG_{const,volatile}_type if its DW_AT_type already has the
1250         same name and isn't the main variant.
1251
1252         PR debug/41558
1253         * dwarf2out.c (loc_by_reference): Removed.
1254         (dw_loc_list_1): New function.
1255         (dw_loc_list): Remove toplev argument, add want_address argument.
1256         Don't look at decl_by_reference_p at all.  Use dw_loc_list_1.
1257         (loc_list_from_tree) <case VAR_DECL>: Pass want_address rather than
1258         want_address == 2 to dw_loc_list.  For successful dw_loc_list
1259         set have_address to 1 only if want_address is not 0.
1260
1261 2009-10-05  Richard Sandiford  <rdsandiford@googlemail.com>
1262
1263         * config/mips/mips-protos.h (mips_trampoline_code_size): Declare.
1264         * config/mips/mips.h (TRAMPOLINE_SIZE): Redefine as the size of
1265         a code block followed by two pointers.
1266         (TRAMPOLINE_ALIGNMENT): Define to 64 for 32-bit targets too.
1267         * config/mips/mips.c (MIPS_LOAD_PTR): New macro.
1268         (MIPS_MOVE): Likewise.
1269         (MIPS_LUI): Likewise.
1270         (MIPS_JR): Likewise.
1271         (MIPS_BAL): Likewise.
1272         (MIPS_NOP): Likewise.
1273         (mips_asm_trampoline_template): Delete.
1274         (mips_trampoline_code_size): New function.
1275         (mips_trampoline_init): Add shorter sequences for all cases
1276         except Pmode == DImoe && !TARGET_USE_PIC_FN_ADDR_REG.
1277         Calculate the opcodes directly, rather than copying from a template.
1278         Only flush the code part of the trampoline.
1279         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Delete.
1280
1281 2009-10-05  Richard Sandiford  <rdsandiford@googlemail.com>
1282
1283         * config/mips/mips.h (DWARF_FRAME_RETURN_COLUMN): Replace
1284         GP_REG_FIRST + 31 with RETURN_ADDR_REGNUM.
1285         (INCOMING_RETURN_ADDR_RTX): Likewise.
1286         (FUNCTION_PROFILER): Likewise.  Replace GP_REG_FIRST + 1
1287         with AT_REGNUM.
1288         * config/mips/sdemtk.h (FUNCTION_PROFILER): Replace GP_REG_FIRST + 31
1289         with RETURN_ADDR_REGNUM.
1290         (MIPS_SAVE_REG_FOR_PROFILING_P): Likewise.
1291         * config/mips/mips.c (mips16_build_call_stub): Replace
1292         GP_REG_FIRST + 31 with RETURN_ADDR_REGNUM, GP_REG_FIRST + 1
1293         with AT_REGNUM and 31 with RETURN_ADDR_REGNUM.
1294         (mips_print_operand_punctuation): Likewise.
1295         (mips_frame_set): Likewise.
1296         (mips16e_output_save_restore): Likewise.
1297         (mips_cfun_might_clobber_call_saved_reg_p): Likewise.
1298         (mips_save_reg_p): Likewise.
1299         (mips_return_addr): Likewise.
1300         (mips_set_return_address): Likewise.
1301         (mips_direct_save_slot_move_p): Likewise.
1302         (mips_output_function_prologue): Likewise.
1303         (mips_restore_reg): Likewise.
1304         (mips_expand_epilogue): Likewise.
1305         (mips_epilogue_uses): Likewise.
1306         * config/mips/mips.md (RETURN_ADD_REGNUM): Define.
1307         (*mov<mode>_ra): Use it instead of a hard-coded 31.
1308         (clear_hazard_<mode>): Likewise.
1309         (call_internal): Likewise.
1310         (call_internal_direct): Likewise.
1311         (call_direct_split): Likewise.
1312         (call_value_internal): Likewise.
1313         (call_value_split): Likewise.
1314         (call_value_internal_direct): Likewise.
1315         (call_value_direct_split): Likewise.
1316         (call_value_multiple_internal): Likewise.
1317         (call_value_multiple_split): Likewise.
1318
1319 2009-10-05  Eric Botcazou  <ebotcazou@adacore.com>
1320             Jakub Jelinek  <jakub@redhat.com>
1321
1322         PR rtl-optimization/41511
1323         * combine.c (record_value_for_reg): Pass explicit values as argument
1324         to get_last_value_validate.
1325         (get_last_value_validate): Document INSN parameter.
1326         For non-readonly MEMs, assume they might have been modified if INSN
1327         was in another basic block.
1328         (get_last_value): Minor reformatting.
1329
1330 2009-10-05  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1331
1332         PR tree-opt/40992
1333         * final.c (asm_str_count): Split out from asm_insn_count.
1334         * rtl.h (asm_str_count): New prototype.
1335         * tree-inline (estimate_num_insns) <case GIMPLE_ASM>: Call
1336         asm_str_count.
1337
1338 2009-10-05  Sriraman Tallam  <tmsriram@google.com>
1339
1340         * doc/plugins.texi: Change plugin_pass to register_pass_info.
1341
1342 2009-10-05  Basile Starynkevitch  <basile@starynkevitch.net>
1343             Rafael Espindola  <espindola@google.com>
1344
1345         * gengtype.c (write_types): Moved call to write_func_for_structure
1346         into seperate loops.
1347
1348 2009-10-05  Richard Guenther  <rguenther@suse.de>
1349
1350         PR lto/41281
1351         * lto-cgraph.c (output_cgraph): Output toplevel asms.
1352         (input_cgraph_1): Input toplevel asms.
1353
1354 2009-10-05  Richard Guenther  <rguenther@suse.de>
1355
1356         PR lto/40902
1357         * lto-symtab.c (lto_compatible_attributes_p): Remove.
1358         (external_aggregate_decl_p): Likewise.
1359         (lto_symtab_compatible): Re-structure.  Remove dead code.
1360         For variables ignore toplevel qualifiers when comparing types.
1361         Issue warnings, not errors for mismatched user-alignment.
1362
1363 2009-10-05  Richard Guenther  <rguenther@suse.de>
1364
1365         PR lto/41552
1366         PR lto/41487
1367         * lto-symtab.c (struct lto_symtab_base_def): Remove.
1368         (struct lto_symtab_identifier_def): Likewise.
1369         (struct lto_symtab_decl_def): Likewise.
1370         (struct lto_symtab_entry_def): New.
1371         (lto_symtab_identifier_t): Rename to ...
1372         (lto_symtab_entry_t): ... this.
1373         (lto_symtab_decls): Remove.
1374         (lto_symtab_base_hash): Rename to ...
1375         (lto_symtab_entry_hash): ... this.
1376         (lto_symtab_base_eq): Rename to ...
1377         (lto_symtab_entry_eq): ... this.
1378         (lto_symtab_base_marked_p): Rename to ...
1379         (lto_symtab_entry_marked_p): ... this.
1380         (lto_symtab_identifier_marked_p): Remove.
1381         (lto_symtab_decl_marked_p): Likewise.
1382         (lto_symtab_maybe_init_hash_tables): Rename to ...
1383         (lto_symtab_maybe_init_hash_table): ... this.
1384         (lto_symtab_set_resolution_and_file_data): Remove.
1385         (lto_symtab_register_decl): New function.
1386         (lto_symtab_get_identifier): Remove.
1387         (lto_symtab_get): New function.
1388         (lto_symtab_get_resolution): Adjust.
1389         (lto_symtab_get_identifier_decl): Remove.
1390         (lto_symtab_set_identifier_decl): Likewise.
1391         (lto_symtab_merge_decl): Rename to ...
1392         (lto_symtab_merge): ... this.  Rewrite.
1393         (lto_symtab_merge_var): Remove.
1394         (lto_symtab_merge_fn): Likewise.
1395         (lto_symtab_prevailing_decl): Adjust.
1396         (lto_cgraph_replace_node): New function.
1397         (lto_symtab_merge_decls_2): Likewise.
1398         (lto_symtab_merge_decls_1): Likewise.
1399         (lto_symtab_fixup_var_decls): Likewise.
1400         (lto_symtab_resolve_symbols): Likewise.
1401         (lto_symtab_merge_decls): Likewise.
1402         (lto_symtab_prevailing_decl): Adjust.
1403         (lto_symtab_get_symtab_def): Remove.
1404         (lto_symtab_get_file_data): Likewise.
1405         (lto_symtab_clear_resolution): Adjust.
1406         (lto_symtab_clear_resolution): Likewise.
1407         * lto-cgraph.c (input_edge): Do not merge cgraph nodes here.
1408         (input_cgraph_1): Likewise.
1409         * lto-streamer-in.c (get_resolution): Do not provide fake
1410         symbol resolutions here.
1411         (deferred_global_decls): Remove.
1412         (lto_register_deferred_decls_in_symtab): Likewise.
1413         (lto_register_var_decl_in_symtab): Change signature, register
1414         variable via lto_symtab_register_decl.
1415         (lto_register_function_decl_in_symtab): Likewise.
1416         (lto_read_tree): Adjust.
1417         * lto-streamer.h (lto_register_deferred_decls_in_symtab): Remove.
1418         (lto_symtab_merge_var): Likewise.
1419         (lto_symtab_merge_fn): Likewise.
1420         (lto_symtab_register_decl): Declare.
1421         (lto_symtab_merge_decls): Likewise.
1422
1423 2009-10-05  Richard Guenther  <rguenther@suse.de>
1424
1425         PR tree-optimization/23821
1426         * tree-vrp.c (vrp_finalize): Do not perform copy propagation.
1427         * tree-ssa-dom.c (cprop_operand): Do not propagate copies into
1428         simple IV increments.
1429
1430 2009-10-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1431
1432         * config/arm/arm.c (arm_override_options): Really initialize
1433         flag_dwarf2_cfi_asm to 0.
1434
1435 2009-10-05  Doug Kwan  <dougkwan@google.com>
1436
1437         PR rtl-optimization/41574
1438         * combine.c (distribute_and_simplify_rtx): Quit if RTX mode is
1439         floating point and we are not doing unsafe math optimizations.
1440
1441 2009-10-03  Simon Baldwin  <simonb@google.com>
1442             Cary Coutant  <ccoutant@google.com>
1443             Rafael Espindola  <espindola@google.com>
1444             Richard Guenther  <rguenther@suse.de>
1445             Jan Hubicka  <jh@suse.cz>
1446             Doug Kwan <dougkwan@google.com>
1447             H.J. Lu  <hongjiu.lu@intel.com>
1448             Bill Maddox  <maddox@google.com>
1449             Ryan Mansfield  <rmansfield@qnx.com>
1450             Diego Novillo  <dnovillo@google.com>
1451             Ollie Wild  <aaw@google.com>
1452             Kenneth Zadeck <zadeck@naturalbridge.com>
1453
1454         * lto-cgraph.c: New file.
1455         * lto-compress.c: New file.
1456         * lto-compress.h: New file.
1457         * lto-opts.c: New file.
1458         * lto-section-in.c: New file.
1459         * lto-section-out.c: New file.
1460         * lto-streamer-in.c: New file.
1461         * lto-streamer-out.c: New file.
1462         * lto-streamer.c: New file.
1463         * lto-streamer.h: New file.
1464         * lto-symtab.c: New file.
1465         * lto-wpa-fixup.c: New file.
1466         * lto-wrapper.c: New file.
1467
1468 2009-10-03  Simon Baldwin  <baldwin@google.com>
1469             Ben Elliston  <bje@au.ibm.com>
1470             Rafael Espindola  <espindola@google.com>
1471             Nathan Froyd  <froydnj@codesourcery.com>
1472             Jan Hubicka  <jh@suse.cz>
1473             Doug Kwan  <dougkwan@google.com>
1474             Diego Novillo  <dnovillo@google.com>
1475             Kenneth Zadeck  <zadeck@naturalbridge.com>
1476
1477         * Makefile.in (enable_lto): New.
1478         (site.exp): If @enable_lto@ is set to 'yes' define ENABLE_LTO.
1479         (LINKER_PLUGIN_API_H): Define.
1480         (LTO_SYMTAB_H): Define.
1481         (LTO_STREAMER_H): Define.
1482         (TREE_VECTORIZER_H): Define.
1483         (INCLUDES): Add LIBELFINC.
1484         (OBJS-common): Add lto-cgraph.o, lto-streamer-in.o,
1485         lto-streamer-out.o, lto-section-in.o, lto-section-out.o, lto-symtab.o,
1486         lto-opts.o, lto-streamer.o, lto-wpa-fixup.o, lto-compress.o.
1487         (MOSTLYCLEANFILES): Add lto-wrapper$(exeext)
1488         (native): Add lto-wrapper$(exeext)
1489         (lto-compress.o, lto-cgraph.o, lto-streamer-in.o,
1490         lto-streamer-out.o, lto-section-in.o, lto-section-out.o,
1491         lto-symtab.o, lto-opts.o, lto-streamer.o, lto-wpa-fixup.o): New rules.
1492         (gimple.o): Add dependency on LTO_HEADER_H and LTO_SECTION_OUT_H.
1493         (varasm.o): Add dependency on tree-iterator.h.
1494         (cgraph.o): Add dependency on cif-code.def.
1495         (ipa-reference.o): Add dependency on LTO_STREAMER_H.
1496         (ipa-pure-const.o): Likewise.
1497         (GTFILES): Add lto-symtab.c.
1498         (install-lto-wrapper): New.
1499         * configure.ac: If 'lto' is in enable_languages, define ENABLE_LTO
1500         and enable_lto.  If LIBELFLIBS is set, define HAVE_libelf.
1501         * config.in: Regenerate.
1502
1503 2009-10-03  Rafael Espindola  <espindola@google.com>
1504             Diego Novillo  <dnovillo@google.com>
1505
1506         * cgraphunit.c (ipa_passes): Prevent lto1 from calling
1507         ipa_write_summaries.
1508         Call execute_ipa_summary_passes for all_regular_ipa_passes and
1509         all_lto_gen_passes.
1510         (cgraph_optimize): Make extern.
1511
1512 2009-10-03  Nathan Froyd  <froydnj@codesourcery.com>
1513             Kenneth Zadeck <zadeck@naturalbridge.com>
1514
1515         * toplev.c (in_lto_p): Declare.
1516         * collect2.c (scan_prog_file): Read all the output when reading
1517         information for LTO.
1518         (enum lto_mode_d): Declare.
1519
1520 2009-10-03  Richard Guenther  <rguenther@suse.de>
1521             Diego Novillo  <dnovillo@google.com>
1522
1523         * gimple.c: Include target.h and alias.h.
1524         (gimple_types): Declare.
1525         (type_hash_cache): Declare.
1526         (gimple_alloc_stat): Make extern.
1527         (gimple_build_eh_must_not_throw): Call
1528         gimple_eh_must_not_throw_set_fndecl.
1529         (struct type_pair_d): Declare.
1530         (type_pair_t): Declare.
1531         (type_pair_hash): New.
1532         (type_pair_eq): New.
1533         (lookup_type_pair): New.
1534         (gimple_force_type_merge): New.
1535         (compare_type_names_p): New.
1536         (compare_field_offset): New.
1537         (gimple_types_compatible_p): New.
1538         (struct sccs): Declare.
1539         (next_dfs_num): Declare.
1540         (iterative_hash_gimple_type): New.
1541         (visit): New.
1542         (iterative_hash_type_name): New.
1543         (iterative_hash_gimple_type): New.
1544         (gimple_type_hash): New.
1545         (gimple_type_eq): New.
1546         (gimple_register_type): New.
1547         (print_gimple_types_stats): New.
1548         (gimple_signed_or_unsigned_type): New.
1549         (gimple_unsigned_type): New.
1550         (gimple_signed_type): New.
1551         (gimple_get_alias_set): New.
1552         (gimple_decl_printable_name): Do not use DMGL_TYPES.
1553         * gimple.h (gimple_alloc, gimple_alloc_stat): Declare.
1554         (gimple_force_type_merge): Declare.
1555         (gimple_types_compatible_p): Declare.
1556         (gimple_register_type): Declare.
1557         (print_gimple_types_stats): Declare.
1558         (gimple_unsigned_type): Declare.
1559         (gimple_signed_type): Declare.
1560         (gimple_get_alias_set): Declare.
1561         (gimple_eh_must_not_throw_set_fndecl): New.
1562
1563 2009-10-03  Jan Hubicka  <jh@suse.cz>
1564             Kenneth Zadeck <zadeck@naturalbridge.com>
1565
1566         * ipa-pure-const.c: Include lto-streamer.h.
1567         (register_hooks): Factor out of ...
1568         (generate_summary): ... here.
1569         (pure_const_write_summary): New.
1570         (pure_const_read_summary): New.
1571         (pass_ipa_pure_const): Add pure_const_write_summary and
1572         pure_const_read_summary.
1573         * ipa-reference.c: Include lto-streamer.h.
1574         (add_new_function): New.
1575         (remove_node_data): New.
1576         (duplicate_node_data): New.
1577         (ipa_init): Guard against multiple calls.
1578         Move hook setup from analyze_function.
1579         (write_node_summary_p): New.
1580         (ipa_reference_write_summary): New.
1581         (ipa_reference_read_summary): New.
1582         (pass_ipa_reference): Add ipa_reference_write_summary and
1583         ipa_reference_read_summary.
1584         * cgraph.h (cgraph_local_info): Add field lto_file_data.
1585         (struct cgraph_edge): Add fields lto_stmt_uid and
1586         call_stmt_cannot_inline_p.
1587         (cgraph_optimize): Declare.
1588         (cgraph_decide_is_function_needed): Declare.
1589         (reset_inline_failed): Declare.
1590         (enum LTO_cgraph_tags): Declare.
1591         (LTO_cgraph_tag_names): Declare.
1592         (LCC_NOT_FOUND): Define.
1593
1594 2009-10-03  Doug Kwan  <dougkwan@google.com>
1595             Rafael Espindola  <espindola@google.com>
1596             Jan Hubicka  <jh@suse.cz>
1597             Diego Novillo  <dnovillo@google.com>
1598             Kenneth Zadeck  <zadeck@naturalbridge.com>
1599
1600         * passes.c (all_regular_ipa_passes): New.
1601         (all_ipa_passes): Rename to all_small_ipa_passes.
1602         (init_optimization_passes): Init all_regular_ipa_passes.
1603         * tree-pass.h (all_regular_ipa_passes): New.
1604         (all_ipa_passes): Rename to all_small_ipa_passes.
1605         * passes.c (all_lto_gen_passes): New.
1606         (init_optimization_passes): Initialize all_lto_gen_passes.
1607         (execute_ipa_summary_passes): Make non-static.
1608         (ipa_write_summaries_1): New.
1609         (ipa_write_summaries_2): New.
1610         (ipa_write_summaries): New.
1611         (ipa_write_summaries_of_cgraph_node_set): New.
1612         (ipa_read_summaries_1): New.
1613         (ipa_read_summaries): New.
1614         (execute_ipa_pass_list): Call cgraph_process_new_functions.
1615         (execute_regular_ipa_pass_list): Remove.
1616         (init_optimization_passes): Schedule
1617         pass_rebuild_cgraph_edges and pass_early_inline outside
1618         of pass_all_early_optimizations.  Document reason.
1619         (pass_ipa_lto_gimple_out, pass_ipa_lto_wpa_fixup,
1620         pass_ipa_lto_finish_out): New pass.
1621         (pass_ipa_summary_passes): Start and stop timers if the pass has them.
1622         (execute_all_ipa_transforms): New.
1623         (execute_one_pass): Don't call execute_one_ipa_transform_pass.
1624         (dump_properties, debug_properties): New.
1625         * tree-optimize.c (gate_all_early_local_passes): Return
1626         false if we are in lto1.
1627         (tree_rest_of_compilation): Call execute_all_ipa_transforms.
1628         * tree-pass.h (execute_all_ipa_transforms): Declare.
1629         (pass_ipa_function_and_variable_visibility): Declare.
1630         (pass_ipa_early_inline): Declare.
1631         (pass_ipa_lto_gimple_out): Declare.
1632         (pass_ipa_lto_wpa_fixup): Declare.
1633         (pass_ipa_lto_finish_out): Declare.
1634         (all_small_ipa_passes, all_regular_ipa_passes,
1635         all_lto_gen_passes): Declare.
1636         (execute_ipa_summary_passes): Declare.
1637         (execute_all_ipa_transforms): Declare.
1638         (ipa_write_summaries): Declare
1639         (ipa_write_summaries_of_cgraph_node_set): Declare.
1640         (ipa_read_summaries): Declare.
1641
1642 2009-10-03  Doug Kwan  <dougkwan@google.com>
1643             Ollie Wild  <aaw@google.com>
1644
1645         * ipa-prop.c (ipa_propagate_indirect_call_infos): Do nothing in WPA.
1646
1647         * collect2.c (LTO_MODE_NONE, LTO_MODE_LTO, LTO_MODE_WPA): New enums.
1648         (lto_mode): New variable.
1649         (maybe_run_lto_and_relink): Handle the -fwpa option.
1650         (main): Handle the -fwpa option.
1651         (maybe_unlink_list): New function.
1652         * gcc.c (link_lto_options): Replace -flto with -fwpa.
1653         * common.opt (flto): New flag.
1654         * toplev.c (flag_generate_lto): Declare.
1655
1656 2009-10-03  Simon Baldwin  <simonb@google.com>
1657
1658         * common.opt (flto-compression-level): New flag.
1659
1660         * opts.c: Include lto-opts.h.
1661         (handle_option): Call lto_register_user_option for each
1662         valid option handled.
1663         (decode_options): Clear registered options before the options
1664         handling loop.
1665
1666 2009-10-03  Cary Coutant  <ccoutant@google.com>
1667
1668         * collect2.c (is_elf): New function.
1669         (scan_prog_file): Require LTO object to be in ELF format.
1670
1671 2009-10-03  Rafael Espindola  <espindola@google.com>
1672
1673         * gcc.c (LINK_COMMAND_SPEC): Use the -pass-through option to pass
1674         libgcc to the linker.
1675
1676         * ipa-cp.c (cgraph_gate_cp): Return false if LTRANS is running.
1677
1678         * collect2.c (maybe_run_lto_and_relink): Execute lto-wrapper.
1679         (collect_execute): Add flags argument. Pass flags to pex_run. Update
1680         all callers.
1681         * collect2.h (collect_execute): Add flags argument.
1682         * tlink.c (tlink_execute): Update call to collect_execute.
1683         * gcc.c (main): Set the COLLECT_LTO_WRAPPER environment variable.
1684         (use_linker_plugin): New.
1685         (use_linker_plugin_spec_function): New.
1686         (LINK_COMMAND_SPEC): Pass plugin options to the linker.
1687         (linker_plugin_file_spec): New.
1688         (lto_wrapper_spec): New.
1689         (lto_gcc_spec): New.
1690         (static_specs): Add linker_plugin_file, lto_wrapper and lto_gcc.
1691         (static_spec_functions): Add use-linker-plugin.
1692         (process_command): Handle -use-linker-plugin.
1693         (main): Use lto_wrapper_spec instead of lto_wrapper. Set
1694         linker_plugin_file_spec and lto_gcc_spec.
1695         (use_linker_plugin_spec_function): New.
1696
1697 2009-10-03  Richard Guenther  <rguenther@suse.de>
1698
1699         PR lto/41547
1700         PR lto/41548
1701         * tree.h (is_lang_specific): Include LANG_TYPE.
1702         * tree.c (find_decls_types_r): Manually add interesting parts
1703         of TYPE_FIELDS.  Walk BINFO_VIRTUALS.  Do not walk TYPE_METHODS.
1704
1705         * gimple.c (type_pair_hash): Make symmetric.
1706         (type_pair_eq): Likewise.
1707         (lookup_type_pair): Increase initial hashtable size.
1708         (gimple_force_type_merge): Rely on type-pair symmetry.
1709         (visit): Remove excessive checking code.
1710         (iterative_hash_type_name): Do not hash TYPE_NAME of anonymous unions.
1711         (gimple_register_type): Remove getenv calls, shrink initial
1712         hashtable size.
1713
1714         PR middle-end/41502
1715         * cgraphunit.c (ipa_passes): Do not remove bodies of extern
1716         inline functions if not generating lto output.
1717
1718         PR lto/41379
1719         * toplev.c (finalize): In WPA mode remove the asm file.
1720
1721 2009-10-03  Doug Kwan  <dougkwan@google.com>
1722
1723         * ipa-inline.c (cgraph_mark_inline): Check
1724         edge->call_stmt_cannot_inline_p instead of calling
1725         gimple_call_cannot_inline_p.
1726         (cgraph_decide_inlining): Do nothing in WPA and LTRANS.
1727         (cgraph_gate_ipa_early_inlining): Return false if in_lto_p is set.
1728         (inline_generate_summary): Do nothing in LTRANS.
1729         * cgraph.c (initialize_inline_failed): Make sure e->call_stmt
1730         exists before calling gimple_call_cannot_inline_p.
1731         (cgraph_create_edge): Set edge->call_stmt_cannot_inline_p.
1732         (cgraph_clone_edge): Add argument STMT_UID.  Modify all callers.
1733         Update new_edge->lto_stmt_uid.
1734         * cgraphbuild.c (reset_inline_failed): New.
1735
1736         * common.opt (fwpa): New flag.
1737         (fltrans): New option.
1738         * gcc.c (gcc_lto_option_t): New type.
1739         (current_lto_option): New variable.
1740         (lto_single_spec_function): Remove and is replaced by ..
1741         (lto_option_spec_function): New function.
1742         (LINK_COMMAND_SPEC): Use link_lto_option spec instead of just
1743         passing the -flto flag.
1744         (cc1_options): Separate non-LTO related parts into ..
1745         (cc1_non_lto_options): Non-LTO related options shared by all FEs.
1746         (lto1_options): New spec for lto FE.
1747         (link_lto_options): New spec for handling LTO flags in linker.
1748         (invoke_lto_single): Re-format to fit in 80 column.  Replace
1749         lto-single with lto-option.
1750         (static_specs): Add cc1_non_lto_options, lto1_options and
1751         link_lto_options.
1752         (static_spec_function): Replace lto-single with lto-option.
1753         (process_command): Handle -flto, -fwpa and -fltran by setting
1754         current_lto_option and not passing it to subprocess unconditionally.
1755
1756 2009-10-03  Bill Maddox  <maddox@google.com>
1757
1758         Add `gcc' driver support for link-time code generation (LTO).
1759
1760         * collect2.c (enum pass): Add new literal PASS_LTOINFO.
1761         (lto_flag, lto_objects, lto_o_file): New variables.
1762         (struct lto_object, struct lto_object_list): New structures.
1763         (collect_exit, handler): Remove LTO temporary output file on exit.
1764         (add_lto_object): New function.
1765         (maybe_run_lto_and_relink): New function. Perform link time code
1766         generation and relinking for object files containing LTO information.
1767         (main): Invoke maybe_run_lto_and_relink().
1768         (dump_argv): New function.  For debugging, currently disabled.
1769         (scan_prog_file): Add LTO information pass.
1770         * gcc.c (LINK_COMMAND_SPEC): Pass `-flto' switch to linker, i.e.,
1771         collect2.
1772         * toplev.c (compile_file): Emit assembler directive to create
1773         the `gnu_lto_v1' marker symbol when compiling with `-flto'.
1774
1775 2009-10-03  Diego Novillo  <dnovillo@google.com>
1776
1777         * c.opt: Add LTO to warn_abi and warn_psabi.
1778
1779         * tree.c (fld_worklist_push): Rename from PUSH.  Convert to static
1780         inline function.  Ignore language-specific nodes.  Update all users.
1781         (find_decls_types_r): Do not traverse the subtrees of
1782         language-specific nodes.  Do not traverse DECL_INITIAL for TYPE_DECLs.
1783         * tree.h (is_lang_specific): New.
1784         * langhooks.h (struct lang_hooks_for_decls): Remove
1785         may_need_assembler_name_p.  Update all users.
1786
1787         * c-common.c (set_builtin_user_assembler_name): Move ...
1788         * builtins.c (set_builtin_user_assembler_name): ... here.
1789         (is_builtin_name): Add comment
1790         (is_builtin_fn): New.
1791         * except.c (output_ttype): Only call
1792         lookup_type_for_runtime if TYPE is not a runtime type.
1793
1794         * passes.c (register_pass): Call position_pass on
1795         all_small_ipa_passes, all_regular_ipa_passes and all_lto_gen_passes.
1796         * timevar.def (TV_IPA_LTO_GIMPLE_IO): Define.
1797         (TV_IPA_LTO_DECL_IO): Define.
1798         (TV_IPA_LTO_CGRAPH_IO): Define.
1799         (TV_LTO): Define.
1800         (TV_WHOPR_WPA): Define.
1801         (TV_WHOPR_WPA_IO): Define.
1802         (TV_WHOPR_LTRANS): Define.
1803         (TV_WHOPR_WPA_FIXUP): Define.
1804         (TV_WHOPR_WPA_LTRANS_EXEC): Define.
1805         * tree-cfg.c (tree_node_can_be_shared): Make extern.
1806         * tree-flow.h (tree_node_can_be_shared): Declare.
1807         * tree-inline.c (tree_can_inline_p): Check that E has a
1808         statement associated with it.
1809         * tree.c (free_lang_data_in_binf): Factor out of ...
1810         (free_lang_data_in_type): ... here.
1811         Call RECORD_OR_UNION_TYPE_P.
1812         (need_assembler_name_p): Ignore DECL if it does not have TREE_PUBLIC
1813         set.  Call lang_hooks.decls.may_need_assembler_name_p if set.
1814         (free_lang_data_in_decl): Do not clear DECL_CONTEXT for CONST_DECLs.
1815         (free_lang_data): Set debug_info_level to DINFO_LEVEL_NONE.  Set
1816         write_symbols to NO_DEBUG.  Set debug_hooks to do_nothing_debug_hooks.
1817         (gate_free_lang_data): Return true if flag_generate_lto is set.
1818         (walk_tree_1): Call RECORD_OR_UNION_TYPE_P.
1819         * c-common.h (set_builtin_user_assembler_name): Move ...
1820         * tree.h (set_builtin_user_assembler_name): ... here.
1821
1822         * common.opt (flto-report): New flag.
1823         * opts.c (complain_wrong_lang): Do not complain if running lto1.
1824         * collect2.c (scan_prog_file): Send the error output of
1825         'nm' to HOST_BIT_BUCKET.
1826
1827 2009-10-03  Ollie Wild  <aaw@google.com>
1828
1829         * langhooks-def.h (lhd_begin_section): New function declaration.
1830         (lhd_write_section): New function declaration.
1831         (lhd_end_section): New function declaration.
1832         (LANG_HOOKS_BEGIN_SECTION): New macro.
1833         (LANG_HOOKS_WRITE_SECTION_DATA): New macro.
1834         (LANG_HOOKS_END_SECTION): New macro.
1835         (LANG_HOOKS_LTO): New macro.
1836         (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_LTO.
1837         * langhooks.c (output.h): Add include.
1838         (saved_section): New static variable.
1839         (lhd_begin_section): New function.
1840         (lhd_write_section_data): New function.
1841         (lhd_end_section): New function.
1842         * langhooks.h (struct lang_hooks_for_lto): New structure.
1843         (struct lang_hooks): Add member lto.
1844         * Makefile.in (langhooks.o): Add dependency on output.h.
1845
1846         * c-opts.c (c_common_post_options): Handle -flto and -fwhopr.
1847
1848 2009-10-03  Richard Guenther  <rguenther@suse.de>
1849
1850         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1851         Handle LTO.
1852
1853 2009-10-03  Simon Baldwin  <simonb@google.com>
1854             Richard Guenther  <rguenther@suse.de>
1855             Janis Johnson  <janis187@us.ibm.com>
1856             Doug Kwan  <dougkwan@google.com>
1857             Diego Novillo  <dnovillo@google.com>
1858             Ramana Radhakrishnan  <ramana.r@gmail.com>
1859             Ollie Wild  <aaw@google.com>
1860
1861         * doc/install.texi: Add documentation for libelf and --enable-lto.
1862         * doc/invoke.texi: Document -fwpa, -flto, -fwhopr, -fltrans,
1863         -flto-report, -flto-compression-level and -use-linker-plugin.
1864         * doc/sourcebuild.texi: Document use of zlib.  Document lto-plugin.
1865         Add section for LTO Testing.
1866
1867 2009-10-02  Cary Coutant  <ccoutant@google.com>
1868
1869         Add support for comdat type sections for DWARF v4.
1870         Merge from dwarf4 branch.
1871
1872         * dwarf2out.c (DWARF_TYPE_SIGNATURE_SIZE): New constant.
1873         (dw_die_ref): Define vector type.
1874         (enum dw_val_class): Add dw_val_class_data8.
1875         (struct dw_val_struct): Add v.val_data8.
1876         (comdat_type_node_ref): New type.
1877         (struct die_struct): Move die_symbol into a union; add new field
1878         die_type_node.  Change all uses.
1879         (comdat_type_node): New type.
1880         (skeleton_chain_node): New type.
1881         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): New constant.
1882         (comdat_type_list): New variable.
1883         (dwarf_tag_name): Add DW_TAG_type_unit.
1884         (dwarf_attr_name): Add DW_AT_signature.
1885         (add_AT_data8): New function.
1886         (replace_child): New function.
1887         (move_all_children): New function.
1888         (print_signature): New function.
1889         (print_die): Print signature information; add dw_val_class_data8.
1890         (attr_checksum): Support dw_val_class_data8.
1891         (CHECKSUM_STRING): Redefine for DWARF-4 to include trailing NULL byte.
1892         (CHECKSUM_SLEB128, CHECKSUM_ULEB128): New macros.
1893         (checksum_sleb128, checksum_uleb128): New functions.
1894         (checksum_die_context): New function.
1895         (loc_checksum_ordered): New function.
1896         (attr_checksum_ordered): New function.
1897         (struct checksum_attributes): New structure.
1898         (collect_checksum_attributes): New function.
1899         (die_checksum_ordered): New function.
1900         (generate_type_signature): New function.
1901         (same_dw_val_p): Add dw_val_class_data8.
1902         (is_symbol_die): Use new is_declaration_die function.
1903         (is_declaration_die): New function.
1904         (should_move_die_to_comdat): New function.
1905         (clone_die): New function.
1906         (clone_tree): New function.
1907         (clone_as_declaration): New function.
1908         (copy_declaration_context): New function.
1909         (generate_skeleton_ancestor_tree): New function.
1910         (generate_skeleton_bottom_up): New function.
1911         (generate_skeleton): New function.
1912         (remove_child_or_replace_with_skeleton): New function.
1913         (break_out_comdat_types): New function.
1914         (struct decl_table_entry): New type.
1915         (htab_decl_hash): New function.
1916         (htab_decl_eq): New function.
1917         (htab_decl_del): New function.
1918         (copy_ancestor_tree): New function.
1919         (copy_decls_walk): New function.
1920         (copy_decls_for_unworthy_types): New function.
1921         (build_abbrev_table): Don't assert on missing die_symbol when doing
1922         comdat type sections.
1923         (size_of_die): Use DW_FORM_sig8 for external references.  Add
1924         dw_val_class_data8.
1925         (unmark_dies): Don't assert for unmarked dies when doing comdat
1926         type sections.
1927         (value_format): Support DW_FORM_sig8 and dw_val_class_data8.
1928         (output_signature): New function.
1929         (output_die): Likewise.
1930         (output_compilation_unit_header): Mark output as DWARF version 3
1931         even if generating DWARF 4.
1932         (output_comdat_type_unit): New function.
1933         (output_line_info): Mark output as DWARF version 3 even if generating
1934         DWARF 4.
1935         (dwarf2out_start_source_file): Don't do eliminate_dwarf2_dups with
1936         DWARF-4.
1937         (dwarf2out_end_source_file): Likewise.
1938         (prune_unused_types_walk_attribs): Don't follow references into
1939         comdat type sections.
1940         (prune_unused_types_mark): When generating type units, do not mark
1941         children of non-defining declarations of types; do mark children of
1942         type entries.
1943         (prune_unused_types): Process comdat type sections.
1944         (htab_ct_hash): New function.
1945         (htab_ct_eq): New function.
1946         (dwarf2out_finish): Move types to comdat sections when using DWARF-4.
1947         Add a pointer to the line table from type unit entries so
1948         DW_AT_decl_file has meaning.
1949         * varasm.c (default_elf_asm_named_section): Use identifier name as
1950         comdat key instead of lang hook.
1951
1952 2009-10-02  Neil Vachharajani  <nvachhar@google.com>
1953
1954         * gcov-io.c (gcov_open): Open files read-only when MODE < 0.
1955
1956 2009-10-02  Uros Bizjak  <ubizjak@gmail.com>
1957
1958         * config/i386/i386.md (SWIM248): New mode iterator.
1959         (divmod<mode>4) Macroize expander from divmoddi4, divmodsi4 and
1960         divmodhi4 patterns using SWIM248 macro.
1961         (*divmod<mode>4): Macroize insn_and_split pattern from
1962         *divmoddi4_cltd_rex64, *divmodsi4_cltd and divmodhi4 insn patterns
1963         and their corresponding splitters usign SWIM248 macro.  Split SImode
1964         insn to generate cltd and DImode insn to generate cqto instead of
1965         move+shift when optimizing for size or TARGET_USE_CLTD is in effect.
1966         (*divmoddi4_nocltd_rex64, *divmodsi4_nocltd): Remove insn patterns.
1967         (*divmod<mode>4_noext): Macroize insn from *divmoddi_noext_rex64 and
1968         *divmodsi_noext patterns using SWIM248 macro.
1969         (udivmod<mode>4): Macroize expander from udivmoddi4, udivmodsi4 and
1970         udivmodhi4 patterns using SWIM248 macro.
1971         (*udivmod<mode>4): Macroize insn_and_split pattern from
1972         *udivmoddi4, udivmodsi4 and udivmodhi4 patterns and their
1973         corresponding splitters using SWIM248 macro.
1974         (*udivmod<mode>4_noext): Macroize insn from *udivmoddi4_noext,
1975         *udivmodsi4_noext and *udivmodhi_noext patterns using SWIM248 macro.
1976
1977 2009-10-02  Eric Botcazou  <ebotcazou@adacore.com>
1978
1979         * stor-layout.c (layout_type) <ARRAY_TYPE>: Make sure that an array
1980         of zero-sized element is zero-sized regardless of its extent.
1981
1982 2009-10-02  Jakub Jelinek  <jakub@redhat.com>
1983
1984         PR debug/40521
1985         * configure.ac (HAVE_GAS_CFI_SECTIONS_DIRECTIVE): New test.
1986         * configure: Regenerated.
1987         * config.in: Regenerated.
1988         * dwarf2out.c (dwarf2out_do_cfi_asm): Return false if
1989         !HAVE_GAS_CFI_SECTIONS_DIRECTIVE and not emitting .eh_frame.
1990         (dwarf2out_init): If HAVE_GAS_CFI_SECTIONS_DIRECTIVE and
1991         not emitting .eh_frame, emit .cfi_sections .debug_frame
1992         directive.
1993
1994         PR debug/41404
1995         PR debug/41353
1996         * cfgexpand.c (expand_debug_expr) <case STRING_CST>: Don't create
1997         CONST_STRING if STRING_CST contains embedded '\0's or doesn't end
1998         with '\0'.
1999         (expand_debug_expr) <case VAR_DECL>: For TREE_STATIC !DECL_EXTERNAL
2000         vars use DECL_RTL with resetting it back to NULL afterwards.
2001         * dwarf2out.c (same_dw_val_p): For dw_val_class_addr compare with
2002         rtx_equal_p instead of asserting it is a SYMBOL_REF.
2003         (value_format): For dw_val_class_addr only use DW_FORM_addr if
2004         the attribute type allows it, otherwise use DW_FORM_dataN.
2005         (mem_loc_descriptor): Handle CONST_STRING.
2006         (add_const_value_attribute): Handle CONST_STRING using add_AT_addr.
2007         Handle MEM with CONST_STRING address using add_AT_string.
2008         (rtl_for_decl_init): Return MEM with CONST_STRING address instead of
2009         CONST_STRING for const arrays initialized with a string literal.
2010         (resolve_one_addr, resolve_addr_in_expr, resolve_addr): New functions.
2011         (dwarf2out_finish): Call resolve_addr.
2012
2013 2009-10-02  Andreas Schwab  <schwab@linux-m68k.org>
2014             Maxim Kuvyrkov  <maxim@codesourcery.com>
2015
2016         * config/m68k/lb1sf68.asm (PICCALL): Use variable sized branch.
2017
2018 2009-10-02  Nick Clifton  <nickc@redhat.com>
2019
2020         * config/mn10300/mn10300.h (USER_LABEL_PREFIX): Define.
2021         (ASM_OUTPUT_LABELREF): Use asm_fprintf and %U.
2022
2023 2009-10-01  Jan Hubicka  <jh@suse.cz>
2024
2025         * cgraph.c (cgraph_clone_node): Add redirect_callers parameter.
2026         (cgraph_create_virtual_clone): Just pass redirect_callers
2027         around.
2028         * cgraph.h (cgraph_clone_node): Update prototype.
2029         * ipa-pure-const.c (self_recursive_p): New function.
2030         (propagate): Use it.
2031         * ipa-inline.c (cgraph_clone_inlined_nodes,
2032         cgraph_decide_recursive_inlining): Update.
2033
2034 2009-10-01  David Daney  <ddaney@caviumnetworks.com>
2035
2036         * gcc/config/mips/mips.c (mips_process_sync_loop) Emit syncw
2037         instructions for TARGET_OCTEON.
2038
2039 2009-10-01  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2040
2041         * config/arm/arm.c (arm_override_options): Turn off
2042         flag_dwarf2_cfi_asm for AAPCS variants.
2043
2044 2009-10-01  Martin Jambor  <mjambor@suse.cz>
2045
2046         PR middle-end/12392
2047         * tree-sra.c (convert_callers): Do not call
2048         compute_inline_parameters on one caller more than once.
2049
2050 2009-10-01  Nick Clifton  <nickc@redhat.com>
2051
2052         * config/vax/netbsd-elf.h (NETBSD_CC1_AND_CC1PLUS_SPEC): Define as
2053         an empty string if not already defined.
2054
2055 2009-10-01  Martin Jambor  <mjambor@suse.cz>
2056
2057         PR bootstrap/41395
2058         * tree-sra.c (is_va_list_type): New function.
2059         (find_var_candidates): Call is_va_list_type.
2060         (find_param_candidates): Check that the type or the type pointed
2061         to are not va_list types.
2062
2063 2009-10-01  Martin Jambor  <mjambor@suse.cz>
2064
2065         PR c++/41503
2066         * cp/pt.c (function_parameter_expanded_from_pack_p): Return false if
2067         DECL_ARTIFICIAL (param_decl) is true.
2068
2069 2009-09-30  Gabriel Dos Reis  <gdr@cs.tamu.edu>
2070
2071         * tree.h (tree_decl_common::lang_flag_8): New.
2072         * c-common.c (c_common_reswords): Include "constexpr" as C++0x
2073         keyword.
2074         * c-common.h (RID_CONSTEXPR): New.
2075
2076 2009-09-30  Uros Bizjak  <ubizjak@gmail.com>
2077
2078         * config/alpha/alpha.c (alpha_gimplify_va_arg_1):
2079         Use ref-all pointers.
2080         (alpha_gimplify_va_arg): Ditto.
2081
2082 2009-09-30  Jakub Jelinek  <jakub@redhat.com>
2083
2084         PR target/41279
2085         * cfgloopanal.c (num_loop_insns): Don't increment ninsns for each bb
2086         before insn counting loop now that BB_END (bb) is counted.  Ensure
2087         the return value isn't zero.
2088
2089 2009-09-30  Nick Clifton  <nickc@redhat.com>
2090
2091         * config.gcc (sh-symbianelf): Replace definition of extra_objs
2092         with separate definitions of c_target_objs and cxx_target_objs.
2093         * config/sh/t-sh: Add rules to build symbian-cxx.o, symbian-c.o
2094         and symbian-base.o.
2095         * config/sh/sh.c (TARGET_CXX_INPUT_EXPORT_CLASS): Use
2096         sh_symbian_import_export_class.
2097         * config/sh/sh-protos.h: Fix names of exported symbian functions.
2098         * config/sh/symbian.c: Delete, moving code into...
2099         * config/sh/symbian-base.c: ... here
2100         * config/sh/symbian-c.c: ... and here
2101         * config/sh/symbian-cxx.c: ... and here.
2102
2103 2009-09-30  Uros Bizjak  <ubizjak@gmail.com>
2104
2105         PR target/22093
2106         * config/alpha/alpha.md (unaligned_storehi_be): Force operand
2107         of plus RTX into register.
2108
2109 2009-09-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2110
2111         * doc/install.texi: Linguistic and markup fixes.
2112         (Configuration) <--disable-cpp>: Remove description.
2113         <--enable-maintainer-mode>: Autotools files are affected, too.
2114         <--with-sysroot>: Improve description.
2115         (Building): Bump required GNU make version.
2116
2117 2009-09-29  Harsha Jagasia  <harsha.jagasia@amd.com>
2118
2119         * config.gcc (i[34567]86-*-*): Include fma4intrin.h.
2120         (x86_64-*-*): Ditto.
2121
2122         * config/i386/fma4intrin.h: New file, provide common x86 compiler
2123         intrinisics for FMA4.
2124         * config/i386/cpuid.h (bit_FMA4): Define FMA4 bit.
2125         * config/i386/x86intrin.h: Fix typo to SSE4A instead of SSE4a.
2126         Add FMA4 check and fma4intrin.h.
2127         * config/i386/i386-c.c(ix86_target_macros_internal): Check
2128         ISA_FLAG for FMA4.
2129         * config/i386/i386.h(TARGET_FMA4): New macro for FMA4.
2130         * config/i386/i386.md (UNSPEC_FMA4_INTRINSIC): Add new UNSPEC
2131         constant for FMA4 support.
2132         (UNSPEC_FMA4_FMADDSUB): Ditto.
2133         (UNSPEC_FMA4_FMSUBADD): Ditto.
2134         * config/i386/i386.opt (-mfma4): New switch for FMA4 support.
2135         * config/i386/i386-protos.h (ix86_fma4_valid_op_p): Add declaration.
2136         (ix86_expand_fma4_multiple_memory): Ditto.
2137         * config/i386/i386.c (OPTION_MASK_ISA_FMA4_SET): New.
2138         (OPTION_MASK_ISA_FMA4_UNSET): New.
2139         (OPTION_MASK_ISA_SSE4A_UNSET): Change definition to depend on FMA4.
2140         (OPTION_MASK_ISA_AVX_UNSET): Change definition to depend on FMA4.
2141         (ix86_handle_option): Handle -mfma4.
2142         (isa_opts): Handle -mfma4.
2143         (enum pta_flags): Add PTA_FMA4.
2144         (override_options): Add FMA4 support.
2145         (IX86_BUILTIN_VFMADDSS): New for FMA4 intrinsic.
2146         (IX86_BUILTIN_VFMADDSD): Ditto.
2147         (IX86_BUILTIN_VFMADDPS): Ditto.
2148         (IX86_BUILTIN_VFMADDPD): Ditto.
2149         (IX86_BUILTIN_VFMSUBSS): Ditto.
2150         (IX86_BUILTIN_VFMSUBSD): Ditto.
2151         (IX86_BUILTIN_VFMSUBPS): Ditto.
2152         (IX86_BUILTIN_VFMSUBPD): Ditto.
2153         (IX86_BUILTIN_VFMADDSUBPS): Ditto.
2154         (IX86_BUILTIN_VFMADDSUBPD): Ditto.
2155         (IX86_BUILTIN_VFMSUBADDPS): Ditto.
2156         (IX86_BUILTIN_VFMSUBADDPD): Ditto.
2157         (IX86_BUILTIN_VFNMADDSS): Ditto.
2158         (IX86_BUILTIN_VFNMADDSD): Ditto.
2159         (IX86_BUILTIN_VFNMADDPS): Ditto.
2160         (IX86_BUILTIN_VFNMADDPD): Ditto.
2161         (IX86_BUILTIN_VFNMSUBSS): Ditto.
2162         (IX86_BUILTIN_VFNMSUBSD): Ditto.
2163         (IX86_BUILTIN_VFNMSUBPS): Ditto.
2164         (IX86_BUILTIN_VFNMSUBPD): Ditto.
2165         (IX86_BUILTIN_VFMADDPS256): Ditto.
2166         (IX86_BUILTIN_VFMADDPD256): Ditto.
2167         (IX86_BUILTIN_VFMSUBPS256): Ditto.
2168         (IX86_BUILTIN_VFMSUBPD256): Ditto.
2169         (IX86_BUILTIN_VFMADDSUBPS256): Ditto.
2170         (IX86_BUILTIN_VFMADDSUBPD256): Ditto.
2171         (IX86_BUILTIN_VFMSUBADDPS256): Ditto.
2172         (IX86_BUILTIN_VFMSUBADDPD256): Ditto.
2173         (IX86_BUILTIN_VFNMADDPS256): Ditto.
2174         (IX86_BUILTIN_VFNMADDPD256): Ditto.
2175         (IX86_BUILTIN_VFNMSUBPS256): Ditto.
2176         (IX86_BUILTIN_VFNMSUBPD256): Ditto.
2177         (enum multi_arg_type): New enum for describing the various FMA4
2178         intrinsic argument types.
2179         (bdesc_multi_arg): New table for FMA4 intrinsics.
2180         (ix86_init_mmx_sse_builtins): Add FMA4 intrinsic support.
2181         (ix86_expand_multi_arg_builtin): New function for creating FMA4
2182         intrinsics.
2183         (ix86_expand_builtin): Add FMA4 intrinsic support.
2184         (ix86_fma4_valid_op_p): New function to validate FMA4 3 and 4
2185         operand instructions.
2186         (ix86_expand_fma4_multiple_memory): New function to split the
2187         second memory reference from FMA4 instructions.
2188         * config/i386/sse.md (ssemodesuffixf4): New mode attribute for FMA4.
2189         (ssemodesuffixf2s): Ditto.
2190         (fma4_fmadd<mode>4): Add FMA4 floating point multiply/add
2191         instructions.
2192         (fma4_fmsub<mode>4): Ditto.
2193         (fma4_fnmadd<mode>4): Ditto.
2194         (fma4_fnmsub<mode>4): Ditto.
2195         (fma4_vmfmadd<mode>4): Ditto.
2196         (fma4_vmfmsub<mode>4): Ditto.
2197         (fma4_vmfnmadd<mode>4): Ditto.
2198         (fma4_vmfnmsub<mode>4): Ditto.
2199         (fma4_fmadd<mode>4256): Ditto.
2200         (fma4_fmsub<mode>4256): Ditto.
2201         (fma4_fnmadd<mode>4256): Ditto.
2202         (fma4_fnmsub<mode>4256): Ditto.
2203         (fma4_fmaddsubv8sf4): Ditto.
2204         (fma4_fmaddsubv4sf4): Ditto.
2205         (fma4_fmaddsubv4df4): Ditto.
2206         (fma4_fmaddsubv2df4): Ditto.
2207         (fma4_fmsubaddv8sf4): Ditto.
2208         (fma4_fmsubaddv4sf4): Ditto.
2209         (fma4_fmsubaddv4df4): Ditto.
2210         (fma4_fmsubaddv2df4): Ditto.
2211         (fma4i_fmadd<mode>4): Add FMA4 floating point multiply/add
2212         instructions for intrinsics.
2213         (fma4i_fmsub<mode>4): Ditto.
2214         (fma4i_fnmadd<mode>4): Ditto.
2215         (fma4i_fnmsub<mode>4): Ditto.
2216         (fma4i_vmfmadd<mode>4): Ditto.
2217         (fma4i_vmfmsub<mode>4): Ditto.
2218         (fma4i_vmfnmadd<mode>4): Ditto.
2219         (fma4i_vmfnmsub<mode>4): Ditto.
2220         (fma4i_fmadd<mode>4256): Ditto.
2221         (fma4i_fmsub<mode>4256): Ditto.
2222         (fma4i_fnmadd<mode>4256): Ditto.
2223         (fma4i_fnmsub<mode>4256): Ditto.
2224         (fma4i_fmaddsubv8sf4): Ditto.
2225         (fma4i_fmaddsubv4sf4): Ditto.
2226         (fma4i_fmaddsubv4df4): Ditto.
2227         (fma4i_fmaddsubv2df4): Ditto.
2228         (fma4i_fmsubaddv8sf4): Ditto.
2229         (fma4i_fmsubaddv4sf4): Ditto.
2230         (fma4i_fmsubaddv4df4): Ditto.
2231         (fma4i_fmsubaddv2df4): Ditto.
2232
2233         * doc/invoke.texi (-mfma4): Add documentation.
2234         * doc/extend.texi (x86 intrinsics): Add FMA4 intrinsics.
2235
2236 2009-09-29  Richard Henderson  <rth@redhat.com>
2237
2238         * tree-eh.c (unsplit_eh): Do not unsplit if there's already
2239         an edge to the new destination block.
2240
2241 2009-09-29  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2242
2243         PR target/41393
2244         * pa.c (hppa_profile_hook): Use
2245         make_reg_eh_region_note_nothrow_nononlocal to add REG_EH_REGION note.
2246
2247 2009-09-29  Steve Ellcey  <sje@cup.hp.com>
2248             Alexander Monakov  <amonakov@ispras.ru>
2249
2250         PR target/41365
2251         * config/ia64/predicates.md (not_postinc_destination_operand): New.
2252         (not_postinc_memory_operand): New.
2253         (not_postinc_move_operand): New.
2254         * config/ia64/ia64.md (*cmovdi_internal): Disallow autoincrement.
2255         (*cmovsi_internal): Ditto.
2256
2257 2009-09-29  Pat Haugen  <pthaugen@us.ibm.com>
2258
2259         * config/rs6000/rs6000.c (rs6000_issue_rate): Don't artificially
2260         restrict issue_rate in first pass when scheduling for register
2261         pressure.
2262
2263 2009-09-29  Basile Starynkevitch  <basile@starynkevitch.net>
2264             Rafael Avila de Espindola  <espindola@google.com>
2265
2266         * gengtype.c (plugin_output): New.
2267         (get_output_file_with_visibility): Return plugin_output for plugins.
2268         (main): Parse and use the -P option.
2269         * gty.texi: Update the command line format.
2270
2271 2009-09-29  Jakub Jelinek  <jakub@redhat.com>
2272
2273         PR debug/41438
2274         * dwarf2out.c (const_ok_for_output_1, const_ok_for_output): New
2275         functions.
2276         (mem_loc_descriptor, loc_descriptor, add_const_value_attribute): Bail
2277         out if !const_ok_for_output.
2278
2279         PR debug/41474
2280         * dwarf2out.c (mem_loc_descriptor) <case CONCAT, case CONCATN,
2281         case VAR_LOCATION>: Remove gcc_unreachable ().
2282
2283 2009-09-29  Harsha Jagasia  <harsha.jagasia@amd.com>
2284
2285         * config.gcc (i[34567]86-*-*): Remove mmintrin-common.h.
2286         (x86_64-*-*): Ditto.
2287         * config/i386/smmintrin.h: Move instructions in mmintrin-common.h
2288         back to smmintrin.h.
2289         * config/i386/cpuid.h: (bit_SSE5): Remove SSE5 bit.
2290         * config/i386/x86intrin.h: Remove SSE5.
2291         * config/i386/mmintrin-common.h: Delete file.
2292         * doc/extend.texi (x86 intrinsics): Remove SSE5 flags and builtins.
2293
2294 2009-09-29  Richard Guenther  <rguenther@suse.de>
2295
2296         * alias.c (ao_ref_from_mem): Properly deal with off decl accesses
2297         resulting from stack temporaries on STRICT_ALIGNMENT targets.
2298
2299 2009-09-29  Nick Clifton  <nickc@redhat.com>
2300
2301         * function.c (current_function_name): If there is no current
2302         function just return "<none>".
2303
2304 2009-09-28  Sriraman Tallam  <tmsriram@google.com>
2305
2306         * tree-pass.h (register_pass_info): New structure.
2307         (pass_positioning_ops): Move enum from gcc-plugin.h.
2308         (register_pass): New function.
2309         * gcc-plugin.h (plugin_pass): Delete structure.
2310         (pass_positioning_ops): Delete enum.
2311         * plugin.c (regsiter_pass): Delete function.
2312         (position_pass): Delete function.
2313         (added_pass_nodes): Delete variable.
2314         (prev_added_pass_nodes): Delete variable.
2315         (pass_list_node): Delete structure.
2316         * passes.c (make_pass_instance): New function.
2317         (next_pass_1): Change to call make_pass_instance.
2318         (pass_list_node): Move structure from gcc-plugin.h.
2319         (added_pass_nodes): Move variable from plugin.c.
2320         (prev_added_pass_nodes): Move variable from plugin.c.
2321         (position_pass): New function.
2322         (register_pass): New function.
2323
2324 2009-09-28  Easwaran Raman  <eraman@google.com>
2325
2326         * ifcvt.c (noce_try_abs): Recognize pattern and call
2327         expand_one_cmpl_abs_nojump.
2328         * optabs.c (expand_one_cmpl_abs_nojump): New function.
2329         * optabs.h (expand_one_cmpl_abs_nojump): Declare.
2330
2331 2009-09-28  Ian Lance Taylor  <iant@google.com>
2332
2333         PR middle-end/40500
2334         * c-opts.c (c_common_handle_option): Don't set
2335         warn_jump_misses_init for -Wall.
2336         * doc/invoke.texi (Warning Options): Update documentation.
2337
2338 2009-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2339
2340         * Makefile.in ($(out_object_file)): Depend on
2341         gt-$(basename $(notdir $(out_file))).h.
2342
2343 2009-09-28  Richard Henderson  <rth@redhat.com>
2344
2345         * except.h (struct eh_region_d): Add use_cxa_end_cleanup.
2346         * except.c (gen_eh_region): Set it.
2347         (duplicate_eh_regions_1): Copy it.
2348         * tree-eh.c (lower_resx): Use it to determine which function
2349         to call to resume.
2350
2351         * langhooks.h (struct lang_hooks): Add eh_use_cxa_end_cleanup.
2352         * langhooks-def.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
2353         * builtins.def (BUILT_IN_CXA_END_CLEANUP): New.
2354         * tree.c (build_common_builtin_nodes): Remove parameter.  Build
2355         BUILT_IN_CXA_END_CLEANUP if necessary.
2356
2357         * c-common.c (c_define_builtins): Update call to
2358         build_common_builtin_nodes.
2359
2360 2009-09-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2361
2362         * spu.c (get_branch_target): Return NULL for ASM_OPERANDS patterns.
2363
2364 2009-09-28  Michael Matz  <matz@suse.de>
2365
2366         * builtins.c (interclass_mathfn_icode): New helper.
2367         (expand_builtin_interclass_mathfn): Use it here, and split folding
2368         into ...
2369         (fold_builtin_interclass_mathfn): ... this new folder.
2370         (build_call_nofold_loc): New static helper.
2371         (build_call_nofold): New wrapper macro for above.
2372         (expand_builtin_int_roundingfn): Use it instead of build_call_expr.
2373         (expand_builtin_pow): Ditto.
2374         (expand_builtin_memset_args): Ditto.
2375         (expand_builtin_printf): Ditto.
2376         (expand_builtin_fprintf): Ditto.
2377         (expand_builtin_sprintf): Ditto.
2378         (expand_builtin_memory_chk): Ditto.
2379         (expand_builtin_mempcpy_args): Ditto and don't call folders.
2380         (expand_builtin_stpcpy): Ditto.
2381         (expand_builtin_strcmp): Ditto.
2382         (expand_builtin_strncmp): Ditto.
2383         (expand_builtin_strcpy): Remove FNDECL and MODE arguments.
2384         (expand_builtin_strcpy_args): Don't call folders.
2385         (expand_builtin_memcmp): Ditto.
2386         (expand_builtin_strncpy): Ditto, and use target.
2387         (expand_builtin_memcpy): Ditto.
2388         (expand_builtin_strstr, expand_builtin_strchr, expand_builtin_strrchr,
2389         expand_builtin_strpbrk, expand_builtin_memmove,
2390         expand_builtin_memmove_args, expand_builtin_bcopy,
2391         expand_builtin_memchr, expand_builtin_strcat, expand_builtin_strncat,
2392         expand_builtin_strspn, expand_builtin_strcspn,
2393         expand_builtin_fputs): Remove these.
2394         (expand_builtin): Don't call the above, change calls to other
2395         expanders that changed prototype.
2396         (fold_builtin_stpcpy): New folder split out from expand_builtin_stpcpy.
2397         (fold_builtin_1 <ISFINITE, ISINF, ISNORMAL>): Call
2398         fold_builtin_interclass_mathfn.
2399         (fold_builtin_2 <STPCPY>): Call fold_builtin_stpcpy.
2400         (fold_builtin_strcat): Add folding split from expand_builtin_strcat.
2401
2402         * fold-const.c (fold_binary_loc <NE_EXPR>): Add !exp != 0 -> !exp.
2403         * passes.c (init_optimization_passes): Move pass_fold_builtins
2404         after last phiopt pass.
2405         * tree-inline.c (fold_marked_statements): When folding builtins
2406         iterate over all instruction potentially generated.
2407         * tree-ssa-ccp.c (gimplify_and_update_call_from_tree): Declare
2408         earlier.
2409         (fold_gimple_call): Use it to always fold calls (into potentially
2410         multiple instructions).
2411         * tree-ssa-dom.c (optimize_stmt): Resolve __builtin_constant_p
2412         calls into zero at this time.
2413         * tree-ssa-propagate.c (substitute_and_fold): Ignore multiple
2414         statements generated by builtin folding.
2415
2416 2009-09-28  Nick Clifton  <nickc@redhat.com>
2417
2418         * config/m32r/m32r.c (m32r_is_insn): Return false for debugging insns.
2419
2420 2009-09-28  Duncan Sands  <baldrick@free.fr>
2421
2422         * gcc-plugin.h (PLUGIN_REGISTER_GGC_CACHES): New event.
2423         * plugin.c (plugin_event_name): Add PLUGIN_REGISTER_GGC_CACHES.
2424         (register_callback): Dispatch it.
2425         (invoke_plugin_callbacks): Incorporate in sanity check.
2426         * ggc.h (ggc_register_cache_tab): Add declaration.
2427         * ggc-common.c (ggc_register_root_tab): Simplify.
2428         (const_ggc_cache_tab_t): New typedef.
2429         (extra_cache_vec): New vector of dynamically added cache tables.
2430         (ggc_register_cache_tab): New function.
2431         (ggc_scan_cache_tab): New function.
2432         (ggc_mark_roots): Simplify dynamic roots.  Handle dynamic caches.
2433         * doc/plugins.texi: Document PLUGIN_REGISTER_GGC_CACHES.
2434
2435 2009-09-27  Richard Henderson  <rth@redhat.com>
2436
2437         * tree-ssa-ccp.c (optimize_stack_restore): Relax the conditions under
2438         which we remove __builtin_stack_restore.
2439
2440 2009-09-27  Bernd Schmidt  <bernd.schmidt@analog.com>
2441
2442         * loop-iv.c (iv_analyze_op): Use function_invariant_p, not CONSTANT_P,
2443         to test for GRD_INVARIANT.
2444         (simple_rhs_p): Anything that's function_invariant_p is fine.
2445
2446 2009-09-27  Rafael Avila de Espindola  <espindola@google.com>
2447
2448         * gengtype.c (main): Use plunge_files instead of plugin_output.
2449
2450 2009-09-27  Basile Starynkevitch  <basile@starynkevitch.net>
2451             Rafael Avila de Espindola  <espindola@google.com>
2452
2453         * gengtype.c (write_root, write_roots): Add a emit_pch argument.
2454         Don't print pch related info if it is false.
2455         (main): Don't print pch info in plugin mode.
2456
2457 2009-09-27  Eric Botcazou  <ebotcazou@adacore.com>
2458
2459         * dwarf2out.c (enum dw_val_class): Replace dw_val_class_long_long
2460         with dw_val_class_const_double.
2461         (struct dw_val_struct): Replace val_long_long with val_double and
2462         adjust for above change.
2463         (output_loc_operands): Likewise.
2464         (add_AT_long_long): Rename into...
2465         (add_AT_double): ...this.
2466         (print_die): Replace dw_val_class_long_long with
2467         dw_val_class_const_double and adjust.
2468         (attr_checksum): Likewise.
2469         (same_dw_val_p): Likewise.
2470         (size_of_die): Likewise.
2471         (value_format): Likewise.
2472         (output_die): Likewise.
2473         (loc_descriptor) <CONST_DOUBLE>: Likewise.
2474         (add_const_value_attribute) <CONST_DOUBLE>: Call add_AT_double
2475         instead of add_AT_long_long.
2476         (add_bound_info) <INTEGER_CST>: Generate the bound as an unsigned
2477         value with the precision of its type.
2478
2479 2009-09-27  Andreas Schwab  <schwab@linux-m68k.org>
2480
2481         PR c/41476
2482         * c-typeck.c (build_conditional_expr): Use the readonly and
2483         volatile flags of the operand types, not of the operands itself.
2484
2485 2009-09-27  Peter O'Gorman  <pogma@thewrittenword.com>
2486
2487         * collect2.c (main): Look for -brtl before adding libraries.
2488
2489 2009-09-27  Jonathan Gray  <jsg@openbsd.org>
2490
2491         * config.gcc: Update OpenBSD targets.
2492         * config/openbsd-stdint.h: New file.
2493         * config/openbsd-libpthread.h: New file.
2494         * config/openbsd.h: Update and break out LIB_SPEC definition.
2495         * config/alpha/openbsd.h: Overhaul to reflect ELF migration.
2496         * config/i386/openbsdelf.h: Correct types.
2497         * config/m68k/openbsd.h: Likewise.
2498         * config/mips/openbsd.h: Likewise.
2499         * config/vax/openbsd.h: Likewise.
2500
2501 2009-09-27  Eric Botcazou  <ebotcazou@adacore.com>
2502
2503         * fold-const.c (maybe_lvalue_p): Return false for M(IN|AX)_EXPR.
2504         (extract_muldiv_1) <MINUS_EXPR>: Swap operands if necessary.
2505         * stor-layout.c (layout_type) <ARRAY_TYPE>: Do not take the maximum
2506         of the length and zero.
2507
2508 2009-09-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2509
2510         * Makefile.in (TOPLEV_H): Use $(INPUT_H) not input.h.
2511         (FLAGS_H): Add options.h $(REAL_H).
2512         (SEL_SCHED_IR_H): Add $(BITMAP_H) vecprim.h $(CFGLOOP_H).
2513         (TREE_VECTORIZER_H): New.
2514         (EBITMAP_H): Renamed from EBIMAP_H.
2515         (c-decl.o, c-objc-common.o, c-pretty-print.o, attribs.o, c-omp.o)
2516         (gtype-desc.o, ggc-common.o, ggc-page.o, ggc-zone.o, langhooks.o)
2517         (tree.o, tree-ssa-structalias.o, tree-ssa-ter.o, tree-ssanames.o)
2518         (tree-phinodes.o, tree-ssa-loop.o, tree-ssa-math-opts.o)
2519         (gimple-low.o, omp-low.o, sese.o, graphite-blocking.o)
2520         (graphite-clast-to-gimple.o, graphite-dependences.o)
2521         (graphite-interchange.o, graphite-poly.o, graphite-scop-detection.o)
2522         (graphite-sese-to-poly.o, tree-vect-loop.o, tree-vect-loop-manip.o)
2523         (tree-vect-patterns.o, tree-vect-slp.o, tree-vect-stmts.o)
2524         (tree-vect-data-refs.o, tree-vectorizer.o, gimple.o, tree-mudflap.o)
2525         (targhooks.o, stmt.o, emit-rtl.o, ipa.o, matrix-reorg.o, ipa-inline.o)
2526         (gcse.o, tree-ssa-ccp.o, df-byte-scan.o, vec.o, caller-save.o)
2527         (ira-build.o, ira-costs.o, ira-color.o, ira-emit.o, ira.o)
2528         (haifa-sched.o, sched-rgn.o, sel-sched.o, sel-sched-dump.o)
2529         (sel-sched-ir.o, final.o, $(out_object_file)): Dependencies
2530         updated and fixed as per above changes and per
2531         check_makefile_deps.sh output.
2532
2533         PR bootstrap/40928
2534         * configure.ac: Use $LIBS for '-ldl', not $LDFLAGS.
2535         * configure: Regenerate.
2536
2537 2009-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2538
2539         * doc/install.texi: Update minimum MPC version to 0.7.
2540
2541 2009-09-26  Gerald Pfeifer  <gerald@pfeifer.com>
2542
2543         * doc/install.texi (Binaries): Remove reference to the binary
2544         distribution CD-ROM from the FSF.
2545
2546 2009-09-26  Michael Matz  <matz@suse.de>
2547
2548         PR lto/40758
2549         PR middle-end/41470
2550         * tree-ssa-coalesce.c (coalesce_ssa_name): Add only SSA names
2551         that are mentioned in the body.
2552
2553 2009-09-26  Michael Matz  <matz@suse.de>
2554
2555         PR tree-optimization/41454
2556         * tree-ssa-dom (stmts_to_rescan): Remove variable.
2557         (tree_ssa_dominator_optimize): Don't allocate and free it.
2558         (dom_opt_leave_block): Don't iterate over it.
2559         (eliminate_redundant_computations): Don't return a value.
2560         (cprop_operand, cprop_into_stmt): Ditto.
2561         (optimize_stmt): Don't defer updating stmts.
2562
2563 2009-09-25  Dodji Seketeli  <dodji@redhat.com>
2564
2565         * dwarf2out.c (dwarf_tag_name, gen_generic_params_dies,
2566         generic_parameter_die, template_parameter_pack_die,
2567         gen_formal_parameter_die, gen_subprogram_die): Adjust after
2568         renaming DW_TAG_formal_parameter_pack and
2569         DW_TAG_template_parameter_pack into DW_TAG_GNU_formal_parameter_pack
2570         and DW_TAG_GNU_template_parameter_pack.
2571
2572 2009-09-25  Anatoly Sokolov  <aesok@post.ru>
2573
2574         * config/v850/v850.h (FUNCTION_VALUE): Remove.
2575         * config/v850/v850.c (v850_function_value): New function.
2576         (TARGET_FUNCTION_VALUE): Define.
2577
2578 2009-09-25  Jakub Jelinek  <jakub@redhat.com>
2579
2580         * tree-vect-stmts.c (vectorizable_call): Call
2581         mark_symbols_for_renaming after vect_finish_stmt_generation.
2582
2583         * dwarf2out.c (tls_mem_loc_descriptor): Pass 1 instead of 2
2584         to loc_descriptor_from_tree.
2585         (add_location_or_const_value_attribute): Pass 0 instead of 2
2586         for decl_by_reference_p decls.
2587
2588 2009-09-25  Richard Guenther  <rguenther@suse.de>
2589
2590         PR middle-end/41463
2591         * tree-dfa.c (get_ref_base_and_extent): Fix issue with trailing
2592         arrays again.
2593
2594 2009-09-25  Ben Elliston  <bje@au.ibm.com>
2595
2596         * doc/invoke.texi (RS/6000 and PowerPC Options): Add missing comma
2597         after `power7'.
2598
2599 2009-09-25  Alan Modra  <amodra@bigpond.net.au>
2600
2601         * config/rs6000/rs6000.md (load_toc_v4_PIC_3c): Correct POWER
2602         form of instruction.
2603
2604 2009-09-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2605
2606         PR middle-end/41435
2607         * fold-const.c (const_binop): Handle complex int division.
2608         * tree-complex.c (expand_complex_div_straight,
2609         expand_complex_div_wide): Update comments.
2610
2611 2009-09-24  DJ Delorie  <dj@redhat.com>
2612
2613         PR target/41456
2614         * config/m32c/m32c.h (REG_CLASS_CONTENTS): Add R13.
2615         (reg_class): Likewise.
2616         (REG_CLASS_NAMES): Likewise.
2617         * config/m32c/m32c.c (m32c_reg_class_from_constraint): Likewise.
2618         (m32c_override_options): Disable -fivopts for M32C.
2619
2620 2009-09-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
2621
2622         * config/rs6000/predicates.md (indexed_or_indirect_operand):
2623         Delete VSX load/store with update support.
2624         * config/rs6000/rs6000.c (rs6000_legitimate_address_p): Ditto.
2625         * config/rs6000/vsx.md (vsx_mov<mode>): Ditto.
2626         (vsx_movti): Ditto.
2627         (VSX_U): Delete.
2628         (VSbit): Ditto.
2629         (VStype_load_update): Ditto.
2630         (VStype_store_update): Ditto.
2631         (vsx_load<VSX_U:mode>_update_<P:mptrsize>): Ditto.
2632         (vsx_store<VSX_U:mode>_update_<P:mptrsize>): Ditto.
2633
2634         * config/rs6000/rs6000.h (enum rs6000_builtins): Delete VSX
2635         load/store with update builtins.
2636
2637 2009-09-24  Kai Tietz  <kai.tietz@onevision.com>
2638
2639         * libgcc2.c (L_trampoline): Prototype for getpagesize
2640         and mprotect in WINNT case.
2641
2642 2009-09-24  Anatoly Sokolov  <aesok@post.ru>
2643
2644         * config/rs6000/rs6000.h (FUNCTION_VALUE): Remove macro.
2645         * config/rs6000/rs6000-protos.h (rs6000_function_value): Remove.
2646         * config/rs6000/rs6000.c (rs6000_function_value): Make static, add
2647         'outgoing' argument.
2648         (TARGET_FUNCTION_VALUE): Define.
2649
2650 2009-09-24  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
2651
2652         * config/darwin.h (DWARF2_DEBUGGING_INFO): Define as 1.
2653
2654 2009-09-24  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
2655
2656         PR bootstrap/41405
2657         * common.opt: Initialize dwarf_strict to -1.
2658         * toplev.c (process_options): Catch unset dwarf_strict
2659         and set to 0 for all targets not overriding.
2660         * config/darwin.c (darwin_override_options): Catch unset
2661         dwarf_strict and override to 1.
2662
2663 2009-09-24  Jeff Law  <law@redhat.com>
2664
2665         * tree-into-ssa.c (rewrite_into_ssa): Free interesting_blocks.
2666
2667 2009-09-24  Richard Guenther  <rguenther@suse.de>
2668
2669         PR tree-optimization/36143
2670         PR tree-optimization/38747
2671         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Only
2672         create VIEW_CONVERT_EXPRs for TBAA compatible accesses.
2673
2674 2009-09-24  Jakub Jelinek  <jakub@redhat.com>
2675
2676         PR bootstrap/41457
2677         * dwarf2out.c (add_const_value_attribute): For HIGH and CONST_FIXED,
2678         return false instead of gcc_unreachable ().  For CONST return the
2679         value returned by recursive call instead of always returning true.
2680         (tree_add_const_value_attribute): Return the value returned by
2681         add_const_value_attribute instead of always returning true if rtl
2682         is non-NULL.
2683
2684 2009-09-23  Justin Seyster  <jrseys@gmail.com>
2685
2686         * Makefile.in (PLUGIN_HEADERS): Include real.h.
2687
2688 2009-09-24  Jakub Jelinek  <jakub@redhat.com>
2689
2690         * cgraphunit.c (cgraph_lower_function): Revert last change.
2691         * targhooks.c (default_static_chain): Use !DECL_STATIC_CHAIN
2692         instead of DECL_NO_STATIC_CHAIN.
2693         * tree-cfg.c (verify_gimple_call): Likewise.
2694         * tree-nested.c (get_chain_decl, get_chain_field,
2695         convert_tramp_reference_op, convert_gimple_call): Likewise.
2696         (convert_all_function_calls): Likewise.  Always set or clear
2697         DECL_STATIC_CHAIN initially, for !n->outer clear it.
2698         (lower_nested_functions): Remove DECL_NO_STATIC_CHAIN checking code.
2699         * c-parser.c (c_parser_declaration_or_fndef): Set DECL_STATIC_CHAIN
2700         if nested.
2701         * print-tree.c (print_node): Handle DECL_STATIC_CHAIN instead of
2702         DECL_NO_STATIC_CHAIN.
2703         * config/i386/i386.c (ix86_static_chain): Use !DECL_STATIC_CHAIN
2704         instead of DECL_NO_STATIC_CHAIN.
2705         (ix86_function_regparm, find_drap_reg): Likewise.  Don't test
2706         decl_function_context.
2707         * varasm.c (initializer_constant_valid_p): Likewise.
2708         * tree.h (DECL_NO_STATIC_CHAIN): Renamed to ...
2709         (DECL_STATIC_CHAIN): ... this.
2710         * config/moxie/moxie.c (moxie_static_chain): Use !DECL_STATIC_CHAIN
2711         instead of DECL_NO_STATIC_CHAIN.
2712
2713 2009-09-23  Basile Starynkevitch  <basile@starynkevitch.net>
2714             Rafael Avila de Espindola  <espindola@google.com>
2715
2716         * gengtype.c (nb_plugin_files): Make it unsigned to match
2717         num_gt_files. Adjust other variables to avoid warnings.
2718         (main): Allocate an all zero lang_bitmap before each plugin file name
2719         to match regular file names.
2720
2721 2009-09-23  Richard Henderson  <rth@redhat.com>
2722
2723         * doc/tm.texi (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
2724         (TARGET_STATIC_CHAIN): Mention that this hook must be used for
2725         static chain passed in memory.
2726         * system.h (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Poison.
2727         * targhooks.c (default_static_chain): Don't handle STATIC_CHAIN,
2728         STATIC_CHAIN_INCOMING.  Issue a sorry if there's no
2729         STATIC_CHAIN_REGNUM defined.
2730
2731         * config/picochip/picochip-protos.h: s/class/klass/.
2732         * config/picochip/picochip.c (TARGET_STATIC_CHAIN): New.
2733         (picochip_static_chain): New.
2734         * config/picochip/picochip.h (STATIC_CHAIN): Remove.
2735         (STATIC_CHAIN_INCOMING): Remove.
2736
2737         * config/xtensa/xtensa.c (TARGET_STATIC_CHAIN): New.
2738         (xtensa_static_chain): New.
2739         * config/xtensa/xtensa.h (STATIC_CHAIN): Remove.
2740         (STATIC_CHAIN_INCOMING): Remove.
2741
2742 2009-09-23  Anatoly Sokolov  <aesok@post.ru>
2743
2744         * config/pa/pa.h (FUNCTION_VALUE): Remove macro.
2745         * config/pa/pa-protos.h (function_value): Remove.
2746         * config/pa/pa.c (pa_function_value): Rename from function_value.
2747         Make static, add 'outgoing' argument.
2748         (TARGET_FUNCTION_VALUE): Define.
2749
2750 2009-09-23  Anatoly Sokolov  <aesok@post.ru>
2751
2752         * config/avr/avr.c (avr_regs_to_save): Use current_function_is_leaf
2753         instead of cfun->machine->is_leaf.
2754         * config/avr/avr.h (machine_function): Remove is_leaf field.
2755
2756 2009-09-23  Jakub Jelinek  <jakub@redhat.com>
2757
2758         PR debug/41439
2759         * dwarf2out.c (address_of_int_loc_descriptor): Don't emit
2760         DW_OP_piece after DW_OP_stack_value, adjust size calculations
2761         for it, when DW_OP_stack_value and DW_OP_implicit_value has
2762         the same size, prefer DW_OP_stack_value.
2763         (loc_descriptor, loc_list_for_address_of_addr_expr_of_indirect_ref,
2764         loc_list_from_tree): Don't emit DW_OP_piece after DW_OP_stack_value.
2765
2766 2009-09-23  Alexandre Oliva  <aoliva@redhat.com>
2767
2768         PR debug/41353
2769         * var-tracking.c (add_with_sets): Sort MO_VAL_LOC last among uses.
2770
2771 2009-09-23  Alexandre Oliva  <aoliva@redhat.com>
2772
2773         PR debug/41248
2774         * cfgexpand.c (convert_debug_memory_address): New.
2775         (expand_debug_expr): Convert base address and offset to the same
2776         mode.  Use it to convert addresses to other modes.  Accept
2777         ptr_mode addresses.
2778
2779 2009-09-23  Richard Guenther  <rguenther@suse.de>
2780
2781         * alias.c (ao_ref_from_mem): Correct for negative MEM_OFFSET
2782         produced for bigendian targets with promoted subregs.
2783
2784 2009-09-23  Richard Guenther  <rguenther@suse.de>
2785
2786         * value-prof.c (gimple_ic): Purge old EH edges only after building
2787         the new ones.
2788
2789 2009-09-23  Nick Clifton  <nickc@redhat.com>
2790
2791         * config/arc/arc.c (arc_trampoline_init): Fix typo.
2792
2793 2009-09-23  Jakub Jelinek  <jakub@redhat.com>
2794
2795         PR bootstrap/41405
2796         * doc/invoke.texi: Document -gstrict-dwarf and -gno-strict-dwarf.
2797
2798         PR bootstrap/41436
2799         * cgraphunit.c (cgraph_lower_function): Set DECL_NO_STATIC_CHAIN
2800         on non-nested functions.
2801
2802 2009-09-23  Jakub Jelinek  <jakub@redhat.com>
2803             Jan Hubicka  <jh@suse.cz>
2804
2805         * dwarf2out.c (loc_list_plus_const): Only define if
2806         DWARF2_DEBUGGING_INFO.
2807         (address_of_int_loc_descriptor): Likewise.
2808
2809         PR debug/41411
2810         * dwarf2out.c (mem_loc_descriptor): Handle HIGH.
2811
2812 2009-09-23  Uros Bizjak  <ubizjak@gmail.com>
2813
2814         PR c/39779
2815         * c-typeck.c (build_binary_op) <short_shift>: Check that integer
2816         constant is more than zero.
2817
2818 2009-09-23  Alan Modra  <amodra@bigpond.net.au>
2819
2820         PR target/40473
2821         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't
2822         call final to emit non-scheduled prologue, instead insert at entry.
2823
2824 2009-09-22  Loren J. Rittle  <ljrittle@acm.org>
2825             Joseph S. Myers  <joseph@codesourcery.com>
2826
2827         * doc/install.texi (*-*-freebsd*): Add proper format codes.
2828
2829 2009-09-22  Basile Starynkevitch  <basile@starynkevitch.net>
2830             Rafael Avila de Espindola  <espindola@google.com>
2831
2832         * gengtype.c (is_file_equal): New function.
2833         (close_output_files): Use is_file_equal. Free of->buf.
2834
2835 2009-09-22  Basile Starynkevitch  <basile@starynkevitch.net>
2836             Rafael Avila de Espindola  <espindola@google.com>
2837
2838         * gengtype.c (write_types, write_local): Add the output_header
2839         argument. Update all callers.
2840
2841 2009-09-22  Dodji Seketeli  <dodji@redhat.com>
2842
2843         * dwarf2out.c (template_parameter_pack_die,
2844         gen_formal_parameter_pack_die ): New functions.
2845         (make_ith_pack_parameter_name): Remove this function.
2846         (dwarf_tag_name): Support printing DW_TAG_template_parameter_pack and
2847         DW_TAG_formal_parameter_pack.
2848         (gen_generic_params_dies): Represent each template parameter pack
2849         by a DW_TAG_template_parameter_pack DIE. Argument pack elements are
2850         represented by usual DW_TAG_template_*_parameter DIEs that are
2851         children of the DW_TAG_template_parameter_pack element DIE.
2852         (generic_parameter_die): This doesn't deal with parameter pack
2853         names anymore. Don't generate DW_AT_name for some DIEs, e.g. children
2854         of parameter pack DIEs.
2855         (gen_formal_parameter_die): Add a flag to not emit DW_AT_name
2856         in certain cases, e.g. for pack elements.
2857         (gen_formal_types_die, gen_decl_die): Adjust usage of
2858         gen_formal_parameter_die.
2859         (gen_subprogram_die): Represent each function parameter pack by a
2860         DW_TAG_formal_parameter_pack DIE. Arguments of of the pack are
2861         represented by usual DW_TAG_formal_parameter DIEs that are children
2862         of the DW_TAG_formal_parameter_pack DIE. Remove references to
2863         ____builtin_va_alist decls as no part of the compiler uses those
2864         anymore.
2865         * langhooks.h (struct lang_hooks_for_decls): Add
2866         function_parm_expanded_from_pack_p, get_generic_function_decl
2867         and function_parameter_pack_p hooks.  Fix comment for
2868         get_innermost_generic_parms hook.
2869         * langhooks-def.h (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P,
2870         LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P ): Declare new hook
2871         macros and use them to initialize lang_hook.
2872
2873 2009-09-22  Richard Henderson  <rth@redhat.com>
2874
2875         * system.h (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE): Poison.
2876         (TRAMPOLINE_ADJUST_ADDRESS): Poison.
2877         * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): Don't conditionalize
2878         on TRAMPOLINE_TEMPLATE.
2879         (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Don't conditionalize on
2880         TRAMPOLINE_ADJUST_ADDRESS.
2881         * targhooks.c (default_asm_trampoline_template): Remove.
2882         (default_trampoline_adjust_address): Remove.
2883         (default_trampoline_init): Don't handle INITIALIZE_TRAMPOLINE.
2884         * targhooks.h: Update decls.
2885
2886 2009-09-22  Dave Korn  <dave.korn.cygwin@gmail.com>
2887
2888         * config/i386/cygming.h (TARGET_USE_JCR_SECTION): Enable.
2889         * config/i386/cygwin.h (LIBGCJ_SONAME): Define.
2890         * config/i386/mingw32.h (LIBGCJ_SONAME): Likewise.
2891
2892 2009-09-22  Alexandre Oliva  <aoliva@redhat.com>
2893
2894         PR debug/41295
2895         * reload1.c (reload): Reset debug insns with pseudos without
2896         equivalences.
2897
2898 2009-09-22  Janis Johnson  <janis187@us.ibm.com>
2899
2900         * config/i386/i386.c (ix86_scalar_mode_supported_p): Don't return
2901         unconditional true for decimal float modes.
2902         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Ditto.
2903         * config/s390/s390.c (s390_scalar_mode_supported_p): Ditto.
2904
2905 2009-09-22  Loren J. Rittle  <ljrittle@acm.org>
2906
2907         * unwind-dw2-fde-glibc.c: Define and use USE_PT_GNU_EH_FRAME.
2908         Enable a new case for __FreeBSD__ >= 7.
2909         * crtstuff.c:  Define USE_PT_GNU_EH_FRAME for __FreeBSD__ >= 7.
2910         * config/t-freebsd: Define LIB2ADDEH and LIB2ADDEHDEP.
2911         * config/freebsd-spec.h: Conditionally define LINK_EH_SPEC
2912         and USE_LD_AS_NEEDED.
2913
2914         * doc/install.texi (*-*-freebsd*): Update target information.
2915
2916 2009-09-22  Richard Guenther  <rguenther@suse.de>
2917
2918         PR middle-end/41395
2919         * tree-dfa.c (get_ref_base_and_extent): Handle trailing
2920         arrays really properly.
2921
2922 2009-09-22  Richard Henderson  <rth@redhat.com>
2923
2924         PR target/41246
2925         * target.h (struct gcc_target): Add asm_out.trampoline_template,
2926         calls.static_chain, calls.trampoline_init,
2927         calls.trampoline_adjust_address.
2928         * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
2929         (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
2930         (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
2931         * builtins.c (expand_builtin_setjmp_receiver): Use
2932         targetm.calls.static_chain; only clobber registers.
2933         (expand_builtin_init_trampoline): Use targetm.calls.trampoline_init;
2934         set up memory attributes properly for the trampoline block.
2935         (expand_builtin_adjust_trampoline): Use
2936         targetm.calls.trampoline_adjust_address.
2937         * calls.c (prepare_call_address): Add fndecl argument.  Use
2938         targetm.calls.static_chain.
2939         * df-scan.c (df_need_static_chain_reg): Remove.
2940         (df_get_entry_block_def_set): Use targetm.calls.static_chain;
2941         consolodate static chain handling.
2942         * doc/tm.texi: Document new hooks.
2943         * emit-rtl.c (static_chain_rtx, static_chain_incoming_rtx): Remove.
2944         (init_emit_regs): Don't initialize them.
2945         * expr.h (prepare_call_address): Update decl.
2946         * final.c (profile_function): Use targetm.calls.static_chain.
2947         * function.c (expand_function_start): Likewise.
2948         * rtl.h (static_chain_rtx, static_chain_incoming_rtx): Remove.
2949         * stmt.c (expand_nl_goto_receiver): Use targetm.calls.static_chain;
2950         only clobber registers.
2951         * targhooks.c (default_static_chain): New.
2952         (default_asm_trampoline_template, default_trampoline_init): New.
2953         (default_trampoline_adjust_address): New.
2954         * targhooks.h: Declare them.
2955         * varasm.c (assemble_trampoline_template): Use
2956         targetm.asm_out.trampoline_template.  Make the memory block const
2957         and set its size.
2958
2959         * config/alpha/alpha.c (alpha_trampoline_init): Rename from
2960         alpha_initialize_trampoline.  Make static.  Merge VMS parameter
2961         differences into the TARGET_ABI_OPEN_VMS code block.
2962         (TARGET_TRAMPOLINE_INIT): New.
2963         * config/alpha/alpha.h (TRAMPOLINE_TEMPLATE): Remove.
2964         (TRAMPOLINE_SECTION, INITIALIZE_TRAMPOLINE): Remove.
2965         * config/alpha/vms.h (TRAMPOLINE_SIZE, TRAMPOLINE_ALIGNMENT): Remove.
2966         (INITIALIZE_TRAMPOLINE): Remove.
2967
2968         * config/arc/arc.h (TRAMPOLINE_ALIGNMENT): New.
2969         (TRAMPOLINE_TEMPLATE): Merge with ...
2970         (INITIALIZE_TRAMPOLINE): ... this and move ...
2971         * config/arc/arc.c (arc_trampoline_init): ... here.
2972         (TARGET_TRAMPOLINE_INIT): New.
2973
2974         * config/arm/arm.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
2975         (TARGET_TRAMPOLINE_INIT, TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
2976         (arm_asm_trampoline_template): New.
2977         (arm_trampoline_init, arm_trampoline_adjust_address): New.
2978         * config/arm/arm.h (TRAMPOLINE_TEMPLATE, ARM_TRAMPOLINE_TEMPLATE,
2979         THUMB2_TRAMPOLINE_TEMPLATE, THUMB1_TRAMPOLINE_TEMPLATE): Move all
2980         code to arm_asm_trampoline_template.
2981         (TRAMPOLINE_ADJUST_ADDRESS): Move code to
2982         arm_trampoline_adjust_address.
2983         (INITIALIZE_TRAMPOLINE): Move code to arm_trampoline_init;
2984         adjust for target hook parameters.
2985
2986         * config/avr/avr.h (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE):
2987         Remove.
2988
2989         * config/bfin/bfin-protos.h (initialize_trampoline): Remove.
2990         * config/bfin/bfin.c (bfin_asm_trampoline_template): New.
2991         (bfin_trampoline_init): Rename from initialize_trampoline;
2992         make static; update for target hook parameters.
2993         (TARGET_ASM_TRAMPOLINE_TEMPLATE, TARGET_TRAMPOLINE_INIT): New.
2994         * config/bfin/bfin.h (TRAMPOLINE_TEMPLATE): Move code to
2995         bfin_asm_trampoline_template.
2996         (INITIALIZE_TRAMPOLINE): Remove.
2997
2998         * config/cris/cris.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
2999         TARGET_TRAMPOLINE_INIT, cris_asm_trampoline_template,
3000         cris_trampoline_init): New.
3001         * config/cris/cris.h (TRAMPOLINE_TEMPLATE): Move code to
3002         cris_asm_trampoline_template.
3003         (INITIALIZE_TRAMPOLINE): Move code to cris_trampoline_init;
3004         adjust for target hook parameters.
3005
3006         * config/crx/crx.h (INITIALIZE_TRAMPOLINE): Remove.
3007
3008         * config/fr30/fr30.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
3009         TARGET_TRAMPOLINE_INIT, fr30_asm_trampoline_template,
3010         fr30_trampoline_init): New.
3011         * config/fr30/fr30.h (TRAMPOLINE_TEMPLATE): Move code to
3012         fr30_asm_trampoline_template.
3013         (INITIALIZE_TRAMPOLINE): Move code to fr30_trampoline_init;
3014         adjust for target hook parameters.
3015
3016         * config/frv/frv.c (TARGET_TRAMPOLINE_INIT): New.
3017         (frv_trampoline_init): Rename from frv_initialize_trampoline;
3018         make static, adjust arguments for TARGET_TRAMPOLINE_INIT hook.
3019         * config/frv/frv.h (INITIALIZE_TRAMPOLINE): Remove.
3020         * config/frv/frv-protos.h (frv_initialize_trampoline): Remove.
3021
3022         * config/h8300/h8300.c (h8300_trampoline_init): New.
3023         (TARGET_TRAMPOLINE_INIT): New.
3024         * config/h8300/h8300.h (INITIALIZE_TRAMPOLINE): Move code
3025         to h8300_trampoline_init and adjust for hook parameters.
3026
3027         * config/ia64/ia64-protos.h (ia64_initialize_trampoline): Remove.
3028         * config/ia64/ia64.c (TARGET_TRAMPOLINE_INIT): New.
3029         (ia64_trampoline_init): Rename from ia64_initialize_trampoline;
3030         make static; adjust for hook parameters.
3031         * config/ia64/ia64.h (INITIALIZE_TRAMPOLINE): Remove.
3032
3033         * config/iq2000/iq2000.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
3034         (TARGET_TRAMPOLINE_INIT): New.
3035         (iq2000_asm_trampoline_template, iq2000_trampoline_init): New.
3036         * config/iq2000/iq2000.h (TRAMPOLINE_TEMPLATE): Move code to
3037         iq2000_asm_trampoline_template.
3038         (INITIALIZE_TRAMPOLINE): Move code to iq2000_trampoline_init.
3039         (TRAMPOLINE_CODE_SIZE): New.
3040         (TRAMPOLINE_SIZE): Use it.
3041         (TRAMPOLINE_ALIGNMENT): Follow Pmode.
3042
3043         * config/m32c/m32c-protos.h (m32c_initialize_trampoline): Remove.
3044         * config/m32c/m32c.c (TARGET_TRAMPOLINE_INIT): New.
3045         (m32c_trampoline_init): Rename from m32c_initialize_trampoline;
3046         adjust for hook parameters.
3047         * config/m32c/m32c.h (INITIALIZE_TRAMPOLINE): Remove.
3048
3049         * config/m32r/m32r.c (TARGET_TRAMPOLINE_INIT): New.
3050         (m32r_trampoline_init): New.
3051         * config/m32r/m32r.h (INITIALIZE_TRAMPOLINE): Move code to
3052         m32r_trampoline_init.
3053
3054         * config/m68hc11/m68hc11.c (TARGET_TRAMPOLINE_INIT): New.
3055         (m68hc11_trampoline_init): Rename from m68hc11_initialize_trampoline;
3056         make static; update for hook parameters.
3057         * config/m68hc11/m68hc11-protos.h: Update.
3058         * config/m68hc11/m68hc11.h (INITIALIZE_TRAMPOLINE): Remove.
3059
3060         * config/mcore/mcore.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
3061         (TARGET_TRAMPOLINE_INIT): New.
3062         (mcore_function_value): Fix typo.
3063         (mcore_asm_trampoline_template, mcore_trampoline_init): New.
3064         * config/mcore/mcore.h (TRAMPOLINE_TEMPLATE): Move code
3065         to mcore_asm_trampoline_template.
3066         (INITIALIZE_TRAMPOLINE): Move code to mcore_trampoline_init.
3067
3068         * config/mep/mep.h (INITIALIZE_TRAMPOLINE): Remove.
3069         * config/mep/mep.c (TARGET_TRAMPOLINE_INIT): New.
3070         (mep_trampoline_init): Rename from mep_init_trampoline; make static;
3071         update for hook parameters.
3072         * config/mep/mep-protos.h (mep_init_trampoline): Remove.
3073
3074         * config/mips/mips.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
3075         mips_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
3076         mips_trampoline_init): New.
3077         * config/mips/mips.h (TRAMPOLINE_TEMPLATE): Move code to
3078         mips_asm_trampoline_template.
3079         (INITIALIZE_TRAMPOLINE): Move code to mips_trampoline_init;
3080         update for hook parameters.
3081
3082         * gcc/config/mmix/mmix.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
3083         (TARGET_TRAMPOLINE_INIT): New.
3084         (mmix_trampoline_size): Remove.
3085         (mmix_asm_trampoline_template): Rename from mmix_trampoline_template;
3086         make static.  Remove out-of-date tetra vs octa comment.
3087         (mmix_trampoline_init): Rename from mmix_initialize_trampoline;
3088         make static; update for hook parameters.
3089         * config/mmix/mmix.h (TRAMPOLINE_TEMPLATE): Remove.
3090         (INITIALIZE_TRAMPOLINE): Remove.
3091         (TRAMPOLINE_SIZE): Use a constant instead of mmix_trampoline_size.
3092         (TRAMPOLINE_ALIGNMENT): New.
3093         * gcc/config/mmix/mmix-protos.h: Update.
3094
3095         * config/mn10300/mn10300.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
3096         mn10300_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
3097         mn10300_trampoline_init): New.
3098         * config/mn10300/mn10300.h (TRAMPOLINE_TEMPLATE): Move code to
3099         mn10300_asm_trampoline_template.
3100         (INITIALIZE_TRAMPOLINE): Move code to mn10300_trampoline_init.
3101
3102         * config/moxie/moxie.c (moxie_static_chain,
3103         moxie_asm_trampoline_template, moxie_trampoline_init,
3104         TARGET_STATIC_CHAIN, TARGET_ASM_TRAMPOLINE_TEMPLATE,
3105         TARGET_TRAMPOLINE_INIT): New.
3106         * config/moxie/moxie.h (INITIALIZE_TRAMPOLINE): Move code to
3107         moxie_trampoline_init.
3108         (TRAMPOLINE_TEMPLATE): Move code to moxie_asm_trampoline_template.
3109         (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
3110
3111         * gcc/config/pa/pa.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
3112         pa_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
3113         pa_trampoline_init, TARGET_TRAMPOLINE_ADJUST_ADDRESS,
3114         pa_trampoline_adjust_address): New.
3115         * config/pa/pa.h (TRAMPOLINE_TEMPLATE): Move code to
3116         pa_asm_trampoline_template.
3117         (TRAMPOLINE_ALIGNMENT): New.
3118         (TRAMPOLINE_CODE_SIZE): Move to pa.c.
3119         (INITIALIZE_TRAMPOLINE): Move code to pa_trampoline_init;
3120         adjust for hook parameters.
3121         (TRAMPOLINE_ADJUST_ADDRESS): Move code to pa_trampoline_adjust_address.
3122
3123         * config/pdp11/pdp11.c (pdp11_trampoline_init): New.
3124         (TARGET_TRAMPOLINE_INIT): New.
3125         * config/pdp11/pdp11.h (TRAMPOLINE_TEMPLATE): Remove.
3126         (INITIALIZE_TRAMPOLINE): Move code to pdp11_trampoline_init.
3127
3128         * config/picochip/picochip.h (INITIALIZE_TRAMPOLINE): Remove.
3129
3130         * config/rs6000/rs6000-protos.h (rs6000_initialize_trampoline): Remove.
3131         * config/rs6000/rs6000.c (TARGET_TRAMPOLINE_INIT): New.
3132         (rs6000_trampoline_init): Rename from rs6000_initialize_trampoline;
3133         make static; adjust parameters for the hook.
3134         * config/rs6000/rs6000.h (INITIALIZE_TRAMPOLINE): Remove.
3135
3136         * config/s390/s390.c (s390_asm_trampoline_template): Rename from
3137         s390_trampoline_template; make static.
3138         (s390_trampoline_init): Rename from s390_initialize_trampoline;
3139         make static; adjust for target hook.
3140         (TARGET_ASM_TRAMPOLINE_TEMPLATE, TARGET_TRAMPOLINE_INIT): New.
3141         * config/s390/s390-protos.h: Remove trampoline decls.
3142         * config/s390/s390.h (INITIALIZE_TRAMPOLINE): Remove.
3143         (TRAMPOLINE_TEMPLATE): Remove.
3144         (TRAMPOLINE_ALIGNMENT): New.
3145
3146         * config/score/score-protos.h (score_initialize_trampoline): Remove.
3147         * config/score/score.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
3148         (TARGET_TRAMPOLINE_INIT): New.
3149         (score_asm_trampoline_template): New.
3150         (score_trampoline_init): Rename from score_initialize_trampoline;
3151         make static; adjust for hook parameters.
3152         * config/score/score.h (TRAMPOLINE_TEMPLATE): Move code to
3153         score[37]_asm_trampoline_template.
3154         (INITIALIZE_TRAMPOLINE): Remove.
3155         * config/score/score3.c (score3_asm_trampoline_template): New.
3156         (score3_trampoline_init): Rename from score3_initialize_trampoline;
3157         adjust for target hook.
3158         * config/score/score7.c (score7_asm_trampoline_template): New.
3159         (score7_trampoline_init): Rename from score7_initialize_trampoline;
3160         adjust for target hook.
3161         * config/score/score3.h, config/score/score7.h: Update.
3162
3163         * config/sh/sh-protos.h (sh_initialize_trampoline): Remove.
3164         * config/sh/sh.c (TARGET_TRAMPOLINE_INIT): New.
3165         (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
3166         (sh_trampoline_init): Rename from sh_initialize_trampoline;
3167         make static; adjust for target hook parameters.
3168         (sh_trampoline_adjust_address): New.
3169         * config/sh/sh.h (INITIALIZE_TRAMPOLINE): New.
3170         (TRAMPOLINE_ADJUST_ADDRESS): Move code to sh_trampoline_adjust_address.
3171
3172         * config/sparc/sparc.c (TARGET_TRAMPOLINE_INIT): New.
3173         (sparc32_initialize_trampoline): Rename from
3174         sparc_initialize_trampoline; make static; replace tramp parameter
3175         with m_tramp and update memory accesses.
3176         (sparc64_initialize_trampoline): Similarly.
3177         (sparc_trampoline_init): New.
3178         * config/sparc/sparc-protos.h: Remove trampoline decls.
3179         * config/sparc/sparc.h (INITIALIZE_TRAMPOLINE): Remove.
3180         * config/sparc/sparc.md (nonlocal_goto): Don't use static_chain_rtx.
3181
3182         * config/spu/spu.c (TARGET_TRAMPOLINE_INIT): New.
3183         (array_to_constant): Make ARR parameter const.
3184         (spu_trampoline_init): Rename from spu_initialize_trampoline;
3185         make static; update for hook parameters.
3186         * config/spu/spu-protos.h: Update decls.
3187         * config/spu/spu.h (INITIALIZE_TRAMPOLINE): Remove.
3188
3189         * config/stormy16/stormy16.c (xstormy16_trampoline_init): Rename
3190         from xstormy16_initialize_trampoline; make static; update for
3191         hook parameters.
3192         (TARGET_TRAMPOLINE_INIT): New.
3193         * config/stormy16/stormy16.h (INITIALIZE_TRAMPOLINE): Remove.
3194
3195         * config/v850/v850.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
3196         (TARGET_TRAMPOLINE_INIT): New.
3197         (v850_can_eliminate): Make static.
3198         (v850_asm_trampoline_template, v850_trampoline_init): New.
3199         * config/v850/v850.h (TRAMPOLINE_TEMPLATE): Move code to
3200         v850_asm_trampoline_template.
3201         (INITIALIZE_TRAMPOLINE): Move code to v850_trampoline_init
3202         and adjust for target hook parameters.
3203
3204         * config/vax/vax.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
3205         (TARGET_TRAMPOLINE_INIT): New.
3206         (vax_asm_trampoline_template, vax_trampoline_init): New.
3207         * config/vax/vax.h (TRAMPOLINE_TEMPLATE): Move code to
3208         vax_asm_trampoline_template.
3209         (INITIALIZE_TRAMPOLINE): Move code to vax_trampoline_init.
3210
3211         * config/xtensa/xtensa.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
3212         (TARGET_TRAMPOLINE_INIT): New.
3213         (xtensa_asm_trampoline_template): Rename from
3214         xtensa_trampoline_template; make static.
3215         (xtensa_trampoline_init): Rename from xtensa_initialize_trampoline;
3216         make static; update for hook parameters.
3217         * config/xtensa/xtensa-protos.h: Remove trampoline decls.
3218         * config/xtensa/xtensa.h (TRAMPOLINE_TEMPLATE): Remove.
3219         (INITIALIZE_TRAMPOLINE): Remove.
3220
3221         * config/i386/i386.c (ix86_function_regparm): Do not issue an
3222         error for nested functions with regparm=3.
3223         (ix86_compute_frame_layout): Adjust frame pointer offset for
3224         ix86_static_chain_on_stack.
3225         (ix86_expand_prologue): Handle ix86_static_chain_on_stack.
3226         (ix86_emit_restore_reg_using_pop): Increment ix86_cfa_state->offset,
3227         don't reset to UNITS_PER_WORD.
3228         (ix86_emit_leave): Adjust ix86_cfa_state.
3229         (ix86_expand_epilogue): Handle ix86_static_chain_on_stack.
3230         (ix86_static_chain): New.
3231         (ix86_trampoline_init): Rename from x86_initialize_trampoline;
3232         make static; update for target hook parameters; use ix86_static_chain.
3233         (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
3234         * config/i386/i386.h (STATIC_CHAIN_REGNUM): Remove.
3235         (INITIALIZE_TRAMPOLINE): Remove.
3236         (TRAMPOLINE_SIZE): Use 24 for 64-bit.
3237         (struct machine_function): Use BOOL_BITFIELD; rearrange bitfields
3238         to the end.  Add static_chain_on_stack.
3239         (ix86_static_chain_on_stack): New.
3240
3241         * config/m68k/m68k.c (TARGET_TRAMPOLINE_INIT): New.
3242         (m68k_output_mi_thunk): Don't use static_chain_rtx.
3243         (m68k_trampoline_init): New.
3244         * config/m68k/m68k.h (INITIALIZE_TRAMPOLINE): Move code to
3245         m68k_trampoline_init and adjust for hook parameters.
3246         * config/m68k/netbsd-elf.h (TRAMPOLINE_TEMPLATE): Remove.
3247         (TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE): Remove.
3248
3249 2009-09-22  Jakub Jelinek  <jakub@redhat.com>
3250
3251         * config/rs6000/rs6000.c (bdesc_2arg): Fix CODE_FOR_vector_gt* codes
3252         for __builtin_altivec_vcmpgt{sb,uh,sh,uw}.
3253
3254         * reload1.c (reload): Call wrap_constant when substituting
3255         reg for equiv inside of DEBUG_INSNs.
3256
3257         PR bootstrap/41405
3258         * dwarf2out.c (base_type_die, record_type_tag, gen_subprogram_die,
3259         add_call_src_coords_attributes, add_high_low_attributes,
3260         gen_compile_unit_die, gen_type_die_with_usage force_decl_die,
3261         gen_decl_die, dwarf2out_imported_module_or_decl_1, dwarf2out_finish,
3262         dwarf2out_imported_module_or_decl): Avoid using DWARF3 additions
3263         when -gdwarf-2 -gstrict-dwarf.
3264         (loc_list_from_tree): Likewise.  Avoid using DWARF4 additions when
3265         -gdwarf-[23] -gstrict-dwarf.
3266         (address_of_int_loc_descriptor, loc_descriptor,
3267         loc_list_for_address_of_addr_expr_of_indirect_ref): Avoid using
3268         DWARF4 additions when -gdwarf-[23] -gstrict-dwarf.
3269         * common.opt (gno-strict-dwarf, gstrict-dwarf): New options.
3270
3271 2009-09-22  Richard Guenther  <rguenther@suse.de>
3272
3273         PR tree-optimization/41428
3274         * tree-ssa-ccp.c (ccp_fold_stmt): New function.
3275         (ccp_finalize): Pass it to substitute_and_fold.
3276
3277 2009-09-22  Richard Guenther  <rguenther@suse.de>
3278
3279         * tree-ssa-propagate.h (ssa_prop_fold_stmt_fn): Declare.
3280         (substitute_and_fold): Adjust prototype.
3281         * tree-vrp.c (vrp_evaluate_conditional): Make static.
3282         (simplify_stmt_using_ranges): Likewise.
3283         (fold_predicate_in): Move here from tree-ssa-propagate.c.
3284         (vrp_fold_stmt): New function.
3285         (vrp_finalize): Pass it to substitute_and_fold.
3286         * tree-flow.h (vrp_evaluate_conditional): Remove.
3287         (simplify_stmt_using_ranges): Likewise.
3288         * tree-ssa-ccp.c (ccp_finalize): Adjust call to substitute_and_fold.
3289         * tree-ssa-copy.c (fini_copy_prop): Likewise.
3290         * tree-ssa-propagate.c (struct prop_stats_d): Rename num_pred_folded
3291         member.
3292         (fold_predicate_in): Move to tree-vrp.c.
3293         (substitute_and_fold): Use the callback instead of calling into
3294         tree-vrp.c functions directly.
3295
3296 2009-09-22  Jakub Jelinek  <jakub@redhat.com>
3297
3298         * dwarf2out.c (address_of_int_loc_descriptor): Avoid signed/unsigned
3299         comparison warning on rs6000.
3300
3301         PR middle-end/41429
3302         * tree-cfg.c (remove_useless_stmts_tc): Call gsi_next (gsi) even for
3303         GIMPLE_EH_MUST_NOT_THROW cleanup.
3304         (verify_types_in_gimple_stmt): Handle GIMPLE_EH_MUST_NOT_THROW.
3305
3306 2009-09-22  Jack Howarth  <howarth@bromo.med.uc.edu>
3307
3308         PR middle-end/41260
3309         * gcc/config.gcc: Use darwin9.h and darwin10.h on darwin10 and later.
3310         * gcc/config/darwin10.h: Add file to pass -no_compact_unwind on
3311         LIB_SPEC for darwin10 and later since it always uses the unwinder in
3312         libSystem which is derived from the gcc 4.2.1 unwinder.
3313
3314 2009-09-22  Dave Korn  <dave.korn.cygwin@gmail.com>
3315
3316         PR middle-end/41357
3317         * varasm.c (default_encode_section_info): Copy TLS model into
3318         sym_ref flags regardless of backend support for TLS, for all
3319         model types except TLS_MODEL_EMULATED.
3320
3321 2009-09-22  Dave Korn  <dave.korn.cygwin@gmail.com>
3322
3323         PR bootstrap/41404
3324         * dwarf2out.c (mem_loc_descriptor): Punt on CONST_STRING until
3325         we can handle it correctly.
3326
3327 2009-09-21  Gerald Pfeifer  <gerald@pfeifer.com>
3328
3329         * doc/install.texi (os2): Remove section.
3330
3331 2009-09-21  Gerald Pfeifer  <gerald@pfeifer.com>
3332
3333         * doc/standards.texi (Objective-C): Adjust two URLs.
3334
3335 2009-09-21  Giuseppe Scrivano <gscrivano@gnu.org>
3336
3337         * tree-tailcall.c (process_assignment): Don't check if a
3338         multiplication or an addition are already present.
3339         (find_tail_calls): Combine multiple additions and multiplications.
3340         (adjust_accumulator_values): Emit accumulators.
3341
3342 2009-09-21  Kai Tietz  <kai.tietz@onevision.com>
3343
3344         * config/i386/i386.c (ix86_expand_epilogue): Adjust offset for
3345         xmm register restore.
3346
3347 2009-09-21  Jan Hubicka  <jh@suse.cz>
3348
3349         * dwarf2out.c (decl_loc_table_eq): Allow decl_loc_table to be NULL.
3350         (dwarf2out_abstract_function): NULLify decl_loc_table at begginig and
3351         restore at the end.
3352
3353 2009-09-21  Eric Botcazou  <ebotcazou@adacore.com>
3354
3355         * stor-layout.c (layout_type): Remove obsolete code.
3356
3357 2009-09-20  H.J. Lu  <hongjiu.lu@intel.com>
3358
3359         PR middle-end/41395
3360         * opts.c (decode_options): Don't turn on flag_ipa_sra for opt2.
3361
3362 2009-09-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3363
3364         PR middle-end/30789
3365         * builtins.c (do_mpc_arg2): Accept DO_NONFINITE parameter.
3366         (do_mpc_ckconv): Accept FORCE_CONVERT parameter.
3367         (fold_builtin_2, do_mpc_arg1): Update accordingly.
3368         * fold-const.c (const_binop): Likewise.
3369         * real.h (do_mpc_arg2): Update prototype.
3370
3371 2009-09-20  Jan Hubicka  <jh@suse.cz>
3372
3373         * dwarf2out.c (add_const_value_attribute): Return true if successful.
3374         (add_location_or_const_value_attribute): Rewrite using
3375         loc_list_from_tree.
3376         (tree_add_const_value_attribute): Return true if successful.
3377         (tree_add_const_value_attribute_for_decl): Likewise.
3378
3379         * dwarf2out.c (address_of_int_loc_descriptor): Break out from ...
3380         (loc_descriptor): ... here;
3381         (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
3382         (cst_pool_loc_descr): Break out from ...; do not reffer constant
3383         pool items that was not marked for output.
3384         (loc_list_from_tree): ... here; handle special cases of ADDR_EXPR;
3385         (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
3386         (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
3387         handle ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF, REALPART_EXPR,
3388         IMAGPART_EXPR; handle address of INTEGER_CST; improve handling of
3389         CONSTRUCTOR; handle REAL_CST, STRING_CST, COMPLEX_CST; use
3390         DW_OP_stack_value to get address of items that are not available
3391         as addresses.
3392         (dw_loc_list): Handle single element lists correctly.
3393
3394 2009-09-20  Kai Tietz  <kai.tietz@onevision.com>
3395             Pascal Obry  <obry@adacore.com>
3396
3397         * unwind-dw2-fde.c (classify_object_over_fdes):
3398         Cast the constant 1 to _Unwind_Ptr.
3399         (add_fdes): Likewise.
3400         (linear_search_fdes): Likewise.
3401
3402 2009-09-20  Eric Botcazou  <ebotcazou@adacore.com>
3403
3404         * stor-layout.c (set_sizetype): Avoid useless type copy.
3405
3406 2009-09-20  Richard Sandiford  <rdsandiford@googlemail.com>
3407
3408         * configure.ac (gcc_cv_ld_mips_personality_relaxation): New
3409         feature check.
3410         (HAVE_LD_PERSONALITY_RELAXATION): New macro definition.
3411         * configure, config.in: Regenerate.
3412         * dwarf2asm.c (eh_data_format_name): Handle DW_EH_PE_indirect |
3413         DW_EH_PE_absptr.
3414         * config/mips/mips.h (TARGET_WRITABLE_EH_FRAME): New macro.
3415         (ASM_PREFERRED_EH_DATA_FORMAT): Define.  Use MIPS_EH_INDIRECT
3416         for global data if the output could be used in a shared library.
3417         * config/mips/mips.c (mips_override_options): Set flag_dwarf2_cfi_asm
3418         to 0 if TARGET_WRITABLE_EH_FRAME.
3419
3420 2009-09-20  Paolo Bonzini <bonzini@gnu.org>
3421
3422         PR rtl-optimization/39886
3423         * combine.c (update_cfg_for_uncondjump): Set EDGE_FALLTHRU
3424         just when insn is equal to BB_END (bb).
3425
3426 2009-09-19  Adam Nemet  <anemet@caviumnetworks.com>
3427
3428         * config/mips/mips.opt (mrelax-pic-calls): New option.
3429         * config/mips/mips.c (mips_strip_unspec_address): Move it up in
3430         the file.
3431         (mips_unspec_call): Change "unspec_call" expander into this.
3432         (mips_strip_unspec_call): New function.
3433         (mips_got_load): Call mips_unspec_call instead of
3434         gen_unspec_call<mode>.
3435         (mips16_build_call_stub): Fix comment for fp_code.  Adjust call to
3436         MIPS_CALL.
3437         (mips_cfg_in_reorg): New function.
3438         (mips16_lay_out_constants): Use it to decide whether to call
3439         CFG-aware insn splitting.
3440         (r10k_insert_cache_barriers): Move CFG set-up code from here to
3441         mips_reorg.  Move DF set-up code from here ...
3442         (mips_df_reorg): ... to here.  Call r10k_insert_cache_barriers
3443         from here.
3444         (mips_reorg): Call mips_df_reorg instead of
3445         r10k_insert_cache_barriers.  Move CFG set-up code here from
3446         r10k_insert_cache_barriers.
3447         (mips_call_expr_from_insn): New function.
3448         (mips_pic_call_symbol_from_set): Likewise.
3449         (mips_find_pic_call_symbol): Likewise.
3450         (mips_annotate_pic_call_expr): Likewise.
3451         (mips_get_pic_call_symbol): Likewise.
3452         (mips_annotate_pic_calls): Likewise.
3453         (mips_override_options): Disable -mrelax-pic-calls unless PIC
3454         calls are used.
3455         (mips_set_mips16_mode): Disable -mrelax-pic-calls for MIPS16.
3456         * config/mips/mips-protos.h (mips_get_pic_call_symbol): Declare it.
3457         * config/mips/mips.h (MIPS_CALL): Use it to print the .reloc
3458         directive.
3459         * config/mips/mips.md (UNSPEC_CALL_ATTR): New unspec.
3460         (unspec_call<mode>): Remove it.
3461         (sibcall_internal, sibcall_value_internal,
3462         sibcall_value_multiple_internal, call_internal, call_split,
3463         call_value_internal, call_value_split,
3464         call_value_multiple_internal, call_value_multiple_split): Pass
3465         SIZE_OPNO to MIPS_CALL.
3466         (call_internal_direct, call_direct_split,
3467         call_value_internal_direct, call_value_direct_split): Pass -1 as
3468         SIZE_OPNO to MIPS_CALL.
3469         * configure.ac <mips*-*-*>: Add test for .reloc R_MIPS_JALR.
3470         * configure: Regenerate.
3471         * doc/invoke.texi (Option Summary): Add -mrelax-pic-calls
3472         and -mno-relax-pic-calls.
3473         (MIPS Options): Document -mrelax-pic-calls and -mno-relax-pic-calls.
3474
3475 2009-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3476
3477         PR bootstrap/35619
3478         * Makefile.in (stmp-fixinc): Ensure `include-fixed' is created
3479         in the directory this rule is called from, rather than the
3480         toplevel 'gcc' directory, to fix in-tree build.
3481
3482 2009-09-19  Chris Demetriou  <cgd@google.com>
3483
3484         PR preprocessor/28435:
3485         * c-opts.c (c_common_handle_option): For -MD and -MMD, indicate
3486         to cpplib that the preprocessor output is needed.
3487
3488 2009-09-19  Jakub Jelinek  <jakub@redhat.com>
3489
3490         * config/rs6000/rs6000.md (*save_gpregs_<mode>, *save_fpregs_<mode>,
3491         *restore_gpregs_<mode>, *return_and_restore_gpregs_<mode>,
3492         *return_and_restore_fpregs_<mode>,
3493         *return_and_restore_fpregs_aix_<mode>): Remove 'z' operand modifier.
3494
3495         PR bootstrap/41397
3496         * dwarf2out.c (mem_loc_descriptor) <case SUBREG>: Recurse
3497         instead of assuming it has always a REG inside of it.
3498
3499 2009-09-18  Gerald Pfeifer  <gerald@pfeifer.com>
3500
3501         * config/freebsd.h: Update comment on types.
3502         (WINT_TYPE): Define.
3503
3504 2009-09-18  Jason Merrill  <jason@redhat.com>
3505
3506         * c.opt: Add -fno-deduce-init-list.
3507
3508 2009-09-18  Neil Vachharajani  <nvachhar@google.com>
3509
3510         * value-prof.c (interesting_stringop_to_profile_p): Added output
3511         argument to indicate which parameter is the size parameter.
3512         * value-prof.c (gimple_stringop_fixed_value): Use
3513         INTERESTING_STRINGOP_TO_PROFILE_P to find size argument.
3514         * value-prof.c (gimple_stringops_transform): Update call sites to
3515         INTERESTING_STRINGOP_TO_PROFILE_P to reflect parameter change.
3516
3517 2009-09-18  Uros Bizjak  <ubizjak@gmail.com>
3518
3519         PR target/38288
3520         From David Binderman <dcb314@hotmail.com>:
3521         * gcc/config/i386/i386.c (ix86_function_regparm): Remove useless
3522         local variable f.  Remove stale comments.
3523         (ix86_compute_frame_layout): Remove useless local variable total_size.
3524         Remove #if 0'd code.
3525         (legitimate_address_p): Remove useless local variables
3526         reason_rtx and reason.
3527         (ix86_split_copysign_const): Remove useless local variable op1.
3528         (scale_counter): Remove useless local variable piece_size_mask.
3529
3530 2009-09-18  Jakub Jelinek  <jakub@redhat.com>
3531
3532         * stmt.c (expand_asm_operands): Set REG_ATTRS on the temporary from
3533         output decl.
3534
3535 2009-09-17  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
3536
3537         PR target/40913
3538         * config/pa/t-hpux-shlib: Set soname in libgcc_s.sl.
3539
3540 2009-09-17  Jakub Jelinek  <jakub@redhat.com>
3541
3542         * c-decl.c (finish_struct): Adjust DECL_SOURCE_LOCATION of
3543         TYPE_STUB_DECL.
3544
3545 2009-09-17  Alexandre Oliva  <aoliva@redhat.com>
3546
3547         * dwarf2out.c (loc_descriptor): Emit DW_OP_stack_value and
3548         DW_OP_implicit_value even without dwarf_version 4.
3549
3550 2009-09-17  Jan Hubicka  <jh@suse.cz>
3551
3552         * dwarf2out.c: Include tree-pass.h and gimple.h.
3553         (loc_list_plus_const): New function.
3554         (loc_descriptor_from_tree_1): Rename to ...
3555         (loc_descriptor_from_tree): ... remove original.
3556         (loc_list_from_tree): New function.
3557         (add_AT_location_description): Accept location list.
3558         (tls_mem_loc_descriptor): Update call of loc_descriptor_from_tree.
3559         (concatn_mem_loc_descriptor): Remove.
3560         (mem_loc_descriptor): Handle CONCAT/CONCATN and VAR_LOCATION by
3561         returning NULL.
3562         (secname_for_decl): Move up.
3563         (hidden_reference_p): New function; break out from ...
3564         (loc_by_refernece): ... here; move up.
3565         (dw_loc_list): New function.
3566         (single_element_loc_list): New function.
3567         (single_element_loc_list_p): New function.
3568         (add_loc_descr_to_each): New function.
3569         (add_loc_list): New function.
3570         (loc_descr_from_tree): Make wraper of loc_list_from_tree.
3571         (loc_list_from_tree): Reroganized from loc_descr_from_tree;
3572         add diagnostics why expansion failed.
3573         (add_location_or_const_value_attribute): Support location lists.
3574         (add_bound_info): Likewise.
3575         (descr_info_loc): Update call of loc_descriptor_from_tree.
3576         (gen_variable_die): Work on location lists.
3577         * final.c (pass_final): Add dump file.
3578         * Makefile.in (dwarf2out.o): Add new dependencies.
3579
3580 2009-09-17  Janis Johnson  <janis187@us.ibm.com>
3581
3582         PR c/41049
3583         * real.c decimal_from_integer, decimal_integer_string): New.
3584         (real_from_integer): Use them as special case for decimal float.
3585         * config/dfp-bit.c (_si_to_sd, _usi_to_sd): Use default rounding.
3586         (_di_to_sd, _di_to_dd, _di_to_td, _udi_to_sd, _udi_to_dd, _udi_to_td):
3587         Do not append zero after the decimal point in string to convert.
3588
3589 2009-09-17  Alexander Monakov  <amonakov@ispras.ru>
3590
3591         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3592         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
3593
3594 2009-09-17  Martin Jambor  <mjambor@suse.cz>
3595
3596         * common.opt (fipa-sra): New switch.
3597         * opts.c (decode_options): Turn flag_ipa_sra on for opt2.
3598         * timevar.def (TV_IPA_SRA): New timevar.
3599         * params.def (ipa-sra-ptr-growth-factor): New parameter.
3600         * doc/invoke.texi: Document -fipa-sra and ipa-sra-ptr-growth-factor.
3601         * tree-sra.c: Include cgraph.c.
3602         (enum sra_mode): Added SRA_MODE_EARLY_IPA.
3603         (struct access): Added fields stmt, grp_maybe_modified, grp_scalar_ptr
3604         and grp_not_necessarilly_dereferenced.
3605         (func_param_count): New variable.
3606         (encountered_apply_args): New variable.
3607         (bb_dereferences): New variable.
3608         (final_bbs): New variable.
3609         (no_accesses_representant): New variable.
3610         (no_accesses_p): New function.
3611         (dump_access): Dump the new fields.
3612         (sra_initialize): Set encountered_apply_args to false.
3613         (get_ssa_base_param): New function.
3614         (mark_parm_dereference): New function.
3615         (create_access): Caring for INIDRECT_REFs and different handling of
3616         varialble length accesses in early IPA SRA.  Store the stmt - a new
3617         parameter - to the new access.
3618         (build_access_from_expr_1): New parameter stmt, passed to
3619         create_access.  Handle INDIRECT_REFs.
3620         (build_access_from_expr): Pass the current statement to
3621         build_access_from_expr_1.
3622         (disqualify_ops_if_throwing_stmt): Trigger only in intraprocedural
3623         passes.
3624         (build_accesses_from_assign): Pass the current statement to
3625         build_access_from_expr_1.  Do not create assign links in IPA-SRA.
3626         (scan_function): Call handle_ssa_defs on phi nodes.  Set bits in
3627         final_bbs when necessary.  Check for calls to __builtin_apply_args.
3628         Fixup EH info if anythng was changed.
3629         (is_unused_scalar_param): New function.
3630         (ptr_parm_has_direct_uses): New function.
3631         (find_param_candidates): New function.
3632         (mark_maybe_modified): New function.
3633         (analyze_modified_params): New function.
3634         (propagate_dereference_distances): New function.
3635         (dump_dereferences_table): New function.
3636         (analyze_caller_dereference_legality): New function.
3637         (unmodified_by_ref_scalar_representative): New function.
3638         (splice_param_accesses): New function.
3639         (decide_one_param_reduction): New function.
3640         (enum ipa_splicing_result): New type.
3641         (splice_all_param_accesses): New function.
3642         (get_param_index): New function.
3643         (turn_representatives_into_adjustments): New function.
3644         (analyze_all_param_acesses): New function.
3645         (get_replaced_param_substitute): New function.
3646         (get_adjustment_for_base): New function.
3647         (replace_removed_params_ssa_names): New function.
3648         (sra_ipa_reset_debug_stmts): New function.
3649         (sra_ipa_modify_expr): New function.
3650         (sra_ipa_modify_assign): New function.
3651         (convert_callers): New function.
3652         (modify_function): New function.
3653         (ipa_sra_preliminary_function_checks): New function.
3654         (ipa_early_sra): New function.
3655         (ipa_early_sra_gate): New function.
3656         (pass_early_ipa_sra): New variable.
3657         * Makefile.in (tree-sra.o): Add cgraph.h to dependencies.
3658
3659 2009-09-17  Michael Matz  <matz@suse.de>
3660
3661         PR middle-end/41347
3662         * tree.c (build_type_attribute_qual_variant): Export.
3663         * tree.h (build_type_attribute_qual_variant): Declare.
3664         * tree-inline.c (remap_type_1): Use it to build variants with
3665         the original qualifiers and attributes.
3666
3667 2009-09-17  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
3668
3669         * cfglayout.c (fixup_reorder_chain): Accept conditional jumps
3670         without a fallthrough edge.
3671
3672 2009-09-16  DJ Delorie  <dj@redhat.com>
3673
3674         * config/m32c/m32c.c (m32c_emit_epilogue): Check for R8C or M16C
3675         chip and ignore the "fast_interrupt" attribute if so.
3676
3677 2009-09-16  Richard Henderson  <rth@redhat.com>
3678
3679         PR middle-end/41360
3680         * cfgbuild.c (find_bb_boundaries): Really re-instate 2009-09-02
3681         barrier fix.
3682
3683 2009-09-16  Richard Henderson  <rth@redhat.com>
3684
3685         PR target/41246
3686         * tree-cfg.c (verify_gimple_call): Validate that gimple_call_chain
3687         is set only if DECL_NO_STATIC_CHAIN is unset.
3688         * tree-nested.c (iter_nestinfo_start, iter_nestinfo_next): New.
3689         (FOR_EACH_NEST_INFO): New.
3690         (walk_all_functions): Use it.
3691         (finalize_nesting_tree): Likewise.
3692         (unnest_nesting_tree): Likewise.
3693         (free_nesting_tree): Use iter_nestinfo_start, iter_nestinfo_next.
3694         (get_chain_decl, get_chain_field): Reset DECL_NO_STATIC_CHAIN.
3695         (convert_gimple_call): Early out if gimple_call_chain already set.
3696         (convert_all_function_calls): Iterate until no new functions
3697         require a static chain.
3698         (finalize_nesting_tree_1): Assert DECL_NO_STATIC_CHAIN is unset
3699         when building a trampoline.  Use dump_function_to_file instead
3700         of dump_function.
3701         (lower_nested_functions): Open dump_file.  Validate that decls
3702         that have DECL_NO_STATIC_CHAIN from the front end don't have that
3703         bit reset by this pass.
3704
3705 2009-09-16  Michael Matz  <matz@suse.de>
3706
3707         PR fortran/41212
3708         * tree.h (struct tree_decl_common): Add decl_restricted_flag,
3709         shorten decl_common_unused.
3710         (DECL_RESTRICTED_P): New accessor.
3711         * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Use it
3712         to disambiguate marked decls and restrict pointers.
3713
3714 2009-09-16  Richard Henderson  <rth@redhat.com>
3715
3716         PR middle-end/41360
3717         * cfgbuild.c (find_bb_boundaries): Re-instate 2009-09-02 barrier fix.
3718
3719 2009-09-16  Jakub Jelinek  <jakub@redhat.com>
3720
3721         * integrate.c (set_block_abstract_flags): Call
3722         set_decl_abstract_flags also on BLOCK_NONLOCALIZED_VARs.
3723
3724 2009-09-16  Richard Guenther  <rguenther@suse.de>
3725
3726         PR middle-end/34011
3727         * tree-flow-inline.h (may_be_aliased): Compute readonly variables
3728         as non-aliased.
3729
3730 2009-09-16  DJ Delorie  <dj@redhat.com>
3731             Kaz Kojima  <kkojima@gcc.gnu.org>
3732
3733         * config/sh/sh.c (output_stack_adjust): Add new argument frame_p.
3734         (sh_expand_prologue): Update calls to output_stack_adjust.
3735         (sh_expand_epilogue): Likewise.
3736
3737 2009-09-15  Adam Nemet  <anemet@caviumnetworks.com>
3738
3739         PR bootstrap/41349
3740         * reorg.c (redundant_insn): Don't count notes or DEBUG_INSNs when
3741         trying to limit the extent of searches in the insn stream.
3742
3743 2009-09-15  Nathan Froyd  <froydnj@codesourcery.com>
3744             Jakub Jelinek  <jakub@redhat.com>
3745
3746         PR target/41175
3747         PR target/40677
3748         * config/rs6000/rs6000.c (no_global_regs_above): Fix precedence
3749         problem.
3750         (SAVRES_NOINLINE_GPRS_SAVES_LR, SAVRES_NOINLINE_FPRS_SAVES_LR,
3751         SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR): New strategy bits.
3752         (rs6000_savres_strategy): Always save FP registers inline if the
3753         target doesn't support hardware double-precision.  Set the above
3754         bits in return value when needed.
3755         (rs6000_savres_routine_sym): Fix computation for cache selector.
3756         Mark the generated symbol as a function.  Rename exitp argument to
3757         lr.  Move code for determining the name of the symbol...
3758         (rs6000_savres_routine_name): ...here.  New function.  Add cases for
3759         getting the names right on AIX and 64-bit Linux.
3760         (savres_routine_name): New variable.
3761         (rs6000_make_savres_rtx): Rename exitp argument to lr.  Don't assert
3762         lr isn't set when savep.  Use r12 resp. r1 instead of r11 depending
3763         on what the target routine uses as a base register.  If savep && lr
3764         describe saving of r0 into memory slot.
3765         (rs6000_emit_prologue): Correct use of call_used_regs.  Fix out of
3766         line calls for AIX ABI.
3767         (rs6000_output_function_prologue): Use rs6000_savres_routine_name to
3768         determine FP save/restore functions.
3769         (rs6000_emit_stack_reset): Handle savres if sp_offset != 0 and
3770         frame_reg_rtx != sp_reg_rtx.  Use gen_add3_insn instead of
3771         gen_addsi3.
3772         (rs6000_emit_epilogue): Adjust computation of restore_lr.
3773         Duplicate restoration of LR and execute the appropriate one
3774         depending on whether GPRs are being restored inline.  Set r11 from
3775         offsetted frame_reg_rtx instead of sp_reg_rtx; if frame_reg_rtx is
3776         r11, adjust sp_offset.  Use gen_add3_insn instead of gen_addsi3.
3777         Fix out of line calls for AIX ABI.
3778         * config/rs6000/rs6000.md (*return_and_restore_fpregs_aix_<mode>):
3779         New insn.
3780         * config/rs6000/spe.md (*save_gpregs_spe): Use explicit match for
3781         register 11.
3782         (*restore_gpregs_spe): Likewise.
3783         (*return_and_restore_gpregs_spe): Likewise.
3784         * config/rs6000/linux64.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
3785         Define to empty string unconditionally.
3786         * config/rs6000/sysv4.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
3787         Define to empty string unconditionally.
3788         (GP_SAVE_INLINE, FP_SAVE_INLINE): Handle TARGET_64BIT the same as
3789         !TARGET_64BIT.
3790
3791 2009-09-15  Jan Hubicka  <jh@suse.cz>
3792
3793         * doc/invoke.texi (inline-insns-auto): Drop from 60 to 50.
3794         * params.def (inline-insns-auto): Likewise.
3795
3796 2009-09-15  Martin Jambor  <mjambor@suse.cz>
3797
3798         * ipa-inline.c (estimate_function_body_sizes): Dump info about
3799         individual statements only at TDF_DETAILS dump level.  Format
3800         source for 80 characters per line.
3801
3802 2009-09-15  Christian Bruel  <christian.bruel@st.com>
3803
3804         * regrename.c (do_replace): Update REG_DEAD notes.
3805
3806 2009-09-15  Revital Eres  <eres@il.ibm.com>
3807
3808         * doc/tm.texi (TARGET_SUPPORT_VECTOR_MISALIGNMENT): Document.
3809         * targhooks.c (default_builtin_support_vector_misalignment):
3810         New builtin function.
3811         * targhooks.h (default_builtin_support_vector_misalignment):
3812         Declare.
3813         * target.h (builtin_support_vector_misalignment):
3814         New field in struct gcc_target.
3815         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Call
3816         new builtin function.
3817         * target-def.h (TARGET_SUPPORT_VECTOR_MISALIGNMENT):
3818         Define.
3819         * config/rs6000/rs6000.c
3820         (rs6000_builtin_support_vector_misalignment): New function.
3821         (TARGET_SUPPORT_VECTOR_MISALIGNMENT): Define.
3822
3823 2009-09-15  Jie Zhang  <jie.zhang@analog.com>
3824
3825         * config/bfin/bfin.c (length_for_loop): Use NONDEBUG_INSN_P
3826         instead of INSN_P.
3827         (bfin_optimize_loop): Likewise.
3828         (bfin_gen_bundles): Likewise.
3829         (workaround_speculation): Likewise.
3830         (find_load): Return NULL_RTX for debug_insn.
3831
3832 2009-09-15  Uros Bizjak  <ubizjak@gmail.com>
3833
3834         * config/alpha/alpha.md (smaxsf3): Disable for IEEE mode.
3835         (sminsf3): Ditto.
3836
3837 2009-09-14  DJ Delorie  <dj@redhat.com>
3838
3839         * config/mep/mep.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3840         * config/mep/mep.c (mep_emit_cbranch): Don't use BEQZ/BNEI in
3841         VLIW mode.
3842
3843 2009-09-14  Richard Henderson  <rth@redhat.com>
3844             Jakub Jelinek  <jakub@redhat.com>
3845
3846         * builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec.
3847         * cfgbuild.c (make_edges): Handle asm goto.
3848         * cfglayout.c (fixup_reorder_chain): Likewise.
3849         * cfgrtl.c (patch_jump_insn): Likewise.
3850         * gimple-pretty-print.c (dump_gimple_asm): Likewise.
3851         * gimple.c (gimple_build_asm_1): Add and use nlabels parameter.
3852         (gimple_build_asm_vec): Add and use labels parameter.
3853         (gimple_build_asm): Remove.
3854         (walk_gimple_asm): Walk labels too.
3855         * gimple.def (GIMPLE_ASM): Update docs.
3856         * gimple.h: Update decls.
3857         (struct gimple_statement_asm): Change nc to use unsigned char;
3858         add nl member.
3859         (gimple_asm_nlabels): New.
3860         (gimple_asm_label_op, gimple_asm_set_label_op): New.
3861         * gimplify.c (gimplify_asm_expr): Copy labels from ASM_EXPR
3862         into gimple_build_asm_vec.
3863         * jump.c (mark_jump_label_asm): New.
3864         (mark_jump_label): Use it.
3865         (redirect_jump_1): Handle asm goto.
3866         (invert_jump_1): Soft fail if X is null.
3867         * recog.c (extract_asm_operands): New.
3868         (asm_noperands): Use it; handle asm labels.
3869         (decode_asm_operands): Use extract_asm_operands.
3870         (asm_operand_ok): Properly handle empty string.
3871         * reg-stack.c (get_asm_operands_in_out): Rename from
3872         get_asm_operand_n_inputs; use extract_asm_operands; return both
3873         inputs and outputs by reference; update all callers.
3874         * rtl.def (ASM_OPERANDS): Add label vector as operand 6.
3875         * rtl.h (ASM_OPERANDS_LABEL_VEC): New.
3876         (ASM_OPERANDS_LABEL_LENGTH, ASM_OPERANDS_LABEL): New.
3877         (ASM_OPERANDS_SOURCE_LOCATION): Renumber.
3878         (extract_asm_operands): Declare.
3879         * stmt.c (expand_asm_operands): Add and use labels parameter.
3880         (check_unique_operand_names): Likewise.
3881         (resolve_asm_operand_names, resolve_operand_name_1): Likewise.
3882         (expand_asm_stmt): Handle asm labels.
3883         * tree-cfg.c (make_gimple_asm_edges): New.
3884         (make_edges): Use it.
3885         (cleanup_dead_labels): Handle asm labels.
3886         (is_ctrl_altering_stmt): Likewise.
3887         (gimple_redirect_edge_and_branch): Likewise.
3888         * tree.def (ASM_EXPR): Add 5th operand.
3889         * tree.h (ASM_LABELS): New.
3890         (resolve_asm_operand_names): Update decl.
3891
3892         * c-parser.c (c_parser_asm_statement): Parse asm goto.
3893         (c_parser_asm_goto_operands): New.
3894         * c-tree.h (build_asm_expr): Update decl.
3895         * c-typeck.c (build_asm_expr): Add and use labels parameter.
3896         * doc/extend.texi: Document asm goto.
3897
3898 2009-09-14  Richard Henderson  <rth@redhat.com>
3899
3900         * except.h: Update declarations.
3901         (struct pointer_map_t): Forward declare.
3902         (ERT_UNKNOWN, ERT_THROW, ERT_CATCH): Remove.
3903         (struct eh_landing_pad_d, eh_landing_pad): New.
3904         (struct eh_catch_d, eh_catch): New.
3905         (struct eh_region_d): Remove next_region_sharing_label, aka,
3906         label, tree_label, landing_pad, post_landing_pad, resume,
3907         may_contain_throw.  Rename region_number to index.  Remove
3908         u.eh_catch, u.eh_throw.  Rename u.eh_try.eh_catch to first_catch.
3909         Add u.must_not_throw, landing_pads, exc_ptr_reg, filter_reg.
3910         (VEC(eh_landing_pad,gc)): New.
3911         (struct eh_status): Remove last_region_number.  Add lp_array,
3912         throw_stmt_table, ttype_data, ehspec_data.
3913         (ehr_next, FOR_ALL_EH_REGION_AT): New.
3914         (FOR_ALL_EH_REGION_FN, FOR_ALL_EH_REGION): New.
3915         * except.c (lang_protect_cleanup_actions): Return tree.
3916         (struct ehl_map_entry): Remove.
3917         (init_eh_for_function): Push zero entries for region and lp_array.
3918         (gen_eh_region): Add to region_array immediately.
3919         (gen_eh_region_catch): Operate on eh_catch objects.
3920         (gen_eh_landing_pad): New.
3921         (get_eh_region_may_contain_throw, get_eh_region_tree_label): Remove.
3922         (get_eh_region_no_tree_label, set_eh_region_tree_label): Remove.
3923         (get_eh_region_from_number, get_eh_region_from_number_fn): New.
3924         (get_eh_landing_pad_from_number_fn): New.
3925         (get_eh_landing_pad_from_number): New.
3926         (get_eh_region_from_lp_number_fn): New.
3927         (get_eh_region_from_lp_number): New.
3928         (expand_resx_stmt, note_eh_region_may_contain_throw): Remove.
3929         (get_exception_pointer, get_exception_filter): Remove.
3930         (collect_eh_region_array, can_be_reached_by_runtime): Remove.
3931         (current_function_has_exception_handlers): Simplify.
3932         (bring_to_root, eh_region_replaceable_by_p): Remove.
3933         (replace_region, hash_type_list, hash_eh_region): Remove.
3934         (eh_regions_equal_p, merge_peers, remove_unreachable_regions): Remove.
3935         (label_to_region_map, num_eh_regions): Remove.
3936         (get_next_region_sharing_label, must_not_throw_labels): Remove.
3937         (find_exception_handler_labels): Remove.
3938         (duplicate_eh_regions_0, find_prev_try): Remove.
3939         (struct duplicate_eh_regions_data): New.
3940         (duplicate_eh_regions_1): Rewrite.
3941         (duplicate_eh_regions): Return a pointer map instead of an
3942         integer offset.
3943         (copy_eh_region_1, copy_eh_region, push_reachable_handler): Remove.
3944         (redirect_eh_edge_to_label): Remove.
3945         (eh_region_outermost): Rewrite using eh_region pointers
3946         instead of integers.
3947         (add_ttypes_entry): Update for ttype_data move to eh_status.
3948         (add_ehspec_entry): Rewrite with VEC instead of varray.
3949         (assign_filter_values): Likewise.  Export.
3950         (build_post_landing_pads, connect_post_landing_pads): Remove.
3951         (dw2_build_landing_pads): Rewrite to use lp_array.
3952         (struct sjlj_lp_info, sjlj_find_directly_reachable_regions): Remove.
3953         (sjlj_assign_call_site_values): Rewrite to use lp_array.
3954         (sjlj_emit_dispatch_table, sjlj_build_landing_pads): Likewise.
3955         (sjlj_mark_call_sites): Update for landing pad numbers.
3956         (finish_eh_generation): Rewrite.
3957         (gate_handle_eh): Do nothing for no eh tree.
3958         (pass_rtl_eh): Move up near finish_eh_generation.
3959         (remove_eh_landing_pad): New.
3960         (remove_eh_handler): Export.
3961         (remove_eh_region, remove_eh_handler_and_replace): Remove.
3962         (for_each_eh_label): Rewrite to use lp_array.
3963         (make_reg_eh_region_note): New.
3964         (make_reg_eh_region_note_nothrow_nononlocal): New.
3965         (insn_could_throw_p): New.
3966         (copy_reg_eh_region_note_forward): New.
3967         (copy_reg_eh_region_note_backward): New.
3968         (check_handled, add_reachable_handler): Remove.
3969         (reachable_next_level, foreach_reachable_handler): Remove.
3970         (arh_to_landing_pad, arh_to_label, reachable_handlers): Remove.
3971         (get_eh_region_and_lp_from_rtx): New.
3972         (get_eh_region_from_rtx): New.
3973         (can_throw_internal_1, can_throw_external_1): Remove.
3974         (can_throw_internal): Use get_eh_region_from_rtx.
3975         (can_throw_external): Use get_eh_region_and_lp_from_rtx.
3976         (insn_nothrow_p, can_nonlocal_goto): New.
3977         (expand_builtin_eh_common, expand_builtin_eh_pointer): New.