OSDN Git Service

* doc/invoke.texi (IA-64 Options): Fix typo.
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2009-06-01  Nick Clifton  <nickc@redhat.com>
2
3         * doc/invoke.texi (IA-64 Options): Fix typo.
4
5 2009-06-01  Ira Rosen  <irar@il.ibm.com>
6
7         PR tree-optimization/39129
8         * tree-vect-loop-manip.c (conservative_cost_threshold): Change the 
9         printed message.
10         (vect_do_peeling_for_loop_bound): Use 
11         LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT and
12         LOOP_REQUIRES_VERSIONING_FOR_ALIAS macros.
13         (vect_loop_versioning): Likewise.
14         (vect_create_cond_for_alias_checks): Fix indentation.
15         * tree-vectorizer.h (struct _loop_vec_info): Fix indentation of the 
16         macros.
17         (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT): Define.
18         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Likewise.
19         * tree-vect-loop.c (vect_analyze_loop_form): Change "too many BBs" to 
20         "control flow in loop".
21         (vect_estimate_min_profitable_iters): Use 
22         LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT and
23         LOOP_REQUIRES_VERSIONING_FOR_ALIAS macros.
24         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
25         (vect_create_data_ref_ptr): Don't mention array dimension in printing.
26         * tree-vect-stmts.c (vectorizable_store): Replace the check that the 
27         statement belongs to a group of strided accesses with the exact code 
28         check.
29         (vectorizable_load): Likewise.
30         * tree-vect-slp.c (vect_analyze_slp_instance): Spell out "basic block".
31         (vect_slp_analyze_bb, vect_slp_transform_bb): Likewise.
32
33 2009-06-01  Gerald Pfeifer  <gerald@pfeifer.com>
34
35         * config/freebsd-stdint.h: New file.
36         * config.gcc (*-*-freebsd): Set use_gcc_stdint=wrap.
37         Add freebsd-stdint.h to tm_file.
38
39 2009-06-01  Richard Earnshaw  <rearnsha@arm.com>
40
41         * arm/thumb2.md (thumb2_zero_extendhidi2): New insn and split.
42         (thumb2_extendhidi2): Likewise.
43
44 2009-05-31  Ian Lance Taylor  <iant@google.com>
45
46         * regstat.c (regstat_n_sets_and_refs): Remove duplicate
47         definition.
48
49 2009-05-31  Ian Lance Taylor  <iant@google.com>
50
51         * Makefile.in (except.o): Depend upon gt-except.h, not
52         gt-$(EXCEPT_H).
53         (ipa-cp.o): Depend upon $(FIBHEAP_H) and $(PARAMS_H).
54         (ipa-reference.o): Depend upon gt-ipa-reference.h.
55
56 2009-05-31  Jason Merrill  <jason@redhat.com>
57
58         * tree-pretty-print.c (print_call_name): Take the callee, not the
59         call itself.  Make non-static.  Use dump_function_name for
60         functions.
61         (dump_generic_node): Adjust.
62         * diagnostic.h: Declare print_call_name.
63         * gimple-pretty-print.c (dump_gimple_call): Use it.
64
65 2009-05-31  Kaz Kojima  <kkojima@gcc.gnu.org>
66
67         * config/sh/sh.md (ashldi3_std): New define_expand.
68         (ashldi3): Use it.
69
70 2009-05-31  Kaz Kojima  <kkojima@gcc.gnu.org>
71
72         PR target/40313
73         * config/sh/sh.c: Include debug.h.
74         (sh_expand_epilogue): Emit a blockage insn before the frame
75         pointer adjustment also when dwarf2out_do_frame returns true.
76
77 2009-05-31  Richard Earnshaw  <rearnsha@arm.com>
78
79         * arm/thumb2.md (thumb2_extendsidi2): Add a split sub-pattern.
80         (thumb2_extendqidi2): New pattern.
81
82 2009-05-31  Ira Rosen  <irar@il.ibm.com>
83
84         * tree-vect-loop-manip.c (slpeel_update_phi_nodes_for_guard1): Don't
85         mark phis for renaming.
86         * tree-vectorizer.c (vect_memsyms_to_rename): Remove.
87         (vectorize_loops): Don't allocate and free vect_memsyms_to_rename.
88         Call mark_sym_for_renaming.
89         * tree-vectorizer.h (vect_memsyms_to_rename): Remove.
90         * tree-vect-loop.c (vect_transform_loop): Remove vect_memsyms_to_rename
91         initialization and a call to mark_set_for_renaming.
92
93 2009-05-31  Jakub Jelinek  <jakub@redhat.com>
94
95         PR middle-end/40304
96         * config/i386/i386.c (pro_epilogue_adjust_stack): Mark insns
97         frame related even if !set_cfa && style < 0.
98
99 2009-05-30  Kai Tietz  <kai.tietz@onevision.com>
100
101         * config/i386/mingw-tls.c: New file.
102         * config/i386/t-gthr-win32 (LIB2FUNCS_EXTRA): Add
103         mingw-tls.c file.
104         * gthr-win32.h (MINGW32_SUPPORTS_MT_EH): Define
105         it for targets defining _WIN32 but not __CYGWIN__.
106
107 2009-05-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
108
109         * configure.ac: Add MPC support.
110         
111         * config.in, configure: Regenerate.     
112
113 2009-05-29  Richard Henderson  <rth@redhat.com>
114
115         * cfgcleanup.c (try_crossjump_to_edge): Only skip past
116         NOTE_INSN_BASIC_BLOCK.
117         * cfglayout.c (duplicate_insn_chain): Copy epilogue insn marks.
118         Duplicate NOTE_INSN_EPILOGUE_BEG notes.
119         * cfgrtl.c (can_delete_note_p): Allow NOTE_INSN_EPILOGUE_BEG
120         to be deleted.
121         * dwarf2out.c (struct cfa_loc): Change indirect field to bitfield,
122         add in_use field.
123         (add_cfi): Disable check redefining cfa away from drap.
124         (lookup_cfa_1): Add remember argument; handle remember/restore.
125         (lookup_cfa): Pass remember argument.
126         (cfa_remember): New.
127         (compute_barrier_args_size_1): Remove sibcall check.
128         (dwarf2out_frame_debug_def_cfa): New.
129         (dwarf2out_frame_debug_adjust_cfa): New.
130         (dwarf2out_frame_debug_cfa_offset): New.
131         (dwarf2out_frame_debug_cfa_register): New.
132         (dwarf2out_frame_debug_cfa_restore): New.
133         (dwarf2out_frame_debug): Handle REG_CFA_* notes.
134         (dwarf2out_begin_epilogue): New.
135         (dwarf2out_frame_debug_restore_state): New.
136         (dw_cfi_oprnd1_desc): Handle DW_CFA_remember_state,
137         DW_CFA_restore_state.
138         (output_cfi_directive): Likewise.
139         (convert_cfa_to_fb_loc_list): Likewise.
140         (dw_cfi_oprnd1_desc): Handle DW_CFA_restore.
141         * dwarf2out.h: Update.
142         * emit-rtl.c (try_split): Don't split RTX_FRAME_RELATED_P.
143         (copy_insn_1): Early out for null.
144         * final.c (final_scan_insn): Call dwarf2out_begin_epilogue
145         and dwarf2out_frame_debug_restore_state.
146         * function.c (prologue, epilogue, sibcall_epilogue): Remove.
147         (prologue_insn_hash, epilogue_insn_hash): New.
148         (free_after_compilation): Adjust freeing accordingly.
149         (record_insns): Create hash table if needed; push insns into
150         hash instead of array.
151         (maybe_copy_epilogue_insn): New.
152         (contains): Search hash table instead of array.
153         (sibcall_epilogue_contains): Remove.
154         (thread_prologue_and_epilogue_insns): Split eh_return insns
155         and mark them as epilogues.
156         (reposition_prologue_and_epilogue_notes): Rewrite epilogue
157         scanning in terms of basic blocks.
158         * insn-notes.def (CFA_RESTORE_STATE): New.
159         * jump.c (returnjump_p_1): Accept EH_RETURN.
160         (eh_returnjump_p_1, eh_returnjump_p): New.
161         * reg-notes.def (CFA_DEF_CFA, CFA_ADJUST_CFA, CFA_OFFSET,
162         CFA_REGISTER, CFA_RESTORE): New.
163         * rtl.def (EH_RETURN): New.
164         * rtl.h (eh_returnjump_p, maybe_copy_epilogue_insn): Declare.
165
166         * config/bfin/bfin.md (UNSPEC_VOLATILE_EH_RETURN): Remove.
167         (eh_return_internal): Use eh_return rtx; split w/ epilogue.
168
169         * config/i386/i386.c (gen_push): Update cfa state.
170         (pro_epilogue_adjust_stack): Add set_cfa argument.  When true,
171         add a CFA_ADJUST_CFA note.
172         (ix86_dwarf_handle_frame_unspec): Remove.
173         (ix86_expand_prologue): Update cfa state.
174         (ix86_emit_restore_reg_using_pop): New.
175         (ix86_emit_restore_regs_using_pop): New.
176         (ix86_emit_leave): New.
177         (ix86_emit_restore_regs_using_mov): Add CFA_RESTORE notes.
178         (ix86_expand_epilogue): Add notes for unwinding the epilogue.
179         * config/i386/i386.h (struct machine_cfa_state): New.
180         (ix86_cfa_state): New.
181         * config/i386/i386.md (UNSPEC_EH_RETURN): Remove.
182         (eh_return_internal): Merge from eh_return_<mode>,
183         use eh_return rtx, split w/ epilogue.
184
185 2009-05-29  Ian Lance Taylor  <iant@google.com>
186
187         * builtins.c (validate_gimple_arglist): Don't use va_arg with
188         enum type.
189         * calls.c (emit_library_call_value_1): Likewise.
190
191         * c-typeck.c (c_build_va_arg): New function.
192         * c-tree.h (c_build_va_arg): Declare.
193         * c-parser.c (c_parser_postfix_expression): Call c_build_va_arg
194         instead of build_va_arg.
195
196 2009-05-29  Eric Botcazou  <ebotcazou@adacore.com>
197
198         * tree-ssa-loop-ivopts.c (strip_offset_1) <MULT_EXPR>: New case.
199         (force_expr_to_var_cost) <NEGATE_EXPR>: Likewise.
200         (ptr_difference_cost): Use affine combinations to compute it.
201         (difference_cost): Likewise.
202         (get_computation_cost_at): Compute more accurate cost for addresses
203         if the ratio is a multiplier allowed in addresses.
204         For non-addresses, consider that an additional offset or symbol is
205         added only once.
206
207 2009-05-29  Jakub Jelinek  <jakub@redhat.com>
208
209         * config/i386/i386.c (ix86_decompose_address): Avoid useless
210         0 displacement.  Add 0 displacement if base is %[er]bp or %r13.
211
212         * config/i386/i386.md (prefix_data16, prefix_rep): Set to 0 for
213         TYPE_SSE{MULADD,4ARG,IADD1,CVT1} by default.
214         (prefix_rex): For UNIT_MMX don't imply the prefix by default
215         if MODE_DI.
216         (prefix_extra): Default to 2 for TYPE_SSE{MULADD,4ARG} and
217         to 1 for TYPE_SSE{IADD1,CVT1}.
218         (prefix_vex_imm8): Removed.
219         (length_vex): Only pass 1 as second argument to
220         ix86_attr_length_vex_default if prefix_extra is 0.
221         (modrm): For TYPE_INCDEC only set to 0 if not TARGET_64BIT.
222         (length): For prefix vex computation use length_immediate
223         attribute instead of prefix_vex_imm8.
224         (cmpqi_ext_3_insn, cmpqi_ext_3_insn_rex64,
225         addqi_ext_1, addqi_ext_1_rex64, *testqi_ext_0, andqi_ext_0,
226         *andqi_ext_0_cc, *iorqi_ext_0, *xorqi_ext_0, *xorqi_cc_ext_1,
227         *xorqi_cc_ext_1_rex64): Override modrm attribute to 1.
228         (extendsidi2_rex64, extendhidi2, extendqidi2, extendhisi2,
229         *extendhisi2_zext, extendqihi2, extendqisi2, *extendqisi2_zext): Emit
230         a space in between the operands.
231         (*anddi_1_rex64, *andsi_1): Likewise.  Override prefix_rex to 1
232         if one operand is 0xff and the other one si, di, bp or sp.
233         (*andhi_1): Override prefix_rex to 1 if one operand is 0xff and the
234         other one si, di, bp or sp.
235         (*btsq, *btrq, *btcq, *btdi_rex64, *btsi): Add mode attribute.
236         (*ffssi_1, *ffsdi_1, ctzsi2, ctzdi2): Add
237         type and mode attributes.
238         (*bsr, *bsr_rex64, *bsrhi): Add type attribute.
239         (*cmpfp_i_mixed, *cmpfp_iu_mixed): For TYPE_SSECOMI, clear
240         prefix_rep attribute and set prefix_data16 attribute iff MODE_DF.
241         (*cmpfp_i_sse, *cmpfp_iu_sse): Clear prefix_rep attribute and set
242         prefix_data16 attribute iff MODE_DF.
243         (*movsi_1): For TYPE_SSEMOV MODE_SI set prefix_data16 attribute.
244         (fix_trunc<mode>di_sse): Set prefix_rex attribute.
245         (*adddi_4_rex64, *addsi_4): Use const128_operand instead of
246         constm128_operand in length_immediate computation.
247         (*addhi_4): Likewise.  Fix mode attribute to MODE_HI.
248         (anddi_1_rex64): Use movzbl/movzwl instead of movzbq/movzwq.
249         (*avx_ashlti3, sse2_ashlti3, *avx_lshrti3, sse2_lshrti3): Set
250         length_immediate attribute to 1.
251         (x86_fnstsw_1, x86_fnstcw_1, x86_fldcw_1): Fix length attribute.
252         (*movdi_1_rex64): Override prefix_rex or prefix_data16 attributes
253         for certain alternatives.
254         (*movdf_nointeger, *movdf_integer_rex64, *movdf_integer): Override
255         prefix_data16 attribute if MODE_V1DF.
256         (*avx_setcc<mode>, *sse_setcc<mode>, *sse5_setcc<mode>): Set
257         length_immediate to 1.
258         (set_got_rex64, set_rip_rex64): Remove length attribute, set
259         length_address to 4, set mode attribute to MODE_DI.
260         (set_got_offset_rex64): Likewise.  Set length_immediate to 0.
261         (fxam<mode>2_i387): Set length attribute to 4.
262         (*prefetch_sse, *prefetch_sse_rex, *prefetch_3dnow,
263         *prefetch_3dnow_rex): Override length_address attribute.
264         (sse4_2_crc32<mode>): Override prefix_data16 and prefix_rex
265         attributes.
266         * config/i386/predicates.md (ext_QIreg_nomode_operand): New predicate.
267         (constm128_operand): Removed.
268         * config/i386/i386.c (memory_address_length): For
269         disp && !index && !base in 64-bit mode account for SIB byte if
270         print_operand_address can't optimize disp32 into disp32(%rip)
271         and UNSPEC doesn't imply (%rip) addressing.  Add 1 to length
272         for fs: or gs: segment.
273         (ix86_attr_length_immediate_default): When checking if shortform
274         is possible, truncate immediate to the length of the non-shortened
275         immediate.
276         (ix86_attr_length_address_default): Ignore MEM_P operands
277         with X constraint.
278         (ix86_attr_length_vex_default): Only check for DImode on
279         GENERAL_REG_P operands.
280         * config/i386/sse.md (<sse>_comi, <sse>_ucomi): Clear
281         prefix_rep attribute, set prefix_data16 attribute iff MODE_DF.
282         (sse_cvttps2pi): Clear prefix_rep attribute.
283         (sse2_cvttps2dq, *sse2_cvtpd2dq, sse2_cvtps2pd): Clear prefix_data16
284         attribute.
285         (*sse2_cvttpd2dq): Don't clear prefix_rep attribute.
286         (*avx_ashr<mode>3, ashr<mode>3, *avx_lshr<mode>3, lshr<mode>3,
287         *avx_ashl<mode>3, ashl<mode>3): Set length_immediate attribute to 1
288         iff operand 2 is const_int_operand.
289         (*vec_dupv4si, avx_shufpd256_1, *avx_shufpd_<mode>,
290         sse2_shufpd_<mode>): Set length_immediate attribute to 1.
291         (sse2_pshufd_1): Likewise.  Set prefix attribute to maybe_vex
292         instead of vex.
293         (sse2_pshuflw_1, sse2_pshufhw_1): Set length_immediate to 1 and clear
294         prefix_data16.
295         (sse2_unpckhpd, sse2_unpcklpd, sse2_storehpd, *vec_concatv2df): Set
296         prefix_data16 attribute for movlpd and movhpd instructions.
297         (sse2_loadhpd, sse2_loadlpd, sse2_movsd): Likewise.  Override
298         length_immediate for shufpd instruction.
299         (sse2_movntsi, sse3_lddqu): Clear prefix_data16 attribute.
300         (avx_cmpp<avxmodesuffixf2c><mode>3,
301         avx_cmps<ssemodesuffixf2c><mode>3, *avx_maskcmp<mode>3,
302         <sse>_maskcmp<mode>3, <sse>_vmmaskcmp<mode>3,
303         avx_shufps256_1, *avx_shufps_<mode>, sse_shufps_<mode>,
304         *vec_dupv4sf_avx, *vec_dupv4sf): Set
305         length_immediate attribute to 1.
306         (*avx_cvtsi2ssq, *avx_cvtsi2sdq): Set length_vex attribute to 4.
307         (sse_cvtsi2ssq, sse2_cvtsi2sdq): Set prefix_rex attribute to 1.
308         (sse2_cvtpi2pd, sse_loadlps, sse2_storelpd): Override
309         prefix_data16 attribute for the first alternative to 1.
310         (*avx_loadlps): Override length_immediate for the first alternative.
311         (*vec_concatv2sf_avx): Override length_immediate and prefix_extra
312         attributes for second alternative.
313         (*vec_concatv2sf_sse4_1): Override length_immediate and
314         prefix_data16 attributes for second alternative.
315         (*vec_setv4sf_avx, *avx_insertps, vec_extract_lo_<mode>,
316         vec_extract_hi_<mode>, vec_extract_lo_v16hi,
317         vec_extract_hi_v16hi, vec_extract_lo_v32qi,
318         vec_extract_hi_v32qi): Set prefix_extra and length_immediate to 1.
319         (*vec_setv4sf_sse4_1, sse4_1_insertps, *sse4_1_extractps): Set
320         prefix_data16 and length_immediate to 1.
321         (*avx_mulv2siv2di3, *avx_mulv4si3, sse4_2_gtv2di3): Set prefix_extra
322         to 1.
323         (*avx_<code><mode>3, *avx_eq<mode>3, *avx_gt<mode>3): Set
324         prefix_extra attribute for variants that don't have 0f prefix
325         alone.
326         (*avx_pinsr<ssevecsize>): Likewise.  Set length_immediate to 1.
327         (*sse4_1_pinsrb, *sse2_pinsrw, *sse4_1_pinsrd, *sse4_1_pextrb,
328         *sse4_1_pextrb_memory, *sse2_pextrw, *sse4_1_pextrw_memory,
329         *sse4_1_pextrd): Set length_immediate to 1.
330         (*sse4_1_pinsrd): Likewise.  Set prefix_extra to 1.
331         (*sse4_1_pinsrq, *sse4_1_pextrq): Set prefix_rex and length_immediate
332         to 1.
333         (*vec_extractv2di_1_rex64_avx, *vec_extractv2di_1_rex64,
334         *vec_extractv2di_1_avx, *vec_extractv2di_1_sse2): Override
335         length_immediate to 1 for second alternative.
336         (*vec_concatv2si_avx, *vec_concatv2di_rex64_avx): Override
337         prefix_extra and length_immediate attributes for the first
338         alternative.
339         (vec_concatv2si_sse4_1): Override length_immediate to 1 for the
340         first alternative.
341         (*vec_concatv2di_rex64_sse4_1): Likewise.  Override prefix_rex
342         to 1 for the first and third alternative.
343         (*vec_concatv2di_rex64_sse): Override prefix_rex to 1 for the second
344         alternative.
345         (*sse2_maskmovdqu, *sse2_maskmovdqu_rex64): Override length_vex
346         attribute.
347         (*sse_sfence, sse2_mfence, sse2_lfence): Override length_address
348         attribute to 0.
349         (*avx_phaddwv8hi3, *avx_phadddv4si3, *avx_phaddswv8hi3,
350         *avx_phsubwv8hi3, *avx_phsubdv4si3, *avx_phsubswv8hi,
351         *avx_pmaddubsw128, *avx_pmulhrswv8hi3, *avx_pshufbv16qi3,
352         *avx_psign<mode>3): Set prefix_extra attribute to 1.
353         (ssse3_phaddwv4hi3, ssse3_phadddv2si3, ssse3_phaddswv4hi3,
354         ssse3_phsubwv4hi3, ssse3_phsubdv2si3, ssse3_phsubswv4hi3,
355         ssse3_pmaddubsw, *ssse3_pmulhrswv4hi, ssse3_pshufbv8qi3,
356         ssse3_psign<mode>3): Override prefix_rex attribute.
357         (*avx_palignrti): Override prefix_extra and length_immediate
358         to 1.
359         (ssse3_palignrti): Override length_immediate to 1.
360         (ssse3_palignrdi): Override length_immediate to 1, override
361         prefix_rex attribute.
362         (abs<mode>2): Override prefix_rep to 0, override prefix_rex
363         attribute.
364         (sse4a_extrqi): Override length_immediate to 2.
365         (sse4a_insertqi): Likewise.  Override prefix_data16 to 0.
366         (sse4a_insertq): Override prefix_data16 to 0.
367         (avx_blendp<avxmodesuffixf2c><avxmodesuffix>,
368         avx_blendvp<avxmodesuffixf2c><avxmodesuffix>,
369         avx_dpp<avxmodesuffixf2c><avxmodesuffix>, *avx_mpsadbw,
370         *avx_pblendvb, *avx_pblendw, avx_roundp<avxmodesuffixf2c>256,
371         avx_rounds<avxmodesuffixf2c>256): Override prefix_extra
372         and length_immediate to 1.
373         (sse4_1_blendp<ssemodesuffixf2c>, sse4_1_dpp<ssemodesuffixf2c>,
374         sse4_2_pcmpestr, sse4_2_pcmpestri, sse4_2_pcmpestrm,
375         sse4_2_pcmpestr_cconly, sse4_2_pcmpistr, sse4_2_pcmpistri,
376         sse4_2_pcmpistrm, sse4_2_pcmpistr_cconly): Override prefix_data16
377         and length_immediate to 1.
378         (sse4_1_blendvp<ssemodesuffixf2c>): Override prefix_data16 to 1.
379         (sse4_1_mpsadbw, sse4_1_pblendw): Override length_immediate to 1.
380         (*avx_packusdw, avx_vtestp<avxmodesuffixf2c><avxmodesuffix>,
381         avx_ptest256): Override prefix_extra to 1.
382         (sse4_1_roundp<ssemodesuffixf2c>, sse4_1_rounds<ssemodesuffixf2c>):
383         Override prefix_data16 and length_immediate to 1.
384         (sse5_pperm_zero_v16qi_v8hi, sse5_pperm_sign_v16qi_v8hi,
385         sse5_pperm_zero_v8hi_v4si, sse5_pperm_sign_v8hi_v4si,
386         sse5_pperm_zero_v4si_v2di, sse5_pperm_sign_v4si_v2di,
387         sse5_vrotl<mode>3, sse5_ashl<mode>3, sse5_lshl<mode>3): Override
388         prefix_data16 to 0 and prefix_extra to 2.
389         (sse5_rotl<mode>3, sse5_rotr<mode>3): Override length_immediate to 1.
390         (sse5_frcz<mode>2, sse5_vmfrcz<mode>2): Don't override prefix_extra
391         attribute.
392         (*sse5_vmmaskcmp<mode>3, sse5_com_tf<mode>3,
393         sse5_maskcmp<mode>3, sse5_maskcmp<mode>3, sse5_maskcmp_uns<mode>3):
394         Override prefix_data16 and prefix_rep to 0, length_immediate to 1
395         and prefix_extra to 2.
396         (sse5_maskcmp_uns2<mode>3, sse5_pcom_tf<mode>3): Override
397         prefix_data16 to 0, length_immediate to 1 and prefix_extra to 2.
398         (*avx_aesenc, *avx_aesenclast, *avx_aesdec, *avx_aesdeclast,
399         avx_vpermilvar<mode>3,
400         avx_vbroadcasts<avxmodesuffixf2c><avxmodesuffix>,
401         avx_vbroadcastss256, avx_vbroadcastf128_p<avxmodesuffixf2c>256,
402         avx_maskloadp<avxmodesuffixf2c><avxmodesuffix>,
403         avx_maskstorep<avxmodesuffixf2c><avxmodesuffix>):
404         Override prefix_extra to 1.
405         (aeskeygenassist, pclmulqdq): Override length_immediate to 1.
406         (*vpclmulqdq, avx_vpermil<mode>, avx_vperm2f128<mode>3,
407         vec_set_lo_<mode>, vec_set_hi_<mode>, vec_set_lo_v16hi,
408         vec_set_hi_v16hi, vec_set_lo_v32qi, vec_set_hi_v32qi): Override
409         prefix_extra and length_immediate to 1.
410         (*avx_vzeroall, avx_vzeroupper, avx_vzeroupper_rex64): Override
411         modrm to 0.
412         (*vec_concat<mode>_avx): Override prefix_extra and length_immediate
413         to 1 for the first alternative.
414         * config/i386/mmx.md (*mov<mode>_internal_rex64): Override
415         prefix_rep, prefix_data16 and/or prefix_rex attributes in certain
416         cases.
417         (*mov<mode>_internal_avx, *movv2sf_internal_rex64,
418         *movv2sf_internal_avx, *movv2sf_internal): Override
419         prefix_rep attribute for certain alternatives.
420         (*mov<mode>_internal): Override prefix_rep or prefix_data16
421         attributes for certain alternatives.
422         (*movv2sf_internal_rex64_avx): Override prefix_rep and length_vex
423         attributes for certain alternatives.
424         (*mmx_addv2sf3, *mmx_subv2sf3, *mmx_mulv2sf3,
425         *mmx_<code>v2sf3_finite, *mmx_<code>v2sf3, mmx_rcpv2sf2,
426         mmx_rcpit1v2sf3, mmx_rcpit2v2sf3, mmx_rsqrtv2sf2, mmx_rsqit1v2sf3,
427         mmx_haddv2sf3, mmx_hsubv2sf3, mmx_addsubv2sf3,
428         *mmx_eqv2sf3, mmx_gtv2sf3, mmx_gev2sf3, mmx_pf2id, mmx_pf2iw,
429         mmx_pi2fw, mmx_floatv2si2, mmx_pswapdv2sf2, *mmx_pmulhrwv4hi3,
430         mmx_pswapdv2si2): Set prefix_extra attribute to 1.
431         (mmx_ashr<mode>3, mmx_lshr<mode>3, mmx_ashl<mode>3): Set
432         length_immediate to 1 if operand 2 is const_int_operand.
433         (*mmx_pinsrw, mmx_pextrw, mmx_pshufw_1, *vec_dupv4hi,
434         *vec_extractv2si_1): Set length_immediate
435         attribute to 1.
436         (*mmx_uavgv8qi3): Override prefix_extra attribute to 1 if
437         using old 3DNOW insn rather than SSE/3DNOW_A.
438         (mmx_emms, mmx_femms): Clear modrm attribute.
439
440 2009-05-29  Martin Jambor  <mjambor@suse.cz>
441
442         * tree-sra.c:  New implementation of SRA.
443
444         * params.def (PARAM_SRA_MAX_STRUCTURE_SIZE): Removed.
445         (PARAM_SRA_MAX_STRUCTURE_COUNT): Removed.
446         (PARAM_SRA_FIELD_STRUCTURE_RATIO): Removed.
447         * params.h (SRA_MAX_STRUCTURE_SIZE): Removed.
448         (SRA_MAX_STRUCTURE_COUNT): Removed.
449         (SRA_FIELD_STRUCTURE_RATIO): Removed.
450         * doc/invoke.texi (sra-max-structure-size): Removed.
451         (sra-field-structure-ratio): Removed.
452
453 2009-05-29  Jakub Jelinek  <jakub@redhat.com>
454
455         PR middle-end/40291
456         * builtins.c (expand_builtin_memcmp): Convert len to sizetype
457         before expansion.
458
459 2009-05-29  Andrey Belevantsev  <abel@ispras.ru>
460
461         PR rtl-optimization/40101
462         * sel-sched-ir.c (get_seqno_by_preds): Allow returning negative
463         seqno.  Adjust comment.
464         * sel-sched.c (find_seqno_for_bookkeeping): Assert that when 
465         inserting bookkeeping before a jump, the jump is not scheduled.
466         When no positive seqno found, provide a value.  Add comment.
467
468 2009-05-29  Richard Guenther  <rguenther@suse.de>
469
470         * tree-ssa-alias.c (nonaliasing_component_refs_p): Remove
471         short-cutting on the first component.
472
473 2009-05-29  Jakub Jelinek  <jakub@redhat.com>
474
475         PR middle-end/39958
476         * omp-low.c (scan_omp_1_op): Call remap_type on TREE_TYPE
477         for trees other than decls/types.
478
479 2009-05-29  Richard Guenther  <rguenther@suse.de>
480
481         * tree-ssa-operands.c (get_expr_operands): Do not handle
482         INDIRECT_REFs in the handled-component case.  Remove
483         unused get_ref_base_and_extent case.
484         * tree-dfa.c (get_ref_base_and_extent): Avoid calling
485         tree_low_cst and host_integerp where possible.
486         * tree-ssa-structalias.c (equiv_class_label_eq): Check hash
487         codes for equivalence.
488         * dce.c (find_call_stack_args): Avoid redundant bitmap queries.
489
490 2009-05-29  David Billinghurst <billingd@gcc.gnu.org>
491
492         * config.gcc: Add i386/t-fprules-softfp and soft-fp/t-softfp
493         to tmake_file for i[34567]86-*-cygwin*. 
494
495 2009-05-29  Jakub Jelinek  <jakub@redhat.com>
496
497         PR target/40017
498         * config/rs6000/rs6000-c.c (_Bool_keyword): New variable.
499         (altivec_categorize_keyword, init_vector_keywords,
500         rs6000_cpu_cpp_builtins): Define _Bool as conditional macro
501         similar to bool.
502
503 2009-05-29  Kai Tietz  <kai.tietz@onevision.com>
504
505         * tree.c (handle_dll_attribute): Check if node is
506         of kind FUNCTION_DECL for DECL_DECLARED_INLINE_P check.
507
508 2009-05-29  Richard Earnshaw  <rearnsha@arm.com>
509
510         * config/arm/thumb2.md (thumb2_zero_extendsidi2): Add a split
511         component.
512         (thumb2_zero_extendqidi2): Likewise.
513
514 2009-05-28  Kaz Kojima  <kkojima@gcc.gnu.org>
515
516         * config/sh/sh.c (sh_expand_t_scc): Use gen_xorsi3_movrt
517         instead of gen_movrt.
518         * config/sh/sh.md (movrt): Remove.
519
520 2009-05-28  Steve Ellcey  <sje@cup.hp.com>
521
522         * doc/invoke.texi (IA-64 Options)
523         Add -msdata, -mfused-madd, -mno-inline-float-divide, 
524         -mno-inline-int-divide, -mno-inline-sqrt, -msched-spec-ldc,
525         -msched-spec-control-ldc, -msched-prefer-non-data-spec-insns,
526         -msched-prefer-non-control-spec-insns,
527         -msched-stop-bits-after-every-cycle,
528         -msched-count-spec-in-critical-path,
529         -msel-sched-dont-check-control-spec, -msched-fp-mem-deps-zero-cost
530         -msched-max-memory-insns-hard-limit, -msched-max-memory-insns
531         Remove -mt, -pthread, -msched-ldc, -mno-sched-control-ldc,
532         and -msched-spec-verbose.
533
534 2009-05-28  Joseph Myers  <joseph@codesourcery.com>
535
536         * config/arm/lib1funcs.asm (__clear_cache): Define if
537         L_clear_cache.
538         * config/arm/linux-eabi.h (CLEAR_INSN_CACHE): Define to give an
539         error if used.
540         * config/arm/t-linux-eabi (LIB1ASMFUNCS): Add _clear_cache.
541
542 2009-05-28  Richard Guenther  <rguenther@suse.de>
543
544         * tree-ssa-alias.c (ao_ref_init): New function.
545         (ao_ref_base): Likewise.
546         (ao_ref_base_alias_set): Likewise.
547         (ao_ref_alias_set): Likewise.
548         (refs_may_alias_p_1): Change signature.
549         (refs_may_alias_p): Adjust.
550         (refs_anti_dependent_p): Likewise.
551         (refs_output_dependent_p): Likewise.
552         (call_may_clobber_ref_p_1): Change signature.
553         (call_may_clobber_ref_p): Adjust.
554         (stmt_may_clobber_ref_p_1): New function split out from ...
555         (stmt_may_clobber_ref_p): ... here.
556         (maybe_skip_until): Adjust signature.
557         (get_continuation_for_phi): Likewise.
558         (walk_non_aliased_vuses): Likewise.
559         * tree-ssa-alias.h (struct ao_ref_s): New structure type.
560         (ao_ref_init): Declare.
561         (ao_ref_base): Likewise.
562         (ao_ref_alias_set): Likewise.
563         (stmt_may_clobber_ref_p_1): Likewise.
564         (walk_non_aliased_vuses): Adjust.
565         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): New function.
566         (get_ref_from_reference_ops): remove.
567         (vn_reference_lookup_2): Adjust signature.
568         (vn_reference_lookup_3): Do not re-build trees.  Handle unions.
569         (vn_reference_lookup_pieces): Adjust signature, do not re-build
570         trees.
571         (vn_reference_lookup): Adjust.
572         (vn_reference_insert): Likewise.
573         (vn_reference_insert_pieces): Adjust signature.
574         (visit_reference_op_call): Adjust.
575         * tree-ssa-pre.c (get_expr_type): Simplify.
576         (phi_translate_1): Adjust.
577         (compute_avail): Likewise.
578         (translate_vuse_through_block): Do not re-build trees.
579         (value_dies_in_block_x): Likewise.
580         * tree-ssa-sccvn.h (struct vn_reference_s): Add type and alias-set
581         fields.
582         (vn_reference_lookup_pieces): Adjust declaration.
583         (vn_reference_insert_pieces): Likewise.
584
585 2009-05-28  Benjamin Kosnik  <bkoz@redhat.com>
586
587         * tree-ssa-copy.c (replace_exp_1): Move op for warning-free use
588         with checking disabled.
589
590 2009-05-28  Dave Korn  <dave.korn.cygwin@gmail.com>
591
592         PR target/37216
593
594         * configure.ac (HAVE_GAS_ALIGNED_COMM):  Add autoconf test and
595         macro definition for support of three-operand format aligned
596         .comm directive in assembler on cygwin/pe/mingw target OS.
597         * configure:  Regenerate.
598         * config.h:  Regenerate.
599
600         * config/i386/winnt.c (i386_pe_asm_output_aligned_decl_common):  Use
601         aligned form of .comm directive if -mpe-aligned-commons is in effect.
602         * config/i386/cygming.opt (-mpe-aligned-commons):  Add new option.
603
604         * doc/invoke.texi (-mpe-aligned-commons):  Document new target option.
605         * doc/tm.texi (ASM_OUTPUT_COMMON):  Document zero size commons.
606
607 2009-05-28  Ira Rosen  <irar@il.ibm.com>
608
609         PR tree-optimization/40254
610         * tree-data-ref.c (dr_analyze_innermost): Take POFFSET into account
611         in analysis of basic blocks.
612
613 2009-05-28  Adam Nemet  <anemet@caviumnetworks.com>
614
615         PR middle-end/33699
616         * target.h (struct gcc_target): Fix indentation.  Add
617         const_anchor.
618         * target-def.h (TARGET_CONST_ANCHOR): New macro.
619         (TARGET_INITIALIZER): Use it.
620         * cse.c (CHEAPER): Move it up to the other macros.
621         (insert): Rename this ...
622         (insert_with_costs): ... to this.  Add cost parameters.  Update
623         function comment.
624         (insert): New function.  Call insert_with_costs.
625         (compute_const_anchors, insert_const_anchor, insert_const_anchors,
626         find_reg_offset_for_const, try_const_anchors): New functions.
627         (cse_insn): Call try_const_anchors.  Adjust cost of src_related
628         when using a const-anchor.  Call insert_const_anchors.
629         * config/mips/mips.c (mips_set_mips16_mode): Set
630         targetm.const_anchor.
631         * doc/tm.texi (Misc): Document TARGET_CONST_ANCHOR.
632
633 2009-05-28  Alexandre Oliva  <aoliva@redhat.com>
634
635         * tree-inline.c (remap_decls): Enable nonlocalized variables
636         when not optimizing.
637
638 2009-05-28  Alexandre Oliva  <aoliva@redhat.com>
639
640         * tree-ssa-live.c (remove_unused_locals): Skip when not optimizing.
641         Simplify other tests involving optimize.
642
643 2009-05-27  Tom Tromey  <tromey@redhat.com>
644
645         * unwind-dw2.c (_Unwind_DebugHook): New function.
646         (uw_install_context): Call _Unwind_DebugHook.
647
648 2009-05-27  Tom Tromey  <tromey@redhat.com>
649
650         * system.h (CONST_CAST2): Use C++ const_cast when compiled as C++
651
652 2009-05-27  Ian Lance Taylor  <iant@google.com>
653
654         * Makefile.in (LINKER, LINKER_FLAGS): Define.
655         (LINKER_FOR_BUILD, BUILD_LINKERFLAGS): Define.
656         (ALL_LINKERFLAGS): Define.
657         (xgcc$(exeext)): Change $(COMPILER) to $(LINKER).
658         (cpp$(exeext), cc1-dummy$(exeext), cc1$(exeext)): Likewise.
659         (collect2$(exeext), mips-tfile, mips-tdump): Likewise.
660         (gcov$(exeext), gcov-dump$(exeext)): Likewise.
661         (build/gen%$(build_exeext)): Change $(COMPILER_FOR_BUILD) to
662         $(LINKER_FOR_BUILD).
663         (build/gcov-iov$(build_exeext)): Likewise.
664
665 2009-05-27  Julian Brown  <julian@codesourcery.com>
666
667         * gcse.c (target.h): Include.
668         (can_assign_to_reg_without_clobbers_p): Check that the target allows
669         copy of argument to a pseudo register.
670
671 2009-05-27  Diego Novillo  <dnovillo@google.com>
672
673         * tree-ssa-live.c (dump_scope_block): Document arguments.
674         (dump_scope_blocks): Document.
675         (debug_scope_blocks): New.
676         * tree-flow.h (debug_scope_blocks): Declare.
677
678 2009-05-21  Denis Chertykov  <denisc@overta.ru>
679
680         * doc/contrib.texi (Contributors): add myself to the list.
681
682 2009-05-27  Olivier Hainque  <hainque@adacore.com>
683
684         * expr.c (target_align): New function.  Alignment the TARGET of an
685         assignment may be assume to have.
686         (highest_pow2_factor_for_target): Use it instead of relying on
687         immediate tree attributes of TARGET, not necessarily honored when
688         intermediate bitfields are involved.
689         
690 2009-05-27  H.J. Lu  <hongjiu.lu@intel.com>
691
692         PR target/40266
693         * config/i386/driver-i386.c (host_detect_local_cpu): Support
694         AVX, SSE4, AES, PCLMUL and POPCNT.
695
696 2009-05-27  Diego Novillo  <dnovillo@google.com>
697
698         * tree-pretty-print.c (dump_location): New.
699         (dump_generic_node): Call it.
700         Factor code to handle BLOCK nodes ...
701         (dump_block_node): ... here.
702
703 2009-05-27  Rafael Avila de Espindola  <espindola@google.com>
704
705         * Makefile.in (GCC_PLUGIN_H): New. Replace all uses of gcc-plugin.h with
706         it.
707         * doc/plugins.texi: Document that gcc-plugin.h must be the first to be
708         included.
709         * gcc-plugin.h: Include config.h and system.h.
710         (IN_GCC): Define if not defined.
711
712 2009-05-27  Hans-Peter Nilsson  <hp@axis.com>
713
714         PR middle-end/40249
715         * Makefile.in (CRTSTUFF_CFLAGS): Replace -fno-inline-functions
716         with -fno-inline.
717
718 2009-05-27  Shujing Zhao  <pearly.zhao@oracle.com>
719
720         * config/m32r/m32r.c: Use REG_P, MEM_P and CONST_INT_P where
721         applicable.
722         * config/m32r/m32r.h: Ditto.
723         * config/m32r/m32r.md: Ditto.
724         * config/m32r/predicates.md: Ditto.
725
726 2009-05-27  Alexandre Oliva  <aoliva@redhat.com>
727
728         * cgraph.c (dump_cgraph_node): Honor -fdump-noaddr.
729
730 2009-05-26  Basile Starynkevitch  <basile@starynkevitch.net>
731
732         * doc/plugins.texi
733         (Loading plugins): typo.
734         (Plugin callbacks): Documented PLUGIN_INFO, PLUGIN_GGC_START,
735         PLUGIN_GGC_MARKING, PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS.
736         (Interacting with the GCC Garbage Collector): Added new section.
737         (Giving information about a plugin): Added new section for
738         PLUGIN_INFO.
739         * ggc.h (ggc_register_root_tab): Added declaration.
740         * gcc-plugin.h (PLUGIN_GGC_START, PLUGIN_GGC_MARKING)
741         (PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS): Added new events.
742         (register_callback): Improved comment in declaration.
743         * ggc-common.c (const_ggc_root_tab_t) Added new typedef for
744         vectors.
745         (extra_root_vec) Added static variable for dynamic roots
746         registration.
747         (ggc_register_root_tab) Added new routine.
748         (ggc_mark_roots) Added iteration inside extra_root_vec, and invoke
749         PLUGIN_GGC_MARKING event.
750         * ggc-zone.c: Include plugin.h.
751         (ggc_collect): Invoke PLUGIN_GGC_START & PLUGIN_GGC_END events.
752         * ggc-page.c: Include plugin.h.
753         (ggc_collect): Invoke PLUGIN_GGC_START & PLUGIN_GGC_END events.
754         * plugin.c (plugin_event_name): added names of PLUGIN_GGC_START,
755         PLUGIN_GGC_MARKING, PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS
756         (register_callback): check lack of callbacks for
757         pseudo-events. Added handling of PLUGIN_REGISTER_GGC_ROOTS,
758         PLUGIN_GGC_START, PLUGIN_GGC_MARKING, PLUGIN_GGC_END.
759         (invoke_plugin_callbacks): Handle PLUGIN_GGC_START,
760         PLUGIN_GGC_MARKING, PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS.
761         * Makefile.in (ggc-common.o, ggc-zone.o, ggc-page.o): Added
762         dependency on plugin.h.
763         (plugin.o): Added dependency on ggc.h...
764
765 2009-05-26  Richard Guenther  <rguenther@suse.de>
766
767         PR middle-end/40248
768         Revert
769         * expr.c (expand_expr_real_1): Avoid calling do_store_flag
770         with mismatched comparison modes.
771
772         * expr.c (expand_expr_real_1): Expand the operand of a
773         VIEW_CONVERT_EXPR in its natural mode.
774
775 2009-05-26  Ian Lance Taylor  <iant@google.com>
776
777         * Makefile.in (COMPILER, COMPILER_FLAGS): Define.
778         (COMPILER_FOR_BUILD, BUILD_COMPILERFLAGS): Define.
779         (ALL_COMPILERFLAGS): Define.
780         (.c.o, xgcc$(exeext), cpp$(exeext)): Use $(COMPILER).
781         (cc1-dummy$(exeext), cc1$(exeext)): Likewise.
782         (collect2$(exeext), collect2.o): Likewise.
783         (c-opts.o, c-cppbuiltin.o, c-pch.o, gcc.o, gccspec.o): Likewise.
784         (gcc-options.o, version.o, prefix.o, toplev.o): Likewise.
785         ($(out_object_file), mips-tfile, mips-tdump): Likewise.
786         (libbackend.o, intl.o, cppdefault.o): Likewise.
787         (gcov$(exeext), gcov-dump$(exeext)): Likewise.
788         (build/%.o): Use $(COMPILER_FOR_BUILD).
789         (build/gen%$(build_exeext)): Likewise.
790         (build/gcov-iov$(build_exeext)): LIkewise.
791         * config/t-darwin (darwin.o): Use $(COMPILER).
792         (darwin-c.o, darwin-f.o, darwin-driver.o): Likewise.
793         * config/t-sol2 (sol2-c.o): Likewise.
794         (sol2.o): Likewise.
795         * config/t-vxworks (vxworks.o): Likewise.
796         * config/x-darwin (host-darwin.o): Likewise.
797         * config/x-hpux (host-hpux.o): Likewise.
798         * config/x-linux (host-linux.o): Likewise.
799         * config/x-solaris (host-solaris.o): Likewise.
800         * config/alpha/x-alpha (driver-alpha.o): Likewise.
801         * config/arm/t-arm (arm-c.o): Likewise.
802         * config/arm/t-pe (pe.o): Likewise.
803         * config/arm/t-wince-pe (pe.o): Likewise.
804         * config/i386/t-cygming (winnt.o): Likewise.
805         (winnt-cxx.o, winnt-stubs.o, msformat-c.o): Likewise.
806         * config/i386/t-cygwin (cygwin1.o): Likewise.
807         (cygwin2.o): Likewise.
808         * config/i386/t-i386 (i386-c.o): Likewise.
809         * config/i386/t-interix (winnt.o): Likewise.
810         * config/i386/t-netware (netware.o): Likewise.
811         * config/i386/t-nwld (nwld.o): Likewise.
812         * config/i386/x-darwin (host-i386-darwin.o): Likewise.
813         * config/i386/x-i386 (driver-i386.o): Likewise.
814         * config/i386/x-cygwin (host-cygwin.o): Likewise.
815         * config/i386/x-mingw32 (host-mingw32.o): Likewise.
816         * config/ia64/t-ia64 (ia64-c.o): Likewise.
817         * config/m32c/t-m32c (m32c-pragma.o): Likewise.
818         * config/mips/x-native (driver-native.o): Likewise.
819         * config/rs6000/t-rs6000 (rs6000-c.o): Likewise.
820         * config/rs6000/x-darwin (host-ppc-darwin.o): Likewise.
821         * config/rs6000/x-darwin64 (host-ppc64-darwin.o): Likewise.
822         * config/rs6000/x-rs6000 (driver-rs6000.o): Likewise.
823         * config/score/t-score-elf (score7.o): Likewise.
824         (score3.o): Likewise.
825         * config/sh/t-sh (sh-c.o): Likewise.
826         * config/sh/t-symbian (sh-c.o): Likewise.
827         (symbian.o): Likewise.
828         * config/spu/t-spu-elf (spu-c.o): Likewise.
829         * config/v850/t-v850 (v850-c.o): Likewise.
830         * config/v850/t-v850e (v850-c.o): Likewise.
831
832 2009-05-26  Richard Guenther  <rguenther@suse.de>
833
834         PR tree-optimization/40122
835         * tree-ssa-ccp.c (ccp_fold): Fold vector CONSTRUCTORs to
836         VECTOR_CSTs if possible.
837         (fold_gimple_assign): Likewise.
838
839 2009-05-26  Richard Guenther  <rguenther@suse.de>
840
841         PR middle-end/40252
842         * fold-const.c (fold_binary): Use the correct types for building
843         rotates.
844
845 2009-05-26  Richard Guenther  <rguenther@suse.de>
846
847         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Remove
848         redundant calls to merge_alias_info.
849         (bump_vector_ptr): Likewise.
850         * tree-ssa-copy.c (merge_alias_info): Remove.
851         (replace_exp_1): Remove call to merge_alias_info.
852         (propagate_tree_value): Likewise.
853         (fini_copy_prop): Propagate points-to info.
854         * tree-flow.h (merge_alias_info): Remove.
855
856 2009-05-07  Hariharan Sandanagobalane <hariharan@picochip.com>
857
858         * config/picochip/picochip.C (PARAM_INLINE_CALL_COST): Remove.
859
860 2009-05-25  Jan Hubicka  <jh@suse.cz>
861
862         * cgraph.c (dump_cgraph_node): Dump size/time/benefit.
863         * cgraph.h (struct inline_summary): New filed self_wize,
864         size_inlining_benefit, self_time and time_inlining_benefit.
865         (struct cgraph_global_info): Replace insns by time ans size fields.
866         * ipa-cp (ipcp_cloning_candidate_p): Base estimate on size
867         (ipcp_estimate_growth, ipcp_insert_stage): Likewise.
868         (ipcp_update_callgraph): Do not touch function bodies.
869         * ipa-inline.c: Include except.h
870         (MAX_TIME): New constant.
871         (overall_insns): Remove.
872         (leaf_node_p): New.
873         (overall_size, max_benefit): New static variables.
874         (cgraph_estimate_time_after_inlining): New function.
875         (cgraph_estimate_size_after_inlining): Rewrite using benefits.
876         (cgraph_clone_inlined_nodes): Update size.
877         (cgraph_mark_inline_edge): Update size.
878         (cgraph_estimate_growth): Use size info.
879         (cgraph_check_inline_limits): Check size.
880         (cgraph_default_inline_p): Likewise.
881         (cgraph_edge_badness): Compute badness based on benefit and size cost.
882         (cgraph_decide_recursive_inlining): Check size.
883         (cgraph_decide_inlining_of_small_function): Update size; dump sizes and
884         times.
885         (cgraph_decide_inlining): Likewise.
886         (cgraph_decide_inlining_incrementally): Likewise; honor
887         PARAM_EARLY_INLINING_INSNS.
888         (likely_eliminated_by_inlining_p): New predicate.
889         (estimate_function_body_sizes): New function.
890         (compute_inline_parameters): Use it.
891         * except.c (must_not_throw_labels): New function.
892         * except.h (must_not_throw_labels): Declare.
893         * tree-inline.c (init_inline_once): Kill inlining_weigths
894         * tree-ssa-structalias.c: Avoid uninitialized warning.
895         * params.def (PARAM_MAX_INLINE_INSNS_SINGLE): Reduce to 300.
896         (PARAM_MAX_INLINE_INSNS_AUTO): Reduce to 60.
897         (PARAM_INLINE_CALL_COST): Remove.
898         (PARAM_EARLY_INLINING_INSNS): New.
899
900 2009-05-25  Richard Guenther  <rguenther@suse.de>
901
902         PR tree-optimization/36327
903         * tree-ssa-alias.c (walk_non_aliased_vuses): Add second walker
904         callback for reference translation or lookup at the point
905         of may-defs.
906         * tree-ssa-alias.h (walk_non_aliased_vuses): Adjust prototype.
907         * tree-ssa-sccvn.c (get_ref_from_reference_ops): Bail out
908         for union COMPONENT_REFs.
909         (vn_reference_lookup_3): New callback.  Lookup from memset
910         and CONSTRUCTOR assignment, translate through struct copies.
911         (vn_reference_lookup_pieces): Make sure to not free the
912         passed operands array.  Adjust walk_non_aliased_vuses call.
913         (vn_reference_lookup): Adjust walk_non_aliased_vuses call,
914         make sure we do not leak memory.
915
916 2009-05-25  Richard Guenther  <rguenther@suse.de>
917
918         * tree-ssa-alias.h (dump_points_to_solution): Declare.
919         * tree-inline.c (expand_call_inline): Reset the escaped and
920         callused solutions.
921         * tree-ssa-structalias.c (pass_build_ealias): New.
922         * tree-pass.h (pass_build_ealias): Declare.
923         * passes.c (init_optimization_passes): Add PTA during 
924         early optimizations.
925         * tree-ssa-alias.c (dump_alias_info): Dump the ESCAPED
926         and CALLUSED solutions.
927         (dump_points_to_solution): New function, split out from ...
928         (dump_points_to_info_for): ... here.
929         * tree-parloops.c (parallelize_loops): Reset the escaped and
930         callused solutions.
931
932 2009-05-25  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
933
934         PR bootstrap/40027
935         * config/i386/i386.c (USE_HIDDEN_LINKONCE): Only define if missing.
936         * config/i386/sol2.h [!TARGET_GNU_LD] (USE_HIDDEN_LINKONCE): Define.
937
938 2009-05-25  Ira Rosen  <irar@il.ibm.com>
939
940         PR tree-optimization/40238
941         * tree-vect-stmts.c (vect_init_vector): Insert initialization
942         statements after basic block's labels.
943         * tree-vect-slp.c (vect_slp_transform_bb): Call destroy_bb_vec_info() 
944         to free the allocated memory.
945
946 2009-05-24  Kaz Kojima  <kkojima@gcc.gnu.org>
947
948         * gcc/config/sh/sh.c (sh_set_return_address): Mark store of
949         return address with a USE.
950
951 2009-05-24  Richard Guenther  <rguenther@suse.de>
952
953         PR middle-end/40233
954         * tree.c (make_vector_type): Build the TYPE_DEBUG_REPRESENTATION_TYPEs
955         array type from the main variant of the inner type.
956
957 2009-05-24  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
958
959         * config/vax/vax-protos.h (legitimate_constant_address_p): Change
960         definition to bool (from int) to un-break build.
961         (legitimate_constant_p, vax_mode_dependent_address_p): Likewise.
962
963 2009-05-24  Paolo Bonzini  <bonzini@gnu.org>
964
965         * tree-ssa-operands.h (push_stmt_changes, pop_stmt_changes,
966         discard_stmt_changes): Delete.
967         * tree-ssa-operands.c (scb_stack): Delete.
968         (init_ssa_operands): Do not initialize it.
969         (fini_ssa_operands): Do not free it.
970         (push_stmt_changes, pop_stmt_changes, discard_stmt_changes): Delete.
971
972         * tree-cfg.c (replace_uses_by): Replace pop_stmt_changes with 
973         update_stmt, remove the others.  Fix comments.
974         * tree-dfa.c (optimize_stack_restore): Likewise.
975         * tree-ssa-forwprop.c (forward_propagate_addr_expr): Likewise.
976         * tree-ssa-loop-ivopts.c (rewrite_use): Likewise.
977         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Likewise.
978         * tree-ssa-ccp.c (optimize_stack_restore, execute_fold_all_builtins):
979         Likewise.
980         * tree-ssa-propagate.c (substitute_and_fold): Likewise.
981         * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise.
982         (dom_opt_finalize_block): Likewise, adjusting access to stmts_to_rescan.
983         (optimize_stmt): Likewise, adjusting access to stmts_to_rescan.
984         (stmts_to_rescan): Change item type to gimple.
985         (tree_ssa_dominator_optimize): Change type of stmts_to_rescan.
986
987 2009-05-24  Ira Rosen  <irar@il.ibm.com>
988
989         * doc/passes.texi (Tree-SSA passes): Document SLP pass.
990         * tree-pass.h (pass_slp_vectorize): New pass.
991         * params.h (SLP_MAX_INSNS_IN_BB): Define.
992         * timevar.def (TV_TREE_SLP_VECTORIZATION): Define.
993         * tree-vectorizer.c (timevar.h): Include.
994         (user_vect_verbosity_level): Declare.
995         (vect_location): Fix comment.
996         (vect_set_verbosity_level): Update user_vect_verbosity_level
997         instead of vect_verbosity_level.
998         (vect_set_dump_settings): Add an argument. Ignore user defined
999         verbosity if dump flags require higher level of verbosity. Print to
1000         stderr only for loop vectorization.
1001         (vectorize_loops): Update call to vect_set_dump_settings.
1002         (execute_vect_slp): New function.
1003         (gate_vect_slp): Likewise.
1004         (struct gimple_opt_pass pass_slp_vectorize): New.
1005         * tree-vectorizer.h (struct _bb_vec_info): Define along macros to
1006         access its members.
1007         (vec_info_for_bb): New function.
1008         (struct _stmt_vec_info): Add bb_vinfo and a macro for its access.
1009         (VECTORIZATION_ENABLED): New macro.
1010         (SLP_ENABLED, SLP_DISABLED): Likewise.
1011         (vect_is_simple_use): Add bb_vec_info argument.
1012         (new_stmt_vec_info, vect_analyze_data_ref_dependences,
1013         vect_analyze_data_refs_alignment, vect_verify_datarefs_alignment,
1014         vect_analyze_data_ref_accesses, vect_analyze_data_refs,
1015         vect_schedule_slp, vect_analyze_slp): Likewise.
1016         (vect_analyze_stmt): Add slp_tree argument.
1017         (find_bb_location): Declare.
1018         (vect_slp_analyze_bb, vect_slp_transform_bb): Likewise.
1019         * tree-vect-loop.c (new_loop_vec_info): Adjust function calls.
1020         (vect_analyze_loop_operations, vect_analyze_loop,
1021         get_initial_def_for_induction, vect_create_epilog_for_reduction,
1022         vect_finalize_reduction, vectorizable_reduction,
1023         vectorizable_live_operation, vect_transform_loop): Likewise.
1024         * tree-data-ref.c (dr_analyze_innermost): Update comment,
1025         skip evolution analysis if analyzing a basic block.
1026         (dr_analyze_indices): Likewise.
1027         (initialize_data_dependence_relation): Skip the test whether the
1028         object is invariant for basic blocks.
1029         (compute_all_dependences): Skip dependence analysis for data
1030         references in basic blocks.
1031         (find_data_references_in_stmt): Don't fail in case of invariant
1032         access in basic block.
1033         (find_data_references_in_bb): New function.
1034         (find_data_references_in_loop): Move code to
1035         find_data_references_in_bb and add a call to it.
1036         (compute_data_dependences_for_bb): New function.
1037         * tree-data-ref.h (compute_data_dependences_for_bb): Declare.
1038         * tree-vect-data-refs.c (vect_check_interleaving): Adjust to the case
1039         that STEP is 0.
1040         (vect_analyze_data_ref_dependence): Check for interleaving in case of
1041         unknown dependence in basic block and fail in case of dependence in
1042         basic block.
1043         (vect_analyze_data_ref_dependences): Add bb_vinfo argument, get data
1044         dependence instances from either loop or basic block vectorization
1045         info.
1046         (vect_compute_data_ref_alignment): Check if it is loop vectorization
1047         before calling nested_in_vect_loop_p.
1048         (vect_compute_data_refs_alignment): Add bb_vinfo argument, get data
1049         dependence instances from either loop or basic block vectorization
1050         info.
1051         (vect_verify_datarefs_alignment): Likewise.
1052         (vect_enhance_data_refs_alignment): Adjust function calls.
1053         (vect_analyze_data_refs_alignment): Likewise.
1054         (vect_analyze_group_access): Fix printing. Skip different checks if
1055         DR_STEP is 0. Keep strided stores either in loop or basic block
1056         vectorization data structure. Fix indentation.
1057         (vect_analyze_data_ref_access): Fix comments, allow zero step in
1058         basic blocks.
1059         (vect_analyze_data_ref_accesses): Add bb_vinfo argument, get data
1060         dependence instances from either loop or basic block vectorization
1061         info.
1062         (vect_analyze_data_refs): Update comment. Call
1063         compute_data_dependences_for_bb to analyze basic blocks.
1064         (vect_create_addr_base_for_vector_ref): Check for outer loop only in
1065         case of loop vectorization. In case of basic block vectorization use
1066         data-ref itself as a base.
1067         (vect_create_data_ref_ptr): In case of basic block vectorization:
1068         don't advance the pointer, add new statements before the current
1069         statement.  Adjust function calls.
1070         (vect_supportable_dr_alignment): Support only aligned accesses in
1071         basic block vectorization.
1072         * common.opt (ftree-slp-vectorize): New flag.
1073         * tree-vect-patterns.c (widened_name_p): Adjust function calls.
1074         (vect_pattern_recog_1): Likewise.
1075         * tree-vect-stmts.c (process_use): Likewise.
1076         (vect_init_vector): Add new statements in the beginning of the basic
1077         block in case of basic block SLP.
1078         (vect_get_vec_def_for_operand): Adjust function calls.
1079         (vect_finish_stmt_generation): Likewise.
1080         (vectorizable_call): Add assert that it is loop vectorization, adjust
1081         function calls.
1082         (vectorizable_conversion, vectorizable_assignment): Likewise.
1083         (vectorizable_operation): In case of basic block SLP, take
1084         vectorization factor from statement's type and skip the relevance
1085         check. Adjust function calls.
1086         (vectorizable_type_demotion): Add assert that it is loop
1087         vectorization, adjust function calls.
1088         (vectorizable_type_promotion): Likewise.
1089         (vectorizable_store): Check for outer loop only in case of loop
1090         vectorization. Adjust function calls. For basic blocks, skip the
1091         relevance check and don't advance pointers.
1092         (vectorizable_load): Likewise.
1093         (vectorizable_condition): Add assert that it is loop vectorization,
1094         adjust function calls.
1095         (vect_analyze_stmt): Add argument. In case of basic block SLP, check
1096         that it is not reduction, get vector type, call only supported
1097         functions, skip loop specific parts.
1098         (vect_transform_stmt): Check for outer loop only in case of loop
1099         vectorization.
1100         (new_stmt_vec_info): Add new argument and initialize bb_vinfo.
1101         (vect_is_simple_use): Fix comment, add new argument, fix conditions
1102         for external definition.
1103         * passes.c (pass_slp_vectorize): New pass.
1104         * tree-vect-slp.c (find_bb_location): New function.
1105         (vect_get_and_check_slp_defs): Add argument, adjust function calls,
1106         check for patterns only in loops.
1107         (vect_build_slp_tree): Add argument, adjust function calls, fail in
1108         case of multiple types in basic block SLP.
1109         (vect_mark_slp_stmts_relevant): New function.
1110         (vect_supported_load_permutation_p): Fix comment.
1111         (vect_analyze_slp_instance): Add argument. In case of basic block
1112         SLP, take vectorization factor from statement's type, check that
1113         unrolling factor is 1. Adjust function call. Save SLP instance in
1114         either loop or basic block vectorization structure. Return FALSE,
1115         if SLP failed.
1116         (vect_analyze_slp): Add argument. Get strided stores groups from
1117         either loop or basic block vectorization structure. Return FALSE
1118         if basic block SLP failed.
1119         (new_bb_vec_info): New function.
1120         (destroy_bb_vec_info, vect_slp_analyze_node_operations,
1121         vect_slp_analyze_operations, vect_slp_analyze_bb): Likewise.
1122         (vect_schedule_slp): Add argument. Get SLP instances from either
1123         loop or basic block vectorization structure. Set vectorization factor
1124         to be 1 for basic block SLP.
1125         (vect_slp_transform_bb): New function.
1126         * params.def (PARAM_SLP_MAX_INSNS_IN_BB): Define.
1127
1128 2009-05-23  Mark Mitchell  <mark@codesourcery.com>
1129
1130         * final.c (shorten_branches): Do not align labels for jump tables.
1131         (final_scan_insn): Use JUMP_TABLE_DATA_P.
1132
1133 2009-05-23  Eric Botcazou  <ebotcazou@adacore.com>
1134
1135         * doc/passes.texi: Standardize spelling of RTL, Tree and Tree SSA.
1136         Remove outdated reference to flow.c and fix nits.
1137         * doc/gccint.texi: Tweak RTL description.
1138         * doc/rtl.texi: Likewise.
1139
1140 2009-05-23  Denis Chertykov  <chertykov@gmail.com>
1141
1142         * config/avr/avr.c: Change my email address.
1143         * config/avr/avr.h: Likewise.
1144         * config/avr/avr.md: Likewise.
1145         * config/avr/avr-protos.h: Likewise.
1146         * config/avr/libgcc.S: Likewise.
1147
1148 2009-05-22  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1149
1150         * config/spu/spu-protos.h (aligned_mem_p, spu_valid_mov): Remove.
1151         (spu_split_load, spu_split_store): Change return type to int.
1152         (spu_split_convert): Declare.
1153         * config/spu/predicates.md (spu_mem_operand): Remove.
1154         (spu_mov_operand): Update.
1155         (spu_dest_operand, shiftrt_operator, extend_operator): Define.
1156         * config/spu/spu.c (regno_aligned_for_load): Remove.
1157         (reg_aligned_for_addr, spu_expand_load): Define.
1158         (spu_expand_extv): Reimplement and handle MEM.
1159         (spu_expand_insv): Handle MEM.
1160         (spu_sched_reorder): Handle insn's with length 0.
1161         (spu_legitimate_address_p): Reimplement.
1162         (store_with_one_insn_p): Return TRUE for any mode with size
1163         larger than 16 bytes.
1164         (address_needs_split): Define.
1165         (spu_expand_mov): Call spu_split_load and spu_split_store for MEM
1166         operands.
1167         (spu_convert_move): Define.
1168         (spu_split_load): Use spu_expand_load and change all MEM's to TImode.
1169         (spu_split_store): Change all MEM's to TImode.
1170         (spu_init_expanders): Preallocate registers that correspond to
1171         LAST_VIRTUAL_REG+1 and LAST_VIRTUAL_REG+2 and set them with
1172         mark_reg_pointer.
1173         (spu_split_convert): Define.
1174         * config/spu/spu.md (QHSI, QHSDI): New mode iterators.
1175         (_move<mode>, _movdi, _movti): Update predicate and condition.
1176         (load, store): Change to define_split.
1177         (extendqiti2, extendhiti2, extendsiti2, extendditi2): Simplify to
1178         extend<mode>ti2.
1179         (zero_extendqiti2, zero_extendhiti2, <v>lshr<mode>3_imm): Define.
1180         (lshr<mode>3, lshr<mode>3_imm, lshr<mode>3_re): Simplify to one
1181         define_insn_and_split of lshr<mode>3.
1182         (shrqbybi_<mode>, shrqby_<mode>): Simplify to define_expand.
1183         (<v>ashr<mode>3_imm): Define.
1184         (extv, extzv, insv): Allow MEM operands.
1185         (trunc_shr_ti<mode>, trunc_shr_tidi, shl_ext_<mode>ti,
1186         shl_ext_diti, sext_trunc_lshr_tiqisi, zext_trunc_lshr_tiqisi,
1187         sext_trunc_lshr_tihisi, zext_trunc_lshr_tihisi): Define for combine.
1188         (_spu_convert2): Change to define_insn_and_split and remove the
1189         corresponding define_peephole2.
1190         (stack_protect_set, stack_protect_test, stack_protect_test_si):
1191         Change predicates to memory_operand.
1192
1193 2009-05-22  Mark Mitchell  <mark@codesourcery.com>
1194
1195         * config/arm/thumb2.md: Add 16-bit multiply instructions.
1196
1197 2009-05-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
1198
1199         PR tree-optimization/40219
1200         * tree.c (iterative_hash_expr): Make sure the builtin function is
1201         a normal builtin function and not a front end or back end builtin
1202         before indexing into the built_in_decls array.
1203
1204 2009-05-22  Richard Guenther  <rguenther@suse.de>
1205
1206         PR middle-end/38964
1207         * alias.c (write_dependence_p): Do not use TBAA for answering
1208         anti-dependence or output-dependence.
1209         * tree-ssa-structalias.c (set_uids_in_ptset): Remove TBAA pruning code.
1210         (emit_pointer_definition): Remove.
1211         (emit_alias_warning): Likewise.
1212         (find_what_var_points_to): Remove TBAA pruning code.
1213         (find_what_p_points_to): Likewise.  Do not warn about strict-aliasing
1214         violations.
1215         (compute_points_to_sets): Remove code computing the set of
1216         dereferenced pointers.
1217         * tree-data-ref.c (dr_may_alias_p): Properly use the split
1218         oracle for querying anti and output dependencies.
1219         * tree-ssa-alias.c (refs_may_alias_p_1): Add argument specifying
1220         if TBAA may be applied.
1221         (refs_anti_dependent_p): New function.
1222         (refs_output_dependent_p): Likewise.
1223         * tree-ssa-alias.h (refs_anti_dependent_p): Declare.
1224         (refs_output_dependent_p): Likewise.
1225         * doc/tree-ssa.texi (Memory model): New section.
1226         * doc/c-tree.texi (CHANGE_DYNAMIC_TYPE_EXPR): Remove.
1227         * doc/gimple.texi (GIMPLE_CHANGE_DYNAMIC_TYPE): Remove.
1228         * cfgexpand.c (expand_gimple_basic_block): Do not handle
1229         GIMPLE_CHANGE_DYNAMIC_TYPE or CHANGE_DYNAMIC_TYPE_EXPR.
1230         * expr.c (expand_expr_real_1): Likewise.
1231         * gimple-low.c (lower_stmt): Likewise.
1232         * gimple-pretty-print.c (dump_gimple_stmt): Likewise.
1233         (dump_gimple_cdt): Remove.
1234         * gimple.c (gss_for_code): Do not handle GIMPLE_CHANGE_DYNAMIC_TYPE.
1235         (gimple_size): Likewise.
1236         (walk_gimple_op): Likewise.
1237         (is_gimple_stmt): Likewise.
1238         (walk_stmt_load_store_addr_ops): Likewise.
1239         (gimple_build_cdt): Remove.
1240         * gimple.def (GIMPLE_CHANGE_DYNAMIC_TYPE): Remove.
1241         * gimple.h (gimple_cdt_new_type): Remove.
1242         (gimple_cdt_new_type_ptr): Likewise.
1243         (gimple_cdt_set_new_type): Likewise.
1244         (gimple_cdt_location): Likewise.
1245         (gimple_cdt_location_ptr): Likewise.
1246         (gimple_cdt_set_location): Likewise.
1247         * gimplify.c (gimplify_expr): Do not handle CHANGE_DYNAMIC_TYPE_EXPR.
1248         * tree-cfg.c (remove_useless_stmts_1): Do not handle
1249         GIMPLE_CHANGE_DYNAMIC_TYPE.
1250         (verify_types_in_gimple_stmt): Likewise.
1251         * tree-inline.c (estimate_num_insns): Likewise.
1252         (expand_call_inline): Do not copy DECL_NO_TBAA_P.
1253         (copy_decl_to_var): Likewise.
1254         (copy_result_decl_to_var): Likewise.
1255         * tree-pretty-print.c (dump_generic_node): Do not handle
1256         CHANGE_DYNAMIC_TYPE_EXPR.
1257         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1258         * tree-ssa-operands.c (get_expr_operands): Likewise.
1259         * tree-ssa-structalias.c (struct variable_info): Remove
1260         no_tbaa_pruning member.
1261         (new_var_info): Do not set it based on DECL_NO_TBAA_P.
1262         (unify_nodes): Do not copy it.
1263         (find_func_aliases): Do not handle GIMPLE_CHANGE_DYNAMIC_TYPE.
1264         (dump_solution_for_var): Do not dump no_tbaa_pruning state.
1265         (set_uids_in_ptset): Do not check it.
1266         (find_what_var_points_to): Likewise.
1267         (compute_tbaa_pruning): Remove.
1268         (compute_points_to_sets): Do not call it.
1269         * tree.c (walk_tree_1): Do not handle CHANGE_DYNAMIC_TYPE_EXPR.
1270         * tree.def (CHANGE_DYNAMIC_TYPE_EXPR): Remove.
1271         * tree.h (CHANGE_DYNAMIC_TYPE_NEW_TYPE): Remove.
1272         (CHANGE_DYNAMIC_TYPE_LOCATION): Likewise.
1273         (DECL_NO_TBAA_P): Likewise.
1274         (struct tree_decl_common): Move no_tbaa_flag to unused flags section.
1275         * omp-low.c (copy_var_decl): Do not copy DECL_NO_TBAA_P.
1276         (expand_omp_atomic_pipeline): Do not set it.
1277         * print-tree.c (print_node): Do not dump it.
1278         * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Remove
1279         redundant check.
1280
1281 2009-05-22 Vladimir Makarov <vmakarov@redhat.com>
1282
1283         PR target/39856
1284         * reg-stack.c (subst_stack_regs_pat): Remove gcc_assert for note
1285         for clobber.
1286
1287 2009-05-22  Mark Mitchell  <mark@codesourcery.com>
1288
1289         * tree.c (handle_dll_attribute): Mark dllexport'd inlines as
1290         non-external.
1291
1292 2009-05-22  Ben Elliston  <bje@au.ibm.com>
1293
1294         * Makefile.in (bversion.h, s-bversion): New targets.
1295         (TOPLEV_H): Add bversion.h.
1296         * toplev.h: Include "bversion.h".
1297         (ATTRIBUTE_GCC_DIAG): When building with checking disabled, use
1298         the __format__ attribute only if compiling with the same version
1299         of GCC as the sources (the "build version").
1300
1301 2009-05-22  Ben Elliston  <bje@au.ibm.com>
1302
1303         * c-format.c (handle_format_attribute): Fix comment typo.
1304
1305 2009-05-21  Steve Ellcey  <sje@cup.hp.com>
1306
1307         PR target/37846
1308         * config/ia64/ia64.opt (mfused-madd): New.
1309         * config/ia64/ia64.h (TARGET_DEFAULT): Set MASK_FUSED_MADD.
1310         * config/ia64/hpux.h (TARGET_DEFAULT): Ditto.
1311         * config/ia64/ia64.md (maddsf4, msubsf4, nmaddsf4,
1312         madddf4, madddf4_trunc, msubdf4, msubdf4_trunc, nmadddf4,
1313         nmadddf4_truncsf, maddxf4, maddxf4_truncsf, maddxf4_truncdf,
1314         msubxf4, msubxf4_truncsf msubxf4_truncdf, nmaddxf4,
1315         nmaddxf4_truncsf, nmaddxf4_truncdf): Check TARGET_FUSED_MADD.
1316         * config/ia64/vect.md (addv2sf3, subv2sf3): Force fpma/fpms 
1317         instruction if !TARGET_FUSED_MADD.
1318         (fpma, fpms): Remove colon from name.
1319
1320 2009-05-22  Richard Guenther  <rguenther@suse.de>
1321
1322         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Record
1323         TMR_ORIGINAL.  Always either record TMR_SYMBOL or TMR_BASE.
1324         * tree-ssa-pre.c (create_component_ref_by_pieces_1): Handle
1325         TARGET_MEM_REF.
1326         (create_expression_by_pieces): Only convert if necessary.
1327         * gimplify.c (gimplify_expr): Handle TARGET_MEM_REF.
1328         * tree-ssa-loop-im.c (gen_lsm_tmp_name): Handle INTEGER_CST.
1329
1330 2009-05-21  Adam Nemet  <anemet@caviumnetworks.com>
1331
1332         * config/mips/mips.md (*extzv_trunc<mode>_exts): Turn into a
1333         regular pattern from a template and rename it ...
1334         (*extzv_truncsi_exts): ... to this.
1335
1336 2009-05-21  Richard Guenther  <rguenther@suse.de>
1337
1338         * cgraph.h (struct cgraph_node): Remove inline_decl member.
1339         * ipa-inline.c (cgraph_mark_inline_edge): Do not check it.
1340         (cgraph_default_inline_p): Likewise.
1341         (cgraph_decide_inlining_incrementally): Likewise.
1342
1343 2009-05-21  H.J. Lu  <hongjiu.lu@intel.com>
1344             Uros Bizjak  <ubizjak@gmail.com>
1345
1346         * config/i386/cpuid.h (bit_MOVBE): New.
1347
1348         * config/i386/driver-i386.c (host_detect_local_cpu): Check movbe.
1349
1350         * config/i386/i386.c (OPTION_MASK_ISA_MOVBE_SET): New.
1351         (OPTION_MASK_ISA_MOVBE_UNSET): Likewise.
1352         (ix86_handle_option): Handle OPT_mmovbe.
1353         (ix86_target_string): Add -mmovbe.
1354         (pta_flags): Add PTA_MOVBE.
1355         (processor_alias_table): Add PTA_MOVBE to "atom".
1356         (override_options): Handle PTA_MOVBE.
1357
1358         * config/i386/i386.h (TARGET_MOVBE): New.
1359
1360         * config/i386/i386.md (bswapsi2): Check TARGET_MOVBE.
1361         (*bswapsi_movbe): New.
1362         (*bswapdi_movbe): Likewise.
1363         (bswapdi2): Renamed to ...
1364         (*bswapdi_1): This.
1365         (bswapdi2): New expander.
1366
1367         * config/i386/i386.opt (mmovbe): New.
1368
1369         * doc/invoke.texi: Document -mmovbe.
1370
1371 2009-05-21  Taras Glek  <tglek@mozilla.com>
1372
1373         * plugin.c (try_init_one_plugin): Updated to new plugin_init API.
1374         * gcc-plugin.h (plugin_init): Updated signature.
1375         * gcc-plugin.h (plugin_name_args): Moved to this header.
1376         * doc/plugins.texi (plugin_init): Updated documention to reflect
1377         API change.
1378         * doc/plugins.texi (plugin_name_args): Added to documention.
1379
1380 2009-05-21  Mark Mitchell  <mark@codesourcery.com>
1381
1382         * config/arm/neon.md (*mul<mode>3add<mode>_neon): New pattern.
1383         (*mul<mode>3neg<mode>add<mode>_neon): Likewise.
1384
1385 2009-05-21  Shujing Zhao  <pearly.zhao@oracle.com>
1386
1387         * config/i386/i386.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P and
1388         JUMP_TABLE_DATA_P predicates where applicable.
1389         * config/i386/predicates.md: Ditto.
1390         * config/i386/sse.md: Ditto.
1391
1392 2009-05-21  Jakub Jelinek  <jakub@redhat.com>
1393
1394         * config/i386/i386.md (adddi_4_rex64, addsi_4, addhi_4): For
1395         operand2 -128 override length_immediate attribute to 1.
1396         * config/i386/predicates.md (constm128_operand): New predicate.
1397
1398         * config/i386/i386.c (memory_address_length): Handle %r12
1399         the same as %rsp and %r13 the same as %rbp.  For %rsp and %rbp
1400         also check REGNO.
1401         (ix86_attr_length_address_default): For MODE_SI lea in 64-bit
1402         mode look through optional ZERO_EXTEND and SUBREG.
1403         * config/i386/i386.md (R12_REG): New define_constant.
1404         (prefix_data16): For sse unit set also for MODE_TI insns.
1405         (prefix_rex): For -m32 always return 0.  For TYPE_IMOVX
1406         insns set if operand 1 is ext_QIreg_operand.
1407         (modrm): For TYPE_IMOV clear only if not MODE_DI.  For
1408         TYPE_{ALU{,1},ICMP,TEST} insn clear if there is non-shortened
1409         immediate.
1410         (*movdi_extzv_1, zero_extendhidi2, zero_extendqidi2): Change
1411         mode from MODE_DI to MODE_SI.
1412         (movdi_1_rex64): Override modrm and length_immediate attributes
1413         only for movabs (TYPE_IMOV, alternative 2).
1414         (zero_extendsidi2_rex64): Clear prefix_0f attribute if TYPE_IMOVX.
1415         (*float<SSEMODEI24:mode><MODEF:mode>2_mixed_interunit,
1416         *float<SSEMODEI24:mode><MODEF:mode>2_mixed_nointerunit,
1417         *float<SSEMODEI24:mode><MODEF:mode>2_sse_interunit,
1418         *float<SSEMODEI24:mode><MODEF:mode>2_sse_nointerunit): Set
1419         prefix_rex attribute if DImode.
1420         (*adddi_1_rex64, *adddi_2_rex64, *adddi_3_rex64, *adddi_5_rex64,
1421         *addsi_1, *addsi_1_zext, *addsi_2, *addsi_2_zext, *addsi_3,
1422         *addsi_3_zext, *addsi_5, *addhi_1_lea, *addhi_1, *addhi_2, *addhi_3,
1423         *addhi_5, *addqi_1_lea, *addqi_1): Override length_immediate
1424         attribute to 1 if TYPE_ALU and operand 2 is const128_operand.
1425         (pro_epilogue_adjust_stack_1, pro_epilogue_adjust_stack_rex64):
1426         Likewise.  For TYPE_IMOV clear length_immediate attribute.
1427         (*ashldi3_1_rex64, *ashldi3_cmp_rex64, *ashldi3_cconly_rex64,
1428         *ashlsi3_1, *ashlsi3_1_zext, *ashlsi3_cmp, **ashlsi3_cconly,
1429         *ashlsi3_cmp_zext, *ashlhi3_1_lea, *ashlhi3_1, *ashlhi3_cmp,
1430         *ashlhi3_cconly, *ashlqi3_1_lea, *ashlqi3_1, *ashlqi3_cmp,
1431         *ashlqi3_cconly): Override length_immediate attribute to 0 if TYPE_ALU
1432         or one operand TYPE_ISHIFT.
1433         (*ashrdi3_1_one_bit_rex64, *ashrdi3_one_bit_cmp_rex64,
1434         *ashrdi3_one_bit_cconly_rex64, *ashrsi3_1_one_bit,
1435         *ashrsi3_1_one_bit_zext, *ashrsi3_one_bit_cmp,
1436         *ashrsi3_one_bit_cconly, *ashrsi3_one_bit_cmp_zext,
1437         *ashrhi3_1_one_bit, *ashrhi3_one_bit_cmp, *ashrhi3_one_bit_cconly,
1438         *ashrqi3_1_one_bit, *ashrqi3_1_one_bit_slp, *ashrqi3_one_bit_cmp,
1439         *ashrqi3_one_bit_cconly, *lshrdi3_1_one_bit_rex64,
1440         *lshrdi3_cmp_one_bit_rex64, *lshrdi3_cconly_one_bit_rex64,
1441         *lshrsi3_1_one_bit, *lshrsi3_1_one_bit_zext, *lshrsi3_one_bit_cmp,
1442         *lshrsi3_one_bit_cconly, *lshrsi3_cmp_one_bit_zext,
1443         *lshrhi3_1_one_bit, *lshrhi3_one_bit_cmp, *lshrhi3_one_bit_cconly,
1444         *lshrqi3_1_one_bit, *lshrqi3_1_one_bit_slp, *lshrqi2_one_bit_cmp,
1445         *lshrqi2_one_bit_cconly, *rotlsi3_1_one_bit_rex64, *rotlsi3_1_one_bit,
1446         *rotlsi3_1_one_bit_zext, *rotlhi3_1_one_bit, *rotlqi3_1_one_bit_slp,
1447         *rotlqi3_1_one_bit, *rotrdi3_1_one_bit_rex64, *rotrsi3_1_one_bit,
1448         *rotrsi3_1_one_bit_zext, *rotrhi3_one_bit, *rotrqi3_1_one_bit,
1449         *rotrqi3_1_one_bit_slp): Override length_immediate attribute to 0,
1450         set mode attribute, don't override length attribute.
1451         (*btsq, *btrq, *btcq, *btdi_rex64, *btsi): Set prefix_0f attribute
1452         to 1.
1453         (return_internal_long): Set length attribute to 2 instead of 1.
1454         (*strmovqi_rex_1, *strsetqi_rex_1, *rep_stosqi_rex64,
1455         *cmpstrnqi_nz_rex_1, *cmpstrnqi_rex_1, *strlenqi_rex_1): Clear
1456         prefix_rex attribute.
1457         * config/i386/predicates.md (ext_QIreg_operand, const128_operand):
1458         New predicates.
1459         (memory_displacement_only_operand): Always return 0 for TARGET_64BIT.
1460
1461 2009-05-21  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1462
1463         * config/arm/thumb2.md (orsi_notsi_si): Fix typo in pattern.
1464
1465 2009-05-20  Ian Lance Taylor  <iant@google.com>
1466
1467         * tree.c (build_tree_list_vec_stat): New function.
1468         (ctor_to_vec): New function.
1469         (build_nt_call_vec): New function.
1470         (build_call_array): Change args to be a const pointer.
1471         (build_call_vec): New function.
1472         * tree.h (build_nt_call_vec): Declare.
1473         (build_tree_list_vec_stat): Declare.
1474         (build_tree_list_vec): Define.
1475         (build_call_array): Update declaration.
1476         (build_call_vec): Declare.
1477         (ctor_to_vec): Declare.
1478         * c-common.c (tree_vector_cache): New static variable.
1479         (make_tree_vector): New function.
1480         (release_tree_vector): New function.
1481         (make_tree_vector_single): New function.
1482         (make_tree_vector_copy): New function.
1483         * c-common.h (tree_vector_cache, make_tree_vector): Declare.
1484         (make_tree_vector_single, make_tree_vector_copy): Declare.
1485         * c-parser.c (cached_expr_list_1, cached_expr_list_2): Remove.
1486         (c_parser_expr_list): Don't manage cache here, instead call
1487         make_tree_vector.
1488         (c_parser_release_expr_list): Remove static function.
1489         (c_parser_vec_to_tree_list): Remove static function.
1490         (c_parser_attributes): Call build_tree_list_vec instead of
1491         c_parser_vec_to_tree_list.  Call release_tree_vector instead of
1492         c_parser_release_expr_list.
1493         (c_parser_postfix_expression_after_primary): Likewise.
1494         (c_parser_objc_keywordexpr): Likewise.
1495
1496 2009-05-20  Sandra Loosemore  <sandra@codesourcery.com>
1497
1498         * doc/tm.texi (Misc): Document TARGET_INVALID_PARAMETER_TYPE,
1499         TARGET_INVALID_RETURN_TYPE, TARGET_PROMOTED_TYPE, and
1500         TARGET_CONVERT_TO_TYPE.
1501         * hooks.c (hook_tree_const_tree_null): Define.
1502         * hooks.h (hook_tree_const_tree_null): Declare.
1503         * target.h (struct gcc_target):  Add invalid_parameter_type,
1504         invalid_return_type, promoted_type, and convert_to_type fields.
1505         * target-def.h: (TARGET_INVALID_PARAMETER_TYPE): Define.
1506         (TARGET_INVALID_RETURN_TYPE): Define.
1507         (TARGET_PROMOTED_TYPE): Define.
1508         (TARGET_CONVERT_TO_TYPE): Define.
1509         (TARGET_INITIALIZER): Update for new fields.
1510         * c-decl.c (grokdeclarator): Check targetm.invalid_return_type.
1511         (grokparms): Check targetm.invalid_parameter_type.
1512         * c-typeck.c (default_conversion): Check targetm.promoted_type.
1513         * c-convert.c (convert): Check targetm.convert_to_type.
1514
1515 2009-05-20  Adam Nemet  <anemet@caviumnetworks.com>
1516
1517         * config/mips/mips.md (*extenddi_truncate<mode>,
1518         *extendsi_truncate<mode>): Emit exts if supported.  Add attribute
1519         defintions.
1520         (*extendhi_truncateqi): New define_insn_and_sptit.
1521
1522 2009-05-20  Jakub Jelinek  <jakub@redhat.com>
1523
1524         PR middle-end/40204
1525         * fold-const.c (fold_binary) <case BIT_AND_EXPR>: Avoid infinite
1526         recursion if build_int_cst_type returns the same INTEGER_CST as arg1.
1527
1528 2009-05-20  Eric Botcazou  <ebotcazou@adacore.com>
1529
1530         * fold-const.c (build_fold_addr_expr_with_type): Take the address of
1531         the operand of VIEW_CONVERT_EXPR.
1532
1533 2009-05-20  H.J. Lu  <hongjiu.lu@intel.com>
1534
1535         * config/i386/driver-i386.c (host_detect_local_cpu): Check
1536         extended family and model for Intel processors.  Support Intel
1537         Atom.
1538
1539 2009-05-20  Olivier Hainque  <hainque@adacore.com>
1540
1541         * gstab.h (stab_code_type): Define, to be used instead of the
1542         __stab_debug_code enum, made anonymous.  Add 2009 to the copyright
1543         notice.
1544         * dbxout.c (STAB_CODE_TYPE): Remove #define and replace use
1545         occurrences by stab_code_type.
1546         * mips-tfile.c (STAB_CODE_TYPE): Remove #define, unused.
1547
1548 2009-05-20  Martin Jambor  <mjambor@suse.cz>
1549
1550         * tree-flow.h (insert_edge_copies_seq): Undeclare.
1551         (sra_insert_before): Likewise.
1552         (sra_insert_after): Likewise.
1553         (sra_init_cache): Likewise.
1554         (sra_type_can_be_decomposed_p): Likewise.
1555         * tree-mudflap.c (insert_edge_copies_seq): Copied here from tree-sra.c
1556         * tree-sra.c (sra_type_can_be_decomposed_p): Made static.
1557         (sra_insert_before): Likewise.
1558         (sra_insert_after): Likewise.
1559         (sra_init_cache): Likewise.
1560         (insert_edge_copies_seq): Made static and moved upwards.
1561
1562         * tree-complex.c (extract_component): Added VIEW_CONVERT_EXPR switch
1563         case.
1564
1565         * tree-flow-inline.h (contains_view_convert_expr_p): New function.
1566
1567         * ipa-prop.c (get_ssa_def_if_simple_copy): New function.
1568         (determine_cst_member_ptr): Call get_ssa_def_if_simple_copy to skip
1569         simple copies.
1570
1571 2009-05-20  Richard Guenther  <rguenther@suse.de>
1572
1573         * expr.c (expand_expr_real_1): Avoid calling do_store_flag
1574         with mismatched comparison modes.
1575
1576 2009-05-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1577
1578         * config/arm/arm.md (*arm_iorsi3): Refactored for only ARM.
1579         (peephole ior (reg, int) -> mov, ior): Refactored for only ARM.
1580         * config/arm/thumb2.md (*thumb_andsi_not_shiftsi_si): Allow bic
1581         with shifts for Thumb2.
1582         (orsi_notsi): New for orn.
1583         (*thumb_orsi_notshiftsi_si): Allow orn with shifts.
1584         (*thumb2_iorsi3): Rewrite support for iorsi for Thumb2.
1585         * config/arm/arm.c (const_ok_for_op): Split case for IOR for Thumb2.
1586         (arm_gen_constant): Set can_invert for IOR and Thumb2, Add comments.
1587         Don't invert remainder for IOR.
1588         
1589 2009-05-19  Zdenek Dvorak  <ook@ucw.cz>
1590
1591         PR tree-optimization/40087
1592         * tree-ssa-loop-niter.c (number_of_iterations_ne_max,
1593         number_of_iterations_ne): Rename never_infinite argument.
1594         (number_of_iterations_lt_to_ne, number_of_iterations_lt,
1595         number_of_iterations_le): Handle pointer-type ivs when
1596         exit_must_be_taken is false.
1597         (number_of_iterations_cond):  Do not always assume that
1598         exit_must_be_taken if the control variable is a pointer.
1599
1600 2009-05-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1601
1602         * c-typeck.c (build_binary_op): Allow % on integal vectors.
1603         * doc/extend.texi (Vector Extension): Document that % is allowed too.
1604
1605 2009-05-19  H.J. Lu  <hongjiu.lu@intel.com>
1606
1607         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Check
1608         ASM_OUTPUT_MAX_SKIP_PAD instead of ASM_OUTPUT_MAX_SKIP_ALIGN.
1609
1610 2009-05-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1611
1612         PR c/40172
1613         * c.opt (Wlogical-op): Disabled by default.
1614         * c-opt (c_common_post_options): Do not enable Wlogical-op with
1615         Wextra.
1616         * doc/invoke.texi (Wlogical-op): Likewise.
1617         
1618 2009-05-19  Eric Botcazou  <ebotcazou@adacore.com>
1619
1620         * tree-scalar-evolution.c (follow_ssa_edge_expr) <NOP_EXPR>: Turn
1621         into CASE_CONVERT.
1622         <PLUS_EXPR>: Strip useless type conversions instead of type nops.
1623         Propagate the type of the first operand.
1624         <ASSERT_EXPR>: Simplify.
1625         (follow_ssa_edge_in_rhs): Use gimple_expr_type to get the type.
1626         Rewrite using the RHS code as discriminant.
1627         <NOP_EXPR>: Turn into CASE_CONVERT.
1628         <PLUS_EXPR>: Propagate the type of the first operand.
1629
1630 2009-05-19  Steve Ellcey  <sje@cup.hp.com>
1631
1632         * config/ia64/ia64-protos.h (ia64_dconst_0_5): New.
1633         (ia64_dconst_0_375): New.
1634         * config/ia64/ia64.c (ia64_override_options): Remove
1635         -minline-sqrt-min-latency warning.
1636         (ia64_dconst_0_5_rtx, ia64_dconst_0_5): New.
1637         (ia64_dconst_0_375_rtx, ia64_dconst_0_375): New
1638         * config/ia64/ia64.md (*sqrt_approx): Remove.
1639         (sqrtsf2): Remove #if 0.
1640         (sqrtsf2_internal_thr): Rewrite and move to div.md.
1641         (sqrtdf): Remove assert.
1642         (sqrtdf2_internal_thr): Rewrite and move to div.md.
1643         (sqrtxf2): Remove #if 0.
1644         (sqrtxf2_internal_thr): Rewrite and move to div.md.
1645         * div.md (sqrt_approx_rf): New.
1646         (sqrtsf2_internal_thr): New implementation.
1647         (sqrtsf2_internal_lat): New.
1648         (sqrtdf2_internal_thr: New implementation.
1649         (sqrtxf2_internal): New implementation.
1650
1651 2009-05-19  Francois-Xavier Coudert  <fxcoudert@gmail.com>
1652             Hans-Peter Nilsson  <hp@axis.com>
1653
1654         * defaults.h (UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE)
1655         (WCHAR_TYPE, MODIFIED_WCHAR_TYPE, PTRDIFF_TYPE, WINT_TYPE)
1656         (INTMAX_TYPE, UINTMAX_TYPE, SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE)
1657         (INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE)
1658         (UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE)
1659         (INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE)
1660         (UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE)
1661         (INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE)
1662         (UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE)
1663         (SIZE_TYPE, PID_TYPE, CHAR16_TYPE, CHAR32_TYPE): Move defaults here...
1664         * c-common.c: ...from here.
1665
1666 2009-05-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1667
1668         * c-common.c (warn_logical_operator): Remove unnecessary
1669         conditionals.
1670
1671 2009-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1672
1673         * builtins.c (do_mpc_arg1): Separate MPFR/MPC C rounding types.
1674
1675 2009-05-19  Ben Elliston  <bje@au.ibm.com>
1676
1677         * unwind-dw2-fde.c (fde_unencoded_compare): Replace type punning
1678         assignments with memcpy calls.
1679         (add_fdes): Likewise.
1680         (binary_search_unencoded_fdes): Likewise.
1681         (linear_search_fdes): Eliminate type puns.
1682         
1683 2009-05-19  Richard Guenther  <rguenther@suse.de>
1684
1685         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Do
1686         not falsely claim to have propagated into all uses.
1687
1688 2009-05-19  Ben Elliston  <bje@au.ibm.com>
1689
1690         * doc/invoke.texi (C Dialect Options): Update OpenMP specification
1691         version to v3.0.
1692
1693 2009-05-18  Kaz Kojima  <kkojima@gcc.gnu.org>
1694
1695         * config/sh/sh-protos.h (sh_legitimate_address_p): Remove.
1696         * config/sh/sh.c (sh_legitimate_address_p): Make static.
1697         (TARGET_LEGITIMATE_ADDRESS_P): New.
1698         * config/sh/sh.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1699         * config/sh/sh.md: Clean up references to GO_IF_LEGITIMATE_ADDRESS.
1700         
1701 2009-05-18  Dodji Seketeli  <dodji@redhat.com>
1702
1703         PR debug/40109
1704         * dwarf2out.c (gen_type_die_with_usage): Generate the DIE as a
1705         child of the containing namespace's DIE.
1706
1707 2009-05-18  Adam Nemet  <anemet@caviumnetworks.com>
1708
1709         * config/mips/mips.md (*zero_extend<GPR:mode>_trunc<SHORT:mode>,
1710         *zero_extendhi_truncqi):  Move after the zero_extend patterns.
1711         (*extenddi_truncate<mode>, *extendsi_truncate<mode>): Move after the
1712         extend patterns.
1713
1714 2009-05-18  H.J. Lu  <hongjiu.lu@intel.com>
1715
1716         PR target/39942
1717         * config/i386/i386.c (ix86_avoid_jump_misspredicts): Replace
1718         gen_align with gen_pad.
1719         (ix86_reorg): Check ASM_OUTPUT_MAX_SKIP_PAD instead of
1720         #ifdef ASM_OUTPUT_MAX_SKIP_ALIGN.
1721
1722         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): New.
1723         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1724
1725         * config/i386/i386.md (align): Renamed to ...
1726         (pad): This.  Replace ASM_OUTPUT_MAX_SKIP_ALIGN with
1727         ASM_OUTPUT_MAX_SKIP_PAD.
1728
1729 2009-05-18  Andreas Schwab  <schwab@linux-m68k.org>
1730
1731         * config.gcc: Fix variable syntax.
1732
1733         PR target/39531
1734         * config/m68k/m68k.c (output_andsi3): Mask off sign bit copies
1735         before calling exact_log2.
1736         (output_iorsi3): Likewise.
1737         (output_xorsi3): Likewise.
1738
1739 2009-05-18  Kaz Kojima  <kkojima@gcc.gnu.org>
1740
1741         * config/sh/sh.c (expand_cbranchdi4): Use a scratch register
1742         for the none zero constant operand except for EQ and NE
1743         comprisons even when the first operand is R0.
1744
1745 2009-05-18  Andreas Krebbel  <krebbel1@de.ibm.com>
1746
1747         * config/s390/2064.md: Remove trailing whitespaces.
1748         * config/s390/2084.md: Likewise.
1749         * config/s390/constraints.md: Likewise.
1750         * config/s390/fixdfdi.h: Likewise.
1751         * config/s390/libgcc-glibc.ver: Likewise.
1752         * config/s390/s390-modes.def: Likewise.
1753         * config/s390/s390-protos.h: Likewise.
1754         * config/s390/s390.c: Likewise.
1755         * config/s390/s390.h: Likewise.
1756         * config/s390/s390.md: Likewise.
1757         * config/s390/tpf-unwind.h: Likewise.
1758
1759 2009-05-18  Maxim Kuvyrkov  <maxim@codesourcery.com>
1760
1761         * config/m68k/m68k.c (m68k_legitimize_address): Fix typo in signature.
1762
1763 2009-05-18  Maxim Kuvyrkov  <maxim@codesourcery.com>
1764
1765         M68K TLS support.
1766         * configure.ac (m68k-*-*): Check if binutils support TLS.
1767         * configure: Regenerate.
1768         * config/m68k/predicates.md (symbolic_operand): Extend comment.
1769         * config/m68k/constraints.md (Cu): New constraint.
1770         * config/m68k/m68k.md (UNSPEC_GOTOFF): Remove.
1771         (UNSPEC_RELOC16, UNSPEC_RELOC32): New constants.
1772         (movsi): Handle TLS symbols.
1773         (addsi3_5200): Handle XTLS symbols, indent.
1774         * config/m68k/m68k-protos.h (m68k_legitimize_tls_address): Declare.
1775         (m68k_tls_reference_p): Declare.
1776         (m68k_legitimize_address): Declare.
1777         (m68k_unwrap_symbol): Declare.
1778         * config/m68k/m68k.opt (mxtls): New option.
1779         * config/m68k/m68k.c (ggc.h): Include.
1780         (m68k_output_dwarf_dtprel): Implement hook.
1781         (TARGET_HAVE_TLS, TARGET_ASM_OUTPUT_DWARF_DTPREL): Define.
1782         (m68k_expand_prologue): Load GOT pointer when function needs it.
1783         (m68k_illegitimate_symbolic_constant_p): Handle TLS symbols.
1784         (m68k_legitimate_constant_address_p): Same.
1785         (m68k_decompose_address): Handle TLS references.
1786         (m68k_get_gp): New static function.
1787         (enum m68k_reloc): New contants.
1788         (TLS_RELOC_P): New macro.
1789         (m68k_wrap_symbol): New static function.
1790         (m68k_unwrap_symbol): New function.
1791         (m68k_final_prescan_insn_1): New static function.
1792         (m68k_final_prescan_insn): New function.
1793         (m68k_move_to_reg, m68k_wrap_symbol_into_got_ref): New static
1794         functions.
1795         (legitimize_pic_address): Handle TLS references..
1796         (m68k_tls_get_addr, m68k_get_tls_get_addr)
1797         (m68k_libcall_value_in_a0_p)
1798         (m68k_call_tls_get_addr, m68k_read_tp, m68k_get_m68k_read_tp)
1799         (m68k_call_m68k_read_tp): Helper variables and functions for ...
1800         (m68k_legitimize_tls_address): Handle TLS references.
1801         (m68k_tls_symbol_p, m68k_tls_reference_p_1, m68k_tls_reference_p):
1802         New functions.
1803         (m68k_legitimize_address): Handle TLS symbols.
1804         (m68k_get_reloc_decoration): New static function.
1805         (m68k_output_addr_const_extra): Handle UNSPEC_RELOC16 and
1806         UNSPEC_RELOC32.
1807         (m68k_output_dwarf_dtprel): Implement hook.
1808         (print_operand_address): Handle UNSPEC_RELOC16 adn UNSPEC_RELOC32.
1809         (m68k_libcall_value): Return result in A0 instead of D0 when asked by
1810         m68k_call_* routines.
1811         (sched_attr_op_type): Handle TLS symbols.
1812         (gt-m68k.h): Include.
1813         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Define.
1814         (LEGITIMATE_PIC_OPERAND_P): Support TLS.
1815
1816 2009-05-18  Martin Jambor  <mjambor@suse.cz>
1817
1818         * ipa-prop.c (ipa_check_stmt_modifications): Removed.
1819         (visit_store_addr_for_mod_analysis): New function.
1820         (ipa_detect_param_modifications): Use walk_stmt_load_store_addr_ops.
1821         (determine_cst_member_ptr): Use gimple_assign_single_p.
1822         (ipa_get_stmt_member_ptr_load_param): Use gimple_assign_single_p.
1823         (ipa_analyze_call_uses): Use !gimple_assign_rhs2 rather than number of
1824         operands.  Don't check number of operands of a NOP_EXPR.
1825
1826 2009-05-18  Eric Fisher  <joefoxreal@gmail.com>
1827
1828         * doc/tree-ssa.texi (SSA Operands): Fix a mistake.
1829
1830 2009-05-17  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1831
1832         PR c/40172
1833         * c-common.c (warn_logical_operator): Don't warn if one of
1834         expression isn't always true or false.
1835
1836 2009-05-17  Kai Tietz  <kai.tietz@onevision.com>
1837
1838         * config/i386/biarch32.h: New file.
1839         * config.gcc: Add for target i386-w64-* the biarch32.h to tm_file.
1840
1841 2009-05-17  Adam Nemet  <anemet@caviumnetworks.com>
1842
1843         * config/mips/mips.md (*zero_extend<mode>_trunchi,
1844         *zero_extend<mode>_truncqi): Merge these into ...
1845         (*zero_extend<GPR:mode>_trunc<SHORT:mode>): ... this new pattern.
1846         Name the pattern following this as *zero_extendhi_truncqi.
1847
1848 2009-05-16  Brad Lucier  <lucier@math.purdue.edu>
1849
1850         PR middle-end/39301
1851         * hwint.h: Add macro HOST_WIDEST_INT_PRINT.
1852         * bitmap.c (bitmap_descriptor): Make fields HOST_WIDEST_INT.
1853         (output_info): Make field HOST_WIDEST_INT.
1854         (print_statistics): Use HOST_WIDEST_INT_PRINT.
1855         (dump_bitmat_statistics): Same.
1856
1857 2009-05-16  Francois-Xavier Coudert  <fxcoudert@gmail.com>
1858
1859         * config.gcc (use_gcc_stdint):  Set to wrap.
1860         * config/darwin.h (SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE,
1861         INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE,
1862         UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE,
1863         INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE,
1864         UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE,
1865         INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE,
1866         UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE,
1867         UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Define.
1868
1869 2009-05-16  Joseph Myers  <joseph@codesourcery.com>
1870
1871         * config.gcc (mips*-*-*): Support arch_32, arch_64, tune_32 and
1872         tune_64.
1873         * config/mips/mips.h (MIPS_ABI_DEFAULT, MULTILIB_ABI_DEFAULT):
1874         Move definitions earlier.
1875         (OPT_ARCH64, OPT_ARCH32): Define.
1876         (OPTION_DEFAULT_SPECS): Add entries for arch_32, arch_64, tune_32
1877         and tune_64.
1878
1879 2009-05-16  Richard Earnshaw  <rearnsha@arm.com>
1880
1881         PR target/40153
1882         * arm.md (cstoresi_nltu_thumb1): Use a neg of ltu as the pattern name
1883         implies.
1884
1885 2009-05-16  Richard Earnshaw  <rearnsha@arm.com>
1886
1887         * arm.md (movdi2): Copy non-reg values to DImode registers.
1888
1889 2009-05-16  Jakub Jelinek  <jakub@redhat.com>
1890
1891         PR target/39942
1892         * final.c (label_to_max_skip): New function.
1893         (label_to_alignment): Only use LABEL_TO_ALIGNMENT if
1894         CODE_LABEL_NUMBER <= max_labelno.
1895         * output.h (label_to_max_skip): New prototype.
1896         * config/i386/i386.c (ix86_avoid_jump_misspredicts): Renamed to...
1897         (ix86_avoid_jump_mispredicts): ... this.  Don't define if
1898         ASM_OUTPUT_MAX_SKIP_ALIGN isn't defined.  Update comment.
1899         Handle CODE_LABELs with >= 16 byte alignment or with
1900         max_skip == (1 << align) - 1.
1901         (ix86_reorg): Don't call ix86_avoid_jump_mispredicts if
1902         ASM_OUTPUT_MAX_SKIP_ALIGN isn't defined.
1903
1904         PR target/39942
1905         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Don't emit second
1906         .p2align 3 if MAX_SKIP is smaller than 7.
1907         * config/i386/linux.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1908
1909 2009-05-15  Ian Lance Taylor  <iant@google.com>
1910
1911         * alias.c (struct alias_set_entry_d): Rename from struct
1912         alias_set_entry.  Change all uses.
1913         * except.c (struct call_site_record_d): Rename from struct
1914         call_site_record.  Change all uses.
1915         * except.h (struct eh_region_d): Rename from struct eh_region.
1916         Change all uses.
1917         * gcse.c (struct hash_table_d): Rename from struct hash_table.
1918         Change all uses.
1919         * graphite.c (struct ivtype_map_elt_d): Rename fromstruct
1920         ivtype_map_elt.  Change all uses.
1921         (struct rename_map_elt_d): Rename fromstruct rename_map_elt.
1922         Change all uses.
1923         (struct ifsese_d): Rename fromstruct ifsese.  Change all uses.
1924         * graphite.h (struct name_tree_d): Rename from struct name_tree.
1925         Change all uses.
1926         (struct sese_d): Rename from struct sese.  Change all uses.
1927         * omega.h (struct eqn_d): Rename from struct eqn.  Change all uses.
1928         (struct omega_pb_d): Rename from struct omega_pb.  Change all uses.
1929         * optabs.h (struct optab_d): Rename from struct optab.  Change all
1930         uses.
1931         (struct convert_optab_d): Rename from struct convert_optab.
1932         Change all uses.
1933         * tree-pass.h (struct ipa_opt_pass_d): Rename fromstruct
1934         ipa_opt_pass.  Change all uses.
1935         * tree-predcom.c (struct dref_d): Rename from struct dref.  Change
1936         all uses.
1937
1938         * c-decl.c (pushtag): If -Wc++-compat, warn if the tag is already
1939         defined as a typedef.
1940         (grokdeclarator): If -Wc++-compat, warn if a typedef is already
1941         defined as a tag.
1942
1943 2009-05-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1944
1945         PR 16302
1946         * fold-const.c (make_range,build_range_check,merge_ranges): Move
1947         declaration to...
1948         (merge_ranges): Returns bool. 
1949         * tree.h (make_range): .. to here.
1950         (build_range_check): Likewise.
1951         (merge_ranges): Likewise. Renamed from merge_ranges.
1952         * c-typeck.c (parser_build_binary_op): Update calls to
1953         warn_logical_operator.
1954         * c-common.c (warn_logical_operator): Add new warning.
1955         * c-common.h (warn_logical_operator): Update declaration.
1956         
1957 2009-05-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1958
1959         * ira-conflicts.c (add_insn_allocno_copies): Fix wrong conditional.
1960         
1961 2009-05-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1962
1963         * doc/install.texi: Document MPC requirements, flags etc.
1964
1965         * builtins.c (do_mpc_arg1, fold_builtin_ccos): New.
1966         (fold_builtin_cexp): Ensure we get a complex REAL_TYPE.
1967         Evaluate constant arguments.
1968         (fold_builtin_carg): Ensure we get a complex REAL_TYPE.
1969         (fold_builtin_1): Likewise, also evaluate constant arguments.
1970         Remove superfluous break.
1971         (do_mpc_ckconv): New.
1972         * real.h: Include mpc.h.
1973         * toplev.c (print_version): Output MPC version info if available.
1974
1975 2009-05-15  Sandra Loosemore  <sandra@codesourcery.com>
1976
1977         * fold-const.c (fold_convert_const_real_from_real): Check for overflow.
1978
1979 2009-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1980
1981         * config/i386/i386.c (ix86_reorg): Call optimize_function_for_speed_p
1982         only once.
1983
1984 2009-05-15  Jan Hubicka  <jh@suse.cz>
1985
1986         * doc/invoke.texi (max-early-inliner-iterations): New flag.
1987         * ipa-inline.c (enum inlining_mode): New INLINE_SIZE_NORECURSIVE.
1988         (try_inline): Fix return value.
1989         (cgraph_decide_inlining_incrementally): Honor new value.
1990         (cgraph_early_inlining): Handle indirect inlining.
1991         * params.def (PARAM_EARLY_INLINER_MAX_ITERATIONS): New.
1992
1993 2009-05-15  Jan Hubicka  <jh@suse.cz>
1994
1995         * cgraph.h (struct cgraph_node): Add finalized_by_frotnend flag.
1996         * cgraphunit.c (cgraph_finalize_function): Set it.
1997         (cgraph_expand_function): Use it.
1998
1999 2009-05-15  Sandra Loosemore  <sandra@codesourcery.com>
2000
2001         * real.c (encode_ieee_half): Define.
2002         (decode_ieee_half): Define.
2003         (ieee_half_format): Define.
2004         (arm_half_format): Define.
2005         * real.h (ieee_half_format): Declare.
2006         (arm_half_format): Declare.
2007
2008 2009-05-15  Sandra Loosemore  <sandra@codesourcery.com>
2009
2010         * optabs.c (prepare_float_lib_cmp):  Test that the comparison,
2011         swapped, and reversed optabs exist before trying to use them.
2012
2013 2009-05-15  Paul Brook  <paul@codesourcery.com>
2014             Sandra Loosemore  <sandra@codesourcery.com>
2015
2016         * config/arm/arm.c (neon_vector_mem_operand): Handle element/structure
2017         loads.  Allow PRE_DEC.
2018         (output_move_neon): Handle PRE_DEC.
2019         (arm_print_operand): Add 'A' for neon structure loads.
2020         * config/arm/arm-protos.h (neon_vector_mem_operand): Update prototype.
2021         * config/arm/neon.md (neon_mov): Update comment.
2022         * config/arm/constraints.md (Un, Us): Update neon_vector_mem_operand
2023         calls.
2024         (Um): New constraint.
2025
2026 2009-05-15  Jan Hubicka  <jh@suse.cz>
2027
2028         Revert the following patch until testsuite fallout is fixed:
2029         * cgraph.c (dump_cgraph_node): Dump size/time/benefit.
2030         * cgraph.h (struct inline_summary): New filed self_wize,
2031         size_inlining_benefit, self_time and time_inlining_benefit.
2032         (struct cgraph_global_info): Replace insns by time ans size fields.
2033         * ipa-cp (ipcp_cloning_candidate_p): Base estimate on size
2034         (ipcp_estimate_growth, ipcp_insert_stage): Likewise.
2035         (ipcp_update_callgraph): Do not touch function bodies.
2036         * ipa-inline.c: Include except.h
2037         (MAX_TIME): New constant.
2038         (overall_insns): Remove
2039         (overall_size, max_benefit): New static variables.
2040         (cgraph_estimate_time_after_inlining): New function.
2041         (cgraph_estimate_size_after_inlining): Rewrite using benefits.
2042         (cgraph_clone_inlined_nodes): Update size.
2043         (cgraph_mark_inline_edge): Update size.
2044         (cgraph_estimate_growth): Use size info.
2045         (cgraph_check_inline_limits): Check size.
2046         (cgraph_default_inline_p): Likewise.
2047         (cgraph_edge_badness): Compute badness based on benefit and size cost.
2048         (cgraph_decide_recursive_inlining): Check size.
2049         (cgraph_decide_inlining_of_small_function): Update size; dump sizes and
2050         times.
2051         (cgraph_decide_inlining): Likewise.
2052         (cgraph_decide_inlining_incrementally): Likewise; honor
2053         PARAM_EARLY_INLINING_INSNS.
2054         (likely_eliminated_by_inlining_p): New predicate.
2055         (estimate_function_body_sizes): New function.
2056         (compute_inline_parameters): Use it.
2057         * except.c (must_not_throw_labels): New function.
2058         * except.h (must_not_throw_labels): Declare.
2059         * tree-inline.c (init_inline_once): Kill inlining_weigths
2060         * tree-ssa-structalias.c: Avoid uninitialized warning.
2061         * params.def (PARAM_MAX_INLINE_INSNS_SINGLE): Reduce to 300.
2062         (PARAM_MAX_INLINE_INSNS_AUTO): Reduce to 60.
2063         (PARAM_INLINE_CALL_COST): Remove.
2064         (PARAM_EARLY_INLINING_INSNS): New.
2065
2066 2009-05-15  Richard Guenther  <rguenther@suse.de>
2067
2068         * tree-ssa-pre.c (eliminate): Use TODO_update_ssa_only_virtuals,
2069         not TODO_update_ssa.
2070
2071 2009-05-15  Richard Guenther  <rguenther@suse.de>
2072
2073         PR tree-optimization/39999
2074         * gimple.h (gimple_expr_type): Use the expression type looking
2075         through useless conversions.
2076         * tree-ssa-sccvn.c (vn_nary_op_lookup_stmt): Use gimple_expr_type.
2077         (vn_nary_op_insert_stmt): Likewise.
2078         (simplify_binary_expression): Likewise.
2079
2080 2009-05-15  Richard Guenther  <rguenther@suse.de>
2081
2082         * common.opt (-ftree-forwprop, -ftree-phiprop, -ftree-pta):
2083         New options, enabled by default.
2084         * doc/invoke.texi (-ftree-forwprop, -ftree-phiprop, -ftree-pta):
2085         Document.
2086         * tree-ssa-forwprop.c (gate_forwprop): Use flag_tree_forwprop.
2087         * tree-ssa-phiprop.c (gate_phiprop): Use flag_tree_phiprop.
2088         * tree-ssa-structalias.c (gate_tree_pta): New function.
2089         (pass_build_alias): Use it.
2090
2091 2009-05-15  Joseph Myers  <joseph@codesourcery.com>
2092
2093         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also
2094         recurse on an invariant address if a conversion from a pointer
2095         type to a wider integer type is involved.
2096
2097 2009-05-15  Jan Hubicka  <jh@suse.cz>
2098
2099         * cgraph.c (dump_cgraph_node): Dump size/time/benefit.
2100         * cgraph.h (struct inline_summary): New filed self_wize,
2101         size_inlining_benefit, self_time and time_inlining_benefit.
2102         (struct cgraph_global_info): Replace insns by time ans size fields.
2103         * ipa-cp (ipcp_cloning_candidate_p): Base estimate on size
2104         (ipcp_estimate_growth, ipcp_insert_stage): Likewise.
2105         (ipcp_update_callgraph): Do not touch function bodies.
2106         * ipa-inline.c: Include except.h
2107         (MAX_TIME): New constant.
2108         (overall_insns): Remove
2109         (overall_size, max_benefit): New static variables.
2110         (cgraph_estimate_time_after_inlining): New function.
2111         (cgraph_estimate_size_after_inlining): Rewrite using benefits.
2112         (cgraph_clone_inlined_nodes): Update size.
2113         (cgraph_mark_inline_edge): Update size.
2114         (cgraph_estimate_growth): Use size info.
2115         (cgraph_check_inline_limits): Check size.
2116         (cgraph_default_inline_p): Likewise.
2117         (cgraph_edge_badness): Compute badness based on benefit and size cost.
2118         (cgraph_decide_recursive_inlining): Check size.
2119         (cgraph_decide_inlining_of_small_function): Update size; dump sizes and
2120         times.
2121         (cgraph_decide_inlining): Likewise.
2122         (cgraph_decide_inlining_incrementally): Likewise; honor
2123         PARAM_EARLY_INLINING_INSNS.
2124         (likely_eliminated_by_inlining_p): New predicate.
2125         (estimate_function_body_sizes): New function.
2126         (compute_inline_parameters): Use it.
2127         * except.c (must_not_throw_labels): New function.
2128         * except.h (must_not_throw_labels): Declare.
2129         * tree-inline.c (init_inline_once): Kill inlining_weigths
2130         * tree-ssa-structalias.c: Avoid uninitialized warning.
2131         * params.def (PARAM_MAX_INLINE_INSNS_SINGLE): Reduce to 300.
2132         (PARAM_MAX_INLINE_INSNS_AUTO): Reduce to 60.
2133         (PARAM_INLINE_CALL_COST): Remove.
2134         (PARAM_EARLY_INLINING_INSNS): New.
2135         doc/invoke.texi (max-inline-insns-auto, early-inlining-insns): Update.
2136         (inline-call-cost): Remove.
2137         (early-inlining-insns): New.
2138
2139 2009-05-15  Eric Botcazou  <ebotcazou@adacore.com>
2140
2141         * dbxout.c (dbxout_range_type): Add LOW and HIGH parameters.  Use them
2142         for bounds.
2143         (print_int_cst_bounds_in_octal_p): Likewise.
2144         (dbxout_type): Adjust calls to above functions.  Be prepared to deal
2145         with subtypes.
2146         * dwarf2out.c (base_type_die): Likewise.
2147         (is_subrange_type): Delete.
2148         (subrange_type_die): Add LOW and HIGH parameters.  Use them for bounds.
2149         (modified_type_die): Call subrange_type_for_debug_p on subtypes.
2150         * fold-const.c (fold_truth_not_expr) <CONVERT_EXPR>: Do not strip it if
2151         the destination type is boolean.
2152         (build_range_check): Do not special-case subtypes.
2153         (fold_sign_changed_comparison): Likewise.
2154         (fold_unary): Likewise.
2155         * langhooks-def.h (LANG_HOOKS_GET_SUBRANGE_BOUNDS): Define.
2156         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add LANG_HOOKS_GET_SUBRANGE_BOUNDS.
2157         * langhooks.h (lang_hooks_for_types): Add get_subrange_bounds.
2158         * tree.c (subrange_type_for_debug_p): New predicate based on the former
2159         is_subrange_type.
2160         * tree.h (subrange_type_for_debug_p): Declare.
2161         * tree-chrec.c (avoid_arithmetics_in_type_p): Delete.
2162         (convert_affine_scev): Remove call to above function.
2163         (chrec_convert_aggressive): Likewise.
2164         * tree-ssa.c (useless_type_conversion_p_1): Do not specifically return
2165         false for conversions involving subtypes.
2166         * tree-vrp.c (vrp_val_max): Do not special-case subtypes.
2167         (vrp_val_min): Likewise.
2168         (needs_overflow_infinity): Likewise.
2169         (extract_range_from_unary_expr): Likewise.
2170
2171 2009-05-15  Paolo Bonzini  <bonzini@gnu.org>
2172
2173         * config/frv/frv.h: Clean up references to GO_IF_LEGITIMATE_ADDRESS.
2174         * config/frv/frv.c: Likewise.
2175         * config/s390/s390.c: Likewise.
2176         * config/sparc/sparc.h: Likewise.
2177         * config/i386/i386.h: Likewise.
2178         * config/i386/i386.c: Likewise.
2179         * config/crx/crx.c: Likewise.
2180         * config/m68hc11/m68hc11.h: Likewise.
2181         * config/iq2000/iq2000.c: Likewise.
2182         * config/mn10300/mn10300.h: Likewise.
2183         * config/mn10300/mn10300.c: Likewise.
2184         * config/m68k/m68k.c: Likewise.
2185         * config/rs6000/rs6000.c: Likewise.
2186         * config/rs6000/xcoff.h: Likewise.
2187         * config/rs6000/linux64.h: Likewise.
2188         * config/rs6000/sysv4.h: Likewise.
2189         * config/score/score3.c: Likewise.
2190         * config/score/score7.c: Likewise.
2191         * config/score/score.c: Likewise.
2192         * config/arm/arm.md: Likewise.
2193         * config/mips/mips.c: Likewise.
2194         * config/mips/mips.md: Likewise.
2195         * config/bfin/bfin.h: Likewise.
2196         * config/pa/pa.c: Likewise.
2197         * config/pa/constraints.md: Likewise.
2198
2199         * config/pdp11/pdp11-protos.h (legitimate_address_p): Delete.
2200         * config/pdp11/pdp11.c (legitimate_address_p): Delete.
2201         * config/pdp11/pdp11.h: Use memory_address_p instead.
2202
2203 2009-05-14  Ian Lance Taylor  <iant@google.com>
2204
2205         * passes.c (finish_optimization_passes): Change i to int.
2206         * plugin.c (plugins_active_p): Change event to int.
2207         (dump_active_plugins): Likewise.
2208         * reginfo.c (invalid_mode_change_p): Change to to unsigned int.
2209         Add cast.
2210         * tree.c (tree_range_check_failed): Change c to unsigned int.
2211         (omp_clause_range_check_failed): Likewise.
2212         (build_common_builtin_nodes): Change mode to int.  Add cast.
2213         * config/ia64/ia64.c (is_emitted): Change r to unsigned int.
2214         (ia64_hard_regno_rename_ok, ia64_eh_uses): Likewise.
2215
2216         * c-typeck.c (build_unary_op): If -Wc++-compat, warn about using
2217         ++ or -- with a variable of enum type.
2218
2219 2009-05-14  Steven Bosscher  <steven@gcc.gnu.org>
2220
2221         PR driver/40144
2222         * opts.c (common_handle_option): Add OPT_fcse_skip_blocks as a no-op.
2223
2224 2009-05-14  Steven Bosscher  <steven@gcc.gnu.org>
2225
2226         * store-motion.c: Do not include params.h
2227         * Makefile.in: Fix dependencies for various files.
2228
2229 2009-05-14  Steven Bosscher  <steven@gcc.gnu.org>
2230
2231         * auto-inc-dec.c: Fix pass description, remove apparent
2232         accidental duplication.
2233
2234 2009-05-14  H.J. Lu  <hongjiu.lu@intel.com>
2235
2236         PR middle-end/40147
2237         * ipa-utils.h (memory_identifier_string): Moved to ...
2238         * tree.h (memory_identifier_string): Here.  Add GTY(()).
2239
2240 2009-05-14  Paolo Bonzini  <bonzini@gnu.org>
2241
2242         * doc/tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this
2243         in the former documentation of...
2244         (GO_IF_LEGITIMATE_ADDRESS): ... this.
2245         * ira-conflicts.c (get_dup_num): Use address_operand.
2246         * targhooks.c (default_legitimate_address_p): New.
2247         * targhooks.h (default_legitimate_address_p): New.
2248         * reload.c (strict_memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]:
2249         Call hook.
2250         * recog.c (memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook.
2251         * target.h (struct target): Add legitimate_address_p.
2252         * target-def.h (TARGET_LEGITIMATE_ADDRESS_P): New.
2253         (TARGET_INITIALIZER): Include it.
2254
2255         * config/alpha/alpha.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2256         * config/alpha/alpha-protos.h (alpha_legitimate_address_p): Remove.
2257         * config/alpha/alpha.c (alpha_legitimate_address_p): Make static.
2258         (TARGET_LEGITIMATE_ADDRESS_P): New.
2259
2260         * config/frv/frv.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2261         (REG_OK_STRICT_P): Delete.
2262         * config/frv/frv-protos.h (frv_legitimate_address_p): Rename to...
2263         (frv_legitimate_address_p_1): ... this.
2264         * config/frv/frv.c (frv_legitimate_address_p): Forward to...
2265         (frv_legitimate_address_p_1): ... the renamed old
2266         frv_legitimate_address_p.
2267         * config/frv/predicates.md: Adjust calls to frv_legitimate_address_p.
2268         (TARGET_LEGITIMATE_ADDRESS_P): New.
2269
2270         * config/s390/s390.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2271         * config/s390/s390-protos.h (legitimate_address_p): Remove.
2272         * config/s390/s390.c (legitimate_address_p): Rename to...
2273         (s390_legitimate_address_p): ... this, make static.
2274         (legitimize_address): Adjust call.
2275         (TARGET_LEGITIMATE_ADDRESS_P): New.
2276         * config/s390/constraints.md ("e"): Call strict_memory_address_p.
2277
2278         * config/m32c/m32c.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2279         * config/m32c/m32c-protos.h (m32c_legitimate_address_p): Remove.
2280         * config/m32c/m32c.c (m32c_legitimate_address_p): Make static.
2281         (TARGET_LEGITIMATE_ADDRESS_P): New.
2282
2283         * config/spu/spu.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2284         * config/spu/spu-protos.h (spu_legitimate_address): Remove.
2285         * config/spu/spu.c (spu_legitimate_address): Rename to...
2286         (spu_legitimate_address_p): ... this, make static.
2287         (TARGET_LEGITIMATE_ADDRESS_P): New.
2288
2289         * config/sparc/sparc.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2290         * config/sparc/sparc-protos.h (legitimate_address_p): Remove.
2291         * config/sparc/sparc.c (legitimate_address_p): Rename to...
2292         (sparc_legitimate_address_p): ... this, make static and return bool.
2293         (legitimize_address): Adjust call.
2294         (TARGET_LEGITIMATE_ADDRESS_P): New.
2295
2296         * config/i386/i386.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2297         * config/i386/i386-protos.h (legitimate_address_p): Remove.
2298         * config/i386/i386.c (legitimate_address_p): Rename to...
2299         (ix86_legitimate_address_p): ... this, make static.
2300         (constant_address_p): Move after it, adjust call.
2301         (TARGET_LEGITIMATE_ADDRESS_P): New.
2302
2303         * config/avr/avr.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2304         * config/avr/avr-protos.h (legitimate_address_p): Remove.
2305         * config/avr/avr.c (legitimate_address_p): Rename to...
2306         (avr_legitimate_address_p): ... this, make static.
2307         (legitimize_address): Adjust call.
2308         (TARGET_LEGITIMATE_ADDRESS_P): New.
2309
2310         * config/crx/crx.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2311         * config/crx/crx-protos.h (crx_legitimate_address_p): Remove.
2312         * config/crx/crx.c (crx_legitimate_address_p): Make static.
2313         (TARGET_LEGITIMATE_ADDRESS_P): New.
2314
2315         * config/xtensa/xtensa.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2316         * config/xtensa/xtensa-protos.h (xtensa_legitimate_address_p): Remove.
2317         * config/xtensa/xtensa.c (xtensa_legitimate_address_p): Make static.
2318         (TARGET_LEGITIMATE_ADDRESS_P): New.
2319
2320         * config/stormy16/stormy16.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2321         * config/stormy16/stormy16-protos.h (xstormy16_legitimate_address_p):
2322         Remove.
2323         * config/stormy16/stormy16.c (xstormy16_legitimate_address_p):
2324         Make static.
2325         (TARGET_LEGITIMATE_ADDRESS_P): New.
2326
2327         * config/m68hc11/m68hc11.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2328         * config/m68hc11/m68hc11-protos.h (m68hc11_go_if_legitimate_address):
2329         Remove.
2330         * config/m68hc11/m68hc11.c (m68hc11_go_if_legitimate_address):
2331         Rename to...
2332         (m68hc11_legitimate_address_p): ... this, make static.
2333         (go_if_legitimate_address_internal): Rename to...
2334         (m68hc11_legitimate_address_p_1): ... this.
2335         (legitimize_address): Adjust call.
2336         (TARGET_LEGITIMATE_ADDRESS_P): New.
2337
2338         * config/iq2000/iq2000.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2339         * config/iq2000/iq2000-protos.h (iq2000_legitimate_address_p): Remove.
2340         * config/iq2000/iq2000.c (iq2000_legitimate_address_p): Make static.
2341         (TARGET_LEGITIMATE_ADDRESS_P): New.
2342
2343         * config/mn10300/mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2344         * config/mn10300/mn10300-protos.h (legitimate_address_p): Remove.
2345         * config/mn10300/mn10300.c (legitimate_address_p): Rename to...
2346         (mn10300_legitimate_address_p): ... this, make static.
2347         (TARGET_LEGITIMATE_ADDRESS_P): New.
2348
2349         * config/m68k/m68k.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2350         * config/m68k/m68k-protos.h (m68k_legitimate_address_p): Remove.
2351         * config/m68k/m68k.c (m68k_legitimate_address_p): Make static.
2352         (TARGET_LEGITIMATE_ADDRESS_P): New.
2353
2354         * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2355         (REG_OK_STRICT_FLAG, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Delete.
2356         (INT_REG_OK_FOR_BASE_P, INT_REG_OK_FOR_INDEX_P): Move above.
2357         * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2358         * config/rs6000/rs6000-protos.h (rs6000_legitimate_address): Remove.
2359         * config/rs6000/rs6000.c (rs6000_legitimate_address): Rename to...
2360         (rs6000_legitimate_address_p): ... this, make static.
2361         (TARGET_LEGITIMATE_ADDRESS_P): New.
2362         (REG_MODE_OK_FOR_BASE_P): Delete.
2363         (rs6000_legitimize_reload_address): Use INT_REG_OK_FOR_BASE_P.
2364
2365         * config/picochip/picochip.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2366         * config/picochip/picochip-protos.h (picochip_legitimate_address_p):
2367         Delete.
2368         * config/picochip/picochip.c (picochip_legitimate_address_p): Make
2369         static, adjust types.
2370         (TARGET_LEGITIMATE_ADDRESS_P): New.
2371
2372         * config/score/score.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2373         * config/score/score.c (score_address_p): Rename to...
2374         (score_legitimate_address_p): ... this.
2375         (TARGET_LEGITIMATE_ADDRESS_P): New.
2376         * config/score/score3.c (score3_address_p): Rename to...
2377         (score3_legitimate_address_p): ... this.
2378         * config/score/score7.c (score7_address_p): Rename to...
2379         (score7_legitimate_address_p): ... this.
2380
2381         * config/arm/arm.h (ARM_GO_IF_LEGITIMATE_ADDRESS,
2382         THUMB2_GO_IF_LEGITIMATE_ADDRESS, THUMB1_GO_IF_LEGITIMATE_ADDRESS,
2383         GO_IF_LEGITIMATE_ADDRESS): Delete.
2384         * config/arm/arm-protos.h (thumb1_legitimate_address_p,
2385         thumb2_legitimate_address_p): Delete.
2386         (arm_legitimate_address_p): Rename to...
2387         (arm_legitimate_address_outer_p): ... this.
2388         * config/arm/constraints.md ("Uq"): Adjust call.
2389         * config/arm/predicates.md (arm_extendqisi_mem_op): Likewise.
2390         * config/arm/arm.c (arm_legitimate_address_p): New, rename old one to...
2391         (arm_legitimate_address_outer_p): ... this.
2392         (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Make static.
2393         (TARGET_LEGITIMATE_ADDRESS_P): New.
2394
2395         * config/mips/mips.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2396         * config/mips/mips-protos.h (mips_legitimate_address_p): Remove.
2397         * config/mips/mips.c (mips_legitimate_address_p): ... Make static.
2398         (TARGET_LEGITIMATE_ADDRESS_P): New.
2399
2400         * config/vax/vax.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2401         * config/vax/vax-protos.h (legitimate_address_p): Remove.
2402         * config/vax/vax.c (legitimate_address_p): Rename to...
2403         (vax_legitimate_address_p): ... this, make static.
2404         (TARGET_LEGITIMATE_ADDRESS_P): New.
2405
2406         * config/h8300/h8300.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2407         * config/h8300/h8300-protos.h (h8300_legitimate_address_p): Remove.
2408         * config/h8300/h8300.c (h8300_legitimate_address_p): ... Make static.
2409         (TARGET_LEGITIMATE_ADDRESS_P): New.
2410
2411         * config/mmix/mmix.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2412         * config/mmix/mmix-protos.h (mmix_legitimize_address): Remove.
2413         * config/mmix/mmix.c (mmix_legitimate_address): Rename to...
2414         (mmix_legitimate_address_p): ... this, make static.
2415         (TARGET_LEGITIMATE_ADDRESS_P): New.
2416
2417         * config/bfin/bfin.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
2418         * config/bfin/bfin-protos.h (bfin_legitimate_address_p): Remove.
2419         * config/bfin/bfin.c (bfin_legitimate_address_p): ... Make static.
2420         (TARGET_LEGITIMATE_ADDRESS_P): New.
2421
2422 2009-05-14  Paolo Bonzini  <bonzini@gnu.org>
2423
2424         * config/arm/arm.h (PROMOTE_FUNCTION_MODE): Remove handling
2425         of MODE_COMPLEX_INT.
2426
2427 2009-05-14  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2428
2429         * config/alpha/alpha.c (alpha_initialize_trampoline): Change 0 to
2430         LCT_NORMAL in function call.
2431         * mips-tdump.c (print_file_desc): Add cast to enum type.
2432         * mips-tfile.c (add_ext_symbol): Add casts to enum types.
2433         (mark_stabs): Add casts to enum types.
2434         (parse_stabs_common): Add casts to enum types.
2435
2436 2009-05-13  Adam Nemet  <anemet@caviumnetworks.com>
2437
2438         * config/mips/mips.c (mips_print_operand) <REG, MEM, default>:
2439         Check for invalid values of LETTER.
2440
2441 2009-05-13  Taras Glek  <tglek@mozilla.com>
2442
2443         * attribs.c (register_attribute): moved out attribute registration into
2444         register_attribute.
2445         * doc/plugins.texi: Documented register_attribute and PLUGIN_ATTRIBUTES.
2446         * gcc-plugin.h: Added forward decl for register_attribute.
2447         * gcc-plugin.h (plugins_event): Added PLUGIN_ATTRIBUTES.
2448         * plugin.c (register_callback, invoke_plugin_callbacks): Added
2449         PLUGIN_ATTRIBUTES boilerplate.
2450
2451 2009-05-14  Dave Korn  <dave.korn.cygwin@gmail.com>
2452
2453         * config/i386/msformat-c.c (ms_printf_length_specs):  Use enumeration
2454         values even in sentinel and empty entries.
2455         (ms_printf_flag_specs):  Likewise.
2456         (ms_scanf_flag_specs):  Likewise.
2457         (ms_strftime_flag_specs):  Likewise.
2458         (ms_print_char_table):  Likewise.
2459         (ms_scan_char_table):  Likewise.
2460         (ms_time_char_table):  Likewise.
2461
2462 2009-05-13  Doug Kwan  <dougkwan@google.com>
2463
2464         * tree-ssa-sccvn.c (compare_ops): Stabilize qsort.
2465
2466 2009-05-13  Adam Nemet  <anemet@caviumnetworks.com>
2467
2468         * config/mips/mips.md (store): Add attributes for QI and HI.
2469         Update comment.
2470         (truncdisi2, truncdihi2, truncdiqi2): Merge these into ...
2471         (truncdi<mode>2): ... this new pattern.
2472
2473 2009-05-13  Brad Hards  <bradh@kde.org>
2474
2475         * Makefile.in (TEXI_GCCINT_FILES): Add plugins.texi.
2476
2477 2009-05-14  Jakub Jelinek  <jakub@redhat.com>
2478             Ben Elliston <bje@au.ibm.com>
2479
2480         PR middle-end/40035
2481         * dse.c (check_mem_read_rtx): Guard against width == -1.
2482
2483 2009-05-13  Michael Matz  <matz@suse.de>
2484
2485         PR middle-end/39976
2486         * tree-outof-ssa.c (maybe_renumber_stmts_bb): New function.
2487         (trivially_conflicts_p): New function.
2488         (insert_backedge_copies): Use it.
2489
2490 2009-05-13  Janis Johnson  <janis187@us.ibm.com>
2491
2492         * c-pragma.c (enum pragma_switch_t): Prefix constants with PRAGMA_.
2493         (handle_stdc_pragma): Use new enum constant names.
2494         (handle_pragma_float_const_decimal64): Ditto.
2495
2496 2009-05-13  Ian Lance Taylor  <iant@google.com>
2497
2498         * Makefile.in (build/gencheck.o): Depend upon all-tree.def, not
2499         tree.def.
2500
2501 2009-05-13  Nathan Sidwell  <nathan@codesourcery.com>
2502
2503         * config/m68k/t-uclinux (M68K_MLIB_CPU): Check for FL_UCLINUX.
2504         * config/m68k/m68k-devices.def: Add FL_UCLINUX to 68020 and 54455
2505         multilibs.
2506         * config/m68k/m68k.h (FL_UCLINUX): Define.
2507
2508 2009-05-13  Jan Hubicka  <jh@suse.cz>
2509
2510         * options.c (gfc_post_options): -fwhole-program imply -fwhole-file.
2511
2512 2009-05-12  Kaz Kojima  <kkojima@gcc.gnu.org>
2513
2514         * config/sh/sh.h (OVERRIDE_OPTIONS): Clear flag_schedule_insns
2515         unless -fschedule-insns is specified.
2516
2517 2009-05-12  Kaz Kojima  <kkojima@gcc.gnu.org>
2518
2519         PR target/39561
2520         * config/sh/sh.h (OPTIMIZATION_OPTIONS): Don't set
2521         TARGET_EXPAND_CBRANCHDI4.
2522         * config/sh/sh.md (cbranchdi4): Don't check TARGET_EXPAND_CBRANCHDI4.
2523         * config/sh/sh.opt (mexpand-cbranchdi): Remove.
2524         (cmpeqdi): Fix comment.
2525
2526 2009-05-12  Kaz Kojima  <kkojima@gcc.gnu.org>
2527
2528         * config/sh/sh-protos.h (sh_legitimate_index_p): Declare.
2529         (sh_legitimate_address_p): Likewise.
2530         * config/sh/sh.c (sh_legitimate_index_p): New.
2531         (sh_legitimate_address_p): Likewise.
2532         * config/sh/sh.h (REG_OK_FOR_BASE_P): Add STRICT parameter.
2533         (REG_OK_FOR_INDEX_P, SUBREG_OK_FOR_INDEX_P): Likewise.
2534         (MODE_DISP_OK_4, MODE_DISP_OK_8): Remove.
2535         (MAYBE_BASE_REGISTER_RTX_P): New macro.
2536         (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
2537         (BASE_REGISTER_RTX_P): Use MAYBE_BASE_REGISTER_RTX_P.
2538         (INDEX_REGISTER_RTX_P): Use MAYBE_INDEX_REGISTER_RTX_P.
2539         (GO_IF_LEGITIMATE_INDEX): Use sh_legitimate_index_p.
2540         (GO_IF_LEGITIMATE_ADDRESS): Use sh_legitimate_address_p.
2541
2542 2009-05-12  Jan Hubicka  <jh@suse.cz>
2543
2544         * tree-inline.c (estimate_operator_cost): Add operands;
2545         when division happens by constant, it is cheap.
2546         (estimate_num_insns): Loads and stores are not having cost of 0;
2547         EH magic stuff is cheap; when computing runtime cost of switch,
2548         use log2 base of amount of its cases; builtin_expect has cost of 0;
2549         compute cost for moving return value of call.
2550         (init_inline_once): Initialize time_based flags.
2551         * tree-inline.h (eni_weights_d): Add time_based flag.
2552
2553 2009-05-12  Paolo Bonzini  <bonzini@gnu.org>
2554
2555         * df-core.c: Update head documentation.
2556
2557 2009-05-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
2558
2559         PR bootstrap/40118
2560         * rs6000.c (rs6000_generate_compare): Use op1b instead of
2561         shadowing exisiting variable op1.
2562
2563 2009-05-12  Uros Bizjak  <ubizjak@gmail.com>
2564
2565         PR target/37179
2566         * config/i386/driver-i386.c (processor_signatures): New enum.
2567         (SIG_GEODE): Move from vendor_signatures to processor_signatures.
2568         (host_detect_local_cpu): For SIG_AMD vendor, check for SIG_GEODE
2569         processor signature to detect geode processor.
2570
2571 2009-05-12  Paolo Bonzini  <bonzini@gnu.org>
2572
2573         Revert:
2574
2575         2009-05-12  Paolo Bonzini  <bonzini@gnu.org>
2576
2577         * optabs.c (prepare_cmp_insn): Temporarily disable test that
2578         causes spurious differences between trunk and cond-optab branch.
2579
2580 2009-05-12  Paolo Bonzini  <bonzini@gnu.org>
2581
2582         * dojump.c (compare_from_rtx): Delete.
2583         * expmed.c (emit_store_flag): Only try cstore_optab.  Canonicalize
2584         any MODE_CC mode to the cstorecc4 pattern.  Use prepare_operand, fail
2585         if the comparison does not satisfy the predicate; test predicates for
2586         operands 2 and 3 of a cstore pattern.  Don't try cstore optab
2587         further if one existing pattern fails.
2588         * expr.h (compare_from_rtx): Delete.
2589         (prepare_operand): Declare it.
2590         * optabs.c: Change "lib call" to "libcall" throughout.
2591         (bcc_gen_fctn, setcc_gen_code, trap_rtx,
2592         HAVE_conditional_trap, emit_cmp_insn): Delete.
2593         (can_compare_p): Delete cmp_optab case.
2594         (prepare_float_lib_cmp): Return an rtx and a machine mode.
2595         Accept other parameters by value.
2596         (prepare_operand): Make non-static.
2597         (prepare_cmp_insn): Return an rtx and a machine mode.  Accept
2598         other parameters by value.  Try to widen operands here based on
2599         an optab_methods argument and looking at cbranch_optab.
2600         (emit_cmp_and_jump_insn_1): Accept test and mode, remove widening
2601         loop.  Use cbranch_optab directly.
2602         (emit_cmp_and_jump_insns): Fix comment.  Adjust call to
2603         prepare_cmp_insn and emit_cmp_and_jump_insn_1, remove obsolete
2604         assertion.
2605         (emit_conditional_move, emit_conditional_add): Inline what's needed
2606         of compare_from_rtx, using new prepare_cmp_insn for the rest.
2607         (init_optabs): Init cmp_optab with UNKNOWN, cbranch_optab
2608         with COMPARE.  Move cmov_optab and cstore_optab above
2609         with cbranch_optab, move cmp_optab down with ucmp_optab,
2610         remove tst_otpab.  Do not initialize trap_rtx.
2611         (gen_cond_trap): Do it here.  Use ctrap_optab.  Test predicate
2612         for trap code.  Do not check HAVE_conditional_trap.  Use
2613         prepare_cmp_insn.  Accept no predicate for operand 3.
2614         * optabs.h (OTI_cmp): Mark as used only for libcalls.
2615         (OTI_ctrap, ctrap_optab): New.
2616         (tst_optab): Delete.
2617         (bcc_gen_fctn, setcc_gen_code, emit_cmp_insn): Delete.
2618         * ifcvt.c (find_if_header): Replace HAVE_conditional_trap
2619         with lookup of ctrap_optab.
2620         * genopinit.c (cmp_optab, tst_optab, bcc_gen_fctn,
2621         setcc_gen_code): Delete.
2622         (ctrap_optab): New.
2623
2624         * combine.c (combine_simplify_rtx, simplify_set): Do not
2625         special case comparing against zero for cc0 machines.
2626         * simplify-rtx.c (simplify_binary_operation_1): Never remove
2627         COMPARE on cc0 machines.
2628         (simplify_relational_operation): Return a new expression when
2629         a COMPARE could be removed.
2630         * final.c (final_scan_insn): Compare cc_status values
2631         against LHS of a (compare FOO (const_int 0)) cc0 source.
2632         Also check if cc_status.value is the full compare.
2633
2634         * doc/md.texi (bCC, sCC, tstMM, cmpMM): Delete.
2635         (cstoreMM4): Document.
2636         (conditional_trap): Document ctrapMM4 instead.
2637         (sync_compare_and_swapMM): Refer to cbranchcc4.
2638         (Dependent Patterns): Eliminate obsolete information referring to
2639         the old jump optimization phase.
2640         (Canonicalization): Include cbranchcc4 case, omit canonicalization
2641         of compares with 0 on cc0 machines.
2642         (Jump Patterns): Refer to MODE_CC jump patterns preferably,
2643         avoiding references to cc0.  Remove text about storing operands
2644         in cmpMM.
2645         * doc/tm.texi (Condition Codes): Include blurb on different
2646         condition code representations, separate into subsections for
2647         CC0, MODE_CC and conditional execution.
2648
2649         * config/alpha/alpha-protos.h (alpha_emit_conditional_branch,
2650         alpha_emit_setcc): Accept operands and a machine mode.
2651         * config/alpha/alpha.c (alpha_emit_conditional_branch):
2652         Get code/op0/op1 from operands, use machine mode argument
2653         instead of alpha_compare.fp_p.  Emit the branch here.
2654         (alpha_emit_setcc): Likewise, and return boolean.
2655         (alpha_emit_conditional_move): Likewise.  Assert that
2656         cmp_op_mode == cmp_mode, and simplify accordingly.
2657         * config/alpha/alpha.h (struct alpha_compare, alpha_compare): Delete.
2658         * config/alpha/alpha.md (cmpdf, cmptf, cmpdi, bCC, sCC): Delete.
2659         (cbranchdf4, cbranchtf4, cbranchdi4, cstoredf4, cstoretf4,cstoredi4):
2660         Delete.
2661         (stack probe test): Use cbranchdi4.
2662         * config/alpha/predicates.md (alpha_cbranch_operator): New.
2663
2664         * config/arc/arc.c (gen_compare_reg): Do not emit cmp. 
2665         * config/arc/arc.h (movsicc, movsfcc): Use it.
2666         (movdicc, *movdicc_insn, movdfcc, *movdfcc_insn): Remove.
2667         (cbranchsi4, cstoresi4): New.
2668         (cmpsi, bCC and sCC expanders): Remove. 
2669
2670         * config/arm/arm.c (arm_compare_op0, arm_compare_op1): Delete.
2671         * config/arm/arm.h (arm_compare_op0, arm_compare_op1): Delete.
2672         * config/arm/predicates.md (arm_comparison_operator): Only include
2673         floating-point operators if there is a hardware floating-point unit.
2674         * config/arm/arm.md (cbranchsi4, cstoresi4): Enable for TARGET_32BIT,
2675         deferring to cbranch_cc and cstore_cc respectively.
2676         (cbranchsf4, cbranchdf4, cbranchdi4, cstoresf4, cstoredf4, cstoredi4,
2677         cbranch_cc, cstore_cc): New.
2678         (movsicc, movsfcc, movdfcc): Do not use arm_compare_op0 and
2679         arm_compare_op1.
2680         (bCC, sCC, cmpsi, cmpsf, cmpdf, cmpdi): Delete.
2681
2682         * config/avr/avr-protos.h (out_tstsi, out_tsthi): Adjust prototype.
2683         * config/avr/avr.c (out_tstsi, out_tsthi): Get the tested operand
2684         as an argument.
2685         (adjust_insn_length): Adjust calls.
2686         (avr_reorg): Handle (compare (foo) (const_int 0)).
2687         * config/avr/avr.md (tstqi, tsthi, tstsi): Remove.
2688         (*negated_tstqi, *negated_tsthi, *negated_tstsi): Unmacroize.
2689         (*reversed_tsthi, *reversed_tstsi): Add a scratch for simplicity.
2690         (cmpqi, cmphi, cmpsi): Prepend asterisk, fuse tst[qhs]i here.
2691         (bCC): Remove.
2692         (cbranchqi4, cbranchhi4, cbranchsi4): New.
2693         (tst -> sbrc/sbrs peephole2, cpse peephole): Wrap RHS with COMPARE.
2694
2695         * config/bfin/bfin.md (cmpbi, cmpsi, bCC, sCC): Delete.
2696         (cbranchsi4, cstorebi4, cstoresi4): New.
2697         (movbisi): This insn is duplicate, split it to zero_extend.
2698         * config/bfin/bfin.c (bfin_compare_op0, bfin_compare_op1): Delete
2699         (bfin_gen_compare): Do not use them.  Emit VOIDmode SET, not BImode.
2700         (bfin_optimize_loop): Use cbranch expander.
2701         * config/bfin/bfin.h (bfin_compare_op0, bfin_compare_op1): Delete.
2702         * config/bfin/predicates.md (bfin_cbranch_operator): Rename to...
2703         (bfin_bimode_comparison_operator): ... this.
2704         (bfin_direct_comparison_operator): New.
2705  
2706         * config/cris/cris.c (cris_normal_notice_update_cc): Look
2707         inside (compare FOO (const_int 0)).
2708         (cris_rtx_costs): Handle ZERO_EXTRACT.
2709         * config/cris/cris.md (tstdi, tst<mode>, cmpdi): Delete.
2710         (*tstdi_non_v32): Fold in *cmpdi_non_v32.
2711         (*tstdi_v32): Delete.
2712         (*cmpdi_non_v32): Add M alternative for operand 1.
2713         (cmpsi, cmp<mode>): Make private.
2714         (*tstsi, *tst<mode>_cmp, *tst<mode>_non_cmp, *btst): Wrap LHS
2715         with COMPARE.
2716         (cbranch<mode>4, cbranchdi4, cstore<mode>4): New.
2717
2718         * config/crx/crx.md (cstore<mode>4, cbranchcc4): New.
2719         (cmp<mode>, bCOND_internal, b<code>, s<code>): Delete.
2720         (cbranch<mode>4, sCOND_internal): Use ordered_comparison_operator.
2721         (cc_reg_operand): New.
2722         (any_cond): Delete.
2723         * config/crx/crx.c (crx_compare_op0, crx_compare_op1,
2724         crx_expand_compare, crx_expand_branch, crx_expand_scond): Delete.
2725         * config/crx/crx.h (crx_compare_op0, crx_compare_op1): Delete.
2726         * config/crx/crx-protos.h (crx_expand_compare, crx_expand_branch,
2727         crx_expand_scond): Delete.
2728
2729         * config/fr30/fr30.md (cmp<mode>, bCC): Delete.
2730         (cbranchsi4): New.
2731         * config/fr30/fr30.c (fr30_compare_op0, fr30_compare_op1): Delete
2732         * config/fr30/fr30.h (fr30_compare_op0, fr30_compare_op1): Delete.
2733
2734         * config/frv/frv.md (cbranchsi4, cbranchsf4, cbranchdf4,
2735         cstoresi4, cstoresf4, cstoredf4): New.
2736         (cmpdi, cmpsi, cmpsf, cmpdf, bCC, sCC): Remove.
2737         * config/frv/frv-protos.h (frv_emit_cbranch, frv_emit_scc):
2738         Receive the entire operands array.
2739         * config/frv/frv.h (frv_compare_op0, frv_compare_op1): Delete.
2740         * config/frv/frv.c (frv_compare_op0, frv_compare_op1): Delete.
2741         * config/frv/frv-protos.h (frv_emit_cbranch, frv_emit_scc):
2742         Get test/op0/op1 from the operands array.
2743         (frv_emit_cond_move): Get test/op0/op1 from the test_rtx.
2744
2745         * config/h8300/h8300-protos.h (h8300_expand_branch): Accept operands.
2746         (h8300_expand_store): New.
2747         * config/h8300/h8300.c (h8300_rtx_costs): Handle (compare FOO
2748         (const_int 0)).
2749         (h8300_expand_branch): Emit compare here.  Adjust for new arguments.
2750         (h8300_expand_store): New.
2751         * config/h8300/h8300.md (btst combine patterns): Wrap with COMPARE
2752         or do not try to produce (set (cc0) REG).
2753         (peepholes): Wrap arguments with COMPARE.  Add a peephole to
2754         change a compare into a move to a scratch register.  Disable some
2755         peepholes when comparing with zero.
2756         (tstsi, tsthi, tstsi, cmpqi): Make private.
2757         (cmphi): Delete.
2758         (bCC, sCC): Delete.
2759         (cbranchqi4, cbranchhi4, cbranchsi4, cstoreqi4, cstorehi4,
2760         cstoresi4): New.
2761
2762         * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_int_addcc,
2763         ix86_expand_fp_movcc): Set ix86_compare_op0 and ix86_compare_op1.
2764         (ix86_emit_i387_log1p): Use gen_cbranchxf4.
2765         (ix86_emit_i387_log1p): Use cbranchxf2.
2766         (ix86_expand_setcc): Return void.
2767         * config/i386/i386-protos.h (ix86_expand_setcc): Return void.
2768         * config/i386/i386.md (cmpti, cmpdi, cmpsi, cmphi, cmpqi, cmpxf,
2769         cmp<MODEF>, cmpcc): Remove.
2770         (cbranchti4, cbranchdi4, cbranchsi4, cbranchhi4, cbranchqi4,
2771         cbranchxf4, cbranch<MODEF>4, cbranchcc4, cstoredi4, cstoresi4,
2772         cstorehi4, cstoreqi4, cstorexf4, cstore<MODEF>4, cstorecc): New.
2773         (sCC and bCC expanders): Remove.
2774         (stack_protect_test): Use cbranchcc4.
2775
2776         * config/ia64/ia64-protos.h (ia64_compare_op0, ia64_compare_op1):
2777         Delete.
2778         (ia64_expand_compare): Accept three rtx by reference and return void.
2779         * config/ia64/ia64.c (ia64_compare_op0, ia64_compare_op1): Delete.
2780         (ia64_expand_compare): Replace op0/op1 with *op0/*op1.  Get code
2781         from *expr.  Update *expr with the BImode comparison to do.
2782         * config/ia64/ia64.md (cmpbi, cmpsi, cmpdi, cmpsf, cmpdf, cmpxf,
2783         cmptf, bCC, sCC, conditional_trap): Delete.
2784         (cbranchbi4, cbranchsi4, cbranchdi4, cbranchsf4, cbranchdf4, 
2785         cbranchxf4, cbranchtf4, cstorebi4, cstoresi4, cstoredi4, cstoresf4,
2786         cstoredf4, cstorexf4, cstoretf4, ctrapbi4, ctrapsi4, ctrapdi4,
2787         ctrapsf4, ctrapdf4, ctrapxf4, ctraptf4): New.
2788         * config/ia64/predicates.md (ia64_cbranch_operator): New.
2789
2790         * config/iq2000/iq2000-protos.h (gen_conditional_branch): Change
2791         type of last argument.
2792         * config/iq2000/iq2000.c (branch_cmp, branch_type): Remove.
2793         (gen_conditional_branch): Get code/cmp0/cmp1 from operands,
2794         use machine mode argument instead of branch_type.  Remove dead
2795         code for floating-point comparisons.
2796         * config/iq2000/iq2000.h (branch_cmp, branch_type): Remove.
2797         * config/iq2000/iq2000.md (cmpsi, cmpdi, cmpsf, cmpdf, tstsi, bCC):
2798         Remove.
2799         (cbranchsi4, cstoresi4): New.
2800         * config/iq2000/predicates.md (reg_or_const_operand): New.
2801
2802         * config/m32c/m32c.md (cbranch splitter): Use match_op_dup.
2803         * config/m32c/m32c.md (any_cond, gl_cond): Delete.
2804         (b<code>_op): Rewrite to...
2805         (bcc_op): ... this, using match_operator.
2806         (s<code>_op): Rewrite to...
2807         (scc_op): ... this, using match_operator.
2808         (s<code>_24_op): Rewrite to...
2809         (scc_op_24): ... this, using match_operator.
2810         (s<code>_<mode>): Rewrite to...
2811         (cstore<mode>4): ... this, using match_operator.
2812         (s<code>_<mode>_24): Rewrite to...
2813         (cstore<mode>4_24): ... this, using match_operator.
2814         * config/m32c/m32c-protos.h (m32c_cmp_flg_0, m32c_pend_compare,
2815         m32c_unpend_compare, m32c_expand_scc): Delete.
2816         * config/m32c/m32c.c (compare_op0, compare_op1, m32c_cmp_flg_0,
2817         m32c_pend_compare, m32c_unpend_compare, m32c_expand_scc): Delete.
2818         (m32c_expand_movcc): Change NE to EQ if necessary.
2819         (m32c_init_libfuncs): Modify cstore optab instead of setcc_gen_code.
2820
2821         * config/m32r/m32r-protos.h (gen_cond_store): New.
2822         * config/m32r/m32r.c (m32r_compare_op0, m32r_compare_op1): Delete.
2823         (gen_cond_store): New, from sCC patterns.
2824         (m32r_expand_block_move): Use cbranchsi4.
2825         * config/m32r/m32r.h (m32r_compare_op0, m32r_compare_op1): Delete.
2826         * config/m32r/m32r.md (cmpsi, bCC, sCC): Delete.
2827         (cbranchsi4, cstoresi4): New.
2828         
2829         * config/m68hc11/m68hc11.c (m68hc11_compare_op0, m68hc11_compare_op1):
2830         Delete.
2831         (m68hc11_rtx_costs_1, m68hc11_rtx_costs): Handle ZERO_EXTRACT.
2832         (m68hc11_notice_update_cc): Look into a compare with 0.
2833         * config/m68hc11/m68hc11.h (m68hc11_compare_op0, m68hc11_compare_op1):
2834         Delete.
2835         * config/m68hc11/m68hc11.md (tstsi, tsthi, tstqi, cmpsi,
2836         cmphi, cmpqi, bCC): Delete.
2837         (cbranchsi4, cbranchhi4, cbranchqi4): New.
2838         (tstqi_1, tstqi_z_used, tstqi_1, bitcmpqi, bitcmpqi_z_used,
2839         bitcmpqi_12, bitcmphi, various splits and peephole2s): Wrap cc0<-reg
2840         sets with COMPARE.
2841
2842         * config/m68k/predicates.md (m68k_cstore_comparison_operator,
2843         const0_operand, const1_operand, m68k_subword_comparison_operand): New.
2844         * config/m68k/constraints.md (H): New.
2845         * config/m68k/m68k.md (tstdi): Remove define_expand, use name for
2846         the define_insn below.
2847         (tstsi, tsthi, tst<FP:mode>, cmphi, cmpqi, cmp<FP:mode>): Delete.
2848         (*tstsi_internal_68020_cf, *tstsi_internal, *tsthi_internal,
2849         *tstqi_internal, tst<mode>_6881, tst<mode>_cf, many unnamed
2850         patterns): Wrap RHS with COMPARE.
2851         (tst<FP>_68881, tst<FP>_cf): Use const0_operand.
2852         (*cmpdi_internal): Name this pattern.
2853         (cmpdi): Change to define_insn.
2854         (cbranchdi4, cstoredi4, cbranchsi4, cstoresi4, cbranchhi4, cstorehi4,
2855         cbranchqi4, cstoreqi4, cbranch<FP:mode>4, cstore<FP:mode>4): New.
2856         (scc0_di, scc0_di_5200, scc_di): Use the ordered_comparison_operator
2857         predicate.
2858         (seq, sne, sgt, sgtu, slt, sltu, sge, sgeu, sle, sleu, sordered,
2859         sunordered, suneq, sunge, sungt, sunle, sunlt, sltgt): Delete
2860         (conditional_trap): Change to...
2861         (ctrapdi4, ctrapsi4, ctraphi4, ctrapqi4): ... these.
2862         (*conditional_trap): Use the ordered_comparison_operator and
2863         const1_operand predicates.
2864         * config/m68k/m68k.c (m68k_last_compare_had_fp_operands): Delete.
2865         (m68k_expand_prologue): Use ctrapsi4 instead of cmpsi+conditional_trap.
2866         (m68k_rtx_costs): Look for ZERO_EXTRACT in a COMPARE.
2867         * config/m68k/m68k.h (m68k_last_compare_had_fp_operands): Delete.
2868
2869         * config/mcore/mcore-protos.h (arch_compare_op0, arch_compare_op1,
2870         mcore_modify_comparison, mcore_gen_compare_reg): Remove.
2871         (mcore_gen_compare): New. 
2872         * config/mcore/mcore.c (arch_compare_op0, arch_compare_op1): Delete.
2873         (mcore_modify_comparison, mcore_gen_compare_reg): Fold into...
2874         (mcore_gen_compare): ... this.
2875         * config/mcore/mcore.md (cmpsi, bCC, sCC): Remove.
2876         (cbranchsi4, cstoresi4): New, using mcore_gen_compare.
2877         (stack probe pattern): Use cbranchsi4.
2878
2879         * config/mips/predicates.md (mips_cstore_operator): New.
2880         * config/mips/mips-ps-3d.md (movv2sfcc): Do not use cmp_operands.
2881         * config/mips/mips.md (any_cond): Delete.
2882         (conditional_trap): Rename to ctrap<GPR:mode>4.  Adjust predicates,
2883         always succeed.
2884         (fixuns_truncdfsi2, fixuns_truncdfdi2, fixuns_truncsfsi2,
2885         fixuns_truncsfdi2): Use cbranch patterns.
2886         (cmp<GPR:mode>, cmp<SCALARF:mode>): Delete. 
2887         (b<code>): Change to cbranch<GPR:mode>4 and cbranch<SCALARF:mode>4.
2888         Adjust call to mips_expand_conditional_branch.
2889         (seq, sne, slt<u>, sle<u>, sgt<u>, sge<u>): Change to
2890         cstore<GPR:mode>4.
2891         * config/mips/mips-protos.h (mips_expand_conditional_branch,
2892         mips_expand_scc, mips_expand_conditional_trap): Adjust prototypes.
2893         * config/mips/mips.c (cmp_operands): Delete.
2894         (mips_emit_compare): Get comparison operands from *op0/*op1.
2895         (mips_expand_scc): Get code/op0/op1/target from operands.  Assert
2896         that it succeeds.  Use op0/op1 instead of cmp_operands.
2897         (mips_expand_conditional_branch, mips_expand_conditional_move,
2898         mips_expand_conditional_trap): Likewise.
2899         (mips_block_move_loop): Use cbranch patterns. 
2900         * config/mips/mips.h (cmp_operands): Delete.
2901
2902         * config/mmix/mmix.c (mmix_valid_comparison): Delete.
2903         (mmix_gen_compare_reg): Just return a register in the right CC mode.
2904         * config/mmix/mmix.h (mmix_compare_op0, mmix_compare_op1): New.
2905         * config/mmix/mmix.md (cmpdi, cmpdf): Remove.
2906         (*cmpcc_folded): Rename to...
2907         (*cmpdi_folded): this.
2908         (*cmpcc): Rename to...
2909         (*cmps): ... this.
2910         (movdfcc, movdicc): Adjust for new semantics of mmix_gen_compare_reg.
2911         (bCC): Remove.
2912         (cbranchdi4): New.
2913         (cbranchdf4): New.  Handle invalid comparisons here.
2914         * config/mmix/predicates.md (float_comparison_operator): New.
2915
2916         * config/mn10300/mn10300.c (mn10300_rtx_costs): Consider 0 and
2917         zero_extract to be cheap in (compare (zero_extract) (const_int 0).
2918         * config/mn10300/mn10300.md (tst): Delete.
2919         (*tst_extqisi_am33, *tst_extqisi, *tst_exthisi_am33, *tst_exthisi):
2920         Name these patterns and wrap RHS in a compare.
2921         (*cmpsi): Make this pattern private.  Include tst.
2922         (*cmpsf): Make this pattern private.
2923         (and and zero_extract cc0 set): Wrap RHS in a COMPARE.
2924         (compare with zero peepholes): Likewise.
2925         (bCC): Remove.
2926         (cbranchsi4, cbranchsf4): New.
2927         (casesi): Use cbranchsi4.
2928
2929         * config/pa/pa.c (hppa_compare_op0, hppa_compare_op1,
2930         hppa_branch_type): Delete.
2931         (return_addr_rtx): Use cbranchsi4.
2932         (emit_bcond_fp): Accept all operands.  Replace CODE with NE.
2933         Emit CCFPmode comparison here.
2934         (gen_cmp_fp): Delete, now part of emit_bcond_fp.
2935         * config/pa/pa.h (enum cmp_type, hppa_compare_op0, hppa_compare_op1,
2936         hppa_branch_type): Delete.
2937         * config/pa/pa.md (cmpdi, cmpsi, cmpsf, cmpdf, sCC, bCC): Delete.
2938         (movsicc, movdicc): Remove references to hppa_compare_op0,
2939         hppa_compare_op1 and compare_from_rtx.
2940         (cbranchdi4, cbranchsi4, cbranchsf4, cbranchdf4, cstoresi4): New.
2941         (casesi): Use cbranchsi4.
2942
2943         * config/pdp11/pdp11-protos.h (output_jump): Change prototype.
2944         * config/pdp11/pdp11.c (output_jump): Embed opcodes here.
2945         * config/pdp11/pdp11.md (register_or_const0_operand): New.
2946         (cmpdf, cmphi, cmpqi): Make private.  Add tst alternatives.
2947         (cmpsi, tstsi, tstdf, tsthi, tstqi): Delete.
2948         (bCC): Delete.
2949         (cbranchdf4, cbranchhi4, cbranchqi4): New.
2950         (*branch, *branch_inverted): New.
2951
2952         * config/picochip/picochip.md (cbranchhi4): Use
2953         ordered_comparison_operator.
2954         (cmphi, bCC): Remove.
2955
2956         * config/rs6000/predicates.md (rs6000_cbranch_operator): New.
2957         (trap_comparison_operator): Delete.
2958         * config/rs6000/rs6000-protos.h (rs6000_emit_sCOND,
2959         rs6000_emit_cbranch): Accept mode and operands.
2960         * config/rs6000/rs6000.c (rs6000_compare_op0, rs6000_compare_op1,
2961         rs6000_compare_fp_p): Delete.   
2962         (rs6000_generate_compare): Accept mode and comparison.  Extract code
2963         and op0/op1 from there.  Replace references to rs6000_compare_op0
2964         and rs6000_compare_op1.
2965         (rs6000_emit_sCOND): Adjust call to rs6000_generate_compare and
2966         extract result from passed operands.
2967         (rs6000_emit_cbranch): Adjust call to rs6000_generate_compare and
2968         extract loc from passed operands.
2969         (rs6000_emit_cmove): Likewise.
2970         * config/rs6000/rs6000.h (rs6000_compare_op0, rs6000_compare_op1,
2971         rs6000_compare_fp_p): Delete.
2972         * config/rs6000/rs6000.md (cmp<GPR>, cmp<FP>, bCC, sCC): Delete.
2973         (cbranch<GPR>4, cbranch<FP>4): New.
2974         (cstore<mode>4): New.  Consolidate here all choices about when to use
2975         portable or specialized sCC sequences.
2976         (stack_protect_test): Use cbranchsi4.
2977         (conditional_trap): Replace with ctrap<GPR>4.
2978         (conditional trap insn): Replace trap_comparison_operator with
2979         ordered_comparison_operator. 
2980
2981         * config/s390/s390.c (s390_compare_op0, s390_compare_op1): Delete.
2982         (s390_emit_prologue): Use ctrap.
2983         * config/s390/s390.h (s390_compare_op0, s390_compare_op1): Delete.
2984         * config/s390/predicates.md (s390_eqne_operator, s390_scond_operator):
2985         New predicates replacing...
2986         * config/s390/s390.md (COMPARE, SCOND): ... these iterators.
2987         (cmp<GPR>, cmp<FP>, cmpcc): Delete.
2988         (trunc patterns): Use emit_cmp_and_jump_insns instead of cmp/branch.
2989         (add<mode>cc): Do not use s390_compare_op0/op1.
2990         (s<code>): Change to...
2991         (cstore<mode>4): ... this. Do not use s390_compare_op0/op1.
2992         (seq): Change to...
2993         (cstorecc4): ... this.  Handle EQ or NE equally.
2994         (*sne): Un-privatize for use in cstorecc4.
2995         (b<code>): Change to...
2996         (cbranch<GPR>4, cbranch<FP>4, cbranchcc4): ... these.
2997         (conditional_trap): Replace with...
2998         (ctrap<GPR>4, ctrap<FP>4): ... these.
2999         (stack_protect): Use cbranchcc4.
3000
3001         * config/score/score-conv.h (cmp_op0, cmp_op1): Delete.
3002         * config/score/score-protos.h (score_gen_cmp): Delete.
3003         * config/score/score.c (cmp_op0, cmp_op1, score_gen_cmp): Delete.
3004         (score_block_move-loop): Use cbranchsi4.
3005         * config/score/score.md (cbranchsi4): New.
3006         (cmpsi, bCC): Delete.
3007         * config/score/score3.c (cmp_op0, cmp_op1, score3_gen_cmp): Delete.
3008         (score3_movsicc): Use ops[1] operands instead of cmp_op0/cmp_op1.
3009         * config/score/score7.c (cmp_op0, cmp_op1, score7_gen_cmp): Delete.
3010         (score7_movsicc): Use ops[1] operands instead of cmp_op0/cmp_op1.
3011         * config/score/score3.h (score3_gen_cmp): Delete.
3012         * config/score/score7.h (score7_gen_cmp): Delete.
3013
3014         * config/sh/sh-protos.h (prepare_scc_operands): Rename to...
3015         (sh_emit_scc_to_t): ... this.  Return void.
3016         (from_compare): Rename to...
3017         (sh_emit_compare_and_branch): ... this.
3018         (sh_emit_compare_and_set): New.
3019         (sh_expand_t_scc): Accept operands.
3020         * config/sh/predicates.md (sh_float_comparison_operator): New.
3021         * config/sh/sh.c (sh_compare_op0, sh_compare_op1): Delete.
3022         (prepare_scc_operands): Rename to...
3023         (sh_emit_scc_to_t): ... this.  Return void.  Get op0/op1 from
3024         arguments.
3025         (sh_emit_cheap_store_flag): New.
3026         (sh_emit_set_t_insn): New.
3027         (from_compare): Rename to...
3028         (sh_emit_compare_and_branch): ... this.  Accept mode.  Rewrite
3029         handling of TARGET_SH2E floating point to avoid recursive call.
3030         Generate branch here.
3031         (sh_emit_compare_and_set): New.
3032         (sh_expand_t_scc): Get op0/op1 from arguments.
3033         (sh_emit_cheap_store_flag): New.
3034         * config/sh/sh.md (cbranchdi4, cbranchsi4): Include -mno-cbranchdi
3035         cases.
3036         (cbranchdi4_i): Use an "I08" constraint instead of an "i" constraint.
3037         (cmpsi, cmpdi, cmpsf, cmpdf): Delete.
3038         (movsicc, movdicc): Do nothing when it recreated operands from
3039         sh_compare_*. Use sh_emit_cheap_store_flag.  Adjust call to
3040         prepare_scc_operands (now sh_emit_scc_to_t).
3041         (udivdi3): Use cstoresi4.
3042         (beq_media, bne_media, bge_media, bgtu_media, bgeu_media, beq,
3043         bne, bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu, bunordered): Delete.
3044         (cbranchint4_media, cbranchfp4_media): New.
3045         (casesi): Use cbranchdi4.
3046         (seq, slt, sle, sgt, sge, sgtu, sltu, sgeu, sne, sleu, sunordered):
3047         Delete.
3048         (cstore4_media, cstoresi4, cstoredi4, cstoresf4, cstoredf4): New.
3049         (movnegt): Remove second operand.
3050         (cbranchsf4, cbranchdf4): New.
3051         (stack_protect): Use cbranchdi4/cbranchsi4.
3052
3053         * config/sparc/sparc.c (sparc_compare_op0, sparc_compare_op1): Delete.
3054         (gen_compare_reg): Accept comparison, extract part of it to...
3055         (gen_compare_reg_1): ... this. 
3056         (gen_compare_operator): Delete.
3057         (gen_v9_scc): Accept separate destination, comparison code and arms.
3058         Do not use sparc_compare_op0/sparc_compare_op1.
3059         (emit_scc_insn, emit_conditional_branch_insn): New.
3060         (emit_v9_brxx): Make static.  Remove useless assertion.
3061         (sparc_emit_float_lib_cmp): Return RTL instead of calling
3062         emit_cmp_insn.
3063         (sparc_expand_compare_and_swap_12): Use gen_compare_reg_1+cbranchcc4.
3064         * config/sparc/sparc-protos.h (gen_compare_reg,
3065         sparc_emit_float_lib_cmp): Adjust prototype.
3066         (emit_scc_insn, emit_conditional_branch_insn): New.
3067         (gen_v9_scc, emit_v9_brxx_insn, gen_compare_operator): Delete.
3068         * config/sparc/sparc.h (sparc_compare_op0, sparc_compare_op1): Delete.
3069         * config/sparc/sparc.md (P, I, F, V32, V32I, V64, V64I): Move all
3070         iterators to the top.
3071         (cmpsi, cmpdi, cmpsf, cmpdf, cmptf, seqsi_special_extend,
3072         snesi_special_extend, sCC, bCC, seqdi_special_trunc,
3073         snedi_special_trunc): Delete.
3074         (seqdi_special, snedi_special): Use expansion of seqdi_special_trunc
3075         and snedi_special_trunc.
3076         (cstoresi4, cstoredi4, cstore<F:mode>4, cbranchcc4, cbranchsi4,
3077         cbranchdi4, cbranch<F:mode>4): New.
3078         (mov<I:mode>cc, mov<F:mode>cc): Handle sparc_emit_float_lib_cmp
3079         here.  Use gen_compare_reg instead of gen_compare_operator.
3080         (conditional_trap): Replace with...
3081         (ctrapsi4, ctrapdi4): ... this.
3082         (stack_protect_test): Use cbranchcc4.
3083
3084         * config/spu/spu-protos.h (spu_emit_branch_or_set): Change second
3085         argument to rtx.
3086         * config/spu/spu.c (spu_compare_op0, spu_compare_op1): Remove. 
3087         (spu_emit_branch_or_set): Get code/op0/op1 from second argument.
3088         Change spu_compare_op0/op1 to op0/op1 throughout.  Get target
3089         from operands[0] or operands[3] depending on is_set.
3090         * config/spu/spu.h (spu_compare_op0, spu_compare_op1): Remove.
3091         * config/spu/spu.md (cmp<mode:VQHSI>, cmp<mode:DTI>, cmp<mode:VSF>,
3092         cmpdf, bCC), sCC: Remove.
3093         (cbranch<mode:VQHSI>4, cbranch<mode:DTI>, cbranch<mode:VSF>4, 
3094         cbranchdf4, cstore<mode:VQHSI>4, cstore<mode:DTI>, cstore<mode:VSF>4,
3095         cstoredf4): New.
3096         (mov<mode>cc): Accept ordered_comparison_operator, adjust call to
3097         spu_emit_branch_or_set.
3098
3099         * config/stormy16/stormy16-protos.h (xstormy16_emit_cbranch):
3100         Add two arguments.
3101         * config/stormy16/stormy16.h (xstormy16_compare_op0,
3102         xstormy16_compare_op1): Delete.
3103         * config/stormy16/stormy16.c (xstormy16_compare_op0,
3104         xstormy16_compare_op1): Delete. 
3105         (xstormy16_emit_cbranch): Get op0/op1 from the new arguments.
3106         Adjust calls.
3107         * config/stormy16/stormy16.md (cbranchsi4, cbranchhi4): New.
3108         (cmphi, cmpsi, bCC): Remove.
3109
3110         * config/v850/v850.md (tstsi, cmpsi): Fold into...
3111         (*cmpsi): ... this one.
3112         (cbranchsi4, cstoresi4): New.
3113         (bCC expanders): Delete.
3114         (sCC insns): Fold into...
3115         (*setcc): ... this one.
3116         (casesi): Do not use gen_cmpsi and gen_bgtu. 
3117         (various splits): Wrap "naked" RHS of a cc0 set with COMPARE.
3118         (movsicc): Simplify.
3119         * config/v850/v850.c (v850_rtx_costs): Handle ZERO_EXTRACT in COMPARE.
3120
3121         * config/vax/vax-protos.h (cond_name): New.
3122         (vax_output_conditional_branch): Remove.
3123         * config/vax/vax.c (cond_name): New.
3124         (vax_output_conditional_branch): Remove.
3125         * config/vax/vax.h (PRINT_OPERAND): Dispatch %c to cond_name.
3126         * config/vax/vax.md (tst<VAXint>, tst<VAXfp>): Remove.
3127         (cmp<VAXint>, cmp<VAXfp>): Privatize.  Add constraints for tst.
3128         (bit<VAXint>): Wrap source with (compare).
3129         (b<code> and following unnamed pattern): Rename to *branch and
3130         *branch_reversed.  Change macroization to match_operator.
3131         (cbranch<VAXint>4, cbranch<VAXfp>4): New.
3132
3133         * config/xtensa/predicates.md (xtensa_cstoresi_operator): New.
3134         * config/xtensa/xtensa-protos.h (xtensa_expand_conditional_branch):
3135         Change last argument to machine_mode.
3136         (xtensa_expand_scc): Add machine_mode argument.
3137         * config/xtensa/xtensa.c (branch_cmp, branch_type): Remove.
3138         (gen_conditional_move, xtensa_expand_conditional_branch,
3139         xtensa_expand_scc, xtensa_expand_conditional_move): Use mode
3140         instead of branch_type, fetch cmp0/cmp1/test_code from operands[].
3141         Adjust operand numbers.
3142         * config/xtensa/xtensa.h (enum cmp_type, branch_cmp, branch_type):
3143         Delete.
3144         * config/xtensa/xtensa.md (any_cond, any_scc): Delete.
3145         (cmpsi, cmpsf, b<code>, s<code>): Delete.
3146         (cbranchsi4, cbranchsf4, cstoresi4, cstoresf4): New.
3147
3148 2009-05-12  Paolo Bonzini  <bonzini@gnu.org>
3149
3150         * optabs.c (prepare_cmp_insn): Temporarily disable test that
3151         causes spurious differences between trunk and cond-optab branch.
3152
3153 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
3154
3155         PR target/37137
3156         * doc/install.texi (STAGE1_TFLAGS, BUILD_CONFIG): Document.
3157
3158 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
3159
3160         * tree.c (iterative_hash_pointer): Delete.
3161         (iterative_hash_expr): Short-circuit handling of NULL pointer.
3162         Hash UIDs and versions of SSA names.  Don't special-case built-in
3163         function declarations.
3164
3165 2009-05-11  Ian Lance Taylor  <iant@google.com>
3166
3167         PR bootstrap/40103
3168         * graphite.c: Force -Wc++-compat to only be a warning before
3169         #including "cloog/cloog.h".
3170
3171 2009-05-11  Martin Jambor  <mjambor@suse.cz>
3172
3173         * ipa-cp.c (ipcp_cloning_candidate_p): Add missing return false.
3174         
3175 2009-05-11  Jan Hubicka  <jh@suse.cz>
3176
3177         * tree-ssa-loop-ivcanon.c: Include target.h
3178         (struct loop_size): new structure.
3179         (constant_after_peeling): New predicate.
3180         (tree_estimate_loop_size): New function.
3181         (estimated_unrolled_size): Rewrite for new estimates.
3182         (try_unroll_loop_completely): Use new estimates.
3183         * Makefile.in (tree-ssa-loop-ivcanon.o): Add dependenc on target.h
3184
3185 2009-05-11  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3186
3187         * config/spu/spu-c.c (spu_categorize_keyword): Update for recent
3188         libcpp interface change.
3189         (spu_macro_to_expand): Likewise.
3190
3191 2009-05-11  Paolo Bonzini  <bonzini@gnu.org>
3192
3193         PR tree-optimization/40026
3194         * gimplify.c (gimplify_init_constructor): Change initial conditional
3195         to assertion.  Rewrite TREE_OPERAND (*expr_p, 1) after
3196         optimize_compound_literals_in_ctor.
3197
3198 2009-05-11  Nathan Sidwell  <nathan@codesourcery.com>
3199
3200         * config/m68k/m68k-devices.def (52274, 52277, 5301x, 5225x, 51xx):
3201         New devices.
3202         * doc/invoke.texi (M680x0 Options): Document new coldfire cpus.
3203
3204 2009-05-11  H.J. Lu  <hongjiu.lu@intel.com>
3205
3206         * tree-vect-data-refs.c (vect_analyze_group_access): Use
3207         HOST_WIDE_INT for gap.
3208
3209 2009-05-11  Ira Rosen  <irar@il.ibm.com>
3210
3211         PR tree-optimization/40074
3212         * tree-vect-data-refs.c (vect_analyze_group_access): Take gaps into
3213         account in group size and step comparison.
3214
3215 2009-05-11  Richard Guenther  <rguenther@suse.de>
3216
3217         * passes.c (init_optimization_passes): Strip now incorrect comment.
3218         (execute_function_todo): Do not set PROP_alias.
3219         * tree-pass.h (PROP_alias): Remove.
3220         * tree-ssa-structalias.c (pass_build_alias): Do not provide PROP_alias.
3221         * tree-if-conv.c (pass_if_conversion): Do not require PROP_alias.
3222         * tree-nrv.c (pass_return_slot): Likewise.
3223         * tree-object-size.c (pass_object_sizes): Likewise.
3224         * tree-ssa-dom.c (pass_dominator): Likewise.
3225         (pass_phi_only_cprop): Likewise.
3226         * tree-ssa-dse.c (pass_dse): Likewise.
3227         * tree-ssa-phiopt.c (pass_phiopt): Likewise.
3228         (pass_cselim): Likewise.
3229         * tree-ssa-pre.c (pass_pre): Likewise.
3230         (pass_fre): Likewise.
3231         * tree-ssa-reassoc.c (pass_reassoc): Likewise.
3232         * tree-ssa-sink.c (pass_sink_code): Likewise.
3233         * tree-stdarg.c (pass_stdarg): Likewise.
3234         * tree-tailcall.c (pass_tail_calls): Likewise.
3235         * tree-vrp.c (pass_vrp): Likewise.
3236
3237 2009-05-10  Ian Lance Taylor  <iant@google.com>
3238
3239         * basic-block.h (enum profile_status): Break out of struct
3240         control_flow_graph.
3241         * cgraph.h (struct inline_summary): Break out of struct
3242         cgraph_local_info.
3243         * cgraphunit.c (enum cgraph_order_sort_kind): New enum, broken out
3244         of struct cgraph_order_sort.
3245         * combine.c (enum undo_kind): New enum, broken out of struct undo.
3246         * cse.c (struct branch_path): Break out of struct
3247         cse_basic_block_data.
3248         * except.h (enum eh_region_type): Break out of struct eh_region.
3249         * gcc.c (enum add_del): Break out of struct modify_target.
3250         * genrecog.c (enum decision_type): Break out of struct decision_test.
3251         * ggc-page.c (struct ggc_pch_ondisk): Break out of struct
3252         ggc_pch_data.
3253         * matrix-reorg.c (struct free_info): Break out of struct matrix_info.
3254         * regmove.c (enum match_use): New enum, broken out of struct match.
3255         * sched-int.h (enum post_call_group): New enum, broken out of
3256         struct deps.
3257         (struct deps_reg): Break out of struct deps.
3258         * target.h (struct asm_int_op): Break out of struct gcc_target.
3259         * tree-eh.c (struct goto_queue_node): Break out of struct
3260         leh_tf_state.
3261         * tree-inline.h (enum copy_body_cge_which): Break out of
3262         copy_body_data.
3263         * tree-pass.h (enum opt_pass_type): Break out of struct opt_pass.
3264
3265         * c-decl.c (in_struct, struct_types): New static variables.
3266         (pushtag): Add loc parameter.  Change all callers.
3267         (lookup_tag): Add ploc parameter.  Change all callers.
3268         (check_compound_literal_type): New function.
3269         (parser_xref_tag): Add loc parameter.  Change all callers.  If
3270         -Wc++-compat, warn about struct/union/enum types defined within a
3271         struct or union.
3272         (start_struct): Add enclosing_in_struct, enclosing_struct_types,
3273         and loc parameters.  Change all callers.  Change error calls to
3274         error_at, using loc.  For a redefinition, if the location of the
3275         original definition is known, report it.  Set in_struct and
3276         struct_types.  If -Wc++-compat warn if in sizeof, typeof, or alignof.
3277         (finish_struct): Add new parameters enclosing_in_struct and
3278         enclosing_struct_types.  Change all callers.  Set
3279         C_TYPE_DEFINED_IN_STRUCT for all struct/union/enum types defined
3280         in the struct.  If in a struct, add this struct to struct_types.
3281         (start_enum): Add loc parameter.  Change all callers.  Use
3282         error_at for errors, using loc.  For a redefinition, if the
3283         location of the original definition is known, report it.  If in a
3284         struct, add this enum type to struct_types.  If -Wc++-compat warn
3285         if in sizeof, typeof, or alignof.
3286         * c-parser.c (disable_extension_diagnostics): Disable -Wc++-compat.
3287         (enable_extension_diagnostics): Reenable -Wc++-compat if appropriate.
3288         (c_parser_enum_specifier): Get enum location for start_enum.
3289         (c_parser_struct_or_union_specifier): Get struct location for
3290         start_struct.  Save in_struct and struct_types status between
3291         start_struct and finish_struct.
3292         (c_parser_cast_expression): Get location of cast.
3293         (c_parser_alignof_expression): Get location of type.
3294         (c_parser_postfix_expression): Likewise.
3295         (c_parser_postfix_expression_after_paren_type): Add type_loc
3296         parameter.  Change all callers.  Call check_compound_literal_type.
3297         Use type_loc for error about variable size type.
3298         * c-typeck.c (build_external_ref): If -Wc++-compat, warn about a use
3299         of an enum constant from an enum type defined in a struct or union.
3300         (c_cast_expr): Add loc parameter.  Change all callers.  If
3301         -Wc++-compat, warn about defining a type in a cast.
3302         * c-tree.h (C_TYPE_DEFINED_IN_STRUCT): Define.
3303         (start_enum, start_struct, finish_struct): Update declarations.
3304         (parser_xref_tag, c_cast_expr): Update declarations.
3305         (check_compound_literal_type): Declare.
3306
3307 2009-05-11  Ben Elliston  <bje@au.ibm.com>
3308
3309         * config/rs6000/rs6000-c.c (altivec_categorize_keyword): Update
3310         for recent libcpp interface change.
3311         (rs6000_macro_to_expand): Likewise.
3312
3313 2009-05-10  Michael Matz  <matz@suse.de>
3314
3315         PR target/40031
3316         * config/arm/arm.c (require_pic_register): Emit on entry edge,
3317         not at entry of function.
3318
3319 2009-05-10  Richard Guenther  <rguenther@suse.de>
3320
3321         PR tree-optimization/40081
3322         Revert
3323         * tree-sra.c (instantiate_element): Instantiate scalar replacements
3324         using the main variant of the element type.  Do not fiddle with
3325         TREE_THIS_VOLATILE or TREE_SIDE_EFFECTS.
3326
3327         * tree-sra.c (sra_type_can_be_decomposed_p): Do not decompose
3328         structs with volatile fields.
3329
3330 2009-05-10  Jan Hubicka  <jh@suse.cz>
3331
3332         * tree-inline.c (delete_unreachable_blocks_update_callgraph): Declare.