OSDN Git Service

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