OSDN Git Service

c57126ffaf64c0055453e6e790f3b6faafaafc6f
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2008-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
2
3         * c-typeck.c (convert_for_assignment): Adjust WARN_FOR_ASSIGNMENT
4         use not updated in the last change.
5
6 2008-08-27  Kaz Kojima  <kkojima@gcc.gnu.org>
7
8         * config/sh/sh.h (REG_CLASS_CONTENTS): Drop fr32 from FPUL_REGS.
9         (IRA_COVER_CLASSES): Add FPUL_REGS.
10
11 2008-08-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
12
13         PR 37217
14         * c-common.c (conversion_warning): Check for null operands.
15
16 2008-08-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
17
18         PR c/31673
19         * c-decl.c (check_for_loop_decls): Improve error message. Give
20         hint.
21
22 2008-08-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
23
24         PR c/37186
25         * c-typeck.c (WARN_FOR_ASSIGNMENT): Add OPT parameter.
26         (convert_for_assignment): Pass corrent OPT_W* parameter to
27         WARN_FOR_ASSIGNMENT.
28
29 2008-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
30
31         PR c++/35321
32         * c-common.c (fold_offsetof_1): Handle TARGET_EXPR like CALL_EXPR.
33
34 2008-08-27  Paul Brook  <paul@codesourcery.com>
35
36         * config.gcc: Loosen checks for arm uclinux eabi targets.
37
38 2008-08-27  Paul Brook  <paul@codesourcery.com>
39
40         * config/arm/t-arm-coff (LIB1ASMFUNCS): Add missing undescrore on
41         _clzsi2.
42         * config/arm/t-linux (LIB1ASMFUNCS): Ditto.
43
44 2008-08-26  Douglas Gregor  <doug.gregor@gmail.com>
45
46         * c-common.c (do_switch_warnings): Look through the CONST_DECLs in
47         the enumerators of an ENUMERAL_TYPE.
48         * dbxout.c (dbxout_type): Ditto.
49
50 2008-08-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
51
52         PR rtl-opt/37219
53         * fwprop.c (fwprop): Check that the loop_father is the outer loop.
54         (fwprop_addr): Check that the loop_father is not the outer loop.
55
56 2008-08-26  Paul Brook  <paul@codesourcery.com>
57
58         * config/arm/vfp.md: Document fmul{s,d} and fmac{s,d} types.
59         Remove documentation entry for fmul type.
60         Use fmuls to annotate single-precision multiplication patterns,
61         fmuld to annotate double-precision multiplication patterns,
62         fmacs to annotate single-precision multiply-accumulate patterns
63         and fmacd to annotate double-precision multiply-accumulate patterns.
64         * config/arm/vfp11.md: Update reservations accordingly.
65         * config/arm/arm.md: Note that certain values of the "type"
66         attribute are documented in vfp.md.
67         * config/arm/arm1020e.md: Remove out of date duplicate comment.
68         (v10_cvt): Use new fmul types.
69
70 2008-08-26  Paul Brook   <paul@codesourcery.com>
71
72         * config/arm/vfp.md: Move pipeline description for VFP11 to...
73         * config/arm/vfp11.md: ...here.  New.
74         * config/arm/arm.md: Include vfp11.md.
75
76 2008-08-26  Hans-Peter Nilsson  <hp@axis.com>
77
78         * opts.c (decode_options) [!IRA_COVER_CLASSES]: Add missing
79         parameter to inform call.
80
81 2008-08-26  Jeff Law  <law@redhat.com>
82
83         * mn10300.md (movqi, movhi): Split i->d*a case into two cases to
84         avoid the possibility of getting DATA_OR_ADDRESS_REGS as the
85         preferred class when copying a constant into a partial word register.
86
87 2008-08-26  Ben Elliston  <bje@au.ibm.com>
88
89         * rtlanal.c: Fix uses of "it's" with "its" where appropriate.
90         * cp/typeck.c: Likewise.
91         * cp/tree.c: Likewise.
92         * gimple-low.c: Likewise.
93         * jump.c: Likewise.
94
95 2008-08-26  Vladimir Makarov  <vmakarov@redhat.com>
96
97         * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c,
98         ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files.
99
100         * doc/passes.texi: Describe IRA.
101
102         * doc/tm.texi (IRA_COVER_CLASSES,
103         IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros.
104
105         * doc/invoke.texi (ira-max-loops-num): Describe the new parameter.
106         (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills,
107         -fira-propagate-cost, -fno-ira-share-save-slots,
108         -fno-ira-share-spill-slots, -fira-verbose): Describe new options.
109
110         * flags.h (ira_algorithm): New enumeration.
111         (flag_ira_algorithm, flag_ira_verbose): New external variable
112         declarations.
113
114         * postreload.c (gate_handle_postreload): Don't do post reload
115         optimizations unless the reload is completed.
116
117         * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for
118         IRA.
119
120         * tree-pass.h (pass_ira): New external variable declaration.
121
122         * reload.h: Add 2008 to the Copyright.
123     
124         * cfgloopanal.c: Include params.h.
125         (estimate_reg_pressure_cost): Decrease cost for IRA optimization
126         mode.
127     
128         * params.h (IRA_MAX_LOOPS_NUM): New macro.
129
130         * toplev.c (ira.h): New include.
131         (flag_ira_algorithm, flag_ira_verbose): New external variables.
132         (backend_init_target): Call ira_init.
133         (backend_init): Call ira_init_once.
134         (finalize): Call finish_ira_once.
135
136         * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills,
137         flag_ira_share_save_slots, flag_ira_share_spill_slots): New
138         external variables.
139
140         * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost,
141         may_move_out_cost): New external variable declarations.
142         (move_table): New typedef.
143     
144         * caller-save.c: Include headers output.h and ira.h.
145         (no_caller_save_reg_set): New global variable.
146         (save_slots_num, save_slots): New variables.
147         (reg_save_code, reg_restore_code, add_stored_regs): Add
148         prototypes.
149         (init_caller_save): Set up no_caller_save_reg_set.
150         (init_save_areas): Reset save_slots_num.
151         (saved_hard_reg): New structure.
152         (hard_reg_map, saved_regs_num, all_saved_regs): New variables.
153         (initiate_saved_hard_regs, new_saved_hard_reg,
154         finish_saved_hard_regs, saved_hard_reg_compare_func): New
155         functions.
156         (setup_save_areas): Add code for sharing stack slots.
157         (all_blocks): New variable.
158         (save_call_clobbered_regs): Process pseudo-register too.
159         (mark_set_regs): Process pseudo-register too.
160         (insert_one_insn): Put the insn after bb note in a empty basic
161         block.  Add insn check.
162     
163         * global.c (eliminable_regset): Make it external.
164         (mark_elimination): Use DF_LR_IN for IRA.
165         (pseudo_for_reload_consideration_p): New.
166         (build_insn_chain): Make it external.  Don't ignore spilled
167         pseudos for IRA.  Use pseudo_for_reload_consideration_p.
168         (gate_handle_global_alloc): New function.
169         (pass_global_alloc): Add the gate function.
170
171         * opts.c (decode_options): Set up flag_ira.  Print the warning for
172         -fira.
173         (common_handle_option): Process -fira-algorithm and -fira-verbose.
174
175         * timevar.def (TV_IRA, TV_RELOAD): New passes.
176
177         * regmove.c (regmove_optimize): Don't do replacement of output for
178         IRA.
179
180         * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses):
181         New external variable declarations.
182
183         * local-alloc.c (update_equiv_regs): Make it external.  Return
184         true if jump label rebuilding should be done.  Rescan new_insn for
185         notes.
186         (gate_handle_local_alloc): New function.
187         (pass_local_alloc): Add the gate function.
188
189         * alias.c (value_addr_p, stack_addr_p): New functions.
190         (nonoverlapping_memrefs_p): Use them for IRA.
191
192         * common.opt (fira, fira-algorithm, fira-coalesce,
193         fira-move-spills, fira-share-save-slots, fira-share-spill-slots,
194         fira-verbose): New options.
195
196         * regclass.c (reg_class_subclasses, contains_reg_of_mode,
197         move_cost, may_move_in_cost, may_move_out_cost): Make the
198         variables external.
199         (move_table): Remove typedef.
200         (init_move_cost): Make it external.
201         (allocate_reg_info, resize_reg_info, setup_reg_classes): New
202         functions.
203
204         * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info,
205         setup_reg_classes): New function prototypes.
206         (eliminable_regset): New external variable declaration.
207         (build_insn_chain, update_equiv_regs): New function prototypes.
208     
209         * Makefile.in (IRA_INT_H): New definition.
210         (OBJS-common): Add ira.o, ira-build.o, ira-costs.o,
211         ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o.
212         (reload1.o, toplev.o): Add dependence on ira.h.
213         (cfgloopanal.o): Add PARAMS_H.
214         (caller-save.o): Add dependence on output.h and ira.h.
215         (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o,
216         ira-emit.o, ira-lives.o): New entries.
217
218         * passes.c (pass_ira): New pass.
219
220         * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter.
221
222         * reload1.c (ira.h): Include the header.
223         (changed_allocation_pseudos): New bitmap.
224         (init_reload): Initiate the bitmap.
225         (compute_use_by_pseudos): Permits spilled registers in FROM.
226         (temp_pseudo_reg_arr): New variable.
227         (reload): Allocate and free temp_pseudo_reg_arr.  Sort pseudos for
228         IRA.  Call alter_reg with the additional parameter.  Don't clear
229         spilled_pseudos for IRA.  Restore original insn chain for IRA.
230         Clear changed_allocation_pseudos at the end of reload.
231         (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion.
232         (hard_regno_to_pseudo_regno): New variable.
233         (count_pseudo): Check spilled pseudos.  Set up
234         hard_regno_to_pseudo_regno.
235         (count_spilled_pseudo): Check spilled pseudos. Update
236         hard_regno_to_pseudo_regno.
237         (find_reg): Use better_spill_reload_regno_p.  Check
238         hard_regno_to_pseudo_regno.
239         (alter_reg): Set up spilled_pseudos.  Add a new parameter.  Add
240         code for IRA.
241         (eliminate_regs_1): Use additional parameter for alter_reg.
242         (finish_spills): Set up pseudo_previous_regs only for spilled
243         pseudos.  Call reassign_pseudos once for all spilled pseudos, pass
244         more arguments.  Don't clear live_throughout and dead_or_set for
245         spilled pseudos.  Use additional parameter for alter_reg.  Call
246         mark_allocation_change.  Set up changed_allocation_pseudos.
247         Remove sanity check.
248         (emit_input_reload_insns, delete_output_reload): Use additional
249         parameter for alter_reg.  Call mark_allocation_change.
250         (substitute, gen_reload_chain_without_interm_reg_p): New
251         functions.
252         (reloads_conflict): Use gen_reload_chain_without_interm_reg_p.
253     
254         * testsuite/gcc.dg/20080410-1.c: New file.
255         
256         * config/s390/s390.h (IRA_COVER_CLASSES,
257         IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define.
258
259         * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro.
260
261         * config/i386/i386.h (IRA_COVER_CLASSES): Ditto.
262
263         * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto.
264
265         * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto.
266
267         * config/arm/arm.h (IRA_COVER_CLASSES): Ditto.
268     
269         * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto.
270     
271         2008-08-24  Jeff Law  <law@redhat.com>
272         * ira.c (setup_reg_class_intersect_union): Prefer smallest class
273         when ignoring unavailable registers.
274
275         2008-08-24  Jeff Law  <law@redhat.com>
276         * ira-color.c (coalesced_pseudo_reg_slot_compare): Check
277         FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD.
278         * ira.c (setup_eliminable_regset): Check stack_realign_needed.
279         * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro.
280
281         2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com>
282         * ira-build.c (allocno_range_compare_func): Stabilize sort.
283
284         2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com>
285         * config/avr/avr.h (IRA_COVER_CLASSES): New macro.
286         * reload1.c (find_reg): Process registers in register allocation order.
287
288         2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk>
289         * toplev.c (backend_init_target): Move ira_init call from
290         here...
291         (lang_dependent_init_target): ...to here.
292
293         2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk>
294         * ira.c (setup_class_subset_and_memory_move_costs): Don't
295         calculate memory move costs for NO_REGS.
296
297         2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org>
298         * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if
299         STACK_REGS is defined.
300
301         2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com>
302         * config/spu/spu.h (IRA_COVER_CLASSES): New macro.
303
304         2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com>
305         * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro.
306
307         2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org>
308         * config/sh/sh.h (IRA_COVER_CLASSES): Define.
309         * config/sh/sh.md (movsicc_true+3): Check if emit returns a
310         barrier.
311
312 2008-08-26  Victor Kaplansky  <victork@il.ibm.com>
313             Dorit Nuzman  <dorit@il.ibm.com>
314
315         * gcc/config/spu/spu.md (vec_extract_evenv4si,
316         vec_extract_evenv4sf, vec_extract_evenv8hi,
317         vec_extract_evenv16qi, vec_extract_oddv4si,
318         vec_extract_oddv4sf, vec_extract_oddv8hi, vec_extract_oddv16qi,
319         vec_interleave_highv4sf, vec_interleave_lowv4sf,
320         vec_interleave_highv4si, vec_interleave_lowv4si,
321         vec_interleave_highv8hi, vec_interleave_lowv8hi,
322         vec_interleave_highv16qi, vec_interleave_lowv16qi,
323         vec_pack_trunc_v8hi, vec_pack_trunc_v4si): Implement.S
324
325 2008-08-25  Janis Johnson  <janis187@us.ibm.com>
326
327         PR target/36756
328         * config/rs6000/rs6000.c (optimization_options): Don't default to
329         section anchors without toplevel reorder.
330
331 2008-08-25  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
332
333         * config/spu/spu_mfcio.h (mfc_begin_critical_section): New function.
334         (mfc_end_critical_section): Likewise.
335
336 2008-08-25  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
337
338         * config/rs6000/rs6000.c (rs6000_handle_altivec_attribute): Propagate
339         all type qualifiers from element type to vector type.
340
341 2008-08-25  David Daney  <ddaney@avtrex.com>
342
343         * config/mips/mips.md (immediate_insn): Move up in file, fix
344         comment typo, reformat.
345         (fetchop_bit, atomic_hiqi_op memory_barrier,
346         sync_compare_and_swap<mode>, compare_and_swap_12, sync_add<mode>,
347         sync_<optab><mode>, sync_<optab>_12, sync_old_<optab><mode>,
348         sync_old_<optab>_12, sync_new_<optab><mode>, sync_new_<optab>_12,
349         sync_nand<mode>, sync_nand_12, sync_old_nand<mode>,
350         sync_old_nand_12, sync_new_nand<mode>, sync_new_nand_12,
351         sync_sub<mode>, sync_old_add<mode>, sync_old_sub<mode>,
352         sync_new_add<mode>, sync_new_sub<mode>, sync_<optab><mode>,
353         sync_old_<optab><mode>, sync_new_<optab><mode>, sync_nand<mode>,
354         sync_old_nand<mode>, sync_new_nand<mode>,
355         sync_lock_test_and_set<mode>, sync_lock_test_and_set<mode>,
356         test_and_set_12): Moved to sync.md.
357         (sync.md): Include.
358         * config/mips/sync.md: New file.
359
360 2008-08-25  Richard Henderson  <rth@redhat.com>
361
362         * dwarf2out.c (def_cfa_1): Don't scale by DWARF_CIE_DATA_ALIGNMENT.
363         (regsave): Likewise.
364         (lookup_cfa_1): Don't rescale by DWARF_CIE_DATA_ALIGNMENT.
365         (output_cfi_directive): Likewise.
366         (div_data_align): New.
367         (output_cfi): Use it.
368
369 2008-08-24  Adam Nemet  <anemet@caviumnetworks.com>
370
371         * config.gcc (mips64*-*-linux*): Handle mips64octeon*-*-linux*.
372         * config/mips/mips.h (enum processor_type): Add PROCESSOR_OCTEON.
373         (TARGET_OCTEON): New macro.
374         (TARGET_CPU_CPP_BUILTINS): Define __OCTEON__ for Octeon.
375         (MIPS_ISA_LEVEL_SPEC, MIPS_ARCH_FLOAT_SPEC): Handle -march=octeon.
376         (ISA_HAS_POP): New macro.
377         * config/mips/driver-native.c (host_detect_local_cpu): Handle
378         Octeon.
379         * config/mips/mips.c (mips_cpu_info_table, mips_rtx_cost_data):
380         Handle Octeon.
381         * config/mips/mips.md (cpu): Add octeon.
382         (type): Add pop attribute value.
383         (popcount<mode>2): New pattern.
384         * doc/invoke.texi (-march=@var{arch}): Add octeon.
385
386 2008-08-24  Jan Hubicka  <jh@suse.cz>
387
388         * doc/invoke.texi (-fipa-cp-clone): New option.
389         (-fipa-cp): Update docs.
390         (--param ipcp-unit-growth):New.
391         * ipa-cp.c: Include fibheap.h, params.h
392         (ipcp_initialize_node_lattices): When not cloning, all externally
393         visible functions are bottom.
394         (ipcp_need_redirect_p): Accept clones.
395         (ipcp_insert_stage): Use cost driven heuristics.
396         (max_count, dead_nodes): New static vars.
397         (ipcp_need_original_clone_p, ipcp_estimate_cloning_cost,
398         ipcp_const_param_count): New functions.
399         * common.opt (ipa-cp-clone): New command line option.
400         * params.def (ipcp-unit-growth): New.
401
402 2008-08-24  Jan Hubicka  <jh@suse.cz>
403
404         * tree-inline.c (tree_function_versioning): Look harder
405         for referenced vars.
406
407 2008-08-24  Razya Ladelsky  <razya@il.ibm.com>
408
409         PR tree-optimization/37185
410         * matrix-reorg.c (transform_access_sites): Update changed stmt.
411
412 2008-08-23  Jan Hubicka  <jh@suse.cz>
413
414         * ipa-cp.c (ipcp_analyze_node): New function.
415         (ipcp_update_cloned_node): Use it.
416         (ipcp_init_stage): Likewise.
417         * ipa-inline.c (function_insertion_hook_holder): New static var.
418         (analyze_function): Break out from ....
419         (inline_generate_summary): Here; register insertion hook.
420         (cgraph_decide_inlining): Remove hook.
421         (add_new_function): New function.
422
423 2008-08-23  Jan Hubicka  <jh@suse.cz>
424
425         * opts.c (decode_options): Revert accidental change enabling ipa-cp.
426
427 2008-08-23  Jan Hubicka  <jh@suse.cz>
428
429         * ipa-cp.c (constant_val_insert): Remove.
430         (ipcp_propagate_one_const): Remove.
431         (ipcp_create_replace_map): Always insert replacements to the map.
432         (ipcp_insert_stage): Do not try to insert statements by hand.
433         * tree-inline.c (insert_init_stmt): Break out from ...
434         (setup_one_parameter): ... here; allow NULL BB pointer.
435         (tree_function_versioning): Use setup_one_parameter to process
436         replacement map.
437
438 2008-08-23  Jan Hubicka  <jh@suse.cz>
439
440         * tree.c (decl_address_ip_invariant_p): New function.
441         * tree.h (decl_address_ip_invariant_p): Declare.
442         * gimple.c (strip_invariant_refs): Break out from ...
443         (is_gimple_invariant_address): ... here
444         (is_gimple_ip_invariant_address): New function.
445         (is_gimple_ip_invariant): New function.
446         * gimple.h (is_gimple_ip_invariant_address, is_gimple_ip_invariant):
447         Declare.
448
449         * ipa-cp.c (ipcp_lat_is_const): Remove handling of IPA_CONST_VALUE_REF.
450         (ipcp_lat_is_insertable): All constants are insertable.
451         (ipcp_lattice_from_jfunc, ipcp_print_all_lattices): Remove handling of
452         IPA_CONST_VALUE_REF.
453         (ipcp_initialize_node_lattices): Propagate all types of operands.
454         (build_const_val): Do not handle IPA_CONST_VALUE_REF.
455         (ipcp_create_replace_map): Reformat.
456         (ipcp_need_redirect_p): Simplify.
457         (ipcp_insert_stage): Check that argument is used before clonning.
458         * ipa-prop.c (ipa_print_node_jump_functions): Do not handle IPA_CONST_REF.
459         (compute_scalar_jump_functions): Simplify using is_gimple_ip_invariat.
460         (determine_cst_member_ptr): Keep wrapping ADDR_EXPR of members.
461         (update_call_notes_after_inlining): Expect ADDR_EXPR in operand.
462         * ipa-prop.h (jump_func_type): Remove IPA_CONST_REF.
463         (jump_func_type): Remove IPA_CONST_VALUE_REF.
464         * tree-inline.c (tree_function_versioning): Add variables referenced by
465         replacing trees.
466
467 2008-08-23  Jan Hubicka  <jh@suse.cz>
468
469         PR target/37094
470         * i386.c (standard_80387_constant_p): Use optimize_size.
471
472 2008-08-23  Ira Rosen  <irar@il.ibm.com>
473
474         PR tree-optimization/37161
475         * tree-vectorizer.h (vect_get_smallest_scalar_type): Declare.
476         * tree-vect-analyze.c (vect_get_smallest_scalar_type): New function.
477         (vect_determine_vectorization_factor): Move the scalar type
478         retrieval to vect_get_smallest_scalar_type.
479         (vect_build_slp_tree): Call vect_get_smallest_scalar_type to get
480         scalar type. Remove redundant computation.
481         * tree-vect-transform.c (vect_get_constant_vectors): Add argument.
482         (vect_get_slp_defs): Take the type of RHS into account if
483         necessary by calling vect_get_smallest_scalar_type. Call
484         vect_get_constant_vectors with additional argument.
485
486 2008-08-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
487
488         PR 35648
489         * doc/invoke.texi (Wwrite-strings): Clarify description.
490         
491 2008-08-23  Ira Rosen  <irar@il.ibm.com>
492
493         PR tree-optimization/37174
494         * tree-vect-analyze.c (vect_get_and_check_slp_defs): Check that the
495         def stmt is a part of the loop before accessing its stmt_vec_info.
496
497 2008-08-22  Anatoly Sokolov  <aesok@post.ru>
498
499         PR target/11259
500         * config/avr/avr.md (UNSPEC_SWAP): New constants.
501         (*swap): New insn pattern.
502         (*ashlqi3): Rename from ashlqi3 insn pattern.
503         (ashlqi3): New expanders.
504         (*lshrqi3): Rename from lshrqi3 insn pattern.
505         (lshrqi3): New expanders.       
506         (ashlqi3_const4, ashlqi3_const5, ashlqi3_const6, lshrqi3_const4,
507         lshrqi3_const5, lshrqi3_const6): New splitters.
508         (andi, ashlqi3_l_const4, ashlqi3_l_const5, ashlqi3_l_const6,
509         lshrqi3_l_const4, lshrqi3_l_const5, lshrqi3_l_const6): Define
510         peephole2 patterns.
511
512 2008-08-22  Richard Guenther  <rguenther@suse.de>
513
514         PR tree-optimization/37078
515         * tree-vrp.c (extract_range_from_unary_expr): Avoid generating
516         [+INF, +INF] ranges.
517
518 2008-08-22  Richard Guenther  <rguenther@suse.de>
519
520         PR tree-optimization/37143
521         * tree-vect-transform.c (vect_create_cond_for_align_checks): Build
522         a conversion statement instead of a copy.
523
524 2008-08-22  Uros Bizjak  <ubizjak@gmail.com>
525
526         PR target/37184
527         * config/i386/i386.c (ix86_match_ccmode): Handle CCAmode,
528         CCCmode, CCOmode and CCSmode destination modes.
529
530         PR target/37191
531         * config/i386/mmx.md (*vec_extractv2sf_0): Avoid combining registers
532         from different units in a single alternative.
533         (*vec_extractv2sf_1): Ditto.
534         (*vec_extractv2si_0): Ditto.
535         (*vec_extractv2si_1): Ditto.
536         * config/i386/sse.md (sse2_storehpd): Ditto.
537         (sse2_storelpd): Ditto.
538         (sse2_loadhpd): Ditto.
539         (sse2_loadlpd): Ditto.
540
541         PR target/37197
542         * config/i386/i386.md (clzsi2_abm): Fix operand 1 constraints.
543         (popcountsi2): Ditto.
544         (clzdi2_abm): Ditto.
545         (popcountdi2): Ditto.
546         (clzhi2_abm): Ditto.
547         (popcounthi2): Ditto.
548
549 2008-08-22  Richard Guenther  <rguenther@suse.de>
550
551         PR middle-end/36548
552         PR middle-end/37125
553         * fold-const.c (extract_muldiv_1): Optimize (X * C1) % C2 only
554         if the multiplication does not overflow.
555
556 2008-08-21  Nathan Sidwell  <nathan@codesourcery.com>
557
558         * c-ppoutput.c (init_pp_output): Initialize src_line to 1.
559
560 2008-08-21  Richard Henderson  <rth@redhat.com>
561
562         * configure.ac (HAVE_GAS_CFI_PERSONALITY_DIRECTIVE): Remove
563         spurrious comma from test.
564         * configure: Rebuild.
565
566 2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
567
568         PR 30457
569         * builtins.c (fold_builtin_next_arg): Add warning about undefined
570         behaviour.
571         
572 2008-08-21  Aldy Hernandez  <aldyh@redhat.com>
573
574         * c-tree.h (grokfield): New argument.
575         * c-decl.c (grokfield): Handle new location argument.
576         * c-parser.c (c_parser_struct_declaration): Pass location to
577         grokfield.
578
579 2008-08-21  Richard Guenther  <rguenther@suse.de>
580
581         * tree-ssa-ccp.c (ccp_fold): Fold VIEW_CONVERT_EXPRs of constants.
582
583 2008-08-21  Jan Hubicka  <jh@suse.cz>
584
585         * cgraph.c (first_cgraph_function_insertion_hook): New variable.
586         (cgraph_add_function_insertion_hook,
587         cgraph_remove_function_insertion_hook,
588         cgraph_call_function_insertion_hooks): New functions.
589         * cgraph.h (cgraph_add_function_insertion_hook,
590         cgraph_remove_function_insertion_hook,
591         cgraph_call_function_insertion_hooks): Declare.
592         * ipa-reference.c (function_insertion_hook_holder): New variable.
593         (check_operand, look_for_address_of): When checking late, do not care
594         about module bitmaps.
595         (add_new_function): New function.
596         (generate_summary): Register hooks; zero module bitmaps.
597         (propagate): Unregister hooks.
598         * ipa-pure-const.c (function_insertion_hook_holder): New variable.
599         (add_new_function): New function.
600         (generate_summary): Register hook.
601         (propagate): Remove hook.
602
603         * ipa-cp.c (ipcp_need_redirect_p): Fix to not be constant 0.
604
605         * tree-pass.h (pass_ipa_cp): Make ipa_opt_pass.
606         * ipa-cp.c (ipcp_update_cloned_node): New function.
607         (build_const_val): Handle functions correctly; bring type logic
608         into sync with tree-inline.c
609         (ipcp_init_stage):  Take care of computing stuff needed by
610         indirect inlining; update clones.
611         (ipcp_generate_summary): Break out of ipcp_driver.
612         (ipcp_driver): Do only execution and transformation.
613         (pass_ipa_cp): Make IPA_PASS.
614         * tree-ssa-ccp.c (fold_stmt_r): Check type before trying to fold
615         offset to address.
616         * ipa-inline.c (inline_indirect_intraprocedural_analysis): When doing
617         ipcp, some info is already available.
618         * ipa-prop.c (ipa_count_arguments): Grow edge lists as needed.
619         * tree-inline.c (remap_ssa_name): Unshare expression.
620
621 2008-08-21  Richard Guenther  <rguenther@suse.de>
622
623         * tree-ssa-pre.c (insert_into_preds_of_block): Before inserting
624         a PHI ask VN if it is already available.
625         * tree-ssa-sccvn.h (vn_phi_lookup): Declare.
626         * tree-ssa-sccvn.c (vn_phi_lookup): Export.
627
628 2008-08-21  Richard Guenther  <rguenther@suse.de>
629
630         PR middle-end/36817
631         * tree-chrec.c (chrec_apply): Always call chrec_fold_plus which
632         makes sure to produce a result of the correct type.
633
634 2008-08-21  Jan Hubicka  <jh@suse.cz>
635         Backport from LTO branch:
636
637         2008-05-05  Kenneth Zadeck <zadeck@naturalbridge.com>
638                     Jan Hubicka  <jh@suse.cz>
639         
640         * ipa-pure-const.c
641         (init_state, finish_state, set_function_state, generate_summary):
642         New functions.
643         (scan_stmt): Renamed from scan_function.  Changed to keep state in
644         local static vars rather than cgraph aux field.
645         (propagate): Renamed from static_execute. Changed to keep state in
646         local static vars rather than cgraph aux field.
647         (pass_ipa_pure_const): Changed from SIMPLE_IPA_PASS to IPA_PASS.
648         * tree-pass.h (pass_ipa_pure_const): Turn into IPA_PASS.
649
650         2008-07-15  Kenneth Zadeck <zadeck@naturalbridge.com>
651
652         * tree-pass.h (pass_ipa_reference): Make into ipa_opt_pass.
653         * ipa-reference.c (init_function_info, generate_summary, 
654         propagate): New functions.
655         (analyze_function):  Call init_function_info.
656         (static_execute): Stripped into generate_summary and propagate.
657         (pass_ipa_reference): Made into ipa_opt_pass.
658
659 2008-08-21  Richard Guenther  <rguenther@suse.de>
660
661         PR tree-optimization/37181
662         * tree-vrp.c (extract_range_from_binary_expr): Check for NULL
663         folding result.
664         (extract_range_from_unary_expr): Likewise.
665
666 2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
667
668         * diagnostic.c (pedwarn_at): Rename as pedwarn.
669         (pedwarn): Delete.
670         * toplev.h (pedwarn_at): Likewise.
671         * builtins.c: Update all calls to pedwarn.
672         * c-lex.c: Likewise.
673         * toplev.c: Likewise.
674         * c-tree.h: Likewise.
675         * c-decl.c: Likewise.
676         * c-errors.c: Likewise.
677         * c-typeck.c: Likewise.
678         * c-common.c: Likewise.
679         * c-parser.c: Likewise.
680
681 2008-08-20  Joseph Myers  <joseph@codesourcery.com>
682
683         PR target/31070
684         * config/sparc/sparc.c (function_arg_slotno): Handle structure
685         with MODE_VECTOR_INT mode.
686
687 2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
688
689         PR middle-end/179
690         * tree-ssa.c (warn_uninit): Do not warn for variables that can be
691         initialized outside the current module.
692         (warn_uninitialized_var): Ignore left-hand side when walking the
693         trees. Ignore address expressions. Examine VUSE operands in gimple
694         statements with a variable declaration on the right-hand side.
695
696 2008-08-20  Richard Sandiford  <rdsandiford@googlemail.com>
697
698         PR bootstrap/37155
699         * rtlanal.c (subreg_offset_representable_p): Revert last change.
700
701 2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
702
703         PR 35701
704         * c-common.c (conversion_warning): Do not warn if applying bit-and
705         operator to unsigned constant that fits in the target type.
706
707 2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
708
709         PR c++/35602
710         * c-common.c (conversion_warning): Do not warn for artificial
711         expressions.
712
713 2008-08-20  Richard Guenther  <rguenther@suse.de>
714
715         * tree-vrp.c (op_with_constant_singleton_value_range): New function.
716         (extract_range_from_binary_expr): Fall back to constant propagation.
717         (extract_range_from_unary_expr): Likewise.
718
719 2008-08-20  Richard Guenther  <rguenther@suse.de>
720
721         * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Do not mess
722         with TREE_THIS_VOLATILE on shared nodes.
723         (fold_stmt_r): Likewise.
724
725 2008-08-20  Jakub Jelinek  <jakub@redhat.com>
726
727         PR c/37171
728         * c-parser.c (c_parser_attributes): For keywords use canonical
729         spelling for attr_name.
730
731 2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
732
733         * value-prof.c (check_counter): Revert wrong call to error.
734         
735 2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
736
737         * profile.c: Update calls to inform.
738         * value-prof.c: Update calls to inform.
739         
740 2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
741
742         * diagnostic.c (inform): Add an explicit location_t parameter.
743         * toplev.h (inform): Update declaration.
744         * builtins.c: Update all calls to inform.
745         * c-common.c: Likewise.
746         * c-decl.c: Likewise.
747         * c-opts.c: Likewise.
748         * c-pch.c: Likewise.
749         * c-pragma.c: Likewise.
750         * c-typeck.c: Likewise.
751         * coverage.c: Likewise.
752         * opts.c: Likewise.
753         * toplev.c: Likewise.
754         * tree-cfg.c: Likewise.
755         * tree-ssa.c: Likewise.
756
757 2008-08-20  H.J. Lu  <hongjiu.lu@intel.com>
758
759         PR target/37169
760         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): In
761         V2DI mode, for SSE4.1, use movq instead of vector set if the
762         second element is zero and inter-unit moves are OK.
763
764 2008-08-20  Richard Guenther  <rguenther@suse.de>
765
766         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): More
767         properly handle conversion/copy chains after tuplification.
768
769 2008-08-20  Richard Guenther  <rguenther@suse.de>
770
771         * passes.c (init_optimization_passes): Move the second
772         forwprop pass before alias computation.  Remove the second
773         DCE pass.  Remove the first dominator and phi copy/const
774         prop passes.
775
776 2008-08-20  Nick Clifton  <nickc@redhat.com>
777
778         * configure.ac (HAVE_GAS_CFI_DIRECTIVE): Always test for assembler
779         support of this feature.  Do not assume that a sufficiently new
780         assembler will support the feature regardless of the target type.
781         (HAVE_GAS_CFI_PERSONALITY_DIRECTIVE): Likewise.
782         * configure: Regenerate.
783
784 2008-08-20  Richard Guenther  <rguenther@suse.de>
785
786         * tree-vrp.c (found_in_subgraph): Remove.
787         (live): New global static.
788         (live_on_edge): New function.
789         (blocks_visited): Remove.
790         (register_edge_assert_for_2): Use live_on_edge.
791         (find_conditional_asserts): Remove code dealing with
792         found_in_subgraph.  Do not walk the CFG.
793         (find_switch_asserts): Likewise.
794         (find_assert_locations_1): Renamed from find_assert_locations.
795         Move finding assert locations for conditional and switch
796         statements first.  Update live bitmap.  Do not walk the CFG.
797         (find_assert_locations): New function.
798         (insert_range_assertions): Remove entry of CFG walk.
799         Adjust call to find_assert_locations.
800         * tree-ssa-pre.c (do_regular_insertion): Ignore critical edges
801         that only can appear because of fake exit edges but assert we
802         never try to insert on those.
803         (fini_pre): Do not remove fake exit edges here...
804         (execute_pre): ...but here, before committing edge inserts.
805
806 2008-08-19  Richard Guenther  <rguenther@suse.de>
807
808         * passes.c (init_optimization_passes): Exchange store-ccp
809         with a ccp pass.
810
811 2008-08-19  Rafael Espindola  <espindola@google.com>
812
813         * varasm.c (weak_decls): Move earlier in the file.
814         (assemble_external): Add weak decls to the weak_decls list.
815         (declare_weak): Don't add decls to the weak_decls list.
816
817 2008-08-19  H.J. Lu  <hongjiu.lu@intel.com>
818
819         PR target/37157
820         * config/i386/sse.md (sse2_punpckhqdq, sse2_punpcklqdq): Moved
821         before (sse2_shufpd_<mode>).
822
823 2008-08-19  Jakub Jelinek  <jakub@redhat.com>
824
825         PR debug/37156
826         * pretty-print.c (pp_base_format): Deal with recursive BLOCK trees.
827         * tree.c (block_nonartificial_location): Likewise.
828
829 2008-08-19  Richard Guenther  <rguenther@suse.de>
830
831         PR tree-optimization/35972
832         PR tree-optimization/23094
833         * tree-ssa-sccvn.h (vn_reference_lookup_pieces): Add maywalk
834         parameter.
835         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Properly
836         handle MISALIGNED_INDIRECT_REF.
837         (get_ref_from_reference_ops): New helper.
838         (vn_reference_lookup_pieces): Walk the use-def chain using the
839         alias-oracle if requested.
840         * tree-ssa-pre.c (phi_translate_1): Do reference lookup with
841         walking the use-def chain.
842         (compute_avail): But not here.
843         (create_component_ref_by_pieces_1): Properly handle
844         MISALIGNED_INDIRECT_REF.
845         (do_regular_insertion): Handle fully redundant
846         expressions after PHI-translation also for SSA_NAME values, not
847         only constants.  Correctly use edoubleprime for that.
848
849 2008-08-19  Ira Rosen  <irar@il.ibm.com>
850
851         * tree-vectorizer.c (supportable_widening_operation): Support
852         multi-step conversion, return the number of steps in such conversion
853         and the required intermediate types.
854         (supportable_narrowing_operation): Likewise.
855         * tree-vectorizer.h (vect_pow2): New function.
856         (supportable_widening_operation): Change argument types.
857         (supportable_narrowing_operation): Likewise.
858         (vectorizable_type_promotion): Add an argument.
859         (vectorizable_type_demotion): Likewise.
860         * tree-vect-analyze.c (vect_analyze_operations): Call 
861         vectorizable_type_promotion and vectorizable_type_demotion with
862         additional argument.
863         (vect_get_and_check_slp_defs): Detect patterns.
864         (vect_build_slp_tree): Add an argument, don't fail in case of multiple
865         types. 
866         (vect_analyze_slp_instance): Don't fail in case of multiple types. Call
867         vect_build_slp_tree with correct arguments. Calculate unrolling factor
868         according to the smallest type in the loop.
869         (vect_detect_hybrid_slp_stmts): Include statements from patterns.
870         * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Call 
871         supportable_widening_operation with correct arguments. 
872         * tree-vect-transform.c (vect_get_slp_defs): Allocate output vector 
873         operands lists according to the number of vector statements in left
874         or right node, if exists.
875         (vect_gen_widened_results_half): Remove unused argument.
876         (vectorizable_conversion): Call supportable_widening_operation, 
877         supportable_narrowing_operation, and vect_gen_widened_results_half
878         with correct arguments. 
879         (vectorizable_assignment): Change documentation, support multiple
880         types in SLP. 
881         (vectorizable_operation): Likewise.
882         (vect_get_loop_based_defs): New function.
883         (vect_create_vectorized_demotion_stmts): Likewise.
884         (vectorizable_type_demotion): Support loop-aware SLP and general
885         multi-step conversion. Call vect_get_loop_based_defs and
886         vect_create_vectorized_demotion_stmts for transformation.
887         (vect_create_vectorized_promotion_stmts): New function.
888         (vectorizable_type_promotion): Support loop-aware SLP and general
889         multi-step conversion. Call vect_create_vectorized_promotion_stmts
890         for transformation.     
891         (vectorizable_store): Change documentation, support multiple
892         types in SLP. 
893         (vectorizable_load): Likewise.
894         (vect_transform_stmt): Pass SLP_NODE to 
895         vectorizable_type_promotion and vectorizable_type_demotion.
896         (vect_schedule_slp_instance): Move here the calculation of number
897         of vectorized statements for each node from...
898         (vect_schedule_slp): ... here.
899         (vect_transform_loop): Call vect_schedule_slp without the last
900         argument.
901
902 2008-08-19  Dorit Nuzman  <dorit@il.ibm.com>
903
904         PR bootstrap/37152
905         * tree-vect-transform.c (vect_create_epilog_for_reduction): Change = 
906         to == in assert statement.
907         (vectorizable_reduction): Fix typo.
908
909 2008-08-18  H.J. Lu  <hongjiu.lu@intel.com>
910
911         PR bootstrap/37153
912         * value-prof.c (check_counter): Dereference pointer to overall
913         count when printing it.
914
915 2008-08-18  H.J. Lu  <hongjiu.lu@intel.com>
916
917         * profile.h: Really add it.
918
919 2008-08-18  H.J. Lu  <hongjiu.lu@intel.com>
920
921         * mcf.c: Really add it.
922
923 2008-08-18  Paul Yuan  <yingbo.com@gmail.com>
924             Vinodha Ramasamy  <vinodha@google.com>
925
926         * cgraph.c (cgraph_edge): Handle inconsistent counts when setting
927         count_scale.
928         * value-prof.c (check_counter): Fix the counter if
929         flag_profile_correction is true.
930         (tree_divmod_fixed_value_transform, tree_mod_pow2_value_transform,
931         tree_mod_subtract_transform):
932         Follow check_counter parameter change.
933         * common.opt (fprofile-correction): New option.
934         * mcf.c: New file.
935         * profile.h: Likewise.
936         * profile.c (edge_info, EDGE_INFO): Moved to new file profile.h.
937         (sum_edge_counts, is_edge_inconsistent, correct_negative_edge_counts,
938         is_inconsistent, set_bb_counts, read_profile_edge_counts): New
939         functions.
940         (compute_branch_probabilities): Refactored. Invokes mcf_smooth_cfg if
941         flag_profile_correction is set.
942
943 2008-08-18  Richard Sandiford  <rdsandiford@googlemail.com>
944
945         * rtlanal.c (subreg_offset_representable_p): Check HARD_REGNO_MODE_OK.
946
947 2008-08-18  Tomas Bily  <tbily@suse.cz>
948
949         * tree.h (IS_CONVERT_EXPR_CODE_P): Renamed to CONVERT_EXPR_CODE_P.
950         * tree-ssa-threadedge.c (simplify_control_stmt_condition): Use
951         CONVERT_EXPR_P.
952         * tree-data-ref.c (split_constant_offset_1): Likewise.
953         * tree-inline.c (estimate_operator_cost): Use CASE_CONVERT.
954         * tree-sra.c (sra_walk_expr): Likewise.
955         * matrix-reorg.c (ssa_accessed_in_assign_rhs): Likewise.
956         * tree-ssa-loop-niter.c (expand_simple_operations): Likewise.
957         * gimple.h (gimple_assign_cast_p): Use CONVERT_EXPR_CODE_P.
958         * tree-ssa-structalias.c (find_func_aliases, find_func_aliases):
959         Likewise.
960         * gimple.c (gimple_assign_unary_nop_p): Likewise.
961         * tree-vect-transform.c (vectorizable_type_demotion)
962         (vectorizable_type_promotion): Likewise.
963         * tree-inline.c (expand_call_inline): 
964         * tree-ssa-forwprop.c (get_prop_source_stmt, can_propagate_from)
965         (forward_propagate_addr_expr_1, forward_propagate_comparison)
966         (tree_ssa_forward_propagate_single_use_vars): Likewise.
967         * expr.c (expand_expr_real_1): Likewise.
968         * tree-ssa-dom.c (hashable_expr_equal_p, iterative_hash_hashable_expr)
969         (gimple_assign_unary_useless_conversion_p): Likewise.
970         * tree-stdarg.c (execute_optimize_stdarg): Likewise.
971         * tree-ssa-ccp.c (ccp_fold, fold_gimple_assign): Likewise.
972         * fold-const.c (fold_unary): Likewise.
973         * tree.h (CONVERT_EXPR_P): Likewise.
974         * tree.c (simple_cst_equal, iterative_hash_expr): Likewise.
975         * tree-ssa-loop-im.c (rewrite_bittest): Likewise.
976         * tree-vrp.c: 
977         (register_edge_assert_for_2, extract_range_from_unary_expr)
978         (register_edge_assert_for_1): Likewise.
979         
980 2008-08-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
981
982         * real.h (dconst_e, dconst_third, dconst_sqrt2, dconst_e_ptr,
983         dconst_third_ptr, dconst_sqrt2_ptr): Declare.
984         (enum real_value_const): Delete.
985         (get_real_const): Delete.
986         * real.c (get_real_const): Delete.
987         (dconst_e_ptr): Define.
988         (dconst_third_ptr): Define.
989         (dconst_sqrt2_ptr): Define.
990         * builtins.c: Update all callers.
991
992 2008-08-18  Richard Guenther  <rguenther@suse.de>
993
994         * tree-ssa-reassoc.c (reassociate_bb): Properly reset the
995         statement iterator after statement removal.
996
997 2008-08-18  Andreas Tobler  <a.tobler@schweiz.org>
998
999         * config/rs6000/driver-rs6000.c (detect_caches_freebsd): New function.
1000         (detect_processor_freebsd): Likewise.
1001         (host_detect_local_cpu): Call newly added functions for FreeBSD.
1002
1003 2008-08-18  Richard Guenther  <rguenther@suse.de>
1004
1005         * tree-cfg.c (verify_types_in_gimple_assign): Verify copies
1006         and loads have the correct types.
1007
1008 2008-08-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1009
1010         PR cpp/7263
1011         * c-opts.c (cpp_opts): Remove static.
1012         * c-parser.c (cpp_opts): Declare it extern.
1013         (disable_extension_diagnostics): Handle cpp options.
1014         (enable_extension_diagnostics): Likewise.
1015
1016 2008-08-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1017
1018         * diagnostics.c (permerror_at): Rename as permerror.
1019         (permerror): Delete.
1020         * toplev.h: Likewise.
1021
1022 2008-08-18  Richard Guenther  <rguenther@suse.de>
1023
1024         * passes.c (init_optimization_passes): Remove cleanup_cfg1,
1025         sdse1 and addressables2 passes.  Replace dce1 with cddce1.
1026         Move call_cdce before build_alias.  Move copyrename2,
1027         cunrolli and ccp2 beafore build_alias.  Re-add addressable2
1028         right after final inlining.
1029         * tree-cfg.c (build_gimple_cfg): Do not dump function here.
1030         (pass_build_cfg): But instead via TODO_dump_func.
1031
1032 2008-08-18  Richard Guenther  <rguenther@suse.de>
1033
1034         * tree-sra.c (generate_element_init_1): Deal with NULL constructor
1035         element index.
1036         (scalarize_init): If we failed to generate some initializers
1037         do not generate zeros for not instantiated members.  Instead
1038         rely on the copy out.
1039         * tree-ssa-operands.c (get_addr_dereference_operands): Warn
1040         about missing flow-sensitive alias info only if we have
1041         aliases computed.
1042
1043 2008-08-17  Nick Clifton  <nickc@redhat.com>
1044
1045         * doc/extend.texi (Function Attributes): Fix typo in description
1046         if hot function attribute.
1047
1048 2008-08-17  Daniel Jacobowitz  <dan@codesourcery.com>
1049             Richard Sandiford  <rdsandiford@googlemail.com>
1050
1051         * doc/install.texi (--with-mips-plt): Document.
1052         * doc/invoke.texi (-mplt, -mno-plt): Document.
1053         * config.gcc (mips*-*-*): Add mips-plt to supported_defaults
1054         and handle ${with_mips_plt}.
1055         * config/mips/mips.opt (mplt): New option.
1056         * config/mips/mips.h (TARGET_ABICALLS_PIC0): New macro.
1057         (TARGET_ABICALLS_PIC2): Likewise.
1058         (TARGET_GPWORD): Return false for TARGET_ABSOLUTE_ABICALLS.
1059         (OPTION_DEFAULT_SPECS): Add a mips-plt entry.
1060         (ASM_SPEC): Use !mabi=* instead of !mabi*.
1061         (MIPS_CALL): Use TARGET_ABICALLS_PIC2 instead of TARGET_ABICALLS
1062         to decide whether to output ".option picX" directives.
1063         * config/mips/linux.h (SUBTARGET_ASM_SPEC): Remove -mabi=64 handling.
1064         Pass -call_nonpic rather than -KPIC for -mplt.
1065         (BASE_DRIVER_SELF_SPECS): Remove -mplt if -mno-shared is not present
1066         on the command line.  Also remove it when -mabi=64 is used without
1067         -msym32.
1068         * config/mips/linux64.h (SUBTARGET_ASM_SPEC): Delete.
1069         * config/mips/mips.c (mips_use_pic_fn_addr_reg_p): Handle
1070         TARGET_ABICALLS_PIC0.
1071         (mips_classify_symbol): Use TARGET_ABICALLS_PIC2 instead of
1072         TARGET_ABICALLS.
1073         (mips16_build_function_stub): Only output ".option pic" directives
1074         and PIC stubs if TARGET_ABICALLS_PIC2.  Call through $25 instead of $1.
1075         (mips16_build_call_stub): Fix comment and remove redundant
1076         ".set at"/"set .noat" directives.
1077         (mips_function_rodata_section): Use the default behaviour for
1078         TARGET_ABSOLUTE_ABICALLS.
1079         (mips_file_start): Emit ".option pic0" for TARGET_ABICALLS_PIC0.
1080         (mips_global_pointer): Handle TARGET_ABICALLS_PIC0.
1081         (mips_restore_gp): Do nothing if the current function doesn't use
1082         a global pointer.
1083         (mips_expand_prologue): Only save $gp if the current function uses it.
1084         Use a normal move for TARGET_ABICALLS_PIC0.
1085         (mips_override_options): Only set flag_pic if TARGET_ABICALLS_PIC2.
1086
1087 2008-08-17  Richard Sandiford  <rdsandiford@googlemail.com>
1088
1089         * config/mips/mips.c (mips_save_reg_p): Don't short-circuit rest
1090         of function when handling GLOBAL_POINTER_REGNUM.
1091
1092 2008-08-16  Eric Botcazou  <ebotcazou@adacore.com>
1093
1094         PR ada/20548
1095         * common.opt (-fstack-check): Do not declare the variable here.
1096         (-fstack-check=): New option variant.
1097         * doc/invoke.texi (Code Gen Options): Document it.
1098         * expr.h (STACK_OLD_CHECK_PROTECT): New macro.
1099         (STACK_CHECK_PROTECT): Bump to 3 pages if DWARF-2 EH is used.
1100         (STACK_CHECK_STATIC_BUILTIN): New macro.
1101         * doc/tm.texi (Stack Checking): Document STACK_CHECK_STATIC_BUILTIN.
1102         * opts.c: Include expr.h.
1103         (common_handle_option) <OPT_fold_stack_check_>: New case.
1104         <OPT_fstack_check>: Likewise.
1105         * calls.c (initialize_argument_information): Use TYPE_SIZE_UNIT
1106         consistently in the test for variable-sized types.  Adjust for
1107         new behaviour of flag_stack_check.
1108         * explow.c: Include except.h.
1109         (allocate_dynamic_stack_space): Do not take into account
1110         STACK_CHECK_MAX_FRAME_SIZE for static builtin stack checking.
1111         * function.c (gimplify_parameters): Use DECL_SIZE_UNIT in the test
1112         for variable-sized parameters.  Treat all parameters whose size is
1113         greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized if generic
1114         stack checking is enabled.
1115         * gimplify.c (gimplify_decl_expr): Treat non-static objects whose
1116         size is greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized
1117         if generic stack checking is enabled.
1118         (expand_function_end): Adjust for new behaviour of flag_stack_check.
1119         * reload1.c (reload): Likewise.
1120         * stmt.c (expand_decl): Assert that all automatic variables have
1121         fixed size at this point and remove dead code.
1122         * flags.h (stack_check_type): New enumeration type.
1123         (flag_stack_check): Declare.
1124         * toplev.c (flag_stack_check): New global variable.
1125         * Makefile.in (opts.o): Add dependency on EXPR_H.
1126         (explow.o): Add dependency on except.h.
1127
1128 2008-08-16  Andy Hutchinson  <hutchinsonandy@aim.com>
1129
1130         * config/avr/avr.c (avr_override_options): Reduce value of 
1131         PARAM_INLINE_CALL_COST.
1132
1133 2008-08-15  Eric Botcazou  <ebotcazou@adacore.com>
1134
1135         * expr.c (expand_expr_real_1) <VIEW_CONVERT_EXPR>: When converting
1136         to BLKmode, try to fetch an inner memory reference.  Use 'mode' in
1137         lieu of TYPE_MODE (type) throughout.
1138
1139 2008-08-15  Joseph Myers  <joseph@codesourcery.com>
1140
1141         * config/arm/arm.c (add_minipool_backward_ref): Check for
1142         8-byte-aligned entries in second case of forcing insertion after a
1143         particular entry.  Change third case to avoid inserting
1144         non-8-byte-aligned entries before 8-byte-aligned ones.
1145
1146 2008-08-15  Richard Guenther  <rguenther@suse.de>
1147
1148         * tree-ssa-ccp.c (maybe_fold_offset_to_reference): Do not
1149         strip components for unknown size accesses.
1150
1151 2008-08-15  Wolfgang Gellerich  <gellerich@de.ibm.com>
1152
1153         * config/s390/2097.md New file.
1154         * config/s390/s390.md ("z10prop" attribute): Define none,
1155         z10_super, z10_super_E1, z10_super_A1, z10_super_c,
1156         z10_super_c_E1, z10_fwd, z10_fwd_A1, z10_fwd_A3, z10_fwd_E1,
1157         z10_rec, z10_fr, z10_fr_A3, z10_fr_E1, z10_c, and z10_cobra as
1158         possible values and apply them to insns as appropriate.
1159         ("type" attribute): Removed itof and added ftrunctf,ftruncdf,
1160         ftruncsd, ftruncdd, itoftf, itofdf, itofsf, itofdd, itoftd,
1161         fdivdd, fdivtd, floaddd, floadsd, fmuldd, fmultd, fsimpdd,
1162         fsimpsd, fsimptd, fstoredd, fstoresd, ftoidfp as possible
1163         values.
1164         ("bfp" mode attribute): Removed.  Every occurence replaced
1165         with <mode>.
1166         * config/s390/s390.c (struct "z10_cost"): Updated entries.
1167         * config/s390/2084.md (insn_reservation "x_itof"): Updated
1168           type attribute.
1169
1170 2008-08-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1171
1172         PR c/28152
1173         * c-parser.c (c_lex_one_token): Do not store the canonical spelling
1174         for keywords.
1175         
1176 2008-08-14  Dorit Nuzman  <dorit@il.ibm.com>
1177
1178         * tree-vect-transform.c (vect_create_epilog_for_reduction): Takes an
1179         additional argument. Support reduction when duplication is needed due
1180         to data-types of different sizes in the loop.
1181         (get_initial_def_for_induction): Fix printout.
1182         (vect_get_vec_def_for_stmt_copy): Support case where the
1183         vec_stmt_for_operand is a phi node.
1184         (vectorizable_reduction): Support reduction when duplication is needed 
1185         due to data-types of different sizes in the loop.
1186         (vectorizable_call): Remove restriction to not vectorize in case we 
1187         have data-types of different sizes in the loop.
1188         (vectorizable_conversion): Likewise.
1189         (vectorizable_operation): Likewise.
1190         (vectorizable_type_demotion): Likewise.
1191         (vectorizable_type_promotion): Likewise.
1192         (vectorizable_induction): Add restriction to not vectorize in case 
1193         we have data-types of different sizes in the loop.
1194
1195 2008-08-14  Christophe Saout  <christophe@saout.de>
1196             Uros Bizjak  <ubizjak@gmail.com>
1197
1198         PR target/37101
1199         * config/i386/sse.md (vec_concatv2di): Remove movlps alternative.
1200         (*vec_concatv2di_rex64_sse4_1): Ditto.
1201         (*vec_concatv2di_rex64_sse): Ditto.
1202
1203 2008-08-14  Jakub Jelinek  <jakub@redhat.com>
1204
1205         PR middle-end/37103
1206         * fold-const.c (fold_widened_comparison): Do not allow
1207         sign changes that change the result even if shorter type
1208         is wider than arg1_unw's type.
1209
1210 2008-08-13  Kazu Hirata  <kazu@codesourcery.com>
1211
1212         * gcc.dg/arm-g2.c, gcc.dg/arm-mmx-1.c, gcc.dg/arm-scd42-2.c:
1213         Skip if the multilib testing specifies -march that does not
1214         agree with the one specified in the testcase.
1215
1216 2008-08-13  Joseph Myers  <joseph@codesourcery.com>
1217
1218         * config/sparc/sparc.c (emit_soft_tfmode_cvt): Explicitly sign or
1219         zero extend SImode values being converted to TFmode before passing
1220         to libcalls.
1221
1222 2008-08-13  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1223
1224         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Predefine
1225         __PPU__ when targeting the Cell/B.E. PPU processor.
1226
1227 2008-08-13  Eric Botcazou  <ebotcazou@adacore.com>
1228
1229         * gimple.h (gimple_call_set_chain): Accept SSA variables.
1230         * tree-ssa-pre.c (create_component_ref_by_pieces_1) <CALL_EXPR>:
1231         Rematerialize the static chain, if any.
1232         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Also copy the
1233         static chain.
1234
1235 2008-08-13  H.J. Lu  <hongjiu.lu@intel.com>
1236
1237         * dwarf2out.c (dwarf_stack_op_name): Remove prototype.
1238         (new_loc_descr): Likewise.
1239         (add_loc_descr): Likewise.
1240         (size_of_loc_descr): Likewise.
1241         (size_of_locs): Likewise.
1242         (output_loc_operands): Likewise.
1243         (output_loc_sequence): Likewise.
1244         (new_reg_loc_descr): New.
1245         (build_cfa_loc): Use it.
1246         (build_cfa_aligned_loc): Likewise.
1247         (one_reg_loc_descriptor): Likewise.
1248         (based_loc_descr): Likewise.
1249
1250 2008-08-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1251
1252         PR 30551
1253         * doc/invoke.texi (Wmain): Update.
1254         * c-decl.c (start_decl): warn_main is only 0 or 1.
1255         (start_function): Likewise. Fix formatting.
1256         (finish_function): Delete redundant warning.
1257         * c.opt (Wmain): Add Var(warn_main) and Init(-1).
1258         * c-opts (c_common_handle_option): -Wall only has effect if
1259         warn_main is uninitialized. OPT_Wmain is automatically
1260         handled. -pedantic also enables Wmain.
1261         (c_common_post_options): Handle all logic for Wmain here.
1262         * c-common.c (warn_main): Delete.
1263         (check_main_parameter_types): Make pedwarns conditional on
1264         OPT_Wmain.
1265         * c-common.h (warn_main): Delete.
1266
1267 2008-08-13  H.J. Lu  <hongjiu.lu@intel.com>
1268
1269         PR middle-end/36701
1270         * expr.c (emit_group_store): Allocate stack temp with the
1271         largest alignment when copying from register to stack.
1272
1273 2008-08-13  Richard Guenther  <rguenther@suse.de>
1274
1275         * tree.h (maybe_fold_offset_to_address): Declare.
1276         * tree-ssa-ccp.c (surely_varying_stmt_p): Fix typo in last commit.
1277         (ccp_fold): Handle pointer conversions the same as fold_stmt.
1278         Likewise for POINTER_PLUS_EXPR.
1279         (maybe_fold_offset_to_reference): Enable disabled code.
1280         (maybe_fold_offset_to_address): New function.
1281         (fold_stmt_r): Use it.
1282         (fold_gimple_assign): Likewise.
1283         * gimplify.c (gimplify_conversion): Use maybe_fold_offset_to_address.
1284         (gimplify_expr): Likewise.
1285
1286 2008-08-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1287
1288         * toplev.h (pedwarn_at): Fix declaration.
1289         
1290 2008-08-13  Joseph Myers  <joseph@codesourcery.com>
1291
1292         * config/sparc/linux64.h (LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
1293         LINK_SPEC): Use %R in -Y P argument.
1294
1295 2008-08-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1296
1297         PR c/15236
1298         * diagnostic.c (pedwarn_at): New.
1299         * toplev.h (pedwarn_at): Declare.
1300         * c-tree.h (build_enumerator): Update declaration.
1301         * c-decl.c (finish_enum): Update comment.
1302         (build_enumerator): Take a location parameter. Give a pedwarn but do
1303         not perform any conversion.
1304         * c-parser.c (c_parser_enum_specifier): Set correct location for
1305         enumerator.
1306
1307 2008-08-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1308
1309         PR 35635
1310         * c-common.c (conversion_warning): Use a switch. Ignore boolean
1311         expressions except for conversions to signed:1 bitfields. Handle
1312         COND_EXPR with constant operands.
1313         
1314 2008-08-13  Richard Guenther  <rguenther@suse.de>
1315
1316         PR tree-optimization/15255
1317         * tree-ssa-reassoc.c (linearize_expr_tree): Declare.
1318         (struct oecount_s): New struct and VEC types.
1319         (cvec): New global.
1320         (oecount_hash): New function.
1321         (oecount_eq): Likewise.
1322         (oecount_cmp): Likewise.
1323         (zero_one_operation): New function.
1324         (build_and_add_sum): Likewise.
1325         (undistribute_ops_list): Perform un-distribution of multiplication
1326         and division on the chain of summands.
1327         (should_break_up_subtract): Also break up subtracts for factors.
1328         (reassociate_bb): Delete dead visited statements.
1329         Call undistribute_ops_list.  Re-sort and optimize if it did something.
1330         * passes.c (init_optimization_passes): Move DSE before
1331         reassociation.
1332         * tree-ssa-loop-niter.c (stmt_dominates_stmt_p): Correctly handle
1333         PHI nodes.
1334
1335 2008-08-12  Janis Johnson  <janis187@us.ibm.com>
1336
1337         * doc/invoke.texi (-fipa-pta): Say the option is experimental.
1338
1339         * doc/invoke.texi: Revert unintended checkin.
1340
1341 2008-08-12  Nathan Froyd  <froydnj@codesourcery.com>
1342
1343         PR libgomp/26165
1344         * gcc.c (include_spec_function): Tweak call to find_a_file.
1345
1346 2008-08-12  Jakub Jelinek  <jakub@redhat.com>
1347
1348         PR middle-end/37014
1349         * expr.c (expand_expr_real_1): Handle TRUTH_ANDIF_EXPR
1350         and TRUTH_ORIF_EXPR.
1351         * dojump.c (do_jump): Likewise.
1352
1353         PR tree-optimization/37084
1354         * tree-inline.c (copy_bb): Call gimple_regimplify_operands
1355         if id->regimplify, don't assume stmt is a cast assignment.
1356
1357 2008-08-12  Anatoly Sokolov  <aesok@post.ru>
1358
1359         * final.c (final_scan_insn): Use app_enable/app_disable functions.
1360
1361 2008-08-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1362
1363         PR bootstrap/37097
1364         * builtins.c (do_mpfr_bessel_n): Fix copy-and-paste bug introduced
1365         by last change.
1366
1367 2008-08-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1368
1369         * defaults.h (TARGET_FLOAT_FORMAT): Remove.
1370         (UNKNOWN_FLOAT_FORMAT, IEEE_FLOAT_FORMAT, VAX_FLOAT_FORMAT): Remove.
1371
1372         * config/alpha/alpha.h (TARGET_FLOAT_FORMAT): Remove.
1373         * config/iq2000/iq2000.h (TARGET_FLOAT_FORMAT): Remove.
1374         * config/pdp11/pdp11.h (TARGET_FLOAT_FORMAT): Remove.
1375         * config/score/score.h (TARGET_FLOAT_FORMAT): Remove.
1376         * config/vax/vax.h (TARGET_FLOAT_FORMAT): Remove.
1377
1378         * doc/tm.texi (Storage Layout): Remove documentation for
1379         TARGET_FLOAT_FORMAT.
1380
1381         * simplify-rtx.c (simplify_binary_operation_1): Replace
1382         TARGET_FLOAT_FORMAT check by appropriate HONOR_... checks.
1383
1384 2008-08-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1385
1386         * real.h (struct real_format): New member has_sign_dependent_rounding.
1387         * real.c (ieee_single_format, mips_single_format, motorola_single_format,
1388         spu_single_format, ieee_double_format, mips_double_format,
1389         motorola_double_format, ieee_extended_motorola_format,
1390         ieee_extended_intel_96_format, ieee_extended_intel_128_format,
1391         ieee_extended_intel_96_round_53_format, ibm_extended_format,
1392         mips_extended_format, ieee_quad_format, mips_quad_format,
1393         vax_f_format, vax_d_format, vax_g_format): Initialize it.
1394         * config/pdp11/pdp11.c (pdp11_f_format, pdp11_d_format): Likewise.
1395
1396         * defaults.h (MODE_HAS_NANS, MODE_HAS_INFINITIES,
1397         MODE_HAS_SIGNED_ZEROS, MODE_HAS_SIGN_DEPENDENT_ROUNDING): Remove.
1398         * config/spu/spu.h (MODE_HAS_NANS, MODE_HAS_INFINITIES,
1399         MODE_HAS_SIGN_DEPENDENT_ROUNDING): Remove.
1400         (ROUND_TOWARDS_ZERO): Likewise.
1401
1402         * real.h (REAL_MODE_FORMAT): Protect MODE against macro expansion.
1403         (FLOAT_MODE_FORMAT): New macro.
1404         (REAL_MODE_FORMAT_COMPOSITE_P): Remove, replace by ...
1405         (MODE_COMPOSITE_P): ... this new macro.
1406         (MODE_HAS_NANS, MODE_HAS_INFINITIES, MODE_HAS_SIGNED_ZEROS,
1407         MODE_HAS_SIGN_DEPENDENT_ROUNDING): New macros.
1408         * machmode.h (GET_MODE_INNER): Cast result to enum machine_mode.
1409
1410         * flags.h: Include "real.h".
1411
1412         * fold-const.c (const_binop): Use MODE_COMPOSITE_P instead of
1413         REAL_MODE_FORMAT_COMPOSITE_P.
1414         * simplify-rtx.c (simplify_const_binary_operation): Likewise.
1415
1416         * doc/tm.texi (Storage Layout): Remove documentation of
1417         MODE_HAS_NANS, MODE_HAS_INFINITIES, MODE_HAS_SIGNED_ZEROS,
1418         MODE_HAS_SIGN_DEPENDENT_ROUNDING.  Update documentation of
1419         ROUND_TOWARDS_ZERO and LARGEST_EXPONENT_IS_NORMAL to clarify
1420         they only apply to libgcc2.a.
1421
1422 2008-08-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1423
1424         * config/spu/float_disf.c: New file.
1425         * config/spu/float_unsdisf.c: New file.
1426         * config/spu/t-elf (LIB2FUNCS_STATIC_EXTRA): Add them.
1427         (LIB2FUNCS_EXCLUDE): Define.
1428
1429 2008-08-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1430             Trevor Smigiel  <trevor_smigiel@playstation.sony.com>
1431
1432         * real.h (struct real_format): New member round_towards_zero.
1433         * real.c (round_for_format): Respect fmt->round_towards_zero.
1434         (ieee_single_format, mips_single_format, motorola_single_format,
1435         spu_single_format, ieee_double_format, mips_double_format,
1436         motorola_double_format, ieee_extended_motorola_format,
1437         ieee_extended_intel_96_format, ieee_extended_intel_128_format,
1438         ieee_extended_intel_96_round_53_format, ibm_extended_format,
1439         mips_extended_format, ieee_quad_format, mips_quad_format,
1440         vax_f_format, vax_d_format, vax_g_format): Initialize it.
1441         * config/pdp11/pdp11.c (pdp11_f_format, pdp11_d_format): Likewise.
1442
1443         * builtins.s (do_mpfr_arg1): Consider round_towards_zero member of
1444         real_format to choose rounding mode when calling MPFR functions.
1445         (do_mpfr_arg2, do_mpfr_arg3, do_mpfr_sincos): Likewise.
1446         (do_mpfr_bessel_n, do_mpfr_remquo, do_mpfr_lgamma_r): Likewise.
1447
1448         * real.h (real_to_decimal_for_mode): Add prototype.
1449         * real.c (real_to_decimal_for_mode): Renames old real_to_decimal.
1450         Respect target rounding mode when generating decimal representation.
1451         (real_to_decimal): New stub for backwards compatibility.
1452         * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Use
1453         real_to_decimal_for_mode instead of real_to_decimal.
1454
1455         * config/spu/spu.md ("floatdisf2", "floatunsdisf2"): New.
1456
1457 2008-08-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1458             Trevor Smigiel  <trevor_smigiel@playstation.sony.com>
1459
1460         * real.c (spu_single_format): New variable.
1461         * real.h (spu_single_format): Declare.
1462
1463         * config/spu/spu.c (spu_override_options): Install SFmode format.
1464         (spu_split_immediate): Use integer mode to operate on pieces of
1465         floating-point values in all cases.
1466
1467         * config/spu/spu.md (UNSPEC_FLOAT_EXTEND, UNSPEC_FLOAT_TRUNCATE): New.
1468         ("extendsfdf2"): Use UNSPEC_FLOAT_EXTEND instead of FLOAT_EXTEND.
1469         ("truncdfsf2"): Use UNSPEC_FLOAT_TRUNCATE instead of FLOAT_TRUNCATE.
1470
1471 2008-08-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1472
1473         * config/spu/spu.c (spu_safe_dma): Respect TARGET_SAFE_DMA.
1474
1475 2008-08-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1476
1477         * config/spu/spu.h (DWARF_FRAME_RETURN_COLUMN): Define.
1478
1479 2008-08-12  Jakub Jelinek  <jakub@redhat.com>
1480
1481         PR c++/36688
1482         * gimplify.c (gimplify_modify_expr_rhs): Test TREE_READONLY
1483         on the VAR_DECL instead of TYPE_READONLY on its type.
1484
1485 2008-08-12  Ira Rosen  <irar@il.ibm.com>
1486
1487         * tree-vectorizer.c: Depend on langhooks.h.
1488         (supportable_widening_operation): Add two arguments. Support double
1489         type conversions.
1490         (supportable_narrowing_operation): Likewise.
1491         * tree-vectorizer.h (supportable_widening_operation): Add two 
1492         arguments.
1493         (supportable_narrowing_operation): Likewise.
1494         * tree-vect-patterns.c (vect_recog_widen_mult_pattern) : Call
1495         supportable_widening_operation with correct arguments.
1496         * tree-vect-transform.c (vectorizable_conversion): Likewise.
1497         (vectorizable_type_demotion): Support double type conversions.
1498         (vectorizable_type_promotion): Likewise.
1499         * Makefile.in (tree-vectorizer.o): Depend on langhooks.h.
1500
1501 2008-08-11  Michael Matz  <matz@suse.de>
1502
1503         * i386/i386.c (override_options): Move initialisation from
1504         flag_schedule_insns_after_reload to here from ...
1505         (optimization_options): ... here.
1506
1507 2008-08-11  Jakub Jelinek  <jakub@redhat.com>
1508
1509         PR rtl-optimization/36998
1510         * dwarf2out.c (compute_barrier_args_size_1,
1511         compute_barrier_args_size): Temporarily remove assertions.
1512
1513 2008-08-10  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1514
1515         PR middle-end/20644
1516         * tree-ssa.c (struct walk_data): Add new flag
1517         warn_possibly_uninitialized.
1518         (warn_uninitialized_var): Use it.
1519         (warn_uninitialized_vars): New.
1520         (execute_early_warn_uninitialized): Call it.
1521         (execute_late_warn_uninitialized): Likewise.
1522
1523 2008-08-09  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1524
1525         PR middle-end/36238
1526         * reload1.c (gen_reload): Guard calls to get_secondary_mem
1527         for memory subregs.
1528
1529 2008-08-09  Jan Hubicka  <jh@suse.cz>
1530
1531         PR target/37055
1532         * optabs.c (maybe_emit_unop_insn): Remove produced code if
1533         expansion failed.
1534         (expand_fix): Be prepared for expansion to fail.
1535         (expand_sfix_optab): Remove instructions if expansion failed.
1536
1537 2008-08-09  Anatoly Sokolov  <aesok@post.ru>
1538
1539         * config/avr/avr.c (avr_mcu_types): Move the AT43USB320 device to
1540         avr31 architecture.
1541         * config/avr/avr.h (CRT_BINUTILS_SPECS): (Ditto.).
1542         * config/avr/t-avr (MULTILIB_MATCHES): (Ditto.).
1543
1544 2008-08-09  Richard Sandiford  <rdsandiford@googlemail.com>
1545
1546         * config.gcc (mips*-*-linux*, mips64*-*-linux*): Add
1547         mips/t-libgcc-mips16 to tmake_file.
1548         * config/mips/mips-protos.h (mips_call_type): New enum.
1549         (mips_pic_base_register, mips_got_load): Declare.
1550         (mips_restore_gp): Take an rtx argument.
1551         (mips_use_pic_fn_addr_reg_p): Declare.
1552         (mips_expand_call): Replace the sibcall_p argument with
1553         a mips_call_type argument.  Add a lazy_p parameter.
1554         (mips_split_call): Declare.
1555         * config/mips/mips.h (MIPS16_PIC_TEMP_REGNUM): New macro.
1556         (MIPS16_PIC_TEMP): Likewise.
1557         (reg_class): Delete M16_NA_REGS.
1558         (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
1559         (SYMBOL_FLAG_BIND_NOW, SYMBOL_REF_BIND_NOW_P): New macros.
1560         (mips_split_hi_p): Declare.
1561         * config/mips/mips.c (mips_split_hi_p): New array.
1562         (mips_regno_to_class): Change M16_NA_REGS entries to M16_REGS.
1563         (mips_got_symbol_type_p): New function.
1564         (mips_global_symbol_p): Check SYMBOL_REF_EXTERNAL_P.
1565         (mips16_stub_function_p): New function.
1566         (mips16_local_function_p): Likewise.
1567         (mips_use_pic_fn_addr_reg_p): Likewise.
1568         (mips_cannot_force_const_mem): Return false for HIGHs.
1569         Extend CONST_INT and symbolic handling to MIPS16, using
1570         mips_symbol_insns to check that the base symbol type is a
1571         legitimate constant.  Reject GOT-based constants if
1572         TARGET_MIPS16_PCREL_LOADS.
1573         (mips_const_insns): Check targetm.cannot_force_const_mem when
1574         decomposing a symbolic base and a large offset.
1575         (mips_emit_call_insn): Add ORIG_ADDR and ADDR parameters.
1576         When calling a function that needs $25 from MIPS16 code,
1577         move the target address into $25 separately and add a USE
1578         to the call insn.
1579         (mips16_gp_pseudo_reg): Insert the initializer immediately
1580         before the first real insn.
1581         (mips_pic_base_register, mips_got_load): New functions.
1582         (mips_split_symbol): Generalize the name of the LO_SUM_OUT
1583         parameter to LOW_OUT.  Say that it can be any valid SET_SRC
1584         when splitting a load-address operation.  Split SYMBOL_GOT_DISP
1585         constants and highs of SYMBOL_GOT_PAGE_OFST constants.
1586         (mips_call_tls_get_addr): Update the call to mips_expand_call,
1587         also passing NULL_RTX rather than const0_rtx as the aux argument.
1588         (mips_rewrite_small_data_p): Check mips_lo_relocs and mips_split_p
1589         instead of TARGET_EXPLICIT_RELOCS.
1590         (mips_ok_for_lazy_binding_p): Check SYMBOL_REF_BIND_NOW_P.
1591         (mips_load_call_address): Replace the sibcall_p argument with
1592         a mips_call_type argument.  Use mips_got_load.
1593         (mips16_local_alias): New structure.
1594         (mips16_local_aliases): New variable.
1595         (mips16_local_aliases_hash): New function.
1596         (mips16_local_aliases_eq): Likewise.
1597         (mips16_local_alias): Likewise.
1598         (mips16_stub_function): Likewise.
1599         (mips16_build_function_stub): Create a local alias for the target
1600         function.  Handle TARGET_ABICALLS.  For PIC abicalls, emit a
1601         .cpload directive and an R_MIPS_NONE relocation for the target
1602         function, then load the alias rather than the function itself.
1603         Wrap the non-PIC abicalls version in ".option pic0/.option pic2".
1604         (mips16_copy_fpr_return_value): Use mips16_stub_function and
1605         mips_expand_call.  Set SYMBOL_REF_BIND_NOW on the symbol.
1606         (mips16_build_call_stub): Replace the FN parameter with an
1607         FN_PTR parameter.  Force the address into a register if it
1608         isn't a call_insn_operand; don't rely on the caller to do this.
1609         If a call to a locally-defined and locally-binding MIPS16
1610         function must be made indirectly, redirect the call to the
1611         function's local alias.  Use mips16_stub_function_p,
1612         mips16_stub_function, mips_expand_call and use_reg.
1613         Set SYMBOL_FLAG_BIND_NOW on __mips_call_* symbols.
1614         Use explicit %hi and %lo accesses where possible.
1615         Use MIPS_CALL to generate the correct code form of a
1616         jal instruction.  Add clobbers of $18 instead of uses.
1617         Update the call to mips_emit_call_insn.
1618         (mips_expand_call): Replace the SIBCALL_P argument with a
1619         mips_call_type argument and handle the new MIPS_CALL_EPILOGUE value.
1620         Take a LAZY_P parameter.  Call mips16_build_call_stub first,
1621         allowing it to modify the call address.  Update the calls to
1622         mips_load_call_address and mips_emit_call_insn.
1623         (mips_split_call): New function.
1624         (mips_init_relocs): Clear mips_split_hi_p.  Only use %gp_rel if
1625         !TARGET_MIPS16.  Split SYMBOL_GOT_DISP, and the high parts of
1626         SYMBOL_GOT_PAGE_OFST, for MIPS16 code.
1627         (mips_global_pointer): Check mips16_cfun_returns_in_fpr_p.
1628         (mips_extra_live_on_entry): Include MIPS16_PIC_TEMP_REGNUM
1629         if TARGET_MIPS16.
1630         (mips_cprestore_slot): New function.
1631         (mips_restore_gp): Take a TEMP parameter.  Handle TARGET_MIPS16
1632         and use mips_cprestore_slot.
1633         (mips_output_function_prologue): Handle TARGET_MIPS16 for
1634         LOADGP_OLDABI.
1635         (mips_emit_loadgp): Move into MIPS16_PIC_TEMP for MIPS16,
1636         then use a copygp_mips16 instruction to set up $28.
1637         (mips_expand_prologue): Initialize the cprestore slot for MIPS16 too.
1638         (mips16_lay_out_constants): Call split_all_insns_noflow.
1639         (mips_reorg_process_insns): Explicitly set all_noreorder_p to
1640         false if TARGET_MIPS16.
1641         (mips_reorg): Don't call vr4130_align_insns if TARGET_MIPS16.
1642         (mips_output_mi_thunk): Use mips_got_symbol_type_p.  Use the
1643         mips_dangerous_for_la25_p approach for MIPS16 PIC calls too.
1644         (mips_set_mips16_mode): Always set MASK_EXPLICIT_RELOCS for
1645         MIPS16 code.  Allow MIPS16 o32 PIC.
1646         (mips_override_options): Allow MIPS16 o32 PIC.
1647         * config/mips/mips.md: Lower CONST_GP_P moves into register moves
1648         after reload if TARGET_USE_GOT.
1649         (UNSPEC_COPYGP): New constant.
1650         (length): Use a default length of 8 for MIPS16 GOT loads.
1651         (*got_disp<mode>): Check mips_split_p instead of TARGET_XGOT.
1652         (*got_page<mode>): Check mips_split_hi_p.
1653         (*got_disp<mode>, *got_page<mode>): Use mips_got_load.
1654         (unspec_got<mode>, unspec_call<mode>): New expanders.
1655         (load_got<mode>, load_call<mode>): Remove the length attributes.
1656         Use a got attribute instead of a type attribute.
1657         (copygp_mips16): New insn.
1658         (restore_gp): Add a scratch clobber and pass it to mips_restore_gp.
1659         (load_call<mode>): Use a "d" constraint instead of an "r" constraint.
1660         (sibcall, sibcall_value, call, call_value): Update the calls
1661         to mips_expand_call.
1662         (call_internal, call_value_internal): Use mips_split_call.
1663         (call_value_multiple_internal): Likewise.
1664         (call_split): Move after call_internal (the insn it is split from).
1665         (call_internal_direct, call_value_internal_direct): Turn into
1666         define_insn_and_splits.  Split if TARGET_SPLIT_CALLS.
1667         (call_direct_split, call_value_direct_split): New patterns.
1668         * config/mips/constraints.md (c): Handle TARGET_MIPS16 first
1669         and use M16_REGS instead of M16_NA_REGS.
1670         * config/mips/predicates.md (const_call_insn_operand): Replace
1671         the TARGET_ABSOLUTE_ABICALLS-based check with a more general
1672         mips_use_pic_fn_addr_reg_p check.
1673         (move_operand): Reject HIGHs if mips_split_hi_p.
1674         * config/mips/mips16.S: Assembly as empty if the ABI is not suitable.
1675         (__mips16_floatunsisf): Inline __mips16_floatsisf.
1676         (CALL_STUB_NO_RET, CALL_STUB_REG): Copy the target register to $25.
1677         * config/mips/libgcc-mips16.ver: New file.
1678         * config/mips/t-libgcc-mips16 (SHLIB_MAPFILES): Add
1679         $(srcdir)/config/mips/libgcc-mips16.ver.
1680
1681 2008-08-09  Richard Sandiford  <rdsandiford@googlemail.com>
1682
1683         * config/mips/mips.c (mips_unspec_address_offset): Move earlier in file.
1684         (mips_unspec_address, mips_unspec_offset_high): Likewise.
1685         (mips_ok_for_lazy_binding_p, mips_load_call_address): Likewise.
1686         (mips16_cfun_returns_in_fpr_p): Likewise.
1687
1688 2008-08-09  Richard Sandiford  <rdsandiford@googlemail.com>
1689
1690         * config/mips/mips.h (MASK_RETURN_ADDR): Expand commentary.
1691         * config/mips/linux-unwind.h (mips_fallback_frame_state): Add 2
1692         rather than 4 to PC.
1693
1694 2008-08-09  Richard Sandiford  <rdsandiford@googlemail.com>
1695
1696         * config/mips/mips.h (STATIC_CHAIN_REGNUM): Remap to $15.
1697         (FUNCTION_PROFILER): Save the static chain pointer into $2
1698         beforehand and restore it aftewards.
1699         (TRAMPOLINE_TEMPLATE): Adjust accordingly.  Load the target
1700         address directly into $25 and call the function through $25;
1701         do not clobber $3.  Pad the DImode version to cover the space
1702         left by the deleted $25 <- $3 move.
1703         (TRAMPOLINE_SIZE): Adjust the size of the SImode version after
1704         the removal of the $25 <- $3 move.
1705         (INITIALIZE_TRAMPOLINE): Update offsets accordingly.
1706         * config/mips/sdemtk.h (FUNCTION_PROFILER): As for mips.h.
1707
1708 2008-08-09  Richard Sandiford  <rdsandiford@googlemail.com>
1709             Daniel Jacobowitz  <dan@codesourcery.com>
1710
1711         * config/mips/mips.h (FUNCTION_NAME_ALREADY_DECLARED): Delete.
1712         * config/mips/linux.h (ASM_DECLARE_FUNCTION_NAME): Delete.
1713         (ASM_DECLARE_FUNCTION_SIZE, FUNCTION_NAME_ALREADY_DECLARED): Delete.
1714         * config/mips/mips.c (mips_start_function_definition): New function.
1715         (mips_end_function_definition): Likewise.
1716         (mips_output_function_prologue): Use mips_start_function_definition.
1717         (mips_output_function_epilogue): Use mips_end_function_definition.
1718         (build_mips16_function_stub): Use mips_start_function_definition
1719         and mips_end_function_definition.
1720         (build_mips16_call_stub): Likewise.
1721
1722 2008-08-09  Richard Guenther  <rguenther@suse.de>
1723
1724         * gimple.c (gimple_build_call_1): Deal with FUNCTION_DECL fn.
1725         * gimple.h (gimple_call_fn): Adjust comment.
1726         (gimple_call_set_fndecl): New function.
1727         (gimple_call_fndecl): Adjust for GIMPLE_CALL no
1728         longer having bare FUNCTION_DECL operand.
1729         (gimple_call_return_type): Likewise.
1730         * tree-cfg.c (verify_stmt): Verify function operand of a GIMPLE_CALL.
1731
1732         * value-prof.c (gimple_divmod_fixed_value): Do not emit labels.
1733         (gimple_mod_pow2): Likewise.
1734         (gimple_mod_subtract): Likewise.
1735         (gimple_ic): Likewise.
1736         (gimple_stringop_fixed_value): Likewise.
1737         (gimple_indirect_call_to_profile): Fix for GIMPLE_CALL no
1738         longer having bare FUNCTION_DECL operand.
1739         * ipa-cp.c (ipcp_update_callgraph): Use gimple_call_set_fndecl.
1740         * omp-low.c (optimize_omp_library_calls): Likewise.
1741         * cgraphunit.c (update_call_expr): Likewise.
1742         * tree-ssa-math-opts.c (execute_cse_reciprocals): Likewise.
1743         (execute_convert_to_rsqrt): Likewise.
1744         * cfgexpand.c (gimple_to_tree): Simplify.
1745         (release_stmt_tree): Fix for GIMPLE_CALL no longer having
1746         bare FUNCTION_DECL operand.
1747         * tree-nested.c (init_tmp_var_with_call): Use gimple_call_return_type.
1748         (convert_gimple_call): Use gimple_call_fndecl.
1749         * c-common.c (c_warn_unused_result): Likewise.
1750
1751 2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1752
1753         PR c/17880
1754         * c-typeck.c (digest_init): Call verify_sequence_points from here.
1755         (c_finish_return): Likewise.
1756         (c_start_case): Likewise.
1757         * c-common.c (warn_for_collisions_1): Use explicit location in
1758         warning.
1759         * c-parser.c (c_parser_condition): New. Call
1760         verify_sequence_points.
1761         (c_parser_paren_condition): Call c_parser_condition.
1762         (c_parser_for_statement): Call c_parser_condition.
1763
1764 2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1765
1766         PR 36901
1767         * diagnostic.def (DK_PEDWARN, DK_PERMERROR): New.  
1768         * diagnostic.c (pedantic_warning_kind, permissive_error_kind):
1769         Moved from diagnostic.h
1770         (diagnostic_report_diagnostic): Return bool. Handle DK_PEDWARN and
1771         DK_PERMERROR.
1772         (emit_diagnostic): New.
1773         (warning0, pedwarn0): Delete.
1774         (warning, warning_at, pedwarn, permerror): Return bool.  
1775         * diagnostic.h (pedantic_warning_kind, permissive_error_kind):
1776         Moved to diagnostic.c.
1777         (struct diagnostic_context): Use correct type for
1778         classify_diagnostic.
1779         (diagnostic_report_diagnostic): Update declaration.
1780         (emit_diagnostic): Declare.
1781         * errors.c (warning): Return bool.  
1782         * errors.h (warning): Update declaration.
1783         * toplev.h (warning0, pedwarn0): Delete.
1784         (warning, warning_at, pedwarn, permerror): Return bool.
1785         * c-errors.c (pedwarn_c99, pedwarn_c90): Use DK_PEDWARN.
1786         * c-decl.c (locate_old_decl): Delete 'diag' argument. Always use
1787         inform. Update all calls.
1788         (diagnose_mismatched_decls): Check return value of warning/pedwarn
1789         before giving informative note.
1790         (implicit_decl_warning): Likewise.  
1791         * c-typeck.c (build_function_call): Likewise.  
1792         * tree-sssa.c (warn_uninit): Likewise.  
1793         * builtins.c (gimplify_va_arg_expr): Likewise.
1794
1795 2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1796
1797         PR 7651
1798         * doc/invoke.texi (-Wextra): Move warning from here...
1799         (-Wuninitialized): ... to here.
1800         
1801 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1802
1803         PR 28875
1804         * flags.h (set_Wunused): Delete
1805         * toplev.c (process_options): Handle Wunused flags here.
1806         * opts.c (maybe_warn_unused_parameter): Delete.
1807         (common_handle_option): Replace set_Wunused by warn_unused.
1808         (set_Wextra): Do not handle Wunused-parameter here.
1809         (set_Wunused): Delete.
1810         * c-opts.c (c_common_handle_option): Replace set_Wunused by
1811         warn_unused.
1812         * common.opt (Wunused): Add Var and Init.
1813         (Wunused-function): Likewise.
1814         (Wunused-label): Likewise.
1815         (Wunused-parameter): Likewise.
1816         (Wunused-value): Likewise.
1817         (Wunused-variable): Likewise.
1818         
1819 2008-08-08  Peter Bergner  <bergner@vnet.ibm.com>
1820
1821         * doc/invoke.texi: Add cpu_type power7.
1822         * config.in (HAVE_AS_VSX): New.
1823         * config.gcc: Add cpu_type power7.
1824         * configure.ac (HAVE_AS_VSX): Check for assembler support of the
1825         VSX instructions.
1826         * configure: Regenerate.
1827         * config/rs6000/rs6000.c (rs6000_override_options): Alias power7 to
1828         power5.
1829         * config/rs6000/rs6000.h (ASM_CPU_POWER7_SPEC): Define.
1830         (ASM_CPU_SPEC): Pass %(asm_cpu_power7) for -mcpu=power7.
1831         (EXTRA_SPECS): Add asm_cpu_power7 spec string.
1832
1833 2008-08-08  Dorit Nuzman  <dorit@il.ibm.com>
1834
1835         * tree-vect-transform.c (vectorizable_conversion): Pass the integral
1836         type to vectorize.builtin_conversion.
1837         (vectorizable_conversion): Likewise.
1838         * config/i386/i386.c (ix86_vectorize_builtin_conversion): Always takes
1839         integral type as input.
1840         * config/rs6000/rs6000.c (rs6000_builtin_conversion): Add case for
1841         FIX_TRUNC_EXPR.
1842         (rs6000_expand_builtin): Add case for ALTIVEC_BUILTIN_VCTUXS
1843         and ALTIVEC_BUILTIN_VCTSXS.
1844         (rs6000_builtin_mul_widen_even. rs6000_builtin_mul_widen_odd): Fix
1845         formatting. 
1846
1847 2008-08-08  Richard Guenther  <rguenther@suse.de>
1848
1849         * tree-ssa-ccp.c (likely_value): Calls are not all varying.
1850         (surely_varying_stmt_p): Calls are varying only if they are
1851         non-builtin and not indirect or have no result.
1852         (ccp_fold): Re-instantiate code before the tuples merge.
1853
1854 2008-08-08  Richard Guenther  <rguenther@suse.de>
1855
1856         PR tree-optimization/37056
1857         * gimple.h (gimple_assign_rhs_class): New helper function.
1858         * tree-ssa-loop-niter.c (get_val_for): Fix tuplification, handle
1859         unary operations properly.
1860
1861 2008-08-07  Jan Hubicka  <jh@suse.cz>
1862
1863         * i386.h (ix86_size_cost): Declare.
1864         (ix86_cur_cost): New function macro.
1865         * i386.md (peepholes expanding size and splitters): Predicate by
1866         optimize_insn_for_speed_p.
1867         (peepholes reduce size and splitters): Predicate by
1868         optimize_insn_for_size_p.
1869         * i386.c (ix86_size_cost): Rename from ...
1870         (size_cost): This one.
1871         (override_options): Update.
1872         (decide_alg): Likewise.
1873         (ix86_expand_clear): Use RTL profile.
1874         (ix86_pad_returns): Use RTL profile.
1875
1876 2008-08-07  Jan Hubicka  <jh@suse.cz>
1877
1878         * recog.c (split_all_insns): Set RTL profile
1879         (peephole2_optimize): Likewise.
1880         * function.c (thread_prologue_and_epilogue_insns): Likewise.
1881         * combine.c (combine_instructions): Likewise.
1882
1883 2008-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1884
1885         * c-common.c (c_common_reswords): Also warn about keyword "bool".
1886
1887 2008-08-07  Bob Wilson  <bob.wilson@acm.org>
1888         
1889         * config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Copy incoming
1890         value in a6 after the set_frame_ptr insn.
1891         
1892 2008-08-07  Richard Henderson  <rth@redhat.com>
1893
1894         PR debug/37033
1895         * gcc.c (cpp_options): Pass along -g*.
1896
1897 2008-08-07  Joseph Myers  <joseph@codesourcery.com>
1898
1899         * config/arm/arm.c (output_move_neon): Update comment describing
1900         big-endian vector layout.
1901         (arm_assemble_integer): Do not handle big-endian NEON vectors
1902         specially.
1903         * config/arm/neon.md (vec_set<mode>_internal, vec_extract<mode>,
1904         neon_vget_lane<mode>_sext_internal,
1905         neon_vget_lane<mode>_zext_internal, neon_vget_lane<mode>): Adjust
1906         element indices for big-endian.
1907
1908 2008-08-07  Richard Henderson  <rth@redhat.com>
1909
1910         * configure.ac (HAVE_GAS_CFI_PERSONALITY_DIRECTIVE): New.
1911         * configure, config.in: Rebuild.
1912         * debug.h (dwarf2out_do_cfi_asm): Declare.
1913         * c-cppbuiltin.c (c_cpp_builtins): Use it.
1914         * dwarf2out.c (dwarf2out_do_cfi_asm): New.
1915         (dwarf2out_cfi_label, add_fde_cfi, output_call_frame_info,
1916         dwarf2out_begin_prologue, dwarf2out_end_epilogue): Use it.
1917
1918 2008-08-07  Joseph Myers  <joseph@codesourcery.com>
1919
1920         * config/arm/iwmmxt.md (movv8qi_internal, movv4hi_internal,
1921         movv2si_internal): Combine into mov<mode>_internal.
1922         (movv2si_internal_2): Remove.
1923
1924 2008-08-07  Jan Hubicka  <jh@suse.cz>
1925
1926         PR target/37048
1927         * i386.md (single stringop patterns): Enable unconditionally. 
1928
1929 2008-08-07  H.J. Lu  <hongjiu.lu@intel.com>
1930
1931         PR target/36992
1932         * config/i386/emmintrin.h (_mm_move_epi64): Use
1933         __builtin_ia32_movq128.
1934
1935         * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_MOVQ128.
1936         (bdesc_args): Add IX86_BUILTIN_MOVQ128.
1937
1938         * config/i386/sse.md (sse2_movq128): New.
1939
1940         * doc/extend.texi: Document __builtin_ia32_movq128.
1941
1942 2008-08-07  Richard Guenther  <rguenther@suse.de>
1943
1944         PR middle-end/37042
1945         * tree-ssa-alias-warnings.c (nonstandard_alias_p): Ref-all
1946         pointers can access anything.
1947
1948 2008-08-06  Jan Hubicka  <jh@suse.cz>
1949
1950         * optabs.c (emit_unop_insn): Break out to ...
1951         (maybe_emit_unop_insn): ... this one.
1952         (expand_sfix_optab): Use maybe variant.
1953         * optabs.h (maybe_emit_unop_insn): Declare.
1954
1955         * i386.md (mov0 patterns): Enable by default.
1956         (FP conversion expanders): Disable expansion of code expanding
1957         sequences when instruction should be optimized for size.
1958         (single strinop patterns): Enable when optimizing for size.
1959         (string expanders): Disable expanding of code expanding sequences
1960         when optimizning instruction for size.
1961         * i386.c (ix86_expand_vector_move_misalign): Do code size optimization
1962         per BB basis.
1963         (ix86_fp_comparison_sahf_cost): Likewise.
1964         (ix86_expand_branch): Likewise.
1965         (ix86_expand_ashl_const): Likewise.
1966         (ix86_split_ashl): Likewise.
1967         (ix86_expand_strlen): Likewise.
1968         (ix86_emit_fp_unordered_jump): Likewie.
1969
1970 2008-08-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1971
1972         * c-common.c: Fix typo.
1973         (c_common_reswords): Activate more C++ keyword warnings.
1974
1975         * matrix-reorg.c (compute_offset): Avoid C++ keywords.
1976
1977 2008-08-06  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1978
1979         PR 26785
1980         * diagnostic.c (permerror_at): New.
1981         * toplev.h (permerror_at): Declare.
1982         
1983 2008-08-06  Victor Kaplansky  <victork@il.ibm.com>
1984             Ira Rosen  <irar@il.ibm.com>
1985
1986         * tree-vect-transform.c (vect_model_simple_cost): Return
1987         immediately if stmt is pure SLP.
1988         (vect_model_store_cost): Ditto.
1989         (vect_model_load_cost): Ditto.
1990         (vectorizable_store): Remove PURE_SLP check before call
1991         to vect_model_store_cost.
1992         (vect_model_store_cost): When checking whether stmt describe
1993         strided access, add a check that it is not slp_node.
1994
1995 2008-08-06  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1996
1997         PR 8715
1998         * c-common.c (warn_for_sign_compare): New. Handle separately the
1999         case that 'constant' is zero.
2000         * c-typeck.c (build_binary_op): Move code to c-common.c
2001         
2002 2008-08-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2003
2004         * config/alpha/alpha.c (alpha_preferred_reload_class,
2005         alpha_secondary_reload, alpha_emit_set_const_1, function_value,
2006         alpha_output_mi_thunk_osf): Avoid C++ keywords.
2007         * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise.
2008         * config/arm/arm.md: Likewise.
2009         * config/avr/avr-protos.h (preferred_reload_class,
2010         test_hard_reg_class, avr_simplify_comparison_p,
2011         out_shift_with_cnt, class_max_nregs): Likewise.
2012         * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p,
2013         output_movqi, output_movhi, output_movsisf, out_shift_with_cnt,
2014         preferred_reload_class, test_hard_reg_class): Likewise.
2015         * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok,
2016         bfin_memory_move_cost, bfin_secondary_reload,
2017         bfin_output_mi_thunk): Likewise.
2018         * config/crx/crx.c (crx_secondary_reload_class,
2019         crx_memory_move_cost): Likewise.
2020         * config/frv/frv-protos.h (frv_secondary_reload_class,
2021         frv_class_likely_spilled_p, frv_class_max_nregs): Likewise.
2022         * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg,
2023         frv_secondary_reload_class, frv_class_likely_spilled_p,
2024         frv_class_max_nregs): Likewise.
2025         * config/h8300/h8300.c (h8300_classify_operand,
2026         h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count):
2027         Likewise.
2028         * config/i386/winnt.c (i386_pe_declare_function_type): Likewise.
2029         * config/ia64/ia64.c (ia64_preferred_reload_class,
2030         ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise.
2031         * config/iq2000/iq2000.c (gen_int_relational): Likewise.
2032         * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare):
2033         Likewise.
2034         * config/m68hc11/m68hc11.c (preferred_reload_class,
2035         m68hc11_memory_move_cost): Likewise.
2036         * config/mcore/mcore.c (mcore_secondary_reload_class,
2037         mcore_reload_class): Likewise.
2038         * config/mips/mips.c (mips_hard_regno_mode_ok_p,
2039         mips_class_max_nregs, mips_cannot_change_mode_class,
2040         mips_preferred_reload_class, mips_secondary_reload_class,
2041         mips_output_mi_thunk): Likewise.
2042         * config/mmix/mmix.c (mmix_preferred_reload_class,
2043         mmix_preferred_output_reload_class, mmix_secondary_reload_class):
2044         Likewise.
2045         * config/mn10300/mn10300.c (mn10300_secondary_reload_class):
2046         Likewise.
2047         * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions,
2048         pa_can_combine_p, pa_cannot_change_mode_class): Likewise.
2049         * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise.
2050         * config/rs6000/rs6000.c (paired_expand_vector_init,
2051         rs6000_secondary_reload_class, rs6000_output_mi_thunk,
2052         compare_section_name, rs6000_memory_move_cost): Likewise.
2053         * config/s390/s390.c (s390_emit_compare_and_swap,
2054         s390_preferred_reload_class, s390_secondary_reload,
2055         legitimize_pic_address, legitimize_tls_address,
2056         legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic,
2057         s390_class_max_nregs): Likewise.
2058         * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise.
2059         * config/s390/s390.md: Likewise.
2060         * config/score/score-protos.h (score_secondary_reload_class,
2061         score_preferred_reload_class): Likewise.
2062         * config/score/score.c (score_preferred_reload_class,
2063         score_secondary_reload_class): Likewise.
2064         * config/score/score3.c (score3_output_mi_thunk,
2065         score3_preferred_reload_class, score3_secondary_reload_class,
2066         score3_hard_regno_mode_ok): Likewise.
2067         * config/score/score3.h (score3_preferred_reload_class,
2068         score3_secondary_reload_class): Likewise.
2069         * config/score/score7.c (score7_output_mi_thunk,
2070         score7_preferred_reload_class, score7_secondary_reload_class,
2071         score7_hard_regno_mode_ok): Likewise.
2072         * config/score/score7.h (score7_preferred_reload_class,
2073         score7_secondary_reload_class): Likewise.
2074         * config/sh/sh.c (prepare_move_operands, output_far_jump,
2075         output_branchy_insn, add_constant, gen_block_redirect,
2076         sh_insn_length_adjustment, sh_cannot_change_mode_class,
2077         sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload):
2078         Likewise.
2079         * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
2080         * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi,
2081         xstormy16_output_cbranch_si, xstormy16_secondary_reload_class,
2082         xstormy16_preferred_reload_class): Likewise.
2083         * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap,
2084         xtensa_expand_atomic, override_options,
2085         xtensa_preferred_reload_class, xtensa_secondary_reload_class):
2086         Likewise.
2087         * reorg.c (try_merge_delay_insns): Likewise.
2088         * tree.c (merge_dllimport_decl_attributes): Likewise.
2089
2090         * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA.
2091
2092 2008-08-06  Michael Matz  <matz@suse.de>
2093
2094         * Makefile.in (write_entries_to_file): Quote words.
2095         * gengtype.c: (read_input_line): Skip over leading white-space.
2096
2097 2008-08-06  Marc Gauthier  <marc@tensilica.com>
2098
2099         * config.gcc: Match more processor names for Xtensa.
2100         * configure.ac: Likewise.
2101         * doc/install.texi (Specific): Likewise.
2102         * configure: Regenerate.
2103
2104 2008-08-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2105
2106         * builtins.c (expand_builtin_profile_func): Avoid C++ keywords.
2107         * calls.c (avoid_likely_spilled_reg): Likewise.
2108         * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise.
2109         * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise.
2110         * config/i386/i386.c (ix86_expand_special_args_builtin,
2111         ix86_secondary_reload): Likewise.
2112         * except.c (struct eh_region, gen_eh_region_catch,
2113         remove_unreachable_regions, duplicate_eh_regions,
2114         assign_filter_values, build_post_landing_pads,
2115         sjlj_find_directly_reachable_regions, remove_eh_handler,
2116         reachable_next_level, foreach_reachable_handler,
2117         can_throw_internal_1, can_throw_external_1,
2118         collect_one_action_chain): Likewise.
2119         * expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise.
2120         * fold-const.c (twoval_comparison_p, eval_subst): Likewise.
2121         * function.c (update_temp_slot_address, instantiate_new_reg,
2122         instantiate_virtual_regs_in_rtx,
2123         instantiate_virtual_regs_in_insn): Likewise.
2124         * gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise.
2125         * gimplify.c (gimplify_call_expr, gimplify_init_constructor,
2126         gimplify_cleanup_point_expr): Likewise.
2127         * ipa-cp.c (ipcp_lattice_changed): Likewise.
2128         * passes.c (next_pass_1): Likewise.
2129         * print-tree.c (print_node_brief, print_node): Likewise.
2130         * profile.c (branch_prob): Likewise.
2131         * tree-dump.c (dump_register): Likewise.
2132         * tree-eh.c (replace_goto_queue_cond_clause, lower_catch):
2133         Likewise.
2134         * tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks,
2135         copy_statement_list, remap_gimple_op_r, copy_tree_body_r,
2136         copy_edges_for_bb, copy_cfg_body, copy_tree_r,
2137         copy_arguments_for_versioning, copy_static_chain): Likewise.
2138         * tree-into-ssa.c (names_replaced_by, add_to_repl_tbl,
2139         add_new_name_mapping, register_new_name_mapping): Likewise.
2140         * tree-mudflap.c (mf_xform_derefs): Likewise.
2141         * tree-predcom.c (struct chain, dump_chain, replace_ref_with,
2142         get_init_expr, combine_chains): Likewise.
2143         * tree-pretty-print.c (dump_generic_node): Likewise.
2144         * tree-ssa-structalias.c (create_variable_info_for): Likewise.
2145         * tree-vrp.c (simplify_cond_using_ranges): Likewise.
2146         * tree.c (substitute_in_expr, iterative_hash_expr): Likewise.
2147         * value-prof.c (gimple_duplicate_stmt_histograms): Likewise.
2148
2149 2008-08-06  H.J. Lu  <hongjiu.lu@intel.com>
2150
2151         PR middle-end/37010
2152         * calls.c (expand_call): Use the biggest preferred stack
2153         boundary.
2154
2155 2008-08-06  Michael Matz  <matz@suse.de>
2156
2157         PR target/36613
2158         * reload.c (push_reload): Merge in,out,in_reg,out_reg members
2159         for reused reload, instead of overwriting them.
2160
2161 2008-08-06  H.J. Lu  <hongjiu.lu@intel.com>
2162
2163         PR middle-end/37009
2164         * cfgexpand.c (expand_stack_alignment): Check parm_stack_boundary
2165         for incoming stack boundary.
2166
2167         * function.c (assign_parm_find_entry_rtl): Update
2168         parm_stack_boundary.
2169
2170         * function.h (rtl_data): Add parm_stack_boundary.
2171
2172         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Check
2173         parm_stack_boundary for incoming stack boundary.
2174
2175 2008-08-06  Joseph Myers  <joseph@codesourcery.com>
2176
2177         * jump.c (rtx_renumbered_equal_p): Do not call subreg_regno_offset
2178         for unrepresentable subregs or treat them as equal to other regs
2179         or subregs with the same register number.
2180
2181 2008-08-06  Aldy Hernandez  <aldyh@redhat.com>
2182
2183         PR middle-end/35432
2184         * gimplify.c (gimplify_modify_expr): Do not optimize zero-sized types
2185         if want_value.
2186
2187 2008-08-06  Jan Hubicka  <jh@suse.cz>
2188
2189         * predict.c (maybe_hot_frequency_p): When profile is absent, all
2190         frequencies might be hot.
2191
2192 2008-08-06  Andreas Krebbel  <krebbel1@de.ibm.com>
2193
2194         * reload.c (find_reloads): Force constants into literal pool
2195         also if they are wrapped in a SUBREG.
2196
2197 2008-08-06  Maxim Kuvyrkov  <maxim@codesourcery.com>
2198
2199         PR target/35659
2200         * haifa-sched.c (sched_insn_is_legitimate_for_speculation_p): Move ...
2201         * sched-deps.c (sched_insn_is_legitimate_for_speculation_p): ... here.
2202         Don't allow predicated instructions for data speculation.
2203         * sched-int.h (sched_insn_is_legitimate_for_speculation_p): Move
2204         declaration.
2205
2206 2008-08-06  Maxim Kuvyrkov  <maxim@codesourcery.com>
2207
2208         * haifa-sched.c (extend_global): Split to extend_global_data and
2209         extend_region_data.  Update all uses.
2210         (extend_all): Rename to extend_block_data.
2211
2212 2008-08-06  Maxim Kuvyrkov  <maxim@codesourcery.com>
2213
2214         * sched-rgn.c (new_ready): Check if instruction can be
2215         speculatively scheduled before attempting speculation.
2216         (debug_rgn_dependencies): Remove wrongful assert.
2217
2218 2008-08-05  Bob Wilson  <bob.wilson@acm.org>
2219
2220         * config/xtensa/t-xtensa: Remove dependency for gt-xtensa.h.
2221         
2222 2008-08-05  Bob Wilson  <bob.wilson@acm.org>
2223         
2224         * config/xtensa/xtensa.c (xtensa_va_start): Unshare valist.
2225         (xtensa_gimplify_va_arg_expr): Unshare valist, orig_ndx, ndx, array,
2226         va_size, and type_size.
2227         
2228 2008-08-04  Jason Merrill  <jason@redhat.com>
2229
2230         PR c++/37016
2231         * tree-ssa.c (useless_type_conversion_p_1): Call langhook
2232         if TYPE_STRUCTURAL_EQUALITY_P is true for both types.
2233
2234 2008-08-05  Richard Henderson  <rth@redhat.com>
2235
2236         * configure.ac (HAVE_GAS_CFI_DIRECTIVE): Check .cfi_personality.
2237         * configure: Rebuild.
2238
2239 2008-08-05  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2240
2241         PR tree-opt/37024
2242         * tree-tailcall.c (process_assignment): Use gimple_assign_cast_p
2243         instead of IS_CONVERT_EXPR_CODE_P for seeing if the assignment
2244         is a conversion.
2245
2246 2008-08-05  Richard Henderson  <rth@redhat.com>
2247
2248         * Makefile.in (c-cppbuiltin.o): Depend on debug.h.
2249         * c-cppbuiltin.c (c_cpp_builtins): Define __GCC_HAVE_DWARF2_CFI_ASM.
2250         * doc/cpp.texi (__GCC_HAVE_DWARF2_CFI_ASM): Document it.
2251         * common.opt (fdwarf2-cfi-asm): New.
2252         * configure.ac (HAVE_GAS_CFI_DIRECTIVE): New.
2253         * config.in, configure: Rebuild.
2254         * dwarf2asm.c (dw2_asm_output_data_raw): New.
2255         (dw2_asm_output_data_uleb128_raw, dw2_asm_output_data_sleb128_raw): New.
2256         (dw2_force_const_mem): Externalize.
2257         * dwarf2asm.h: Update.
2258         * dwarf2out.c (dwarf2out_cfi_label): If flag_dwarf2_cfi_asm, don't
2259         generate a real label.
2260         (output_cfi_directive): New.
2261         (add_fde_cfi): If flag_dwarf2_cfi_asm, use it.
2262         (output_call_frame_info): Do nothing if flag_dwarf2_cfi_asm.
2263         (dwarf2out_begin_prologue): Emit .cfi_startproc, .cfi_personality,
2264         and .cfi_lsda.
2265         (dwarf2out_end_epilogue): Emit .cfi_endproc.
2266         (output_loc_operands_raw, output_loc_sequence_raw): New.
2267         (output_cfa_loc_raw): New.
2268         
2269 2008-08-05  Paul Brook  <paul@codesourcery.com>
2270
2271         * doc/invoke.texi: Document new ARM -mfpu= and -mcpu= options.
2272         * config/arm/arm.c (all_fpus): Add vfpv3 and vfpv3-d16.
2273         (fp_model_for_fpu): Add entry for FPUTYPE_VFP3D16.
2274         (arm_file_start): Add FPUTYPE_VFP3D16.  Rename vfp3 to vfpv3.
2275         * config/arm/arm.h (TARGET_VFPD32): Define.
2276         (TARGET_VFP3): Use TARGET_VFPD32.
2277         (fputype): Add FPUTYPE_VFP3D16.
2278         (LAST_VFP_REGNUM): Use TARGET_VFPD32.
2279         * config/arm/constraints.md ("w"): Use TARGET_VFPD32.
2280         * config/arm/arm-cores.def: Add cortex-r4f.
2281         * config/arm/arm-tune.md: Regenerate.
2282
2283 2008-08-05  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
2284
2285         * config/spu_spu_mfcio.h: Wrap in extern "C" if __cplusplus.
2286         Reword some comments throughout the file.
2287
2288         (MFC_MIN_DMA_LIST_ELEMENTS): New define.
2289         (MFC_MAX_DMA_LIST_ELEMENTS): Likewise.
2290         (MFC_MIN_DMA_LIST_SIZE): Redefine in terms of MFC_MIN_DMA_LIST_ELEMENTS.
2291         (MFC_MAX_DMA_LIST_SIZE): Redefine in terms of MFC_MAX_DMA_LIST_ELEMENTS.
2292
2293         (MFC_START_ENABLE): Remove PPU-only define.
2294         (MFC_PUTS_CMD, MFC_PUTFS_CMD, MFC_PUTBS_CMD): Likewise.
2295         (MFC_GETS_CMD, MFC_GETFS_CMD, MFC_GETBS_CMD): Likewise.
2296
2297         (MFC_PUTB_CMD, MFC_PUTF_CMD): Reimplement using symbolic constants.
2298         (MFC_PUTL_CMD, MFC_PUTLB_CMD, MFC_PUTLF_CMD): Likewise.
2299         (MFC_PUTR_CMD, MFC_PUTRB_CMD, MFC_PUTRF_CMD): Likewise.
2300         (MFC_PUTRL_CMD, MFC_PUTRLB_CMD, MFC_PUTRLF_CMD): Likewise.
2301         (MFC_GETB_CMD, MFC_GETF_CMD): Likewise.
2302         (MFC_GETL_CMD, MFC_GETLB_CMD, MFC_GETLF_CMD): Likewise.
2303         (MFC_SNDSIGB_CMD, MFC_SNDSIGF_CMD): Likewise.
2304
2305         (MFC_SDCRT_CMD, MFC_SDCRTST_CMD): New defines.
2306         (MFC_SDCRZ_CMD, MFC_SDCRST_CMD, MFC_SDCRF_CMD): Likewise.
2307         (mfc_sdcrt, mfc_sdcrtst): Likewise.
2308         (mfc_sdcrz, mfc_sdcrst, mfc_sdcrf): Likewise.
2309
2310         (spu_read_machine_status): Fix typo.
2311
2312 2008-08-05  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
2313
2314         * config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Allow (multi)word-sized
2315         SUBREG of multi-word hard register.
2316         * config/spu/spu.c (valid_subreg): Likewise.
2317         (adjust_operand): Handle SUBREGs of multi-word hard registers.
2318
2319 2008-08-04  Richard Guenther  <rguenther@suse.de>
2320
2321         * tree-ssa-loop-ivopts.c (add_iv_value_candidates): Also add
2322         the candidate with the stripped base if that base is different
2323         from the original base even for offset zero.
2324
2325 2008-08-04  Richard Guenther  <rguenther@suse.de>
2326
2327         PR middle-end/36691
2328         * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Correctly
2329         check for no_overflow.
2330
2331 2008-08-04  Richard Guenther  <rguenther@suse.de>
2332
2333         * tree-vect-transform.c (vectorizable_call): Fix tuplification.
2334
2335 2008-08-04  Paul Brook  <paul@codesourcery.com>
2336
2337         * cofig/arm/arm.c (thumb_core_reg_alloc_order): New.
2338         (arm_order_regs_for_local_alloc): New function.
2339         * config/arm/arm-protos.h (arm_order_regs_for_local_alloc): Add
2340         prototype.
2341         * config/arm/arm.h (ORDER_REGS_FOR_LOCAL_ALLOC): Define.
2342
2343 2008-08-04  H.J. Lu  <hongjiu.lu@intel.com>
2344
2345         PR target/37012
2346         * config/i386/i386.c (ix86_expand_prologue): Use UNITS_PER_WORD
2347         instead of STACK_BOUNDARY / BITS_PER_UNIT to align stack.
2348         (ix86_expand_epilogue): Likewise.
2349
2350 2008-08-04  H.J. Lu  <hongjiu.lu@intel.com>
2351
2352         * config/i386/i386.c (ix86_compute_frame_layout): Fix a typo
2353         in comments.
2354
2355 2008-08-03  Uros Bizjak  <ubizjak@gmail.com>
2356
2357         * config/i386/mmx.md (*mov<mode>_internal_rex64): Use Yi instead of x
2358         to avoid inter-unit moves for !TARGET_INTER_UNIT_MOVES.
2359         (*movv2sf_internal_rex64): Ditto.
2360
2361 2008-08-03  Jan Hubicka  <jh@suse.cz>
2362
2363         * optabs.c (expand_binop, expand_builtin_pow, expand_builtin_powi,
2364         expand_builtin_strcat): Upse optimize_insn_for_speed predicate.
2365         * expmed.c (expand_smod_pow2): Likewise.
2366
2367 2008-08-03  Uros Bizjak  <ubizjak@gmail.com>
2368
2369         PR target/36992
2370         * config/i386/sse.md (vec_concatv2di): Add Y2 constraint to
2371         alternative 0 of operand 1.
2372         (*vec_concatv2di_rex64_sse): Ditto.
2373         (*vec_concatv2di_rex64_sse4_1): Add x constraint to alternative 0
2374         of operand 1.
2375         (*sse2_storeq_rex64): Penalize allocation of "r" registers.
2376         * config/i386/mmx.md (*mov<mode>_internal_rex64): Penalize allocation
2377         of "Y2" registers to avoid SSE <-> MMX conversions for DImode moves.
2378         (*movv2sf_internal_rex64): Ditto.
2379
2380 2008-08-02  Richard Guenther  <rguenther@suse.de>
2381
2382         PR target/35252
2383         * config/i386/sse.md (SSEMODE4S, SSEMODE2D): New mode iterators.
2384         (ssedoublesizemode): New mode attribute.
2385         (sse_shufps): Call gen_sse_shufps_v4sf.
2386         (sse_shufps_1): Macroize.
2387         (sse2_shufpd): Call gen_Sse_shufpd_v2df.
2388         (sse2_shufpd_1): Macroize.
2389         (vec_extract_odd, vec_extract_even): New expanders.
2390         (vec_interleave_highv4sf, vec_interleave_lowv4sf,
2391         vec_interleave_highv2df, vec_interleave_lowv2df): Likewise.
2392         * i386.c (ix86_expand_vector_init_one_nonzero): Call
2393         gen_sse_shufps_v4sf instead of gen_sse_shufps_1.
2394         (ix86_expand_vector_set): Likewise.
2395         (ix86_expand_reduc_v4sf): Likewise.
2396
2397 2008-08-01  Doug Kwan  <dougkwan@google.com>
2398
2399         * matrix-reorg.c: Re-enable all code.
2400         (struct malloc_call_data): Change CALL_STMT to gimple type.
2401         (collect_data_for_malloc_call): Tuplify.
2402         (struct access_site_info): Change STMT to gimple type.
2403         (struct matrix_info): Change MIN_INDIRECT_LEVEL_ESCAPE_STMT,
2404         and MALLOC_FOR_LEVEL to gimple and gimple pointer type.
2405         (struct free_info): Change STMT to gimple type.
2406         (struct matrix_access_phi_node):  Change PHI to gimple type.
2407         (get_inner_of_cast_expr): Remove.
2408         (may_flatten_matrices_1): Tuplify.
2409         (may_flatten_matrices): Ditto.
2410         (mark_min_matrix_escape_level): Ditto.
2411         (ssa_accessed_in_tree): Refactor statement RHS related code into ...
2412         (ssa_accessed_in_call_rhs): New
2413         (ssa_accessed_in_assign_rhs): New
2414         (record_access_alloc_site_info): Tuplify.
2415         (add_allocation_site): Ditto.
2416         (analyze_matrix_allocation_site): Ditto.
2417         (analyze_transpose): Ditto.
2418         (get_index_from_offset): Ditto.
2419         (update_type_size): Ditto.
2420         (analyze_accesses_for_call_expr): Tuplify and renamed into ...
2421         (analyze_accesses_for_call_stmt): New. Also handle LHS of a call.
2422         (analyze_accesses_for_phi_node): Tuplify.
2423         (analyze_accesses_for_modify_stmt): Tuplify and renamed into ...
2424         (analyze_accesses_for_assign_stmt): Remove code for handling call LHS.
2425         (analyze_matrix_accesses): Tuplify.
2426         (check_var_data): New call-back type for check_var_notmodified_p.
2427         (check_var_notmodified_p): Tuplify and use call-back struct to
2428         return statement found.
2429         (can_calculate_expr_before_stmt): Factor out statement related code
2430         into ...
2431         (can_calculate_stmt_before_stmt): New.
2432         (check_allocation_function): Tuplify.
2433         (find_sites_in_func): Ditto.
2434         (record_all_accesses_in_func): Ditto.
2435         (transform_access_sites): Ditto.
2436         (transform_allocation_sites): Ditto.
2437         (matrix_reorg): Re-enable.
2438         (gate_matrix_reorg): Re-enable.
2439
2440 2008-08-01  Jakub Jelinek  <jakub@redhat.com>
2441
2442         * dwarf2out.c (compute_barrier_args_size): Set barrier_args_size
2443         for labels for which it hasn't been set yet.  If it has been set,
2444         stop walking insns and continue with next worklist item.
2445         (dwarf2out_stack_adjust): Don't call compute_barrier_args_size
2446         if the only BARRIER is at the very end of a function.
2447
2448 2008-08-01  H.J. Lu  <hongjiu.lu@intel.com>
2449
2450         * cfgexpand.c (expand_stack_alignment): Assert that
2451         stack_realign_drap and drap_rtx must match.
2452
2453         * function.c (instantiate_new_reg): If DRAP is used to realign
2454         stack, replace virtual_incoming_args_rtx with internal arg
2455         pointer.
2456
2457 2008-08-01  Richard Guenther  <rguenther@suse.de>
2458
2459         * tree-ssa-pre.c (fini_pre): Take in_fre parameter.  Free
2460         loop information only if we initialized it.
2461         (execute_pre): Call fini_pre with in_fre.
2462         * tree-ssa-loop-ivcanon (try_unroll_loop_completely): Dump
2463         if we do not unroll because we hit max-completely-peeled-insns.
2464         Use our estimation for consistency, do allow shrinking.
2465
2466 2008-08-01  H.J. Lu  <hongjiu.lu@intel.com>
2467
2468         * config/i386/i386.c (override_options): Replace ABI_STACK_BOUNDARY
2469         with MIN_STACK_BOUNDARY.
2470         (ix86_update_stack_boundary): Likewise.
2471         (ix86_expand_prologue): Assert MIN_STACK_BOUNDARY instead of
2472         STACK_BOUNDARY.
2473
2474         * config/i386/i386.h (ABI_STACK_BOUNDARY): Renamed to ...
2475         (MIN_STACK_BOUNDARY): This.
2476
2477 2008-08-01  Richard Guenther  <rguenther@suse.de>
2478
2479         PR middle-end/36997
2480         * gimplify.c (gimplify_call_expr): Set error_mark_node on GS_ERROR.
2481
2482 2008-08-01  Richard Guenther  <rguenther@suse.de>
2483
2484         PR tree-optimization/36988
2485         * tree-ssa-ccp.c (ccp_fold): Conversions of constants only
2486         do not matter if that doesn't change volatile qualification.
2487
2488 2008-08-01  Paolo Bonzini  <bonzini@gnu.org>
2489
2490         * configure.ac: Do not generate libada-mk.  Do not subst
2491         host_cc_for_libada.
2492         * libada-mk.in: Remove.
2493         * Makefile.in: Pass TARGET_LIBGCC2_CFLAGS to libgcc.mvars.
2494         * configure: Regenerate.
2495
2496 2008-08-01  Basile Starynkevitch  <basile@starynkevitch.net>
2497
2498         * tree-pass.h: Added comment about not dumping passes with name
2499         starting with star in struct opt_pass.
2500         * passes.c (register_dump_files_1): Don't do dump for a pass with
2501         name starting with star.
2502         * doc/passes.texi (Pass manager): Mention pass names and special
2503         meaning of star prefix to avoid dump.
2504
2505 2008-07-31  Adam Nemet  <anemet@caviumnetworks.com>
2506
2507         * config.gcc (mipsisa64r2*-*-linux*): New configuration.  Set ISA
2508         to MIPS64r2.
2509         * config/mips/mips.h (GENERATE_MIPS16E): Update comment.
2510         (ISA_MIPS64R2): New macro.
2511         (TARGET_CPU_CPP_BUILTINS, MULTILIB_ISA_DEFAULT): Handle it.
2512         (ISA_HAS_64BIT_REGS, ISA_HAS_MUL3, ISA_HAS_FP_CONDMOVE,
2513         ISA_HAS_8CC, ISA_HAS_FP4, ISA_HAS_PAIRED_SINGLE,
2514         ISA_HAS_MADD_MSUB, ISA_HAS_NMADD4_NMSUB4, ISA_HAS_CLZ_CLO,
2515         ISA_HAS_ROR, ISA_HAS_PREFETCH, ISA_HAS_PREFETCHX, ISA_HAS_SEB_SEH,
2516         ISA_HAS_EXT_INS, ISA_HAS_MXHC1, ISA_HAS_HILO_INTERLOCKS,
2517         ISA_HAS_SYNCI, MIN_FPRS_PER_FMT): Return true for ISA_MIPS64R2.
2518         (MIPS_ISA_LEVEL_SPEC, ASM_SPEC, LINK_SPEC): Handle -mips64r2.
2519         (TARGET_LOONGSON_2E, TARGET_LOONGSON_2F, TARGET_LOONGSON_2EF):
2520         Move up to keep list alphabetically sorted.
2521         (TUNE_20KC, TUNE_24K, TUNE_74K, TUNE_LOONGSON_2EF): Likewise.
2522         * config/mips/mips.c (mips_cpu_info_table): Add default MIPS64r2
2523         processor.
2524         * doc/invoke.texi (MIPS Options): Add -mips64r2.
2525         (-march=@var{arch}): Add mips64r2.
2526
2527 2008-07-31  H.J. Lu  <hongjiu.lu@intel.com>
2528
2529         * config/i386/darwin.h (MAIN_STACK_BOUNDARY): Define to 128.
2530
2531 2008-07-31  Steve Ellcey  <sje@cup.hp.com>
2532
2533         * expr.c (expand_assignment): Check for complete type.
2534
2535 2008-07-31  H.J. Lu  <hongjiu.lu@intel.com>
2536
2537         PR debug/36977
2538         * cfgexpand.c (expand_stack_alignment): Set stack_realign_tried.
2539
2540         * dwarf2out.c (based_loc_descr): Check crtl->stack_realign_tried
2541         for stack alignment.
2542
2543         * function.h (rtl_data): Add stack_realign_tried.  Update comments.
2544
2545 2008-07-31  Kaz Kojima  <kkojima@gcc.gnu.org>
2546
2547         * config/sh/sh.c (sh_canonical_va_list_type): Remove.
2548         (TARGET_CANONICAL_VA_LIST_TYPE): Remove.
2549
2550 2008-07-31  Jakub Jelinek  <jakub@redhat.com>
2551
2552         PR rtl-optimization/36419
2553         * dwarf2out.c (barrier_args_size): New variable.
2554         (compute_barrier_args_size, compute_barrier_args_size_1): New
2555         functions.
2556         (dwarf2out_stack_adjust): For BARRIERs call compute_barrier_args_size
2557         if not called yet in the current function, use barrier_args_size
2558         array to find the new args_size value.
2559         (dwarf2out_frame_debug): Free and clear barrier_args_size.
2560
2561 2008-07-31  H.J. Lu  <hongjiu.lu@intel.com>
2562
2563         PR debug/36980
2564         * dwarf2out.c (dwarf2out_frame_debug_expr): Move rule 17 before
2565         rule 19.
2566
2567 2008-07-31  H.J. Lu  <hongjiu.lu@intel.com>
2568
2569         PR debug/36976
2570         * dwarf2out.c (dwarf2out_args_size_adjust): New.
2571         (dwarf2out_stack_adjust): Use it.
2572         (dwarf2out_frame_debug_expr): Likewise.
2573
2574 2008-07-31  Richard Guenther  <rguenther@suse.de>
2575
2576         PR tree-optimization/36978
2577         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Do not fold
2578         the generated condition.
2579
2580 2008-07-31  Richard Guenther  <rguenther@suse.de>
2581
2582         * passes.c (init_optimization_passes): Always call
2583         pass_early_warn_uninitialized.
2584         * opts.c (decode_options): Do not warn about -Wuninitialized at -O0.
2585         * doc/invoke.texi (-Wuninitialized): Correct for enabling at -O0.
2586         * doc/passes.texi (Warn for uninitialized variables): Adjust.
2587
2588 2008-07-31  Jakub Jelinek  <jakub@redhat.com>
2589
2590         PR c/36970
2591         * builtins.c (maybe_emit_free_warning): New function.
2592         (expand_builtin): Process BUILT_IN_FREE even at -O0.  Call
2593         maybe_emit_free_warning for BUILT_IN_FREE.
2594
2595         PR debug/36278
2596         * dwarf2out.c (get_context_die): New function.
2597         (force_decl_die, force_type_die): Use it.
2598         (dwarf2out_imported_module_or_decl): Likewise.  If base_type_die
2599         returns NULL, force generation of DW_TAG_typedef and put that into
2600         DW_AT_import.
2601
2602         PR preprocessor/36649
2603         * c-pch.c (c_common_read_pch): Save and restore
2604         line_table->trace_includes across PCH restore.
2605
2606 2008-07-30  Eric Botcazou  <ebotcazou@adacore.com>
2607
2608         PR ada/36554
2609         * dwarf2out.c (is_subrange_type): Deal with BOOLEAN_TYPE.
2610
2611 2008-07-30  Rafael Avila de Espindola  <espindola@google.com>
2612
2613         PR 36974
2614         * final.c (call_from_call_insn): Handle COND_EXEC.
2615
2616 2008-07-30  H.J. Lu  <hongjiu.lu@intel.com>
2617
2618         * builtins.c (std_gimplify_va_arg_expr): Replace
2619         PREFERRED_STACK_BOUNDARY with MAX_SUPPORTED_STACK_ALIGNMENT.
2620         * config/i386/i386.c (ix86_gimplify_va_arg): Likewise.
2621
2622 2008-07-30  Joey Ye  <joey.ye@intel.com>
2623             H.J. Lu  <hongjiu.lu@intel.com>
2624
2625         * builtins.c (expand_builtin_setjmp_receiver): Replace
2626         virtual_incoming_args_rtx with crtl->args.internal_arg_pointer.
2627         (expand_builtin_apply_args_1): Likewise.
2628         (expand_builtin_longjmp): Need DRAP for stack alignment.
2629         (expand_builtin_apply): Likewise.
2630
2631         * caller-save.c (setup_save_areas): Call assign_stack_local_1
2632         instead of assign_stack_local to allow alignment reduction.
2633
2634         * calls.c (emit_call_1): Need DRAP for stack alignment if
2635         return pops.
2636         (expand_call): Replace virtual_incoming_args_rtx with
2637         crtl->args.internal_arg_pointer.
2638         * stmt.c (expand_nl_goto_receiver): Likewise.
2639
2640         * cfgexpand.c (get_decl_align_unit): Estimate stack variable
2641         alignment and store to stack_alignment_estimated and
2642         max_used_stack_slot_alignment.
2643         (expand_one_var): Likewise.
2644         (expand_stack_alignment): New function.
2645         (tree_expand_cfg): Initialize max_used_stack_slot_alignment
2646         and stack_alignment_estimated fields in rtl_data.  Call
2647         expand_stack_alignment at end.
2648
2649         * defaults.h (INCOMING_STACK_BOUNDARY): New.
2650         (MAX_STACK_ALIGNMENT): Likewise.
2651         (MAX_SUPPORTED_STACK_ALIGNMENT): Likewise.
2652         (SUPPORTS_STACK_ALIGNMENT): Likewise.
2653
2654         * emit-rtl.c (gen_reg_rtx): Estimate stack alignment for
2655         stack alignment when generating virtual registers.
2656
2657         * function.c (assign_stack_local): Renamed to ...
2658         (assign_stack_local_1): This.  Add a parameter to indicate
2659         if it is OK to reduce alignment.
2660         (assign_stack_local): Use it.
2661         (instantiate_new_reg): Instantiate virtual incoming args rtx
2662         to vDRAP if stack realignment and DRAP is needed.
2663         (assign_parms): Collect parameter/return type alignment and
2664         contribute to stack_alignment_estimated.
2665         (locate_and_pad_parm): Likewise.
2666         (get_arg_pointer_save_area): Replace virtual_incoming_args_rtx
2667         with crtl->args.internal_arg_pointer.
2668
2669         * function.h (rtl_data): Add new field drap_reg,
2670         max_used_stack_slot_alignment, stack_alignment_estimated,
2671         stack_realign_needed, need_drap, stack_realign_processed and
2672         stack_realign_finalized.
2673         (stack_realign_fp): New macro.
2674         (stack_realign_drap): Likewise.
2675
2676         * global.c (compute_regsets): Frame pointer is needed when
2677         stack is realigned.  Can eliminate frame pointer when stack is
2678         realigned and dynamic realigned argument pointer isn't used.
2679
2680         * reload1.c (update_eliminables):  Frame pointer is needed
2681         when stack is realigned.
2682         (init_elim_table): Can eliminate frame pointer when stack is
2683         realigned and dynamic realigned argument pointer isn't used.
2684
2685         * rtl.h (assign_stack_local_1): Declare new funtion.
2686
2687         * target-def.h (TARGET_UPDATE_STACK_BOUNDARY): New.
2688         (TARGET_GET_DRAP_RTX): Likewise.
2689         (TARGET_CALLS): Add TARGET_UPDATE_STACK_BOUNDARY and
2690         TARGET_GET_DRAP_RTX.
2691
2692         * target.h (gcc_target): Add update_stack_boundary and get_drap_rtx.
2693
2694         * tree-vectorizer.c (vect_can_force_dr_alignment_p): Replace
2695         STACK_BOUNDARY with MAX_STACK_ALIGNMENT.
2696
2697 2008-07-30  Xuepeng Guo  <xuepeng.guo@intel.com>
2698             H.J. Lu  <hongjiu.lu@intel.com>
2699
2700         * dwarf2out.c (dw_fde_struct): Add stack_realignment, drap_reg,
2701         vdrap_reg, stack_realign and drap_reg_saved.
2702         (add_cfi): Don't allow redefining CFA when DRAP is used.
2703         (reg_save): Handle stack alignment.
2704         (dwarf2out_frame_debug_expr): Add rules 16-20 to handle stack
2705         alignment.  Don't generate DWARF information for (set fp sp)
2706         when DRAP is used.
2707         (dwarf2out_begin_prologue): Initialize drap_reg and vdrap_reg
2708         to INVALID_REGNUM.
2709         (int_loc_descriptor): Move prototype forward.  Also define if
2710         DWARF2_UNWIND_INFO is true.
2711         (output_cfa_loc): Handle DW_CFA_expression.
2712         (build_cfa_aligned_loc): New.
2713         (based_loc_descr): Update assert for stack realign.  For local
2714         variables, use sp+offset when stack is aligned without drap and
2715         fp+offset when stack is aligned with drap.  For arguments, use
2716         cfa+offset when drap is used to align stack.
2717
2718 2008-07-30  Joey Ye  <joey.ye@intel.com>
2719             H.J. Lu  <hongjiu.lu@intel.com>
2720
2721         * config/i386/i386.c (ix86_force_align_arg_pointer_string):
2722         Break long line.
2723         (ix86_gen_andsp): New.
2724         (ix86_user_incoming_stack_boundary): Likewise.
2725         (ix86_default_incoming_stack_boundary): Likewise.
2726         (ix86_incoming_stack_boundary): Likewise.
2727         (ix86_can_eliminate): Likewise.
2728         (find_drap_reg): Likewise.
2729         (ix86_update_stack_boundary): Likewise.
2730         (ix86_get_drap_rtx): Likewise.
2731         (ix86_finalize_stack_realign_flags): Likewise.
2732         (TARGET_UPDATE_STACK_BOUNDARY): Likewise.
2733         (TARGET_GET_DRAP_RTX): Likewise.
2734         (override_options): Overide option value for new options.
2735         (ix86_function_ok_for_sibcall): Remove check for
2736         force_align_arg_pointer.
2737         (ix86_handle_cconv_attribute): Likewise.
2738         (ix86_function_regparm): Likewise.
2739         (setup_incoming_varargs_64): Don't set stack_alignment_needed here.
2740         (ix86_va_start): Replace virtual_incoming_args_rtx with
2741         crtl->args.internal_arg_pointer.
2742         (ix86_select_alt_pic_regnum): Check DRAP register.
2743         (ix86_save_reg): Replace force_align_arg_pointer with drap_reg.
2744         (ix86_compute_frame_layout): Compute frame layout wrt stack
2745         realignment.
2746         (ix86_internal_arg_pointer): Just return virtual_incoming_args_rtx.
2747         (ix86_expand_prologue): Decide if stack realignment is needed
2748         and generate prologue code accordingly.
2749         (ix86_expand_epilogue): Generate epilogue code wrt stack
2750         realignment is really needed or not.
2751         
2752         * config/i386/i386.h (MAIN_STACK_BOUNDARY): New.
2753         (ABI_STACK_BOUNDARY): Likewise.
2754         (PREFERRED_STACK_BOUNDARY_DEFAULT): Likewise.
2755         (STACK_REALIGN_DEFAULT): Likewise.
2756         (INCOMING_STACK_BOUNDARY): Likewise.
2757         (MAX_STACK_ALIGNMENT): Likewise.
2758         (ix86_incoming_stack_boundary): Likewise.
2759         (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): Removed.
2760         (REAL_PIC_OFFSET_TABLE_REGNUM): Updated to use BX_REG.
2761         (CAN_ELIMINATE): Defined with ix86_can_eliminate.
2762         (machine_function): Remove force_align_arg_pointer.
2763
2764         * config/i386/i386.md (BX_REG): New.
2765         (R13_REG): Likewise.
2766
2767         * config/i386/i386.opt (mforce_drap): New.
2768         (mincoming-stack-boundary): Likewise.
2769         (mstackrealign): Add Init(-1).
2770
2771         * config/i386/i386-protos.h (ix86_can_eliminate): New
2772
2773 2008-07-30  H.J. Lu  <hongjiu.lu@intel.com>
2774
2775         * doc/extend.texi: Update force_align_arg_pointer.
2776
2777         * doc/invoke.texi: Document -mincoming-stack-boundary.  Update
2778         -mstackrealign.
2779
2780         * doc/tm.texi (MAX_STACK_ALIGNMENT): Add macro.
2781         (INCOMING_STACK_BOUNDARY): Likewise.
2782         (TARGET_UPDATE_STACK_BOUNDARY): New target hook.
2783         (TARGET_GET_DRAP_RTX): Likewise.
2784
2785 2008-07-30  Andreas Schwab  <schwab@suse.de>
2786
2787         PR rtl-optimization/36929
2788         * dse.c (replace_inc_dec): Use emit_insn_before instead of
2789         add_insn_before and fix argument order.
2790         (replace_inc_dec_mem): Handle NULL rtx.
2791
2792 2008-07-30  Andrew Jenner  <andrew@codesourcery.com>
2793
2794         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): New
2795         function.
2796         (arm_compute_initial_elimination_offset): Use it.
2797         (arm_compute_save_reg_mask): Include static chain save slot when
2798         calculating alignment.
2799         (arm_get_frame_offsets): Ditto.
2800         (thumb1_compute_save_reg_mask): Ensure we have a low register saved
2801         that we can use to decrement the stack when the stack decrement
2802         could be too big for an immediate value in a single insn.
2803         (thumb1_expand_prologue): Avoid using r12 for stack decrement.
2804
2805 2008-07-30  Richard Guenther  <rguenther@suse.de>
2806
2807         PR tree-optimization/36967
2808         * tree-predcom.c (remove_stmt): Use gimple_assign_ssa_name_copy_p.
2809         Release defs of statements we remove.
2810
2811 2008-07-30  Nathan Froyd  <froydnj@codesourcery.com>
2812
2813         * config/arm/arm.c (arm_expand_prologue): Use 0-length rtvec
2814         instead of NULL_RTVEC.
2815
2816 2008-07-30  Nathan Froyd  <froydnj@codesourcery.com>
2817
2818         PR target/35866
2819
2820         * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Add clause for
2821         vector modes.
2822
2823 2008-07-30  Rafael Avila de Espindola  <espindola@google.com>
2824
2825         * final.c (call_from_call_insn): New.
2826         (final_scan_insn): Call assemble_external on FUNCTION_DECLs.
2827
2828 2008-07-30  Paolo Bonzini  <bonzini@gnu.org>
2829
2830         * configure.ac: Substitute ADA_CFLAGS.
2831         * configure: Regenerate.
2832         * config.host: Remove mention of pa/x-ada and pa/x-ada-hpux10 files.
2833         * Makefile.in: Remove mention of X_* variables.
2834         * config/pa/x-ada-hpux10: Remove.
2835         * config/pa/x-ada: Remove.
2836
2837         * doc/fragments.texi: Update.
2838
2839 2008-07-30  Olivier Hainque  <hainque@adacore.com>
2840
2841         * config/mips/irix-crti.asm: .hide __gcc_init and __gcc_fini.
2842         * config/mips/iris6.h (IRIX_SUBTARGET_LINK_SPEC, irix ld): Hide
2843         __dso_handle explicitly here.
2844
2845 2008-07-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2846
2847         PR 34389
2848         * c-typeck.c (build_binary_op): Encapsulate code into...
2849         * c-common.c (shorten_binary_op): ...this new function.
2850         (conversion_warning): Use the new function. Handle non-negative
2851         constant in bitwise-and.
2852         * c-common.h (shorten_binary_op): Declare.
2853
2854 2008-07-30  Olivier Hainque  <hainque@adacore.com>
2855
2856         * scan.c (make_sstring_space): Add explicit conversions of
2857         allocator's return value.
2858         * fix-header.c (recognized_function): Likewise.
2859
2860 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2861
2862         * doc/cpp.texi: Update to GFDL 1.2.
2863         * doc/gcc.texi: Do not list GPL as Invariant Section.
2864         * doc/gccint.texi: Likewise.  Update copyright years.
2865         * doc/install.texi: Update copyright years.
2866
2867 2008-07-30  Alan Modra  <amodra@bigpond.net.au>
2868
2869         PR target/36955
2870         * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Add
2871         a use of pic_offset_table_rtx for -msecure-plt __tls_get_addr calls.
2872
2873 2008-07-29  Jan Hubicka  <jh@suse.cz>
2874
2875         * c-decl.c (merge_decls): Do not handle DECL_INLINE.
2876         (grokdeclarator): Likewise.
2877         * langhooks.c (lhd_warn_unused_global_decl): Use
2878         DECL_DECLARED_INLINE_P.
2879         * print-tree.c (print_node): Remove DECL_INLINE check.
2880
2881 2008-07-29  Richard Guenther  <rguenther@suse.de>
2882
2883         PR tree-optimization/36945
2884         * tree-ssa-sccvn.h (copy_reference_ops_from_ref): Declare.
2885         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Export.
2886         Record invariant addresses un-decomposed.
2887         (copy_reference_ops_from_call): Record reference call
2888         arguments properly.  Simplify.
2889         * tree-ssa-pre.c (create_component_ref_by_pieces_1): New
2890         helper split out from ...
2891         (create_component_ref_by_pieces): ... here.  Simplify.
2892         Prepare for recursive invocation for call arguments.
2893         (create_expression_by_pieces): Adjust call to
2894         create_component_ref_by_pieces.
2895         (compute_avail): Process operand 2 of reference ops.
2896
2897 2008-07-29  Richard Guenther  <rguenther@suse.de>
2898
2899         * gimplify.c (gimplify_expr): Clear TREE_SIDE_EFFECTS for OBJ_TYPE_REF.
2900
2901 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
2902
2903         * c-format.c (check_format_types): Revert unwanted checkin.
2904
2905 2008-07-29  Jan Hubicka  <jh@suse.cz>
2906
2907         * flags.h (flag_really_no_inline): Remove.
2908         * cgraph.c (cgraph_function_possibly_inlined_p): Simplify.
2909         * toplev.c (flag_really_no_inline): Remove.
2910         * c-cppbuiltin.c (c_cpp_builtins): Use flag_no_inline.
2911         * ipa-inline.c (cgraph_decide_inlining): Do not check flag_no_inline.
2912         (cgraph_decide_inlining_incrementally): Likewise.
2913         (compute_inline_parameters): Likewise.
2914         * opts.c (decode_options): Simplify.
2915         * c-opts.c (c_common_post_options): Do not set flag_no_inline.
2916         * common.opt (finline): Initialize to 1.
2917         * tree-inline.c (inlinable_function_p): Check flag_no_inline.
2918
2919 2008-07-29  Jan Hubicka  <jh@suse.cz>
2920
2921         * predict.c (always_optimize_for_size_p): New function.
2922         (optimize_bb_for_size_p, optimize_bb_for_speed_p,
2923         optimize_edge_for_size_p, optimize_edge_for_speed_p,
2924         optimize_insn_for_size_p, optimize_insn_for_speed_p): New global
2925         functions.
2926         (rtl_profile_for_bb, rtl_profile_for_edge, rtl_default_profile): New.
2927         * function.c (prepare_function_start): Set default profile.
2928         * function.h (rtl_data): Add maybe_hot_insn_p.
2929         * cfgexpand.c (expand_gimple_basic_block): Set RTL profile.
2930         (construct_exit_block): Likewise.
2931         (tree_expand_cfg): Likewise.
2932         * basic-block.h
2933         (optimize_bb_for_size_p, optimize_bb_for_speed_p,
2934         optimize_edge_for_size_p, optimize_edge_for_speed_p,
2935         optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare.
2936         (rtl_profile_for_bb, rtl_profile_for_edge, default_rtl_profile):
2937         Declare.
2938
2939 2008-07-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2940
2941         PR 34985
2942         * c-decl.c (merge_decls): Merge USED flags.
2943
2944 2008-07-29  Kaz Kojima  <kkojima@gcc.gnu.org>
2945
2946         * config/sh/sh.c (sh_gimplify_va_arg_expr): Unshare the addr,
2947         valist, next_fp, next_fp_tmp, next_fp_limit, next_o, next_o_limit,
2948         next_stack, lab_false and lab_over trees.
2949
2950 2008-07-28  Richard Guenther  <rguenther@suse.de>
2951
2952         PR tree-optimization/36957
2953         * tree-flow.h (tree_ssa_useless_type_conversion): Remove.
2954         (useless_type_conversion_p): Remove.
2955         (types_compatible_p): Remove.
2956         * gimple.h (tree_ssa_useless_type_conversion): Declare.
2957         (useless_type_conversion_p): Declare.
2958         (types_compatible_p): Declare.
2959         (gimple_expr_type): Return the base type only if it is
2960         trivially convertible to the subtype.
2961
2962 2008-07-28  Andreas Tobler  <a.tobler@schweiz.org>
2963
2964         * configure.ac: Use the m4_do macro to concatenate the warnings into
2965         one string in ACX_PROG_CC_WARNING_OPTS,
2966         ACX_PROG_CC_WARNING_ALMOST_PEDANTIC and ACX_PROG_CC_WARNINGS_ARE_ERRORS.
2967         * configure: Regenerate.
2968
2969 2008-07-28  Richard Guenther  <rguenther@suse.de>
2970
2971         * tree-ssa-pre.c (insert_into_preds_of_block): Remove dead code.
2972         (insert_fake_stores): Remove.
2973         (realify_fake_stores): Likewise.
2974         (execute_pre): Remove dead code.
2975         * tree-ssa-structalias.c (get_constraint_for_1): Remove tcc_unary case.
2976         (find_func_aliases): Deal with it here instead.
2977         Re-enable gcc_unreachable call.
2978
2979 2008-07-28  Richard Guenther  <rguenther@suse.de>
2980
2981         Merge from gimple-tuples-branch.
2982
2983         * ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
2984         * gimple.def: New file.
2985         * gsstruct.def: Likewise.
2986         * gimple-iterator.c: Likewise.
2987         * gimple-pretty-print.c: Likewise.
2988         * tree-gimple.c: Removed.  Merged into ...
2989         * gimple.c: ... here.  New file.
2990         * tree-gimple.h: Removed.  Merged into ...
2991         * gimple.h: ... here.  New file.
2992
2993         * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h.
2994         * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the
2995         --enable-checking=gimple flag.
2996         * config.in: Likewise.
2997         * configure: Regenerated.
2998
2999         * tree-ssa-operands.h: Tuplified.
3000         * tree-vrp.c: Likewise.
3001         * tree-loop-linear.c: Likewise.
3002         * tree-into-ssa.c: Likewise.
3003         * tree-ssa-loop-im.c: Likewise.
3004         * tree-dump.c: Likewise.
3005         * tree-complex.c: Likewise.
3006         * cgraphbuild.c: Likewise.
3007         * tree-ssa-threadupdate.c: Likewise.
3008         * tree-ssa-loop-niter.c: Likewise.
3009         * tree-pretty-print.c: Likewise.
3010         * tracer.c: Likewise.
3011         * gengtype.c: Likewise.
3012         * tree-loop-distribution.c: Likewise.
3013         * tree-ssa-loop-unswitch.c: Likewise.
3014         * cgraph.c: Likewise.
3015         * cgraph.h: Likewise.
3016         * tree-ssa-loop-manip.c: Likewise.
3017         * value-prof.c: Likewise.
3018         * tree-ssa-loop-ch.c: Likewise.
3019         * tree-tailcall.c: Likewise.
3020         * value-prof.h: Likewise.
3021         * tree.c: Likewise.
3022         * tree.h: Likewise.
3023         * tree-pass.h: Likewise.
3024         * ipa-cp.c: Likewise.
3025         * tree-scalar-evolution.c: Likewise.
3026         * tree-scalar-evolution.h: Likewise.
3027         * target.h: Likewise.
3028         * lambda-mat.c: Likewise.
3029         * tree-phinodes.c: Likewise.
3030         * diagnostic.h: Likewise.
3031         * builtins.c: Likewise.
3032         * tree-ssa-alias-warnings.c: Likewise.
3033         * cfghooks.c: Likewise.
3034         * fold-const.c: Likewise.
3035         * cfghooks.h: Likewise.
3036         * omp-low.c: Likewise.
3037         * tree-ssa-dse.c: Likewise.
3038         * ipa-reference.c: Likewise.
3039         * tree-ssa-uncprop.c: Likewise.
3040         * toplev.c: Likewise.
3041         * tree-gimple.c: Likewise.
3042         * tree-gimple.h: Likewise.
3043         * tree-chrec.c: Likewise.
3044         * tree-chrec.h: Likewise.
3045         * tree-ssa-sccvn.c: Likewise.
3046         * tree-ssa-sccvn.h: Likewise.
3047         * cgraphunit.c: Likewise.
3048         * tree-ssa-copyrename.c: Likewise.
3049         * tree-ssa-ccp.c: Likewise.
3050         * tree-ssa-loop-ivopts.c: Likewise.
3051         * tree-nomudflap.c: Likewise.
3052         * tree-call-cdce.c: Likewise.
3053         * ipa-pure-const.c: Likewise.
3054         * c-format.c: Likewise.
3055         * tree-stdarg.c: Likewise.
3056         * tree-ssa-math-opts.c: Likewise.
3057         * tree-ssa-dom.c: Likewise.
3058         * tree-nrv.c: Likewise.
3059         * tree-ssa-propagate.c: Likewise.
3060         * ipa-utils.c: Likewise.
3061         * tree-ssa-propagate.h: Likewise.
3062         * tree-ssa-alias.c: Likewise.
3063         * gimple-low.c: Likewise.
3064         * tree-ssa-sink.c: Likewise.
3065         * ipa-inline.c: Likewise.
3066         * c-semantics.c: Likewise.
3067         * dwarf2out.c: Likewise.
3068         * expr.c: Likewise.
3069         * tree-ssa-loop-ivcanon.c: Likewise.
3070         * predict.c: Likewise.
3071         * tree-ssa-loop.c: Likewise.
3072         * tree-parloops.c: Likewise.
3073         * tree-ssa-address.c: Likewise.
3074         * tree-ssa-ifcombine.c: Likewise.
3075         * matrix-reorg.c: Likewise.
3076         * c-decl.c: Likewise.
3077         * tree-eh.c: Likewise.
3078         * c-pretty-print.c: Likewise.
3079         * lambda-trans.c: Likewise.
3080         * function.c: Likewise.
3081         * langhooks.c: Likewise.
3082         * ebitmap.h: Likewise.
3083         * tree-vectorizer.c: Likewise.
3084         * function.h: Likewise.
3085         * langhooks.h: Likewise.
3086         * tree-vectorizer.h: Likewise.
3087         * ipa-type-escape.c: Likewise.
3088         * ipa-type-escape.h: Likewise.
3089         * domwalk.c: Likewise.
3090         * tree-if-conv.c: Likewise.
3091         * profile.c: Likewise.
3092         * domwalk.h: Likewise.
3093         * tree-data-ref.c: Likewise.
3094         * tree-data-ref.h: Likewise.
3095         * tree-flow-inline.h: Likewise.
3096         * tree-affine.c: Likewise.
3097         * tree-vect-analyze.c: Likewise.
3098         * c-typeck.c: Likewise.
3099         * gimplify.c: Likewise.
3100         * coretypes.h: Likewise.
3101         * tree-ssa-phiopt.c: Likewise.
3102         * calls.c: Likewise.
3103         * tree-ssa-coalesce.c: Likewise.
3104         * tree.def: Likewise.
3105         * tree-dfa.c: Likewise.
3106         * except.c: Likewise.
3107         * except.h: Likewise.
3108         * cfgexpand.c: Likewise.
3109         * tree-cfgcleanup.c: Likewise.
3110         * tree-ssa-pre.c: Likewise.
3111         * tree-ssa-live.c: Likewise.
3112         * tree-sra.c: Likewise.
3113         * tree-ssa-live.h: Likewise.
3114         * tree-predcom.c: Likewise.
3115         * lambda.h: Likewise.
3116         * tree-mudflap.c: Likewise.
3117         * ipa-prop.c: Likewise.
3118         * print-tree.c: Likewise.
3119         * tree-ssa-copy.c: Likewise.
3120         * ipa-prop.h: Likewise.
3121         * tree-ssa-forwprop.c: Likewise.
3122         * ggc-page.c: Likewise.
3123         * c-omp.c: Likewise.
3124         * tree-ssa-dce.c: Likewise.
3125         * tree-vect-patterns.c: Likewise.
3126         * tree-ssa-ter.c: Likewise.
3127         * tree-nested.c: Likewise.
3128         * tree-ssa.c: Likewise.
3129         * lambda-code.c: Likewise.
3130         * tree-ssa-loop-prefetch.c: Likewise.
3131         * tree-inline.c: Likewise.
3132         * tree-inline.h: Likewise.
3133         * tree-iterator.c: Likewise.
3134         * tree-optimize.c: Likewise.
3135         * tree-ssa-phiprop.c: Likewise.
3136         * tree-vect-transform.c: Likewise.
3137         * tree-object-size.c: Likewise.
3138         * tree-outof-ssa.c: Likewise.
3139         * cfgloop.c: Likewise.
3140         * system.h: Likewise.
3141         * tree-profile.c: Likewise.
3142         * cfgloop.h: Likewise.
3143         * c-gimplify.c: Likewise.
3144         * c-common.c: Likewise.
3145         * tree-vect-generic.c: Likewise.
3146         * tree-flow.h: Likewise.
3147         * c-common.h: Likewise.
3148         * basic-block.h: Likewise.
3149         * tree-ssa-structalias.c: Likewise.
3150         * tree-switch-conversion.c: Likewise.
3151         * tree-ssa-structalias.h: Likewise.
3152         * tree-cfg.c: Likewise.
3153         * passes.c: Likewise.
3154         * ipa-struct-reorg.c: Likewise.
3155         * ipa-struct-reorg.h: Likewise.
3156         * tree-ssa-reassoc.c: Likewise.
3157         * cfgrtl.c: Likewise.
3158         * varpool.c: Likewise.
3159         * stmt.c: Likewise.
3160         * tree-ssanames.c: Likewise.
3161         * tree-ssa-threadedge.c: Likewise.
3162         * langhooks-def.h: Likewise.
3163         * tree-ssa-operands.c: Likewise.
3164         * config/alpha/alpha.c: Likewise.
3165         * config/frv/frv.c: Likewise.
3166         * config/s390/s390.c: Likewise.
3167         * config/m32c/m32c.c: Likewise.
3168         * config/m32c/m32c-protos.h: Likewise.
3169         * config/spu/spu.c: Likewise.
3170         * config/sparc/sparc.c: Likewise.
3171         * config/i386/i386.c: Likewise.
3172         * config/sh/sh.c: Likewise.
3173         * config/xtensa/xtensa.c: Likewise.
3174         * config/stormy16/stormy16.c: Likewise.
3175         * config/ia64/ia64.c: Likewise.
3176         * config/rs6000/rs6000.c: Likewise.
3177         * config/pa/pa.c: Likewise.
3178         * config/mips/mips.c: Likewise.
3179
3180 2008-07-28  Simon Baldwin  <simonb@google.com>
3181
3182         * c-pragma.c (handle_pragma_message): New function.
3183         (init_pragma): Register handle_pragma_message.
3184         * doc/extend.texi (Diagnostic Pragmas): Added #pragma message
3185         documentation.
3186
3187 2008-07-27  Victor Kaplansky  <victork@il.ibm.com>
3188
3189         PR tree-optimization/35252
3190         * tree-vect-analyze.c (vect_build_slp_tree): Make IMAGPART_EXPR and
3191         REALPART_EXPR to be considered as same load operation.
3192
3193 2008-07-27  Eric Botcazou  <ebotcazou@adacore.com>
3194
3195         PR tree-optimization/36830
3196         * tree-ssa-sccvn.c (vn_reference_op_compute_hash): Hash operand #2.
3197         (expressions_equal_p): Return false if only one operand is null.
3198
3199 2008-07-26  Gerald Pfeifer  <gerald@pfeifer.com>
3200
3201         * doc/install.texi (powerpc-*-netbsd*): Remove redundant texinfo
3202         version requirements.
3203
3204 2008-07-26  Olivier Hainque  <hainque@adacore.com>
3205
3206         * collect2.c (symkind): New enum.  Symbol kinds we care about.
3207         (is_ctor_dtor): Return symkind instead of int.  Adjust prototype,
3208         code and head comment accordingly.
3209         (scan_prog_file): Use symkind names instead of bare integers.
3210
3211 2008-07-25  Jan Hubicka  <jh@suse.cz>
3212
3213         * cgraph.c (cgraph_function_possibly_inlined_p): Do not rely on
3214         DECL_INLINE.
3215         * cgraphunit.c (record_cdtor_fn): Do not initialize DECL_INLINE
3216         (cgraph_preserve_function_body_p): Do not rely on DECL_INLINE.
3217         * dojump.c (clear_pending_stack_adjust): Likewise.
3218         * print-tree.c (print_node): Ignore DECL_INLINE.
3219         * tree-inline.c (inlinable_function_p): Likewise.
3220
3221 2008-07-25  Michael Meissner  <gnu@the-meissners.org>
3222
3223         * doc/extend.texi (hot attribute): Document that the hot attribute
3224         turns on -O3 for some ports.
3225         (cold attribute): Document that the cold attribute turns on -Os
3226         for some ports
3227
3228         * doc/tm.texi (OPTIMIZATION_OPTIONS): Update documentation to
3229         reflect function specific option support.
3230
3231         * target.h (struct target_option_hooks): Add fields to say whether
3232         the cold attribute implies -Os and the hot attribute implies -O3.
3233
3234         * target-def.h (TARGET_OPTION_COLD_ATTRIBUTE_SETS_OPTIMIZATION):
3235         By default, do not turn on -Os for cold functions.
3236         (TARGET_OPTION_COLD_ATTRIBUTE_SETS_OPTIMIZATION): By default, do
3237         not turn on -O3 for hot functions.
3238
3239         * c-common.c (handle_hot_attribute): Use target hook to determine
3240         if hot functions should enable -O3.
3241         (handle_cold_attribute): Use target hook to determine if cold
3242         functions should enable -Os.
3243
3244         * config/i386/i386.c (ix86_target_string): Add -m3dnowa support.
3245         (override_options): Move disable scheduling to
3246         optimization_options.
3247         (optimization_options): Disable scheduling here, not
3248         override_options.
3249         (TARGET_OPTION_COLD_ATTRIBUTE_SETS_OPTIMIZATION): Define.
3250         (TARGET_OPTION_HOT_ATTRIBUTE_SETS_OPTIMIZATION): Define.
3251
3252         * config/ia64/ia64.c (ia64_override_options): Move setting
3253         scheduling flags to ia64_optimization_options.
3254         (ia64_optimization_options): Disable scheduling options here, and
3255         not in ia64_override_options.
3256         (TARGET_OPTION_COLD_ATTRIBUTE_SETS_OPTIMIZATION): Define.
3257         (TARGET_OPTION_HOT_ATTRIBUTE_SETS_OPTIMIZATION): Define.
3258
3259 2008-07-25  H.J. Lu  <hongjiu.lu@intel.com>
3260
3261         PR target/36936
3262         * config/i386/i386.c (override_options): Don't clear TARGET_CMOVE.
3263
3264 2008-07-25  Martin Jambor  <mjambor@suse.cz>
3265
3266         PR tree-optimization/36926
3267         * ipa-prop.c (ipa_analyze_call_uses): Call
3268         ipa_is_ssa_with_stmt_def instead of SSA_NAME_IS_DEFAULT_DEF.
3269
3270 2008-07-25  Joseph Myers  <joseph@codesourcery.com>
3271
3272         * config/arm/iwmmxt.md (movv8qi_internal, movv4hi_internal,
3273         movv2si_internal): Add mem = reg alternative.
3274
3275 2008-07-25  Andreas Tobler  <a.tobler@schweiz.org>
3276
3277         PR bootstrap/36918
3278         * config/sparc/sparc.h (DEFAULT_PCC_STRUCT_RETURN): Define
3279         DEFAULT_PCC_STRUCT_RETURN to 127.
3280
3281 2008-07-24  Jan Hubicka  <jh@suse.cz>
3282
3283         * cgraphbuild.c (record_reference): Drop non-unit-at-a-time code.
3284         (build_cgraph_edges): Likewise.
3285         * cgraph.c (cgraph_node): Do not update assembler hash.
3286         (cgraph_remove_node): Drop non-unit-at-a-time code.
3287         * tree-pass.h (pass_O0_always_inline): Remove.
3288         * ipa-reference.c (gate_reference): Remove unit-at-a-time check.
3289         * toplev.c (process_options): Flag unit-at-a-time does not imply
3290         no section anchors.
3291         * cgraphunit.c: Update comments.
3292         (decide_is_function_needed): Drop non-unit-at-a-time mode.
3293         (cgraph_assemble_pending_functions): Remove.
3294         (cgraph_reset_node): Drop non-unit-at-a-time code.
3295         (cgraph_finalize_function): Likewise.
3296         (cgraph_analyze_function): Likewise.
3297         (cgraph_finalize_compilation_unit): Likewise.
3298         (cgraph_expand_function): Likewise.
3299         (cgraph_optimize): Likesise.
3300         (save_inline_function_body): Likewise.
3301         * ipa-pure-const.c (gate_pure_const): Drop flag_unit_at_a_time check.
3302         * tree-ssa-alias.c (maybe_be_aliased): Likewise.
3303         * ipa-inline.c: Update comments.
3304         (enum inlining_mode): remove INLINE_SPEED.
3305         (cgraph_clone_inlined_nodes): Drop unit-at-a-time check.
3306         (cgraph_mark_inline_edge): Likewise.
3307         (try_inline): Likewise.
3308         (cgraph_decide_inlining_incrementally): Likewise.
3309         (cgraph_gate_inlining): Remove.
3310         (cgraph_early_inlining): Remove flag_unit_at_a_time checks.
3311         (cgraph_gate_early_inlining): Likewise.
3312         (gate_inline_passes): Remove.
3313         (pass_inline_parameters, pass_ipa_inline): Remove gates.
3314         (cgraph_gate_O0_always_inline, cgraph_O0_always_inline,
3315         pass_O0_always_inline): Remove.
3316         * c-pch.c (c_pch_matching): Remove -funit-at-a-time.
3317         * dwarf2out.c (reference_to_unused): Remove flag_unit_at_a_time check.
3318         * opts.c (no_unit_at_a_time_default): Remove.
3319         (decode_options): Remove flag_unit_at_a_time reset and warning.
3320         * opts.h (no_unit_at_a_time_default): Remove.
3321         * c-decl.c (diagnose_mismatched_decls): Do not require inline keyword
3322         early in GNU dialect.
3323         (merge_decls): Update comment; drop unit-at-a-time check.
3324         (finish_decl): Likewise.
3325         (grok_declaration): Remove flag_inline_trees code.
3326         (finish_functions): Return on function returning non-void on all
3327         statics.
3328         * ipa-tye-escape.c (gate_type_escape_vars): Remove.
3329         * cfgexpand.c (expand_one_static_var): Remove.
3330         (expand_one_var): Remove expand_one_static_var call.
3331         (expand_used_vars_for_block): Remove flag_unit_a_time check.
3332         * c-opts.c (c_common_post_options): Remove flag_inline_trees code
3333         and flag_unit_at_a-time compatibility checks.
3334         * varasm.c (assemble_alias): Remove flag_unit_at_a_time check.
3335         * tree-inline.c (flag_inline_trees): Remove.
3336         (inlinable_function_p): Don't check it.
3337         (expand_call_inline): Remove non-unit-at-a-time code.
3338         * tree-inline.h (flag_inline_trees): Remove.
3339         * tree-optimize.c (execute_early_local_optimizations): Remove
3340         unit-at-a-time checks.
3341         (tree_rest_of_compilation): Likewise.
3342         * combine.c (setup_incoming_promotions): Likewise.
3343         * tree-profile.c (tree_gen_ic_func_profiler): Likewise.
3344         * tree-ssa-structalias.c (delete_points_to_sets): Likewise.
3345         * passes.c (pass_inline_parameters): Update comments; remove
3346         O0_alwaysinline pass.
3347         (execute_one_ipa_transform_pass): Do not reset in_gimple_form.
3348         (execute_one_pass): Likewise.
3349         * i386.c (ix86_function_regparm): Remove unit-at-a-time check.
3350         (ix86_function_sseregparm): Likewise.
3351         * arm.c (arm_function_in_section_p): Likewise.
3352         * bfin.c (bfin_load_pic_reg, bfin_function_ok_for_sibcall): Likewise.
3353         * varpool.c: Update comments.
3354         (decide_is_variable_needed): Remove unit-at-a-time checks.
3355         (varpool_finalize_decl): Likewise.
3356
3357 2008-07-24  Kaz Kojima  <kkojima@gcc.gnu.org>
3358
3359         * config/sh/sh.h (OPTIMIZATION_OPTIONS): Set flag_omit_frame_pointer
3360         to 2 instead of -1.
3361         (OVERRIDE_OPTIONS): Check if flag_omit_frame_pointer is equal to 2.
3362
3363 2008-07-24  Kai Tietz  <kai.tietz@onevision.com>
3364
3365         * config/i386/i386.c (get_dllimport_decl): Treat user_label_prefix for
3366         imp symbol extension.
3367
3368         2008-07-23  Ian Lance Taylor  <iant@google.com>
3369
3370         * tree-vrp.c (infer_value_range): Ignore asm statements when
3371         looking for memory accesses for -fdelete-null-pointer-checks.
3372
3373 2008-07-24  Ben Elliston  <bje@au.ibm.com>
3374
3375         * config/spu/spu-c.c (__vector_keyword): New variable.
3376         (vector_keyword): Likewise.
3377         (spu_categorize_keyword): New function.
3378         (spu_macro_to_expand): Likewise.
3379         (spu_cpu_cpp_builtins): Enable context-sensitive macros if not
3380         compiling an ISO C dialect.
3381
3382 2008-07-24  Ben Elliston  <bje@au.ibm.com>
3383
3384         * config/rs6000/rs6000-c.c: Move GTY(()) markers to match
3385         conventional usage.
3386
3387 2008-07-23  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
3388
3389         * configure: Regenerate.
3390         * configure.ac: Require texinfo 4.7.
3391         * doc/install.texi: Document texinfo 4.7 requirement.
3392
3393 2008-07-23  Martin Jambor  <mjambor@suse.cz>
3394
3395         * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed
3396         rather than for DECL_SAVED_TREE.
3397         * ipa-prop.c: Include diagnostic.h.
3398         (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs
3399         thoroughly.
3400         (ipa_detect_param_modifications): Function rewritten from scratch.
3401         (ipa_compute_jump_functions): Changed accesses to modification flags.
3402         (ipa_free_node_params_substructures): Update flags destruction.
3403         (ipa_node_duplication_hook): Update flags duplication.
3404         (ipa_print_all_params_modified): Updated flag access.
3405         * ipa-prop.h (struct ipa_param_flags): New structure.
3406         (struct ipa_node_params): New field modification_analysis_done,
3407         modified_flags changed into param_flags.
3408         (ipa_is_ith_param_modified): Changed to use new flags.
3409         * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies.
3410
3411         * ipa-prop.c (ipa_print_all_jump_functions): Moved here from
3412         ipa-cp.c and split into two functions.
3413         (ipa_print_node_jump_functions): New function.
3414         (compute_scalar_jump_functions): New function.
3415         (type_like_member_ptr_p): New function.
3416         (compute_pass_through_member_ptrs): New function.
3417         (fill_member_ptr_cst_jump_function): New function.
3418         (determine_cst_member_ptr): New function.
3419         (compute_cst_member_ptr_arguments): New function.
3420         (ipa_compute_jump_functions): Complete rewrite.
3421         * ipa-prop.h (enum jump_func_type): Make explicit that we depend
3422         on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR.
3423         (struct ipa_member_ptr_cst): New structure.
3424         (union jump_func_value): New field member_cst.
3425         * ipa-cp.c (ipcp_lat_is_insertable): New function.
3426         (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled
3427         jump function types.
3428         (ipcp_print_all_lattices): Slight fprintf rearrangement.
3429         (ipcp_print_all_structures): Call ipa_print_all_jump_functions
3430         instead of ipcp_print_all_jump_functions.
3431         (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps
3432         only for replacable scalars.
3433
3434         * doc/invoke.texi (Optimize options): Add description of
3435         -findirect-inlining.
3436         * common.opt (flag_indirect_inlining): New flag.
3437         * opts.c (decode_options): Set flag_indirect_inlining when
3438         optimize >= 3.
3439
3440         * ipa-inline.c: Include ipa-prop.h.
3441         (inline_indirect_intraprocedural_analysis): New function.
3442         (inline_generate_summary): Allocate parameter and argument info
3443         structures, call inline_indirect_intraprocedural_analysis on each
3444         node when doing indirect inlining and deallocate indirect inlining
3445         data structures in the end.
3446         * ipa-prop.c (ipa_create_param_decls_array): Return if already done.
3447         (free_all_ipa_structures_after_iinln): New function.
3448         (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be
3449         done.
3450         * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies.
3451
3452         * cgraphbuild.c (compute_call_stmt_bb_frequency): New function.
3453         (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead
3454         of computing the frequency separately.
3455         (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead
3456         of computing the frequency separately.
3457         * ipa-cp.c (ipcp_print_all_structures): Replace a call to
3458         ipa_print_all_param_modified with a call to ipa_print_all_param_flags.
3459         * ipa-prop.c (ipa_get_member_ptr_load_param): New function.
3460         (ipa_get_stmt_member_ptr_load_param): New function.
3461         (ipa_is_ssa_with_stmt_def): New function.
3462         (ipa_note_param_call): New function.
3463         (ipa_analyze_call_uses): New function.
3464         (ipa_analyze_stmt_uses): New function.
3465         (ipa_analyze_params_uses): New function.
3466         (ipa_free_node_params_substructures): Also free the param_calls linked
3467         list.
3468         (ipa_node_duplication_hook): Also duplicate the param_calls linked list.
3469         (ipa_print_node_param_flags): New function.
3470         (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags.
3471         (ipa_print_all_param_flags): Calls ipa_print_node_param_flags.
3472         * ipa-prop.h (struct ipa_param_flags): New field called.
3473         (struct ipa_param_call_note): New structure.
3474         (struct ipa_node_params): New fields param_calls and
3475         uses_analysis_done.
3476         (ipa_is_ith_param_called): New function.
3477         * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call
3478         ipa_analyze_params_uses and dump parameter flags.
3479
3480         * ipa-inline.c (cgraph_decide_recursive_inlining): Call
3481         ipa_propagate_indirect_call_infos if performing indirect inlining,
3482         pass a new parameter new_edges to it.
3483         (add_new_edges_to_heap): New fucntion.
3484         (cgraph_decide_inlining_of_small_functions): New vector
3485         new_indirect_edges for newly found indirect edges , call
3486         ipa_propagate_indirect_call_infos after inlining.
3487         (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after
3488         inlining if performing indirect inlining.  Call
3489         free_all_ipa_structures_after_iinln when doing so too.
3490         (inline_generate_summary): Do not call
3491         free_all_ipa_structures_after_iinln here.
3492         * ipa-prop.c (update_jump_functions_after_inlining): New function.
3493         (print_edge_addition_message): New function.
3494         (update_call_notes_after_inlining): New function.
3495         (propagate_info_to_inlined_callees): New function.
3496         (ipa_propagate_indirect_call_infos): New function.
3497         * ipa-prop.h: Include cgraph.h
3498         (struct ipa_param_call_note): Fields reordered, new field processed.
3499         * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new
3500         flag indirect_call.
3501         * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have
3502         rediscovered call statements.
3503         * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero.
3504         (dump_cgraph_node): Dump also the indirect_call flag.
3505         (cgraph_clone_edge): Copy also the indirect_call flag.
3506         * tree-inline.c (copy_bb): Do not check for fndecls from call
3507         expressions, check for edge availability when moving clones.
3508         (get_indirect_callee_fndecl): New function.
3509         (expand_call_inline): If callee declaration is not apprent from
3510         the statement, try calling get_indirect_callee_fndecl.  Do not
3511         issue warnings or call sorry when not inlinings an indirect edge.
3512         * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies.
3513
3514         * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a
3515         bit more frandly to matching.
3516         * testsuite/g++.dg/ipa/iinline-1.C: New testcase.
3517         * testsuite/gcc.dg/ipa/iinline-1.c: New testcase.
3518         * testsuite/gcc.dg/ipa/modif-1.c: New testcase.
3519
3520 2008-07-23  Michael Meissner  <gnu@the-meissners.org>
3521
3522         PR 36907
3523         * opth-gen.awk: Suppress function specific features when building
3524         target libraries.
3525         * optc-gen.awk: Ditto.
3526
3527 2008-07-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3528
3529         PR 35058
3530         * diagnostic.c (pedwarn): Add opt parameter.
3531         (pedwarn0): New.
3532         * c-tree.h (pedwarn_init): Add opt parameter.
3533         (pedwarn_c90): Likewise.
3534         (pedwarn_c99): Likewise.
3535         * c-errors.c (pedwarn_c99): Likewise.
3536         (pedwarn_c90): Likewise.
3537         * toplev.h (pedwarn): Update declaration.
3538         (pedwarn0): Declare.
3539         * c-lex.c: All calls to pedwarn changed.
3540         * builtins.c: All calls to pedwarn changed.
3541         * toplev.c: All calls to pedwarn changed.
3542         * c-decl.c: All calls to pedwarn changed.
3543         * c-typeck.c: All calls to pedwarn changed.
3544         * c-common.c: All calls to pedwarn changed.
3545         * c-parser.c: All calls to pedwarn changed.
3546
3547 2008-07-23  Michael Meissner  <gnu@the-meissners.org>
3548             Karthik Kumar  <karthikkumar@gmail.com>
3549
3550         * attribs.c (file scope): Include c-common.h.
3551         (decl_attributes): Add support for #pragma GCC optimize and
3552         #pragma GCC option.
3553
3554         * targhooks.c (default_can_inline_p): New function that is the
3555         default for the TARGET_CAN_INLINE_P target hook.
3556
3557         * targhooks.h (default_can_inline_p): Add declaration.
3558
3559         * tree.c (cl_optimization_node): New static tree for building
3560         OPTIMIZATION_NODE tree.
3561         (cl_target_option_node): New static tree for building
3562         TARGET_OPTION_NODE tree.
3563         (cl_option_hash_table): New hash table for hashing
3564         OPTIMIZATION_NODE and TARGET_OPTION_NODE trees.
3565         (cl_option_hash_hash): New function to provide the hash value for
3566         OPTIMIZATION_NODE and TARGET_OPTION_NODE trees.
3567         (cl_option_hash_eq): New function to provide an equality test for
3568         OPTIMIZATION_NODE and TARGET_OPTION_NODE trees.
3569         (tree_code_size): Add support for OPTIMIZATION_NODE and
3570         TARGET_OPTION_NODE trees.
3571         (tree_code_structure): Add support for OPTIMIZATION_NODE and
3572         TARGET_OPTION_NODE trees.
3573         (build_optimization_node): Build a tree that has all of the
3574         current optimization options.
3575         (build_target_option_node): Build a tree that has the target
3576         options that might be changed on a per function basis.
3577
3578         * tree.h (file scope): Include options.h.
3579         (DECL_FUNCTION_SPECIFIC_TARGET): New accessor macro.
3580         (DECL_FUNCTION_SPECIFIC_OPTIMIZATION): Ditto.
3581         (TREE_OPTIMIZATION): Ditto.
3582         (TREE_TARGET_SPECIFIC): Ditto.
3583         (struct tree_function_decl): Add fields for remembering the
3584         current optimization options and target specific options.
3585         (struct tree_optimization_option): New tree variant that remembers
3586         the optimization options.
3587         (struct tree_target_option): New tree variant that remembers the
3588         target specific flags that might change for compiling a particular
3589         function.
3590         (union tree_node): Include tree_optimization_option and
3591         tree_target_option fields.
3592         (enum tree_index): Add TI_OPTIMIZATION_DEFAULT,
3593         TI_OPTIMIZATION_CURRENT, TI_OPTIMIZATION_COLD,
3594         TI_OPTIMIZATION_HOT, TI_TARGET_OPTION_DEFAULT,
3595         TI_TARGET_OPTION_CURRENT, TI_CURRENT_OPTION_PRAGMA,
3596         TI_CURRENT_OPTIMIZE_PRAGMA entries for saving function specific
3597         optimization and target options.
3598         (optimization_default_node): New macro to refer to global_trees
3599         field.
3600         (optimization_current_node): Ditto.
3601         (optimization_cold_node): Ditto.
3602         (optimization_hot_node): Ditto.
3603         (target_option_default_node): Ditto.
3604         (target_option_current_node): Ditto.
3605         (current_option_pragma): Ditto.
3606         (current_optimize_pragma): Ditto.
3607
3608         * target.h (struct gcc_target): Add valid_option_attribute_p,
3609         target_option_save, target_option_restore, target_option_print,
3610         target_option_pragma_parse, and can_inline_p hooks.
3611
3612         * toplev.h (parse_optimize_options): Add declaration.
3613         (fast_math_flags_struct_set_p): Ditto.
3614
3615         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): New function to
3616         adjust the current __OPTIMIZE__, etc. macros when #pragma GCC
3617         optimize is used.
3618
3619         * ipa-inline.c (cgraph_decide_inlining_of_small_function): Call
3620         tree_can_inline_p hook to see if one function can inline another.
3621         (cgraph_decide_inlining): Ditto.
3622         (cgraph_decide_inlining_incrementally): Ditto.
3623
3624         * opts.c (decode_options): Add support for running multiple times
3625         to allow functions with different target or optimization options
3626         than was specified on the command line.
3627         (fast_math_flags_struct_set_p): New function that is similar to
3628         fast_math_flags_set_p, except it uses the values in the
3629         cl_optimization structure instead of global variables.
3630
3631         * optc-gen.awk: Add support for TargetSave to allow a back end to
3632         declare new fields that need to be saved when using function
3633         specific options.  Include flags.h and target.h in the options.c
3634         source.  Add support for Save to indicate which options can be set
3635         for individual functions.  Generate cl_optimize_save,
3636         cl_optimize_restore, cl_optimize_print, cl_target_option_save,
3637         cl_target_option_restore, cl_target_option_print functions to
3638         allow functions to use different optimization or target options.
3639
3640         * opt-functions.awk (var_type_struct): Return the type used for
3641         storing the field in a structure.
3642
3643         * opth-gen.awk: Add support for TargetSave to allow a back end to
3644         declare new fields that need to be saved when using function
3645         specific options.  Add support for Save to indicate which options
3646         can be set for individual functions.  Only generate one extern for
3647         Mask fields.  Generate cl_optimization and cl_target_option
3648         structures to remember optimization and target options.
3649
3650         * treestruct.def (TS_OPTIMIZATION): Add support for garbage
3651         collecting new tree nodes.
3652         (TS_TARGET_OPTION): Ditto.
3653
3654         * c-decl.c (merge_decls): Merge function specific target and
3655         optimization options.
3656
3657         * function.c (invoke_set_current_function_hook): If the function
3658         uses different optimization options, change the global variables
3659         to reflect this.
3660
3661         * coretypes.h (struct cl_optimization): Add forward reference.
3662         (struct cl_target_option): Ditto.
3663
3664         * c-pragma.c (option_stack): New static vector to remember the
3665         current #pragma GCC option stack.
3666         (handle_pragma_option): New function to support #pragma GCC option
3667         to change target options.
3668         (optimize_stack): New static vector to remember the current
3669         #pragma GCC optimize stack.
3670         (handle_pragma_optimize): New function to support #pragma GCC
3671         optimize to change optimization options.
3672         (init_pragma): Add support for #pragma GCC optimize and #pragma
3673         GCC option.
3674
3675         * tree.def (OPTIMIZATION_NODE): New tree code for remembering
3676         optimization options.
3677         (TARGET_OPTION_NODE): New tree code for remembering certain target
3678         options.
3679
3680         * print-tree.c (print_node): Add support for OPTIMIZATION_NODE and
3681         TARGET_OPTION_NODE trees.
3682
3683         * common.opt (-O): Add Optimization flag.
3684         (-Os): Ditto.
3685         (-fmath-errno): Ditto.
3686         (-falign-functions): Add UInteger flag to make sure flag gets full
3687         int in cl_optimization structure.
3688         (-falign-jumps): Ditto.
3689         (-falign-labels): Ditto.
3690         (-falign-loops): Ditto.
3691         (-fsched-stalled-insns): Ditto.
3692         (-fsched-stalled-insns-dep): Ditto.
3693
3694         * target-def.h (TARGET_VALID_OPTION_ATTRIBUTE_P): Add default
3695         definition.
3696         (TARGET_OPTION_SAVE): Ditto.
3697         (TARGET_OPTION_RESTORE): Ditto.
3698         (TARGET_OPTION_PRINT): Ditto.
3699         (TARGET_OPTION_PRAGMA_PARSE): Ditto.
3700         (TARGET_CAN_INLINE_P): Ditto.
3701         (TARGET_INITIALIZER): Add new hooks.
3702
3703         * tree-inline.c (tree_can_inline_p): New function to determine
3704         whether one function can inline another.  Check if the functions
3705         use compatible optimization options, and also call the backend
3706         can_inline_p hook.
3707
3708         * tree-inline.h (tree_can_inline_p): Add declaration.
3709
3710         * c-common.c (c_common_attribute): Add support for option and
3711         optimize attributes.
3712         (handle_option_attribute): Add support for the option attribute to
3713         allow the user to specify different target options for compiling a
3714         specific function.
3715         (handle_optimize_attribute): Add support for the optimize
3716         attribute to allow the user to specify different optimization
3717         options for compiling a specific function.
3718         (handle_hot_attribute): Turn on -O3 optimization for this one
3719         function if it isn't the default optimization level.
3720         (handle_cold_attribute): Turn on -Os optimization for this one
3721         function if it insn't the default optimization.
3722         (const_char_p): New const char * typedef.
3723         (optimize_args): New static vector to remember the optimization
3724         arguments.
3725         (parse_optimize_options): New function to set up the optimization
3726         arguments from either the optimize attribute or #pragma GCC optimize.
3727
3728         * c-common.h (c_cpp_builtins_optimize_pragma): Add declaration.
3729         (builtin_define_std): Ditto.
3730
3731         * config.gcc (i[3467]86-*-*): Add i386-c.o to C/C++ languages.
3732         Add t-i386 Makefile fragment to add i386-c.o and i386.o dependencies.
3733         (x86_64-*-*): Ditto.
3734
3735         * Makefile.in (TREE_H): Add options.h.
3736         (options.o): Add $(TARGET_H) $(FLAGS_H) dependencies.
3737
3738         * doc/extend.texi (option attribute): Document new attribute.
3739         (optimize attribute): Ditto.
3740         (hot attribute): Document hot attribute sets -O3.
3741         (cold attribute): Document cold attribute sets -Os.
3742         (#pragma GCC option): Document new pragma.
3743         (#pragma GCC optimize): Ditto.
3744
3745         * doc/options.texi (TargetSave): Document TargetSave syntax.
3746         (UInteger): Document UInteger must be used for certain flags.
3747         (Save): Document Save option to create target specific options
3748         that can be saved/restored on a function specific context.
3749
3750         * doc/c-tree.texi (DECL_FUNCTION_SPECIFIC_TARGET): Document new macro.
3751         (DECL_FUNCTION_SPECIFIC_OPTIMIZATION): Ditto.
3752
3753         * doc/tm.texi (TARGET_VALID_OPTION_ATTRIBUTE_P): Document new hook.
3754         (TARGET_OPTION_SAVE): Ditto.
3755         (TARGET_OPTION_RESTORE): Ditto.
3756         (TARGET_OPTION_PRINT): Ditto.
3757         (TARGET_OPTION_PRAGMA_PARSE): Ditto.
3758         (TARGET_CAN_INLINE_P): Ditto.
3759
3760         * doc/invoke.texi (-mfpmath=sse+387): Document as an alias for
3761         -mfpmath=sse,387.
3762         (-mfpmath=both): Ditto.
3763
3764 2008-07-23  Michael Meissner  <gnu@the-meissners.org>
3765             Karthik Kumar  <karthikkumar@gmail.com>
3766
3767         * config/i386/i386.h (TARGET_ABM): Move switch into ix86_isa_flags.
3768         (TARGET_POPCNT): Ditto.
3769         (TARGET_SAHF): Ditto.
3770         (TARGET_AES): Ditto.
3771         (TARGET_PCLMUL): Ditto.
3772         (TARGET_CMPXCHG16B): Ditto.
3773         (TARGET_RECIP): Move switch into target_flags.
3774         (TARGET_FUSED_MADD): Ditto.
3775         (ix86_arch_features): Make an unsigned char type.
3776         (ix86_tune_features): Ditto.
3777         (OVERRIDE_OPTIONS): Add bool argument to override_options call.
3778         (TARGET_CPU_CPP_BUILTINS): Move into ix86_target_macros.
3779         (REGISTER_TARGET_PRAGMAS): Define, call ix86_register_pragmas.
3780
3781         * config/i386/i386.opt (arch): New TargetSave field to define
3782         fields that need to be saved for function specific option support.
3783         (tune): Ditto.
3784         (fpmath): Ditto.
3785         (branch_cost): Ditto.
3786         (ix86_isa_flags_explicit): Ditto.
3787         (tune_defaulted): Ditto.
3788         (arch_specified): Ditto.
3789         (-m128-long-double): Add Save flag to save option for target
3790         specific option support.
3791         (-m80387): Ditto.
3792         (-maccumulate-outgoing-args): Ditto.
3793         (-malign-double): Ditto.
3794         (-malign-stringops): Ditto.
3795         (-mfancy-math-387): Ditto.
3796         (-mhard-float): Ditto.
3797         (-mieee-fp): Ditto.
3798         (-minline-all-stringops): Ditto.
3799         (-minline-stringops-dynamically): Ditto.
3800         (-mms-bitfields): Ditto.
3801         (-mno-align-stringops): Ditto.
3802         (-mno-fancy-math-387): Ditto.
3803         (-mno-push-args): Ditto.
3804         (-mno-red-zone): Ditto.
3805         (-mpush-args): Ditto.
3806         (-mred-zone): Ditto.
3807         (-mrtd): Ditto.
3808         (-msseregparm): Ditto.
3809         (-mstack-arg-probe): Ditto.
3810         (-m32): Ditto.
3811         (-m64): Ditto.
3812         (-mmmx): Ditto.
3813         (-m3dnow): Ditto.
3814         (-m3dnowa): Ditto.
3815         (-msse): Ditto.
3816         (-msse2): Ditto.
3817         (-msse3): Ditto.
3818         (-msse4.1): Ditto.
3819         (-msse4.2): Ditto.
3820         (-msse4): Ditto.
3821         (-mno-sse4): Ditto.
3822         (-msse4a): Ditto.
3823         (-msse5): Ditto.
3824         (-mrecip): Move flag into target_flags.
3825         (-mcld): Ditto.
3826         (-mno-fused-madd): Ditto.
3827         (-mfused-madd): Ditto.
3828         (-mabm): Move flag into ix86_isa_flags.
3829         (-mcx16): Ditto.
3830         (-mpopcnt): Ditto.
3831         (-msahf): Ditto.
3832         (-maes): Ditto.
3833         (-mpclmul): Ditto.
3834
3835         * config/i386/i386-c.c: New file for #pragma support.
3836         (ix86_target_macros_internal): New function to #define or #undef
3837         target macros based when the user uses the #pragma GCC option to
3838         change target options.
3839         (ix86_pragma_option_parse): New function to add #pragma GCC option
3840         support.
3841         (ix86_target_macros): Move defining the target macros here from
3842         TARGET_CPU_CPP_BUILTINS in i386.h.
3843         (ix86_register_pragmas): Register the #pragma GCC option hook.  If
3844         defined, initialize any subtarget #pragmas.
3845
3846         * config/i386/darwin.h (REGISTER_SUBTARGET_PRAGMAS): Rename from
3847         REGISTER_TARGET_PRAGMAS.
3848
3849         * config/i386/t-i386: New file for x86 dependencies.
3850         (i386.o): Make dependencies mirror the include files used.
3851         (i386-c.o): New file, add dependencies.
3852
3853         * config/i386/i386-protos.h (override_options): Add bool argument.
3854         (ix86_valid_option_attribute_tree): Add declaration.
3855         (ix86_target_macros): Ditto.
3856         (ix86_register_macros): Ditto.
3857
3858         * config/i386/i386.c (ix86_tune_features): Move initialization of
3859         the target masks to initial_ix86_tune_features to allow functions
3860         to have different target options.  Make type unsigned char,
3861         instead of unsigned int.
3862         (initial_ix86_tune_features): New static vector to hold processor
3863         masks for the tune variables.
3864         (ix86_arch_features): Move initialization of the target masks to
3865         initial_ix86_arch_features to allow functions to have different
3866         target options.  Make type unsigned char, instead of unsigned int.
3867         (initial_ix86_arch_features): New static vector to hold processor
3868         masks for the arch variables.
3869         (enum ix86_function_specific_strings): New enum to describe the
3870         string options used for attribute((option(...))).
3871         (ix86_target_string): New function to return a string that
3872         describes the target options.
3873         (ix86_debug_options): New function to print the current options in
3874         the debugger.
3875         (ix86_function_specific_save): New function hook to save the
3876         function specific global variables in the cl_target_option structure.
3877         (ix86_function_specific_restore): New function hook to restore the
3878         function specific variables from the cl_target_option structure to
3879         the global variables.
3880         (ix86_function_specific_print): New function hook to print the
3881         target specific options in the cl_target_option structure.
3882         (ix86_valid_option_attribute_p): New function hook to validate
3883         attribute((option(...))) arguments.
3884         (ix86_valid_option_attribute_tree): New function that is common
3885         code between attribute((option(...))) and #pragma GCC option
3886         support that parses the options and returns a tree holding the options.
3887         (ix86_valid_option_attribute_inner_p): New helper function for
3888         ix86_valid_option_attribute_tree.
3889         (ix86_can_inline_p): New function hook to decide if one function
3890         can inline another on a target specific basis.
3891         (ix86_set_current_function); New function hook to switch target
3892         options if the user used attribute((option(...))) or #pragma GCC
3893         option.
3894         (ix86_tune_defaulted): Move to static file scope from
3895         override_options.
3896         (ix86_arch_specified): Ditto.
3897         (OPTION_MASK_ISA_AES_SET): New macro for moving switches into
3898         ix86_isa_flags.
3899         (OPTION_MASK_ISA_PCLMUL_SET): Ditto.
3900         (OPTION_MASK_ISA_ABM_SET): Ditto.
3901         (OPTION_MASK_ISA_POPCNT_SET): Ditto.
3902         (OPTION_MASK_ISA_CX16_SET): Ditto.
3903         (OPTION_MASK_ISA_SAHF_SET): Ditto.
3904         (OPTION_MASK_ISA_AES_UNSET): Ditto.
3905         (OPTION_MASK_ISA_PCLMUL_UNSET): Ditto.
3906         (OPTION_MASK_ISA_ABM_UNSET): Ditto.
3907         (OPTION_MASK_ISA_POPCNT_UNSET): Ditto.
3908         (OPTION_MASK_ISA_CX16_UNSET): Ditto.
3909         (OPTION_MASK_ISA_SAHF_UNSET): Ditto.
3910         (struct ptt): Move to static file scope from override_options.
3911         (processor_target_table): Ditto.
3912         (cpu_names): Ditto.
3913         (ix86_handle_option): Add support for options that are now isa options.
3914         (override_options): Add support for declaring functions that
3915         support different target options than were specified on the
3916         command line.  Move struct ptt, processor_target_table, cpu_names,
3917         ix86_tune_defaulted, ix86_arch_specified to static file scope.
3918         Add bool argument.  Fix up error messages so the appropriate error
3919         is given for either command line or attribute.
3920         (ix86_previous_fndecl): New static to remember previous function
3921         declaration to see if we need to change target options.
3922         (ix86_builtins_isa): New array to record the ISA of each builtin
3923         function.
3924         (def_builtin): Always create the builtin function, even if the
3925         current ISA doesn't support it.
3926         (ix86_init_mmx_sse_builtins): Remove TARGET_AES and TARGET_PCLMUL
3927         tests for those builtins.
3928         (ix86_init_builtins): Remove TARGET_MMX test for calling
3929         ix86_init_mmx_sse_builtins.
3930         (ix86_expand_builtin): If the current ISA doesn't support a given
3931         builtin, signal an error.
3932         (TARGET_VALID_OPTION_ATTRIBUTE_P): Set target hook.
3933         (TARGET_SET_CURRENT_FUNCTION): Ditto.
3934         (TARGET_OPTION_SAVE): Ditto.
3935         (TARGET_OPTION_RESTORE): Ditto.
3936         (TARGET_OPTION_PRINT): Ditto.
3937         (TARGET_CAN_INLINE_P): Ditto.
3938
3939 2008-07-22  Rafael Avila de Espindola  <espindola@google.com>
3940
3941         * c-typeck.c (build_external_ref): Don't call assemble_external.
3942         * final.c (output_operand): Call assemble_external.
3943
3944 2008-07-21  DJ Delorie  <dj@redhat.com>
3945
3946         * config/h8300/h8300.c (h8300_hard_regno_scratch_ok): New.
3947         (TARGET_HARD_REGNO_SCRATCH_OK): Define.
3948
3949 2008-07-21  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
3950
3951         * config/spu/spu.md ("div<mode>3"): Convert into expander, move
3952         original insn and splitter contents into ...
3953         ("*div<mode>3_fast"): ... this new pattern.  Enable only if
3954         flag_unsafe_math_optimizations.  Add dummy scratch register.
3955         ("*div<mode>3_adjusted"): New insn and splitter.  Enable only if
3956         !flag_unsafe_math_optimizations.  Returns number with next
3957         highest magnitude if this is still less or equal to the true
3958         quotient in magnitude.
3959
3960 2008-07-21  Rafael Avila de Espindola  <espindola@google.com>
3961
3962         * Makefile.in: Replace toplev.h with TOPLEV_H.
3963         * c-decl.c (merge_decls): Don't set DECL_IN_SYSTEM_HEADER.
3964         * c-lex.c (fe_file_change): Don't set in_system_header.
3965         * c-parser.c (c_token): Remove in_system_header.
3966         (c_lex_one_token): Don't set in_system_header.
3967         (c_parser_set_source_position_from_token): Don't set in_system_header.
3968         * diagnostic.c (diagnostic_report_diagnostic): Use location from
3969         diagnostic_info.
3970         (warning_at): New.
3971         * diagnostic.h (diagnostic_report_warnings_p): Add LOC argument.
3972         * flags.h (in_system_header): Remove.