OSDN Git Service

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