OSDN Git Service

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