OSDN Git Service

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