OSDN Git Service

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