OSDN Git Service

PR libmudflap/36397
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2008-09-15  Jakub Jelinek  <jakub@redhat.com>
2
3         PR libmudflap/36397
4         * tree-mudflap.c (mf_xform_derefs_1): Handle VIEW_CONVERT_EXPR.
5
6 2008-09-14  Andreas Schwab  <schwab@suse.de>
7
8         * tree-call-cdce.c (check_target_format): Accept Motorola formats.
9
10 2008-09-14  Jan Hubicka  <jh@suse.cz>
11
12         * invoke.texi (-fconserve-stack): Document.
13         * opts.c (decode_options): Handle conserve_stack.
14         * common.opt (fconvserve_stack): New.
15
16 2008-09-14  David Edelsohn  <edelsohn@gnu.org>
17
18         * config.host: Add x-aix to host_xmake_file.
19         * config/rs6000/t-aix52: Do not override LDFLAGS.
20         * config/rs6000/x-aix: New file.
21
22 2008-09-14  Andy Hutchinson  <hutchinsonandy@aim.com>
23
24         PR target/19636
25         PR target/24894
26         PR target/31644
27         PR target/31786
28         * config/avr/avr.c (legitimate_address_p): Fix problem where subreg
29         is not recognized as a valid register usage. Allow REG_X to be used
30         as a base pointer.
31         * config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Remove code that
32         forces a reload when using a base register.
33
34 2008-09-14  Danny Smith  <dannysmith@users.sourceforge.net>
35
36         * config/i386/cygming-crtend.c (register_frame_ctor): If
37         DEFAULT_USE_CXA_ATEXIT, register __gcc_deregister_frame
38         directly with atexit.
39         (deregister_frame_ctor): Rename to ...
40         (deregister_frame_dtor): Use to call __gcc_deregister_frame
41         if !DEFAULT_USE_CXA_ATEXIT.
42
43 2008-09-13  Jan Hubicka  <jh@suse.cz>
44
45         * cgraph.c: Include value-prof.h
46         * Makefile.in (cgraph.o): Add value-prof.h dependency.
47
48 2008-09-13  Jan Hubicka  <jh@suse.cz>
49
50         PR middle-end/32581
51         * tree-profile.c (add_abnormal_goto_call_edges): New function.
52         (tree_gen_interval_profiler, tree_gen_pow2_profiler,
53         tree_gen_one_value_profiler, tree_gen_average_profiler,
54         tree_gen_ic_func_profiler, tree_gen_ior_profiler): Use it.
55
56 2008-09-13  Jan Hubicka  <jh@suse.cz>
57
58         * i386.c (ix86_expand_movmem, ix86_expand_movstr): Avoid processing too
59         many bytes on misalligned blocks.
60
61 2008-09-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
62
63         * doc/cfg.texi: Fix some typos.
64         * doc/extend.texi: Likewise.
65         * doc/install.texi: Likewise.
66         * doc/invoke.texi: Likewise.
67         * doc/rtl.texi: Likewise.
68         * doc/tree-ssa.texi: Likewise.
69
70 2008-09-13  Richard Guenther  <rguenther@suse.de>
71
72         PR middle-end/30141
73         * tree-nested.c (finalize_nesting_tree_1): Generate valid
74         gimple stores for memory rhs.
75
76 2008-09-13  H.J. Lu  <hongjiu.lu@intel.com>
77
78         PR rtl-optimization/37489
79         * cse.c (fold_rtx): Don't return const_true_rtx for float
80         compare if FLOAT_STORE_FLAG_VALUE is undefined.
81
82 2008-09-13  Jan Hubicka  <jh@suse.cz>
83
84         PR tree-optimization/37392
85         * tree-inline.c (remap_gimple_stmt): Do not remap return value.
86
87 2008-09-13  Martin Jambor  <mjambor@suse.cz>
88             Jan Hubicka  <jh@suse.cz>
89
90         * cgraph.c (free_edges): New variable.
91         (NEXT_FREE_EDGE): New macro.
92         (cgraph_free_edge): New function.
93         (cgraph_remove_edge): Call cgraph_remove_edge_1.
94         (cgraph_node_remove_callees): Likewise.
95         (cgraph_node_remove_callers): Likewise.
96         (cgraph_create_edge): Reuse edges from the free list.  Do not
97         update uid if doing so.
98         (cgraph_remove_*_hook): Add free call.
99
100 2008-09-13  Richard Sandiford  <rdsandiford@googlemail.com>
101
102         * ira-color.c (conflict_allocno_vec): Delete.
103         (update_cost_queue_elem): New structure.
104         (update_cost_queue): New variable.
105         (update_cost_queue_tail): Likewise.
106         (update_cost_queue_elems): Likewise.
107         (allocno_update_cost_check): Delete.
108         (initiate_cost_update): Allocate update_cost_queue_elems
109         instead of allocno_update_cost_check.
110         (finish_cost_update): Update the free()s accordingly.
111         (start_update_cost): New function.
112         (queue_update_cost): Likewise.
113         (get_next_update_cost): Likewise.
114         (update_copy_costs_1): Inline into...
115         (update_copy_costs): ...here.  Use a queue instead of recursive calls.
116         Use cover_class instead of ALLOCNO_COVER_CLASS (another_allocno),
117         once we've established they are equal.  Don't allocate update
118         costs if there is nothing to add to them.
119         (update_conflict_hard_regno_costs): Remove ALLOCNO and
120         DIVISOR arguments.  Use a queue instead of recursive calls;
121         process all the allocnos in the initial queue, rather than
122         a single allocno.
123         (assign_hard_reg): Use queue_update_cost instead of
124         conflict_allocno_vec.  Queue coalesced allocnos instead
125         of calling update_conflict_hard_regno_costs for each one.
126         Just call update_conflict_hard_regno_costs once for the
127         entire queue.
128         (ira_color): Remove conflict_allocno_vec handling.
129
130 2008-09-12  Sebastian Pop  <sebastian.pop@amd.com>
131
132         PR tree-optimization/37484
133         * graphite.c (scop_record_loop): Use snprintf instead of sprintf.
134         (save_var_name): Same.
135         (initialize_cloog_names): Same.
136         (initialize_cloog_names): Same.
137
138 2008-09-12  Sebastian Pop  <sebastian.pop@amd.com>
139
140         * tree-scalar-evolution.c (set_instantiated_value): Set instantiated_below.
141
142 2008-09-12  Vladimir Makarov  <vmakarov@redhat.com>
143
144         PR rtl-opt/37377
145
146         * ira-build.c (common_loop_tree_node_dominator): Remove.
147         (copy_live_ranges_to_removed_store_destinations): New function.
148         (regno_top_level_allocno_map): Move to top level from ...
149         (ira_flattening): ... here.  Use
150         copy_live_ranges_to_removed_store_destinations.
151
152         * ira-emit.c (generate_edge_moves): Fix a comment.
153
154 2008-09-12  Anatoly Sokolov  <aesok@post.ru>
155
156         PR target/37466
157         * config/avr/avr.md (movsi_lreg_const peephole2): Add match_dup for
158         scratch register after 'set' pattern.
159
160 2008-09-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
161
162         * emit-rtl.c (set_reg_attrs_from_value): Fix invalid alignment
163         information passed to mark_reg_pointer.
164         * explow.c (force_reg): Likewise.
165
166 2008-09-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
167
168         * config/spu/spu.c (spu_override_options): Default to -mno-safe-hints
169         when building for the celledp architecture.
170
171 2008-09-12  Richard Guenther  <rguenther@suse.de>
172
173         * tree-vrp.c (simplify_truth_ops_using_ranges): Fix types.
174
175 2008-09-12  Eric Botcazou  <ebotcazou@adacore.com>
176
177         PR rtl-optimization/37424
178         * ira-color.c (coalesced_pseudo_reg_slot_compare): Untie by comparing
179         the regnos instead of the addresses.
180
181 2008-09-11  Janis Johnson  <janis187@us.ibm.com>
182
183         * ginclude/float.h (DEC_EVAL_METHOD): Correct the macro name.
184
185 2008-09-11  Richard Guenther  <rguenther@suse.de>
186
187         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Avoid
188         entering the weaker equivalence recording.
189
190         * tree-ssa-phiprop.c (propagate_with_phi): Fix tuplification.
191
192 2008-09-11  Jeff Law <law@redhat.com>
193
194         * reload1.c (alter_reg): Undo the BYTE_BIG_ENDIAN correction performed
195         by assign_stack_local on the IRA path for stack slot sharing
196         as well as the non-IRA path.
197
198 2008-09-11  Uros Bizjak  <ubizjak@gmail.com>
199
200         * config/i386/i386.h: Fix whitespace issues.
201
202 2008-09-11  Martin Jambor  <mjambor@suse.cz>
203
204         * ipa-prop.h (struct ipa_param_flags): Removed.
205         (struct ipa_param_descriptor): New structure.
206         (struct ipa_node_params): ipcp_lattices, param_decls and
207         param_flags moved to ipa_param_description.
208         (ipa_get_ith_param): Renamed to ipa_get_param, changed to access
209         descriptors.  Renamed all users.
210         (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified,
211         changed to access descriptors.  Renamed all users.
212         (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed
213         to access descriptors. Renamed all users.
214         * ipa-cp.c (ipcp_init_cloned_node): Call
215         ipa_initialize_node_params instead of ipa_count_formal_params and
216         ipa_create_param_decls_array.
217         (ipcp_analyze_node): Likewise.
218         (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access
219         descriptors.  Renamed all users.
220         (ipcp_initialize_node_lattices): Remove allocation.
221         * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call
222         ipa_initialize_node_params instead of ipa_count_formal_params and
223         ipa_create_param_decls_array.
224         * ipa-prop.c (ipa_create_param_decls_array): Renamed to
225         ipa_populate_param_decls, made static, added parameter info,
226         renamed mt to node, removed allocation, changed to use
227         descriptors.
228         (ipa_count_formal_params): Made static, added parameter info,
229         renamed mt to node.
230         (ipa_initialize_node_params): New function.
231         (ipa_check_stmt_modifications): Changed to use descriptors.
232         (ipa_detect_param_modifications): Removed allocation, changed to
233         use descriptors.
234         (ipa_note_param_call): Changed to use descriptors.
235         (ipa_analyze_params_uses): Removed allocation.
236         (ipa_free_node_params_substructures): Changed to use descriptors.
237         (ipa_edge_duplication_hook): Use the unused attribute.
238         (ipa_node_duplication_hook): Use the unused attribute, changed to
239         use descriptors, changed to duplicate descriptors.
240
241         * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges,
242         changed all callers.  Call ipa_propagate_indirect_call_infos if doing
243         indirect inlining.  Made static.
244         (cgraph_decide_inlining): Freeing ipa-prop structures after inlining
245         functions called only once.
246         (cgraph_decide_recursive_inlining): Don't call
247         ipa_propagate_indirect_call_infos, pass new_edges to
248         cgraph_mark_inline_edge instead.
249         (cgraph_decide_inlining_of_small_functions): Don't call
250         ipa_propagate_indirect_call_infos, pass new_edges to
251         cgraph_mark_inline_edge instead.
252         (cgraph_decide_inlining): Don't call
253         ipa_propagate_indirect_call_infos.
254         * ipa-prop.c: Check that vectors are allocated.
255
256         * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true
257         iff a new cgraph edges have been created.
258         (cgraph_decide_inlining): New variable redo_always_inline.
259         Flattening and always_inlining loop until callgraph stabilizes.
260         * ipa-prop.c (update_call_notes_after_inlining): Returns boolean,
261         true iff new cgraph edges have been created.
262         (propagate_info_to_inlined_callees): Likewise.
263         (ipa_propagate_indirect_call_infos): Likewise.
264
265 2008-09-11  Richard Guenther  <rguenther@suse.de>
266
267         * tree-vectorizer.c (slpeel_add_loop_guard): Fix types.
268         (set_prologue_iterations): Likewise.
269         * tree-vect-transform.c (vect_create_addr_base_for_vector_ref):
270         Likewise.
271         (vect_update_init_of_dr): Likewise.
272         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Fix
273         type verification.
274         * fold-const.c (fold_unary): Do not generate calculations
275         in sub-types.
276
277 2008-09-11  Paolo Bonzini  <bonzini@gnu.org>
278
279         * dojump.c (do_jump) [BIT_AND_EXPR]: Move below.  Fall through to
280         TRUTH_AND_EXPR for boolean (1-bit precision) expressions.
281         (do_jump) [BIT_IOR_EXPR]: Compile as TRUTH_OR_EXPR.
282
283         * tree-flow.h (simplify_stmt_using_ranges): Accept a GSI, return a bool.
284         * tree-ssa-propagate.c (substitute_and_fold): Pass a GSI to
285         VRP's simplify_stmt_using_ranges.  Do simplify_stmt_using_ranges
286         before finalizing the changes.
287         * tree-vrp.c (extract_range_from_binary_expr): Add limited support
288         for BIT_IOR_EXPR.
289         (simplify_truth_ops_using_ranges): New.
290         (simplify_div_or_mod_using_ranges, simplify_abs_using_ranges,
291         simplify_cond_using_ranges, simplify_switch_using_ranges): Return
292         whether a simplification was made.
293         (simplify_stmt_using_ranges): Ditto, and accept a GSI.  For GS_ASSIGN,
294         use a switch statement and also call simplify_truth_ops_using_ranges.
295
296 2008-09-11  Jan Hubicka  <jh@suse.cz>
297
298         * ggc-common.c (loc_array): Make static.
299         * dce.c (rest_of_handle_ud_dce): Free worklist.
300
301 2008-09-11  Jan Hubicka  <jh@suse.cz>
302
303         * cgraph.c (cgraph_release_function_body): Plug memory leak on
304         ipa_transforms_to_apply and CFG; ggc_free gimple df and struct function
305         so we are sure we do not dangle it forever.
306         * function.c (outer_function_chain, find_function_data): Remove.
307         (function_context_stack): New.
308         (push_function_context, pop_function_context): Update.
309         * function.h (struct function): Remove pointer outer.
310         (outer_function_chain, find_function_data): Remove.
311         * stmt.c (force_label_rtx): Remove dead call of find_function_data.
312
313 2008-09-11  Jan Hubicka  <jh@suse.cz>
314
315         PR middle-end/37448
316         * cgraph.c (cgraph_create_edge): Use !cgraph_edge for sanity check.
317
318 2008-09-11  Jan Hubicka  <jh@suse.cz>
319
320         * tree-ssa-pre.c (phi_translate_1): Fix memory leak
321
322 2008-09-11  Jan Hubicka  <jh@suse.cz>
323
324         * tree-ssa.c (redirect_edge_var_map_clear): Fix formatting.
325         (free_var_map_entry): New function.
326         (redirect_edge_var_map_destroy): Use it.
327
328 2008-09-11  Jan Hubicka  <jh@suse.cz>
329
330         PR middle-end/37448
331         * tree-inline.c (add_lexical_block): Replace with ...
332         (prepend_lexical_block): ... prepend at begginig.
333         (remap_blocks): Use it and reverse later.
334         (expand_call_inline): Use prepend_lexical_block.
335
336 2008-09-11  Jan Hubicka  <jh@suse.cz>
337
338         * gimplify.c (pop_gimplify_context): Free bind_expr_stack.
339
340 2008-09-11  Jan Hubicka  <jh@suse.cz>
341
342         * function.c (free_after_compilation): Call insn_locators_free.
343         * cfglayout.c (insn_locators_free): New function.
344         * rtl.h (insn_locators_free): Declare.
345
346 2008-09-11  Jan Hubicka  <jh@suse.cz>
347
348         * ifcvt.c (check_cond_move_block): Make regs argument pointer to
349         vector pointer.
350         (cond_move_process_if_block): Update call.
351
352 2008-09-11  Jan Hubicka  <jh@suse.cz>
353
354         * toplev.c (dump_memory_report): Call dump_vec_loc_statistics.
355         * vec.c: Include hashtab.h
356         (vec_descriptor, ptr_hash_entry): New structures.
357         (vec_desc_hash, vec_ptr_map): New static variables.
358         (hash_descriptor, eq_descriptor, hash_ptr, eq_ptr, vec_descriptor,
359         register_overhead, free_overhead, vec_heap_free): New functions.
360         (vec_gc_o_reserve_1): ggc_free when resizing to 0.
361         (vec_heap_o_reserve_1): free when resizing to 0; add statistics.
362         (cmp_statistic, add_statistics, dump_vec_loc_statistics): New functions.
363
364 2008-09-11  Ira Rosen  <irar@il.ibm.com>
365
366         PR tree-optimization/37474
367         * tree-vect-analyze.c (vect_supported_load_permutation_p): Check the
368         length of load permutation.
369
370 2008-09-11  Andreas Schwab  <schwab@suse.de>
371
372         * config/m68k/m68k.h (IRA_COVER_CLASSES): Define.
373
374 2008-09-11  Jakub Jelinek  <jakub@redhat.com>
375
376         PR target/37382
377         * expmed.c (extract_low_bits): Avoid creating invalid subregs.
378         * dse.c (find_shift_sequence): Use extract_low_bits instead of
379         simplify_gen_subreg.
380
381 2008-09-11  Ira Rosen  <irar@il.ibm.com>
382
383         * tree-vect-transform.c (vectorizable_store): Use the rhs vector type
384         for alias check.
385
386 2008-09-10  Jakub Jelinek  <jakub@redhat.com>
387
388         PR middle-end/37338
389         * gimplify.c (gimplify_body): Call default_rtl_profile.
390
391         PR target/36904
392         * config/rs6000/rs6000-c.c (rs6000_macro_to_expand): Return NULL
393         instead of tok->val.node if not expanding to something else.  Handle
394         intervening CPP_PADDING tokens.
395         (altivec_categorize_keyword): Remove unneeded comparisons.
396
397 2008-09-10  Richard Guenther  <rguenther@suse.de>
398
399         * tree-ssa-pre.c (phi_translate_1): Fix memory leak.
400
401 2008-09-10  Richard Guenther  <rguenther@suse.de>
402
403         PR middle-end/37432
404         * tree-inline.c (insert_init_stmt): Make sure to not
405         insert invalid gimple stores.
406
407 2008-09-10  Sebastian Pop  <sebastian.pop@amd.com>
408
409         PR tree-optimization/37388
410         * toplev.c (process_options): Fail and warn when graphite
411         flags are used, but the compiler has not been configured
412         with graphite libraries.
413         * graphite.c (graphite_transform_loops): Remove printfs
414         to dump_file for the case when graphite is not available.
415
416 2008-09-10  H.J. Lu  <hongjiu.lu@intel.com>
417
418         PR target/37434:
419         * config/i386/i386.c (ix86_expand_vector_init_interleave): Force
420         the even element into register.
421         (ix86_expand_vector_init_general): Don't use
422         ix86_expand_vector_init_interleave on V16QImode and V8HImode
423         if we can't move from GPR to SSE register directly.
424
425 2008-09-10  Bernd Schmidt  <bernd.schmidt@analog.com>
426
427         * config/bfin/bfin.c (workaround_speculation): Correct algorithm to
428         not lose track of the number of NOPs needed.  Number of NOPs needed
429         for sync vs. loads workaround was switched; corrected.  Run second
430         pass for all workarounds.  No NOPs needed after call insns.  Change
431         second pass to use find_next_insn_start and find_load helpers in order
432         to properly detect parallel insns.
433         * config/bfin/bfin.md (cbranch_with_nops): Increase length.
434
435 2008-09-10  Jan Hubicka  <jh@suse.cz>
436
437         * value-prof.c (gimple_ic): Fix tuplification bug.
438         * sched-deps.c (sched_insns_conditions_mutex_p): Silence unitialized
439         var warning.
440
441 2008-09-10  Jakub Jelinek  <jakub@redhat.com>
442
443         PR tree-optimization/37353
444         * tree-call-cdce.c (cond_dead_built_in_calls): Remove.
445         (shrink_wrap_conditional_dead_built_in_calls): Add calls argument, use
446         calls instead of cond_dead_built_in_calls.
447         (tree_call_cdce): Add cond_dead_built_in_calls automatic variable,
448         initalize the vector only before adding first entry.  Use VEC_safe_push
449         instead of VEC_quick_push.  Pass cond_dead_built_in_calls to
450         shrink_wrap_conditional_dead_built_in_calls call.
451
452 2008-09-10  Ira Rosen  <irar@il.ibm.com>
453
454         PR tree-optimization/37385
455         * tree-vect-transform.c (vect_create_data_ref_ptr): Add a new argument,
456         and use it as a vector type if not NULL.
457         (vectorizable_store): Call vect_create_data_ref_ptr with the type of
458         vectorized rhs.
459         (vect_setup_realignment): Call vect_create_data_ref_ptr with additional
460         argument.
461         (vectorizable_load): Likewise.
462
463 2008-09-10  Jakub Jelinek  <jakub@redhat.com>
464
465         * config/i386/i386.md (SWI32): New mode iterator.
466         (jcc_fused_1, jcc_fused_2, jcc_fused_3, jcc_fused_4): Use it instead
467         of SWI.
468
469 2008-09-09  Vladimir Makarov  <vmakarov@redhat.com>
470
471         PR rtl-optimization/37435
472         * caller-save.c (insert_restore, insert_save): Check the mode by
473         reg_save_code.
474
475 2008-09-09  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
476
477         PR other/37265
478         * dwarf2asm.c (dw2_force_const_mem): Use unstripped symbol name for
479         splay tree lookup.
480         (dw2_output_indirect_constant_1): Use unstripped name in symbol
481         reference.
482
483 2008-09-09  Sandra Loosemore  <sandra@codesourcery.com>
484
485         * doc/invoke.texi (ARM Options): Correct errors in discussion
486         of -mfloat-abi, -mhard-float, and -msoft-float.
487
488 2008-09-09  Jakub Jelinek  <jakub@redhat.com>
489             Jan Hubicka  <jh@suse.cz>
490
491         PR middle-end/37356
492         * tree-inline.c (copy_bb): Insert stmt into copy_basic_block before
493         calling gimple_regimplify_operands on it.  Iterate over all newly
494         added statements, not just the last one.
495         (insert_init_stmt): Insert stmt into seq first, then call
496         gimple_regimplify_operands on it.  Don't create new gimplification
497         context, nor find referenced vars.
498
499 2008-09-09  Jakub Jelinek  <jakub@redhat.com>
500
501         PR other/37419
502         * ipa-prop.h (ipa_propagate_indirect_call_infos): Change last argument
503         to pointer to vector pointer.
504         * ipa-prop.c (ipa_propagate_indirect_call_infos,
505         propagate_info_to_inlined_callees): Likewise.
506         (update_call_notes_after_inlining): Likewise.  Push new indirect edge
507         to *new_edges instead of new_edges.  Reread IPA_EDGE_REF after
508         ipa_check_create_edge_args.
509         * ipa-inline.c (cgraph_decide_recursive_inlining): Change last argument
510         to pointer to vector pointer.
511         (cgraph_decide_inlining_of_small_function): Adjust
512         cgraph_decide_recursive_inlining and ipa_propagate_indirect_call_infos
513         calls.
514
515         PR target/37438
516         * config/i386/i386.md (zero_extendqihi2_movzbl): Enable when optimizing
517         for size, not speed.
518
519         PR rtl-optimization/37408
520         * function.c (assign_parm_find_stack_rtl): Set correct MEM_SIZE
521         if parm is promoted.
522
523 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
524
525         PR tree-optimization/37375
526         * tree-scalar-evolution.c (scev_info_str): Add field instantiated_below.
527         (new_scev_info_str, eq_scev_info, find_var_scev_info,
528         set_scalar_evolution, get_scalar_evolution, get_instantiated_value,
529         set_instantiated_value): Pass instantiated_below.
530         (analyze_scalar_evolution_1, analyze_scalar_evolution): Update calls to
531         above functions.
532         (instantiate_scev_1, instantiate_scev): Pass a basic block above which
533         the definitions are not instantiated.
534
535         * tree-scalar-evolution.h (instantiate_scev): Update declaration.
536         (block_before_loop): New.
537         * tree-data-ref.c (dr_analyze_indices): Update uses of instantiate_scev.
538         * graphite.c (block_before_scop): New.
539         (loop_affine_expr, stmt_simple_for_scop_p, harmful_stmt_in_bb): Pass a
540         basic block, not a loop for determining the parameters.
541         (scopdet_edge_info, build_scops_1): Do not pass outermost loop in the
542         scop.
543         (idx_record_params, find_params_in_bb, find_scop_parameters,
544         build_loop_iteration_domains, add_conditions_to_domain): Update calls
545         to instantiate_scev.
546
547         * Makefile.in (cfgloopmanip.o): Add missing dependency on TREE_FLOW_H.
548
549 2008-09-09  Vladimir Makarov  <vmakarov@redhat.com>
550
551         PR rtl-opt/37333
552
553         * ira-build.c (ira_create_allocno): Setup frequency to 0.
554
555         * ira-color.c (update_conflict_hard_regno_costs): Remove assert.
556         Check zero freq and increase if necessary.
557
558 2008-09-09  Vladimir Makarov  <vmakarov@redhat.com>
559
560         * ira-conflicts.c (process_regs_for_copy): Check that the hard
561         regno is in the right range.  Add comments.
562
563 2008-09-09  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
564
565         * Makefile.in (mips-tfile.o-warn): Don't error out on mips-tfile.c
566         warnings.
567         * mips-tfile.c (copy_object): Cast alloca result to int *.
568         * mips-tdump.c (print_symbol): Cast xmalloc return values to
569         proper types.
570         Rename class to sclass.
571         (read_tfile): Cast read_seek return values to proper types.
572         Cast xcalloc return value to proper type.
573
574 2008-09-09  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
575
576         * config/sol2.h (REGISTER_TARGET_PRAGMAS): Move ...
577         * config/i386/sol2.h (REGISTER_SUBTARGET_PRAGMAS): ... here.
578         * config/sparc/sol2.h (REGISTER_TARGET_PRAGMAS): ... and here.
579
580 2008-09-09  Jan Hubicka  <jh@suse.cz>
581
582         * profile.c (is_edge_inconsistent): Add debug output; ignore
583         negative count on fake edges.
584         (is_inconsistent): Add debug output.
585
586 2008-09-09  Andrey Belevantsev  <abel@ispras.ru>
587
588         * haifa-sched.c (advance_one_cycle): Do not print '\n' before printing
589         dump message.
590         (choose_ready): When first insn is chosen from the ready list, also
591         dump it.
592
593 2008-09-09  Andrey Belevantsev  <abel@ispras.ru>
594
595         PR rtl-optimization/37360
596         * haifa-sched.c (max_issue): Do not assert that we never issue more
597         insns than issue_rate.  Add comment.
598
599 2008-09-09  Richard Guenther  <rguenther@suse.de>
600
601         * tree-cfg.c (verify_types_in_gimple_op): Remove.
602         (verify_types_in_gimple_call): Rename to ...
603         (verify_gimple_call): ... this.  Enhance.
604         (verify_types_in_gimple_cond): Remove.
605         (verify_gimple_comparison): New function ...
606         (verify_types_in_gimple_assign): ... split out from here.
607         (verify_types_in_gimple_return): Rename to ...
608         (verify_gimple_return): ... this.  Enhance.
609         (verify_types_in_gimple_switch): Rename to ...
610         (verify_gimple_switch): ... this.  Enhance.
611         (verify_gimple_goto): New function.
612         (verify_types_in_gimple_phi): Rename to ...
613         (verify_gimple_phi): ... this.  Enhance.
614         (verify_types_in_gimple_stmt): Adjust calls to helper functions.
615         Fold in single-statement cases from verify_types_in_gimple_seq_2.
616         (verify_types_in_gimple_seq_2): Remove cases handled in
617         verify_types_in_gimple_stmt.
618
619 2008-09-09  Bernd Schmidt  <bernd.schmidt@analog.com>
620
621         * config/bfin/bfin.c (n_regs_to_save): New static variable.
622         (push_multiple_operation, pop_multiple_operation): Set it.
623         (workaround_rts_anomaly): New function.
624         (workaround_speculation): New function, broken out of bfin_reorg.
625         (bfin_reorg): Call the new functions.
626
627 2008-09-09  Richard Guenther  <rguenther@suse.de>
628
629         PR middle-end/37354
630         PR middle-end/30165
631         * gimplify.c (gimplify_conversion): Change conversions of
632         non-register type to VIEW_CONVERT_EXPRs.
633         (gimplify_addr_expr): If we need to make the operand
634         addressable make sure to use a properly initialized
635         temporary for that so it gets a valid gimple store.
636
637 2008-09-09  Aldy Hernandez  <aldyh@redhat.com>
638
639         * function.h (struct function): Add function_start_locus.
640         * cfgexpand.c (gimple_expand_cfg): Use it.
641         * c-parser.c (c_parser_declaration_or_fndef): Set it.
642
643 2008-09-09  Richard Guenther  <rguenther@suse.de>
644
645         PR tree-optimization/37433
646         * tree-ssa-ccp.c (ccp_fold): Properly guard folding of
647         function calls.
648
649 2008-09-09  Richard Guenther  <rguenther@suse.de>
650
651         PR tree-optimization/37387
652         * tree-ssa-ifcombine.c (ifcombine_iforif): Convert the name
653         and bits to a common type.
654
655 2008-09-09  Nick Clifton  <nickc@redhat.com>
656
657         * config/v850/v850.md (return): Restore frame size restriction.
658
659 2008-09-09  Paolo Bonzini  <bonzini@gnu.org>
660
661         * c-common.c (c_expand_decl): Remove.
662         * c-common.h (anon_aggr_type_p): Remove prototype.
663         (DECL_ANON_UNION_ELEMS): Remove.
664         * c-objc-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
665         * c-decl.c (anon_aggr_type_p): Remove.
666         * langhooks-def.h (LANG_HOOKS_EXPAND_DECL): Remove.
667         (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_EXPAND_DECL.
668         * langhooks.h (struct lang_hooks): Remove expand_decl.
669         * langhooks.c (lhd_expand_decl): Remove.
670         * stmt.c (expand_anon_union_decl): Remove.
671         * tree.h (expand_anon_union_decl): Remove prototype.
672
673 2008-08-09  Andy Hutchinson  <hutchinsonandy@aim.com>
674
675         PR target/36609
676         * config/avr/avr.c (avr_reorg): Create RTL for reversed compare with
677         zero.
678         * config/avr/avr.md  (QISI) : Define mode iterator.
679         (negated_tst<mode>) : Redefine as split using mode macro.
680         (reversed_tstqi): Define insn as reversed compare with zero.
681         (reversed_tsthi): Ditto.
682         (reversed_tstsi): Ditto.
683
684 2008-09-08  Jakub Jelinek  <jakub@redhat.com>
685
686         PR middle-end/37393
687         * tree-inline.c (copy_bb): When replacing a gimple_call_va_arg_pack_p
688         call stmt by new_call, clear gimple_bb on stmt after gsi_replace.
689
690         PR middle-end/37414
691         * predict.c (optimize_function_for_size_p): Don't segfault if
692         FUN is NULL.
693         * fold-const.c (LOGICAL_OP_NON_SHORT_CIRCUIT, fold_truthop,
694         tree_swap_operands_p): Don't test cfun != NULL before calling
695         optimize_function_for_s*_p.
696
697 2008-09-08  Eric Botcazou  <ebotcazou@adacore.com>
698
699         * ira-color.c (ira_reuse_stack_slot): Set slot_num on success at the
700         end of the search.
701
702 2008-09-08  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
703
704         * crx/crx.h (IRA_COVER_CLASSES): Define.
705
706 2008-09-08  Jakub Jelinek  <jakub@redhat.com>
707
708         PR middle-end/37337
709         * tree-ssa-dom.c (optimize_stmt): Call maybe_clean_or_replace_eh_stmt
710         even when a stmt has been gimple_modified_p, but after fold_stmt is
711         not any longer.  Remove unneeded may_have_exposed_new_symbols
712         initializations.
713
714 2008-09-08  Richard Guenther  <rguenther@suse.de>
715
716         PR tree-optimization/37421
717         * tree-ssa-sccvn.c (visit_copy): Make sure to fully
718         valueize the RHS.
719
720 2008-09-08  Jakub Jelinek  <jakub@redhat.com>
721
722         PR middle-end/37415
723         * opts.c (common_handle_option): Handle OPT_ftree_store_ccp.
724
725 2008-09-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
726
727         PR driver/37409
728         * pa-hpux.h (LINK_SPEC): Strip -fwhole-program.
729         * pa-hpux10.h (LINK_SPEC): Likewise.
730         * pa-hpux11.h (LINK_SPEC): Likewise.
731
732 2008-09-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
733
734         * pa32-regs.h (IRA_COVER_CLASSES): Define.
735         * pa64-regs.h (IRA_COVER_CLASSES): Define.
736
737 2008-09-07  Helge Deller  <deller@gmx.de>
738
739         * pa/linux-atomic.c: New file.
740         * pa/t-linux (LIB2FUNCS_STATIC_EXTRA): Define.
741         * pa/t-linux64 (LIB2FUNCS_STATIC_EXTRA): Define.
742
743 2008-09-07  Richard Guenther  <rguenther@suse.de>
744             Ira Rosen  <irar@il.ibm.com>
745
746         PR tree-optimization/36630
747         * tree-vect-transform.c (vect_update_ivs_after_vectorizer):
748         Call STRIP_NOPS before calling evolution_part_in_loop_num.
749
750 2008-09-07  Dorit Nuzman  <dorit@il.ibm.com>
751             Ira Rosen  <irar@il.ibm.com>
752
753         PR tree-optimization/35642
754         * config/rs6000/altivec.md (mulv8hi3): Implement.
755
756 2008-09-06  Jeff Law <law@redhat.com>
757
758         * h8300/h8300.h (IRA_COVER_CLASSES): Define.
759
760 2008-09-06  Jan Hubicka  <jh@suse.cz>
761
762         PR tree-optimization/14703
763         * tree-ssa-live.c (remove_unused_scope_block_p): Remove ignored
764         declarations.
765         * passes.c (init_optimization_passes): Recompute inline parameters.
766
767 2008-09-06  Richard Sandiford  <rdsandiford@googlemail.com>
768
769         * config/mips/mips.c (mips_function_ok_for_sibcall): Check for
770         DECL being null.
771
772 2008-09-06  Richard Sandiford  <rdsandiford@goolemail.com>
773             Peter Fuerst  <post@pfrst.de>
774
775         * doc/invoke.texi: Document -mr10k-cache-barrier=.
776         * doc/extend.texi: Document __builtin_mips_cache.
777         * config/mips/mips-ftypes.def: Add a (VOID, SI, CVPOINTER) entry.
778         * config/mips/mips.opt (mr10k-cache-barrier=): New option.
779         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
780         __GCC_HAVE_BUILTIN_MIPS_CACHE.
781         (TARGET_CACHE_BUILTIN, ISA_HAS_CACHE): New macros.
782         * config/mips/mips.c (mips_r10k_cache_barrier_setting): New enum.
783         (set_push_mips_isas): New variable.
784         (mips_r10k_cache_barrier): New variable.
785         (cache): New availability predicate.
786         (mips_builtins): Add an entry for __builtin_mips_cache.
787         (mips_build_cvpointer_type): New function.
788         (MIPS_ATYPE_CVPOINTER): New macro.
789         (mips_prepare_builtin_arg): Only use the insn's mode if the rtx's
790         mode is VOIDmode.
791         (r10k_simplified_address_p, r10k_simplify_address)
792         (r10k_uncached_address_p, r10k_safe_address_p)
793         (r10k_needs_protection_p_1, r10k_needs_protection_p_store)
794         (r10k_needs_protection_p_call, r10k_needs_protection_p)
795         (r10k_insert_cache_barriers): New functions.
796         (mips_reorg_process_insns): Delete cache barriers after a
797         branch-likely instruction.
798         (mips_reorg): Call r10k_insert_cache_barriers.
799         (mips_handle_option): Handle OPT_mr10k_cache_barrier_.
800         * config/mips/mips.md (UNSPEC_MIPS_CACHE): New constant.
801         (UNSPEC_R10K_CACHE_BARRIER): Likewise.
802         (mips_cache, r10k_cache_barrier): New define_insns.
803
804 2008-09-06  Richard Sandiford  <rdsandiford@googlemail.com>
805
806         * ira-int.h (ira_zero_hard_reg_set, ira_one_hard_reg_set): Delete.
807         * ira-color.c (setup_allocno_left_conflicts_num): Use
808         hard_reg_set_equal_p instead of a comparison with
809         ira_zero_hard_reg_set.
810         * ira.c (setup_reg_subclasses): Likewise.
811         (setup_cover_and_important_classes): Likewise.
812         (setup_class_translate): Likewise.
813         (setup_reg_class_intersect_union): Likewise.
814         (ira_zero_hard_reg_set, ira_one_hard_reg_set): Delete.
815         (ira_init_once): Don't initialize them.
816
817 2008-09-05  Vladimir Makarov  <vmakarov@redhat.com>
818
819         * doc/tm.texi (IRA_COVER_CLASSES): Fix a typo.
820
821 2008-09-05  Vladimir Makarov  <vmakarov@redhat.com>
822
823         * ira-color.c (ira_fast_allocation): Permit global allocno allocation.
824
825 2008-09-05  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
826
827         Improved branch hints, safe hints, and scheduling.
828
829         * haifa-sched.c (sched_emit_insn) : Define.
830         * sched-int.h (sched_emit_insn) : Add prototype.
831         * doc/invoke.texi (-mdual-nops, -mhint-max-nops,
832         -mhint-max-distance -msafe-hints) : Document.
833         * config/spu/spu.c (spu_flag_var_tracking): New.
834         (TARGET_SCHED_INIT_GLOBAL, TARGET_SCHED_INIT,
835         TARGET_SCHED_REORDER, TARGET_SCHED_REORDER2,
836         TARGET_ASM_FILE_START): Define.
837         (TARGET_SCHED_ADJUST_PRIORITY): Remove.
838         (STOP_HINT_P, HINTED_P, SCHED_ON_EVEN_P): Define.
839         (spu_emit_branch_hint): Add blocks argument.
840         (insert_branch_hints, insert_nops): Remove.
841         (pad_bb, insert_hbrp_for_ilb_runout, insert_hbrp, in_spu_reorg,
842         uses_ls_unit, spu_sched_init_global, spu_sched_init,
843         spu_sched_reorder, asm_file_start): New functions.
844         (clock_var, spu_sched_length, pipe0_clock,
845         pipe1_clock, prev_clock_var, prev_priority,
846         spu_ls_first, prev_ls_clock): New static variables.
847         * config/spu/spu.h (TARGET_DEFAULT): Add MASK_SAFE_HINTS.
848         * config/spu.md (iprefetch): Add operand, make it clobber MEM.
849         (nopn_nv): Add a non-volatile version of nop.
850         * config/spu/spu.opt (-mdual-nops, -mhint-max-nops,
851         -mhint-max-distance, -msafe-hints): New options.
852
853 2008-09-05  Janis Johnson  <janis187@us.ibm.com>
854             Samuel Tardieu  <sam@rfc1149.net>
855
856         * opts.c (decode_options): Combine nested if statements.
857
858         PR target/37283
859         * opts.c (decode_options): Handle more relationships among
860         unit-at-a-time, toplevel-reorder, and section-anchors.
861
862 2008-09-05  David Daney  <ddaney@avtrex.com>
863
864         * doc/install.texi (--enable-reduced-reflection): Document new option.
865
866 2008-09-05  Bob Wilson  <bob.wilson@acm.org>
867
868         * config/xtensa/predicates.md (nonimmed_operand, mem_operand): Use
869         constantpool_mem_p.
870         (constantpool_operand): New.
871         (move_operand): Disallow sub-word modes for the constant pool.
872         * config/xtensa/xtensa.c (TARGET_SECONDARY_RELOAD): Define.
873         (xtensa_secondary_reload_class): Replace with....
874         (xtensa_secondary_reload): this function.  Remove SIGN_EXTEND check.
875         Set icode for sub-word reloads from the constant pool.
876         * config/xtensa/xtensa.h (SECONDARY_INPUT_RELOAD_CLASS): Delete.
877         (SECONDARY_OUTPUT_RELOAD_CLASS): Delete.
878         * config/xtensa/xtensa.md (reload<mode>_literal): New.
879         * config/xtensa/xtensa-protos.h: Update prototypes.
880
881 2008-09-05  Joseph Myers  <joseph@codesourcery.com>
882
883         * config/mips/mips.h (enum reg_class): Add FRAME_REGS.
884         (REG_CLASS_NAMES): Update.
885         (REG_CLASS_CONTENTS): Update.
886         * config/mips/mips.c (mips_regno_to_class): Use FRAME_REGS instead
887         of ALL_REGS for regs 77 and 78.
888         * function.c (instantiate_virtual_regs_in_insn): Assert that
889         return value of simplify_gen_subreg is not NULL.
890
891 2008-09-05  Paolo Bonzini  <bonzini@gnu.org>
892
893         * emit-rtl.c (gen_rtvec): Rewrite not using gen_rtvec_v.
894         (gen_rtvec_v): Fix coding standards.
895
896 2008-09-04  Jan Hubicka  <jh@suse.cz>
897
898         * i386.c (decide_alg): Be more conservative about optimizing for size.
899
900 2008-09-04  Ian Lance Taylor  <iant@google.com>
901
902         * varasm.c (narrowing_initializer_constant_valid_p): New
903         static function.
904         (initializer_constant_valid_p): Call it.
905
906 2008-09-04  Jeff Law  <law@redhat.com>
907
908         * fold-const.c (native_encode_real): Fix computation of WORDS.
909         (native_interpret_real): Likewise.
910
911 2008-09-04  Janis Johnson  <janis187@us.ibm.com>
912
913         * config/rs6000/t-rs6000: Remove target gt-rs6000.h.
914
915 2008-09-04  Vladimir Makarov  <vmakarov@redhat.com>
916
917         * ira-conflicts.c (process_regs_for_copy): Check insn to check
918         that the cost is already taken into account in ira-costs.c
919
920         * ira-int.h (ira_debug_copy, ira_debug_copies): New.
921
922         * ira-build.c (print_copy, print_copies, ira_debug_copy,
923         ira_debug_copies): New.
924         (ira_bulid): Call print_copies.
925
926         * doc/tm.texi (IRA_COVER_CLASSES): Fix the description.
927
928 2008-09-04  Samuel Tardieu  <sam@rfc1149.net>
929
930         PR target/32783
931         * config/rs6000/rs6000.c (optimization_options): Remove check of
932         flag_toplevel_order.
933
934 2008-09-04  Adam Nemet  <anemet@caviumnetworks.com>
935
936         * config/mips/mips.h (ISA_HAS_SEQ_SNE): New macro.
937         * config/mips/mips.c (mips_expand_scc): Also expand seq and sne if
938         second operand is a reg_imm10_operand.
939         * config/mips/mips.md (*seq_<GPR:mode><GPR2:mode>_seq,
940         *sne_<GPR:mode><GPR2:mode>_sne): New patterns.
941         (*seq_<GPR:mode><GPR2:mode>): Rename to
942         *seq_zero_<GPR:mode><GPR2:mode>.  Don't match if
943         ISA_HAS_SEQ_SNE.
944         (*seq_<GPR:mode><GPR2:mode>_mips16): Rename to
945         *seq_zero_<GPR:mode><GPR2:mode>_mip16.  Don't match if
946         ISA_HAS_SEQ_SNE.
947         (*sne_<GPR:mode><GPR2:mode>): Rename to
948         *sne_zero_<GPR:mode><GPR2:mode>.  Don't match if
949         ISA_HAS_SEQ_SNE.
950
951 2008-09-04  Adam Nemet  <anemet@caviumnetworks.com>
952
953         * config/mips/mips.h (ISA_HAS_EXTS): New macro.
954         * config/mips/mips.md (*ashr_trunc<mode>): Name the pattern
955         combining an arithmetic right shift by more than 31 and a
956         trunction.  Don't match for out-of-range shift amounts.  Set
957         attribute mode to <MODE>.
958         (*lshr32_trunc<mode>): Name the pattern combining a logical right
959         shift by 32 and and a truncation.  Set attribute mode to <MODE>.
960         (*<optab>_trunc<mode>_exts): New pattern for truncated right
961         shifts by less than 32.
962         (extv): Change predicate on first operand to accept registers.
963         Change predicate of the other operands from immediate_operand to
964         const_int_operand.  Expand exts when source is a register.
965         (extzv): Change predicate of the constant operands from
966         immediate_operand to const_int_operand.
967         (extzv<mode>): Change predicate of the constant operands from
968         immediate_operand to const_int_operand and no constraint. Also
969         remove mode.
970         (*extzv_trunc<mode>_exts): New pattern.
971
972 2008-09-04  Adam Nemet  <anemet@caviumnetworks.com>
973
974         * config/mips/mips.h (ISA_HAS_CINS): New macro.
975         * config/mips/mips-protos.h (mask_low_and_shift_p,
976         mask_low_and_shift_len): Declare.
977         * config/mips/mips.c (mask_low_and_shift_p,
978         mask_low_and_shift_len): New functions.
979         (mips_print_operand): Handle new operand prefix "m".
980         * config/mips/mips.md (*cins<mode>): New pattern.
981
982 2008-09-04  Bernd Schmidt  <bernd.schmidt@analog.com>
983
984         * config/bfin/bfin.c (gen_one_bundle): Don't create new nops when
985         optimizing for size.
986
987 2008-09-04  Richard Sandiford  <rdsandiford@googlemail.com>
988
989         * df-scan.c (df_get_entry_block_def_set): Add STACK_POINTER_REGNUM
990         regardless of epilogue_completed.
991
992 2008-09-04  Vladimir Makarov  <vmakarov@redhat.com>
993
994         PR middle-end/37359
995         * ira-lives.c (process_bb_node_lives): Check setjmp.
996
997 2008-09-04  Richard Sandiford  <rdsandiford@googlemail.com>
998
999         PR middle-end/37243
1000         * ira-build.c (form_loop_tree): Reverse BB walk.
1001         (create_bb_allocnos): Likewise.
1002         * ira-lives.c (make_regno_born_and_dead, regs_set): Delete.
1003         (mark_reg_store): Rename to...
1004         (mark_ref_live): ...this and take a df_ref argument instead of
1005         note_stores arguments.  Assert that we have a register.
1006         (mark_reg_clobber): Delete.
1007         (def_conflicts_with_inputs_p): New function.
1008         (mark_reg_conflicts): Delete.
1009         (mark_reg_death): Rename to...
1010         (mark_ref_dead): ...this and take a df_ref argument instead of
1011         a register.  Assert that we have a register.
1012         (process_bb_node_lives): Hoist frequency calculation out of
1013         instruction walk.  Convert from a forwards scan to a backwards scan.
1014         Use DF_REF_USES and DF_REF_DEFS instead of register notes and
1015         note_stores.  Remove EH_RETURN_DATA_REGNO and regs_set handling.
1016         (create_allocno_live_ranges): Don't create regs_set.
1017
1018 2008-09-04  Ian Lance Taylor  <iant@google.com>
1019
1020         * rtl.h (LABEL_REF_NONLOCAL_P): Don't check for REG_LABEL_OPERAND
1021         or REG_LABEL_TARGET.
1022         * calls.c (emit_library_call_value_1): Use MEM_P rather than
1023         comparing MODE with MEM.
1024         * gimple.c (gimple_build_predict): Cast END_PREDICTORS before
1025         comparing with GF_PREDICT_TAKEN.
1026         (gimple_get_lhs): Change code to enum gimple_code.
1027         (gimple_set_lhs): Likewise.
1028         * ifcvt.c (noce_process_if_block): Correct GET_MODE to GET_CODE.
1029         * omp-low.c (find_omp_clause): Change kind parameter to enum
1030         omp_clause_code.
1031         * tree-flow.h (find_omp_clause): Update declaration.
1032         * regrename.c (clear_dead_regs): Change kind parameter to enum
1033         reg_note.
1034         * reload1.c (eliminate_regs_1): Use REG_NOTE_KIND rather than
1035         GET_MODE.
1036         * see.c (see_get_extension_data): Change return type to enum
1037         entry_type.  Change UNKNOWN to NOT_RELEVANT, SIGN_EXTEND to
1038         SIGNED_EXTENDED_DEF, ZERO_EXTEND to ZERO_EXTENDED_DEF.
1039         (see_gen_normalized_extension): Change extension_code parameter to
1040         enum entry_type.
1041         (see_seek_pre_extension_expr): Change extension_code to enum
1042         entry_type.
1043         (see_merge_one_def_extension): Likewise.
1044         (see_handle_relevant_defs): Likewise.
1045         (see_handle_relevant_uses): Likewise.
1046         (see_analyze_one_def): Likewise.
1047         * tree-cfg.c (need_fake_edge_p): Compare gimple code with
1048         GIMPLE_ASM rather than ASM_EXPR.
1049         * tree-ssa-alias.c (is_escape_site): Compare gimple code with
1050         GIMPLE_RETURN rather than RETURN_EXPR.
1051         * tree-ssa-ccp.c (likely_value): Change code to enum gimple_code.
1052         (evaluate_stmt): Likewise.
1053         * tree-vect-analyze.c (vect_analyze_operations): Change relevance
1054         to enum vect_relevant.
1055         (vect_mark_stmts_to_be_vectorized): Change assertion to not
1056         compare gimple codes with tree codes.
1057
1058 2008-09-04  Paul Brook  <paul@codesourcery.com>
1059
1060         * config/arm/arm.c (arm_size_rtx_costs): Call cost function.
1061
1062 2008-09-04  Bernd Schmidt  <bernd.schmidt@analog.com>
1063
1064         * config/bfin/bfin.c (bfin_function_ok_for_sibcall): Restore a null
1065         pointer check lost in the recent no-unit-at-a-time patch.
1066
1067 2008-09-04  Jan Hubicka  <jh@suse.cz>
1068
1069         PR middle-end/37343
1070         * tree-switch-conversion.c (check_final_bb): Accept only IP
1071         invariants.
1072
1073 2008-09-04  Jan Hubicka  <jh@suse.cz>
1074
1075         * tree-vrp.c (vrp_evaluate_conditional_warnv_with_ops_using_ranges):
1076         Break out from ...
1077         (vrp_evaluate_conditional_warnv_with_ops): ... this one.  Add
1078         using_ranges argument.
1079         (vrp_evaluate_conditional): Avoid bogus warning for type range.
1080         (vrp_visit_cond_stmt): Update call of
1081         vrp_evaluate_conditional_warnv_with_ops
1082
1083 2008-09-04  Jan Hubicka  <jh@suse.cz>
1084
1085         PR tree-optimization/37345
1086         PR tree-optimization/37358
1087         PR tree-optimization/37357
1088         * tree.c (build_function_type_skip_args): Build distinct type copy;
1089         set TYPE_CONTEXT.
1090         (build_function_decl_skip_args): Set type of new decl not orig decl;
1091         clear DECL_VINDEX for methods turned into functions.
1092
1093 2008-09-04  Nick Clifton  <nickc@redhat.com>
1094
1095         * configure.ac (HAVE_GAS_LCOMM_WITH_ALIGNMENT): New assembler check.
1096         * configure: Regenerate.
1097         * config.in: Regenerate.
1098         * config/i386/bsd.h (ASM_OUTPUT_ALIGNED_LOCAL): Use .lcomm with an
1099         alignment field, if it is supported.
1100
1101 2008-09-04  Kai Tietz  <kai.tietz@onevision.com>
1102
1103         * config/i386/t-mingw32 (SHLIB_LC): Change order of import
1104         libraries.
1105
1106 2008-09-03  David Edelsohn  <edelsohn@gnu.org>
1107
1108         * config/rs6000/rs6000.c (processor_target_table): Do not
1109         enable VMX for POWER6.
1110
1111 2008-09-03  Anton Blanchard  <anton@samba.org>
1112
1113         * config/rs6000/rs6000.c (rs6000_split_lock_test_and_set): Do not
1114         emit memory barrier before operation.
1115
1116 2008-09-03  John David Anglin  <dave.anglin@nrc.cnrc.gc.ca>
1117
1118         PR testsuite/37325
1119         * config/pa/pa64-hpux.h (ASM_OUTPUT_EXTERNAL_REAL): Call
1120         default_elf_asm_output_external.
1121
1122 2008-09-03  Jeff Law  <law@redhat.com>
1123
1124         * h8300.c (expand_a_shift): Avoid invalid RTL sharing.
1125
1126 2008-09-03  Richard Henderson  <rth@redhat.com>
1127
1128         * config/alpha/alpha.c (alpha_split_lock_test_and_set): Move
1129         memory barrier to below the test-and-set.
1130         (alpha_split_lock_test_and_set_12): Likewise.
1131
1132 2008-09-03  Vladimir Makarov  <vmakarov@redhat.com>
1133
1134         PR rtl-opt/37243
1135
1136         * ira-int.h (ira_loop_tree_node): Rename mentioned_allocnos to
1137         all_allocnos.
1138
1139         * ira-color.c (print_loop_title): Use all_allocnos.
1140         (color_pass): Ditto.  Don't add border_allocnos.  Check that
1141         subloop allocno in the correspdoning bitmap all_allocnos.
1142
1143         * ira-emit.c (change_loop): Use all_allocnos.
1144
1145         * ira-build.c (create_loop_tree_nodes, finish_loop_tree_node):
1146         Ditto.
1147         (ira_create_allocno): Set up all_allocnos bit for the created
1148         allocno.
1149         (create_cap_allocno): Remove setting mentioned_allocnos.
1150         (create_insn_allocnos): Ditto.
1151         (remove_unnecessary_allocnos): Use all_allocnos.
1152         (check_allocno_creation): Check that allocnos are in the
1153         corresponding bitmap all_allocnos.
1154
1155 2008-09-03  Vladimir Makarov  <vmakarov@redhat.com>
1156
1157         PR rtl-opt/37243
1158
1159         * ira-conflicts.c (REG_SUBREG_P, go_through_subreg): New.
1160         (process_regs_for_copy): Process subregs.  Refine check when cost
1161         is taken into account in ira-costs.c.
1162         (process_reg_shuffles): Use REG_SUBREG_P.
1163         (add_insn_allocno_copies): Ditto.  Ignore modes.
1164
1165         * ira-color.c (conflict_allocno_vec): New.
1166         (COST_HOP_DIVISOR): New macro.
1167         (update_copy_costs_1): Use it.
1168         (update_conflict_hard_regno_costs): New function.
1169         (assign_hard_reg): Use it.
1170         (ira_color): Allocate and free conflict_allocno_vec.
1171
1172 2008-09-03  Vladimir Makarov  <vmakarov@redhat.com>
1173
1174         PR rtl-opt/37296
1175
1176         * ira-int.h (ira_sort_insn_chain): Remove.
1177
1178         * ira.c (basic_block_order_nums, chain_insn_order,
1179         chain_freq_compare, chain_bb_compare, ira_sort_insn_chain): Remove.
1180         (ira): Don't call ira_sort_insn_chain.
1181
1182         * reload1.c (reload): Don't call ira_sort_insn_chain.
1183
1184 2008-09-03  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1185
1186         PR middle-end/37293
1187         * cgraphunit.c (update_call_expr): Remove eh regions from statements
1188         which become non throw.
1189         (cgraph_function_versioning): Also clear DECL_WEAK.  Call
1190         update_call_expr after updating the flags on the decl.
1191
1192 2008-09-03  Jan Hubicka  <jh@suse.cz>
1193
1194         PR tree-optimization/37315
1195         * cgraph.c (cgraph_create_edge): Use gimple_has_body_p.
1196         * cgraphunit.c (verify_cgraph_node): drop gimple_body check.
1197         (cgraph_analyze_functions): Use node->analyzed
1198         (cgraph_mark_functions_to_output): Likewise.
1199         (cgraph_expand_function): All functions can be released after
1200         expanding.
1201         (cgraph_optimize): Use gimple_has_body_p.
1202         * ipa-inline.c (cgraph_clone_inlined_nodes): Use analyzed flag.
1203         (cgraph_decide_inlining_incrementally): Likewise.
1204         (inline_transform): Inline transform.
1205         * tree-inline.c (initialize_cfun): Do now shallow copy structure;
1206         copy fields needed.
1207         (inlinable_function_p): Drop gimple_body check.
1208         (expand_call_inline): Use gimple_has_body_p.
1209         * gimple.c (gimple_has_body_p): New.
1210         * gimple.h (gimple_has_body_p): Add prototype.
1211         * tree-cfg.c (execute_build_cfg): Remove gimple_body.
1212         (dump_function_to_file): Use gimple_has_body_p check.
1213
1214 2008-09-03  Jakub Jelinek  <jakub@redhat.com>
1215
1216         PR c++/37346
1217         * gimple.h (gimple_has_substatements): GIMPLE_OMP_CRITICAL has
1218         substatements.
1219         * tree-inline.c (remap_gimple_stmt): Handle GIMPLE_OMP_CRITICAL.
1220
1221 2008-09-03  Bernd Schmidt  <bernd.schmidt@analog.com>
1222
1223         From Michael Frysinger  <michael.frysinger@analog.com>
1224         * config/bfin/bfin.c (bfin_cpus[]): Add 0.1 for bf522, bf523, bf524,
1225         bf525, bf526, bf527, bf542, bf544, bf547, bf548, and bf549.  Add 0.2
1226         for bf538.
1227
1228 2008-09-03  Hari Sandanagobalane  <hariharan@picochip.com>
1229
1230         Add picoChip port.
1231         * doc/extend.texi: Document picoChip builtin functions.
1232         * doc/invoke.texi: Document picoChip options.
1233         * doc/contrib.texi: Add picoChip contribution.
1234         * doc/md.texi: Document picoChip constraints.
1235         * config.gcc: Add picochip-*-*.
1236         * config/picochip/: Add new port.
1237
1238 2008-09-03  Richard Guenther  <rguenther@suse.de>
1239
1240         PR tree-optimization/37328
1241         * tree-sra.c (sra_build_assignment): Gimplify properly.
1242         (generate_copy_inout): Take the correct stmt as definition,
1243         remove bogus assert.
1244
1245 2008-09-03  Bernd Schmidt  <bernd.schmidt@analog.com>
1246
1247         * config/bfin/bfin.c (bfin_expand_prologue): Honour no_stack_limit
1248         attributes.
1249
1250         From Michael Frysinger  <michael.frysinger@analog.com>
1251         * config/bfin/bfin.c (bfin_handle_option): Remove BF561 warning.
1252
1253 2008-09-03 Danny Smith  <dannysmith@usrs.sourceforge.net>
1254
1255         * gthr-win32.h (CONST_CAST2): Really make sure CONST_CAST2 is defined.
1256         (__gthread_setspecific): Revert 2008-08-31 change to
1257         __GTHREAD_HIDE_W32API case.  Apply it to !__GTHREAD_HIDE_W32API case.
1258
1259 2008-09-02  Aldy Hernandez  <aldyh@redhat.com>
1260
1261         * diagnostic.c (error_at): New.
1262         * toplev.h (error_at): New prototype.
1263         * c-typeck.c (build_array_ref): Call error_at instead of error.
1264         Pass location to pedwarn.
1265
1266 2008-09-02  Adam Nemet  <anemet@caviumnetworks.com>
1267
1268         * sel-sched.c (sel_hard_regno_rename_ok): Mark arguments unused.
1269
1270 2008-09-02  Jakub Jelinek  <jakub@redhat.com>
1271
1272         * dwarf2out.c (tree_add_const_value_attribute): Only handle
1273         VAR_DECL and CONST_DECL.
1274
1275 2008-09-02  H.J. Lu  <hongjiu.lu@intel.com>
1276             Jakub Jelinek  <jakub@redhat.com>
1277
1278         * config/i386/i386.c (X86_64_VARARGS_SIZE): Removed.
1279         (setup_incoming_varargs_64): Assume cum != NULL. Set/check
1280         ix86_varargs_gpr_size and ix86_varargs_fpr_size.  Use
1281         ix86_varargs_gpr_size instead of X86_64_REGPARM_MAX.
1282         Don't set ix86_save_varrargs_registers.
1283         (ix86_setup_incoming_varargs): Assume cum != NULL.
1284         (ix86_va_start): Check ix86_varargs_gpr_size and
1285         ix86_varargs_fpr_size instead of cfun->va_list_gpr_size and
1286         cfun->va_list_fpr_size, respectively.  Subtract 8*X86_64_REGPARM_MAX
1287         from frame pointer if ix86_varargs_gpr_size == 0.
1288         (ix86_compute_frame_layout): Updated.
1289         * config/i386/i386.h (ix86_save_varrargs_registers): Removed.
1290         (ix86_varargs_gpr_size): Define.
1291         (ix86_varargs_fpr_size): Likewise.
1292         (machine_function): Remove save_varrargs_registers.
1293         Add varargs_gpr_size and varargs_fpr_size.
1294
1295 2008-09-02  Jakub Jelinek  <jakub@redhat.com>
1296
1297         * config/alpha/alpha.c (va_list_skip_additions,
1298         alpha_stdarg_optimize_hook, alpha_gimplify_va_arg_1): Tuplify.
1299         (alpha_gimplify_va_arg): Call unshare_expr on second use of
1300         offset_field.
1301
1302         PR tree-optimization/36766
1303         * tree-cfg.c (gimple_purge_all_dead_eh_edges): Do nothing
1304         for already removed basic blocks.
1305
1306         PR target/36332
1307         * real.c (real_maxval): Clear a lower bit to make real_maxval
1308         match get_max_float for IBM long double format.
1309
1310 2008-09-02  Andreas Schwab  <schwab@suse.de>
1311
1312         * configure.ac: Use m4_quote to quote the expansion of m4_do.
1313         * configure: Regenerate.
1314
1315 2008-09-02  Richard Sandiford  <rdsandiford@googlemail.com>
1316
1317         * simplify-rtx.c (simplify_binary_operation_1): Check for CONST,
1318         SYMBOL_REF and LABEL_REF when applying plus_constant, instead of
1319         checking for a non-VOID CONSTANT_P.
1320
1321 2008-09-02  Jan Hubicka  <jh@suse.cz>
1322
1323         * predict.c (pass_strip_predict_hints): Avoid bugs dump file.
1324         * expmed.c (expand_divmod): Fix test of smod_pow2_cheap and
1325         sdiv_pow2_cheap
1326
1327 2008-09-02  H.J. Lu  <hongjiu.lu@intel.com>
1328
1329         * expr.c (emit_group_store): Don't assert stack temp mode size.
1330
1331 2008-09-02  Sebastian Pop  <sebastian.pop@amd.com>
1332             Tobias Grosser  <grosser@fim.uni-passau.de>
1333             Jan Sjodin  <jan.sjodin@amd.com>
1334             Harsha Jagasia  <harsha.jagasia@amd.com>
1335             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
1336             Konrad Trifunovic  <konrad.trifunovic@inria.fr>
1337             Adrien Eliche  <aeliche@isty.uvsq.fr>
1338
1339         Merge from graphite branch.
1340         * graphite.c: New.
1341         * graphite.h: New.
1342         * tree-loop-linear.c (perfect_loop_nest_depth): Export.
1343         * doc/invoke.texi (-floop-block, -floop-interchange,
1344         -floop-strip-mine): Document new flags.
1345         * tree-into-ssa.c (gimple_vec): Moved...
1346         * tree-loop-distribution.c (rdg_component): Moved...
1347         * cfgloopmanip.c: Include tree-flow.h.
1348         (update_dominators_in_loop): New.
1349         (create_empty_if_region_on_edge): New.
1350         (create_empty_loop_on_edge): New.
1351         (loopify): Use update_dominators_in_loop.
1352         * tree-pass.h (pass_graphite_transforms): Declared.
1353         * configure: Regenerate.
1354         * tree-phinodes.c (make_phi_node): Export.
1355         (add_phi_node_to_bb): New, split from create_phi_node.
1356         * tree-chrec.c (for_each_scev_op): New.
1357         * tree-chrec.h (for_each_scev_op): Declared.
1358         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
1359         (remove_statement): Call get_phi_with_result.
1360         * config.in (HAVE_cloog): Undef.
1361         * gdbinit.in (pgg): New.
1362         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
1363         * tree-ssa-loop.c (graphite_transforms): New.
1364         (gate_graphite_transforms): New.
1365         (pass_graphite_transforms): New.
1366         * configure.ac (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC,
1367         HAVE_cloog): Defined.
1368         * tree-vectorizer.c (rename_variables_in_bb): Export.
1369         * tree-data-ref.c (dr_may_alias_p): Export.
1370         (stmt_simple_memref_p): New.
1371         (find_data_references_in_stmt): Export.
1372         (find_data_references_in_loop): Export.
1373         (create_rdg_edge_for_ddr): Initialize RDGE_RELATION.
1374         (create_rdg_edges_for_scalar): Initialize RDGE_RELATION.
1375         (create_rdg_vertices): Export.
1376         (build_empty_rdg): New.
1377         (build_rdg): Call build_empty_rdg.  Free dependence_relations.
1378         * tree-data-ref.h (rdg_component): ... here.
1379         (scop_p): New.
1380         (struct data_reference): Add a field scop.
1381         (DR_SCOP): New.
1382         (find_data_references_in_loop): Declared.
1383         (find_data_references_in_stmt): Declared.
1384         (create_rdg_vertices): Declared.
1385         (dr_may_alias_p): Declared.
1386         (stmt_simple_memref_p): Declared.
1387         (struct rdg_edge): Add a field ddr_p relation.
1388         (build_empty_rdg): Declared.
1389         * lambda.h (lambda_matrix): Declare a VEC of.
1390         (find_induction_var_from_exit_cond): Declared.
1391         (lambda_vector_compare): New.
1392         * common.opt (fgraphite, floop-strip-mine,
1393         floop-interchange, floop-block): New flags.
1394         * lambda-code.c (find_induction_var_from_exit_cond): Export.
1395         * cfgloop.c (is_loop_exit): New.
1396         * cfgloop.h (is_loop_exit): Declared.
1397         (create_empty_if_region_on_edge): Declared.
1398         (create_empty_loop_on_edge): Declared.
1399         * tree-flow.h (add_phi_node_to_bb): Declared.
1400         (make_phi_node): Declared.
1401         (rename_variables_in_bb): Declared.
1402         (perfect_loop_nest_depth): Declared.
1403         (graphite_transform_loops): Declared.
1404         * Makefile.in (cfgloopmanip.o): Depend on TREE_FLOW_H.
1405         (graphite.o-warn): Add -Wno-error.
1406         (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): Declared.
1407         (LIBS): Add GMPLIBS, CLOOGLIBS, PPLLIBS.
1408         (INCLUDES): Add PPLINC, CLOOGINC.
1409         (OBJS-common): Add graphite.o.
1410         (graphite.o): Add rule.
1411         * gimple.h (gimple_vec): ... here.
1412         * tree-cfg.c (print_loops): Start printing at ENTRY_BLOCK_PTR.
1413         * passes.c (init_optimization_passes): Schedule
1414         pass_graphite_transforms.
1415
1416 2008-09-02  Samuel Tardieu  <sam@rfc1149.net>
1417
1418         PR target/37283
1419         * opts.c (decode_options): Move processing of -fno-unit-at-a-time
1420         and -fno-toplevel-reorder after handle_options.
1421
1422 2008-09-02  Paul Brook  <paul@codesourcery.com>
1423
1424         * config/arm/arm.c (arm_tune_cortex_a9): Define.
1425         (arm_override_options): Set arm_tune_cortex_a9.
1426         (arm_rtx_costs_1): Make register shifts more expensive on Cortex-A9.
1427         (arm_issue_rate): Handle cortexa9.
1428         * config/arm/arm.h (arm_tune_cortex_a9): Declare.
1429         * config/arm/arm-cores.def: Add cortex-a9.
1430         * config/arm/arm-tune.md: Regenerate.
1431         * config/arm/arm.md: Include cortex-a9.md.
1432         (generic_sched, generic_vfp): Add cortexa9.
1433         * config/arm/cortex-a9.md: New file.
1434
1435 2008-09-02  Richard Guenther  <rguenther@suse.de>
1436
1437         PR tree-optimization/37327
1438         * tree-vrp.c (register_new_assert_for): Make sure to not have
1439         TREE_OVERFLOW set on the bound.
1440
1441 2008-09-02  Alexander Monakov  <amonakov@ispras.ru>
1442
1443         Fixed typo in date of the 2008-09-01 MOVE_RATIO commit.
1444
1445         * config/ia64/ia64.opt (msched-ar-data-spec): Default to 1.
1446         * config/ia64/ia64.c (ia64_set_sched_flags): Always initialize
1447         spec_info->mask.
1448
1449 2008-09-02  Victor Kaplansky  <victork@il.ibm.com>
1450
1451         * gcc/config/spu/spu.md (divdf3): Removed.
1452
1453 2008-09-02  Jakub Jelinek  <jakub@redhat.com>
1454
1455         PR tree-optimization/37095
1456         * cgraph.c (cgraph_node): When creating new cgraph node after
1457         assembler_name_hash has been populated, record it in the hash
1458         table.
1459
1460 2008-09-01  Paul Brook  <paul@codesourcery.com>
1461
1462         * doc/invoke.texi: Document -mword-relocations.
1463         * config/arm/uclinux-elf.h (TARGET_DEFAULT_WORD_RELOCATIONS): Define.
1464         * config/arm/symbian.h (TARGET_DEFAULT_WORD_RELOCATIONS): Define.
1465         * config/arm/vxworks.h (TARGET_DEFAULT_WORD_RELOCATIONS): Define.
1466         * config/arm/arm.c (arm_split_constant): Use arm_emit_movpair.
1467         (arm_rtx_costs_1, arm_size_rtx_costs): Handle HIGH and LO_SUM.
1468         (arm_emit_movpair): New function.
1469         (arm_print_operand <c>): Handle sybolic addresses.
1470         * config/arm/arm.h (TARGET_USE_MOVT): Define.
1471         (TARGET_DEFAULT_WORD_RELOCATIONS): Define.
1472         * config/arm/arm-protos.h (arm_emit_movpair): Add prototype.
1473         * config/arm/arm.opt: Add -mword-relocations.
1474         * config/arm/arm.md (movsi): Use arm_emit_movpair.
1475         (arm_movt, arm_movw): New.
1476
1477 2008-09-01  Paul Brook  <paul@codesourcery.com>
1478
1479         * config/arm/arm.c (arm_override_options): Set arm_abi earlier.
1480         Allow Interworking on ARMv4 EABI based targets.
1481         * config/arm/bpabi.h (TARGET_FIX_V4BX_SPEC): Define.
1482         (SUBTARGET_EXTRA_ASM_SPEC, LINK_SPEC): Add TARGET_FIX_V4BX_SPEC.
1483
1484 2008-09-01  Paul Brook  <paul@codesourcery.com>
1485
1486         * config/arm/thumb2.md (thumb2_negscc): Match the correct operand for
1487         optimized LT0 test.  Remove optimization for GT.
1488
1489 2008-09-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1490
1491         * pa64-hpux.h (LIB_SPEC): Link against librt when building static
1492         openmp applications.
1493         * pa-hpux11.h (LIB_SPEC): Likewise.
1494
1495         * ira.c (setup_eliminable_regset): Only declare i if ELIMINABLE_REGS is
1496         defined.
1497
1498 2008-09-01  Jan Hubicka  <jh@suse.cz>
1499
1500         * predict.c (maybe_hot_count_p, maybe_hot_edge_p): When profile is
1501         present, use only counts; when guessed use only frequencies.
1502         (estimate_bb_frequencies): Use function_frequency.
1503         * profile.c (compute_branch_probabilities): Exit early when
1504         profile reading failed. Set profile_status.
1505         (branch_prob): Do not set profile_status.
1506
1507 2008-09-01  Aldy Hernandez  <aldyh@redhat.com>
1508
1509         * tree.c (protected_set_expr_location): New.
1510         * tree.h (protected_set_expr_location): New prototype.
1511         * c-tree.h (build_array_ref): Add argument.
1512         (parser_build_unary_op): Same.
1513         * c-typeck.c (build_indirect_ref): Handle new location argument.
1514         (build_array_ref): Same.
1515         (parser_build_unary_op): Same.
1516         * gimplify.c (gimplify_asm_expr): Set input_location before calling
1517         error.
1518         * c-omp.c (c_finish_omp_atomic): Pass location when calling
1519         build_indirect_ref.
1520         * c-common.c (finish_label_address_expr): Handle new location argument.
1521         * c-common.h (build_indirect_ref): Add argument.
1522         (finish_label_address_expr): Same.
1523         * c-parser.c (c_parser_unary_expression): Pass location to build
1524         functions.
1525         (c_parser_postfix_expression): Same.
1526
1527 2008-09-01  Paul Brook  <paul@codesourcery.com>
1528
1529         * config/arm/arm.md: Include cortex-r4f.md.
1530         (attr fpu): Update type list.
1531         (attr type): Add fcpys, ffariths, ffarithd, fadds, faddd, fconsts,
1532         fconstd, fcmps and fcmpd.
1533         (attr tune_cortexr4): Define.
1534         (attr generic_sched, attr generic_vfp): Use tune_cortexr4.
1535         * config/arm/vfp.md: Document fcpys, ffariths, ffarithd, fadds, faddd,
1536         fconsts, fconstd, fcmps and fcmpd.  Use them in insn patterns.
1537         * config/arm/arm.c (arm_issue_rate): Add cortexr4f.
1538         * config/arm/arm1020e.md (v10_ffarith, v10_farith): Use new insn types.
1539         * config/arm/cortex-a8-neon.md (cortex_a8_vfp_add_sub,
1540         cortex_a8_vfp_farith: Ditto.
1541         * config/arm/vfp11.md (vfp_ffarith, vfp_farith): Ditto.
1542         * config/arm/cortex-r4.md: Use tune_cortexr4.
1543         * config/arm/cortex-r4f.md: New file.
1544
1545 2008-09-01  Richard Guenther  <rguenther@suse.de>
1546
1547         PR tree-optimization/37305
1548         * tree-ssa-ccp.c (ccp_fold): Do not set TREE_OVERFLOW on
1549         the result of constant conversions.
1550         (fold_gimple_assign): Likewise.
1551
1552 2008-09-01  Andrey Belevantsev  <abel@ispras.ru>
1553
1554         * sel-sched-ir.c (cmp_v_in_regset_pool): Surround with
1555         #ifdef ENABLE_CHECKING.
1556
1557 2008-09-01  Andrey Belevantsev  <abel@ispras.ru>
1558
1559         * sel-sched-dump.c: Surround with #ifdef INSN_SCHEDULING.
1560         * sched-int.h (print_insn, print_pattern, print_value): Declare also
1561         when !INSN_SCHEDULING.
1562
1563 2008-09-01  Andreas Schwab  <schwab@suse.de>
1564
1565         * config/ia64/ia64.c (TARGET_ADDRESS_COST): Update.
1566
1567 2008-09-01  Paul Brook  <paul@codesourcery.com>
1568
1569         * config/arm/arm.c (arm_no_early_mul_dep): Handle multiply-subtract.
1570
1571 2008-09-01  Jan Hubicka  <jh@suse.cz>
1572
1573         * config/spu/spu.c (spu_expand_block_move) Update call of MOVE_RATIO.
1574
1575         * expr.c (MOVE_BY_PIECES_P, CLEAR_BY_PIECES_P, SET_BY_PIECES_P):
1576         Pass speed operand.
1577         * expr.h (MOVE_RATIO, CLEAR_RATIO, SET_RATIO): Update.
1578         * gimplify.c (gimplify_init_constructor): Add speed operand.
1579         * tree-sra.c (decide_block_copy): Likewise.
1580         * tree-inline.c (estimate_move_cost): Likewise.
1581         * config/alpha/alpha.h (MOVE_RATIO): Update.
1582         * config/frv/frv.c (MOVE_RATIO): Update.
1583         * config/spu/spu.h (MOVE_RATIO): Update.
1584         * config/sparc/sparc.h (MOVE_RATIO): Update.
1585         * config/i386/i386.h (MOVE_RATIO, CLEAR_RATIO): Update.
1586         * config/m68hc11/m68hc11.h (MOVE_RATIO): Update.
1587         * config/cris/cris.h (MOVE_RATIO): Update.
1588         * config/mn10300/mn10300.h (MOVE_RATIO): Update.
1589         * config/arm/arm.h (MOVE_RATIO): Update.
1590         * config/pa/pa.md: Update uses of MOVE_RATIO
1591         * config/pa/pa.h (MOVE_RATIO): Update.
1592         * config/mips/mips.h (MOVE_RATIO, MOVE_BY_PIECES,
1593         CLEAR_RATIO, SET_RATIO): Update.
1594         * config/h8300/h8300.h (MOVE_RATIO): Update.
1595         * config/v850/v850.h (MOVE_RATIO): Update.
1596         * config/bfin/bfin.h (MOVE_RATIO): Update.
1597
1598 2008-08-31  Andrey Belevantsev  <abel@ispras.ru>
1599             Dmitry Melnik  <dm@ispras.ru>
1600             Dmitry Zhurikhin  <zhur@ispras.ru>
1601             Alexander Monakov  <amonakov@ispras.ru>
1602             Maxim Kuvyrkov  <maxim@codesourcery.com>
1603
1604         * sel-sched.h, sel-sched-dump.h, sel-sched-ir.h, sel-sched.c,
1605         sel-sched-dump.c, sel-sched-ir.c: New files.
1606         * Makefile.in (OBJS-common): Add selective scheduling object
1607         files.
1608         (sel-sched.o, sel-sched-dump.o, sel-sched-ir.o): New entries.
1609         (SEL_SCHED_IR_H, SEL_SCHED_DUMP_H): New entries.
1610         (sched-vis.o): Add dependency on $(INSN_ATTR_H).
1611         * cfghooks.h (get_cfg_hooks, set_cfg_hooks): New prototypes.
1612         * cfghooks.c (get_cfg_hooks, set_cfg_hooks): New functions.
1613         (make_forwarder_block): Update loop latch if we have redirected
1614         the loop latch edge.
1615         * cfgloop.c (get_loop_body_in_custom_order): New function.
1616         * cfgloop.h (LOOPS_HAVE_FALLTHRU_PREHEADERS): New enum field.
1617         (CP_FALLTHRU_PREHEADERS): Likewise.
1618         (get_loop_body_in_custom_order): Declare.
1619         * cfgloopmanip.c (has_preds_from_loop): New.
1620         (create_preheader): Honor CP_FALLTHRU_PREHEADERS.
1621         Assert that the preheader edge will be fall thru when it is set.
1622         * common.opt (fsel-sched-bookkeeping, fsel-sched-pipelining,
1623         fsel-sched-pipelining-outer-loops, fsel-sched-renaming,
1624         fsel-sched-substitution, fselective-scheduling): New flags.
1625         * cse.c (hash_rtx_cb): New.
1626         (hash_rtx): Use it.
1627         * dbgcnt.def (sel_sched_cnt, sel_sched_region_cnt,
1628         sel_sched_insn_cnt): New counters.
1629         * final.c (compute_alignments): Export.  Free dominance
1630         info after loop_optimizer_finalize.
1631         * genattr.c (main): Output maximal_insn_latency prototype.
1632         * genautomata.c (output_default_latencies): New.
1633         Factor its code from ...
1634         (output_internal_insn_latency_func): ... here.
1635         (output_internal_maximal_insn_latency_func): New.
1636         (output_maximal_insn_latency_func): New.
1637         * hard-reg-set.h (UHOST_BITS_PER_WIDE_INT): Define unconditionally.
1638         (struct hard_reg_set_iterator): New.
1639         (hard_reg_set_iter_init, hard_reg_set_iter_set,
1640         hard_reg_set_iter_next): New functions.
1641         (EXECUTE_IF_SET_IN_HARD_REG_SET): New macro.
1642         * lists.c (remove_free_INSN_LIST_node,
1643         remove_free_EXPR_LIST_node): New functions.
1644         * loop-init.c (loop_optimizer_init): When
1645         LOOPS_HAVE_FALLTHRU_PREHEADERS, set CP_FALLTHRU_PREHEADERS when
1646         calling create_preheaders.
1647         (loop_optimizer_finalize): Do not verify flow info after reload.
1648         * recog.c (validate_replace_rtx_1): New parameter simplify.
1649         Default it to true.  Update all uses.  Factor out simplifying
1650         code to ...
1651         (simplify_while_replacing): ... this new function.
1652         (validate_replace_rtx_part,
1653         validate_replace_rtx_part_nosimplify): New.
1654         * recog.h (validate_replace_rtx_part,
1655         validate_replace_rtx_part_nosimplify): Declare.
1656         * rtl.c (rtx_equal_p_cb): New.
1657         (rtx_equal_p): Use it.
1658         * rtl.h (rtx_equal_p_cb, hash_rtx_cb): Declare.
1659         (remove_free_INSN_LIST_NODE, remove_free_EXPR_LIST_node,
1660         debug_bb_n_slim, debug_bb_slim,    print_rtl_slim): Likewise.
1661         * vecprim.h: Add a vector type for unsigned int.
1662         * haifa-sched.c: Include vecprim.h and cfgloop.h.
1663         (issue_rate, sched_verbose_param, note_list, dfa_state_size,
1664         ready_try, cycle_issued_insns, spec_info): Make global.
1665         (readyp): Initialize.
1666         (dfa_lookahead): New global variable.
1667         (old_max_uid, old_last_basic_block): Remove.
1668         (h_i_d): Make it a vector.
1669         (INSN_TICK, INTER_TICK, QUEUE_INDEX, INSN_COST): Make them work
1670         through HID macro.
1671         (after_recovery, adding_bb_to_current_region_p):
1672         New variables to handle correct insertion of the recovery code.
1673         (struct ready_list): Move declaration to sched-int.h.
1674         (rgn_n_insns): Removed.
1675         (rtx_vec_t): Move to sched-int.h.
1676         (find_insn_reg_weight): Remove.
1677         (find_insn_reg_weight1): Rename to find_insn_reg_weight.
1678         (haifa_init_h_i_d, haifa_finish_h_i_d):
1679         New functions to initialize / finalize haifa instruction data.
1680         (extend_h_i_d, init_h_i_d): Rewrite.
1681         (unlink_other_notes): Move logic to add_to_note_list.  Handle
1682         selective scheduler.
1683         (ready_lastpos, ready_element, ready_sort, reemit_notes,
1684         find_fallthru_edge): Make global, remove static prototypes.
1685         (max_issue): Make global.  Add privileged_n and state parameters.  Use
1686         them.
1687         (extend_global, extend_all): Removed.
1688         (init_before_recovery): Add new param.  Fix the handling of the case
1689         when we insert a recovery code before the EXIT which has a predecessor
1690         with a fallthrough edge to it.
1691         (create_recovery_block): Make global.  Rename to
1692         sched_create_recovery_block.  Update.
1693         (change_pattern): Rename to sched_change_pattern.  Make global.
1694         (speculate_insn): Rename to sched_speculate_insn.  Make global.
1695         Split haifa-specific functionality into ...
1696         (haifa_change_pattern): New static function.
1697         (sched_extend_bb): New static function.
1698         (sched_init_bbs): New function.
1699         (current_sched_info): Change type to struct haifa_sched_info.
1700         (insn_cost): Adjust for selective scheduling.
1701         (dep_cost_1): New function.  Move logic from ...
1702         (dep_cost): ... here.
1703         (dep_cost): Use dep_cost_1.
1704         (contributes_to_priority_p): Use sched_deps_info instead of
1705         current_sched_info.
1706         (priority): Adjust to work with selective scheduling.  Process the
1707         corner case when all dependencies don't contribute to priority.
1708         (rank_for_schedule): Use ds_weak instead of dep_weak.
1709         (advance_state): New function.  Move logic from ...
1710         (advance_one_cycle): ... here.
1711         (add_to_note_list, concat_note_lists): New functions.
1712         (rm_other_notes): Make static.  Adjust for selective scheduling.
1713         (remove_notes, restore_other_notes): New functions.
1714         (move_insn): Add two arguments.  Update assert.  Don't call
1715         reemit_notes.
1716         (choose_ready): Remove lookahead variable, use dfa_lookahead.
1717         Remove more_issue, max_points.  Move the code to initialize
1718         max_lookahead_tries to max_issue.
1719         (schedule_block): Remove rgn_n_insns1 parameter.  Don't allocate
1720         ready.  Adjust use of move_insn.  Call restore_other_notes.
1721         (luid): Remove.
1722         (sched_init, sched_finish): Move Haifa-specific initialization/
1723         finalization to ...
1724         (haifa_sched_init, haifa_sched_finish): ... respectively.
1725         New functions.
1726         (setup_sched_dump): New function.
1727         (haifa_init_only_bb): New static function.
1728         (haifa_speculate_insn): New static function.
1729         (try_ready): Use haifa_* instead of speculate_insn and
1730         change_pattern.
1731         (extend_ready, extend_all): Remove.
1732         (sched_extend_ready_list, sched_finish_ready_list): New functions.
1733         (create_check_block_twin, add_to_speculative_block): Use
1734         haifa_insns_init instead of extend_global.  Update to use new
1735         initialization functions.  Change parameter.  Factor out code from
1736         create_check_block_twin to ...
1737         (sched_create_recovery_edges) ... this new function.
1738         (add_block): Remove.
1739         (sched_scan_info): New.
1740         (extend_bb): Use sched_scan_info.
1741         (init_bb, extend_insn, init_insn, init_insns_in_bb, sched_scan): New
1742         static functions for walking through scheduling region.
1743         (sched_luids): New vector variable to replace uid_to_luid.
1744         (luids_extend_insn): New function.
1745         (sched_max_luid): New variable.
1746         (luids_init_insn): New function.
1747         (sched_init_luids, sched_finish_luids): New functions.
1748         (insn_luid): New debug function.
1749         (sched_extend_target): New function.
1750         (haifa_init_insn): New static function.
1751         (sched_init_only_bb): New hook.
1752         (sched_split_block): New hook.
1753         (sched_split_block_1): New function.
1754         (sched_create_empty_bb): New hook.
1755         (sched_create_empty_bb_1): New function.
1756         (common_sched_info, ready): New global variables.
1757         (current_sched_info_var): Remove.
1758         (move_block_after_check): Use common_sched_info.
1759         (haifa_luid_for_non_insn): New static function.
1760         (init_before_recovery): Use haifa_init_only_bb instead of
1761         add_block.
1762         (increase_insn_priority): New.
1763         * modulo-sched.c: (issue_rate): Remove static declaration.
1764         (sms_sched_info): Change type to haifa_sched_info.
1765         (sms_sched_deps_info, sms_common_sched_info): New variables.
1766         (setup_sched_infos): New.
1767         (sms_schedule): Initialize them.  Call haifa_sched_init/finish.
1768         Do not call regstat_free_calls_crossed.
1769         (sms_print_insn): Use const_rtx.
1770         * params.def (PARAM_MAX_PIPELINE_REGION_BLOCKS,
1771         PARAM_MAX_PIPELINE_REGION_INSNS, PARAM_SELSCHED_MAX_LOOKAHEAD,
1772         PARAM_SELSCHED_MAX_SCHED_TIMES, PARAM_SELSCHED_INSNS_TO_RENAME,
1773         PARAM_SCHED_MEM_TRUE_DEP_COST): New.
1774         * sched-deps.c (sched_deps_info): New.  Update all relevant uses of
1775         current_sched_info to use it.
1776         (enum reg_pending_barrier_mode): Move to sched-int.h.
1777         (h_d_i_d): New variable. Initialize to NULL.
1778         ({true, output, anti, spec, forward}_dependency_cache): Initialize
1779         to NULL.
1780         (estimate_dep_weak): Remove static declaration.
1781         (sched_has_condition_p): New function.  Adjust users of
1782         sched_get_condition to use it instead.
1783         (conditions_mutex_p): Add arguments indicating which conditions are
1784         reversed.  Use them.
1785         (sched_get_condition_with_rev): Rename from sched_get_condition.  Add
1786         argument to indicate whether returned condition is reversed.  Do not
1787         generate new rtx when condition should be reversed; indicate it by
1788         setting new argument instead.
1789         (add_dependence_list_and_free): Add deps parameter.
1790         Update all users.  Do not free dependence list when
1791         deps context is readonly.
1792         (add_insn_mem_dependence, flush_pending_lists): Adjust for readonly
1793         contexts.
1794         (remove_from_dependence_list, remove_from_both_dependence_lists): New.
1795         (remove_from_deps): New. Use the above functions.
1796         (cur_insn, can_start_lhs_rhs_p): New static variables.
1797         (add_or_update_back_dep_1): Initialize present_dep_type.
1798         (haifa_start_insn, haifa_finish_insn, haifa_note_reg_set,
1799         haifa_note_reg_clobber, haifa_note_reg_use, haifa_note_mem_dep,
1800         haifa_note_dep): New functions implementing dependence hooks for
1801         the Haifa scheduler.
1802         (note_reg_use, note_reg_set, note_reg_clobber, note_mem_dep,
1803         note_dep): New functions.
1804         (ds_to_dt, extend_deps_reg_info, maybe_extend_reg_info_p): New
1805         functions.
1806         (init_deps): Initialize last_reg_pending_barrier and deps->readonly.
1807         (free_deps): Initialize deps->reg_last.
1808         (sched_analyze_reg, sched_analyze_1, sched_analyze_2,
1809         sched_analyze_insn): Update to use dependency hooks infrastructure
1810         and readonly contexts.
1811         (deps_analyze_insn): New function.  Move part of logic from ...
1812         (sched_analyze): ... here.  Also move some logic to ...
1813         (deps_start_bb): ... here.  New function.
1814         (add_forw_dep, delete_forw_dep): Guard use of INSN_DEP_COUNT with
1815         sel_sched_p.
1816         (sched_deps_init): New function.  Move code from ...
1817         (init_dependency_caches): ... here.  Remove.
1818         (init_deps_data_vector): New.
1819         (sched_deps_finish): New function.  Move code from ...
1820         (free_dependency_caches): ... here.  Remove.
1821         (init_deps_global, finish_deps_global): Adjust for use with
1822         selective scheduling.
1823         (get_dep_weak): Move logic to ...
1824         (get_dep_weak_1): New function.
1825         (ds_merge): Move logic to ...
1826         (ds_merge_1): New static function.
1827         (ds_full_merge, ds_max_merge, ds_get_speculation_types): New functions.
1828         (ds_get_max_dep_weak): New function.
1829         * sched-ebb.c (sched_n_insns): Rename to sched_rgn_n_insns.
1830         (n_insns): Rename to rgn_n_insns.
1831         (debug_ebb_dependencies): New function.
1832         (init_ready_list): Use it.
1833         (begin_schedule_ready): Use sched_init_only_bb.
1834         (ebb_print_insn): Indicate when an insn starts a new cycle.
1835         (contributes_to_priority, compute_jump_reg_dependencies,
1836         add_remove_insn, fix_recovery_cfg): Add ebb_ prefix to function names.
1837         (add_block1): Remove to ebb_add_block.
1838         (ebb_sched_deps_info, ebb_common_sched_info): New variables.
1839         (schedule_ebb): Initialize them.  Use remove_notes instead of
1840         rm_other_notes.  Use haifa_local_init/finish.
1841         (schedule_ebbs): Use haifa_sched_init/finish.
1842         * sched-int.h: Include vecprim.h, remove rtl.h.
1843         (struct ready_list): Delete declaration.
1844         (sched_verbose_param, enum sched_pass_id_t,
1845         bb_vec_t, insn_vec_t, rtx_vec_t): New.
1846         (struct sched_scan_info_def): New structure.
1847         (sched_scan_info, sched_scan, sched_init_bbs,
1848         sched_init_luids, sched_finish_luids, sched_extend_target,
1849         haifa_init_h_i_d, haifa_finish_h_i_d): Declare.
1850         (struct common_sched_info_def): New.
1851         (common_sched_info, haifa_common_sched_info,
1852         sched_emulate_haifa_p): Declare.
1853         (sel_sched_p): New.
1854         (sched_luids): Declare.
1855         (INSN_LUID, LUID_BY_UID, SET_INSN_LUID): Declare.
1856         (sched_max_luid, insn_luid): Declare.
1857         (note_list, remove_notes, restore_other_notes, bb_note): Declare.
1858         (sched_insns_init, sched_insns_finish, xrecalloc, reemit_notes,
1859         print_insn, print_pattern, print_value, haifa_classify_insn,
1860         sel_find_rgns, sel_mark_hard_insn, dfa_state_size, advance_state,
1861         setup_sched_dump, sched_init, sched_finish,
1862         sel_insn_is_speculation_check): Export.
1863         (struct ready_list): Move from haifa-sched.c.
1864         (ready_try, ready, max_issue): Export.
1865         (ebb_compute_jump_reg_dependencies, find_fallthru_edge,
1866         sched_init_only_bb, sched_split_block, sched_split_block_1,
1867         sched_create_empty_bb, sched_create_empty_bb_1,
1868         sched_create_recovery_block, sched_create_recovery_edges): Export.
1869         (enum reg_pending_barrier_mode): Export.
1870         (struct deps): New fields `last_reg_pending_barrier' and `readonly'.
1871         (deps_t): New.
1872         (struct sched_info): Rename to haifa_sched_info.  Use const_rtx for
1873         print_insn field.  Move add_block and fix_recovery_cfg to
1874         common_sched_info_def.  Move compute_jump_reg_dependencies,
1875         use_cselib  ...
1876         (struct sched_deps_info_def): ... this new structure.
1877         (sched_deps_info): Declare.
1878         (struct spec_info_def): Remove weakness_cutoff, add
1879         data_weakness_cutoff and control_weakness_cutoff.
1880         (spec_info): Declare.
1881         (struct _haifa_deps_insn_data): Split from haifa_insn_data.  Add
1882         dep_count field.
1883         (struct haifa_insn_data): Rename to struct _haifa_insn_data.
1884         (haifa_insn_data_def, haifa_insn_data_t): New typedefs.
1885         (current_sched_info): Change type to struct haifa_sched_info.
1886         (haifa_deps_insn_data_def, haifa_deps_insn_data_t): New typedefs.
1887         (h_d_i_d): New variable.
1888         (HDID): New accessor macro.
1889         (h_i_d): Change type to VEC (haifa_insn_data_def, heap) *.
1890         (HID): New accessor macro.  Rewrite h_i_d accessor macros through HID
1891         and HDID.
1892         (IS_SPECULATION_CHECK_P): Update for selective scheduler.
1893         (enum SCHED_FLAGS): Update for selective scheduler.
1894         (enum SPEC_SCHED_FLAGS): New flag SEL_SCHED_SPEC_DONT_CHECK_CONTROL.
1895         (init_dependency_caches, free_dependency_caches): Delete declarations.
1896         (deps_analyze_insn, remove_from_deps, get_dep_weak_1,
1897         estimate_dep_weak, ds_full_merge, ds_max_merge, ds_weak,
1898         ds_get_speculation_types, ds_get_max_dep_weak, sched_deps_init,
1899         sched_deps_finish, haifa_note_reg_set, haifa_note_reg_use,
1900         haifa_note_reg_clobber, maybe_extend_reg_info_p, deps_start_bb,
1901         ds_to_dt): Export.
1902         (rm_other_notes): Delete declaration.
1903         (schedule_block): Remove one argument.
1904         (cycle_issued_insns, issue_rate, dfa_lookahead, ready_sort,
1905         ready_element, ready_lastpos, sched_extend_ready_list,
1906         sched_finish_ready_list, sched_change_pattern, sched_speculate_insn,
1907         concat_note_lists): Export.
1908         (struct region): Move from sched-rgn.h.
1909         (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn,
1910         RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB,
1911         BLOCK_TO_BB, CONTAINING_RGN): Export.
1912         (ebb_head, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB, INSN_BB): Likewise.
1913         (current_nr_blocks, current_blocks, target_bb): Likewise.
1914         (dep_cost_1, sched_is_disabled_for_current_region_p, sched_rgn_init,
1915         sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies,
1916         sched_rgn_local_init, extend_regions,
1917         rgn_make_new_region_out_of_new_block, compute_priorities,
1918         debug_rgn_dependencies, free_rgn_deps, contributes_to_priority,
1919         extend_rgns, deps_join rgn_setup_common_sched_info,
1920         rgn_setup_sched_infos, debug_regions, debug_region, dump_region_dot,
1921         dump_region_dot_file, haifa_sched_init, haifa_sched_finish): Export.
1922         (get_rgn_sched_max_insns_priority, sel_add_to_insn_priority,
1923         increase_insn_priority): Likewise.
1924         * sched-rgn.c: Include sel-sched.h.
1925         (ref_counts): New static variable.  Use it ...
1926         (INSN_REF_COUNT): ... here.  Rewrite and move closer to uses.
1927         (FED_BY_SPEC_LOAD, IS_LOAD_INSN): Rewrite to use HID accessor macro.
1928         (sched_is_disabled_for_current_region_p): Delete static declaration.
1929         (struct region): Move to sched-int.h.
1930         (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn,
1931         ebb_head): Define and initialize.
1932         (RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB,
1933         BLOCK_TO_BB, CONTAINING_RGN, debug_regions, extend_regions,
1934         BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB): Move to
1935         sched-int.h.
1936         (find_single_block_region): Add new argument to indicate that EBB
1937         regions should be constructed.
1938         (debug_live): Delete declaration.
1939         (current_nr_blocks, current_blocks, target_bb):
1940         Remove static qualifiers.
1941         (compute_dom_prob_ps, check_live, update_live, set_spec_fed): Delete
1942         declaration.
1943         (init_regions): Delete declaration.
1944         (debug_region, bb_in_region_p, dump_region_dot_file, dump_region_dot,
1945         rgn_estimate_number_of_insns): New.
1946         (too_large): Use estimate_number_of_insns.
1947         (haifa_find_rgns): New. Move the code from ...
1948         (find_rgns): ... here.  Call either sel_find_rgns or haifa_find_rgns.
1949         (free_trg_info): New.
1950         (compute_trg_info): Allocate candidate tables here instead of ...
1951         (init_ready_list): ... here.
1952         (rgn_print_insn): Use const_rtx.
1953         (contributes_to_priority, extend_regions): Delete static declaration.
1954         (add_remove_insn, fix_recovery_cfg): Add rgn_ to function names.
1955         (add_block1): Rename to rgn_add_block.
1956         (debug_rgn_dependencies): Delete static qualifier.
1957         (new_ready): Use sched_deps_info.  Simplify.
1958         (rgn_common_sched_info, rgn_const_sched_deps_info,
1959         rgn_const_sel_sched_deps_info, rgn_sched_deps_info, rgn_sched_info):
1960         New.
1961         (region_sched_info): Rename to rgn_const_sched_info.
1962         (deps_join): New, extracted from ...
1963         (propagate_deps): ... here.
1964         (compute_block_dependences, debug_dependencies): Update for selective
1965         scheduling.
1966         (free_rgn_deps, compute_priorities): New functions.
1967         (sched_rgn_init, sched_rgn_finish, rgn_setup_region,
1968         sched_rgn_compute_dependencies): New functions.
1969         (schedule_region): Use them.
1970         (sched_rgn_local_init, sched_rgn_local_free, sched_rgn_local_finish,
1971         rgn_setup_common_sched_info, rgn_setup_sched_infos):
1972         New functions.
1973         (schedule_insns): Call new functions that were split out.
1974         (rgn_make_new_region_out_of_new_block): New.
1975         (get_rgn_sched_max_insns_priority): New.
1976         (rest_of_handle_sched, rest_of_handle_sched2): Call selective
1977         scheduling when appropriate.
1978         * sched-vis.c: Include insn-attr.h.
1979         (print_value, print_pattern): Make global.
1980         (print_rtl_slim, debug_bb_slim, debug_bb_n_slim): New functions.
1981         * target-def.h (TARGET_SCHED_ADJUST_COST_2,
1982         TARGET_SCHED_ALLOC_SCHED_CONTEXT, TARGET_SCHED_INIT_SCHED_CONTEXT,
1983         TARGET_SCHED_SET_SCHED_CONTEXT, TARGET_SCHED_CLEAR_SCHED_CONTEXT,
1984         TARGET_SCHED_FREE_SCHED_CONTEXT, TARGET_SCHED_GET_INSN_CHECKED_DS,
1985         TARGET_SCHED_GET_INSN_SPEC_DS, TARGET_SCHED_SKIP_RTX_P): New target
1986         hooks.  Initialize them to 0.
1987         (TARGET_SCHED_GEN_CHECK): Rename to TARGET_SCHED_GEN_SPEC_CHECK.
1988         * target.h (struct gcc_target): Add them.  Rename gen_check field to
1989         gen_spec_check.
1990         * flags.h (sel_sched_switch_set): Declare.
1991         * opts.c (sel_sched_switch_set): New variable.
1992         (decode_options): Unset flag_sel_sched_pipelining_outer_loops if
1993         pipelining is disabled from command line.
1994         (common_handle_option): Record whether selective scheduling is
1995         requested from command line.
1996         * doc/invoke.texi: Document new flags and parameters.
1997         * doc/tm.texi: Document new target hooks.
1998         * config/ia64/ia64.c (TARGET_SCHED_GEN_SPEC_CHECK): Define to
1999         ia64_gen_check.
2000         (dfa_state_size): Do not declare locally.
2001         * config/ia64/ia64.opt (msched-ar-data-spec): Default to 0.
2002         * config/rs6000/rs6000.c (rs6000_init_sched_context,
2003         rs6000_alloc_sched_context, rs6000_set_sched_context,
2004         rs6000_free_sched_context): New functions.
2005         (struct _rs6000_sched_context): New.
2006         (rs6000_sched_reorder2): Do not modify INSN_PRIORITY for selective
2007         scheduling.
2008         (rs6000_sched_finish): Do not run for selective scheduling.
2009
2010 2008-08-31  Jan Hubicka  <jh@suse.cz>
2011
2012         * frv.c (frv_rtx_costs): Update forward declaration.
2013         * spu.c (spu_rtx_costs): Likewise.
2014         * pdp11.c: Include df.h
2015         (pdp11_output_function_epilogue): Use df_set_regs_ever_live.
2016         * m68hc11.c (m68hc11_gen_highpart): Fix call of gen_rtx_SUBREG.
2017         (m68hc11_rtx_costs_1): Fix call of rtx_cost.
2018         * iq2000.c (iq2000_address_cost): Add speed argument.
2019         (iq2000_rtx_costs): Likewise.
2020         * mn10300.c (mn10300_address_cost_1): Remove speed argument;
2021         update call of mn10300_address_cost.
2022         * mcore.c: Include df.h
2023         (mcore_rtx_costs): Update prototype.
2024         * score3.c: Include df.h
2025         (score3_rtx_costs): Remove speed argument.
2026         * score7.c: Include df.h
2027         (score7_address_cost): Remove speed argument.
2028         * score-protos.h (score_address_cost): Update prototype.
2029         * score.c: Include df.h
2030         (score_rtx_costs): Update call of costs functions.
2031         * v850.c (v850_rtx_costs): Add bool argument.
2032
2033 2008-08-31  Hans-Peter Nilsson  <hp@axis.com>
2034
2035         * config/cris/cris.c (cris_rtx_costs): Correct call to rtx_costs.
2036
2037 2008-08-31  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
2038
2039         * gthr-win32.h (__gthread_setspecific): Use CONST_CAST2.
2040         * config/i386/gthr-win32.c (__gthread_setspecific): Same.
2041
2042 2008-08-31  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
2043
2044         * mkmap-flat.awk: Add option pe_dll.
2045         * config/i386/t-cygming (SHLIB_LINK): Support building libgcc_s.
2046         * config/i386/t-cygwin (SHLIB_LC): Add.
2047         * config/i386/t-mingw32 (SHLIB_LC): Add.
2048         * config/i386/mingw32.h (SHARED_LIBGCC_UNDEFS_SPEC): New.
2049         (SUBTARGET_EXTRA_SPECS): Use SHARED_LIBGCC_UNDEFS_SPEC.
2050         (LINK_SPEC): Support libgcc_s.
2051         (LIBGCC_SPEC): Support libgcc_s.
2052         (LIBGCC_SONAME): New.
2053
2054 2008-08-31  Jan Hubicka  <jh@suse.cz>
2055
2056         * predict.c (maybe_hot_bb_p, maybe_hot_edge_p): Previous commit
2057         mistakely had old version of patch.
2058
2059         * ipa-cp.c (ipcp_need_original_clone_p): Remove.
2060         (ipcp_estimate_growth): New.
2061         (ipcp_insert_stage): Use ipcp_estimate_growth.
2062         * profile.c (branch_prob): When reading failed, do not consider
2063         profile as read.
2064
2065 2008-08-31  Jan Hubicka  <jh@suse.cz>
2066
2067         * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Check that
2068         loop is optimized for speed.
2069
2070 2008-08-31  Richard Guenther  <rguenther@suse.de>
2071
2072         PR middle-end/37289
2073         * fold-const.c (fold_binary): Retain conversions in folding
2074         ~A + 1 to -A.
2075
2076 2008-08-31  Jan Hubicka  <jh@suse.cz>
2077
2078         * postreload-gcse.c (eliminate_partially_redundant_loads):
2079         Use optimize_bb_for_size_p.
2080         * predict.c (maybe_hot_frequency_p): Make inline.
2081         (maybe_hot_count_p): Break out from ...
2082         (maybe_hot_bb_p): ... this one.
2083         (maybe_hot_edge_p): Simplify.
2084         * basic-block.h (probably_cold_bb_p): Remove.
2085
2086 2008-08-31  Jakub Jelinek  <jakub@redhat.com>
2087
2088         PR target/37168
2089         * config/rs6000/rs6000-protos.h (const_vector_elt_as_int): Add
2090         prototype.
2091         * config/rs6000/rs6000.c (const_vector_elt_as_int): No longer static.
2092         * config/rs6000/altivec.md (easy_vector_constant_add_self splitter):
2093         Also split V4SFmode.
2094         * config/rs6000/predicates.md (easy_vector_constant_add_self): Handle
2095         vector float modes.
2096
2097 2008-08-31  Jan Hubicka  <jh@suse.cz>
2098
2099         * predict.c (PROB_VERY_LIKELY): Make small enough so things
2100         become cold.
2101         * predict.def (PRED_NORETURN_CALL, PRED_COLD_CALL): Use it.
2102
2103 2008-08-31  Jakub Jelinek  <jakub@redhat.com>
2104
2105         PR debug/37287
2106         * dwarf2out.c (gen_namespace_die): For DECL_EXTERNAL modules don't
2107         add source coords.
2108
2109         * dwarf2out.c (native_encode_initializer): Subtract min_index for
2110         non-range array index.  Handle VIEW_CONVERT_EXPR and NON_LVALUE_EXPR.
2111
2112 2008-08-31  Jan Hubicka  <jh@suse.cz>
2113
2114         * sparc.h (BRANCH_COST): Fix macro definition.
2115         * avr.c (avr_operand_rtx_cost): Add speed argument.
2116         (avr_rtx_costs): Update calls of avr_operand_rtx_cost.
2117
2118 2008-08-31  Richard Guenther  <rguenther@suse.de>
2119
2120         * tree-cfg.c (verify_types_in_gimple_assign): Dump mismatched
2121         types instead of operands.  Re-instantiate verifying of
2122         binary expression operands.
2123
2124 2008-08-30  Jan Hubicka  <jh@suse.cz>
2125
2126         * fwprop.c (should_replace_address): Add speed attribute.
2127         (PR_OPTIMIZE_FOR_SPEED): New flag.
2128         (propagate_rtx_1): Use it.
2129         (propagate_rtx): Set it.
2130         (try_fwprop_subst): Update call of rtx_costs.
2131         (forward_propagate_and_simplify): LIkewise.
2132         * hooks.c (hook_int_rtx_bool_0): New
2133         (hook_bool_rtx_int_int_intp_false): Replace by ...
2134         (hook_bool_rtx_int_int_intp_bool_false): .. thisone.
2135         * hooks.h (hook_int_rtx_bool_0): New
2136         (hook_bool_rtx_int_int_intp_false): Replace by ...
2137         (hook_bool_rtx_int_int_intp_bool_false): .. thisone.
2138         * optabs.c (avoid_expensive_constant): UPdate call of rtx_cost.
2139         (prepare_cmp_insn): UPdate call of rtx_cost.
2140         * postreload.c (reload_cse_simplify_set): Update call of rtx_cost.
2141         (reload_cse_simplify_operands): Update call of rtx_cost.
2142         (reload_cse_move2add): call of rtx_cost.
2143         * target.h (struct gcc_target): Update rtx_costs and address_costs.
2144         * rtlanal.c (rtx_cost): Add speed argument.
2145         (address_cost): Add speed argument
2146         (default_address_cost): Likewise.
2147         (insn_rtx_cost): Likewise.
2148         * cfgloopanal.c (seq_cost): Add speed argument.
2149         (target_reg_cost, target_spill_cost): Turn to array.
2150         (init_set_costs): Update for speed.
2151         (estimate_reg_pressure_cost): Add speed argument.
2152         * auto-inc-dec.c (attempt_change): Update call of rtx_cost.
2153         * dojump.c (prefer_and_bit_test): UPdate call of rtx_cost.
2154         * tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed.
2155         (seq_cost): Add speed argument.
2156         (computation_cost): Add speed arugment.
2157         (add_cost, multiply_by_const, get_address_cost): add speed argument.
2158         (force_expr_to_var_cost): Update for profile info.
2159         (force_var_cost): Likewise.
2160         (split_address_cost): Likewise.
2161         (ptr_difference_cost): Likewise.
2162         (difference_cost): Likewise.
2163         (get_computation_cost_at): Likewise.
2164         (determine_iv_cost): Likewise.
2165         (ivopts_global_cost_for_size): Likewise.
2166         (rewrite_use_address): Likewise.
2167         (tree_ssa_iv_optimize_loop): Initialize speed field.
2168         * cse.c (optimize_this_for_speed_p): New static var.
2169         (notreg_cost): Update call of rtx_cost.
2170         (cse_extended_basic_block): set optimize_this_for_speed_p.
2171         * ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost.
2172         (noce_try_cmove_arith): Likewise.
2173         (noce_try_sign_mask): LIkewise.
2174         * expr.c (compress_float_constant): Update rtx_cost calls.
2175         * tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument.
2176         (addr_to_parts): Likewise.
2177         (create_mem_ref): Likewise.
2178         * dse.c (find_shift_sequence): Add speed argument.
2179         (replace_read): Update call.
2180         * calls.c (precompute_register_parameters): Update call of rtx_cost.
2181         * expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost,
2182         * neg_cost, shift_cost, shiftadd_cost,
2183         shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost,
2184         mul_highpart_cost): Increase dimension.
2185         (init_expmed): Initialize for both size and speed.
2186         (expand_shift): Use profile.
2187         (synth_mult): Use profile.
2188         (choose_mult_variant): Use profile.
2189         (expand_mult): Use profile.
2190         (expand_mult_highpart_optab): Use profile.
2191         (expand_mult_highpart): Use profile.
2192         (expand_smod_pow2): Use profile.
2193         (expand_divmod): Use profile.
2194         * simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost.
2195         * loop-invariant.c (create_new_invariant): Use profile.
2196         (gain_for_invariant): Add speed parameter.
2197         (best_gain_for_invariant): Likewise.
2198         (find_invariants_to_move): Likewise.
2199         (move_single_loop_invariants): Set it.
2200         * target-def.h (TARGET_RTX_COSTS): Use hook.
2201         * rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe.
2202         (optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare.
2203         * output.h (default_address_cost): Update prototype.
2204         * combine.c (optimize_this_for_speed_p): New static var.
2205         (combine_validate_cost): Update call of rtx_cost.
2206         (combine_instructions): Set optimize_this_for_speed_p.
2207         (expand_compound_operation): Update call of rtx_cost.
2208         (make_extraction):Update call of rtx_cost.
2209         (force_to_mode):Update call of rtx_cost.
2210         (distribute_and_simplify_rtx):Update call of rtx_cost.
2211         * cfgloop.h (target_reg_cost, target_spill_cost): Turn to array.
2212         (estimate_reg_pressure_cost): Update prototype.
2213         * tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype.
2214         * basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p):
2215         Remove.
2216         * config/alpha/alpha.c (alpha_rtx_costs): Update.
2217         (alpha_rtx_costs): Update.
2218         * config/frv/frv.c (frv_rtx_costs): Update.
2219         * config/s390/s390.c (s390_rtx_costs): Update.
2220         * config/m32c/m32c.c (m32c_memory_move_cost): Update.
2221         (m32c_rtx_costs): Update.
2222         * config/spu/spu.c (TARGET_ADDRESS_COST): Upate.
2223         (spu_rtx_costs): Update.
2224         * config/sparc/sparc.c (sparc_rtx_costs): Update.
2225         * config/m32r/m32r.c (m32r_rtx_costs): Update.
2226         * config/i386/i386.c (:ix86_address_cost): Update.
2227         (ix86_rtx_costs): Update.
2228         * config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update.
2229         * config/pdp11/pdp11.c (pdp11_rtx_costs): Update.
2230         * config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update.
2231         * config/crx/crx.c (crx_address_cost): Update.
2232         * config/xtensa/xtensa.c (xtensa_rtx_costs): Update.
2233         * config/stormy16/stormy16.c
2234         (xstormy16_address_cost, xstormy16_rtx_costs): Update.
2235         * config/m68hc11/m68hc11.c
2236         (m68hc11_address_cost, m68hc11_rtx_costs): Update.
2237         * config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update.
2238         * config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost):
2239         Update.
2240         * config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs):
2241         Update
2242         * config/ia64/ia64.c (ia64_rtx_costs): Update.
2243         * config/m68k/m68k.c (m68k_rtx_costs): Update.
2244         * config/rs6000/rs6000.c (rs6000_rtx_costs): Update.
2245         * config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update.
2246         * config/mcore/mcore.c (TARGET_ADDRESS_COST): Update.
2247         (mcore_rtx_costs): update.
2248         * config/score/score3.c (score3_rtx_costs): Update.
2249         * config/score/score7.c (score7_rtx_costs): Update.
2250         * config/score/score3.h (score3_rtx_costs):Update.
2251         * config/score/score7.h (score7_rtx_costs): Update.
2252         * config/score/score.c (score_rtx_costs): Update.
2253         * config/arm/arm.c (arm_address_cost): Update.
2254         (arm_rtx_costs_1): Update.
2255         (arm_rtx_costs_1): Update.
2256         (arm_size_rtx_costs): Update.
2257         (arm_size_rtx_costs): Update.
2258         (arm_size_rtx_costs): Update.
2259         (arm_xscale_rtx_costs): Update.
2260         (arm_thumb_address_cost): Update.
2261         * config/pa/pa.c (hppa_address_cost): Update.
2262         * config/mips/mips.c (mips_rtx_costs): Update.
2263         * config/vax/vax.c (vax_address_cost): Update.
2264         * config/h8300/h8300.c (h8300_shift_costs): Update.
2265         (h8300_rtx_costs): Update.
2266         * config/v850/v850.c (TARGET_ADDRESS_COST): Update.
2267         (v850_rtx_costs): Update.
2268         * config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update.
2269         * config/bfin/bfin.c
2270         (bfin_address_cost): Update.
2271         (bfin_rtx_costs): Update.
2272         * stmt.c (lshift_cheap_p): Update.
2273
2274 2008-08-30  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2275
2276         PR middle-end/36444
2277         * expmed.c (extract_bit_field_1): Check the mode size to make
2278         sure the vector modes have the same size.
2279
2280 2008-08-29  Michael Meissner  <gnu@the-meissners.org>
2281
2282         * dojump.c (top level): Include basic-block.h to declare
2283         optimize_insn_for_speed_p
2284
2285         * Makefile.in (dodump.h): Add $(BASIC_BLOCK_H) dependency.
2286
2287         * opts.h (CL_SAVE): New option class for marking options that are
2288         target specific options usable in the target attribute.
2289         (CL_MIN_OPTION_CLASS): CL_SAVE is now the minimum option.
2290
2291         * opt-functions.awk (switch_flags): Add CL_SAVE flag so backends
2292         can easily find the target specific options that are safe to use
2293         in the attribute or pragma.
2294
2295         * attribs.c (decl_attributes): Change #pragma GCC option to
2296         #pragma GCC target, and attribute((option(...))) to
2297         attribute((target(...))).
2298
2299         * doc/extend.texi (target attribute): Change from option
2300         attribute.  Delete push/pop/reset.
2301         (#pragma GCC target): Change from #pragma GCC option.  Delete
2302         push/pop/reset.
2303         (#pragma GCC push_options): Document new pragma.
2304         (#pragma GCC pop_options): Document new pragma.
2305         (#pragma GCC reset_options): Document new pragma.
2306
2307         * targhooks.c (default_target_option_valid_attribute_p): Add
2308         warning about port not supporting target attributes.
2309         (default_target_option_pragma_parse): New function, warn about
2310         #pragma GCC target not being supported.
2311
2312         * targhooks.h (default_target_option_pragma_parse): Add
2313         declaration.
2314
2315         * tree.h (TI_CURRENT_TARGET_PRAGMA): Rename from
2316         TI_CURRENT_OPTION_PRAGMA.
2317         (current_target_pragma): Rename from current_option_pragma.
2318
2319         * target.h: (struct target_option): Delete booleans for changing
2320         the optimization level on hot/cold functions.  Change signature of
2321         pragma_parse hook to take a second tree.
2322
2323         * c-tree.h (c_builtin_function_ext_scope): Add declaration.
2324
2325         * c-decl.c (c_builtin_function_ext_scope): New function, guarantee
2326         that the declaration is done at global scope.
2327
2328         * langhooks.c (add_builtin_function_common): Move most of the code
2329         from add_builtin_function here, calling the hook passed in.
2330         (add_builtin_function): Call add_builtin_function_common with
2331         standard builtin hook.
2332         (add_builtin_function_ext_scope): New function to add builtins to
2333         global scope.
2334
2335         * langhooks.h (struct lang_hooks): Add builtin_function_ext_scope
2336         hook.
2337         (add_builtin_function_ext_scope): Add declaration.
2338
2339         * c-pragma.c (handle_pragma_target): Rename from
2340         handle_pragma_option, #pragma GCC option is now #pragma GCC
2341         target.  Move warning about port not supporting target options to
2342         default pragma parse hook.  Remove push/pop/reset from this
2343         pragma.
2344         (handle_pragma_optimize): Remove push/pop/reset from this pragma.
2345         (option_stack): Delete static variable.
2346         (optimize_stack): Ditto.
2347         (optons_stack): New stack of saved target and optimization
2348         options.
2349         (handle_pragma_push_options): New function to handle pushing both
2350         target and optimization options.
2351         (handle_pragma_pop_options): New function to handle popping both
2352         target and optimization options.
2353         (handle_pragma_reset_options): New function to handle resetting
2354         both target and optimization options to their initial state.
2355         (init_pragma): Rename handle_pragma_option to
2356         handle_pragma_target.  Add support for push_options, pop_options,
2357         and reset_options pragmas.
2358
2359         * target-def.h (TARGET_OPTION_PRAGMA_PARSE): Change default to
2360         default_target_option_pragma_parse.
2361         (TARGET_OPTION_VALID_ATTRIBUTE_P): Change default to
2362         default_target_option_valid_attribute_p.
2363         (TARGET_OPTION_COLD_ATTRIBUTE_SETS_OPTIMIZATION): Delete.
2364         (TARGET_OPTION_HOT_ATTRIBUTE_SETS_OPTIMIZATION): Ditto.
2365         (TARGET_OPTION_HOOKS): Delete the fields for whether to change
2366         optimization level on hot/cold functions.
2367
2368         * tree-inline.c (tree_can_inline_p): Disable suppressing inlining
2369         if the caller and callee have different optimization levels.
2370
2371         * c-common.c (handle_target_attribute): Rename from
2372         handle_option_attribute, attribute((option(...))) is now
2373         attribute((target(...))).  Move warning if the port does not
2374         support target attributes to the default hook.
2375         (handle_hot_attribute): Delete code to change the optimization
2376         level of hot functions.
2377         (handle_cold_attribute): Ditto.
2378
2379         * config/i386/i386-c.c (ix86_pragma_target_parse): Take a second
2380         argument that is the binary tree options to use if there are no
2381         arguments.  Call ix86_valid_target_attribute_tree instead of
2382         ix86_valid_option_attribute_tree.
2383         (ix86_pragma_target_parse): Rename from ix86_pragma_option_parse.
2384         (ix86_register_pragmas): Use ix86_pragma_target_parse instead of
2385         ix86_pragma_option_parse.
2386
2387         * config/i386/i386-protos.h (ix86_valid_target_attribute_tree):
2388         Rename from ix86_valid_option_attribute_tree.
2389
2390         * config/i386/i386.c (ix86_add_new_builtins): New function to add
2391         new builtins when the ISA changes.
2392         (ix86_valid_target_attribute_tree): Rename from
2393         ix86_valid_option_attribute_tree.  Change callers.  If the
2394         function specified optimization options, use those as the starting
2395         point before setting up the target attributes.  If the
2396         optimization options were changed in the course of setting the
2397         target attributes, record the new optimization options.
2398         (ix86_valid_target_attribute_tree_inner_p): Rename from
2399         ix86_valid_option_attribute_tree_inner_p.  Change callers.  Call
2400         ix86_add_new_builtins if the ISA changed.
2401         (ix86_valid_target_attribute_p): Rename from
2402         ix86_valid_option_attribute_p.  Change callers.
2403         (enum ix86_builtins): Add IX86_BUILTIN_PCMOV to allow both
2404         __builtin_ia32_pcmov and __builtin_ia32_pcmov_v2di to be declared
2405         as delayed builtin functions.
2406         (struct builtin_isa): New structure to record builtin functions
2407         that should be delayed until the ISA for that function is used.
2408         (ix86_builtins_isa): Change from int to struct to track builtin
2409         functions we want to declare at some point.
2410         (def_builtin): If the front end can delay defining the builtin
2411         functions, don't create builtins for ISAs not part of the default
2412         options.
2413         (def_builtin_const): Ditto.
2414         (bdesc_multi_arg): Declare __builtin_ia32_pcmov and
2415         __builtin_ia32_pcmov_v2di to be different builtin functions.
2416         (ix86_expand_builtin): Changes due to ix86_builtins_isa now being
2417         a structure instead of an int.
2418         (TARGET_OPTION_VALID_ATTRIBUTE_P): Use
2419         ix86_valid_target_attribute_p, not ix86_valid_option_attribute_p.
2420         (TARGET_OPTION_COLD_ATTRIBUTE_SETS_OPTIMIZATION): Delete.
2421         (TARGET_OPTION_HOT_ATTRIBUTE_SETS_OPTIMIZATION): Ditto.
2422
2423         * config/ia64/ia64.h
2424         (TARGET_OPTION_COLD_ATTRIBUTE_SETS_OPTIMIZATION): Delete.
2425         (TARGET_OPTION_HOT_ATTRIBUTE_SETS_OPTIMIZATION): Ditto.
2426
2427         * langhooks-def.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
2428         hook, default to being the same as LANG_HOOKS_BUILTIN_FUNCTION.
2429         (LANG_HOOKS_INITIALIZER): Add
2430         LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE hook.
2431
2432 2008-08-30  Kaz Kojima  <kkojima@gcc.gnu.org>
2433
2434         PR target/37270
2435         * config/sh/sh.h (LEGITIMIZE_RELOAD_ADDRESS): Generate
2436         the reload address with the index register for SFmode
2437         access with a displacement.
2438
2439 2008-08-30  Jan Hubicka  <jh@suse.cz>
2440
2441         * optabs.c (expand_abs_nojump): Update BRANCH_COST call.
2442         * fold-cost.c (LOGICAL_OP_NON_SHORT_CIRCUIT, fold_truthop): Likewise.
2443         * dojump.c (do_jump): Likewise.
2444         * ifcvt.c (MAX_CONDITIONAL_EXECUTE): Likewise.
2445         (note-if_info): Add BRANCH_COST.
2446         (noce_try_store_flag_constants, noce_try_addcc,
2447         noce_try_store_flag_mask, noce_try_cmove_arith, noce_try_cmove_arith,
2448         noce_try_cmove_arith, noce_find_if_block, find_if_case_1,
2449         find_if_case_2): Use computed branch cost.
2450         * expr.h (BRANCH_COST): Update default.
2451         * predict.c (predictable_edge_p): New function.
2452         * expmed.c (expand_smod_pow2, expand_sdiv_pow2, emit_store_flag):
2453         Update BRANCH_COST call.
2454         * basic-block.h (predictable_edge_p): Declare.
2455         * config/alpha/alpha.h (BRANCH_COST): Update.
2456         * config/frv/frv.h (BRANCH_COST): Update.
2457         * config/s390/s390.h (BRANCH_COST): Update.
2458         * config/spu/spu.h (BRANCH_COST): Update.
2459         * config/sparc/sparc.h (BRANCH_COST): Update.
2460         * config/m32r/m32r.h (BRANCH_COST): Update.
2461         * config/i386/i386.h (BRANCH_COST): Update.
2462         * config/i386/i386.c (ix86_expand_int_movcc): Update use of BRANCH_COST.
2463         * config/sh/sh.h (BRANCH_COST): Update.
2464         * config/pdp11/pdp11.h (BRANCH_COST): Update.
2465         * config/avr/avr.h (BRANCH_COST): Update.
2466         * config/crx/crx.h (BRANCH_COST): Update.
2467         * config/xtensa/xtensa.h (BRANCH_COST): Update.
2468         * config/stormy16/stormy16.h (BRANCH_COST): Update.
2469         * config/m68hc11/m68hc11.h (BRANCH_COST): Update.
2470         * config/iq2000/iq2000.h (BRANCH_COST): Update.
2471         * config/ia64/ia64.h (BRANCH_COST): Update.
2472         * config/rs6000/rs6000.h (BRANCH_COST): Update.
2473         * config/arc/arc.h (BRANCH_COST): Update.
2474         * config/score/score.h (BRANCH_COST): Update.
2475         * config/arm/arm.h (BRANCH_COST): Update.
2476         * config/pa/pa.h (BRANCH_COST): Update.
2477         * config/mips/mips.h (BRANCH_COST): Update.
2478         * config/vax/vax.h (BRANCH_COST): Update.
2479         * config/h8300/h8300.h (BRANCH_COST): Update.
2480         * params.def (PARAM_PREDICTABLE_BRANCH_OUTCOME): New.
2481         * doc/invoke.texi (predictable-branch-cost-outcome): Document.
2482         * doc/tm.texi (BRANCH_COST): Update.
2483
2484 2008-08-30  Samuel Tardieu  <sam@rfc1149.net>
2485
2486         PR target/37283
2487         * config/arm/arm.c (arm_optimization_options): Set
2488         flag_section_anchors to 2 instead of 1 to distinguish it from
2489         -fsection-anchors given explicitely on the command line.
2490
2491 2008-08-30  Richard Sandiford  <rdsandiford@googlemail.com>
2492
2493         * recog.c (split_insn): Consider attaching a REG_EQUAL note to the
2494         final insn of a split.
2495
2496 2008-08-30  Jan Hubicka  <jh@suse.cz>
2497
2498         * postreload-gcse.c (gate_handle_gcse2): Disable for functions
2499         optimized for speed.
2500         * final.c (compute_alignments): Use optimize_bb_for_size_p.
2501         * tree-call-cdce.c (gate_call_cdce): Use optimize_function_for_speed_p.
2502         * opts.c (flag_predictive_commoning_set, flag_unswitch_loops_set,
2503         flag_gcse_after_reload_set): New static vars.
2504         (common_handle_option): Enable those flags for profile-use.
2505         (decode_options): Remove optimize_size flags that are handled
2506         on higher granuality.
2507         * tree-vectorizer.c (vectorize_loops): Use
2508         optimize_loop_nest_for_speed_p.
2509         * tree-ssa-pre.c (do_pre): Use optimize_function_for_speed_p.
2510         * tree-predcom.c (tree_predictive_commoning): Use
2511         optimize_loop_for_speed_p.
2512         * varasm.c (assemble_start_function): Use optimize_function_for_speed_p.
2513         * bb-reorder.c (rest_of_handle_reorder_blocks): Likewise.
2514         * predict.c (optimize_loop_for_speed_p): Fix walk.
2515
2516 2008-08-30  Jan Hubicka  <jh@suse.cz>
2517
2518         * ipa-inline.c (cgraph_estimate_growth): Discover self recursive
2519         functions.
2520         (cgraph_decide_inlining_of_small_function): Use edge->count to detect
2521         profile presence locally.
2522
2523 2008-08-29  Joseph Myers  <joseph@codesourcery.com>
2524
2525         PR bootstrap/37086
2526         * tree-vrp.c (find_switch_asserts): Make idx volatile for GCC
2527         versions before 4.0.
2528
2529 2008-08-29  Jan Hubicka  <jh@suse.cz>
2530
2531         * tree-inline.c (insert_init_stmt): Insert sequence even when
2532         not in SSA form.
2533
2534 2008-08-29  Jeff Law  <law@redhat.com>
2535
2536         * mn10300.c (mn10300_secondary_reload_class): We need secondary
2537         reloads for AM33-2 if IN is a pseudo with an equivalent memory
2538         location and class is an FP register.
2539
2540 2008-08-29  Jan Hubicka  <jh@suse.cz>
2541
2542         * see.c (see_merge_one_def_extension): Silence used uninitialized
2543         warning.
2544         * matrix-reorg.c (check_allocation_function): Likewise.
2545         * config/i386/driver-i386.c (detect_caches_amd): Likewise.
2546
2547 2008-08-29  Jakub Jelinek  <jakub@redhat.com>
2548
2549         PR c/37261
2550         * fold-const.c (fold_binary): In (X | C1) & C2 canonicalization
2551         compute new & and | in type rather than TREE_TYPE (arg0).
2552
2553         * dwarf2out.c (fortran_common): Update comment.
2554         (gen_variable_die): Swap com_die and var_die variables in Fortran
2555         COMMON block handling code.
2556
2557         * dwarf2out.c (descr_info_loc): Handle VAR_DECL.
2558
2559         * dwarf2out.c (gen_const_die): New function.
2560         (size_of_die, value_format, output_die): Output larger
2561         dw_val_class_vec using DW_FORM_block2 or DW_FORM_block4.
2562         (native_encode_initializer): New function.
2563         (tree_add_const_value_attribute): Call it.
2564         (gen_decl_die, dwarf2out_decl): Handle CONST_DECLs if is_fortran ().
2565
2566         * dwarf2out.c (gen_formal_parameter_die, gen_variable_die): For
2567         DECL_BY_REFERENCE decls don't pass TREE_READONLY and
2568         TREE_THIS_VOLATILE to add_type_attribute.
2569
2570         * dwarf2out.c (add_subscript_info): Stop on Fortran TYPE_STRING_FLAG
2571         types.
2572         (gen_array_type_die): Emit DW_TAG_string_type for Fortran character
2573         types.
2574
2575         * dwarf2out.c (loc_by_reference): New function.
2576         (add_location_or_const_value_attribute): Use it.
2577
2578         PR fortran/23057
2579         * dwarf2out.c (gen_variable_die): Represent Fortran COMMON vars
2580         as DW_TAG_variable children of DW_TAG_common_block rather than
2581         DW_TAG_member children.  Put DW_AT_external to individual
2582         DW_TAG_variable DIEs, not to DW_TAG_common_block.
2583
2584         * dwarf2out.c (add_bound_info): If lookup_decl_die failed, try
2585         loc_descriptor_from_tree_1.
2586
2587         PR fortran/29635
2588         PR fortran/23057
2589         * debug.h (struct gcc_debug_hooks): Add NAME and CHILD
2590         arguments to imported_module_or_decl.
2591         (debug_nothing_tree_tree): Removed.
2592         (debug_nothing_tree_tree_tree_bool): New prototype.
2593         * debug.c (do_nothing_debug_hooks): Adjust.
2594         (debug_nothing_tree_tree): Removed.
2595         (debug_nothing_tree_tree_tree_bool): New function.
2596         * dwarf2out.c (is_symbol_die): Handle DW_TAG_module.
2597         (gen_variable_die): Put all common vars for the
2598         same COMMON block under one DW_TAG_common_block.
2599         (declare_in_namespace): Return new context_die, for Fortran
2600         return the module DIE instead of adding extra declarations into
2601         the namespace.
2602         (gen_type_die_with_usage): Adjust declare_in_namespace caller.
2603         (gen_namespace_die): If is_fortran (), generate DW_TAG_module
2604         instead of DW_TAG_namespace.  If DECL_EXTERNAL is set, add
2605         DW_AT_declaration.
2606         (dwarf2out_global_decl): Don't skip Fortran global vars.
2607         (gen_decl_die): Likewise.  Adjust declare_in_namespace callers.
2608         (dwarf2out_imported_module_or_decl): Add NAME and CHILD arguments.
2609         If NAME is non-NULL, add DW_AT_name.  If CHILD is non-NULL, put
2610         DW_TAG_imported_declaration as child of previous
2611         DW_TAG_imported_module.
2612         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Adjust.
2613         * sdbout.c (sdb_debug_hooks): Likewise.
2614         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
2615
2616 2008-08-29  Jan Hubicka  <jh@suse.cz>
2617
2618         * cgraph.c (cgraph_remove_node): Do not remove nested nodes.
2619
2620         * cgraph.h (cgraph_maybe_hot_edge_p): Declare.
2621         * ipa-cp.c (n_cloning_candidates): New static variable.
2622         (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare.
2623         (ipcp_print_all_lattices): Improve debug output.
2624         (ipcp_cloning_candidate_p): New function.
2625         (ipcp_initialize_node_lattices): Use it.
2626         (ipcp_init_stage): Do only analyzis here; prettier debug output.
2627         (ipcp_propagate_stage): Prettier debug output.
2628         (ipcp_iterate_stage): Initialize latices here; prettier debug output.
2629         (ipcp_print_all_structures): Remove.
2630         (ipcp_need_redirect_p): Test !n_cloning_candidates.
2631         (ipcp_insert_stage): Prettier debug output; call
2632         cgraph_remove_unreachable_nodes before propagating.
2633         (pass_ipa_cp): Schedule function removal pass.
2634         * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better
2635         debug output.
2636         (cgraph_maybe_hot_edge_p): Move to ...
2637         * predict.c (cgraph_maybe_hot_edge_p) ... here.
2638         * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New.
2639         (common_handle_option): Set them; enable ipa-cp when profiling.
2640         * ipa-prop.c (ipa_print_node_jump_functions): Prettier output.
2641         (ipa_print_all_jump_functions): Likewise.
2642         (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove.
2643         (ipa_print_node_params, ipa_print_all_params): New.
2644         * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags,
2645         ipa_print_all_param_flags): Remove.
2646         (ipa_print_node_params, ipa_print_all_params): New.
2647
2648 2008-08-29  Bob Wilson  <bob.wilson@acm.org>
2649
2650         * config/xtensa/xtensa.c (xtensa_secondary_reload_class): Revert
2651         change from 2008-04-03.
2652         * config/xtensa/xtensa.h (IRA_COVER_CLASSES): Define.
2653
2654 2008-08-29  Vladimir Makarov  <vmakarov@redhat.com>
2655
2656         PR rtl-opt/37251
2657         * ira-color.c (push_allocnos_to_stack): Truncate
2658         removed_splay_allocno_vec.
2659
2660 2008-08-29  Vladimir Makarov  <vmakarov@redhat.com>
2661
2662         PR rtl-opt/37243
2663         * ira-color (ira_fast_allocation): Don't assign hard registers to
2664         global allocnos.
2665
2666 2008-08-29  Jan Hubicka  <jh@suse.cz>
2667
2668         PR middle-end/37278
2669         * predict.c (optimize_loop_nest_for_speed_p): Do not ICE
2670         for cold internal loops.
2671
2672 2008-08-29  Richard Guenther  <rguenther@suse.de>
2673
2674         * tree-ssa-structalias.c (create_variable_info_for): Do not
2675         create fields for heap vars or vars with a noalias state.
2676         For NO_ALIAS_ANYTHING variables add a self-constraint, not one
2677         from ESCAPED.
2678
2679 2008-08-29  Richard Guenther  <rguenther@suse.de>
2680
2681         * common.opt (ftree-store-ccp): Mark as preserved for
2682         backward compatibility.
2683         * doc/invoke.texi (-ftree-store-ccp): Remove documentation.
2684         * tree-pass.h (pass_store_ccp): Remove.
2685         * tree-ssa-propagate.h (struct prop_value_d): Remove mem_ref field.
2686         (first_vdef): Remove declaration.
2687         (get_value_loaded_by): Likewise.
2688         * tree-ssa-ccp.c (do_store_ccp): Remove.
2689         (get_default_value): Simplify as do_store_ccp is always false
2690         now.  Do not initialize mem_ref.
2691         (set_value_varying): Likewise.
2692         (canonicalize_float_value): Likewise.
2693         (set_lattice_value): Likewise.
2694         (likely_value): Likewise.
2695         (surely_varying_stmt_p): Likewise.
2696         (ccp_initialize): Likewise.
2697         (ccp_lattice_meet): Likewise.
2698         (ccp_visit_phi_node): Likewise.
2699         (ccp_fold): Likewise.
2700         (evaluate_stmt): Likewise.
2701         (visit_assignment): Likewise.
2702         (ccp_visit_stmt): Likewise.
2703         (execute_ssa_ccp): Fold into ...
2704         (do_ssa_ccp): ... this.
2705         (do_ssa_store_ccp): Remove.
2706         (gate_store_ccp): Likewise.
2707         (pass_store_ccp): Likewise.
2708         * tree-ssa-copy.c (copy_prop_visit_phi_node): Do not
2709         initialize mem_ref.
2710         * tree-ssa-propagate.c (first_vdef): Remove.
2711         (get_value_loaded_by): Likewise.
2712         (replace_vuses_in): Likewise.
2713         (substitute_and_fold): Do not call replace_vuses_in.
2714         * opts.c (decode_options): Do not set flag_tree_store_ccp.
2715
2716 2008-08-29  Richard Guenther  <rguenther@suse.de>
2717
2718         PR middle-end/37236
2719         * tree-ssa-structalias.c (intra_create_variable_infos): Mark
2720         PARAM_NOALIAS tags with is_heapvar.
2721         * tree-ssa-operands.c (access_can_touch_variable): Offset
2722         based tests do not apply for heapvars.  Fix offset test.
2723
2724 2008-08-29  Jan Hubicka  <jh@suse.cz>
2725
2726         * doc/invoke.texi (-fipa-cp): Enabled by default at -O2/-Os/-O3
2727         (-fipa-cp-clone): Enabled by default at -O3.
2728         * opts.c (decode_options): Enable ipa-cp at -O2, ipa-cp-clone at -O3;
2729         make ipa-cp-clone to imply ipa-cp; disable cloning at -Os.
2730
2731 2008-08-29  Jan Hubicka  <jh@suse.cz>
2732
2733         * tree.c (build_function_type_skip_args, build_function_decl_skip_args):
2734         New functions.
2735         * tree.h (build_function_type_skip_args, build_function_decl_skip_args):
2736         Declare.
2737         * gimple.c (giple_copy_call_skip_args): New function.
2738         (giple_copy_call_skip_args): Declare.
2739
2740         * cgraph.h (cgraph_function_versioning): Add skip_args arugmnet
2741         * ipa-cp.c (ipcp_node_not_modifiable_p): Rename to ...
2742         (ipcp_node_modifiable_p): ... this one; use tree_versionable_function_p.
2743         (ipcp_create_replace_map): Improve debug output.
2744         (ipcp_need_redirect_p): Return false when not clonning.
2745         (ipcp_update_callgraph): Skip args.
2746         (ipcp_insert_stage): UPdate call of !ipcp_node_modifiable_p;
2747         skip args.
2748         * cgraphunit.c (cgraph_function_versioning): Add skip_args argument.
2749         (save_inline_function_body): Update call of tree_function_versioning.
2750         * ipa-prop.c (ipa_edge_removal_hook): Do not ICE on unanalyzed nodes.
2751         * tree-inline.c (copy_arguments_for_versioning): Add skip_args argument.
2752         (tree_function_versioning): Likewise.
2753         * tree-inline.h (tree_function_versioning): Update prototype.
2754
2755 2008-08-29  Jan Hubicka  <jh@suse.cz>
2756
2757         * loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p.
2758         * tree-ssa-threadupdate.c (mark_threaded_blocks):
2759         Use optimize_function_for_size_p.
2760         * tracer.c (ignore_bb_p): Use optimize_bb_for_size_p.
2761         * postreload-gcse.c (eliminate_partially_redundant_load):
2762         Use optimize_bb_for_size_p.
2763         * value-prof.c (gimple_divmod_fixed_value_transform,
2764         gimple_mod_pow2_value_transform, gimple_mod_subtract_transform,
2765         gimple_stringops_transform): Use optimize_bb_for_size_p.
2766         * ipa-cp.c (ipcp_insert_stage): Use optimize_function_for_size_p.
2767         * final.c (compute_alignments): Use optimize_function_for_size_p.
2768         * builtins.c (fold_builtin_cabs): Use optimize_function_for_speed_p.
2769         (fold_builtin_strcpy, fold_builtin_fputs): Use
2770         optimize_function_for_size_p.
2771         * fold-const.c (tree_swap_operands_p): Use optimize_function_for_size_p.
2772         * recog.c (relax_delay_slots): Likewise.
2773         * tree-ssa-math-opts.c (replace_reciprocal):
2774         Use optimize_bb_for_speed_p.
2775         (execute_cse_reciprocals): Use optimize_bb_for_size_p.
2776         * ipa-inline.c (cgraph_decide_recursive_inlining): Use
2777         optimize_function_for_size_p.
2778         (cgraph_decide_inlining_of_small_function): Use
2779         optimize_function_for_size_p.
2780         * global.c (find_reg): Use optimize_function_for_size_p.
2781         * opts.c (decode_options): Do not clear flag_tree_ch,
2782         flag_inline_functions, flag_unswitch_loops, flag_unroll_loops,
2783         flag_unroll_all_loops and flag_prefetch_loop_arrays. Those can
2784         work it out from profile.
2785         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely): Use
2786         optimize_loop_for_speed_p.
2787         * predict.c (optimize_bb_for_size_p, optimize_bb_for_speed_p): Constify
2788         argument.
2789         (optimize_loop_nest_for_size_p, optimize_loop_nest_for_speed_p): New.
2790         * tree-parloops.c (parallelize_loops): Use optimize_loop_for_size_p.
2791         * tree-eh.c (decide_copy_try_finally): Use optimize_function_for_size_p.
2792         * local-alloc.c (block_alloc): Pass BB pointer.
2793         (find_free_reg): Add BB pointer, use optimize_bb_for_size_p.
2794         * gcse.c (gcse_main): Use optimize_function_for_size_p.
2795         * loop-unroll.c (decide_unrolling_and_peeling):
2796         Use optimize_loop_for_size_p.
2797         (decide_peel_completely): Likewise.
2798         * tree-vect-analyze.c (vect_mark_for_runtime_alias_test): Use
2799         optimize_loop_for_size_p.
2800         (vect_enhance_data_refs_alignment): Likewise.
2801         * tree-ssa-coalesce.c (coalesce_cost): Add optimize_for_size argument.
2802         (coalesce_cost_bb, coalesce_cost_edge, create_outofssa_var_map):
2803         Update call.
2804         * cfgcleanup.c (outgoing_edges_match): Use optimize_bb_for_speed_p.
2805         (try_crossjump_bb): Use optimize_bb_for_size_p.
2806         * tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Use
2807         optimize_loop_for_speed_p.
2808         * bb-reorder.c (find_traces_1_round): Likewise.
2809         (copy_bb): Use optimize_bb_for_speed_p.
2810         (duplicate_computed_gotos): Likewise.
2811         * basic-block.h (optimize_loop_nest_for_size_p,
2812         optimize_loop_nest_for_speed_p): New.
2813         * stmt.c (expand_case): Use optimize_insn_for_size_p.
2814
2815 2008-08-29  Tristan Gingold  <gingold@adacore.com>
2816
2817         * gcov.c (main): Call expandargv.
2818
2819 2008-08-29  Jan Hubicka  <jh@suse.cz>
2820
2821         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Check that loop
2822         is not cold.
2823         * predict.c (optimize_bb_for_size_p, optimize_bb_for_speed_p):
2824         Constify arguments.
2825         (optimize_loop_for_size_p, optimize_loop_for_speed_p): New functions.
2826         * basic-block.h (optimize_bb_for_size_p, optimize_bb_for_speed_p):
2827         Constify.
2828         (optimize_loop_for_size_p, optimize_loop_for_speed_p): Declare.
2829
2830 2008-08-29  Jan Hubicka  <jh@suse.cz>
2831
2832         * tree-pass.h (pass_strip_predict_hints): Declare.
2833         * predict.c (strip_builtin_expect): Rename to ...
2834         (strip_predict_hints): ... this one; strip also GIMPLE_PREDICT.
2835         (tree_bb_level_predictions): Do not remove GIMPLE_PREDICT.
2836         (tree_estimate_probability): Do not strip builtin_expect.
2837         (pass_strip_predict_hints): New pass.
2838         * tree-inline.c (expand_call_inline): When inlining cold function,
2839         predict it as unlikely.
2840         * passes.c (init_optimization_passes): Add pass_strip_predict_hints.
2841
2842 2008-08-29  Richard Guenther  <rguenther@suse.de>
2843
2844         PR tree-optimization/37207
2845         * tree-vrp.c (extract_range_from_binary_expr): Also try
2846         to constant fold if only one of the operands is a constant.
2847
2848 2008-08-29  Nick Clifton  <nickc@redhat.com>
2849
2850         * config/m32r/m32r.h (LEGITIMATE_CONSTANT_P): Treat LABEL_REFs in
2851         the same way as SYMBOL_REFs.
2852
2853 2008-08-28  Bob Wilson  <bob.wilson@acm.org>
2854
2855         * config/xtensa/xtensa.md (<u>mulsidi3): Use a temporary register.
2856
2857 2008-08-28  Adam Nemet  <anemet@caviumnetworks.com>
2858
2859         * config/mips/mips.h (ISA_HAS_BBIT): New macro.
2860         * config/mips/mips.md (branch_likely): Remove const.  Fix
2861         comment formatting.
2862         (define_delay for type "branch"): Change to only apply for branch
2863         with likely variant.
2864         (define_delay for type "branch" and "branch_likely" no).  New delay
2865         definition.
2866         (equality_op): New code iterator.
2867         (bbv, bbinv): New code attributes.
2868         (*branch_bit<bbv><mode>, *branch_bit<bbv><mode>_inverted): New
2869         patterns.
2870
2871 2008-08-28  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2872             Andrew Pinski  <pinskia@gcc.gnu.org>
2873
2874         PR 18050
2875         * c-common.c (verify_tree): Fix handling of ADDR_EXPR.
2876
2877 2008-08-28  Paolo Carlini  <paolo.carlini@oracle.com>
2878
2879         * gtrh-posix.h: Fix uses of _POSIX_TIMEOUTS per the normal Posix
2880         rule that a symbolic constant must be defined and >= 0 for the
2881         corresponding facility to be present at compile-time.
2882         * gthr-posix.c: Likewise.
2883
2884 2008-08-28  Adam Nemet  <anemet@caviumnetworks.com>
2885
2886         * config/mips/mips.h (ISA_HAS_DMUL3): New macro.
2887         * config/mips/mips.md (D): New mode attribute.
2888         (mulsi3, muldi3): Merge it into ...
2889         (mul<mode>3): ... new template.  Use _mul3 ending for 3-op patterns.
2890         (muldi3_mul3): New pattern.
2891         (mulsi3_mult3): Rename to mulsi3_mul3.
2892
2893 2008-08-28  Jan Hubicka  <jh@suse.cz>
2894
2895         * expmed.c (store_bit_field_1): Be prepared for movstrict expander
2896         to fail.
2897         * predict.c (always_optimize_for_size_p): Rename to ...
2898         (optimize_function_for_size): ... this one; make extern.
2899         (optimize_function_for_speed_p): New.
2900         (optimize_bb_for_size_p, optimize_bb_for_size_p,
2901         optimize_edge_for_size_p,optimize_edge_for_size_p,
2902         optimize_insn_for_size_p, optimize_insn_for_size_p): Update.
2903         * basic-block.h (optimize_function_for_size_p,
2904         optimize_function_for_speed_p): Declare.
2905         * i386.md (optimize_size checks): Replace them by appropriate
2906         predicate.
2907         (standard_80387_constant_p, ix86_compute_frame_layout,
2908         ix86_expand_epilogue, ix86_decompose_address,
2909         print_operand, emit_i387_cw_initialization,
2910         inline_memory_move_cost, ix86_pad_returns,
2911         ix86_reorg): Replace optimize_size checks.
2912
2913 2008-08-28  Richard Sandiford  <rdsandiford@googlemail.com>
2914
2915         * rtl.h (simplify_subreg_regno): Declare.
2916         * rtlanal.c (simplify_subreg_regno): New function, split out from...
2917         * simplify-rtx.c (simplify_subreg): ...here.
2918         * reload.c (find_reloads): Use simplify_subreg_regno instead of
2919         subreg_offset_representable_p.
2920
2921 2008-08-28  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2922
2923         PR c/30949
2924         * c-typeck.c (convert_for_assignment): Give a note describing what
2925         was passed and what was expected.
2926
2927 2008-08-28  Joey Ye  <joey.ye@intel.com>
2928
2929         * doc/extend.texi: Document AVX built-in functions.
2930         * doc/invoke.texi: Document -mavx.
2931
2932 2008-08-28  H.J. Lu  <hongjiu.lu@intel.com>
2933             Joey Ye  <joey.ye@intel.com>
2934             Xuepeng Guo  <xuepeng.guo@intel.com>
2935
2936         * config.gcc (extra_headers): Add gmmintrin.h for x86 and x86-64.
2937
2938         * config/i386/cpuid.h (bit_FMA): New.
2939         (bit_XSAVE): Likewise.
2940         (bit_OSXSAVE): Likewise.
2941         (bit_AVX): Likewise.
2942
2943         * config/i386/gas.h (ASM_OUTPUT_OPCODE): Undefine before
2944         define.  Use ASM_OUTPUT_AVX_PREFIX.
2945
2946         * config/i386/gmmintrin.h: New.
2947
2948         * config/i386/i386.c (x86_64_reg_class): Add X86_64_AVX_CLASS.
2949         (OPTION_MASK_ISA_AVX_SET): New.
2950         (OPTION_MASK_ISA_FMA_SET): Likewise.
2951         (OPTION_MASK_ISA_AVX_UNSET): Likewise.
2952         (OPTION_MASK_ISA_FMA_SET): Likewise.
2953         (OPTION_MASK_ISA_SSE4_2_UNSET): Updated.
2954         (ix86_handle_option): Handle OPT_mavx and OPT_mfma.
2955         (pta_flags): Add PTA_AVX and PTA_FMA.
2956         (override_options): Handle PTA_AVX and PTA_FMA.
2957         (init_cumulative_args): Handle warn_avx.
2958         (classify_argument): Return 0 for COImode and OImode.  Return
2959         1 and X86_64_AVX_CLASS for 256bit vector types.
2960         (examine_argument): Handle X86_64_AVX_CLASS.
2961         (construct_container): Likewise.
2962         (function_arg_advance_32): Pass OImode and 256bit vector types
2963         in AVX register.
2964         (function_arg_advance_64): Take a new argument to indicate if a
2965         parameter is named.  Handle 256bit vector types.  Return
2966         immediately for unnamed 256bit vector mode parameters.
2967         (function_arg_advance): Updated.
2968         (function_arg_32): Add comments for TImode.  Handle OImode
2969         and 256bit vector types.
2970         (function_arg_64): Take a new argument to indicate if a
2971         parameter is named.  Handle 256bit vector types.  Return NULL
2972         for unnamed 256bit vector mode parameters.
2973         (function_arg): Updated.
2974         (setup_incoming_varargs_64): Support
2975         AVX encoding for *sse_prologue_save_insn.
2976         (ix86_gimplify_va_arg): Handle 256bit vector mode parameters.
2977         (standard_sse_constant_p): Return -2 for all 1s if SSE2 isn't
2978         enabled.  For all 1s in 256bit vector modes, return 3 if AVX is
2979         enabled, otherwise return -3.
2980         (standard_sse_constant_opcode): Handle AVX and 256bit vector
2981         modes.
2982         (print_reg): Support AVX registers.  Handle 'x' and 't'.
2983         Handle 'd' to duplicate the operand.
2984         (print_operand): Likewise.  Also support AVX vector compare
2985         instructions.
2986         (output_387_binary_op): Support AVX.
2987         (output_fp_compare): Likewise.
2988         (ix86_expand_vector_move_misalign): Likewise.
2989         (ix86_attr_length_vex_default): New.
2990         (ix86_builtins): Add IX86_BUILTIN_ADDPD256,
2991         IX86_BUILTIN_ADDPS256, IX86_BUILTIN_ADDSUBPD256,
2992         IX86_BUILTIN_ADDSUBPS256, IX86_BUILTIN_ANDPD256,
2993         IX86_BUILTIN_ANDPS256, IX86_BUILTIN_ANDNPD256,
2994         IX86_BUILTIN_ANDNPS256, IX86_BUILTIN_BLENDPD256,
2995         IX86_BUILTIN_BLENDPS256, IX86_BUILTIN_BLENDVPD256,
2996         IX86_BUILTIN_BLENDVPS256, IX86_BUILTIN_DIVPD256,
2997         IX86_BUILTIN_DIVPS256, IX86_BUILTIN_DPPS256,
2998         IX86_BUILTIN_HADDPD256, IX86_BUILTIN_HADDPS256,
2999         IX86_BUILTIN_HSUBPD256, IX86_BUILTIN_HSUBPS256,
3000         IX86_BUILTIN_MAXPD256, IX86_BUILTIN_MAXPS256,
3001         IX86_BUILTIN_MINPD256, IX86_BUILTIN_MINPS256,
3002         IX86_BUILTIN_MULPD256, IX86_BUILTIN_MULPS256,
3003         IX86_BUILTIN_ORPD256, IX86_BUILTIN_ORPS256,
3004         IX86_BUILTIN_SHUFPD256, IX86_BUILTIN_SHUFPS256,
3005         IX86_BUILTIN_SUBPD256, IX86_BUILTIN_SUBPS256,
3006         IX86_BUILTIN_XORPD256, IX86_BUILTIN_XORPS256,
3007         IX86_BUILTIN_CMPSD, IX86_BUILTIN_CMPSS, IX86_BUILTIN_CMPPD,
3008         IX86_BUILTIN_CMPPS, IX86_BUILTIN_CMPPD256,
3009         IX86_BUILTIN_CMPPS256, IX86_BUILTIN_CVTDQ2PD256,
3010         IX86_BUILTIN_CVTDQ2PS256, IX86_BUILTIN_CVTPD2PS256,
3011         IX86_BUILTIN_CVTPS2DQ256, IX86_BUILTIN_CVTPS2PD256,
3012         IX86_BUILTIN_CVTTPD2DQ256, IX86_BUILTIN_CVTPD2DQ256,
3013         IX86_BUILTIN_CVTTPS2DQ256, IX86_BUILTIN_EXTRACTF128PD256,
3014         IX86_BUILTIN_EXTRACTF128PS256, IX86_BUILTIN_EXTRACTF128SI256,
3015         IX86_BUILTIN_VZEROALL, IX86_BUILTIN_VZEROUPPER,
3016         IX86_BUILTIN_VZEROUPPER_REX64, IX86_BUILTIN_VPERMILVARPD,
3017         IX86_BUILTIN_VPERMILVARPS, IX86_BUILTIN_VPERMILVARPD256,
3018         IX86_BUILTIN_VPERMILVARPS256, IX86_BUILTIN_VPERMILPD,
3019         IX86_BUILTIN_VPERMILPS, IX86_BUILTIN_VPERMILPD256,
3020         IX86_BUILTIN_VPERMILPS256, IX86_BUILTIN_VPERMIL2PD,
3021         IX86_BUILTIN_VPERMIL2PS, IX86_BUILTIN_VPERMIL2PD256,
3022         IX86_BUILTIN_VPERMIL2PS256, IX86_BUILTIN_VPERM2F128PD256,
3023         IX86_BUILTIN_VPERM2F128PS256, IX86_BUILTIN_VPERM2F128SI256,
3024         IX86_BUILTIN_VBROADCASTSS, IX86_BUILTIN_VBROADCASTSD256,
3025         IX86_BUILTIN_VBROADCASTSS256, IX86_BUILTIN_VBROADCASTPD256,
3026         IX86_BUILTIN_VBROADCASTPS256, IX86_BUILTIN_VINSERTF128PD256,
3027         IX86_BUILTIN_VINSERTF128PS256, IX86_BUILTIN_VINSERTF128SI256,
3028         IX86_BUILTIN_LOADUPD256, IX86_BUILTIN_LOADUPS256,
3029         IX86_BUILTIN_STOREUPD256, IX86_BUILTIN_STOREUPS256,
3030         IX86_BUILTIN_LDDQU256, IX86_BUILTIN_LOADDQU256,
3031         IX86_BUILTIN_STOREDQU256, IX86_BUILTIN_MASKLOADPD,
3032         IX86_BUILTIN_MASKLOADPS, IX86_BUILTIN_MASKSTOREPD,
3033         IX86_BUILTIN_MASKSTOREPS, IX86_BUILTIN_MASKLOADPD256,
3034         IX86_BUILTIN_MASKLOADPS256, IX86_BUILTIN_MASKSTOREPD256,
3035         IX86_BUILTIN_MASKSTOREPS256, IX86_BUILTIN_MOVSHDUP256,
3036         IX86_BUILTIN_MOVSLDUP256, IX86_BUILTIN_MOVDDUP256,
3037         IX86_BUILTIN_SQRTPD256, IX86_BUILTIN_SQRTPS256,
3038         IX86_BUILTIN_SQRTPS_NR256, IX86_BUILTIN_RSQRTPS256,
3039         IX86_BUILTIN_RSQRTPS_NR256, IX86_BUILTIN_RCPPS256,
3040         IX86_BUILTIN_ROUNDPD256, IX86_BUILTIN_ROUNDPS256,
3041         IX86_BUILTIN_UNPCKHPD256, IX86_BUILTIN_UNPCKLPD256,
3042         IX86_BUILTIN_UNPCKHPS256, IX86_BUILTIN_UNPCKLPS256,
3043         IX86_BUILTIN_SI256_SI, IX86_BUILTIN_PS256_PS,
3044         IX86_BUILTIN_PD256_PD, IX86_BUILTIN_SI_SI256,
3045         IX86_BUILTIN_PS_PS256, IX86_BUILTIN_PD_PD256,
3046         IX86_BUILTIN_VTESTZPD, IX86_BUILTIN_VTESTCPD,
3047         IX86_BUILTIN_VTESTNZCPD, IX86_BUILTIN_VTESTZPS,
3048         IX86_BUILTIN_VTESTCPS, IX86_BUILTIN_VTESTNZCPS,
3049         IX86_BUILTIN_VTESTZPD256, IX86_BUILTIN_VTESTCPD256,
3050         IX86_BUILTIN_VTESTNZCPD256, IX86_BUILTIN_VTESTZPS256,
3051         IX86_BUILTIN_VTESTCPS256, IX86_BUILTIN_VTESTNZCPS256,
3052         IX86_BUILTIN_PTESTZ256, IX86_BUILTIN_PTESTC256,
3053         IX86_BUILTIN_PTESTNZC256, IX86_BUILTIN_MOVMSKPD256
3054         and IX86_BUILTIN_MOVMSKPS256,
3055         (ix86_special_builtin_type): Add V32QI_FTYPE_PCCHAR,
3056         V8SF_FTYPE_PCV4SF, V8SF_FTYPE_PCFLOAT, V4DF_FTYPE_PCV2DF,
3057         V4DF_FTYPE_PCDOUBLE, V8SF_FTYPE_PCV8SF_V8SF,
3058         V4DF_FTYPE_PCV4DF_V4DF, V4SF_FTYPE_PCV4SF_V4SF,
3059         V2DF_FTYPE_PCV2DF_V2DF, VOID_FTYPE_PCHAR_V32QI,
3060         VOID_FTYPE_PFLOAT_V8SF, VOID_FTYPE_PDOUBLE_V4DF,
3061         VOID_FTYPE_PV8SF_V8SF_V8SF, VOID_FTYPE_PV4DF_V4DF_V4DF,
3062         VOID_FTYPE_PV4SF_V4SF_V4SF and VOID_FTYPE_PV2DF_V2DF_V2DF,
3063         (ix86_builtin_type): Add INT_FTYPE_V8SF_V8SF_PTEST,
3064         INT_FTYPE_V4DI_V4DI_PTEST, INT_FTYPE_V4DF_V4DF_PTEST,
3065         INT_FTYPE_V4SF_V4SF_PTEST, INT_FTYPE_V2DF_V2DF_PTEST,
3066         INT_FTYPE_V8SF, INT_FTYPE_V4DF, V8SI_FTYPE_V8SF, V8SI_FTYPE_V4SI,
3067         V8SF_FTYPE_V8SF, V8SF_FTYPE_V8SI, V8SF_FTYPE_V4SF,
3068         V4SI_FTYPE_V8SI, V4SI_FTYPE_V4DF, V4DF_FTYPE_V4DF,
3069         V4DF_FTYPE_V4SI, V4DF_FTYPE_V4SF, V4DF_FTYPE_V2DF,
3070         V4SF_FTYPE_V4DF, V4SF_FTYPE_V8SF, V2DF_FTYPE_V4DF,
3071         V8SF_FTYPE_V8SF_V8SF, V8SF_FTYPE_V8SF_V8SI,
3072         V4DF_FTYPE_V4DF_V4DF, V4DF_FTYPE_V4DF_V4DI,
3073         V4SF_FTYPE_V4SF_V4SI, V2DF_FTYPE_V2DF_V2DI,
3074         V8SF_FTYPE_V8SF_INT, V4SI_FTYPE_V8SI_INT, V4SF_FTYPE_V8SF_INT,
3075         V2DF_FTYPE_V4DF_INT, V4DF_FTYPE_V4DF_INT,
3076         V8SF_FTYPE_V8SF_V8SF_V8SF, V4DF_FTYPE_V4DF_V4DF_V4DF,
3077         V8SI_FTYPE_V8SI_V8SI_INT, V8SF_FTYPE_V8SF_V8SF_INT,
3078         V4DF_FTYPE_V4DF_V4DF_INT, V4DF_FTYPE_V4DF_V2DF_INT,
3079         V8SF_FTYPE_V8SF_V8SF_V8SI_INT, V4DF_FTYPE_V4DF_V4DF_V4DI_INT,
3080         V4SF_FTYPE_V4SF_V4SF_V4SI_INT and V2DF_FTYPE_V2DF_V2DF_V2DI_INT.
3081         (bdesc_special_args): Add IX86_BUILTIN_VZEROALL,
3082         IX86_BUILTIN_VZEROUPPER. IX86_BUILTIN_VZEROUPPER_REX64,
3083         IX86_BUILTIN_VBROADCASTSS, IX86_BUILTIN_VBROADCASTSD256,
3084         IX86_BUILTIN_VBROADCASTSS256, IX86_BUILTIN_VBROADCASTPD256,
3085         IX86_BUILTIN_VBROADCASTPS256, IX86_BUILTIN_LOADUPD256,
3086         IX86_BUILTIN_LOADUPS256, IX86_BUILTIN_STOREUPD256,
3087         IX86_BUILTIN_STOREUPS256, IX86_BUILTIN_LOADDQU256,
3088         IX86_BUILTIN_STOREDQU256, IX86_BUILTIN_LDDQU256,
3089         IX86_BUILTIN_MASKLOADPD, IX86_BUILTIN_MASKLOADPS,
3090         IX86_BUILTIN_MASKLOADPD256, IX86_BUILTIN_MASKLOADPS256,
3091         IX86_BUILTIN_MASKSTOREPD, IX86_BUILTIN_MASKSTOREPS,
3092         IX86_BUILTIN_MASKSTOREPD256 and IX86_BUILTIN_MASKSTOREPS256.
3093         (ix86_builtins): Add IX86_BUILTIN_ADDPD256,
3094         IX86_BUILTIN_ADDPS256, IX86_BUILTIN_ADDSUBPD256,
3095         IX86_BUILTIN_ADDSUBPS256, IX86_BUILTIN_ANDPD256,
3096         IX86_BUILTIN_ANDPS256, IX86_BUILTIN_ANDNPD256,
3097         IX86_BUILTIN_ANDNPS256, IX86_BUILTIN_DIVPD256,
3098         IX86_BUILTIN_DIVPS256, IX86_BUILTIN_HADDPD256,
3099         IX86_BUILTIN_HSUBPS256, IX86_BUILTIN_HSUBPD256,
3100         IX86_BUILTIN_HADDPS256, IX86_BUILTIN_MAXPD256,
3101         IX86_BUILTIN_MAXPS256, IX86_BUILTIN_MINPD256,
3102         IX86_BUILTIN_MINPS256, IX86_BUILTIN_MULPD256,
3103         IX86_BUILTIN_MULPS256, IX86_BUILTIN_ORPD256,
3104         IX86_BUILTIN_ORPS256, IX86_BUILTIN_SUBPD256,
3105         IX86_BUILTIN_SUBPS256, IX86_BUILTIN_XORPD256,
3106         IX86_BUILTIN_XORPS256, IX86_BUILTIN_VPERMILVARPD,
3107         IX86_BUILTIN_VPERMILVARPS, IX86_BUILTIN_VPERMILVARPD256,
3108         IX86_BUILTIN_VPERMILVARPS256, IX86_BUILTIN_BLENDPD256,
3109         IX86_BUILTIN_BLENDPS256, IX86_BUILTIN_BLENDVPD256,
3110         IX86_BUILTIN_BLENDVPS256, IX86_BUILTIN_DPPS256,
3111         IX86_BUILTIN_SHUFPD256, IX86_BUILTIN_SHUFPS256,
3112         IX86_BUILTIN_CMPSD, IX86_BUILTIN_CMPSS, IX86_BUILTIN_CMPPD,
3113         IX86_BUILTIN_CMPPS,
3114         IX86_BUILTIN_CMPPD256,IX86_BUILTIN_CMPPS256,
3115         IX86_BUILTIN_EXTRACTF128PD256, IX86_BUILTIN_EXTRACTF128PS256,
3116         IX86_BUILTIN_EXTRACTF128SI256, IX86_BUILTIN_CVTDQ2PD256,
3117         IX86_BUILTIN_CVTDQ2PS256, IX86_BUILTIN_CVTPD2PS256,
3118         IX86_BUILTIN_CVTPS2DQ256, IX86_BUILTIN_CVTPS2PD256,
3119         IX86_BUILTIN_CVTTPD2DQ256, IX86_BUILTIN_CVTPD2DQ256,
3120         IX86_BUILTIN_CVTTPS2DQ256, IX86_BUILTIN_VPERM2F128PD256,
3121         IX86_BUILTIN_VPERM2F128PS256, IX86_BUILTIN_VPERM2F128SI256,
3122         IX86_BUILTIN_VPERMILPD, IX86_BUILTIN_VPERMILPS,
3123         IX86_BUILTIN_VPERMILPD256, IX86_BUILTIN_VPERMILPS256,
3124         IX86_BUILTIN_VPERMIL2PD, IX86_BUILTIN_VPERMILPS,
3125         IX86_BUILTIN_VPERMILPD256, IX86_BUILTIN_VPERMILPS256,
3126         IX86_BUILTIN_VPERMIL2PD, IX86_BUILTIN_VPERMIL2PS,
3127         IX86_BUILTIN_VPERMIL2PD256, IX86_BUILTIN_VPERMIL2PS256,
3128         IX86_BUILTIN_VINSERTF128PD256, IX86_BUILTIN_VINSERTF128PS256,
3129         IX86_BUILTIN_VINSERTF128SI256, IX86_BUILTIN_MOVSHDUP256,
3130         IX86_BUILTIN_MOVSLDUP256, IX86_BUILTIN_MOVDDUP256,
3131         IX86_BUILTIN_SQRTPD256, IX86_BUILTIN_SQRTPS256,
3132         IX86_BUILTIN_SQRTPS_NR256, IX86_BUILTIN_RSQRTPS256,
3133         IX86_BUILTIN_RSQRTPS_NR256, IX86_BUILTIN_RCPPS256,
3134         IX86_BUILTIN_ROUNDPD256, IX86_BUILTIN_ROUNDPS256,
3135         IX86_BUILTIN_UNPCKHPD256, IX86_BUILTIN_UNPCKLPD256,
3136         IX86_BUILTIN_UNPCKHPS256, IX86_BUILTIN_UNPCKLPS256,
3137         IX86_BUILTIN_SI256_SI, IX86_BUILTIN_PS256_PS,
3138         IX86_BUILTIN_PD256_PD, IX86_BUILTIN_SI_SI256,
3139         IX86_BUILTIN_PS_PS256, IX86_BUILTIN_PD_PD256,
3140         IX86_BUILTIN_VTESTZPD, IX86_BUILTIN_VTESTCPD,
3141         IX86_BUILTIN_VTESTNZCPD, IX86_BUILTIN_VTESTZPS,
3142         IX86_BUILTIN_VTESTCPS, IX86_BUILTIN_VTESTNZCPS,
3143         IX86_BUILTIN_VTESTZPD256, IX86_BUILTIN_VTESTCPD256,
3144         IX86_BUILTIN_VTESTNZCPD256, IX86_BUILTIN_VTESTZPS256,
3145         IX86_BUILTIN_VTESTCPS256, IX86_BUILTIN_VTESTNZCPS256,
3146         IX86_BUILTIN_PTESTZ256, IX86_BUILTIN_PTESTC256,
3147         IX86_BUILTIN_PTESTNZC256, IX86_BUILTIN_MOVMSKPD256 and
3148         IX86_BUILTIN_MOVMSKPS256.
3149         (ix86_init_mmx_sse_builtins): Support AVX builtins.
3150         (ix86_expand_args_builtin): Likewise.
3151         (ix86_expand_special_args_builtin): Likewise.
3152         (ix86_hard_regno_mode_ok): Handle AVX modes.
3153         (ix86_expand_vector_init_duplicate): Likewise.
3154         (ix86_expand_vector_init_one_nonzero): Likewise.
3155         (ix86_expand_vector_init_one_var): Likewise.
3156         (ix86_expand_vector_init_concat): Likewise.
3157         (ix86_expand_vector_init_general): Likewise.
3158         (ix86_expand_vector_set): Likewise.
3159         (ix86_vector_mode_supported_p): Likewise.
3160         (x86_extended_reg_mentioned_p): Check INSN_P before using
3161         PATTERN.
3162
3163         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3164         OPTION_MASK_ISA_AVX and OPTION_MASK_ISA_FMA.
3165
3166         * config/i386/i386.h (TARGET_AVX): New.
3167         (TARGET_FMA): Likewise.
3168         (TARGET_CPU_CPP_BUILTINS): Handle TARGET_AVX and TARGET_FMA.
3169         (BIGGEST_ALIGNMENT): Set to 256 for TARGET_AVX.
3170         (VALID_AVX256_REG_MODE): New.
3171         (AVX256_VEC_FLOAT_MODE_P): Likewise.
3172         (AVX_FLOAT_MODE_P): Likewise.
3173         (AVX128_VEC_FLOAT_MODE_P): Likewise.
3174         (AVX256_VEC_FLOAT_MODE_P): Likewise.
3175         (AVX_VEC_FLOAT_MODE_P): Likewise.
3176         (ASM_OUTPUT_AVX_PREFIX): Likewise.
3177         (ASM_OUTPUT_OPCODE): Likewise.
3178         (UNITS_PER_SIMD_WORD): Add a FIXME for 32byte vectorizer
3179         support.
3180         (SSE_REG_MODE_P): Allow 256bit vector modes.
3181         (ix86_args): Add a warn_avx field.
3182
3183         * config/i386/i386.md (UNSPEC_PCMP): New.
3184         (UNSPEC_VPERMIL): Likewise.
3185         (UNSPEC_VPERMIL2): Likewise.
3186         (UNSPEC_VPERMIL2F128): Likewise.
3187         (UNSPEC_MASKLOAD): Likewise.
3188         (UNSPEC_MASKSTORE): Likewise.
3189         (UNSPEC_CAST): Likewise.
3190         (UNSPEC_VTESTP): Likewise.
3191         (UNSPECV_VZEROALL): Likewise.
3192         (UNSPECV_VZEROUPPER): Likewise.
3193         (XMM0_REG): Likewise.
3194         (XMM1_REG): Likewise.
3195         (XMM2_REG): Likewise.
3196         (XMM3_REG): Likewise.
3197         (XMM4_REG): Likewise.
3198         (XMM5_REG): Likewise.
3199         (XMM6_REG): Likewise.
3200         (XMM8_REG): Likewise.
3201         (XMM9_REG): Likewise.
3202         (XMM10_REG): Likewise.
3203         (XMM11_REG): Likewise.
3204         (XMM12_REG): Likewise.
3205         (XMM13_REG): Likewise.
3206         (XMM14_REG): Likewise.
3207         (XMM15_REG): Likewise.
3208         (prefix): Likewise.
3209         (prefix_vex_imm8): Likewise.
3210         (prefix_vex_w): Likewise.
3211         (length_vex): Likewise.
3212         (maxmin): Likewise.
3213         (movoi): Likewise.
3214         (*avx_ashlti3): Likewise.
3215         (*avx_lshrti3): Likewise.
3216         (*avx_setcc<mode>): Likewise.
3217         (*fop_<mode>_comm_mixed_avx): Likewise.
3218         (*fop_<mode>_comm_avx): Likewise.
3219         (*fop_<mode>_1_mixed_avx): Likewise.
3220         (*fop_<mode>_1_avx): Likewise.
3221         (*avx_<code><mode>3): Likewise.
3222         (*avx_ieee_smin<mode>3): Likewise.
3223         (*avx_ieee_smax<mode>3): Likewise.
3224         (mode): Add OI, V8SF and V4DF.
3225         (length): Support VEX prefix.
3226         (*cmpfp_i_mixed): Set prefix attribute.
3227         (*cmpfp_i_sse): Likewise.
3228         (*cmpfp_iu_mixed): Likewise.
3229         (*cmpfp_iu_sse): Likewise.
3230         (*movsi_1): Support AVX.
3231         (*movdi_2): Likewise.
3232         (*movdi_1_rex64): Likewise.
3233         (*movti_internal): Likewise.
3234         (*movti_rex64): Likewise.
3235         (*movsf_1): Likewise.
3236         (*movdf_nointeger): Likewise.
3237         (*movdf_integer_rex64): Likewise.
3238         (*movtf_internal): Likewise.
3239         (zero_extendsidi2_32): Likewise.
3240         (zero_extendsidi2_rex64): Likewise.
3241         (*extendsfdf2_mixed): Likewise.
3242         (*extendsfdf2_sse): Likewise.
3243         (*truncdfsf_fast_mixed): Likewise.
3244         (*truncdfsf_fast_sse): Likewise.
3245         (*truncdfsf_mixed): Likewise.
3246         (fix_trunc<mode>di_sse): Likewise.
3247         (fix_trunc<mode>si_sse): Likewise.
3248         (*float<SSEMODEI24:mode><MODEF:mode>2_mixed_interunit): Likewise.
3249         (*float<SSEMODEI24:mode><MODEF:mode>2_mixed_nointerunit): Likewise.
3250         (*float<SSEMODEI24:mode><MODEF:mode>2_sse_interunit): Likewise.
3251         (*float<SSEMODEI24:mode><MODEF:mode>2_sse_nointerunit): Likewise.
3252         (*rcpsf2_sse): Likewise.
3253         (*rsqrtsf2_sse): Likewise.
3254         (*sqrt<mode>2_sse): Likewise.
3255         (sse4_1_round<mode>2): Likewise.
3256         (*sse_prologue_save_insn): Disallow REX prefix for AVX.
3257         Support AVX.  Set length attribute properly for AVX.
3258
3259         * config/i386/i386-modes.def (VECTOR_MODES (INT, 32)): New.
3260         (VECTOR_MODES (FLOAT, 32)): Likewise.
3261         (VECTOR_MODE (INT, DI, 8)): Likewise.
3262         (VECTOR_MODE (INT, HI, 32)): Likewise.
3263         (VECTOR_MODE (INT, QI, 64)): Likewise.
3264         (VECTOR_MODE (FLOAT, DF, 8)): Likewise.
3265         (VECTOR_MODE (FLOAT, SF, 16)): Likewise.
3266         (VECTOR_MODE (INT, DI, 4)): Removed.
3267         (VECTOR_MODE (INT, SI, 8)): Likewise.
3268         (VECTOR_MODE (INT, HI, 16)): Likewise.
3269         (VECTOR_MODE (INT, QI, 32)): Likewise.
3270         (VECTOR_MODE (FLOAT, SF, 8)): Likewise.
3271         (INT_MODE (OI, 32)): Likewise.
3272
3273         * config/i386/i386.opt (mavx): New.
3274         (mfma): Likewise.
3275
3276         * config/i386/i386-protos.h (ix86_attr_length_vex_default): New.
3277
3278         * config/i386/mmx.md (*mov<mode>_internal_rex64): Support AVX.
3279         (*mov<mode>_internal_avx): New.
3280         (*movv2sf_internal_rex64_avx): Likewise.
3281         (*movv2sf_internal_avx): Likewise.
3282
3283         * config/i386/predicates.md (const_4_to_5_operand): New.
3284         (const_6_to_7_operand): Likewise.
3285         (const_8_to_11_operand): Likewise.
3286         (const_12_to_15_operand): Likewise.
3287         (avx_comparison_float_operator): Likewise.
3288
3289         * config/i386/sse.md (AVX256MODEI): New.
3290         (AVX256MODE): Likewise.
3291         (AVXMODEQI): Likewise.
3292         (AVXMODE): Likewise.
3293         (AVX256MODEF2P): Likewise.
3294         (AVX256MODE2P): Likewise.
3295         (AVX256MODE4P): Likewise.
3296         (AVX256MODE8P): Likewise.
3297         (AVXMODEF2P): Likewise.
3298         (AVXMODEF4P): Likewise.
3299         (AVXMODEDCVTDQ2PS): Likewise.
3300         (AVXMODEDCVTPS2DQ): Likewise.
3301         (avxvecmode): Likewise.
3302         (avxvecpsmode): Likewise.
3303         (avxhalfvecmode): Likewise.
3304         (avxscalarmode): Likewise.
3305         (avxcvtvecmode): Likewise.
3306         (avxpermvecmode): Likewise.
3307         (avxmodesuffixf2c): Likewise.
3308         (avxmodesuffixp): Likewise.
3309         (avxmodesuffixs): Likewise.
3310         (avxmodesuffix): Likewise.
3311         (vpermilbits): Likewise.
3312         (pinsrbits): Likewise.
3313         (mov<mode>): Likewise.
3314         (*mov<mode>_internal): Likewise.
3315         (push<mode>1): Likewise.
3316         (movmisalign<mode>): Likewise.
3317         (avx_movup<avxmodesuffixf2c><avxmodesuffix>): Likewise.
3318         (avx_movdqu<avxmodesuffix>): Likewise.
3319         (avx_lddqu<avxmodesuffix>): Likewise.
3320         (<plusminus_insn><mode>3): Likewise.
3321         (*avx_<plusminus_insn><mode>3): Likewise.
3322         (*avx_vm<plusminus_insn><mode>3): Likewise.
3323         (mul<mode>3): Likewise.
3324         (*avx_mul<mode>3): Likewise.
3325         (*avx_vmmul<mode>3): Likewise.
3326         (divv8sf3): Likewise.
3327         (divv4df3): Likewise.
3328         (avx_div<mode>3): Likewise.
3329         (*avx_div<mode>3): Likewise.
3330         (*avx_vmdiv<mode>3): Likewise.
3331         (avx_rcpv8sf2): Likewise.
3332         (*avx_vmrcpv4sf2): Likewise.
3333         (sqrtv8sf2): Likewise.
3334         (avx_sqrtv8sf2): Likewise.
3335         (*avx_vmsqrt<mode>2): Likewise.
3336         (rsqrtv8sf2): Likewise.
3337         (avx_rsqrtv8sf2): Likewise.
3338         (*avx_vmrsqrtv4sf2): Likewise.
3339         (<code><mode>3): Likewise.
3340         (*avx_<code><mode>3_finite): Likewise.
3341         (*avx_<code><mode>3): Likewise.
3342         (*avx_vm<code><mode>3): Likewise.
3343         (*avx_ieee_smin<mode>3): Likewise.
3344         (*avx_ieee_smax<mode>3): Likewise.
3345         (avx_addsubv8sf3): Likewise.
3346         (avx_addsubv4df3): Likewise.
3347         (*avx_addsubv4sf3): Likewise.
3348         (*avx_addsubv2df3): Likewise.
3349         (avx_h<plusminus_insn>v4df3): Likewise.
3350         (avx_h<plusminus_insn>v8sf3): Likewise.
3351         (*avx_h<plusminus_insn>v4sf3): Likewise.
3352         (*avx_h<plusminus_insn>v2df3): Likewise.
3353         (avx_cmpp<avxmodesuffixf2c><mode>3): Likewise.
3354         (avx_cmps<ssemodesuffixf2c><mode>3): Likewise.
3355         (*avx_maskcmp<mode>3): Likewise.
3356         (avx_nand<mode>3): Likewise.
3357         (*avx_<code><mode>3): Likewise.
3358         (*avx_nand<mode>3): Likewise.
3359         (*avx_<code><mode>3): Likewise.
3360         (*avx_cvtsi2ss): Likewise.
3361         (*avx_cvtsi2ssq): Likewise.
3362         (*avx_cvtsi2sd): Likewise.
3363         (*avx_cvtsi2sdq): Likewise.
3364         (*avx_cvtsd2ss): Likewise.
3365         (avx_cvtss2sd): Likewise.
3366         (avx_cvtdq2ps<avxmodesuffix>): Likewise.
3367         (avx_cvtps2dq<avxmodesuffix>): Likewise.
3368         (avx_cvttps2dq<avxmodesuffix>): Likewise.
3369         (*avx_cvtsi2sd): Likewise.
3370         (*avx_cvtsi2sdq): Likewise.
3371         (avx_cvtdq2pd256): Likewise.
3372         (avx_cvtpd2dq256): Likewise.
3373         (avx_cvttpd2dq256): Likewise.
3374         (*avx_cvtsd2ss): Likewise.
3375         (*avx_cvtss2sd): Likewise.
3376         (avx_cvtpd2ps256): Likewise.
3377         (avx_cvtps2pd256): Likewise.
3378         (*avx_movhlps): Likewise.
3379         (*avx_movlhps): Likewise.
3380         (avx_unpckhps256): Likewise.
3381         (*avx_unpckhps): Likewise.
3382         (avx_unpcklps256): Likewise.
3383         (*avx_unpcklps): Likewise.
3384         (avx_movshdup256): Likewise.