OSDN Git Service

10087ab183fcdc9ca8503dcc92e643e62e3dea46
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2008-09-03  David Edelsohn  <edelsohn@gnu.org>
2
3         * config/rs6000/rs6000.c (processor_target_table): Do not
4         enable VMX for POWER6.
5
6 2008-09-03  Anton Blanchard  <anton@samba.org>
7
8         * config/rs6000/rs6000.c (rs6000_split_lock_test_and_set): Do not
9         emit memory barrier before operation.
10
11 2008-09-03  John David Anglin  <dave.anglin@nrc.cnrc.gc.ca>
12
13         PR testsuite/37325
14         * config/pa/pa64-hpux.h (ASM_OUTPUT_EXTERNAL_REAL): Call
15         default_elf_asm_output_external.
16
17 2008-09-03  Jeff Law  <law@redhat.com>
18
19         * h8300.c (expand_a_shift): Avoid invalid RTL sharing.
20
21 2008-09-03  Richard Henderson  <rth@redhat.com>
22
23         * config/alpha/alpha.c (alpha_split_lock_test_and_set): Move
24         memory barrier to below the test-and-set.
25         (alpha_split_lock_test_and_set_12): Likewise.
26
27 2008-09-03  Vladimir Makarov  <vmakarov@redhat.com>
28
29         PR rtl-opt/37243
30
31         * ira-int.h (ira_loop_tree_node): Rename mentioned_allocnos to
32         all_allocnos.
33
34         * ira-color.c (print_loop_title): Use all_allocnos.
35         (color_pass): Ditto.  Don't add border_allocnos.  Check that
36         subloop allocno in the correspdoning bitmap all_allocnos.
37
38         * ira-emit.c (change_loop): Use all_allocnos.
39
40         * ira-build.c (create_loop_tree_nodes, finish_loop_tree_node):
41         Ditto.
42         (ira_create_allocno): Set up all_allocnos bit for the created
43         allocno.
44         (create_cap_allocno): Remove setting mentioned_allocnos.
45         (create_insn_allocnos): Ditto.
46         (remove_unnecessary_allocnos): Use all_allocnos.
47         (check_allocno_creation): Check that allocnos are in the
48         corresponding bitmap all_allocnos.
49         
50 2008-09-03  Vladimir Makarov  <vmakarov@redhat.com>
51
52         PR rtl-opt/37243
53         
54         * ira-conflicts.c (REG_SUBREG_P, go_through_subreg): New.
55         (process_regs_for_copy): Process subregs.  Refine check when cost
56         is taken into account in ira-costs.c.
57         (process_reg_shuffles): Use REG_SUBREG_P.
58         (add_insn_allocno_copies): Ditto.  Ignore modes.
59
60         * ira-color.c (conflict_allocno_vec): New.
61         (COST_HOP_DIVISOR): New macro.
62         (update_copy_costs_1): Use it.
63         (update_conflict_hard_regno_costs): New function.
64         (assign_hard_reg): Use it.
65         (ira_color): Allocate and free conflict_allocno_vec.
66  
67 2008-09-03  Vladimir Makarov  <vmakarov@redhat.com>
68
69         PR rtl-opt/37296
70
71         * ira-int.h (ira_sort_insn_chain): Remove.
72
73         * ira.c (basic_block_order_nums, chain_insn_order,
74         chain_freq_compare, chain_bb_compare, ira_sort_insn_chain): Remove.
75         (ira): Don't call ira_sort_insn_chain.
76
77         * reload1.c (reload): Don't call ira_sort_insn_chain.
78
79 2008-09-03  Andrew Pinski  <andrew_pinski@playstation.sony.com>
80
81         PR middle-end/37293
82         * cgraphunit.c (update_call_expr): Remove eh regions from statements
83         which become non throw.
84         (cgraph_function_versioning): Also clear DECL_WEAK.  Call
85         update_call_expr after updating the flags on the decl.
86
87 2008-09-03  Jan Hubicka  <jh@suse.cz>
88
89         PR tree-optimization/37315
90         * cgraph.c (cgraph_create_edge): Use gimple_has_body_p.
91         * cgraphunit.c (verify_cgraph_node): drop gimple_body check.
92         (cgraph_analyze_functions): Use node->analyzed
93         (cgraph_mark_functions_to_output): Likewise.
94         (cgraph_expand_function): All functions can be released after
95         expanding.
96         (cgraph_optimize): Use gimple_has_body_p.
97         * ipa-inline.c (cgraph_clone_inlined_nodes): Use analyzed flag.
98         (cgraph_decide_inlining_incrementally): Likewise.
99         (inline_transform): Inline transform.
100         * tree-inline.c (initialize_cfun): Do now shallow copy structure;
101         copy fields needed.
102         (inlinable_function_p): Drop gimple_body check.
103         (expand_call_inline): Use gimple_has_body_p.
104         * gimple.c (gimple_has_body_p): New.
105         * gimple.h (gimple_has_body_p): Add prototype.
106         * tree-cfg.c (execute_build_cfg): Remove gimple_body.
107         (dump_function_to_file): Use gimple_has_body_p check.
108
109 2008-09-03  Jakub Jelinek  <jakub@redhat.com>
110
111         PR c++/37346
112         * gimple.h (gimple_has_substatements): GIMPLE_OMP_CRITICAL has
113         substatements.
114         * tree-inline.c (remap_gimple_stmt): Handle GIMPLE_OMP_CRITICAL.
115
116 2008-09-03  Bernd Schmidt  <bernd.schmidt@analog.com>
117
118         From Michael Frysinger  <michael.frysinger@analog.com>
119         * config/bfin/bfin.c (bfin_cpus[]): Add 0.1 for bf522, bf523, bf524,
120         bf525, bf526, bf527, bf542, bf544, bf547, bf548, and bf549.  Add 0.2
121         for bf538.
122
123 2008-09-03  Hari Sandanagobalane  <hariharan@picochip.com>
124
125         Add picoChip port.
126         * doc/extend.texi: Document picoChip builtin functions.
127         * doc/invoke.texi: Document picoChip options.
128         * doc/contrib.texi: Add picoChip contribution.
129         * doc/md.texi: Document picoChip constraints.
130         * config.gcc: Add picochip-*-*.
131         * config/picochip/: Add new port.
132
133 2008-09-03  Richard Guenther  <rguenther@suse.de>
134
135         PR tree-optimization/37328
136         * tree-sra.c (sra_build_assignment): Gimplify properly.
137         (generate_copy_inout): Take the correct stmt as definition,
138         remove bogus assert.
139
140 2008-09-03  Bernd Schmidt  <bernd.schmidt@analog.com>
141
142         * config/bfin/bfin.c (bfin_expand_prologue): Honour no_stack_limit
143         attributes.
144
145         From Michael Frysinger  <michael.frysinger@analog.com>
146         * config/bfin/bfin.c (bfin_handle_option): Remove BF561 warning.
147
148 2008-09-03 Danny Smith  <dannysmith@usrs.sourceforge.net>
149
150         * gthr-win32.h (CONST_CAST2): Really make sure CONST_CAST2 is
151         defined.
152         (__gthread_setspecific): Revert 2008-08-31 change to
153         __GTHREAD_HIDE_W32API case.  Apply it to !__GTHREAD_HIDE_W32API
154         case.
155
156 2008-09-02  Aldy Hernandez  <aldyh@redhat.com>
157
158         * diagnostic.c (error_at): New.
159         * toplev.h (error_at): New prototype.
160         * c-typeck.c (build_array_ref): Call error_at instead of error.
161         Pass location to pedwarn.
162
163 2008-09-02  Adam Nemet  <anemet@caviumnetworks.com>
164
165         * sel-sched.c (sel_hard_regno_rename_ok): Mark arguments unused.
166
167 2008-09-02  Jakub Jelinek  <jakub@redhat.com>
168
169         * dwarf2out.c (tree_add_const_value_attribute): Only handle
170         VAR_DECL and CONST_DECL.
171
172 2008-09-02  H.J. Lu  <hongjiu.lu@intel.com>
173             Jakub Jelinek  <jakub@redhat.com>
174
175         * config/i386/i386.c (X86_64_VARARGS_SIZE): Removed.
176         (setup_incoming_varargs_64): Assume cum != NULL. Set/check
177         ix86_varargs_gpr_size and ix86_varargs_fpr_size.  Use
178         ix86_varargs_gpr_size instead of X86_64_REGPARM_MAX.
179         Don't set ix86_save_varrargs_registers.
180         (ix86_setup_incoming_varargs): Assume cum != NULL.
181         (ix86_va_start): Check ix86_varargs_gpr_size and
182         ix86_varargs_fpr_size instead of cfun->va_list_gpr_size and
183         cfun->va_list_fpr_size, respectively.  Subtract 8*X86_64_REGPARM_MAX
184         from frame pointer if ix86_varargs_gpr_size == 0.
185         (ix86_compute_frame_layout): Updated.
186         * config/i386/i386.h (ix86_save_varrargs_registers): Removed.
187         (ix86_varargs_gpr_size): Define.
188         (ix86_varargs_fpr_size): Likewise.
189         (machine_function): Remove save_varrargs_registers.
190         Add varargs_gpr_size and varargs_fpr_size.
191
192 2008-09-02  Jakub Jelinek  <jakub@redhat.com>
193
194         * config/alpha/alpha.c (va_list_skip_additions,
195         alpha_stdarg_optimize_hook, alpha_gimplify_va_arg_1): Tuplify.
196         (alpha_gimplify_va_arg): Call unshare_expr on second use of
197         offset_field.
198
199         PR tree-optimization/36766
200         * tree-cfg.c (gimple_purge_all_dead_eh_edges): Do nothing
201         for already removed basic blocks.
202
203         PR target/36332
204         * real.c (real_maxval): Clear a lower bit to make real_maxval
205         match get_max_float for IBM long double format.
206
207 2008-09-02  Andreas Schwab  <schwab@suse.de>
208
209         * configure.ac: Use m4_quote to quote the expansion of m4_do.
210         * configure: Regenerate.
211
212 2008-09-02  Richard Sandiford  <rdsandiford@googlemail.com>
213
214         * simplify-rtx.c (simplify_binary_operation_1): Check for CONST,
215         SYMBOL_REF and LABEL_REF when applying plus_constant, instead of
216         checking for a non-VOID CONSTANT_P.
217
218 2008-09-02  Jan Hubicka  <jh@suse.cz>
219
220         * predict.c (pass_strip_predict_hints): Avoid bugs dump file.
221         * expmed.c (expand_divmod): Fix test of smod_pow2_cheap and sdiv_pow2_cheap
222
223 2008-09-02  H.J. Lu  <hongjiu.lu@intel.com>
224
225         * expr.c (emit_group_store): Don't assert stack temp mode size.
226
227 2008-09-02  Sebastian Pop  <sebastian.pop@amd.com>
228             Tobias Grosser  <grosser@fim.uni-passau.de>
229             Jan Sjodin  <jan.sjodin@amd.com>
230             Harsha Jagasia  <harsha.jagasia@amd.com>
231             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
232             Konrad Trifunovic  <konrad.trifunovic@inria.fr>
233             Adrien Eliche  <aeliche@isty.uvsq.fr>
234
235         Merge from graphite branch.
236         * graphite.c: New.
237         * graphite.h: New.
238         * tree-loop-linear.c (perfect_loop_nest_depth): Export.
239         * doc/invoke.texi (-floop-block, -floop-interchange,
240         -floop-strip-mine): Document new flags.
241         * tree-into-ssa.c (gimple_vec): Moved...
242         * tree-loop-distribution.c (rdg_component): Moved...
243         * cfgloopmanip.c: Include tree-flow.h.
244         (update_dominators_in_loop): New.
245         (create_empty_if_region_on_edge): New.
246         (create_empty_loop_on_edge): New.
247         (loopify): Use update_dominators_in_loop.
248         * tree-pass.h (pass_graphite_transforms): Declared.
249         * configure: Regenerate.
250         * tree-phinodes.c (make_phi_node): Export.
251         (add_phi_node_to_bb): New, split from create_phi_node.
252         * tree-chrec.c (for_each_scev_op): New.
253         * tree-chrec.h (for_each_scev_op): Declared.
254         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
255         (remove_statement): Call get_phi_with_result.
256         * config.in (HAVE_cloog): Undef.
257         * gdbinit.in (pgg): New.
258         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
259         * tree-ssa-loop.c (graphite_transforms): New.
260         (gate_graphite_transforms): New.
261         (pass_graphite_transforms): New.
262         * configure.ac (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC,
263         HAVE_cloog): Defined.
264         * tree-vectorizer.c (rename_variables_in_bb): Export.
265         * tree-data-ref.c (dr_may_alias_p): Export.
266         (stmt_simple_memref_p): New.
267         (find_data_references_in_stmt): Export.
268         (find_data_references_in_loop): Export.
269         (create_rdg_edge_for_ddr): Initialize RDGE_RELATION.
270         (create_rdg_edges_for_scalar): Initialize RDGE_RELATION.
271         (create_rdg_vertices): Export.
272         (build_empty_rdg): New.
273         (build_rdg): Call build_empty_rdg.  Free dependence_relations.
274         * tree-data-ref.h (rdg_component): ... here.
275         (scop_p): New.
276         (struct data_reference): Add a field scop.
277         (DR_SCOP): New.
278         (find_data_references_in_loop): Declared.
279         (find_data_references_in_stmt): Declared.
280         (create_rdg_vertices): Declared.
281         (dr_may_alias_p): Declared.
282         (stmt_simple_memref_p): Declared.
283         (struct rdg_edge): Add a field ddr_p relation.
284         (build_empty_rdg): Declared.
285         * lambda.h (lambda_matrix): Declare a VEC of.
286         (find_induction_var_from_exit_cond): Declared.
287         (lambda_vector_compare): New.
288         * common.opt (fgraphite, floop-strip-mine,
289         floop-interchange, floop-block): New flags.
290         * lambda-code.c (find_induction_var_from_exit_cond): Export.
291         * cfgloop.c (is_loop_exit): New.
292         * cfgloop.h (is_loop_exit): Declared.
293         (create_empty_if_region_on_edge): Declared.
294         (create_empty_loop_on_edge): Declared.
295         * tree-flow.h (add_phi_node_to_bb): Declared.
296         (make_phi_node): Declared.
297         (rename_variables_in_bb): Declared.
298         (perfect_loop_nest_depth): Declared.
299         (graphite_transform_loops): Declared.
300         * Makefile.in (cfgloopmanip.o): Depend on TREE_FLOW_H.
301         (graphite.o-warn): Add -Wno-error.
302         (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): Declared.
303         (LIBS): Add GMPLIBS, CLOOGLIBS, PPLLIBS.
304         (INCLUDES): Add PPLINC, CLOOGINC.
305         (OBJS-common): Add graphite.o.
306         (graphite.o): Add rule.
307         * gimple.h (gimple_vec): ... here.
308         * tree-cfg.c (print_loops): Start printing at ENTRY_BLOCK_PTR.
309         * passes.c (init_optimization_passes): Schedule 
310         pass_graphite_transforms.
311
312 2008-09-02  Samuel Tardieu  <sam@rfc1149.net>
313
314         PR target/37283
315         * opts.c (decode_options): Move processing of -fno-unit-at-a-time
316         and -fno-toplevel-reorder after handle_options.
317
318 2008-09-02  Paul Brook  <paul@codesourcery.com>
319
320         * config/arm/arm.c (arm_tune_cortex_a9): Define.
321         (arm_override_options): Set arm_tune_cortex_a9.
322         (arm_rtx_costs_1): Make register shifts more expensive on Cortex-A9.
323         (arm_issue_rate): Handle cortexa9.
324         * config/arm/arm.h (arm_tune_cortex_a9): Declare.
325         * config/arm/arm-cores.def: Add cortex-a9.
326         * config/arm/arm-tune.md: Regenerate.
327         * config/arm/arm.md: Include cortex-a9.md.
328         (generic_sched, generic_vfp): Add cortexa9.
329         * config/arm/cortex-a9.md: New file.
330
331 2008-09-02  Richard Guenther  <rguenther@suse.de>
332
333         PR tree-optimization/37327
334         * tree-vrp.c (register_new_assert_for): Make sure to not have
335         TREE_OVERFLOW set on the bound.
336
337 2008-09-02  Alexander Monakov  <amonakov@ispras.ru>
338
339         Fixed typo in date of the 2008-09-01 MOVE_RATIO commit.
340
341         * config/ia64/ia64.opt (msched-ar-data-spec): Default to 1.
342         * config/ia64/ia64.c (ia64_set_sched_flags): Always initialize
343         spec_info->mask.
344
345 2008-09-02  Victor Kaplansky  <victork@il.ibm.com>
346
347         * gcc/config/spu/spu.md (divdf3): Removed.
348
349 2008-09-02  Jakub Jelinek  <jakub@redhat.com>
350
351         PR tree-optimization/37095
352         * cgraph.c (cgraph_node): When creating new cgraph node after
353         assembler_name_hash has been populated, record it in the hash
354         table.
355
356 2008-09-01  Paul Brook  <paul@codesourcery.com>
357
358         * doc/invoke.texi: Document -mword-relocations.
359         * config/arm/uclinux-elf.h (TARGET_DEFAULT_WORD_RELOCATIONS): Define.
360         * config/arm/symbian.h (TARGET_DEFAULT_WORD_RELOCATIONS): Define.
361         * config/arm/vxworks.h (TARGET_DEFAULT_WORD_RELOCATIONS): Define.
362         * config/arm/arm.c (arm_split_constant): Use arm_emit_movpair.
363         (arm_rtx_costs_1, arm_size_rtx_costs): Handle HIGH and LO_SUM.
364         (arm_emit_movpair): New function.
365         (arm_print_operand <c>): Handle sybolic addresses.
366         * config/arm/arm.h (TARGET_USE_MOVT): Define.
367         (TARGET_DEFAULT_WORD_RELOCATIONS): Define.
368         * config/arm/arm-protos.h (arm_emit_movpair): Add prototype.
369         * config/arm/arm.opt: Add -mword-relocations.
370         * config/arm/arm.md (movsi): Use arm_emit_movpair.
371         (arm_movt, arm_movw): New.
372
373 2008-09-01  Paul Brook  <paul@codesourcery.com>
374
375         * config/arm/arm.c (arm_override_options): Set arm_abi earlier.
376         Allow Interworking on ARMv4 EABI based targets.
377         * config/arm/bpabi.h (TARGET_FIX_V4BX_SPEC): Define.
378         (SUBTARGET_EXTRA_ASM_SPEC, LINK_SPEC): Add TARGET_FIX_V4BX_SPEC.
379
380 2008-09-01  Paul Brook  <paul@codesourcery.com>
381
382         * config/arm/thumb2.md (thumb2_negscc): Match the correct operand for
383         optimized LT0 test.  Remove optimization for GT.
384
385 2008-09-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
386
387         * pa64-hpux.h (LIB_SPEC): Link against librt when building static
388         openmp applications.
389         * pa-hpux11.h (LIB_SPEC): Likewise.
390
391         * ira.c (setup_eliminable_regset): Only declare i if ELIMINABLE_REGS is
392         defined.
393
394 2008-09-01  Jan Hubicka  <jh@suse.cz>
395
396         * predict.c (maybe_hot_count_p, maybe_hot_edge_p): When profile is
397         present, use only counts; when guessed use only frequencies.
398         (estimate_bb_frequencies): Use function_frequency.
399         * profile.c (compute_branch_probabilities): Exit early when
400         profile reading failed. Set profile_status.
401         (branch_prob): Do not set profile_status.
402
403 2008-09-01  Aldy Hernandez  <aldyh@redhat.com>
404
405         * tree.c (protected_set_expr_location): New.
406         * tree.h (protected_set_expr_location): New prototype.
407         * c-tree.h (build_array_ref): Add argument.
408         (parser_build_unary_op): Same.
409         * c-typeck.c (build_indirect_ref): Handle new location argument.
410         (build_array_ref): Same.
411         (parser_build_unary_op): Same.
412         * gimplify.c (gimplify_asm_expr): Set input_location before calling
413         error.
414         * c-omp.c (c_finish_omp_atomic): Pass location when calling
415         build_indirect_ref.
416         * c-common.c (finish_label_address_expr): Handle new location
417         argument.
418         * c-common.h (build_indirect_ref): Add argument.
419         (finish_label_address_expr): Same.
420         * c-parser.c (c_parser_unary_expression): Pass location to build
421         functions.
422         (c_parser_postfix_expression): Same.
423
424 2008-09-01  Paul Brook  <paul@codesourcery.com>
425
426         * config/arm/arm.md: Include cortex-r4f.md.
427         (attr fpu): Update type list.
428         (attr type): Add fcpys, ffariths, ffarithd, fadds, faddd, fconsts,
429         fconstd, fcmps and fcmpd.
430         (attr tune_cortexr4): Define.
431         (attr generic_sched, attr generic_vfp): Use tune_cortexr4.
432         * config/arm/vfp.md: Document fcpys, ffariths, ffarithd, fadds, faddd,
433         fconsts, fconstd, fcmps and fcmpd.  Use them in insn patterns.
434         * config/arm/arm.c (arm_issue_rate): Add cortexr4f.
435         * config/arm/arm1020e.md (v10_ffarith, v10_farith): Use new insn
436         types.
437         * config/arm/cortex-a8-neon.md (cortex_a8_vfp_add_sub,
438         cortex_a8_vfp_farith: Ditto.
439         * config/arm/vfp11.md (vfp_ffarith, vfp_farith): Ditto.
440         * config/arm/cortex-r4.md: Use tune_cortexr4.
441         * config/arm/cortex-r4f.md: New file.
442
443 2008-09-01  Richard Guenther  <rguenther@suse.de>
444
445         PR tree-optimization/37305
446         * tree-ssa-ccp.c (ccp_fold): Do not set TREE_OVERFLOW on
447         the result of constant conversions.
448         (fold_gimple_assign): Likewise.
449
450 2008-09-01  Andrey Belevantsev  <abel@ispras.ru>
451
452         * sel-sched-ir.c (cmp_v_in_regset_pool): Surround with
453         #ifdef ENABLE_CHECKING.
454
455 2008-09-01  Andrey Belevantsev  <abel@ispras.ru>
456
457         * sel-sched-dump.c: Surround with #ifdef INSN_SCHEDULING.
458         * sched-int.h (print_insn, print_pattern, print_value): Declare also
459         when !INSN_SCHEDULING.
460
461 2008-09-01  Andreas Schwab  <schwab@suse.de>
462
463         * config/ia64/ia64.c (TARGET_ADDRESS_COST): Update.
464
465 2008-09-01  Paul Brook  <paul@codesourcery.com>
466
467         * config/arm/arm.c (arm_no_early_mul_dep): Handle multiply-subtract.
468
469 2008-09-01  Jan Hubicka  <jh@suse.cz>
470
471         * config/spu/spu.c (spu_expand_block_move) Update call of MOVE_RATIO.
472
473         * expr.c (MOVE_BY_PIECES_P, CLEAR_BY_PIECES_P, SET_BY_PIECES_P): Pass speed operand.
474         * expr.h (MOVE_RATIO, CLEAR_RATIO, SET_RATIO): Update.
475         * gimplify.c (gimplify_init_constructor): Add speed operand.
476         * tree-sra.c (decide_block_copy): Likewise.
477         * tree-inline.c (estimate_move_cost): Likewise.
478         * config/alpha/alpha.h (MOVE_RATIO): Update.
479         * config/frv/frv.c (MOVE_RATIO): Update.
480         * config/spu/spu.h (MOVE_RATIO): Update.
481         * config/sparc/sparc.h (MOVE_RATIO): Update.
482         * config/i386/i386.h (MOVE_RATIO, CLEAR_RATIO): Update.
483         * config/m68hc11/m68hc11.h (MOVE_RATIO): Update.
484         * config/cris/cris.h (MOVE_RATIO): Update.
485         * config/mn10300/mn10300.h (MOVE_RATIO): Update.
486         * config/arm/arm.h (MOVE_RATIO): Update.
487         * config/pa/pa.md: Update uses of MOVE_RATIO
488         * config/pa/pa.h (MOVE_RATIO): Update.
489         * config/mips/mips.h (MOVE_RATIO, MOVE_BY_PIECES, CLEAR_RATIO, SET_RATIO): Update.
490         * config/h8300/h8300.h (MOVE_RATIO): Update.
491         * config/v850/v850.h (MOVE_RATIO): Update.
492         * config/bfin/bfin.h (MOVE_RATIO): Update.
493
494 2008-08-31  Andrey Belevantsev  <abel@ispras.ru>
495         Dmitry Melnik  <dm@ispras.ru>
496         Dmitry Zhurikhin  <zhur@ispras.ru>
497         Alexander Monakov  <amonakov@ispras.ru>
498         Maxim Kuvyrkov  <maxim@codesourcery.com>
499
500         * sel-sched.h, sel-sched-dump.h, sel-sched-ir.h, sel-sched.c,
501         sel-sched-dump.c, sel-sched-ir.c: New files.
502         * Makefile.in (OBJS-common): Add selective scheduling object
503         files.
504         (sel-sched.o, sel-sched-dump.o, sel-sched-ir.o): New entries.
505         (SEL_SCHED_IR_H, SEL_SCHED_DUMP_H): New entries.
506         (sched-vis.o): Add dependency on $(INSN_ATTR_H).
507         * cfghooks.h (get_cfg_hooks, set_cfg_hooks): New prototypes.
508         * cfghooks.c (get_cfg_hooks, set_cfg_hooks): New functions.
509         (make_forwarder_block): Update loop latch if we have redirected
510         the loop latch edge.
511         * cfgloop.c (get_loop_body_in_custom_order): New function.
512         * cfgloop.h (LOOPS_HAVE_FALLTHRU_PREHEADERS): New enum field.
513         (CP_FALLTHRU_PREHEADERS): Likewise.
514         (get_loop_body_in_custom_order): Declare.
515         * cfgloopmanip.c (has_preds_from_loop): New.
516         (create_preheader): Honor CP_FALLTHRU_PREHEADERS.
517         Assert that the preheader edge will be fall thru when it is set.
518         * common.opt (fsel-sched-bookkeeping, fsel-sched-pipelining,
519         fsel-sched-pipelining-outer-loops, fsel-sched-renaming,
520         fsel-sched-substitution, fselective-scheduling): New flags.
521         * cse.c (hash_rtx_cb): New.
522         (hash_rtx): Use it.
523         * dbgcnt.def (sel_sched_cnt, sel_sched_region_cnt,
524         sel_sched_insn_cnt): New counters.
525         * final.c (compute_alignments): Export.  Free dominance info after loop_optimizer_finalize.
526         * genattr.c (main): Output maximal_insn_latency prototype.
527         * genautomata.c (output_default_latencies): New. Factor its code from ...
528         (output_internal_insn_latency_func): ... here.
529         (output_internal_maximal_insn_latency_func): New.
530         (output_maximal_insn_latency_func): New.
531         * hard-reg-set.h (UHOST_BITS_PER_WIDE_INT): Define unconditionally.
532         (struct hard_reg_set_iterator): New.
533         (hard_reg_set_iter_init, hard_reg_set_iter_set,
534         hard_reg_set_iter_next): New functions.
535         (EXECUTE_IF_SET_IN_HARD_REG_SET): New macro.
536         * lists.c (remove_free_INSN_LIST_node,
537         remove_free_EXPR_LIST_node): New functions.
538         * loop-init.c (loop_optimizer_init): When LOOPS_HAVE_FALLTHRU_PREHEADERS,
539         set CP_FALLTHRU_PREHEADERS when calling create_preheaders.
540         (loop_optimizer_finalize): Do not verify flow info after reload.
541         * recog.c (validate_replace_rtx_1): New parameter simplify.
542         Default it to true.  Update all uses.  Factor out simplifying
543         code to ...
544         (simplify_while_replacing): ... this new function.
545         (validate_replace_rtx_part,
546         validate_replace_rtx_part_nosimplify): New.
547         * recog.h (validate_replace_rtx_part,
548         validate_replace_rtx_part_nosimplify): Declare.
549         * rtl.c (rtx_equal_p_cb): New.
550         (rtx_equal_p): Use it.
551         * rtl.h (rtx_equal_p_cb, hash_rtx_cb): Declare.
552         (remove_free_INSN_LIST_NODE, remove_free_EXPR_LIST_node,
553         debug_bb_n_slim, debug_bb_slim,    print_rtl_slim): Likewise.
554         * vecprim.h: Add a vector type for unsigned int.
555         * haifa-sched.c: Include vecprim.h and cfgloop.h.
556         (issue_rate, sched_verbose_param, note_list, dfa_state_size,
557         ready_try, cycle_issued_insns, spec_info): Make global.
558         (readyp): Initialize.
559         (dfa_lookahead): New global variable.
560         (old_max_uid, old_last_basic_block): Remove.
561         (h_i_d): Make it a vector.
562         (INSN_TICK, INTER_TICK, QUEUE_INDEX, INSN_COST): Make them work
563         through HID macro.
564         (after_recovery, adding_bb_to_current_region_p):
565         New variables to handle correct insertion of the recovery code.
566         (struct ready_list): Move declaration to sched-int.h.
567         (rgn_n_insns): Removed.
568         (rtx_vec_t): Move to sched-int.h.
569         (find_insn_reg_weight): Remove.
570         (find_insn_reg_weight1): Rename to find_insn_reg_weight.
571         (haifa_init_h_i_d, haifa_finish_h_i_d):
572         New functions to initialize / finalize haifa instruction data.
573         (extend_h_i_d, init_h_i_d): Rewrite.
574         (unlink_other_notes): Move logic to add_to_note_list.  Handle
575         selective scheduler.
576         (ready_lastpos, ready_element, ready_sort, reemit_notes,
577         find_fallthru_edge): Make global, remove static prototypes.
578         (max_issue): Make global.  Add privileged_n and state parameters.  Use
579         them.
580         (extend_global, extend_all): Removed.
581         (init_before_recovery): Add new param.  Fix the handling of the case
582         when we insert a recovery code before the EXIT which has a predecessor
583         with a fallthrough edge to it.
584         (create_recovery_block): Make global.  Rename to
585         sched_create_recovery_block.  Update.
586         (change_pattern): Rename to sched_change_pattern.  Make global.
587         (speculate_insn): Rename to sched_speculate_insn.  Make global.
588         Split haifa-specific functionality into ...
589         (haifa_change_pattern): New static function.
590         (sched_extend_bb): New static function.
591         (sched_init_bbs): New function.
592         (current_sched_info): Change type to struct haifa_sched_info.
593         (insn_cost): Adjust for selective scheduling.
594         (dep_cost_1): New function.  Move logic from ...
595         (dep_cost): ... here.
596         (dep_cost): Use dep_cost_1.
597         (contributes_to_priority_p): Use sched_deps_info instead of
598         current_sched_info.
599         (priority): Adjust to work with selective scheduling.  Process the
600         corner case when all dependencies don't contribute to priority.
601         (rank_for_schedule): Use ds_weak instead of dep_weak.
602         (advance_state): New function.  Move logic from ...
603         (advance_one_cycle): ... here.
604         (add_to_note_list, concat_note_lists): New functions.
605         (rm_other_notes): Make static.  Adjust for selective scheduling.
606         (remove_notes, restore_other_notes): New functions.
607         (move_insn): Add two arguments.  Update assert.  Don't call
608         reemit_notes.
609         (choose_ready): Remove lookahead variable, use dfa_lookahead.
610         Remove more_issue, max_points.  Move the code to initialize
611         max_lookahead_tries to max_issue.
612         (schedule_block): Remove rgn_n_insns1 parameter.  Don't allocate
613         ready.  Adjust use of move_insn.  Call restore_other_notes.
614         (luid): Remove.
615         (sched_init, sched_finish): Move Haifa-specific initialization/
616         finalization to ...
617         (haifa_sched_init, haifa_sched_finish): ... respectively.
618         New functions.
619         (setup_sched_dump): New function.
620         (haifa_init_only_bb): New static function.
621         (haifa_speculate_insn): New static function.
622         (try_ready): Use haifa_* instead of speculate_insn and
623         change_pattern.
624         (extend_ready, extend_all): Remove.
625         (sched_extend_ready_list, sched_finish_ready_list): New functions.
626         (create_check_block_twin, add_to_speculative_block): Use
627         haifa_insns_init instead of extend_global.  Update to use new
628         initialization functions.  Change parameter.  Factor out code from
629         create_check_block_twin to ...
630         (sched_create_recovery_edges) ... this new function.
631         (add_block): Remove.
632         (sched_scan_info): New.
633         (extend_bb): Use sched_scan_info.
634         (init_bb, extend_insn, init_insn, init_insns_in_bb, sched_scan): New
635         static functions for walking through scheduling region.
636         (sched_luids): New vector variable to replace uid_to_luid.
637         (luids_extend_insn): New function.
638         (sched_max_luid): New variable.
639         (luids_init_insn): New function.
640         (sched_init_luids, sched_finish_luids): New functions.
641         (insn_luid): New debug function.
642         (sched_extend_target): New function.
643         (haifa_init_insn): New static function.
644         (sched_init_only_bb): New hook.
645         (sched_split_block): New hook.
646         (sched_split_block_1): New function.
647         (sched_create_empty_bb): New hook.
648         (sched_create_empty_bb_1): New function.
649         (common_sched_info, ready): New global variables.
650         (current_sched_info_var): Remove.
651         (move_block_after_check): Use common_sched_info.
652         (haifa_luid_for_non_insn): New static function.
653         (init_before_recovery): Use haifa_init_only_bb instead of
654         add_block.
655         (increase_insn_priority): New.
656         * modulo-sched.c: (issue_rate): Remove static declaration.
657         (sms_sched_info): Change type to haifa_sched_info.
658         (sms_sched_deps_info, sms_common_sched_info): New variables.
659         (setup_sched_infos): New.
660         (sms_schedule): Initialize them.  Call haifa_sched_init/finish.
661         Do not call regstat_free_calls_crossed.
662         (sms_print_insn): Use const_rtx.
663         * params.def (PARAM_MAX_PIPELINE_REGION_BLOCKS,
664         PARAM_MAX_PIPELINE_REGION_INSNS, PARAM_SELSCHED_MAX_LOOKAHEAD,
665         PARAM_SELSCHED_MAX_SCHED_TIMES, PARAM_SELSCHED_INSNS_TO_RENAME,
666         PARAM_SCHED_MEM_TRUE_DEP_COST): New.
667         * sched-deps.c (sched_deps_info): New.  Update all relevant uses of
668         current_sched_info to use it.
669         (enum reg_pending_barrier_mode): Move to sched-int.h.
670         (h_d_i_d): New variable. Initialize to NULL.
671         ({true, output, anti, spec, forward}_dependency_cache): Initialize
672         to NULL.
673         (estimate_dep_weak): Remove static declaration.
674         (sched_has_condition_p): New function.  Adjust users of
675         sched_get_condition to use it instead.
676         (conditions_mutex_p): Add arguments indicating which conditions are
677         reversed.  Use them.
678         (sched_get_condition_with_rev): Rename from sched_get_condition.  Add
679         argument to indicate whether returned condition is reversed.  Do not
680         generate new rtx when condition should be reversed; indicate it by
681         setting new argument instead.
682         (add_dependence_list_and_free): Add deps parameter.
683         Update all users.  Do not free dependence list when
684         deps context is readonly.
685         (add_insn_mem_dependence, flush_pending_lists): Adjust for readonly
686         contexts.
687         (remove_from_dependence_list, remove_from_both_dependence_lists): New.
688         (remove_from_deps): New. Use the above functions.
689         (cur_insn, can_start_lhs_rhs_p): New static variables.
690         (add_or_update_back_dep_1): Initialize present_dep_type.
691         (haifa_start_insn, haifa_finish_insn, haifa_note_reg_set,
692         haifa_note_reg_clobber, haifa_note_reg_use, haifa_note_mem_dep,
693         haifa_note_dep): New functions implementing dependence hooks for
694         the Haifa scheduler.
695         (note_reg_use, note_reg_set, note_reg_clobber, note_mem_dep,
696         note_dep): New functions.
697         (ds_to_dt, extend_deps_reg_info, maybe_extend_reg_info_p): New
698         functions.
699         (init_deps): Initialize last_reg_pending_barrier and deps->readonly.
700         (free_deps): Initialize deps->reg_last.
701         (sched_analyze_reg, sched_analyze_1, sched_analyze_2,
702         sched_analyze_insn): Update to use dependency hooks infrastructure
703         and readonly contexts.
704         (deps_analyze_insn): New function.  Move part of logic from ...
705         (sched_analyze): ... here.  Also move some logic to ...
706         (deps_start_bb): ... here.  New function.
707         (add_forw_dep, delete_forw_dep): Guard use of INSN_DEP_COUNT with
708         sel_sched_p.
709         (sched_deps_init): New function.  Move code from ...
710         (init_dependency_caches): ... here.  Remove.
711         (init_deps_data_vector): New.
712         (sched_deps_finish): New function.  Move code from ...
713         (free_dependency_caches): ... here.  Remove.
714         (init_deps_global, finish_deps_global): Adjust for use with
715         selective scheduling.
716         (get_dep_weak): Move logic to ...
717         (get_dep_weak_1): New function.
718         (ds_merge): Move logic to ...
719         (ds_merge_1): New static function.
720         (ds_full_merge, ds_max_merge, ds_get_speculation_types): New functions.
721         (ds_get_max_dep_weak): New function.
722         * sched-ebb.c (sched_n_insns): Rename to sched_rgn_n_insns.
723         (n_insns): Rename to rgn_n_insns.
724         (debug_ebb_dependencies): New function.
725         (init_ready_list): Use it.
726         (begin_schedule_ready): Use sched_init_only_bb.
727         (ebb_print_insn): Indicate when an insn starts a new cycle.
728         (contributes_to_priority, compute_jump_reg_dependencies,
729         add_remove_insn, fix_recovery_cfg): Add ebb_ prefix to function names.
730         (add_block1): Remove to ebb_add_block.
731         (ebb_sched_deps_info, ebb_common_sched_info): New variables.
732         (schedule_ebb): Initialize them.  Use remove_notes instead of
733         rm_other_notes.  Use haifa_local_init/finish.
734         (schedule_ebbs): Use haifa_sched_init/finish.
735         * sched-int.h: Include vecprim.h, remove rtl.h.
736         (struct ready_list): Delete declaration.
737         (sched_verbose_param, enum sched_pass_id_t,
738         bb_vec_t, insn_vec_t, rtx_vec_t): New.
739         (struct sched_scan_info_def): New structure.
740         (sched_scan_info, sched_scan, sched_init_bbs,
741         sched_init_luids, sched_finish_luids, sched_extend_target,
742         haifa_init_h_i_d, haifa_finish_h_i_d): Declare.
743         (struct common_sched_info_def): New.
744         (common_sched_info, haifa_common_sched_info,
745         sched_emulate_haifa_p): Declare.
746         (sel_sched_p): New.
747         (sched_luids): Declare.
748         (INSN_LUID, LUID_BY_UID, SET_INSN_LUID): Declare.
749         (sched_max_luid, insn_luid): Declare.
750         (note_list, remove_notes, restore_other_notes, bb_note): Declare.
751         (sched_insns_init, sched_insns_finish, xrecalloc, reemit_notes,
752         print_insn, print_pattern, print_value, haifa_classify_insn,
753         sel_find_rgns, sel_mark_hard_insn, dfa_state_size, advance_state,
754         setup_sched_dump, sched_init, sched_finish,
755         sel_insn_is_speculation_check): Export.
756         (struct ready_list): Move from haifa-sched.c.
757         (ready_try, ready, max_issue): Export.
758         (ebb_compute_jump_reg_dependencies, find_fallthru_edge,
759         sched_init_only_bb, sched_split_block, sched_split_block_1,
760         sched_create_empty_bb, sched_create_empty_bb_1,
761         sched_create_recovery_block, sched_create_recovery_edges): Export.
762         (enum reg_pending_barrier_mode): Export.
763         (struct deps): New fields `last_reg_pending_barrier' and `readonly'.
764         (deps_t): New.
765         (struct sched_info): Rename to haifa_sched_info.  Use const_rtx for
766         print_insn field.  Move add_block and fix_recovery_cfg to
767         common_sched_info_def.  Move compute_jump_reg_dependencies, use_cselib  ...
768         (struct sched_deps_info_def): ... this new structure.
769         (sched_deps_info): Declare.
770         (struct spec_info_def): Remove weakness_cutoff, add
771         data_weakness_cutoff and control_weakness_cutoff.
772         (spec_info): Declare.
773         (struct _haifa_deps_insn_data): Split from haifa_insn_data.  Add
774         dep_count field.
775         (struct haifa_insn_data): Rename to struct _haifa_insn_data.
776         (haifa_insn_data_def, haifa_insn_data_t): New typedefs.
777         (current_sched_info): Change type to struct haifa_sched_info.
778         (haifa_deps_insn_data_def, haifa_deps_insn_data_t): New typedefs.
779         (h_d_i_d): New variable.
780         (HDID): New accessor macro.
781         (h_i_d): Change type to VEC (haifa_insn_data_def, heap) *.
782         (HID): New accessor macro.  Rewrite h_i_d accessor macros through HID
783         and HDID.
784         (IS_SPECULATION_CHECK_P): Update for selective scheduler.
785         (enum SCHED_FLAGS): Update for selective scheduler.
786         (enum SPEC_SCHED_FLAGS): New flag SEL_SCHED_SPEC_DONT_CHECK_CONTROL.
787         (init_dependency_caches, free_dependency_caches): Delete declarations.
788         (deps_analyze_insn, remove_from_deps, get_dep_weak_1,
789         estimate_dep_weak, ds_full_merge, ds_max_merge, ds_weak,
790         ds_get_speculation_types, ds_get_max_dep_weak, sched_deps_init,
791         sched_deps_finish, haifa_note_reg_set, haifa_note_reg_use,
792         haifa_note_reg_clobber, maybe_extend_reg_info_p, deps_start_bb,
793         ds_to_dt): Export.
794         (rm_other_notes): Delete declaration.
795         (schedule_block): Remove one argument.
796         (cycle_issued_insns, issue_rate, dfa_lookahead, ready_sort,
797         ready_element, ready_lastpos, sched_extend_ready_list,
798         sched_finish_ready_list, sched_change_pattern, sched_speculate_insn,
799         concat_note_lists): Export.
800         (struct region): Move from sched-rgn.h.
801         (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn,
802         RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB,
803         BLOCK_TO_BB, CONTAINING_RGN): Export.
804         (ebb_head, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB, INSN_BB): Likewise.
805         (current_nr_blocks, current_blocks, target_bb): Likewise.
806         (dep_cost_1, sched_is_disabled_for_current_region_p, sched_rgn_init,
807         sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies,
808         sched_rgn_local_init, extend_regions,
809         rgn_make_new_region_out_of_new_block, compute_priorities,
810         debug_rgn_dependencies, free_rgn_deps, contributes_to_priority,
811         extend_rgns, deps_join rgn_setup_common_sched_info,
812         rgn_setup_sched_infos, debug_regions, debug_region, dump_region_dot,
813         dump_region_dot_file, haifa_sched_init, haifa_sched_finish): Export.
814         (get_rgn_sched_max_insns_priority, sel_add_to_insn_priority,
815         increase_insn_priority): Likewise.
816         * sched-rgn.c: Include sel-sched.h.
817         (ref_counts): New static variable.  Use it ...
818         (INSN_REF_COUNT): ... here.  Rewrite and move closer to uses.
819         (FED_BY_SPEC_LOAD, IS_LOAD_INSN): Rewrite to use HID accessor macro.
820         (sched_is_disabled_for_current_region_p): Delete static declaration.
821         (struct region): Move to sched-int.h.
822         (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn,
823         ebb_head): Define and initialize.
824         (RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB,
825         BLOCK_TO_BB, CONTAINING_RGN, debug_regions, extend_regions,
826         BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB): Move to
827         sched-int.h.
828         (find_single_block_region): Add new argument to indicate that EBB
829         regions should be constructed.
830         (debug_live): Delete declaration.
831         (current_nr_blocks, current_blocks, target_bb): Remove static qualifiers.
832         (compute_dom_prob_ps, check_live, update_live, set_spec_fed): Delete
833         declaration.
834         (init_regions): Delete declaration.
835         (debug_region, bb_in_region_p, dump_region_dot_file, dump_region_dot,
836         rgn_estimate_number_of_insns): New.
837         (too_large): Use estimate_number_of_insns.
838         (haifa_find_rgns): New. Move the code from ...
839         (find_rgns): ... here.  Call either sel_find_rgns or haifa_find_rgns.
840         (free_trg_info): New.
841         (compute_trg_info): Allocate candidate tables here instead of ...
842         (init_ready_list): ... here.
843         (rgn_print_insn): Use const_rtx.
844         (contributes_to_priority, extend_regions): Delete static declaration.
845         (add_remove_insn, fix_recovery_cfg): Add rgn_ to function names.
846         (add_block1): Rename to rgn_add_block.
847         (debug_rgn_dependencies): Delete static qualifier.
848         (new_ready): Use sched_deps_info.  Simplify.
849         (rgn_common_sched_info, rgn_const_sched_deps_info,
850         rgn_const_sel_sched_deps_info, rgn_sched_deps_info, rgn_sched_info): New.
851         (region_sched_info): Rename to rgn_const_sched_info.
852         (deps_join): New, extracted from ...
853         (propagate_deps): ... here.
854         (compute_block_dependences, debug_dependencies): Update for selective
855         scheduling.
856         (free_rgn_deps, compute_priorities): New functions.
857         (sched_rgn_init, sched_rgn_finish, rgn_setup_region,
858         sched_rgn_compute_dependencies): New functions.
859         (schedule_region): Use them.
860         (sched_rgn_local_init, sched_rgn_local_free, sched_rgn_local_finish,
861         rgn_setup_common_sched_info, rgn_setup_sched_infos):
862         New functions.
863         (schedule_insns): Call new functions that were split out.
864         (rgn_make_new_region_out_of_new_block): New.
865         (get_rgn_sched_max_insns_priority): New.
866         (rest_of_handle_sched, rest_of_handle_sched2): Call selective
867         scheduling when appropriate.
868         * sched-vis.c: Include insn-attr.h.
869         (print_value, print_pattern): Make global.
870         (print_rtl_slim, debug_bb_slim, debug_bb_n_slim): New functions.
871         * target-def.h (TARGET_SCHED_ADJUST_COST_2,
872         TARGET_SCHED_ALLOC_SCHED_CONTEXT, TARGET_SCHED_INIT_SCHED_CONTEXT,
873         TARGET_SCHED_SET_SCHED_CONTEXT, TARGET_SCHED_CLEAR_SCHED_CONTEXT,
874         TARGET_SCHED_FREE_SCHED_CONTEXT, TARGET_SCHED_GET_INSN_CHECKED_DS,
875         TARGET_SCHED_GET_INSN_SPEC_DS, TARGET_SCHED_SKIP_RTX_P): New target
876         hooks.  Initialize them to 0.
877         (TARGET_SCHED_GEN_CHECK): Rename to TARGET_SCHED_GEN_SPEC_CHECK.
878         * target.h (struct gcc_target): Add them.  Rename gen_check field to
879         gen_spec_check.
880         * flags.h (sel_sched_switch_set): Declare.
881         * opts.c (sel_sched_switch_set): New variable.
882         (decode_options): Unset flag_sel_sched_pipelining_outer_loops if
883         pipelining is disabled from command line.
884         (common_handle_option): Record whether selective scheduling is
885         requested from command line.
886         * doc/invoke.texi: Document new flags and parameters.
887         * doc/tm.texi: Document new target hooks.
888         * config/ia64/ia64.c (TARGET_SCHED_GEN_SPEC_CHECK): Define to ia64_gen_check.
889         (dfa_state_size): Do not declare locally.
890         * config/ia64/ia64.opt (msched-ar-data-spec): Default to 0.
891         * config/rs6000/rs6000.c (rs6000_init_sched_context,
892         rs6000_alloc_sched_context, rs6000_set_sched_context,
893         rs6000_free_sched_context): New functions.
894         (struct _rs6000_sched_context): New.
895         (rs6000_sched_reorder2): Do not modify INSN_PRIORITY for selective
896         scheduling.
897         (rs6000_sched_finish): Do not run for selective scheduling.
898
899 2008-08-31  Jan Hubicka  <jh@suse.cz>
900
901         * frv.c (frv_rtx_costs): Update forward declaration.
902         * spu.c (spu_rtx_costs): Likewise.
903         * pdp11.c: Include df.h
904         (pdp11_output_function_epilogue): Use df_set_regs_ever_live.
905         * m68hc11.c (m68hc11_gen_highpart): Fix call of gen_rtx_SUBREG.
906         (m68hc11_rtx_costs_1): Fix call of rtx_cost.
907         * iq2000.c (iq2000_address_cost): Add speed argument.
908         (iq2000_rtx_costs): Likewise.
909         * mn10300.c (mn10300_address_cost_1): Remove speed argument;
910         update call of mn10300_address_cost.
911         * mcore.c: Include df.h
912         (mcore_rtx_costs): Update prototype.
913         * score3.c: Include df.h
914         (score3_rtx_costs): Remove speed argument.
915         * score7.c: Include df.h
916         (score7_address_cost): Remove speed argument.
917         * score-protos.h (score_address_cost): Update prototype.
918         * score.c: Include df.h
919         (score_rtx_costs): Update call of costs functions.
920         * v850.c (v850_rtx_costs): Add bool argument.
921
922 2008-08-31  Hans-Peter Nilsson  <hp@axis.com>
923
924         * config/cris/cris.c (cris_rtx_costs): Correct call to rtx_costs.
925
926 2008-08-31  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
927
928         * gthr-win32.h (__gthread_setspecific): Use CONST_CAST2.
929         * config/i386/gthr-win32.c (__gthread_setspecific): Same.
930
931 2008-08-31  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
932
933         * mkmap-flat.awk: Add option pe_dll.
934         * config/i386/t-cygming (SHLIB_LINK): Support building libgcc_s.
935         * config/i386/t-cygwin (SHLIB_LC): Add.
936         * config/i386/t-mingw32 (SHLIB_LC): Add.
937         * config/i386/mingw32.h (SHARED_LIBGCC_UNDEFS_SPEC): New.
938         (SUBTARGET_EXTRA_SPECS): Use SHARED_LIBGCC_UNDEFS_SPEC.
939         (LINK_SPEC): Support libgcc_s.
940         (LIBGCC_SPEC): Support libgcc_s.
941         (LIBGCC_SONAME): New.
942
943 2008-08-31  Jan Hubicka  <jh@suse.cz>
944
945         * predict.c (maybe_hot_bb_p, maybe_hot_edge_p): Previous commit
946         mistakely had old version of patch.
947
948         * ipa-cp.c (ipcp_need_original_clone_p): Remove.
949         (ipcp_estimate_growth): New.
950         (ipcp_insert_stage): Use ipcp_estimate_growth.
951         * profile.c (branch_prob): When reading failed, do not consider
952         profile as read.
953
954 2008-08-31  Jan Hubicka  <jh@suse.cz>
955
956         * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Check that
957         loop is optimized for speed.
958
959 2008-08-31  Richard Guenther  <rguenther@suse.de>
960
961         PR middle-end/37289
962         * fold-const.c (fold_binary): Retain conversions in folding
963         ~A + 1 to -A.
964
965 2008-08-31  Jan Hubicka  <jh@suse.cz>
966
967         * postreload-gcse.c (eliminate_partially_redundant_loads): Use optimize_bb_for_size_p.
968         * predict.c (maybe_hot_frequency_p): Make inline.
969         (maybe_hot_count_p): Break out from ...
970         (maybe_hot_bb_p): ... this one.
971         (maybe_hot_edge_p): Simplify.
972         * basic-block.h (probably_cold_bb_p): Remove.
973
974 2008-08-31  Jakub Jelinek  <jakub@redhat.com>
975
976         PR target/37168
977         * config/rs6000/rs6000-protos.h (const_vector_elt_as_int): Add
978         prototype.
979         * config/rs6000/rs6000.c (const_vector_elt_as_int): No longer static.
980         * config/rs6000/altivec.md (easy_vector_constant_add_self splitter):
981         Also split V4SFmode.
982         * config/rs6000/predicates.md (easy_vector_constant_add_self): Handle
983         vector float modes.
984
985 2008-08-31  Jan Hubicka  <jh@suse.cz>
986
987         * predict.c (PROB_VERY_LIKELY): Make small enough so things
988         become cold.
989         * predict.def (PRED_NORETURN_CALL, PRED_COLD_CALL): Use it.
990
991 2008-08-31  Jakub Jelinek  <jakub@redhat.com>
992
993         PR debug/37287
994         * dwarf2out.c (gen_namespace_die): For DECL_EXTERNAL modules don't
995         add source coords.
996
997         * dwarf2out.c (native_encode_initializer): Subtract min_index for
998         non-range array index.  Handle VIEW_CONVERT_EXPR and NON_LVALUE_EXPR.
999
1000 2008-08-31  Jan Hubicka  <jh@suse.cz>
1001
1002         * sparc.h (BRANCH_COST): Fix macro definition.
1003         * avr.c (avr_operand_rtx_cost): Add speed argument.
1004         (avr_rtx_costs): Update calls of avr_operand_rtx_cost.
1005
1006 2008-08-31  Richard Guenther  <rguenther@suse.de>
1007
1008         * tree-cfg.c (verify_types_in_gimple_assign): Dump mismatched
1009         types instead of operands.  Re-instantiate verifying of
1010         binary expression operands.
1011
1012 2008-08-30  Jan Hubicka  <jh@suse.cz>
1013
1014         * fwprop.c (should_replace_address): Add speed attribute.
1015         (PR_OPTIMIZE_FOR_SPEED): New flag.
1016         (propagate_rtx_1): Use it.
1017         (propagate_rtx): Set it.
1018         (try_fwprop_subst): Update call of rtx_costs.
1019         (forward_propagate_and_simplify): LIkewise.
1020         * hooks.c (hook_int_rtx_bool_0): New
1021         (hook_bool_rtx_int_int_intp_false): Replace by ...
1022         (hook_bool_rtx_int_int_intp_bool_false): .. thisone.
1023         * hooks.h (hook_int_rtx_bool_0): New
1024         (hook_bool_rtx_int_int_intp_false): Replace by ...
1025         (hook_bool_rtx_int_int_intp_bool_false): .. thisone.
1026         * optabs.c (avoid_expensive_constant): UPdate call of rtx_cost.
1027         (prepare_cmp_insn): UPdate call of rtx_cost.
1028         * postreload.c (reload_cse_simplify_set): Update call of rtx_cost.
1029         (reload_cse_simplify_operands): Update call of rtx_cost.
1030         (reload_cse_move2add): call of rtx_cost.
1031         * target.h (struct gcc_target): Update rtx_costs and address_costs.
1032         * rtlanal.c (rtx_cost): Add speed argument.
1033         (address_cost): Add speed argument
1034         (default_address_cost): Likewise.
1035         (insn_rtx_cost): Likewise.
1036         * cfgloopanal.c (seq_cost): Add speed argument.
1037         (target_reg_cost, target_spill_cost): Turn to array.
1038         (init_set_costs): Update for speed.
1039         (estimate_reg_pressure_cost): Add speed argument.
1040         * auto-inc-dec.c (attempt_change): Update call of rtx_cost.
1041         * dojump.c (prefer_and_bit_test): UPdate call of rtx_cost.
1042         * tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed.
1043         (seq_cost): Add speed argument.
1044         (computation_cost): Add speed arugment.
1045         (add_cost, multiply_by_const, get_address_cost): add speed argument.
1046         (force_expr_to_var_cost): Update for profile info.
1047         (force_var_cost): Likewise.
1048         (split_address_cost): Likewise.
1049         (ptr_difference_cost): Likewise.
1050         (difference_cost): Likewise.
1051         (get_computation_cost_at): Likewise.
1052         (determine_iv_cost): Likewise.
1053         (ivopts_global_cost_for_size): Likewise.
1054         (rewrite_use_address): Likewise.
1055         (tree_ssa_iv_optimize_loop): Initialize speed field.
1056         * cse.c (optimize_this_for_speed_p): New static var.
1057         (notreg_cost): Update call of rtx_cost.
1058         (cse_extended_basic_block): set optimize_this_for_speed_p.
1059         * ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost.
1060         (noce_try_cmove_arith): Likewise.
1061         (noce_try_sign_mask): LIkewise.
1062         * expr.c (compress_float_constant): Update rtx_cost calls.
1063         * tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument.
1064         (addr_to_parts): Likewise.
1065         (create_mem_ref): Likewise.
1066         * dse.c (find_shift_sequence): Add speed argument.
1067         (replace_read): Update call.
1068         * calls.c (precompute_register_parameters): Update call of rtx_cost.
1069         * expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost,
1070         * neg_cost, shift_cost, shiftadd_cost,
1071         shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost,
1072         mul_highpart_cost): Increase dimension.
1073         (init_expmed): Initialize for both size and speed.
1074         (expand_shift): Use profile.
1075         (synth_mult): Use profile.
1076         (choose_mult_variant): Use profile.
1077         (expand_mult): Use profile.
1078         (expand_mult_highpart_optab): Use profile.
1079         (expand_mult_highpart): Use profile.
1080         (expand_smod_pow2): Use profile.
1081         (expand_divmod): Use profile.
1082         * simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost.
1083         * loop-invariant.c (create_new_invariant): Use profile.
1084         (gain_for_invariant): Add speed parameter.
1085         (best_gain_for_invariant): Likewise.
1086         (find_invariants_to_move): Likewise.
1087         (move_single_loop_invariants): Set it.
1088         * target-def.h (TARGET_RTX_COSTS): Use hook.
1089         * rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe.
1090         (optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare.
1091         * output.h (default_address_cost): Update prototype.
1092         * combine.c (optimize_this_for_speed_p): New static var.
1093         (combine_validate_cost): Update call of rtx_cost.
1094         (combine_instructions): Set optimize_this_for_speed_p.
1095         (expand_compound_operation): Update call of rtx_cost.
1096         (make_extraction):Update call of rtx_cost.
1097         (force_to_mode):Update call of rtx_cost.
1098         (distribute_and_simplify_rtx):Update call of rtx_cost.
1099         * cfgloop.h (target_reg_cost, target_spill_cost): Turn to array.
1100         (estimate_reg_pressure_cost): Update prototype.
1101         * tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype.
1102         * basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p):
1103         Remove.
1104         * config/alpha/alpha.c (alpha_rtx_costs): Update.
1105         (alpha_rtx_costs): Update.
1106         * config/frv/frv.c (frv_rtx_costs): Update.
1107         * config/s390/s390.c (s390_rtx_costs): Update.
1108         * config/m32c/m32c.c (m32c_memory_move_cost): Update.
1109         (m32c_rtx_costs): Update.
1110         * config/spu/spu.c (TARGET_ADDRESS_COST): Upate.
1111         (spu_rtx_costs): Update.
1112         * config/sparc/sparc.c (sparc_rtx_costs): Update.
1113         * config/m32r/m32r.c (m32r_rtx_costs): Update.
1114         * config/i386/i386.c (:ix86_address_cost): Update.
1115         (ix86_rtx_costs): Update.
1116         * config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update.
1117         * config/pdp11/pdp11.c (pdp11_rtx_costs): Update.
1118         * config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update.
1119         * config/crx/crx.c (crx_address_cost): Update.
1120         * config/xtensa/xtensa.c (xtensa_rtx_costs): Update.
1121         * config/stormy16/stormy16.c
1122         (xstormy16_address_cost, xstormy16_rtx_costs): Update.
1123         * config/m68hc11/m68hc11.c
1124         (m68hc11_address_cost, m68hc11_rtx_costs): Update.
1125         * config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update.
1126         * config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update.
1127         * config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update
1128         * config/ia64/ia64.c (ia64_rtx_costs): Update.
1129         * config/m68k/m68k.c (m68k_rtx_costs): Update.
1130         * config/rs6000/rs6000.c (rs6000_rtx_costs): Update.
1131         * config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update.
1132         * config/mcore/mcore.c (TARGET_ADDRESS_COST): Update.
1133         (mcore_rtx_costs): update.
1134         * config/score/score3.c (score3_rtx_costs): Update.
1135         * config/score/score7.c (score7_rtx_costs): Update.
1136         * config/score/score3.h (score3_rtx_costs):Update.
1137         * config/score/score7.h (score7_rtx_costs): Update.
1138         * config/score/score.c (score_rtx_costs): Update.
1139         * config/arm/arm.c (arm_address_cost): Update.
1140         (arm_rtx_costs_1): Update.
1141         (arm_rtx_costs_1): Update.
1142         (arm_size_rtx_costs): Update.
1143         (arm_size_rtx_costs): Update.
1144         (arm_size_rtx_costs): Update.
1145         (arm_xscale_rtx_costs): Update.
1146         (arm_thumb_address_cost): Update.
1147         * config/pa/pa.c (hppa_address_cost): Update.
1148         * config/mips/mips.c (mips_rtx_costs): Update.
1149         * config/vax/vax.c (vax_address_cost): Update.
1150         * config/h8300/h8300.c (h8300_shift_costs): Update.
1151         (h8300_rtx_costs): Update.
1152         * config/v850/v850.c (TARGET_ADDRESS_COST): Update.
1153         (v850_rtx_costs): Update.
1154         * config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update.
1155         * config/bfin/bfin.c
1156         (bfin_address_cost): Update.
1157         (bfin_rtx_costs): Update.
1158         * stmt.c (lshift_cheap_p): Update.
1159
1160 2008-08-30  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1161
1162         PR middle-end/36444
1163         * expmed.c (extract_bit_field_1): Check the mode size to make
1164         sure the vector modes have the same size.
1165
1166 2008-08-29  Michael Meissner  <gnu@the-meissners.org>
1167
1168         * dojump.c (top level): Include basic-block.h to declare
1169         optimize_insn_for_speed_p
1170
1171         * Makefile.in (dodump.h): Add $(BASIC_BLOCK_H) dependency.
1172
1173         * opts.h (CL_SAVE): New option class for marking options that are
1174         target specific options usable in the target attribute.
1175         (CL_MIN_OPTION_CLASS): CL_SAVE is now the minimum option.
1176
1177         * opt-functions.awk (switch_flags): Add CL_SAVE flag so backends
1178         can easily find the target specific options that are safe to use
1179         in the attribute or pragma.
1180
1181         * attribs.c (decl_attributes): Change #pragma GCC option to
1182         #pragma GCC target, and attribute((option(...))) to
1183         attribute((target(...))).
1184
1185         * doc/extend.texi (target attribute): Change from option
1186         attribute.  Delete push/pop/reset.
1187         (#pragma GCC target): Change from #pragma GCC option.  Delete
1188         push/pop/reset.
1189         (#pragma GCC push_options): Document new pragma.
1190         (#pragma GCC pop_options): Document new pragma.
1191         (#pragma GCC reset_options): Document new pragma.
1192
1193         * targhooks.c (default_target_option_valid_attribute_p): Add
1194         warning about port not supporting target attributes.
1195         (default_target_option_pragma_parse): New function, warn about
1196         #pragma GCC target not being supported.
1197
1198         * targhooks.h (default_target_option_pragma_parse): Add
1199         declaration.
1200
1201         * tree.h (TI_CURRENT_TARGET_PRAGMA): Rename from
1202         TI_CURRENT_OPTION_PRAGMA.
1203         (current_target_pragma): Rename from current_option_pragma.
1204
1205         * target.h: (struct target_option): Delete booleans for changing
1206         the optimization level on hot/cold functions.  Change signature of
1207         pragma_parse hook to take a second tree.
1208
1209         * c-tree.h (c_builtin_function_ext_scope): Add declaration.
1210
1211         * c-decl.c (c_builtin_function_ext_scope): New function, guarantee
1212         that the declaration is done at global scope.
1213
1214         * langhooks.c (add_builtin_function_common): Move most of the code
1215         from add_builtin_function here, calling the hook passed in.
1216         (add_builtin_function): Call add_builtin_function_common with
1217         standard builtin hook.
1218         (add_builtin_function_ext_scope): New function to add builtins to
1219         global scope.
1220
1221         * langhooks.h (struct lang_hooks): Add builtin_function_ext_scope
1222         hook.
1223         (add_builtin_function_ext_scope): Add declaration.
1224
1225         * c-pragma.c (handle_pragma_target): Rename from
1226         handle_pragma_option, #pragma GCC option is now #pragma GCC
1227         target.  Move warning about port not supporting target options to
1228         default pragma parse hook.  Remove push/pop/reset from this
1229         pragma.
1230         (handle_pragma_optimize): Remove push/pop/reset from this pragma.
1231         (option_stack): Delete static variable.
1232         (optimize_stack): Ditto.
1233         (optons_stack): New stack of saved target and optimization
1234         options.
1235         (handle_pragma_push_options): New function to handle pushing both
1236         target and optimization options.
1237         (handle_pragma_pop_options): New function to handle popping both
1238         target and optimization options.
1239         (handle_pragma_reset_options): New function to handle resetting
1240         both target and optimization options to their initial state.
1241         (init_pragma): Rename handle_pragma_option to
1242         handle_pragma_target.  Add support for push_options, pop_options,
1243         and reset_options pragmas.
1244
1245         * target-def.h (TARGET_OPTION_PRAGMA_PARSE): Change default to
1246         default_target_option_pragma_parse.
1247         (TARGET_OPTION_VALID_ATTRIBUTE_P): Change default to
1248         default_target_option_valid_attribute_p.
1249         (TARGET_OPTION_COLD_ATTRIBUTE_SETS_OPTIMIZATION): Delete.
1250         (TARGET_OPTION_HOT_ATTRIBUTE_SETS_OPTIMIZATION): Ditto.
1251         (TARGET_OPTION_HOOKS): Delete the fields for whether to change
1252         optimization level on hot/cold functions.
1253
1254         * tree-inline.c (tree_can_inline_p): Disable suppressing inlining
1255         if the caller and callee have different optimization levels.
1256
1257         * c-common.c (handle_target_attribute): Rename from
1258         handle_option_attribute, attribute((option(...))) is now
1259         attribute((target(...))).  Move warning if the port does not
1260         support target attributes to the default hook.
1261         (handle_hot_attribute): Delete code to change the optimization
1262         level of hot functions.
1263         (handle_cold_attribute): Ditto.
1264
1265         * config/i386/i386-c.c (ix86_pragma_target_parse): Take a second
1266         argument that is the binary tree options to use if there are no
1267         arguments.  Call ix86_valid_target_attribute_tree instead of
1268         ix86_valid_option_attribute_tree.
1269         (ix86_pragma_target_parse): Rename from ix86_pragma_option_parse.
1270         (ix86_register_pragmas): Use ix86_pragma_target_parse instead of
1271         ix86_pragma_option_parse.
1272
1273         * config/i386/i386-protos.h (ix86_valid_target_attribute_tree):
1274         Rename from ix86_valid_option_attribute_tree.
1275
1276         * config/i386/i386.c (ix86_add_new_builtins): New function to add
1277         new builtins when the ISA changes.
1278         (ix86_valid_target_attribute_tree): Rename from
1279         ix86_valid_option_attribute_tree.  Change callers.  If the
1280         function specified optimization options, use those as the starting
1281         point before setting up the target attributes.  If the
1282         optimization options were changed in the course of setting the
1283         target attributes, record the new optimization options.
1284         (ix86_valid_target_attribute_tree_inner_p): Rename from
1285         ix86_valid_option_attribute_tree_inner_p.  Change callers.  Call
1286         ix86_add_new_builtins if the ISA changed.
1287         (ix86_valid_target_attribute_p): Rename from
1288         ix86_valid_option_attribute_p.  Change callers.
1289         (enum ix86_builtins): Add IX86_BUILTIN_PCMOV to allow both
1290         __builtin_ia32_pcmov and __builtin_ia32_pcmov_v2di to be declared
1291         as delayed builtin functions.
1292         (struct builtin_isa): New structure to record builtin functions
1293         that should be delayed until the ISA for that function is used.
1294         (ix86_builtins_isa): Change from int to struct to track builtin
1295         functions we want to declare at some point.
1296         (def_builtin): If the front end can delay defining the builtin
1297         functions, don't create builtins for ISAs not part of the default
1298         options.
1299         (def_builtin_const): Ditto.
1300         (bdesc_multi_arg): Declare __builtin_ia32_pcmov and
1301         __builtin_ia32_pcmov_v2di to be different builtin functions.
1302         (ix86_expand_builtin): Changes due to ix86_builtins_isa now being
1303         a structure instead of an int.
1304         (TARGET_OPTION_VALID_ATTRIBUTE_P): Use
1305         ix86_valid_target_attribute_p, not ix86_valid_option_attribute_p.
1306         (TARGET_OPTION_COLD_ATTRIBUTE_SETS_OPTIMIZATION): Delete.
1307         (TARGET_OPTION_HOT_ATTRIBUTE_SETS_OPTIMIZATION): Ditto.
1308
1309         * config/ia64/ia64.h
1310         (TARGET_OPTION_COLD_ATTRIBUTE_SETS_OPTIMIZATION): Delete.
1311         (TARGET_OPTION_HOT_ATTRIBUTE_SETS_OPTIMIZATION): Ditto.
1312
1313         * langhooks-def.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
1314         hook, default to being the same as LANG_HOOKS_BUILTIN_FUNCTION.
1315         (LANG_HOOKS_INITIALIZER): Add
1316         LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE hook.
1317
1318 2008-08-30  Kaz Kojima  <kkojima@gcc.gnu.org>
1319
1320         PR target/37270
1321         * config/sh/sh.h (LEGITIMIZE_RELOAD_ADDRESS): Generate
1322         the reload address with the index register for SFmode
1323         access with a displacement.
1324
1325 2008-08-30  Jan Hubicka  <jh@suse.cz>
1326
1327         * optabs.c (expand_abs_nojump): Update BRANCH_COST call.
1328         * fold-cost.c (LOGICAL_OP_NON_SHORT_CIRCUIT, fold_truthop): Likewise.
1329         * dojump.c (do_jump): Likewise.
1330         * ifcvt.c (MAX_CONDITIONAL_EXECUTE): Likewise.
1331         (note-if_info): Add BRANCH_COST.
1332         (noce_try_store_flag_constants, noce_try_addcc, noce_try_store_flag_mask,
1333         noce_try_cmove_arith, noce_try_cmove_arith, noce_try_cmove_arith,
1334         noce_find_if_block, find_if_case_1, find_if_case_2): Use compuated
1335         branch cost.
1336         * expr.h (BRANCH_COST): Update default.
1337         * predict.c (predictable_edge_p): New function.
1338         * expmed.c (expand_smod_pow2, expand_sdiv_pow2, emit_store_flag):
1339         Update BRANCH_COST call.
1340         * basic-block.h (predictable_edge_p): Declare.
1341         * config/alpha/alpha.h (BRANCH_COST): Update.
1342         * config/frv/frv.h (BRANCH_COST): Update.
1343         * config/s390/s390.h (BRANCH_COST): Update.
1344         * config/spu/spu.h (BRANCH_COST): Update.
1345         * config/sparc/sparc.h (BRANCH_COST): Update.
1346         * config/m32r/m32r.h (BRANCH_COST): Update.
1347         * config/i386/i386.h (BRANCH_COST): Update.
1348         * config/i386/i386.c (ix86_expand_int_movcc): Update use of BRANCH_COST.
1349         * config/sh/sh.h (BRANCH_COST): Update.
1350         * config/pdp11/pdp11.h (BRANCH_COST): Update.
1351         * config/avr/avr.h (BRANCH_COST): Update.
1352         * config/crx/crx.h (BRANCH_COST): Update.
1353         * config/xtensa/xtensa.h (BRANCH_COST): Update.
1354         * config/stormy16/stormy16.h (BRANCH_COST): Update.
1355         * config/m68hc11/m68hc11.h (BRANCH_COST): Update.
1356         * config/iq2000/iq2000.h (BRANCH_COST): Update.
1357         * config/ia64/ia64.h (BRANCH_COST): Update.
1358         * config/rs6000/rs6000.h (BRANCH_COST): Update.
1359         * config/arc/arc.h (BRANCH_COST): Update.
1360         * config/score/score.h (BRANCH_COST): Update.
1361         * config/arm/arm.h (BRANCH_COST): Update.
1362         * config/pa/pa.h (BRANCH_COST): Update.
1363         * config/mips/mips.h (BRANCH_COST): Update.
1364         * config/vax/vax.h (BRANCH_COST): Update.
1365         * config/h8300/h8300.h (BRANCH_COST): Update.
1366         * params.def (PARAM_PREDICTABLE_BRANCH_OUTCOME): New.
1367         * doc/invoke.texi (predictable-branch-cost-outcome): Document.
1368         * doc/tm.texi (BRANCH_COST): Update.
1369
1370 2008-08-30  Samuel Tardieu  <sam@rfc1149.net>
1371
1372         PR target/37283
1373         * config/arm/arm.c (arm_optimization_options): Set
1374         flag_section_anchors to 2 instead of 1 to distinguish it from
1375         -fsection-anchors given explicitely on the command line.
1376
1377 2008-08-30  Richard Sandiford  <rdsandiford@googlemail.com>
1378
1379         * recog.c (split_insn): Consider attaching a REG_EQUAL note to the
1380         final insn of a split.
1381
1382 2008-08-30  Jan Hubicka  <jh@suse.cz>
1383
1384         * postreload-gcse.c (gate_handle_gcse2): Disable for functions
1385         optimized for speed.
1386         * final.c (compute_alignments): Use optimize_bb_for_size_p.
1387         * tree-call-cdce.c (gate_call_cdce): Use optimize_function_for_speed_p.
1388         * opts.c (flag_predictive_commoning_set, flag_unswitch_loops_set,
1389         flag_gcse_after_reload_set): New static vars.
1390         (common_handle_option): Enable those flags for profile-use.
1391         (decode_options): Remove optimize_size flags that are handled
1392         on higher granuality.
1393         * tree-vectorizer.c (vectorize_loops): Use
1394         optimize_loop_nest_for_speed_p.
1395         * tree-ssa-pre.c (do_pre): Use optimize_function_for_speed_p.
1396         * tree-predcom.c (tree_predictive_commoning): Use
1397         optimize_loop_for_speed_p.
1398         * varasm.c (assemble_start_function): Use optimize_function_for_speed_p.
1399         * bb-reorder.c (rest_of_handle_reorder_blocks): Likewise.
1400         * predict.c (optimize_loop_for_speed_p): Fix walk.
1401
1402 2008-08-30  Jan Hubicka  <jh@suse.cz>
1403
1404         * ipa-inline.c (cgraph_estimate_growth): Discover self recursive
1405         functions.
1406         (cgraph_decide_inlining_of_small_function): Use edge->count to detect
1407         profile presence locally.
1408
1409 2008-08-29  Joseph Myers  <joseph@codesourcery.com>
1410
1411         PR bootstrap/37086
1412         * tree-vrp.c (find_switch_asserts): Make idx volatile for GCC
1413         versions before 4.0.
1414
1415 2008-08-29  Jan Hubicka  <jh@suse.cz>
1416
1417         * tree-inline.c (insert_init_stmt): Insert sequence even when
1418         not in SSA form.
1419
1420 2008-08-29  Jeff Law  <law@redhat.com>
1421
1422         * mn10300.c (mn10300_secondary_reload_class): We need secondary
1423         reloads for AM33-2 if IN is a pseudo with an equivalent memory
1424         location and class is an FP register.
1425
1426 2008-08-29  Jan Hubicka  <jh@suse.cz>
1427
1428         * see.c (see_merge_one_def_extension): Silence used uninitialized
1429         warning.
1430         * matrix-reorg.c (check_allocation_function): Likewise.
1431         * config/i386/driver-i386.c (detect_caches_amd): Likewise.
1432
1433 2008-08-29  Jakub Jelinek  <jakub@redhat.com>
1434
1435         PR c/37261
1436         * fold-const.c (fold_binary): In (X | C1) & C2 canonicalization
1437         compute new & and | in type rather than TREE_TYPE (arg0).
1438
1439         * dwarf2out.c (fortran_common): Update comment.
1440         (gen_variable_die): Swap com_die and var_die variables in Fortran
1441         COMMON block handling code.
1442
1443         * dwarf2out.c (descr_info_loc): Handle VAR_DECL.
1444
1445         * dwarf2out.c (gen_const_die): New function.
1446         (size_of_die, value_format, output_die): Output larger
1447         dw_val_class_vec using DW_FORM_block2 or DW_FORM_block4.
1448         (native_encode_initializer): New function.
1449         (tree_add_const_value_attribute): Call it.
1450         (gen_decl_die, dwarf2out_decl): Handle CONST_DECLs if is_fortran ().
1451
1452         * dwarf2out.c (gen_formal_parameter_die, gen_variable_die): For
1453         DECL_BY_REFERENCE decls don't pass TREE_READONLY and
1454         TREE_THIS_VOLATILE to add_type_attribute.
1455
1456         * dwarf2out.c (add_subscript_info): Stop on Fortran TYPE_STRING_FLAG
1457         types.
1458         (gen_array_type_die): Emit DW_TAG_string_type for Fortran character
1459         types.
1460
1461         * dwarf2out.c (loc_by_reference): New function.
1462         (add_location_or_const_value_attribute): Use it.
1463
1464         PR fortran/23057
1465         * dwarf2out.c (gen_variable_die): Represent Fortran COMMON vars
1466         as DW_TAG_variable children of DW_TAG_common_block rather than
1467         DW_TAG_member children.  Put DW_AT_external to individual
1468         DW_TAG_variable DIEs, not to DW_TAG_common_block.
1469
1470         * dwarf2out.c (add_bound_info): If lookup_decl_die failed, try
1471         loc_descriptor_from_tree_1.
1472
1473         PR fortran/29635
1474         PR fortran/23057
1475         * debug.h (struct gcc_debug_hooks): Add NAME and CHILD
1476         arguments to imported_module_or_decl.
1477         (debug_nothing_tree_tree): Removed.
1478         (debug_nothing_tree_tree_tree_bool): New prototype.
1479         * debug.c (do_nothing_debug_hooks): Adjust.
1480         (debug_nothing_tree_tree): Removed.
1481         (debug_nothing_tree_tree_tree_bool): New function.
1482         * dwarf2out.c (is_symbol_die): Handle DW_TAG_module.
1483         (gen_variable_die): Put all common vars for the
1484         same COMMON block under one DW_TAG_common_block.
1485         (declare_in_namespace): Return new context_die, for Fortran
1486         return the module DIE instead of adding extra declarations into
1487         the namespace.
1488         (gen_type_die_with_usage): Adjust declare_in_namespace caller.
1489         (gen_namespace_die): If is_fortran (), generate DW_TAG_module
1490         instead of DW_TAG_namespace.  If DECL_EXTERNAL is set, add
1491         DW_AT_declaration.
1492         (dwarf2out_global_decl): Don't skip Fortran global vars.
1493         (gen_decl_die): Likewise.  Adjust declare_in_namespace callers.
1494         (dwarf2out_imported_module_or_decl): Add NAME and CHILD arguments.
1495         If NAME is non-NULL, add DW_AT_name.  If CHILD is non-NULL, put
1496         DW_TAG_imported_declaration as child of previous
1497         DW_TAG_imported_module.
1498         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Adjust.
1499         * sdbout.c (sdb_debug_hooks): Likewise.
1500         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
1501
1502 2008-08-29  Jan Hubicka  <jh@suse.cz>
1503
1504         * cgraph.c (cgraph_remove_node): Do not remove nested nodes.
1505
1506         * cgraph.h (cgraph_maybe_hot_edge_p): Declare.
1507         * ipa-cp.c (n_cloning_candidates): New static variable.
1508         (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare.
1509         (ipcp_print_all_lattices): Improve debug output.
1510         (ipcp_cloning_candidate_p): New function.
1511         (ipcp_initialize_node_lattices): Use it.
1512         (ipcp_init_stage): Do only analyzis here; prettier debug output.
1513         (ipcp_propagate_stage): Prettier debug output.
1514         (ipcp_iterate_stage): Initialize latices here; prettier debug output.
1515         (ipcp_print_all_structures): Remove.
1516         (ipcp_need_redirect_p): Test !n_cloning_candidates.
1517         (ipcp_insert_stage): Prettier debug output; call
1518         cgraph_remove_unreachable_nodes before propagating.
1519         (pass_ipa_cp): Schedule function removal pass.
1520         * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better
1521         debug output.
1522         (cgraph_maybe_hot_edge_p): Move to ...
1523         * predict.c (cgraph_maybe_hot_edge_p) ... here.
1524         * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New.
1525         (common_handle_option): Set them; enable ipa-cp when profiling.
1526         * ipa-prop.c (ipa_print_node_jump_functions): Prettier output.
1527         (ipa_print_all_jump_functions): Likewise.
1528         (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove.
1529         (ipa_print_node_params, ipa_print_all_params): New.
1530         * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags,
1531         ipa_print_all_param_flags): Remove.
1532         (ipa_print_node_params, ipa_print_all_params): New.
1533
1534 2008-08-29  Bob Wilson  <bob.wilson@acm.org>
1535
1536         * config/xtensa/xtensa.c (xtensa_secondary_reload_class): Revert
1537         change from 2008-04-03.
1538         * config/xtensa/xtensa.h (IRA_COVER_CLASSES): Define.
1539
1540 2008-08-29  Vladimir Makarov  <vmakarov@redhat.com>
1541
1542         PR rtl-opt/37251
1543
1544         * ira-color.c (push_allocnos_to_stack): Truncate
1545         removed_splay_allocno_vec.
1546
1547 2008-08-29  Vladimir Makarov  <vmakarov@redhat.com>
1548
1549         PR rtl-opt/37243
1550         * ira-color (ira_fast_allocation): Don't assign hard registers to
1551         global allocnos.
1552
1553 2008-08-29  Jan Hubicka  <jh@suse.cz>
1554
1555         PR middle-end/37278
1556         * predict.c (optimize_loop_nest_for_speed_p): Do not ICE
1557         for cold internal loops.
1558
1559 2008-08-29  Richard Guenther  <rguenther@suse.de>
1560
1561         * tree-ssa-structalias.c (create_variable_info_for): Do not
1562         create fields for heap vars or vars with a noalias state.
1563         For NO_ALIAS_ANYTHING variables add a self-constraint, not one
1564         from ESCAPED.
1565
1566 2008-08-29  Richard Guenther  <rguenther@suse.de>
1567
1568         * common.opt (ftree-store-ccp): Mark as preserved for
1569         backward compatibility.
1570         * doc/invoke.texi (-ftree-store-ccp): Remove documentation.
1571         * tree-pass.h (pass_store_ccp): Remove.
1572         * tree-ssa-propagate.h (struct prop_value_d): Remove mem_ref field.
1573         (first_vdef): Remove declaration.
1574         (get_value_loaded_by): Likewise.
1575         * tree-ssa-ccp.c (do_store_ccp): Remove.
1576         (get_default_value): Simplify as do_store_ccp is always false
1577         now.  Do not initialize mem_ref.
1578         (set_value_varying): Likewise.
1579         (canonicalize_float_value): Likewise.
1580         (set_lattice_value): Likewise.
1581         (likely_value): Likewise.
1582         (surely_varying_stmt_p): Likewise.
1583         (ccp_initialize): Likewise.
1584         (ccp_lattice_meet): Likewise.
1585         (ccp_visit_phi_node): Likewise.
1586         (ccp_fold): Likewise.
1587         (evaluate_stmt): Likewise.
1588         (visit_assignment): Likewise.
1589         (ccp_visit_stmt): Likewise.
1590         (execute_ssa_ccp): Fold into ...
1591         (do_ssa_ccp): ... this.
1592         (do_ssa_store_ccp): Remove.
1593         (gate_store_ccp): Likewise.
1594         (pass_store_ccp): Likewise.
1595         * tree-ssa-copy.c (copy_prop_visit_phi_node): Do not
1596         initialize mem_ref.
1597         * tree-ssa-propagate.c (first_vdef): Remove.
1598         (get_value_loaded_by): Likewise.
1599         (replace_vuses_in): Likewise.
1600         (substitute_and_fold): Do not call replace_vuses_in.
1601         * opts.c (decode_options): Do not set flag_tree_store_ccp.
1602
1603 2008-08-29  Richard Guenther  <rguenther@suse.de>
1604
1605         PR middle-end/37236
1606         * tree-ssa-structalias.c (intra_create_variable_infos): Mark
1607         PARAM_NOALIAS tags with is_heapvar.
1608         * tree-ssa-operands.c (access_can_touch_variable): Offset
1609         based tests do not apply for heapvars.  Fix offset test.
1610
1611 2008-08-29  Jan Hubicka  <jh@suse.cz>
1612
1613         * doc/invoke.texi (-fipa-cp): Enabled by default at -O2/-Os/-O3
1614         (-fipa-cp-clone): Enabled by default at -O3.
1615         * opts.c (decode_options): Enable ipa-cp at -O2, ipa-cp-clone at -O3;
1616         make ipa-cp-clone to imply ipa-cp; disable cloning at -Os.
1617
1618 2008-08-29  Jan Hubicka  <jh@suse.cz>
1619
1620         * tree.c (build_function_type_skip_args, build_function_decl_skip_args):
1621         New functions.
1622         * tree.h (build_function_type_skip_args, build_function_decl_skip_args):
1623         Declare.
1624         * gimple.c (giple_copy_call_skip_args): New function.
1625         (giple_copy_call_skip_args): Declare.
1626
1627         * cgraph.h (cgraph_function_versioning): Add skip_args arugmnet
1628         * ipa-cp.c (ipcp_node_not_modifiable_p): Rename to ...
1629         (ipcp_node_modifiable_p): ... this one; use tree_versionable_function_p.
1630         (ipcp_create_replace_map): Improve debug output.
1631         (ipcp_need_redirect_p): Return false when not clonning.
1632         (ipcp_update_callgraph): Skip args.
1633         (ipcp_insert_stage): UPdate call of !ipcp_node_modifiable_p;
1634         skip args.
1635         * cgraphunit.c (cgraph_function_versioning): Add skip_args argument.
1636         (save_inline_function_body): Update call of tree_function_versioning.
1637         * ipa-prop.c (ipa_edge_removal_hook): Do not ICE on unanalyzed nodes.
1638         * tree-inline.c (copy_arguments_for_versioning): Add skip_args argument.
1639         (tree_function_versioning): Likewise.
1640         * tree-inline.h (tree_function_versioning): Update prototype.
1641
1642 2008-08-29  Jan Hubicka  <jh@suse.cz>
1643
1644         * loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p.
1645         * tree-ssa-threadupdate.c (mark_threaded_blocks): Use optimize_function_for_size_p.
1646         * tracer.c (ignore_bb_p): Use optimize_bb_for_size_p.
1647         * postreload-gcse.c (eliminate_partially_redundant_load): Use optimize_bb_for_size_p.
1648         * value-prof.c (gimple_divmod_fixed_value_transform,
1649         gimple_mod_pow2_value_transform, gimple_mod_subtract_transform,
1650         gimple_stringops_transform): Use optimize_bb_for_size_p.
1651         * ipa-cp.c (ipcp_insert_stage): Use optimize_function_for_size_p.
1652         * final.c (compute_alignments): Use optimize_function_for_size_p.
1653         * builtins.c (fold_builtin_cabs): Use optimize_function_for_speed_p.
1654         (fold_builtin_strcpy, fold_builtin_fputs): Use
1655         optimize_function_for_size_p.
1656         * fold-const.c (tree_swap_operands_p): Use optimize_function_for_size_p.
1657         * recog.c (relax_delay_slots): Likewise.
1658         * tree-ssa-math-opts.c (replace_reciprocal): Use optimize_bb_for_speed_p.
1659         (execute_cse_reciprocals): Use optimize_bb_for_size_p.
1660         * ipa-inline.c (cgraph_decide_recursive_inlining): Use
1661         optimize_function_for_size_p.
1662         (cgraph_decide_inlining_of_small_function): Use
1663         optimize_function_for_size_p.
1664         * global.c (find_reg): Use optimize_function_for_size_p.
1665         * opts.c (decode_options): Do not clear flag_tree_ch, flag_inline_functions,
1666         flag_unswitch_loops, flag_unroll_loops, flag_unroll_all_loops and
1667         flag_prefetch_loop_arrays. Those can work it out from profile.
1668         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely): Use
1669         optimize_loop_for_speed_p.
1670         * predict.c (optimize_bb_for_size_p, optimize_bb_for_speed_p): Constify
1671         argument.
1672         (optimize_loop_nest_for_size_p, optimize_loop_nest_for_speed_p): New.
1673         * tree-parloops.c (parallelize_loops): Use optimize_loop_for_size_p.
1674         * tree-eh.c (decide_copy_try_finally): Use optimize_function_for_size_p.
1675         * local-alloc.c (block_alloc): Pass BB pointer.
1676         (find_free_reg): Add BB pointer, use optimize_bb_for_size_p.
1677         * gcse.c (gcse_main): Use optimize_function_for_size_p.
1678         * loop-unroll.c (decide_unrolling_and_peeling): Use optimize_loop_for_size_p.
1679         (decide_peel_completely): Likewise.
1680         * tree-vect-analyze.c (vect_mark_for_runtime_alias_test): Use
1681         optimize_loop_for_size_p.
1682         (vect_enhance_data_refs_alignment): Likewise.
1683         * tree-ssa-coalesce.c (coalesce_cost): Add optimize_for_size argument.
1684         (coalesce_cost_bb, coalesce_cost_edge, create_outofssa_var_map): Update call.
1685         * cfgcleanup.c (outgoing_edges_match): Use optimize_bb_for_speed_p.
1686         (try_crossjump_bb): Use optimize_bb_for_size_p.
1687         * tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Use
1688         optimize_loop_for_speed_p.
1689         * bb-reorder.c (find_traces_1_round): Likewise.
1690         (copy_bb): Use optimize_bb_for_speed_p.
1691         (duplicate_computed_gotos): Likewise.
1692         * basic-block.h (optimize_loop_nest_for_size_p,
1693         optimize_loop_nest_for_speed_p): New.
1694         * stmt.c (expand_case): Use optimize_insn_for_size_p.
1695
1696 2008-08-29  Tristan Gingold  <gingold@adacore.com>
1697
1698         * gcov.c (main): Call expandargv.
1699
1700 2008-08-29  Jan Hubicka  <jh@suse.cz>
1701
1702         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Check that loop
1703         is not cold.
1704         * predict.c (optimize_bb_for_size_p, optimize_bb_for_speed_p):
1705         Constify arguments.
1706         (optimize_loop_for_size_p, optimize_loop_for_speed_p): New functions.
1707         * basic-block.h (optimize_bb_for_size_p, optimize_bb_for_speed_p):
1708         Constify.
1709         (optimize_loop_for_size_p, optimize_loop_for_speed_p): Declare.
1710
1711 2008-08-29  Jan Hubicka  <jh@suse.cz>
1712
1713         * tree-pass.h (pass_strip_predict_hints): Declare.
1714         * predict.c (strip_builtin_expect): Rename to ...
1715         (strip_predict_hints): ... this one; strip also GIMPLE_PREDICT.
1716         (tree_bb_level_predictions): Do not remove GIMPLE_PREDICT.
1717         (tree_estimate_probability): Do not strip builtin_expect.
1718         (pass_strip_predict_hints): New pass.
1719         * tree-inline.c (expand_call_inline): When inlining cold function, predict
1720         it as unlikely.
1721         * passes.c (init_optimization_passes): Add pass_strip_predict_hints.
1722
1723 2008-08-29  Richard Guenther  <rguenther@suse.de>
1724
1725         PR tree-optimization/37207
1726         * tree-vrp.c (extract_range_from_binary_expr): Also try
1727         to constant fold if only one of the operands is a constant.
1728
1729 2008-08-29  Nick Clifton  <nickc@redhat.com>
1730
1731         * config/m32r/m32r.h (LEGITIMATE_CONSTANT_P): Treat LABEL_REFs in
1732         the same way as SYMBOL_REFs.
1733
1734 2008-08-28  Bob Wilson  <bob.wilson@acm.org>
1735
1736         * config/xtensa/xtensa.md (<u>mulsidi3): Use a temporary register.
1737
1738 2008-08-28  Adam Nemet  <anemet@caviumnetworks.com>
1739
1740         * config/mips/mips.h (ISA_HAS_BBIT): New macro.
1741         * config/mips/mips.md (branch_likely): Remove const.  Fix
1742         comment formatting.
1743         (define_delay for type "branch"): Change to only apply for branch
1744         with likely variant.
1745         (define_delay for type "branch" and "branch_likely" no).  New delay
1746         definition.
1747         (equality_op): New code iterator.
1748         (bbv, bbinv): New code attributes.
1749         (*branch_bit<bbv><mode>, *branch_bit<bbv><mode>_inverted): New
1750         patterns.
1751
1752 2008-08-28  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1753             Andrew Pinski  <pinskia@gcc.gnu.org>
1754
1755         PR 18050
1756         * c-common.c (verify_tree): Fix handling of ADDR_EXPR.
1757
1758 2008-08-28  Paolo Carlini  <paolo.carlini@oracle.com>
1759
1760         * gtrh-posix.h: Fix uses of _POSIX_TIMEOUTS per the normal Posix
1761         rule that a symbolic constant must be defined and >= 0 for the
1762         corresponding facility to be present at compile-time.
1763         * gthr-posix.c: Likewise.
1764
1765 2008-08-28  Adam Nemet  <anemet@caviumnetworks.com>
1766
1767         * config/mips/mips.h (ISA_HAS_DMUL3): New macro.
1768         * config/mips/mips.md (D): New mode attribute.
1769         (mulsi3, muldi3): Merge it into ...
1770         (mul<mode>3): ... new template.  Use _mul3 ending for 3-op
1771         patterns.
1772         (muldi3_mul3): New pattern.
1773         (mulsi3_mult3): Rename to mulsi3_mul3.
1774
1775 2008-08-28  Jan Hubicka  <jh@suse.cz>
1776
1777         * expmed.c (store_bit_field_1): Be prepared for movstrict expander
1778         to fail.
1779         * predict.c (always_optimize_for_size_p): Rename to ...
1780         (optimize_function_for_size): ... this one; make extern.
1781         (optimize_function_for_speed_p): New.
1782         (optimize_bb_for_size_p, optimize_bb_for_size_p,
1783         optimize_edge_for_size_p,optimize_edge_for_size_p,
1784         optimize_insn_for_size_p, optimize_insn_for_size_p): Update.
1785         * basic-block.h (optimize_function_for_size_p,
1786         optimize_function_for_speed_p): Declare.
1787         * i386.md (optimize_size checks): Replace them by appropriate
1788         predicate.
1789         (standard_80387_constant_p, ix86_compute_frame_layout,
1790         ix86_expand_epilogue, ix86_decompose_address,
1791         print_operand, emit_i387_cw_initialization,
1792         inline_memory_move_cost, ix86_pad_returns,
1793         ix86_reorg): Replace optimize_size checks.
1794
1795 2008-08-28  Richard Sandiford  <rdsandiford@googlemail.com>
1796
1797         * rtl.h (simplify_subreg_regno): Declare.
1798         * rtlanal.c (simplify_subreg_regno): New function, split out from...
1799         * simplify-rtx.c (simplify_subreg): ...here.
1800         * reload.c (find_reloads): Use simplify_subreg_regno instead of
1801         subreg_offset_representable_p.
1802
1803 2008-08-28  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1804
1805         PR c/30949
1806         * c-typeck.c (convert_for_assignment): Give a note describing what
1807         was passed and what was expected.
1808
1809 2008-08-28  Joey Ye  <joey.ye@intel.com>
1810
1811         * doc/extend.texi: Document AVX built-in functions.
1812         * doc/invoke.texi: Document -mavx.
1813
1814 2008-08-28  H.J. Lu  <hongjiu.lu@intel.com>
1815             Joey Ye  <joey.ye@intel.com>
1816             Xuepeng Guo  <xuepeng.guo@intel.com>
1817
1818         * config.gcc (extra_headers): Add gmmintrin.h for x86 and x86-64.
1819
1820         * config/i386/cpuid.h (bit_FMA): New.
1821         (bit_XSAVE): Likewise.
1822         (bit_OSXSAVE): Likewise.
1823         (bit_AVX): Likewise.
1824
1825         * config/i386/gas.h (ASM_OUTPUT_OPCODE): Undefine before
1826         define.  Use ASM_OUTPUT_AVX_PREFIX.
1827
1828         * config/i386/gmmintrin.h: New.
1829
1830         * config/i386/i386.c (x86_64_reg_class): Add X86_64_AVX_CLASS.
1831         (OPTION_MASK_ISA_AVX_SET): New.
1832         (OPTION_MASK_ISA_FMA_SET): Likewise.
1833         (OPTION_MASK_ISA_AVX_UNSET): Likewise.
1834         (OPTION_MASK_ISA_FMA_SET): Likewise.
1835         (OPTION_MASK_ISA_SSE4_2_UNSET): Updated.
1836         (ix86_handle_option): Handle OPT_mavx and OPT_mfma.
1837         (pta_flags): Add PTA_AVX and PTA_FMA.
1838         (override_options): Handle PTA_AVX and PTA_FMA.
1839         (init_cumulative_args): Handle warn_avx.
1840         (classify_argument): Return 0 for COImode and OImode.  Return
1841         1 and X86_64_AVX_CLASS for 256bit vector types.
1842         (examine_argument): Handle X86_64_AVX_CLASS.
1843         (construct_container): Likewise.
1844         (function_arg_advance_32): Pass OImode and 256bit vector types
1845         in AVX register.
1846         (function_arg_advance_64): Take a new argument to indicate if a
1847         parameter is named.  Handle 256bit vector types.  Return
1848         immediately for unnamed 256bit vector mode parameters.
1849         (function_arg_advance): Updated.
1850         (function_arg_32): Add comments for TImode.  Handle OImode
1851         and 256bit vector types.
1852         (function_arg_64): Take a new argument to indicate if a
1853         parameter is named.  Handle 256bit vector types.  Return NULL
1854         for unnamed 256bit vector mode parameters.
1855         (function_arg): Updated.
1856         (setup_incoming_varargs_64): Support
1857         AVX encoding for *sse_prologue_save_insn.
1858         (ix86_gimplify_va_arg): Handle 256bit vector mode parameters.
1859         (standard_sse_constant_p): Return -2 for all 1s if SSE2 isn't
1860         enabled.  For all 1s in 256bit vector modes, return 3 if AVX is
1861         enabled, otherwise return -3.
1862         (standard_sse_constant_opcode): Handle AVX and 256bit vector
1863         modes.
1864         (print_reg): Support AVX registers.  Handle 'x' and 't'.
1865         Handle 'd' to duplicate the operand.
1866         (print_operand): Likewise.  Also support AVX vector compare
1867         instructions.
1868         (output_387_binary_op): Support AVX.
1869         (output_fp_compare): Likewise.
1870         (ix86_expand_vector_move_misalign): Likewise.
1871         (ix86_attr_length_vex_default): New.
1872         (ix86_builtins): Add IX86_BUILTIN_ADDPD256,
1873         IX86_BUILTIN_ADDPS256, IX86_BUILTIN_ADDSUBPD256,
1874         IX86_BUILTIN_ADDSUBPS256, IX86_BUILTIN_ANDPD256,
1875         IX86_BUILTIN_ANDPS256, IX86_BUILTIN_ANDNPD256,
1876         IX86_BUILTIN_ANDNPS256, IX86_BUILTIN_BLENDPD256,
1877         IX86_BUILTIN_BLENDPS256, IX86_BUILTIN_BLENDVPD256,
1878         IX86_BUILTIN_BLENDVPS256, IX86_BUILTIN_DIVPD256,
1879         IX86_BUILTIN_DIVPS256, IX86_BUILTIN_DPPS256,
1880         IX86_BUILTIN_HADDPD256, IX86_BUILTIN_HADDPS256,
1881         IX86_BUILTIN_HSUBPD256, IX86_BUILTIN_HSUBPS256,
1882         IX86_BUILTIN_MAXPD256, IX86_BUILTIN_MAXPS256,
1883         IX86_BUILTIN_MINPD256, IX86_BUILTIN_MINPS256,
1884         IX86_BUILTIN_MULPD256, IX86_BUILTIN_MULPS256,
1885         IX86_BUILTIN_ORPD256, IX86_BUILTIN_ORPS256,
1886         IX86_BUILTIN_SHUFPD256, IX86_BUILTIN_SHUFPS256,
1887         IX86_BUILTIN_SUBPD256, IX86_BUILTIN_SUBPS256,
1888         IX86_BUILTIN_XORPD256, IX86_BUILTIN_XORPS256,
1889         IX86_BUILTIN_CMPSD, IX86_BUILTIN_CMPSS, IX86_BUILTIN_CMPPD,
1890         IX86_BUILTIN_CMPPS, IX86_BUILTIN_CMPPD256,
1891         IX86_BUILTIN_CMPPS256, IX86_BUILTIN_CVTDQ2PD256,
1892         IX86_BUILTIN_CVTDQ2PS256, IX86_BUILTIN_CVTPD2PS256,
1893         IX86_BUILTIN_CVTPS2DQ256, IX86_BUILTIN_CVTPS2PD256,
1894         IX86_BUILTIN_CVTTPD2DQ256, IX86_BUILTIN_CVTPD2DQ256,
1895         IX86_BUILTIN_CVTTPS2DQ256, IX86_BUILTIN_EXTRACTF128PD256,
1896         IX86_BUILTIN_EXTRACTF128PS256, IX86_BUILTIN_EXTRACTF128SI256,
1897         IX86_BUILTIN_VZEROALL, IX86_BUILTIN_VZEROUPPER,
1898         IX86_BUILTIN_VZEROUPPER_REX64, IX86_BUILTIN_VPERMILVARPD,
1899         IX86_BUILTIN_VPERMILVARPS, IX86_BUILTIN_VPERMILVARPD256,
1900         IX86_BUILTIN_VPERMILVARPS256, IX86_BUILTIN_VPERMILPD,
1901         IX86_BUILTIN_VPERMILPS, IX86_BUILTIN_VPERMILPD256,
1902         IX86_BUILTIN_VPERMILPS256, IX86_BUILTIN_VPERMIL2PD,
1903         IX86_BUILTIN_VPERMIL2PS, IX86_BUILTIN_VPERMIL2PD256,
1904         IX86_BUILTIN_VPERMIL2PS256, IX86_BUILTIN_VPERM2F128PD256,
1905         IX86_BUILTIN_VPERM2F128PS256, IX86_BUILTIN_VPERM2F128SI256,
1906         IX86_BUILTIN_VBROADCASTSS, IX86_BUILTIN_VBROADCASTSD256,
1907         IX86_BUILTIN_VBROADCASTSS256, IX86_BUILTIN_VBROADCASTPD256,
1908         IX86_BUILTIN_VBROADCASTPS256, IX86_BUILTIN_VINSERTF128PD256,
1909         IX86_BUILTIN_VINSERTF128PS256, IX86_BUILTIN_VINSERTF128SI256,
1910         IX86_BUILTIN_LOADUPD256, IX86_BUILTIN_LOADUPS256,
1911         IX86_BUILTIN_STOREUPD256, IX86_BUILTIN_STOREUPS256,
1912         IX86_BUILTIN_LDDQU256, IX86_BUILTIN_LOADDQU256,
1913         IX86_BUILTIN_STOREDQU256, IX86_BUILTIN_MASKLOADPD,
1914         IX86_BUILTIN_MASKLOADPS, IX86_BUILTIN_MASKSTOREPD,
1915         IX86_BUILTIN_MASKSTOREPS, IX86_BUILTIN_MASKLOADPD256,
1916         IX86_BUILTIN_MASKLOADPS256, IX86_BUILTIN_MASKSTOREPD256,
1917         IX86_BUILTIN_MASKSTOREPS256, IX86_BUILTIN_MOVSHDUP256,
1918         IX86_BUILTIN_MOVSLDUP256, IX86_BUILTIN_MOVDDUP256,
1919         IX86_BUILTIN_SQRTPD256, IX86_BUILTIN_SQRTPS256,
1920         IX86_BUILTIN_SQRTPS_NR256, IX86_BUILTIN_RSQRTPS256,
1921         IX86_BUILTIN_RSQRTPS_NR256, IX86_BUILTIN_RCPPS256,
1922         IX86_BUILTIN_ROUNDPD256, IX86_BUILTIN_ROUNDPS256,
1923         IX86_BUILTIN_UNPCKHPD256, IX86_BUILTIN_UNPCKLPD256,
1924         IX86_BUILTIN_UNPCKHPS256, IX86_BUILTIN_UNPCKLPS256,
1925         IX86_BUILTIN_SI256_SI, IX86_BUILTIN_PS256_PS,
1926         IX86_BUILTIN_PD256_PD, IX86_BUILTIN_SI_SI256,
1927         IX86_BUILTIN_PS_PS256, IX86_BUILTIN_PD_PD256,
1928         IX86_BUILTIN_VTESTZPD, IX86_BUILTIN_VTESTCPD,
1929         IX86_BUILTIN_VTESTNZCPD, IX86_BUILTIN_VTESTZPS,
1930         IX86_BUILTIN_VTESTCPS, IX86_BUILTIN_VTESTNZCPS,
1931         IX86_BUILTIN_VTESTZPD256, IX86_BUILTIN_VTESTCPD256,
1932         IX86_BUILTIN_VTESTNZCPD256, IX86_BUILTIN_VTESTZPS256,
1933         IX86_BUILTIN_VTESTCPS256, IX86_BUILTIN_VTESTNZCPS256,
1934         IX86_BUILTIN_PTESTZ256, IX86_BUILTIN_PTESTC256,
1935         IX86_BUILTIN_PTESTNZC256, IX86_BUILTIN_MOVMSKPD256
1936         and IX86_BUILTIN_MOVMSKPS256,
1937         (ix86_special_builtin_type): Add V32QI_FTYPE_PCCHAR,
1938         V8SF_FTYPE_PCV4SF, V8SF_FTYPE_PCFLOAT, V4DF_FTYPE_PCV2DF,
1939         V4DF_FTYPE_PCDOUBLE, V8SF_FTYPE_PCV8SF_V8SF,
1940         V4DF_FTYPE_PCV4DF_V4DF, V4SF_FTYPE_PCV4SF_V4SF,
1941         V2DF_FTYPE_PCV2DF_V2DF, VOID_FTYPE_PCHAR_V32QI,
1942         VOID_FTYPE_PFLOAT_V8SF, VOID_FTYPE_PDOUBLE_V4DF,
1943         VOID_FTYPE_PV8SF_V8SF_V8SF, VOID_FTYPE_PV4DF_V4DF_V4DF,
1944         VOID_FTYPE_PV4SF_V4SF_V4SF and VOID_FTYPE_PV2DF_V2DF_V2DF,
1945         (ix86_builtin_type): Add INT_FTYPE_V8SF_V8SF_PTEST,
1946         INT_FTYPE_V4DI_V4DI_PTEST, INT_FTYPE_V4DF_V4DF_PTEST,
1947         INT_FTYPE_V4SF_V4SF_PTEST, INT_FTYPE_V2DF_V2DF_PTEST,
1948         INT_FTYPE_V8SF, INT_FTYPE_V4DF, V8SI_FTYPE_V8SF, V8SI_FTYPE_V4SI,
1949         V8SF_FTYPE_V8SF, V8SF_FTYPE_V8SI, V8SF_FTYPE_V4SF,
1950         V4SI_FTYPE_V8SI, V4SI_FTYPE_V4DF, V4DF_FTYPE_V4DF,
1951         V4DF_FTYPE_V4SI, V4DF_FTYPE_V4SF, V4DF_FTYPE_V2DF,
1952         V4SF_FTYPE_V4DF, V4SF_FTYPE_V8SF, V2DF_FTYPE_V4DF,
1953         V8SF_FTYPE_V8SF_V8SF, V8SF_FTYPE_V8SF_V8SI,
1954         V4DF_FTYPE_V4DF_V4DF, V4DF_FTYPE_V4DF_V4DI,
1955         V4SF_FTYPE_V4SF_V4SI, V2DF_FTYPE_V2DF_V2DI,
1956         V8SF_FTYPE_V8SF_INT, V4SI_FTYPE_V8SI_INT, V4SF_FTYPE_V8SF_INT,
1957         V2DF_FTYPE_V4DF_INT, V4DF_FTYPE_V4DF_INT,
1958         V8SF_FTYPE_V8SF_V8SF_V8SF, V4DF_FTYPE_V4DF_V4DF_V4DF,
1959         V8SI_FTYPE_V8SI_V8SI_INT, V8SF_FTYPE_V8SF_V8SF_INT,
1960         V4DF_FTYPE_V4DF_V4DF_INT, V4DF_FTYPE_V4DF_V2DF_INT,
1961         V8SF_FTYPE_V8SF_V8SF_V8SI_INT, V4DF_FTYPE_V4DF_V4DF_V4DI_INT,
1962         V4SF_FTYPE_V4SF_V4SF_V4SI_INT and V2DF_FTYPE_V2DF_V2DF_V2DI_INT.
1963         (bdesc_special_args): Add IX86_BUILTIN_VZEROALL,
1964         IX86_BUILTIN_VZEROUPPER. IX86_BUILTIN_VZEROUPPER_REX64,
1965         IX86_BUILTIN_VBROADCASTSS, IX86_BUILTIN_VBROADCASTSD256,
1966         IX86_BUILTIN_VBROADCASTSS256, IX86_BUILTIN_VBROADCASTPD256,
1967         IX86_BUILTIN_VBROADCASTPS256, IX86_BUILTIN_LOADUPD256,
1968         IX86_BUILTIN_LOADUPS256, IX86_BUILTIN_STOREUPD256,
1969         IX86_BUILTIN_STOREUPS256, IX86_BUILTIN_LOADDQU256,
1970         IX86_BUILTIN_STOREDQU256, IX86_BUILTIN_LDDQU256,
1971         IX86_BUILTIN_MASKLOADPD, IX86_BUILTIN_MASKLOADPS,
1972         IX86_BUILTIN_MASKLOADPD256, IX86_BUILTIN_MASKLOADPS256,
1973         IX86_BUILTIN_MASKSTOREPD, IX86_BUILTIN_MASKSTOREPS,
1974         IX86_BUILTIN_MASKSTOREPD256 and IX86_BUILTIN_MASKSTOREPS256.
1975         (ix86_builtins): Add IX86_BUILTIN_ADDPD256,
1976         IX86_BUILTIN_ADDPS256, IX86_BUILTIN_ADDSUBPD256,
1977         IX86_BUILTIN_ADDSUBPS256, IX86_BUILTIN_ANDPD256,
1978         IX86_BUILTIN_ANDPS256, IX86_BUILTIN_ANDNPD256,
1979         IX86_BUILTIN_ANDNPS256, IX86_BUILTIN_DIVPD256,
1980         IX86_BUILTIN_DIVPS256, IX86_BUILTIN_HADDPD256,
1981         IX86_BUILTIN_HSUBPS256, IX86_BUILTIN_HSUBPD256,
1982         IX86_BUILTIN_HADDPS256, IX86_BUILTIN_MAXPD256,
1983         IX86_BUILTIN_MAXPS256, IX86_BUILTIN_MINPD256,
1984         IX86_BUILTIN_MINPS256, IX86_BUILTIN_MULPD256,
1985         IX86_BUILTIN_MULPS256, IX86_BUILTIN_ORPD256,
1986         IX86_BUILTIN_ORPS256, IX86_BUILTIN_SUBPD256,
1987         IX86_BUILTIN_SUBPS256, IX86_BUILTIN_XORPD256,
1988         IX86_BUILTIN_XORPS256, IX86_BUILTIN_VPERMILVARPD,
1989         IX86_BUILTIN_VPERMILVARPS, IX86_BUILTIN_VPERMILVARPD256,
1990         IX86_BUILTIN_VPERMILVARPS256, IX86_BUILTIN_BLENDPD256,
1991         IX86_BUILTIN_BLENDPS256, IX86_BUILTIN_BLENDVPD256,
1992         IX86_BUILTIN_BLENDVPS256, IX86_BUILTIN_DPPS256,
1993         IX86_BUILTIN_SHUFPD256, IX86_BUILTIN_SHUFPS256,
1994         IX86_BUILTIN_CMPSD, IX86_BUILTIN_CMPSS, IX86_BUILTIN_CMPPD,
1995         IX86_BUILTIN_CMPPS,
1996         IX86_BUILTIN_CMPPD256,IX86_BUILTIN_CMPPS256,
1997         IX86_BUILTIN_EXTRACTF128PD256, IX86_BUILTIN_EXTRACTF128PS256,
1998         IX86_BUILTIN_EXTRACTF128SI256, IX86_BUILTIN_CVTDQ2PD256,
1999         IX86_BUILTIN_CVTDQ2PS256, IX86_BUILTIN_CVTPD2PS256,
2000         IX86_BUILTIN_CVTPS2DQ256, IX86_BUILTIN_CVTPS2PD256,
2001         IX86_BUILTIN_CVTTPD2DQ256, IX86_BUILTIN_CVTPD2DQ256,
2002         IX86_BUILTIN_CVTTPS2DQ256, IX86_BUILTIN_VPERM2F128PD256,
2003         IX86_BUILTIN_VPERM2F128PS256, IX86_BUILTIN_VPERM2F128SI256,
2004         IX86_BUILTIN_VPERMILPD, IX86_BUILTIN_VPERMILPS,
2005         IX86_BUILTIN_VPERMILPD256, IX86_BUILTIN_VPERMILPS256,
2006         IX86_BUILTIN_VPERMIL2PD, IX86_BUILTIN_VPERMILPS,
2007         IX86_BUILTIN_VPERMILPD256, IX86_BUILTIN_VPERMILPS256,
2008         IX86_BUILTIN_VPERMIL2PD, IX86_BUILTIN_VPERMIL2PS,
2009         IX86_BUILTIN_VPERMIL2PD256, IX86_BUILTIN_VPERMIL2PS256,
2010         IX86_BUILTIN_VINSERTF128PD256, IX86_BUILTIN_VINSERTF128PS256,
2011         IX86_BUILTIN_VINSERTF128SI256, IX86_BUILTIN_MOVSHDUP256,
2012         IX86_BUILTIN_MOVSLDUP256, IX86_BUILTIN_MOVDDUP256,
2013         IX86_BUILTIN_SQRTPD256, IX86_BUILTIN_SQRTPS256,
2014         IX86_BUILTIN_SQRTPS_NR256, IX86_BUILTIN_RSQRTPS256,
2015         IX86_BUILTIN_RSQRTPS_NR256, IX86_BUILTIN_RCPPS256,
2016         IX86_BUILTIN_ROUNDPD256, IX86_BUILTIN_ROUNDPS256,
2017         IX86_BUILTIN_UNPCKHPD256, IX86_BUILTIN_UNPCKLPD256,
2018         IX86_BUILTIN_UNPCKHPS256, IX86_BUILTIN_UNPCKLPS256,
2019         IX86_BUILTIN_SI256_SI, IX86_BUILTIN_PS256_PS,
2020         IX86_BUILTIN_PD256_PD, IX86_BUILTIN_SI_SI256,
2021         IX86_BUILTIN_PS_PS256, IX86_BUILTIN_PD_PD256,
2022         IX86_BUILTIN_VTESTZPD, IX86_BUILTIN_VTESTCPD,
2023         IX86_BUILTIN_VTESTNZCPD, IX86_BUILTIN_VTESTZPS,
2024         IX86_BUILTIN_VTESTCPS, IX86_BUILTIN_VTESTNZCPS,
2025         IX86_BUILTIN_VTESTZPD256, IX86_BUILTIN_VTESTCPD256,
2026         IX86_BUILTIN_VTESTNZCPD256, IX86_BUILTIN_VTESTZPS256,
2027         IX86_BUILTIN_VTESTCPS256, IX86_BUILTIN_VTESTNZCPS256,
2028         IX86_BUILTIN_PTESTZ256, IX86_BUILTIN_PTESTC256,
2029         IX86_BUILTIN_PTESTNZC256, IX86_BUILTIN_MOVMSKPD256 and
2030         IX86_BUILTIN_MOVMSKPS256.
2031         (ix86_init_mmx_sse_builtins): Support AVX builtins.
2032         (ix86_expand_args_builtin): Likewise.
2033         (ix86_expand_special_args_builtin): Likewise.
2034         (ix86_hard_regno_mode_ok): Handle AVX modes.
2035         (ix86_expand_vector_init_duplicate): Likewise.
2036         (ix86_expand_vector_init_one_nonzero): Likewise.
2037         (ix86_expand_vector_init_one_var): Likewise.
2038         (ix86_expand_vector_init_concat): Likewise.
2039         (ix86_expand_vector_init_general): Likewise.
2040         (ix86_expand_vector_set): Likewise.
2041         (ix86_vector_mode_supported_p): Likewise.
2042         (x86_extended_reg_mentioned_p): Check INSN_P before using
2043         PATTERN.
2044
2045         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2046         OPTION_MASK_ISA_AVX and OPTION_MASK_ISA_FMA.
2047
2048         * config/i386/i386.h (TARGET_AVX): New.
2049         (TARGET_FMA): Likewise.
2050         (TARGET_CPU_CPP_BUILTINS): Handle TARGET_AVX and TARGET_FMA.
2051         (BIGGEST_ALIGNMENT): Set to 256 for TARGET_AVX.
2052         (VALID_AVX256_REG_MODE): New.
2053         (AVX256_VEC_FLOAT_MODE_P): Likewise.
2054         (AVX_FLOAT_MODE_P): Likewise.
2055         (AVX128_VEC_FLOAT_MODE_P): Likewise.
2056         (AVX256_VEC_FLOAT_MODE_P): Likewise.
2057         (AVX_VEC_FLOAT_MODE_P): Likewise.
2058         (ASM_OUTPUT_AVX_PREFIX): Likewise.
2059         (ASM_OUTPUT_OPCODE): Likewise.
2060         (UNITS_PER_SIMD_WORD): Add a FIXME for 32byte vectorizer
2061         support.
2062         (SSE_REG_MODE_P): Allow 256bit vector modes.
2063         (ix86_args): Add a warn_avx field.
2064
2065         * config/i386/i386.md (UNSPEC_PCMP): New.
2066         (UNSPEC_VPERMIL): Likewise.
2067         (UNSPEC_VPERMIL2): Likewise.
2068         (UNSPEC_VPERMIL2F128): Likewise.
2069         (UNSPEC_MASKLOAD): Likewise.
2070         (UNSPEC_MASKSTORE): Likewise.
2071         (UNSPEC_CAST): Likewise.
2072         (UNSPEC_VTESTP): Likewise.
2073         (UNSPECV_VZEROALL): Likewise.
2074         (UNSPECV_VZEROUPPER): Likewise.
2075         (XMM0_REG): Likewise.
2076         (XMM1_REG): Likewise.
2077         (XMM2_REG): Likewise.
2078         (XMM3_REG): Likewise.
2079         (XMM4_REG): Likewise.
2080         (XMM5_REG): Likewise.
2081         (XMM6_REG): Likewise.
2082         (XMM8_REG): Likewise.
2083         (XMM9_REG): Likewise.
2084         (XMM10_REG): Likewise.
2085         (XMM11_REG): Likewise.
2086         (XMM12_REG): Likewise.
2087         (XMM13_REG): Likewise.
2088         (XMM14_REG): Likewise.
2089         (XMM15_REG): Likewise.
2090         (prefix): Likewise.
2091         (prefix_vex_imm8): Likewise.
2092         (prefix_vex_w): Likewise.
2093         (length_vex): Likewise.
2094         (maxmin): Likewise.
2095         (movoi): Likewise.
2096         (*avx_ashlti3): Likewise.
2097         (*avx_lshrti3): Likewise.
2098         (*avx_setcc<mode>): Likewise.
2099         (*fop_<mode>_comm_mixed_avx): Likewise.
2100         (*fop_<mode>_comm_avx): Likewise.
2101         (*fop_<mode>_1_mixed_avx): Likewise.
2102         (*fop_<mode>_1_avx): Likewise.
2103         (*avx_<code><mode>3): Likewise.
2104         (*avx_ieee_smin<mode>3): Likewise.
2105         (*avx_ieee_smax<mode>3): Likewise.
2106         (mode): Add OI, V8SF and V4DF.
2107         (length): Support VEX prefix.
2108         (*cmpfp_i_mixed): Set prefix attribute.
2109         (*cmpfp_i_sse): Likewise.
2110         (*cmpfp_iu_mixed): Likewise.
2111         (*cmpfp_iu_sse): Likewise.
2112         (*movsi_1): Support AVX.
2113         (*movdi_2): Likewise.
2114         (*movdi_1_rex64): Likewise.
2115         (*movti_internal): Likewise.
2116         (*movti_rex64): Likewise.
2117         (*movsf_1): Likewise.
2118         (*movdf_nointeger): Likewise.
2119         (*movdf_integer_rex64): Likewise.
2120         (*movtf_internal): Likewise.
2121         (zero_extendsidi2_32): Likewise.
2122         (zero_extendsidi2_rex64): Likewise.
2123         (*extendsfdf2_mixed): Likewise.
2124         (*extendsfdf2_sse): Likewise.
2125         (*truncdfsf_fast_mixed): Likewise.
2126         (*truncdfsf_fast_sse): Likewise.
2127         (*truncdfsf_mixed): Likewise.
2128         (fix_trunc<mode>di_sse): Likewise.
2129         (fix_trunc<mode>si_sse): Likewise.
2130         (*float<SSEMODEI24:mode><MODEF:mode>2_mixed_interunit): Likewise.
2131         (*float<SSEMODEI24:mode><MODEF:mode>2_mixed_nointerunit): Likewise.
2132         (*float<SSEMODEI24:mode><MODEF:mode>2_sse_interunit): Likewise.
2133         (*float<SSEMODEI24:mode><MODEF:mode>2_sse_nointerunit): Likewise.
2134         (*rcpsf2_sse): Likewise.
2135         (*rsqrtsf2_sse): Likewise.
2136         (*sqrt<mode>2_sse): Likewise.
2137         (sse4_1_round<mode>2): Likewise.
2138         (*sse_prologue_save_insn): Disallow REX prefix for AVX.
2139         Support AVX.  Set length attribute properly for AVX.
2140
2141         * config/i386/i386-modes.def (VECTOR_MODES (INT, 32)): New.
2142         (VECTOR_MODES (FLOAT, 32)): Likewise.
2143         (VECTOR_MODE (INT, DI, 8)): Likewise.
2144         (VECTOR_MODE (INT, HI, 32)): Likewise.
2145         (VECTOR_MODE (INT, QI, 64)): Likewise.
2146         (VECTOR_MODE (FLOAT, DF, 8)): Likewise.
2147         (VECTOR_MODE (FLOAT, SF, 16)): Likewise.
2148         (VECTOR_MODE (INT, DI, 4)): Removed.
2149         (VECTOR_MODE (INT, SI, 8)): Likewise.
2150         (VECTOR_MODE (INT, HI, 16)): Likewise.
2151         (VECTOR_MODE (INT, QI, 32)): Likewise.
2152         (VECTOR_MODE (FLOAT, SF, 8)): Likewise.
2153         (INT_MODE (OI, 32)): Likewise.
2154
2155         * config/i386/i386.opt (mavx): New.
2156         (mfma): Likewise.
2157
2158         * config/i386/i386-protos.h (ix86_attr_length_vex_default): New.
2159
2160         * config/i386/mmx.md (*mov<mode>_internal_rex64): Support AVX.
2161         (*mov<mode>_internal_avx): New.
2162         (*movv2sf_internal_rex64_avx): Likewise.
2163         (*movv2sf_internal_avx): Likewise.
2164
2165         * config/i386/predicates.md (const_4_to_5_operand): New.
2166         (const_6_to_7_operand): Likewise.
2167         (const_8_to_11_operand): Likewise.
2168         (const_12_to_15_operand): Likewise.
2169         (avx_comparison_float_operator): Likewise.
2170
2171         * config/i386/sse.md (AVX256MODEI): New.
2172         (AVX256MODE): Likewise.
2173         (AVXMODEQI): Likewise.
2174         (AVXMODE): Likewise.
2175         (AVX256MODEF2P): Likewise.
2176         (AVX256MODE2P): Likewise.
2177         (AVX256MODE4P): Likewise.
2178         (AVX256MODE8P): Likewise.
2179         (AVXMODEF2P): Likewise.
2180         (AVXMODEF4P): Likewise.
2181         (AVXMODEDCVTDQ2PS): Likewise.
2182         (AVXMODEDCVTPS2DQ): Likewise.
2183         (avxvecmode): Likewise.
2184         (avxvecpsmode): Likewise.
2185         (avxhalfvecmode): Likewise.
2186         (avxscalarmode): Likewise.
2187         (avxcvtvecmode): Likewise.
2188         (avxpermvecmode): Likewise.
2189         (avxmodesuffixf2c): Likewise.
2190         (avxmodesuffixp): Likewise.
2191         (avxmodesuffixs): Likewise.
2192         (avxmodesuffix): Likewise.
2193         (vpermilbits): Likewise.
2194         (pinsrbits): Likewise.
2195         (mov<mode>): Likewise.
2196         (*mov<mode>_internal): Likewise.
2197         (push<mode>1): Likewise.
2198         (movmisalign<mode>): Likewise.
2199         (avx_movup<avxmodesuffixf2c><avxmodesuffix>): Likewise.
2200         (avx_movdqu<avxmodesuffix>): Likewise.
2201         (avx_lddqu<avxmodesuffix>): Likewise.
2202         (<plusminus_insn><mode>3): Likewise.
2203         (*avx_<plusminus_insn><mode>3): Likewise.
2204         (*avx_vm<plusminus_insn><mode>3): Likewise.
2205         (mul<mode>3): Likewise.
2206         (*avx_mul<mode>3): Likewise.
2207         (*avx_vmmul<mode>3): Likewise.
2208         (divv8sf3): Likewise.
2209         (divv4df3): Likewise.
2210         (avx_div<mode>3): Likewise.
2211         (*avx_div<mode>3): Likewise.
2212         (*avx_vmdiv<mode>3): Likewise.
2213         (avx_rcpv8sf2): Likewise.
2214         (*avx_vmrcpv4sf2): Likewise.
2215         (sqrtv8sf2): Likewise.
2216         (avx_sqrtv8sf2): Likewise.
2217         (*avx_vmsqrt<mode>2): Likewise.
2218         (rsqrtv8sf2): Likewise.
2219         (avx_rsqrtv8sf2): Likewise.
2220         (*avx_vmrsqrtv4sf2): Likewise.
2221         (<code><mode>3): Likewise.
2222         (*avx_<code><mode>3_finite): Likewise.
2223         (*avx_<code><mode>3): Likewise.
2224         (*avx_vm<code><mode>3): Likewise.
2225         (*avx_ieee_smin<mode>3): Likewise.
2226         (*avx_ieee_smax<mode>3): Likewise.
2227         (avx_addsubv8sf3): Likewise.
2228         (avx_addsubv4df3): Likewise.
2229         (*avx_addsubv4sf3): Likewise.
2230         (*avx_addsubv2df3): Likewise.
2231         (avx_h<plusminus_insn>v4df3): Likewise.
2232         (avx_h<plusminus_insn>v8sf3): Likewise.
2233         (*avx_h<plusminus_insn>v4sf3): Likewise.
2234         (*avx_h<plusminus_insn>v2df3): Likewise.
2235         (avx_cmpp<avxmodesuffixf2c><mode>3): Likewise.
2236         (avx_cmps<ssemodesuffixf2c><mode>3): Likewise.
2237         (*avx_maskcmp<mode>3): Likewise.
2238         (avx_nand<mode>3): Likewise.
2239         (*avx_<code><mode>3): Likewise.
2240         (*avx_nand<mode>3): Likewise.
2241         (*avx_<code><mode>3): Likewise.
2242         (*avx_cvtsi2ss): Likewise.
2243         (*avx_cvtsi2ssq): Likewise.
2244         (*avx_cvtsi2sd): Likewise.
2245         (*avx_cvtsi2sdq): Likewise.
2246         (*avx_cvtsd2ss): Likewise.
2247         (avx_cvtss2sd): Likewise.
2248         (avx_cvtdq2ps<avxmodesuffix>): Likewise.
2249         (avx_cvtps2dq<avxmodesuffix>): Likewise.
2250         (avx_cvttps2dq<avxmodesuffix>): Likewise.
2251         (*avx_cvtsi2sd): Likewise.
2252         (*avx_cvtsi2sdq): Likewise.
2253         (avx_cvtdq2pd256): Likewise.
2254         (avx_cvtpd2dq256): Likewise.
2255         (avx_cvttpd2dq256): Likewise.
2256         (*avx_cvtsd2ss): Likewise.
2257         (*avx_cvtss2sd): Likewise.
2258         (avx_cvtpd2ps256): Likewise.
2259         (avx_cvtps2pd256): Likewise.
2260         (*avx_movhlps): Likewise.
2261         (*avx_movlhps): Likewise.
2262         (avx_unpckhps256): Likewise.
2263         (*avx_unpckhps): Likewise.
2264         (avx_unpcklps256): Likewise.
2265         (*avx_unpcklps): Likewise.
2266         (avx_movshdup256): Likewise.
2267         (avx_movsldup256): Likewise.
2268         (avx_shufps256): Likewise.
2269         (avx_shufps256_1): Likewise.
2270         (*avx_shufps_<mode>): Likewise.
2271         (*avx_loadhps): Likewise.
2272         (*avx_storelps): Likewise.
2273         (*avx_loadlps): Likewise.
2274         (*avx_movss): Likewise.
2275         (*vec_dupv4sf_avx): Likewise.
2276         (*vec_concatv2sf_avx): Likewise.
2277         (*vec_concatv4sf_avx): Likewise.
2278         (*vec_setv4sf_0_avx): Likewise.
2279         (*vec_setv4sf_avx): Likewise.
2280         (*avx_insertps): Likewise.
2281         (avx_vextractf128<mode>): Likewise.
2282         (vec_extract_lo_<mode>): Likewise.
2283         (vec_extract_hi_<mode>): Likewise.
2284         (vec_extract_lo_<mode>): Likewise.
2285         (vec_extract_hi_<mode>): Likewise.
2286         (vec_extract_lo_v16hi): Likewise.
2287         (vec_extract_hi_v16hi): Likewise.
2288         (vec_extract_lo_v32qi): Likewise.
2289         (vec_extract_hi_v32qi): Likewise.
2290         (avx_unpckhpd256): Likewise.
2291         (*avx_unpckhpd): Likewise.
2292         (avx_movddup256): Likewise.
2293         (*avx_movddup): Likewise.
2294         (avx_unpcklpd256): Likewise.
2295         (*avx_unpcklpd): Likewise.
2296         (avx_shufpd256): Likewise.
2297         (avx_shufpd256_1): Likewise.
2298         (*avx_punpckhqdq): Likewise.
2299         (*avx_punpcklqdq): Likewise.
2300         (*avx_shufpd_<mode>): Likewise.
2301         (*avx_storehpd): Likewise.
2302         (*avx_loadhpd): Likewise.
2303         (*avx_loadlpd): Likewise.
2304         (*avx_movsd): Likewise.
2305         (*vec_concatv2df_avx): Likewise.
2306         (*avx_<plusminus_insn><mode>3): Likewise.
2307         (*avx_<plusminus_insn><mode>3): Likewise.
2308         (*avx_mulv8hi3): Likewise.
2309         (*avxv8hi3_highpart): Likewise.
2310         (*avx_umulv8hi3_highpart): Likewise.
2311         (*avx_umulv2siv2di3): Likewise.
2312         (*avx_mulv2siv2di3): Likewise.
2313         (*avx_pmaddwd): Likewise.
2314         (*avx_mulv4si3): Likewise.
2315         (*avx_ashr<mode>3): Likewise.
2316         (*avx_lshr<mode>3): Likewise.
2317         (*avx_ashl<mode>3): Likewise.
2318         (*avx_<code><mode>3): Likewise.
2319         (*avx_eq<mode>3): Likewise.
2320         (*avx_gt<mode>3): Likewise.
2321         (*avx_nand<mode>3): Likewise.
2322         (*avx_nand<mode>3): Likewise.
2323         (*avx_<code><mode>3): Likewise.
2324         (*avx_<code><mode>3): Likewise.
2325         (*avx_packsswb): Likewise.
2326         (*avx_packssdw): Likewise.
2327         (*avx_packuswb): Likewise.
2328         (*avx_punpckhbw): Likewise.
2329         (*avx_punpcklbw): Likewise.
2330         (*avx_punpckhwd): Likewise.
2331         (*avx_punpcklwd): Likewise.
2332         (*avx_punpckhdq): Likewise.
2333         (*avx_punpckldq): Likewise.
2334         (*avx_pinsr<avxmodesuffixs>): Likewise.
2335         (*avx_pinsrq): Likewise.
2336         (*avx_loadld): Likewise.
2337         (*vec_extractv2di_1_rex64_avx): Likewise.
2338         (*vec_extractv2di_1_avx): Likewise.
2339         (*vec_dupv2di_avx): Likewise.
2340         (*vec_concatv2si_avx): Likewise.
2341         (*vec_concatv4si_1_avx): Likewise.
2342         (*vec_concatv2di_avx): Likewise.
2343         (*vec_concatv2di_rex64_avx): Likewise.
2344         (*avx_uavgv16qi3): Likewise.
2345         (*avx_uavgv8hi3): Likewise.
2346         (*avx_psadbw): Likewise.
2347         (avx_movmskp<avxmodesuffixf2c>256): Likewise.
2348         (*avx_phaddwv8hi3): Likewise.
2349         (*avx_phadddv4si3): Likewise.
2350         (*avx_phaddswv8hi3): Likewise.
2351         (*avx_phsubwv8hi3): Likewise.
2352         (*avx_phsubdv4si3): Likewise.
2353         (*avx_phsubswv8hi3): Likewise.
2354         (*avx_pmaddubsw128): Likewise.
2355         (*avx_pmulhrswv8hi3): Likewise.
2356         (*avx_pshufbv16qi3): Likewise.
2357         (*avx_psign<mode>3): Likewise.
2358         (*avx_palignrti): Likewise.
2359         (avx_blendp<avxmodesuffixf2c><avxmodesuffix>): Likewise.
2360         (avx_blendvp<avxmodesuffixf2c><avxmodesuffix>): Likewise.
2361         (avx_dpp<avxmodesuffixf2c><avxmodesuffix>): Likewise.
2362         (*avx_mpsadbw): Likewise.
2363         (*avx_packusdw): Likewise.
2364         (*avx_pblendvb): Likewise.
2365         (*avx_pblendw): Likewise.
2366         (avx_vtestp<avxmodesuffixf2c><avxmodesuffix>): Likewise.
2367         (avx_ptest256): Likewise.
2368         (avx_roundp<avxmodesuffixf2c>256): Likewise.
2369         (*avx_rounds<ssemodesuffixf2c>): Likewise.
2370         (*avx_aesenc): Likewise.
2371         (*avx_aesenclast): Likewise.
2372         (*avx_aesdec): Likewise.
2373         (*avx_aesdeclast): Likewise.
2374         (avx_vzeroupper): Likewise.
2375         (avx_vzeroupper_rex64): Likewise.
2376         (avx_vpermil<mode>): Likewise.
2377         (avx_vpermilvar<mode>3): Likewise.
2378         (avx_vpermil2<mode>3): Likewise.
2379         (avx_vperm2f128<mode>3): Likewise.
2380         (avx_vbroadcasts<avxmodesuffixf2c><avxmodesuffix>): Likewise.
2381         (avx_vbroadcastss256): Likewise.
2382         (avx_vbroadcastf128_p<avxmodesuffixf2c>256): Likewise.
2383         (avx_vinsertf128<mode>): Likewise.
2384         (vec_set_lo_<mode>): Likewise.
2385         (vec_set_hi_<mode>): Likewise.
2386         (vec_set_lo_<mode>): Likewise.
2387         (vec_set_hi_<mode>): Likewise.
2388         (vec_set_lo_v16hi): Likewise.
2389         (vec_set_hi_v16hi): Likewise.
2390         (vec_set_lo_v32qi): Likewise.
2391         (vec_set_hi_v32qi): Likewise.
2392         (avx_maskloadp<avxmodesuffixf2c><avxmodesuffix>): Likewise.
2393         (avx_maskstorep<avxmodesuffixf2c><avxmodesuffix>): Likewise.
2394         (avx_<avxmodesuffixp><avxmodesuffix>_<avxmodesuffixp>): Likewise.
2395         (avx_<avxmodesuffixp>_<avxmodesuffixp><avxmodesuffix>): Likewise.
2396         (vec_init<mode>): Likewise.
2397         (*vec_concat<mode>_avx): Likewise.
2398         (blendbits): Support V8SF and V4DF.
2399         (sse2_movq128): Support AVX.
2400         (<sse>_movnt<mode>): Likewise.
2401         (sse2_movntv2di): Likewise.
2402         (sse_rcpv4sf2): Likewise.
2403         (sse_sqrtv4sf2): Likewise.
2404         (sse_rsqrtv4sf2): Likewise.
2405         (<sse>_comi): Likewise.
2406         (<sse>_ucomi): Likewise.
2407         (sse_cvtss2si): Likewise.
2408         (sse_cvtss2si_2): Likewise.
2409         (sse_cvtss2siq): Likewise.
2410         (sse_cvtss2siq_2): Likewise.
2411         (sse_cvttss2si): Likewise.
2412         (sse_cvttss2siq): Likewise.
2413         (sse2_cvtsd2si): Likewise.
2414         (sse2_cvtsd2si_2): Likewise.
2415         (sse2_cvtsd2siq): Likewise.
2416         (sse2_cvtsd2siq_2): Likewise.
2417         (sse2_cvttsd2si): Likewise.
2418         (sse2_cvttsd2siq): Likewise.
2419         (sse2_cvtdq2pd): Likewise.
2420         (*sse2_cvtpd2dq): Likewise.
2421         (*sse2_cvttpd2dq): Likewise.
2422         (*sse2_cvtpd2ps): Likewise.
2423         (sse2_cvtps2pd): Likewise.
2424         (sse3_movshdup): Likewise.
2425         (sse3_movsldup): Likewise.
2426         (sse_storehps): Likewise.
2427         (*sse4_1_extractps): Likewise.
2428         (sse2_storelpd): Likewise.
2429         (vec_dupv2df_sse3): Likewise.
2430         (*vec_concatv2df_sse3): Likewise.
2431         (*sse4_1_pextrb): Likewise.
2432         (*sse4_1_pextrb_memory): Likewise.
2433         (*sse2_pextrw): Likewise.
2434         (*sse4_1_pextrw_memory): Likewise.
2435         (*sse4_1_pextrd): Likewise.
2436         (*sse4_1_pextrq): Likewise.
2437         (sse2_pshufd_1): Likewise.
2438         (sse2_pshuflw_1): Likewise.
2439         (sse2_pshufhw_1): Likewise.
2440         (*sse2_storeq_rex64): Likewise.
2441         (*vec_dupv4si): Likewise.
2442         (<sse>_movmskp<ssemodesuffixf2c>): Likewise.
2443         (sse2_pmovmskb): Likewise.
2444         (*sse2_maskmovdqu): Likewise.
2445         (*sse2_maskmovdqu_rex64): Likewise.
2446         (sse_ldmxcsr): Likewise.
2447         (sse_stmxcsr): Likewise.
2448         (abs<mode>2): Likewise.
2449         (sse4_1_movntdqa): Likewise.
2450         (sse4_1_phminposuw): Likewise.
2451         (sse4_1_extendv8qiv8hi2): Likewise.
2452         (*sse4_1_extendv8qiv8hi2): Likewise.
2453         (sse4_1_extendv4qiv4si2): Likewise.
2454         (*sse4_1_extendv4qiv4si2): Likewise.
2455         (sse4_1_extendv2qiv2di2): Likewise.
2456         (*sse4_1_extendv2qiv2di2): Likewise.
2457         (sse4_1_extendv4hiv4si2): Likewise.
2458         (*sse4_1_extendv4hiv4si2): Likewise.
2459         (sse4_1_extendv2hiv2di2): Likewise.
2460         (*sse4_1_extendv2hiv2di2): Likewise.
2461         (sse4_1_extendv2siv2di2): Likewise.
2462         (*sse4_1_extendv2siv2di2): Likewise.
2463         (sse4_1_zero_extendv8qiv8hi2): Likewise.
2464         (*sse4_1_zero_extendv8qiv8hi2): Likewise.
2465         (sse4_1_zero_extendv4qiv4si2): Likewise.
2466         (*sse4_1_zero_extendv4qiv4si2): Likewise.
2467         (sse4_1_zero_extendv2qiv2di2): Likewise.
2468         (*sse4_1_zero_extendv2qiv2di2): Likewise.
2469         (sse4_1_zero_extendv4hiv4si2): Likewise.
2470         (*sse4_1_zero_extendv4hiv4si2): Likewise.
2471         (sse4_1_zero_extendv2hiv2di2): Likewise.
2472         (*sse4_1_zero_extendv2hiv2di2): Likewise.
2473         (sse4_1_zero_extendv2siv2di2): Likewise.
2474         (*sse4_1_zero_extendv2siv2di2): Likewise.
2475         (sse4_1_ptest): Likewise.
2476         (sse4_1_roundp<ssemodesuffixf2c>): Likewise.
2477         (sse4_2_pcmpestri): Likewise.
2478         (sse4_2_pcmpestrm): Likewise.
2479         (sse4_2_pcmpistri): Likewise.
2480         (sse4_2_pcmpistrm): Likewise.
2481         (aesimc): Likewise.
2482         (aeskeygenassist): Likewise.
2483
2484 2008-08-28  Uros Bizjak  <ubizjak@gmail.com>
2485
2486         * config/i386/predicates.md (vzeroall_operation): New.
2487
2488         * config/i386/sse.md (avx_vzeroall): New.
2489         (*avx_vzeroall): Likewise.
2490
2491 2008-08-28  Paul Brook  <paul@codesourcery.com>
2492             Mark Shinwell  <shinwell@codesourcery.com>
2493             Richard Earnshaw  <richard.earnshaw@arm.com>
2494
2495         * config/arm/arm.c (TARGET_MAX_ANCHOR_OFFSET): New.
2496         (TARGET_MIN_ANCHOR_OFFSET): New.
2497         (arm_override_options): Set correct anchor ranges for Thumb-1
2498         and Thumb-2 if required.
2499         (legitimize_pic_address): Handle case involving a TLS symbol
2500         reference with an addend.
2501         (arm_optimization_options): Enable section anchors at -O1 and
2502         above.
2503         * config/arm/arm.h (OPTIMIZATION_OPTIONS): New.
2504         * config/arm/arm-protos.h (arm_optimization_options): New.
2505
2506 2008-08-28  Nick Clifton  <nickc@redhat.com>
2507
2508         * config/stormy16/stormy16.h (IRA_COVER_CLASSES): Define.
2509         * config/stormy16/stormy16.md (zero_extendqihi2): Fix length
2510         attribute.
2511
2512         * config/v850/v850.h (IRA_COVER_CLASSES): Define.
2513         * config/v850/v850.md (return): Remove frame size restriction.
2514
2515         * config/mcore/mcore.h (IRA_COVER_CLASSES): Define.
2516
2517         * config/iq2000/iq2000.h (IRA_COVER_CLASSES): Define.
2518
2519         * config/fr30/fr30.h (IRA_COVER_CLASSES): Define.
2520
2521         * config/m32r/m32r.h (IRA_COVER_CLASSES): Define.
2522
2523 2008-08-28  Paul Brook  <paul@codesourcery.com>
2524
2525         * config/arm/vfp11.md: Update license notice.
2526         * config/arm/cortex-r4.md: Ditto.
2527
2528 2008-08-28  Richard Guenther  <rguenther@suse.de>
2529
2530         PR tree-optimization/37207
2531         * tree-ssa-ifcombine.c (recognize_single_bit_test): Fix
2532         tuplification bug.
2533
2534 2008-08-28  Dodji Seketeli  <dodji@redhat.com>
2535
2536         PR c++/36741
2537         * tree.c (int_fits_type_p): Don't forget unsigned integers
2538           of type sizetype which higher end word equals -1.
2539
2540 2008-08-28  Ira Rosen  <irar@il.ibm.com>
2541
2542         * target.h (struct vectorize): Add new target builtin.
2543         * tree-vectorizer.c (destroy_loop_vec_info): Call
2544         vect_free_slp_instance instead of vect_free_slp_node.
2545         * tree-vectorizer.h (enum slp_load_perm_type): New.
2546         (struct _slp_instance): Add new fields.
2547         (SLP_INSTANCE_LOAD_PERMUTATION): New.
2548         (SLP_INSTANCE_LOADS): New.
2549         (vect_free_slp_tree): Remove.
2550         (vect_free_slp_instance): Declare.
2551         (SLP_TREE_LOADS_PERM_TYPE, TARG_VEC_PERMUTE_COST): New.
2552         (vectorizable_load): Add argument.
2553         (vect_transform_slp_perm_load): New.
2554         * tree-vect-analyze.c (vect_analyze_operations): Add an argument to
2555         vectorizable_load.
2556         (vect_get_place_in_interleaving_chain): New function.
2557         (vect_free_slp_tree): Make static.
2558         (vect_free_slp_instance): New function.
2559         (vect_build_slp_tree): Add new arguments. Allow load permutations and
2560         collect the load location in the interleaving chain.
2561         (vect_supported_slp_permutation_p): New function.
2562         (vect_supported_load_permutation_p): Likewise.
2563         (vect_analyze_slp_instance): In case of loads permutation, call
2564         vect_supported_load_permutation_p to check that the permutation is
2565         supported.
2566         * target-def.h (TARGET_VECTORIZE_BUILTIN_VEC_PERM): New.
2567         * tree-vect-transform.c (vect_transform_stmt): Add new argument.
2568         (vect_create_mask_and_perm): New function.
2569         (vect_get_mask_element, vect_transform_slp_perm_load): Likewise.
2570         (vectorizable_load): Add an argument. Don't keep the created vectors
2571         statements in the node if permutation is required. Call
2572         vect_transform_slp_perm_load to generate the permutation.
2573         (vect_transform_stmt): Add new argument. Call vectorizable_load with
2574         additional argument.
2575         (vect_schedule_slp_instance): In case of loads permutation, allocate
2576         vectorized statements structure for all the related SLP nodes. Call
2577         vect_transform_stmt with addditional argument.
2578         (vect_transform_loop): Call vect_transform_stmt with correct arguments.
2579         * config/spu/spu.c (spu_builtin_vec_perm): New.
2580         (TARGET_VECTORIZE_BUILTIN_VEC_PERM): Redefine.
2581         * config/spu/spu.h (TARG_VEC_PERMUTE_COS): Define.
2582         * config/rs6000/rs6000.c (rs6000_builtin_vec_perm): New.
2583         (TARGET_VECTORIZE_BUILTIN_VEC_PERM): Redefine.
2584
2585 2008-08-28  Chris Fairles  <chris.fairles@gmail.com>
2586
2587         * gthr-posix.h (__gthread_create,  __gthread_join, __gthread_detach,
2588         __gthread_mutex_timed_lock, __gthread_recursive_mutex_timed_lock,
2589         __gthread_cond_signal, __gthread_cond_timedwait,
2590         __gthread_cond_timedwait_recursive): New functions.
2591         * gthr-posix.c (pthread_mutex_timedlock, pthread_cond_timedwait):
2592         Likewise.
2593         * gthr.h: Comment on defining __GTHREADS_CXX0X macro in conforming
2594         thread interfaces.
2595
2596 2008-08-28  Richard Guenther  <rguenther@suse.de>
2597
2598         PR middle-end/37005
2599         * fold-const.c (maybe_canonicalize_comparison_1): Require
2600         undefined overflow only for canonicalizing A +- CST cmp CST.
2601         Make sure to not generate new constants that are not inside
2602         their TYPE_MIN/MAX_VALUE range.
2603         (maybe_canonicalize_comparison): Remove undefined overflow
2604         checking from here.
2605         (fold_binary): Remove now duplicate folding.
2606
2607 2008-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
2608
2609         * c-typeck.c (convert_for_assignment): Adjust WARN_FOR_ASSIGNMENT
2610         use not updated in the last change.
2611
2612 2008-08-27  Kaz Kojima  <kkojima@gcc.gnu.org>
2613
2614         * config/sh/sh.h (REG_CLASS_CONTENTS): Drop fr32 from FPUL_REGS.
2615         (IRA_COVER_CLASSES): Add FPUL_REGS.
2616
2617 2008-08-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2618
2619         PR 37217
2620         * c-common.c (conversion_warning): Check for null operands.
2621
2622 2008-08-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2623
2624         PR c/31673
2625         * c-decl.c (check_for_loop_decls): Improve error message. Give
2626         hint.
2627
2628 2008-08-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2629
2630         PR c/37186
2631         * c-typeck.c (WARN_FOR_ASSIGNMENT): Add OPT parameter.
2632         (convert_for_assignment): Pass corrent OPT_W* parameter to
2633         WARN_FOR_ASSIGNMENT.
2634
2635 2008-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
2636
2637         PR c++/35321
2638         * c-common.c (fold_offsetof_1): Handle TARGET_EXPR like CALL_EXPR.
2639
2640 2008-08-27  Paul Brook  <paul@codesourcery.com>
2641
2642         * config.gcc: Loosen checks for arm uclinux eabi targets.
2643
2644 2008-08-27  Paul Brook  <paul@codesourcery.com>
2645
2646         * config/arm/t-arm-coff (LIB1ASMFUNCS): Add missing undescrore on
2647         _clzsi2.
2648         * config/arm/t-linux (LIB1ASMFUNCS): Ditto.
2649
2650 2008-08-26  Douglas Gregor  <doug.gregor@gmail.com>
2651
2652         * c-common.c (do_switch_warnings): Look through the CONST_DECLs in
2653         the enumerators of an ENUMERAL_TYPE.
2654         * dbxout.c (dbxout_type): Ditto.
2655
2656 2008-08-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2657
2658         PR rtl-opt/37219
2659         * fwprop.c (fwprop): Check that the loop_father is the outer loop.
2660         (fwprop_addr): Check that the loop_father is not the outer loop.
2661
2662 2008-08-26  Paul Brook  <paul@codesourcery.com>
2663
2664         * config/arm/vfp.md: Document fmul{s,d} and fmac{s,d} types.
2665         Remove documentation entry for fmul type.
2666         Use fmuls to annotate single-precision multiplication patterns,
2667         fmuld to annotate double-precision multiplication patterns,
2668         fmacs to annotate single-precision multiply-accumulate patterns
2669         and fmacd to annotate double-precision multiply-accumulate patterns.
2670         * config/arm/vfp11.md: Update reservations accordingly.
2671         * config/arm/arm.md: Note that certain values of the "type"
2672         attribute are documented in vfp.md.
2673         * config/arm/arm1020e.md: Remove out of date duplicate comment.
2674         (v10_cvt): Use new fmul types.
2675
2676 2008-08-26  Paul Brook   <paul@codesourcery.com>
2677
2678         * config/arm/vfp.md: Move pipeline description for VFP11 to...
2679         * config/arm/vfp11.md: ...here.  New.
2680         * config/arm/arm.md: Include vfp11.md.
2681
2682 2008-08-26  Hans-Peter Nilsson  <hp@axis.com>
2683
2684         * opts.c (decode_options) [!IRA_COVER_CLASSES]: Add missing
2685         parameter to inform call.
2686
2687 2008-08-26  Jeff Law  <law@redhat.com>
2688
2689         * mn10300.md (movqi, movhi): Split i->d*a case into two cases to
2690         avoid the possibility of getting DATA_OR_ADDRESS_REGS as the
2691         preferred class when copying a constant into a partial word register.
2692
2693 2008-08-26  Ben Elliston  <bje@au.ibm.com>
2694
2695         * rtlanal.c: Fix uses of "it's" with "its" where appropriate.
2696         * cp/typeck.c: Likewise.
2697         * cp/tree.c: Likewise.
2698         * gimple-low.c: Likewise.
2699         * jump.c: Likewise.
2700
2701 2008-08-26  Vladimir Makarov  <vmakarov@redhat.com>
2702
2703         * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c,
2704         ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files.
2705
2706         * doc/passes.texi: Describe IRA.
2707
2708         * doc/tm.texi (IRA_COVER_CLASSES,
2709         IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros.
2710
2711         * doc/invoke.texi (ira-max-loops-num): Describe the new parameter.
2712         (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills,
2713         -fira-propagate-cost, -fno-ira-share-save-slots,
2714         -fno-ira-share-spill-slots, -fira-verbose): Describe new options.
2715
2716         * flags.h (ira_algorithm): New enumeration.
2717         (flag_ira_algorithm, flag_ira_verbose): New external variable
2718         declarations.
2719
2720         * postreload.c (gate_handle_postreload): Don't do post reload
2721         optimizations unless the reload is completed.
2722
2723         * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for
2724         IRA.
2725
2726         * tree-pass.h (pass_ira): New external variable declaration.
2727
2728         * reload.h: Add 2008 to the Copyright.
2729
2730         * cfgloopanal.c: Include params.h.
2731         (estimate_reg_pressure_cost): Decrease cost for IRA optimization
2732         mode.
2733
2734         * params.h (IRA_MAX_LOOPS_NUM): New macro.
2735
2736         * toplev.c (ira.h): New include.
2737         (flag_ira_algorithm, flag_ira_verbose): New external variables.
2738         (backend_init_target): Call ira_init.
2739         (backend_init): Call ira_init_once.
2740         (finalize): Call finish_ira_once.
2741
2742         * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills,
2743         flag_ira_share_save_slots, flag_ira_share_spill_slots): New
2744         external variables.
2745
2746         * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost,
2747         may_move_out_cost): New external variable declarations.
2748         (move_table): New typedef.
2749
2750         * caller-save.c: Include headers output.h and ira.h.
2751         (no_caller_save_reg_set): New global variable.
2752         (save_slots_num, save_slots): New variables.
2753         (reg_save_code, reg_restore_code, add_stored_regs): Add
2754         prototypes.
2755         (init_caller_save): Set up no_caller_save_reg_set.
2756         (init_save_areas): Reset save_slots_num.
2757         (saved_hard_reg): New structure.
2758         (hard_reg_map, saved_regs_num, all_saved_regs): New variables.
2759         (initiate_saved_hard_regs, new_saved_hard_reg,
2760         finish_saved_hard_regs, saved_hard_reg_compare_func): New
2761         functions.
2762         (setup_save_areas): Add code for sharing stack slots.
2763         (all_blocks): New variable.
2764         (save_call_clobbered_regs): Process pseudo-register too.
2765         (mark_set_regs): Process pseudo-register too.
2766         (insert_one_insn): Put the insn after bb note in a empty basic
2767         block.  Add insn check.
2768
2769         * global.c (eliminable_regset): Make it external.
2770         (mark_elimination): Use DF_LR_IN for IRA.
2771         (pseudo_for_reload_consideration_p): New.
2772         (build_insn_chain): Make it external.  Don't ignore spilled
2773         pseudos for IRA.  Use pseudo_for_reload_consideration_p.
2774         (gate_handle_global_alloc): New function.
2775         (pass_global_alloc): Add the gate function.
2776
2777         * opts.c (decode_options): Set up flag_ira.  Print the warning for
2778         -fira.
2779         (common_handle_option): Process -fira-algorithm and -fira-verbose.
2780
2781         * timevar.def (TV_IRA, TV_RELOAD): New passes.
2782
2783         * regmove.c (regmove_optimize): Don't do replacement of output for
2784         IRA.
2785
2786         * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses):
2787         New external variable declarations.
2788
2789         * local-alloc.c (update_equiv_regs): Make it external.  Return
2790         true if jump label rebuilding should be done.  Rescan new_insn for
2791         notes.
2792         (gate_handle_local_alloc): New function.
2793         (pass_local_alloc): Add the gate function.
2794
2795         * alias.c (value_addr_p, stack_addr_p): New functions.
2796         (nonoverlapping_memrefs_p): Use them for IRA.
2797
2798         * common.opt (fira, fira-algorithm, fira-coalesce,
2799         fira-move-spills, fira-share-save-slots, fira-share-spill-slots,
2800         fira-verbose): New options.
2801
2802         * regclass.c (reg_class_subclasses, contains_reg_of_mode,
2803         move_cost, may_move_in_cost, may_move_out_cost): Make the
2804         variables external.
2805         (move_table): Remove typedef.
2806         (init_move_cost): Make it external.
2807         (allocate_reg_info, resize_reg_info, setup_reg_classes): New
2808         functions.
2809
2810         * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info,
2811         setup_reg_classes): New function prototypes.
2812         (eliminable_regset): New external variable declaration.
2813         (build_insn_chain, update_equiv_regs): New function prototypes.
2814
2815         * Makefile.in (IRA_INT_H): New definition.
2816         (OBJS-common): Add ira.o, ira-build.o, ira-costs.o,
2817         ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o.
2818         (reload1.o, toplev.o): Add dependence on ira.h.
2819         (cfgloopanal.o): Add PARAMS_H.
2820         (caller-save.o): Add dependence on output.h and ira.h.
2821         (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o,
2822         ira-emit.o, ira-lives.o): New entries.
2823
2824         * passes.c (pass_ira): New pass.
2825
2826         * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter.
2827
2828         * reload1.c (ira.h): Include the header.
2829         (changed_allocation_pseudos): New bitmap.
2830         (init_reload): Initiate the bitmap.
2831         (compute_use_by_pseudos): Permits spilled registers in FROM.
2832         (temp_pseudo_reg_arr): New variable.
2833         (reload): Allocate and free temp_pseudo_reg_arr.  Sort pseudos for
2834         IRA.  Call alter_reg with the additional parameter.  Don't clear
2835         spilled_pseudos for IRA.  Restore original insn chain for IRA.
2836         Clear changed_allocation_pseudos at the end of reload.
2837         (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion.
2838         (hard_regno_to_pseudo_regno): New variable.
2839         (count_pseudo): Check spilled pseudos.  Set up
2840         hard_regno_to_pseudo_regno.
2841         (count_spilled_pseudo): Check spilled pseudos. Update
2842         hard_regno_to_pseudo_regno.
2843         (find_reg): Use better_spill_reload_regno_p.  Check
2844         hard_regno_to_pseudo_regno.
2845         (alter_reg): Set up spilled_pseudos.  Add a new parameter.  Add
2846         code for IRA.
2847         (eliminate_regs_1): Use additional parameter for alter_reg.
2848         (finish_spills): Set up pseudo_previous_regs only for spilled
2849         pseudos.  Call reassign_pseudos once for all spilled pseudos, pass
2850         more arguments.  Don't clear live_throughout and dead_or_set for
2851         spilled pseudos.  Use additional parameter for alter_reg.  Call
2852         mark_allocation_change.  Set up changed_allocation_pseudos.
2853         Remove sanity check.
2854         (emit_input_reload_insns, delete_output_reload): Use additional
2855         parameter for alter_reg.  Call mark_allocation_change.
2856         (substitute, gen_reload_chain_without_interm_reg_p): New
2857         functions.
2858         (reloads_conflict): Use gen_reload_chain_without_interm_reg_p.
2859
2860         * testsuite/gcc.dg/20080410-1.c: New file.
2861
2862         * config/s390/s390.h (IRA_COVER_CLASSES,
2863         IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define.
2864
2865         * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro.
2866
2867         * config/i386/i386.h (IRA_COVER_CLASSES): Ditto.
2868
2869         * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto.
2870
2871         * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto.
2872
2873         * config/arm/arm.h (IRA_COVER_CLASSES): Ditto.
2874
2875         * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto.
2876
2877         2008-08-24  Jeff Law  <law@redhat.com>
2878         * ira.c (setup_reg_class_intersect_union): Prefer smallest class
2879         when ignoring unavailable registers.
2880
2881         2008-08-24  Jeff Law  <law@redhat.com>
2882         * ira-color.c (coalesced_pseudo_reg_slot_compare): Check
2883         FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD.
2884         * ira.c (setup_eliminable_regset): Check stack_realign_needed.
2885         * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro.
2886
2887         2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com>
2888         * ira-build.c (allocno_range_compare_func): Stabilize sort.
2889
2890         2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com>
2891         * config/avr/avr.h (IRA_COVER_CLASSES): New macro.
2892         * reload1.c (find_reg): Process registers in register allocation order.
2893
2894         2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk>
2895         * toplev.c (backend_init_target): Move ira_init call from
2896         here...
2897         (lang_dependent_init_target): ...to here.
2898
2899         2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk>
2900         * ira.c (setup_class_subset_and_memory_move_costs): Don't
2901         calculate memory move costs for NO_REGS.
2902
2903         2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org>
2904         * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if
2905         STACK_REGS is defined.
2906
2907         2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com>
2908         * config/spu/spu.h (IRA_COVER_CLASSES): New macro.
2909
2910         2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com>
2911         * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro.
2912
2913         2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org>
2914         * config/sh/sh.h (IRA_COVER_CLASSES): Define.
2915         * config/sh/sh.md (movsicc_true+3): Check if emit returns a
2916         barrier.
2917
2918 2008-08-26  Victor Kaplansky  <victork@il.ibm.com>
2919             Dorit Nuzman  <dorit@il.ibm.com>
2920
2921         * gcc/config/spu/spu.md (vec_extract_evenv4si,
2922         vec_extract_evenv4sf, vec_extract_evenv8hi,
2923         vec_extract_evenv16qi, vec_extract_oddv4si,
2924         vec_extract_oddv4sf, vec_extract_oddv8hi, vec_extract_oddv16qi,
2925         vec_interleave_highv4sf, vec_interleave_lowv4sf,
2926         vec_interleave_highv4si, vec_interleave_lowv4si,
2927         vec_interleave_highv8hi, vec_interleave_lowv8hi,
2928         vec_interleave_highv16qi, vec_interleave_lowv16qi,
2929         vec_pack_trunc_v8hi, vec_pack_trunc_v4si): Implement.S
2930
2931 2008-08-25  Janis Johnson  <janis187@us.ibm.com>
2932
2933         PR target/36756
2934         * config/rs6000/rs6000.c (optimization_options): Don't default to
2935         section anchors without toplevel reorder.
2936
2937 2008-08-25  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
2938
2939         * config/spu/spu_mfcio.h (mfc_begin_critical_section): New function.
2940         (mfc_end_critical_section): Likewise.
2941
2942 2008-08-25  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
2943
2944         * config/rs6000/rs6000.c (rs6000_handle_altivec_attribute): Propagate
2945         all type qualifiers from element type to vector type.
2946
2947 2008-08-25  David Daney  <ddaney@avtrex.com>
2948
2949         * config/mips/mips.md (immediate_insn): Move up in file, fix
2950         comment typo, reformat.
2951         (fetchop_bit, atomic_hiqi_op memory_barrier,
2952         sync_compare_and_swap<mode>, compare_and_swap_12, sync_add<mode>,
2953         sync_<optab><mode>, sync_<optab>_12, sync_old_<optab><mode>,
2954         sync_old_<optab>_12, sync_new_<optab><mode>, sync_new_<optab>_12,
2955         sync_nand<mode>, sync_nand_12, sync_old_nand<mode>,
2956         sync_old_nand_12, sync_new_nand<mode>, sync_new_nand_12,
2957         sync_sub<mode>, sync_old_add<mode>, sync_old_sub<mode>,
2958         sync_new_add<mode>, sync_new_sub<mode>, sync_<optab><mode>,
2959         sync_old_<optab><mode>, sync_new_<optab><mode>, sync_nand<mode>,
2960         sync_old_nand<mode>, sync_new_nand<mode>,
2961         sync_lock_test_and_set<mode>, sync_lock_test_and_set<mode>,
2962         test_and_set_12): Moved to sync.md.
2963         (sync.md): Include.
2964         * config/mips/sync.md: New file.
2965
2966 2008-08-25  Richard Henderson  <rth@redhat.com>
2967
2968         * dwarf2out.c (def_cfa_1): Don't scale by DWARF_CIE_DATA_ALIGNMENT.
2969         (regsave): Likewise.
2970         (lookup_cfa_1): Don't rescale by DWARF_CIE_DATA_ALIGNMENT.
2971         (output_cfi_directive): Likewise.
2972         (div_data_align): New.
2973         (output_cfi): Use it.
2974
2975 2008-08-24  Adam Nemet  <anemet@caviumnetworks.com>
2976
2977         * config.gcc (mips64*-*-linux*): Handle mips64octeon*-*-linux*.
2978         * config/mips/mips.h (enum processor_type): Add PROCESSOR_OCTEON.
2979         (TARGET_OCTEON): New macro.
2980         (TARGET_CPU_CPP_BUILTINS): Define __OCTEON__ for Octeon.
2981         (MIPS_ISA_LEVEL_SPEC, MIPS_ARCH_FLOAT_SPEC): Handle -march=octeon.
2982         (ISA_HAS_POP): New macro.
2983         * config/mips/driver-native.c (host_detect_local_cpu): Handle
2984         Octeon.
2985         * config/mips/mips.c (mips_cpu_info_table, mips_rtx_cost_data):
2986         Handle Octeon.
2987         * config/mips/mips.md (cpu): Add octeon.
2988         (type): Add pop attribute value.
2989         (popcount<mode>2): New pattern.
2990         * doc/invoke.texi (-march=@var{arch}): Add octeon.
2991
2992 2008-08-24  Jan Hubicka  <jh@suse.cz>
2993
2994         * doc/invoke.texi (-fipa-cp-clone): New option.
2995         (-fipa-cp): Update docs.
2996         (--param ipcp-unit-growth):New.
2997         * ipa-cp.c: Include fibheap.h, params.h
2998         (ipcp_initialize_node_lattices): When not cloning, all externally
2999         visible functions are bottom.
3000         (ipcp_need_redirect_p): Accept clones.
3001         (ipcp_insert_stage): Use cost driven heuristics.
3002         (max_count, dead_nodes): New static vars.
3003         (ipcp_need_original_clone_p, ipcp_estimate_cloning_cost,
3004         ipcp_const_param_count): New functions.
3005         * common.opt (ipa-cp-clone): New command line option.
3006         * params.def (ipcp-unit-growth): New.
3007
3008 2008-08-24  Jan Hubicka  <jh@suse.cz>
3009
3010         * tree-inline.c (tree_function_versioning): Look harder
3011         for referenced vars.
3012
3013 2008-08-24  Razya Ladelsky  <razya@il.ibm.com>
3014
3015         PR tree-optimization/37185
3016         * matrix-reorg.c (transform_access_sites): Update changed stmt.
3017
3018 2008-08-23  Jan Hubicka  <jh@suse.cz>
3019
3020         * ipa-cp.c (ipcp_analyze_node): New function.
3021         (ipcp_update_cloned_node): Use it.
3022         (ipcp_init_stage): Likewise.
3023         * ipa-inline.c (function_insertion_hook_holder): New static var.
3024         (analyze_function): Break out from ....
3025         (inline_generate_summary): Here; register insertion hook.
3026         (cgraph_decide_inlining): Remove hook.
3027         (add_new_function): New function.
3028
3029 2008-08-23  Jan Hubicka  <jh@suse.cz>
3030
3031         * opts.c (decode_options): Revert accidental change enabling ipa-cp.
3032
3033 2008-08-23  Jan Hubicka  <jh@suse.cz>
3034
3035         * ipa-cp.c (constant_val_insert): Remove.
3036         (ipcp_propagate_one_const): Remove.
3037         (ipcp_create_replace_map): Always insert replacements to the map.
3038         (ipcp_insert_stage): Do not try to insert statements by hand.
3039         * tree-inline.c (insert_init_stmt): Break out from ...
3040         (setup_one_parameter): ... here; allow NULL BB pointer.
3041         (tree_function_versioning): Use setup_one_parameter to process
3042         replacement map.
3043
3044 2008-08-23  Jan Hubicka  <jh@suse.cz>
3045
3046         * tree.c (decl_address_ip_invariant_p): New function.
3047         * tree.h (decl_address_ip_invariant_p): Declare.
3048         * gimple.c (strip_invariant_refs): Break out from ...
3049         (is_gimple_invariant_address): ... here
3050         (is_gimple_ip_invariant_address): New function.
3051         (is_gimple_ip_invariant): New function.
3052         * gimple.h (is_gimple_ip_invariant_address, is_gimple_ip_invariant):
3053         Declare.
3054
3055         * ipa-cp.c (ipcp_lat_is_const): Remove handling of IPA_CONST_VALUE_REF.
3056         (ipcp_lat_is_insertable): All constants are insertable.
3057         (ipcp_lattice_from_jfunc, ipcp_print_all_lattices): Remove handling of
3058         IPA_CONST_VALUE_REF.
3059         (ipcp_initialize_node_lattices): Propagate all types of operands.
3060         (build_const_val): Do not handle IPA_CONST_VALUE_REF.
3061         (ipcp_create_replace_map): Reformat.
3062         (ipcp_need_redirect_p): Simplify.
3063         (ipcp_insert_stage): Check that argument is used before clonning.
3064         * ipa-prop.c (ipa_print_node_jump_functions): Do not handle IPA_CONST_REF.
3065         (compute_scalar_jump_functions): Simplify using is_gimple_ip_invariat.
3066         (determine_cst_member_ptr): Keep wrapping ADDR_EXPR of members.
3067         (update_call_notes_after_inlining): Expect ADDR_EXPR in operand.
3068         * ipa-prop.h (jump_func_type): Remove IPA_CONST_REF.
3069         (jump_func_type): Remove IPA_CONST_VALUE_REF.
3070         * tree-inline.c (tree_function_versioning): Add variables referenced by
3071         replacing trees.
3072
3073 2008-08-23  Jan Hubicka  <jh@suse.cz>
3074
3075         PR target/37094
3076         * i386.c (standard_80387_constant_p): Use optimize_size.
3077
3078 2008-08-23  Ira Rosen  <irar@il.ibm.com>
3079
3080         PR tree-optimization/37161
3081         * tree-vectorizer.h (vect_get_smallest_scalar_type): Declare.
3082         * tree-vect-analyze.c (vect_get_smallest_scalar_type): New function.
3083         (vect_determine_vectorization_factor): Move the scalar type
3084         retrieval to vect_get_smallest_scalar_type.
3085         (vect_build_slp_tree): Call vect_get_smallest_scalar_type to get
3086         scalar type. Remove redundant computation.
3087         * tree-vect-transform.c (vect_get_constant_vectors): Add argument.
3088         (vect_get_slp_defs): Take the type of RHS into account if
3089         necessary by calling vect_get_smallest_scalar_type. Call
3090         vect_get_constant_vectors with additional argument.
3091
3092 2008-08-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3093
3094         PR 35648
3095         * doc/invoke.texi (Wwrite-strings): Clarify description.
3096
3097 2008-08-23  Ira Rosen  <irar@il.ibm.com>
3098
3099         PR tree-optimization/37174
3100         * tree-vect-analyze.c (vect_get_and_check_slp_defs): Check that the
3101         def stmt is a part of the loop before accessing its stmt_vec_info.
3102
3103 2008-08-22  Anatoly Sokolov  <aesok@post.ru>
3104
3105         PR target/11259
3106         * config/avr/avr.md (UNSPEC_SWAP): New constants.
3107         (*swap): New insn pattern.
3108         (*ashlqi3): Rename from ashlqi3 insn pattern.
3109         (ashlqi3): New expanders.
3110         (*lshrqi3): Rename from lshrqi3 insn pattern.
3111         (lshrqi3): New expanders.
3112         (ashlqi3_const4, ashlqi3_const5, ashlqi3_const6, lshrqi3_const4,
3113         lshrqi3_const5, lshrqi3_const6): New splitters.
3114         (andi, ashlqi3_l_const4, ashlqi3_l_const5, ashlqi3_l_const6,
3115         lshrqi3_l_const4, lshrqi3_l_const5, lshrqi3_l_const6): Define
3116         peephole2 patterns.
3117
3118 2008-08-22  Richard Guenther  <rguenther@suse.de>
3119
3120         PR tree-optimization/37078
3121         * tree-vrp.c (extract_range_from_unary_expr): Avoid generating
3122         [+INF, +INF] ranges.
3123
3124 2008-08-22  Richard Guenther  <rguenther@suse.de>
3125
3126         PR tree-optimization/37143
3127         * tree-vect-transform.c (vect_create_cond_for_align_checks): Build
3128         a conversion statement instead of a copy.
3129
3130 2008-08-22  Uros Bizjak  <ubizjak@gmail.com>
3131
3132         PR target/37184
3133         * config/i386/i386.c (ix86_match_ccmode): Handle CCAmode,
3134         CCCmode, CCOmode and CCSmode destination modes.
3135
3136         PR target/37191
3137         * config/i386/mmx.md (*vec_extractv2sf_0): Avoid combining registers
3138         from different units in a single alternative.
3139         (*vec_extractv2sf_1): Ditto.
3140         (*vec_extractv2si_0): Ditto.
3141         (*vec_extractv2si_1): Ditto.
3142         * config/i386/sse.md (sse2_storehpd): Ditto.
3143         (sse2_storelpd): Ditto.
3144         (sse2_loadhpd): Ditto.
3145         (sse2_loadlpd): Ditto.
3146
3147         PR target/37197
3148         * config/i386/i386.md (clzsi2_abm): Fix operand 1 constraints.
3149         (popcountsi2): Ditto.
3150         (clzdi2_abm): Ditto.
3151         (popcountdi2): Ditto.
3152         (clzhi2_abm): Ditto.
3153         (popcounthi2): Ditto.
3154
3155 2008-08-22  Richard Guenther  <rguenther@suse.de>
3156
3157         PR middle-end/36548
3158         PR middle-end/37125
3159         * fold-const.c (extract_muldiv_1): Optimize (X * C1) % C2 only
3160         if the multiplication does not overflow.
3161
3162 2008-08-21  Nathan Sidwell  <nathan@codesourcery.com>
3163
3164         * c-ppoutput.c (init_pp_output): Initialize src_line to 1.
3165
3166 2008-08-21  Richard Henderson  <rth@redhat.com>
3167
3168         * configure.ac (HAVE_GAS_CFI_PERSONALITY_DIRECTIVE): Remove
3169         spurrious comma from test.
3170         * configure: Rebuild.
3171
3172 2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3173
3174         PR 30457
3175         * builtins.c (fold_builtin_next_arg): Add warning about undefined
3176         behaviour.
3177
3178 2008-08-21  Aldy Hernandez  <aldyh@redhat.com>
3179
3180         * c-tree.h (grokfield): New argument.
3181         * c-decl.c (grokfield): Handle new location argument.
3182         * c-parser.c (c_parser_struct_declaration): Pass location to
3183         grokfield.
3184
3185 2008-08-21  Richard Guenther  <rguenther@suse.de>
3186
3187         * tree-ssa-ccp.c (ccp_fold): Fold VIEW_CONVERT_EXPRs of constants.
3188
3189 2008-08-21  Jan Hubicka  <jh@suse.cz>
3190
3191         * cgraph.c (first_cgraph_function_insertion_hook): New variable.
3192         (cgraph_add_function_insertion_hook,
3193         cgraph_remove_function_insertion_hook,
3194         cgraph_call_function_insertion_hooks): New functions.
3195         * cgraph.h (cgraph_add_function_insertion_hook,
3196         cgraph_remove_function_insertion_hook,
3197         cgraph_call_function_insertion_hooks): Declare.
3198         * ipa-reference.c (function_insertion_hook_holder): New variable.
3199         (check_operand, look_for_address_of): When checking late, do not care
3200         about module bitmaps.
3201         (add_new_function): New function.
3202         (generate_summary): Register hooks; zero module bitmaps.
3203         (propagate): Unregister hooks.
3204         * ipa-pure-const.c (function_insertion_hook_holder): New variable.
3205         (add_new_function): New function.
3206         (generate_summary): Register hook.
3207         (propagate): Remove hook.
3208
3209         * ipa-cp.c (ipcp_need_redirect_p): Fix to not be constant 0.
3210
3211         * tree-pass.h (pass_ipa_cp): Make ipa_opt_pass.
3212         * ipa-cp.c (ipcp_update_cloned_node): New function.
3213         (build_const_val): Handle functions correctly; bring type logic
3214         into sync with tree-inline.c
3215         (ipcp_init_stage):  Take care of computing stuff needed by
3216         indirect inlining; update clones.
3217         (ipcp_generate_summary): Break out of ipcp_driver.
3218         (ipcp_driver): Do only execution and transformation.
3219         (pass_ipa_cp): Make IPA_PASS.
3220         * tree-ssa-ccp.c (fold_stmt_r): Check type before trying to fold
3221         offset to address.
3222         * ipa-inline.c (inline_indirect_intraprocedural_analysis): When doing
3223         ipcp, some info is already available.
3224         * ipa-prop.c (ipa_count_arguments): Grow edge lists as needed.
3225         * tree-inline.c (remap_ssa_name): Unshare expression.
3226
3227 2008-08-21  Richard Guenther  <rguenther@suse.de>
3228
3229         * tree-ssa-pre.c (insert_into_preds_of_block): Before inserting
3230         a PHI ask VN if it is already available.
3231         * tree-ssa-sccvn.h (vn_phi_lookup): Declare.
3232         * tree-ssa-sccvn.c (vn_phi_lookup): Export.
3233
3234 2008-08-21  Richard Guenther  <rguenther@suse.de>
3235
3236         PR middle-end/36817
3237         * tree-chrec.c (chrec_apply): Always call chrec_fold_plus which
3238         makes sure to produce a result of the correct type.
3239
3240 2008-08-21  Jan Hubicka  <jh@suse.cz>
3241         Backport from LTO branch:
3242
3243         2008-05-05  Kenneth Zadeck <zadeck@naturalbridge.com>
3244                     Jan Hubicka  <jh@suse.cz>
3245
3246         * ipa-pure-const.c
3247         (init_state, finish_state, set_function_state, generate_summary):
3248         New functions.
3249         (scan_stmt): Renamed from scan_function.  Changed to keep state in
3250         local static vars rather than cgraph aux field.
3251         (propagate): Renamed from static_execute. Changed to keep state in
3252         local static vars rather than cgraph aux field.
3253         (pass_ipa_pure_const): Changed from SIMPLE_IPA_PASS to IPA_PASS.
3254         * tree-pass.h (pass_ipa_pure_const): Turn into IPA_PASS.
3255
3256         2008-07-15  Kenneth Zadeck <zadeck@naturalbridge.com>
3257
3258         * tree-pass.h (pass_ipa_reference): Make into ipa_opt_pass.
3259         * ipa-reference.c (init_function_info, generate_summary,
3260         propagate): New functions.
3261         (analyze_function):  Call init_function_info.
3262         (static_execute): Stripped into generate_summary and propagate.
3263         (pass_ipa_reference): Made into ipa_opt_pass.
3264
3265 2008-08-21  Richard Guenther  <rguenther@suse.de>
3266
3267         PR tree-optimization/37181
3268         * tree-vrp.c (extract_range_from_binary_expr): Check for NULL
3269         folding result.
3270         (extract_range_from_unary_expr): Likewise.
3271
3272 2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3273
3274         * diagnostic.c (pedwarn_at): Rename as pedwarn.
3275         (pedwarn): Delete.
3276         * toplev.h (pedwarn_at): Likewise.
3277         * builtins.c: Update all calls to pedwarn.
3278         * c-lex.c: Likewise.
3279         * toplev.c: Likewise.
3280         * c-tree.h: Likewise.
3281         * c-decl.c: Likewise.
3282         * c-errors.c: Likewise.
3283         * c-typeck.c: Likewise.
3284         * c-common.c: Likewise.
3285         * c-parser.c: Likewise.
3286
3287 2008-08-20  Joseph Myers  <joseph@codesourcery.com>
3288
3289         PR target/31070
3290         * config/sparc/sparc.c (function_arg_slotno): Handle structure
3291         with MODE_VECTOR_INT mode.
3292
3293 2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3294
3295         PR middle-end/179
3296         * tree-ssa.c (warn_uninit): Do not warn for variables that can be
3297         initialized outside the current module.
3298         (warn_uninitialized_var): Ignore left-hand side when walking the
3299         trees. Ignore address expressions. Examine VUSE operands in gimple
3300         statements with a variable declaration on the right-hand side.
3301
3302 2008-08-20  Richard Sandiford  <rdsandiford@googlemail.com>
3303
3304         PR bootstrap/37155
3305         * rtlanal.c (subreg_offset_representable_p): Revert last change.
3306
3307 2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3308
3309         PR 35701
3310         * c-common.c (conversion_warning): Do not warn if applying bit-and
3311         operator to unsigned constant that fits in the target type.
3312
3313 2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3314
3315         PR c++/35602
3316         * c-common.c (conversion_warning): Do not warn for artificial
3317         expressions.
3318
3319 2008-08-20  Richard Guenther  <rguenther@suse.de>
3320
3321         * tree-vrp.c (op_with_constant_singleton_value_range): New function.
3322         (extract_range_from_binary_expr): Fall back to constant propagation.
3323         (extract_range_from_unary_expr): Likewise.
3324
3325 2008-08-20  Richard Guenther  <rguenther@suse.de>
3326
3327         * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Do not mess
3328         with TREE_THIS_VOLATILE on shared nodes.
3329         (fold_stmt_r): Likewise.
3330
3331 2008-08-20  Jakub Jelinek  <jakub@redhat.com>
3332
3333         PR c/37171
3334         * c-parser.c (c_parser_attributes): For keywords use canonical
3335         spelling for attr_name.
3336
3337 2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3338
3339         * value-prof.c (check_counter): Revert wrong call to error.
3340
3341 2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3342
3343         * profile.c: Update calls to inform.
3344         * value-prof.c: Update calls to inform.
3345
3346 2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3347
3348         * diagnostic.c (inform): Add an explicit location_t parameter.
3349         * toplev.h (inform): Update declaration.
3350         * builtins.c: Update all calls to inform.
3351         * c-common.c: Likewise.
3352         * c-decl.c: Likewise.
3353         * c-opts.c: Likewise.
3354         * c-pch.c: Likewise.
3355         * c-pragma.c: Likewise.
3356         * c-typeck.c: Likewise.
3357         * coverage.c: Likewise.
3358         * opts.c: Likewise.
3359         * toplev.c: Likewise.
3360         * tree-cfg.c: Likewise.
3361         * tree-ssa.c: Likewise.
3362
3363 2008-08-20  H.J. Lu  <hongjiu.lu@intel.com>
3364
3365         PR target/37169
3366         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): In
3367         V2DI mode, for SSE4.1, use movq instead of vector set if the
3368         second element is zero and inter-unit moves are OK.
3369
3370 2008-08-20  Richard Guenther  <rguenther@suse.de>
3371
3372         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): More
3373         properly handle conversion/copy chains after tuplification.
3374
3375 2008-08-20  Richard Guenther  <rguenther@suse.de>
3376
3377         * passes.c (init_optimization_passes): Move the second
3378         forwprop pass before alias computation.  Remove the second
3379         DCE pass.  Remove the first dominator and phi copy/const
3380         prop passes.
3381
3382 2008-08-20  Nick Clifton  <nickc@redhat.com>
3383
3384         * configure.ac (HAVE_GAS_CFI_DIRECTIVE): Always test for assembler
3385         support of this feature.  Do not assume that a sufficiently new
3386         assembler will support the feature regardless of the target type.
3387         (HAVE_GAS_CFI_PERSONALITY_DIRECTIVE): Likewise.
3388         * configure: Regenerate.
3389
3390 2008-08-20  Richard Guenther  <rguenther@suse.de>
3391
3392         * tree-vrp.c (found_in_subgraph): Remove.
3393         (live): New global static.
3394         (live_on_edge): New function.
3395         (blocks_visited): Remove.
3396         (register_edge_assert_for_2): Use live_on_edge.
3397         (find_conditional_asserts): Remove code dealing with
3398         found_in_subgraph.  Do not walk the CFG.
3399         (find_switch_asserts): Likewise.
3400         (find_assert_locations_1): Renamed from find_assert_locations.
3401         Move finding assert locations for conditional and switch
3402         statements first.  Update live bitmap.  Do not walk the CFG.
3403         (find_assert_locations): New function.
3404         (insert_range_assertions): Remove entry of CFG walk.
3405         Adjust call to find_assert_locations.
3406         * tree-ssa-pre.c (do_regular_insertion): Ignore critical edges
3407         that only can appear because of fake exit edges but assert we
3408         never try to insert on those.
3409         (fini_pre): Do not remove fake exit edges here...
3410         (execute_pre): ...but here, before committing edge inserts.
3411
3412 2008-08-19  Richard Guenther  <rguenther@suse.de>
3413
3414         * passes.c (init_optimization_passes): Exchange store-ccp
3415         with a ccp pass.
3416
3417 2008-08-19  Rafael Espindola  <espindola@google.com>
3418
3419         * varasm.c (weak_decls): Move earlier in the file.
3420         (assemble_external): Add weak decls to the weak_decls list.
3421         (declare_weak): Don't add decls to the weak_decls list.
3422
3423 2008-08-19  H.J. Lu  <hongjiu.lu@intel.com>
3424
3425         PR target/37157
3426         * config/i386/sse.md (sse2_punpckhqdq, sse2_punpcklqdq): Moved
3427         before (sse2_shufpd_<mode>).
3428
3429 2008-08-19  Jakub Jelinek  <jakub@redhat.com>
3430
3431         PR debug/37156
3432         * pretty-print.c (pp_base_format): Deal with recursive BLOCK trees.
3433         * tree.c (block_nonartificial_location): Likewise.
3434
3435 2008-08-19  Richard Guenther  <rguenther@suse.de>
3436
3437         PR tree-optimization/35972
3438         PR tree-optimization/23094
3439         * tree-ssa-sccvn.h (vn_reference_lookup_pieces): Add maywalk
3440         parameter.
3441         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Properly
3442         handle MISALIGNED_INDIRECT_REF.
3443         (get_ref_from_reference_ops): New helper.
3444         (vn_reference_lookup_pieces): Walk the use-def chain using the
3445         alias-oracle if requested.
3446         * tree-ssa-pre.c (phi_translate_1): Do reference lookup with
3447         walking the use-def chain.
3448         (compute_avail): But not here.
3449         (create_component_ref_by_pieces_1): Properly handle
3450         MISALIGNED_INDIRECT_REF.
3451         (do_regular_insertion): Handle fully redundant
3452         expressions after PHI-translation also for SSA_NAME values, not
3453         only constants.  Correctly use edoubleprime for that.
3454
3455 2008-08-19  Ira Rosen  <irar@il.ibm.com>
3456
3457         * tree-vectorizer.c (supportable_widening_operation): Support
3458         multi-step conversion, return the number of steps in such conversion
3459         and the required intermediate types.
3460         (supportable_narrowing_operation): Likewise.
3461         * tree-vectorizer.h (vect_pow2): New function.
3462         (supportable_widening_operation): Change argument types.
3463         (supportable_narrowing_operation): Likewise.
3464         (vectorizable_type_promotion): Add an argument.
3465         (vectorizable_type_demotion): Likewise.
3466         * tree-vect-analyze.c (vect_analyze_operations): Call
3467         vectorizable_type_promotion and vectorizable_type_demotion with
3468         additional argument.
3469         (vect_get_and_check_slp_defs): Detect patterns.
3470         (vect_build_slp_tree): Add an argument, don't fail in case of multiple
3471         types.
3472         (vect_analyze_slp_instance): Don't fail in case of multiple types. Call
3473         vect_build_slp_tree with correct arguments. Calculate unrolling factor
3474         according to the smallest type in the loop.
3475         (vect_detect_hybrid_slp_stmts): Include statements from patterns.
3476         * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Call
3477         supportable_widening_operation with correct arguments.
3478         * tree-vect-transform.c (vect_get_slp_defs): Allocate output vector
3479         operands lists according to the number of vector statements in left
3480         or right node, if exists.
3481         (vect_gen_widened_results_half): Remove unused argument.
3482         (vectorizable_conversion): Call supportable_widening_operation,
3483         supportable_narrowing_operation, and vect_gen_widened_results_half
3484         with correct arguments.
3485         (vectorizable_assignment): Change documentation, support multiple
3486         types in SLP.
3487         (vectorizable_operation): Likewise.
3488         (vect_get_loop_based_defs): New function.
3489         (vect_create_vectorized_demotion_stmts): Likewise.
3490         (vectorizable_type_demotion): Support loop-aware SLP and general
3491         multi-step conversion. Call vect_get_loop_based_defs and
3492         vect_create_vectorized_demotion_stmts for transformation.
3493         (vect_create_vectorized_promotion_stmts): New function.
3494         (vectorizable_type_promotion): Support loop-aware SLP and general
3495         multi-step conversion. Call vect_create_vectorized_promotion_stmts
3496         for transformation.
3497         (vectorizable_store): Change documentation, support multiple
3498         types in SLP.
3499         (vectorizable_load): Likewise.
3500         (vect_transform_stmt): Pass SLP_NODE to
3501         vectorizable_type_promotion and vectorizable_type_demotion.
3502         (vect_schedule_slp_instance): Move here the calculation of number
3503         of vectorized statements for each node from...
3504         (vect_schedule_slp): ... here.
3505         (vect_transform_loop): Call vect_schedule_slp without the last
3506         argument.
3507
3508 2008-08-19  Dorit Nuzman  <dorit@il.ibm.com>
3509
3510         PR bootstrap/37152
3511         * tree-vect-transform.c (vect_create_epilog_for_reduction): Change =
3512         to == in assert statement.
3513         (vectorizable_reduction): Fix typo.
3514
3515 2008-08-18  H.J. Lu  <hongjiu.lu@intel.com>
3516
3517         PR bootstrap/37153
3518         * value-prof.c (check_counter): Dereference pointer to overall
3519         count when printing it.
3520
3521 2008-08-18  H.J. Lu  <hongjiu.lu@intel.com>
3522
3523         * profile.h: Really add it.
3524
3525 2008-08-18  H.J. Lu  <hongjiu.lu@intel.com>
3526
3527         * mcf.c: Really add it.
3528
3529 2008-08-18  Paul Yuan  <yingbo.com@gmail.com>
3530             Vinodha Ramasamy  <vinodha@google.com>
3531
3532         * cgraph.c (cgraph_edge): Handle inconsistent counts when setting
3533         count_scale.
3534         * value-prof.c (check_counter): Fix the counter if
3535         flag_profile_correction is true.
3536         (tree_divmod_fixed_value_transform, tree_mod_pow2_value_transform,
3537         tree_mod_subtract_transform):
3538         Follow check_counter parameter change.
3539         * common.opt (fprofile-correction): New option.
3540         * mcf.c: New file.
3541         * profile.h: Likewise.
3542         * profile.c (edge_info, EDGE_INFO): Moved to new file profile.h.
3543         (sum_edge_counts, is_edge_inconsistent, correct_negative_edge_counts,
3544         is_inconsistent, set_bb_counts, read_profile_edge_counts): New
3545         functions.
3546         (compute_branch_probabilities): Refactored. Invokes mcf_smooth_cfg if
3547         flag_profile_correction is set.
3548
3549 2008-08-18  Richard Sandiford  <rdsandiford@googlemail.com>
3550
3551         * rtlanal.c (subreg_offset_representable_p): Check HARD_REGNO_MODE_OK.
3552
3553 2008-08-18  Tomas Bily  <tbily@suse.cz>
3554
3555         * tree.h (IS_CONVERT_EXPR_CODE_P): Renamed to CONVERT_EXPR_CODE_P.
3556         * tree-ssa-threadedge.c (simplify_control_stmt_condition): Use
3557         CONVERT_EXPR_P.
3558         * tree-data-ref.c (split_constant_offset_1): Likewise.
3559         * tree-inline.c (estimate_operator_cost): Use CASE_CONVERT.
3560         * tree-sra.c (sra_walk_expr): Likewise.
3561         * matrix-reorg.c (ssa_accessed_in_assign_rhs): Likewise.
3562         * tree-ssa-loop-niter.c (expand_simple_operations): Likewise.
3563         * gimple.h (gimple_assign_cast_p): Use CONVERT_EXPR_CODE_P.
3564         * tree-ssa-structalias.c (find_func_aliases, find_func_aliases):
3565         Likewise.
3566         * gimple.c (gimple_assign_unary_nop_p): Likewise.
3567         * tree-vect-transform.c (vectorizable_type_demotion)
3568         (vectorizable_type_promotion): Likewise.
3569         * tree-inline.c (expand_call_inline):
3570         * tree-ssa-forwprop.c (get_prop_source_stmt, can_propagate_from)
3571         (forward_propagate_addr_expr_1, forward_propagate_comparison)
3572         (tree_ssa_forward_propagate_single_use_vars): Likewise.
3573         * expr.c (expand_expr_real_1): Likewise.
3574         * tree-ssa-dom.c (hashable_expr_equal_p, iterative_hash_hashable_expr)
3575         (gimple_assign_unary_useless_conversion_p): Likewise.
3576         * tree-stdarg.c (execute_optimize_stdarg): Likewise.
3577         * tree-ssa-ccp.c (ccp_fold, fold_gimple_assign): Likewise.
3578         * fold-const.c (fold_unary): Likewise.
3579         * tree.h (CONVERT_EXPR_P): Likewise.
3580         * tree.c (simple_cst_equal, iterative_hash_expr): Likewise.
3581         * tree-ssa-loop-im.c (rewrite_bittest): Likewise.
3582         * tree-vrp.c:
3583         (register_edge_assert_for_2, extract_range_from_unary_expr)
3584         (register_edge_assert_for_1): Likewise.
3585
3586 2008-08-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3587
3588         * real.h (dconst_e, dconst_third, dconst_sqrt2, dconst_e_ptr,
3589         dconst_third_ptr, dconst_sqrt2_ptr): Declare.
3590         (enum real_value_const): Delete.
3591         (get_real_const): Delete.
3592         * real.c (get_real_const): Delete.
3593         (dconst_e_ptr): Define.
3594         (dconst_third_ptr): Define.
3595         (dconst_sqrt2_ptr): Define.
3596         * builtins.c: Update all callers.
3597
3598 2008-08-18  Richard Guenther  <rguenther@suse.de>
3599
3600         * tree-ssa-reassoc.c (reassociate_bb): Properly reset the
3601         statement iterator after statement removal.
3602
3603 2008-08-18  Andreas Tobler  <a.tobler@schweiz.org>
3604
3605         * config/rs6000/driver-rs6000.c (detect_caches_freebsd): New function.
3606         (detect_processor_freebsd): Likewise.
3607         (host_detect_local_cpu): Call newly added functions for FreeBSD.
3608
3609 2008-08-18  Richard Guenther  <rguenther@suse.de>
3610
3611         * tree-cfg.c (verify_types_in_gimple_assign): Verify copies
3612         and loads have the correct types.
3613
3614 2008-08-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3615
3616         PR cpp/7263
3617         * c-opts.c (cpp_opts): Remove static.
3618         * c-parser.c (cpp_opts): Declare it extern.
3619         (disable_extension_diagnostics): Handle cpp options.
3620         (enable_extension_diagnostics): Likewise.
3621
3622 2008-08-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3623
3624         * diagnostics.c (permerror_at): Rename as permerror.
3625         (permerror): Delete.
3626         * toplev.h: Likewise.
3627
3628 2008-08-18  Richard Guenther  <rguenther@suse.de>
3629
3630         * passes.c (init_optimization_passes): Remove cleanup_cfg1,
3631         sdse1 and addressables2 passes.  Replace dce1 with cddce1.
3632         Move call_cdce before build_alias.  Move copyrename2,
3633         cunrolli and ccp2 beafore build_alias.  Re-add addressable2
3634         right after final inlining.
3635         * tree-cfg.c (build_gimple_cfg): Do not dump function here.
3636         (pass_build_cfg): But instead via TODO_dump_func.
3637
3638 2008-08-18  Richard Guenther  <rguenther@suse.de>
3639
3640         * tree-sra.c (generate_element_init_1): Deal with NULL constructor
3641         element index.
3642         (scalarize_init): If we failed to generate some initializers
3643         do not generate zeros for not instantiated members.  Instead
3644         rely on the copy out.
3645         * tree-ssa-operands.c (get_addr_dereference_operands): Warn
3646         about missing flow-sensitive alias info only if we have
3647         aliases computed.
3648
3649 2008-08-17  Nick Clifton  <nickc@redhat.com>
3650
3651         * doc/extend.texi (Function Attributes): Fix typo in description
3652         if hot function attribute.
3653
3654 2008-08-17  Daniel Jacobowitz  <dan@codesourcery.com>
3655             Richard Sandiford  <rdsandiford@googlemail.com>
3656
3657         * doc/install.texi (--with-mips-plt): Document.
3658         * doc/invoke.texi (-mplt, -mno-plt): Document.
3659         * config.gcc (mips*-*-*): Add mips-plt to supported_defaults
3660         and handle ${with_mips_plt}.
3661         * config/mips/mips.opt (mplt): New option.
3662         * config/mips/mips.h (TARGET_ABICALLS_PIC0): New macro.
3663         (TARGET_ABICALLS_PIC2): Likewise.
3664         (TARGET_GPWORD): Return false for TARGET_ABSOLUTE_ABICALLS.
3665         (OPTION_DEFAULT_SPECS): Add a mips-plt entry.
3666         (ASM_SPEC): Use !mabi=* instead of !mabi*.
3667         (MIPS_CALL): Use TARGET_ABICALLS_PIC2 instead of TARGET_ABICALLS
3668         to decide whether to output ".option picX" directives.
3669         * config/mips/linux.h (SUBTARGET_ASM_SPEC): Remove -mabi=64 handling.
3670         Pass -call_nonpic rather than -KPIC for -mplt.
3671         (BASE_DRIVER_SELF_SPECS): Remove -mplt if -mno-shared is not present
3672         on the command line.  Also remove it when -mabi=64 is used without
3673         -msym32.
3674         * config/mips/linux64.h (SUBTARGET_ASM_SPEC): Delete.
3675         * config/mips/mips.c (mips_use_pic_fn_addr_reg_p): Handle
3676         TARGET_ABICALLS_PIC0.
3677         (mips_classify_symbol): Use TARGET_ABICALLS_PIC2 instead of
3678         TARGET_ABICALLS.
3679         (mips16_build_function_stub): Only output ".option pic" directives
3680         and PIC stubs if TARGET_ABICALLS_PIC2.  Call through $25 instead of $1.
3681         (mips16_build_call_stub): Fix comment and remove redundant
3682         ".set at"/"set .noat" directives.
3683         (mips_function_rodata_section): Use the default behaviour for
3684         TARGET_ABSOLUTE_ABICALLS.
3685         (mips_file_start): Emit ".option pic0" for TARGET_ABICALLS_PIC0.
3686         (mips_global_pointer): Handle TARGET_ABICALLS_PIC0.
3687         (mips_restore_gp): Do nothing if the current function doesn't use
3688         a global pointer.
3689         (mips_expand_prologue): Only save $gp if the current function uses it.
3690         Use a normal move for TARGET_ABICALLS_PIC0.
3691         (mips_override_options): Only set flag_pic if TARGET_ABICALLS_PIC2.
3692
3693 2008-08-17  Richard Sandiford  <rdsandiford@googlemail.com>
3694
3695         * config/mips/mips.c (mips_save_reg_p): Don't short-circuit rest
3696         of function when handling GLOBAL_POINTER_REGNUM.
3697
3698 2008-08-16  Eric Botcazou  <ebotcazou@adacore.com>
3699
3700         PR ada/20548
3701         * common.opt (-fstack-check): Do not declare the variable here.
3702         (-fstack-check=): New option variant.
3703         * doc/invoke.texi (Code Gen Options): Document it.
3704         * expr.h (STACK_OLD_CHECK_PROTECT): New macro.
3705         (STACK_CHECK_PROTECT): Bump to 3 pages if DWARF-2 EH is used.
3706         (STACK_CHECK_STATIC_BUILTIN): New macro.
3707         * doc/tm.texi (Stack Checking): Document STACK_CHECK_STATIC_BUILTIN.
3708         * opts.c: Include expr.h.
3709         (common_handle_option) <OPT_fold_stack_check_>: New case.
3710         <OPT_fstack_check>: Likewise.
3711         * calls.c (initialize_argument_information): Use TYPE_SIZE_UNIT
3712         consistently in the test for variable-sized types.  Adjust for
3713         new behaviour of flag_stack_check.
3714         * explow.c: Include except.h.
3715         (allocate_dynamic_stack_space): Do not take into account
3716         STACK_CHECK_MAX_FRAME_SIZE for static builtin stack checking.
3717         * function.c (gimplify_parameters): Use DECL_SIZE_UNIT in the test
3718         for variable-sized parameters.  Treat all parameters whose size is
3719         greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized if generic
3720         stack checking is enabled.
3721         * gimplify.c (gimplify_decl_expr): Treat non-static objects whose
3722         size is greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized
3723         if generic stack checking is enabled.
3724         (expand_function_end): Adjust for new behaviour of flag_stack_check.
3725         * reload1.c (reload): Likewise.
3726         * stmt.c (expand_decl): Assert that all automatic variables have
3727         fixed size at this point and remove dead code.
3728         * flags.h (stack_check_type): New enumeration type.
3729         (flag_stack_check): Declare.
3730         * toplev.c (flag_stack_check): New global variable.
3731         * Makefile.in (opts.o): Add dependency on EXPR_H.
3732         (explow.o): Add dependency on except.h.
3733
3734 2008-08-16  Andy Hutchinson  <hutchinsonandy@aim.com>
3735
3736         * config/avr/avr.c (avr_override_options): Reduce value of
3737         PARAM_INLINE_CALL_COST.
3738
3739 2008-08-15  Eric Botcazou  <ebotcazou@adacore.com>
3740
3741         * expr.c (expand_expr_real_1) <VIEW_CONVERT_EXPR>: When converting
3742         to BLKmode, try to fetch an inner memory reference.  Use 'mode' in
3743         lieu of TYPE_MODE (type) throughout.
3744
3745 2008-08-15  Joseph Myers  <joseph@codesourcery.com>
3746
3747         * config/arm/arm.c (add_minipool_backward_ref): Check for
3748         8-byte-aligned entries in second case of forcing insertion after a
3749         particular entry.  Change third case to avoid inserting
3750         non-8-byte-aligned entries before 8-byte-aligned ones.
3751
3752 2008-08-15  Richard Guenther  <rguenther@suse.de>
3753
3754         * tree-ssa-ccp.c (maybe_fold_offset_to_reference): Do not
3755         strip components for unknown size accesses.
3756
3757 2008-08-15  Wolfgang Gellerich  <gellerich@de.ibm.com>
3758
3759         * config/s390/2097.md New file.
3760         * config/s390/s390.md ("z10prop" attribute): Define none,
3761         z10_super, z10_super_E1, z10_super_A1, z10_super_c,
3762         z10_super_c_E1, z10_fwd, z10_fwd_A1, z10_fwd_A3, z10_fwd_E1,
3763         z10_rec, z10_fr, z10_fr_A3, z10_fr_E1, z10_c, and z10_cobra as
3764         possible values and apply them to insns as appropriate.
3765         ("type" attribute): Removed itof and added ftrunctf,ftruncdf,
3766         ftruncsd, ftruncdd, itoftf, itofdf, itofsf, itofdd, itoftd,
3767         fdivdd, fdivtd, floaddd, floadsd, fmuldd, fmultd, fsimpdd,
3768         fsimpsd, fsimptd, fstoredd, fstoresd, ftoidfp as possible
3769         values.
3770         ("bfp" mode attribute): Removed.  Every occurence replaced
3771         with <mode>.
3772         * config/s390/s390.c (struct "z10_cost"): Updated entries.
3773         * config/s390/2084.md (insn_reservation "x_itof"): Updated
3774           type attribute.
3775
3776 2008-08-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3777
3778         PR c/28152
3779         * c-parser.c (c_lex_one_token): Do not store the canonical spelling
3780         for keywords.
3781
3782 2008-08-14  Dorit Nuzman  <dorit@il.ibm.com>
3783
3784         * tree-vect-transform.c (vect_create_epilog_for_reduction): Takes an
3785         additional argument. Support reduction when duplication is needed due
3786         to data-types of different sizes in the loop.
3787         (get_initial_def_for_induction): Fix printout.
3788         (vect_get_vec_def_for_stmt_copy): Support case where the
3789         vec_stmt_for_operand is a phi node.
3790         (vectorizable_reduction): Support reduction when duplication is needed
3791         due to data-types of different sizes in the loop.
3792         (vectorizable_call): Remove restriction to not vectorize in case we
3793         have data-types of different sizes in the loop.
3794         (vectorizable_conversion): Likewise.
3795         (vectorizable_operation): Likewise.
3796         (vectorizable_type_demotion): Likewise.
3797         (vectorizable_type_promotion): Likewise.
3798         (vectorizable_induction): Add restriction to not vectorize in case
3799         we have data-types of different sizes in the loop.
3800
3801 2008-08-14  Christophe Saout  <christophe@saout.de>
3802             Uros Bizjak  <ubizjak@gmail.com>
3803
3804         PR target/37101
3805         * config/i386/sse.md (vec_concatv2di): Remove movlps alternative.
3806         (*vec_concatv2di_rex64_sse4_1): Ditto.
3807         (*vec_concatv2di_rex64_sse): Ditto.
3808
3809 2008-08-14  Jakub Jelinek  <jakub@redhat.com>
3810
3811         PR middle-end/37103
3812         * fold-const.c (fold_widened_comparison): Do not allow
3813         sign changes that change the result even if shorter type
3814         is wider than arg1_unw's type.
3815
3816 2008-08-13  Kazu Hirata  <kazu@codesourcery.com>
3817
3818         * gcc.dg/arm-g2.c, gcc.dg/arm-mmx-1.c, gcc.dg/arm-scd42-2.c:
3819         Skip if the multilib testing specifies -march that does not
3820         agree with the one specified in the testcase.
3821
3822 2008-08-13  Joseph Myers  <joseph@codesourcery.com>
3823
3824         * config/sparc/sparc.c (emit_soft_tfmode_cvt): Explicitly sign or
3825         zero extend SImode values being converted to TFmode before passing
3826         to libcalls.
3827
3828 2008-08-13  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
3829
3830         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Predefine
3831         __PPU__ when targeting the Cell/B.E. PPU processor.
3832
3833 2008-08-13  Eric Botcazou  <ebotcazou@adacore.com>
3834
3835         * gimple.h (gimple_call_set_chain): Accept SSA variables.
3836         * tree-ssa-pre.c (create_component_ref_by_pieces_1) <CALL_EXPR>:
3837         Rematerialize the static chain, if any.
3838         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Also copy the
3839         static chain.
3840
3841 2008-08-13  H.J. Lu  <hongjiu.lu@intel.com>
3842
3843         * dwarf2out.c (dwarf_stack_op_name): Remove prototype.
3844         (new_loc_descr): Likewise.
3845         (add_loc_descr): Likewise.
3846         (size_of_loc_descr): Likewise.
3847         (size_of_locs): Likewise.
3848         (output_loc_operands): Likewise.
3849         (output_loc_sequence): Likewise.
3850         (new_reg_loc_descr): New.
3851         (build_cfa_loc): Use it.
3852         (build_cfa_aligned_loc): Likewise.
3853         (one_reg_loc_descriptor): Likewise.
3854         (based_loc_descr): Likewise.
3855
3856 2008-08-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3857
3858         PR 30551
3859         * doc/invoke.texi (Wmain): Update.
3860         * c-decl.c (start_decl): warn_main is only 0 or 1.
3861         (start_function): Likewise. Fix formatting.
3862         (finish_function): Delete redundant warning.
3863         * c.opt (Wmain): Add Var(warn_main) and Init(-1).
3864         * c-opts (c_common_handle_option): -Wall only has effect if
3865         warn_main is uninitialized. OPT_Wmain is automatically
3866         handled. -pedantic also enables Wmain.
3867         (c_common_post_options): Handle all logic for Wmain here.
3868         * c-common.c (warn_main): Delete.
3869         (check_main_parameter_types): Make pedwarns conditional on
3870         OPT_Wmain.
3871         * c-common.h (warn_main): Delete.
3872
3873 2008-08-13  H.J. Lu  <hongjiu.lu@intel.com>
3874
3875         PR middle-end/36701
3876         * expr.c (emit_group_store): Allocate stack temp with the
3877         largest alignment when copying from register to stack.
3878
3879 2008-08-13  Richard Guenther  <rguenther@suse.de>
3880
3881         * tree.h (maybe_fold_offset_to_address): Declare.
3882         * tree-ssa-ccp.c (surely_varying_stmt_p): Fix typo in last commit.
3883         (ccp_fold): Handle pointer conversions the same as fold_stmt.
3884         Likewise for POINTER_PLUS_EXPR.
3885         (maybe_fold_offset_to_reference): Enable disabled code.
3886         (maybe_fold_offset_to_address): New function.
3887         (fold_stmt_r): Use it.
3888         (fold_gimple_assign): Likewise.
3889         * gimplify.c (gimplify_conversion): Use maybe_fold_offset_to_address.
3890         (gimplify_expr): Likewise.
3891
3892 2008-08-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3893
3894         * toplev.h (pedwarn_at): Fix declaration.
3895
3896 2008-08-13  Joseph Myers  <joseph@codesourcery.com>
3897
3898         * config/sparc/linux64.h (LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
3899         LINK_SPEC): Use %R in -Y P argument.
3900
3901 2008-08-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3902
3903         PR c/15236
3904         * diagnostic.c (pedwarn_at): New.
3905         * toplev.h (pedwarn_at): Declare.
3906         * c-tree.h (build_enumerator): Update declaration.
3907         * c-decl.c (finish_enum): Update comment.
3908         (build_enumerator): Take a location parameter. Give a pedwarn but do
3909         not perform any conversion.
3910         * c-parser.c (c_parser_enum_specifier): Set correct location for
3911         enumerator.
3912
3913 2008-08-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3914
3915         PR 35635
3916         * c-common.c (conversion_warning): Use a switch. Ignore boolean
3917         expressions except for conversions to signed:1 bitfields. Handle
3918         COND_EXPR with constant operands.
3919
3920 2008-08-13  Richard Guenther  <rguenther@suse.de>
3921
3922         PR tree-optimization/15255
3923         * tree-ssa-reassoc.c (linearize_expr_tree): Declare.
3924         (struct oecount_s): New struct and VEC types.
3925         (cvec): New global.
3926         (oecount_hash): New function.
3927         (oecount_eq): Likewise.
3928         (oecount_cmp): Likewise.
3929         (zero_one_operation): New function.
3930         (build_and_add_sum): Likewise.
3931         (undistribute_ops_list): Perform un-distribution of multiplication
3932         and division on the chain of summands.
3933         (should_break_up_subtract): Also break up subtracts for factors.
3934         (reassociate_bb): Delete dead visited statements.
3935         Call undistribute_ops_list.  Re-sort and optimize if it did something.
3936         * passes.c (init_optimization_passes): Move DSE before
3937         reassociation.
3938         * tree-ssa-loop-niter.c (stmt_dominates_stmt_p): Correctly handle
3939         PHI nodes.
3940
3941 2008-08-12  Janis Johnson  <janis187@us.ibm.com>
3942
3943        &n