OSDN Git Service

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