OSDN Git Service

160684d6423b5ac993545069ab8e61448553380b
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2007-05-22  H.J. Lu  <hongjiu.lu@intel.com>
2             Richard Henderson  <rth@redhat.com>
3
4         * config.gcc (i[34567]86-*-*): Add smmintrin.h to
5         extra_headers.
6         (x86_64-*-*): Likewise.
7
8         * i386/i386-modes.def (V2QI): New.
9
10         * config/i386/i386.c (ix86_handle_option): Handle SSE4.1 and
11         SSE4A.
12         (override_options): Support SSE4.1.
13         (IX86_BUILTIN_BLENDPD): New for SSE4.1.
14         (IX86_BUILTIN_BLENDPS): Likewise.
15         (IX86_BUILTIN_BLENDVPD): Likewise.
16         (IX86_BUILTIN_BLENDVPS): Likewise.
17         (IX86_BUILTIN_PBLENDVB128): Likewise.
18         (IX86_BUILTIN_PBLENDW128): Likewise.
19         (IX86_BUILTIN_DPPD): Likewise.
20         (IX86_BUILTIN_DPPS): Likewise.
21         (IX86_BUILTIN_INSERTPS128): Likewise.
22         (IX86_BUILTIN_MOVNTDQA): Likewise.
23         (IX86_BUILTIN_MPSADBW128): Likewise.
24         (IX86_BUILTIN_PACKUSDW128): Likewise.
25         (IX86_BUILTIN_PCMPEQQ): Likewise.
26         (IX86_BUILTIN_PHMINPOSUW128): Likewise.
27         (IX86_BUILTIN_PMAXSB128): Likewise.
28         (IX86_BUILTIN_PMAXSD128): Likewise.
29         (IX86_BUILTIN_PMAXUD128): Likewise.
30         (IX86_BUILTIN_PMAXUW128): Likewise.
31         (IX86_BUILTIN_PMINSB128): Likewise.
32         (IX86_BUILTIN_PMINSD128): Likewise.
33         (IX86_BUILTIN_PMINUD128): Likewise.
34         (IX86_BUILTIN_PMINUW128): Likewise.
35         (IX86_BUILTIN_PMOVSXBW128): Likewise.
36         (IX86_BUILTIN_PMOVSXBD128): Likewise.
37         (IX86_BUILTIN_PMOVSXBQ128): Likewise.
38         (IX86_BUILTIN_PMOVSXWD128): Likewise.
39         (IX86_BUILTIN_PMOVSXWQ128): Likewise.
40         (IX86_BUILTIN_PMOVSXDQ128): Likewise.
41         (IX86_BUILTIN_PMOVZXBW128): Likewise.
42         (IX86_BUILTIN_PMOVZXBD128): Likewise.
43         (IX86_BUILTIN_PMOVZXBQ128): Likewise.
44         (IX86_BUILTIN_PMOVZXWD128): Likewise.
45         (IX86_BUILTIN_PMOVZXWQ128): Likewise.
46         (IX86_BUILTIN_PMOVZXDQ128): Likewise.
47         (IX86_BUILTIN_PMULDQ128): Likewise.
48         (IX86_BUILTIN_PMULLD128): Likewise.
49         (IX86_BUILTIN_ROUNDPD): Likewise.
50         (IX86_BUILTIN_ROUNDPS): Likewise.
51         (IX86_BUILTIN_ROUNDSD): Likewise.
52         (IX86_BUILTIN_ROUNDSS): Likewise.
53         (IX86_BUILTIN_PTESTZ): Likewise.
54         (IX86_BUILTIN_PTESTC): Likewise.
55         (IX86_BUILTIN_PTESTNZC): Likewise.
56         (IX86_BUILTIN_VEC_EXT_V16QI): Likewise.
57         (IX86_BUILTIN_VEC_SET_V2DI): Likewise.
58         (IX86_BUILTIN_VEC_SET_V4SF): Likewise.
59         (IX86_BUILTIN_VEC_SET_V4SI): Likewise.
60         (IX86_BUILTIN_VEC_SET_V16QI): Likewise.
61         (bdesc_ptest): New.
62         (bdesc_sse_3arg): Likewise.
63         (bdesc_2arg): Likewise.
64         (bdesc_1arg): Likewise.
65         (ix86_init_mmx_sse_builtins): Support SSE4.1.  Handle SSE builtins
66         with 3 args.
67         (ix86_expand_sse_4_operands_builtin): New.
68         (ix86_expand_unop_builtin): Support 2 arg builtins with a constant
69         smaller than 8 bits as the 2nd arg.
70         (ix86_expand_sse_ptest): New.
71         (ix86_expand_builtin): Support SSE4.1. Support 3 arg SSE builtins.
72         (ix86_expand_vector_set): Support SSE4.1.
73         (ix86_expand_vector_extract): Likewise.
74
75         * config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): Define
76         __SSE4_1__ for -msse4.1.
77
78         * config/i386/i386.md (UNSPEC_BLENDV): New for SSE4.1.
79         (UNSPEC_INSERTPS): Likewise.
80         (UNSPEC_DP): Likewise.
81         (UNSPEC_MOVNTDQA): Likewise.
82         (UNSPEC_MPSADBW): Likewise.
83         (UNSPEC_PHMINPOSUW): Likewise.
84         (UNSPEC_PTEST): Likewise.
85         (UNSPEC_ROUNDP): Likewise.
86         (UNSPEC_ROUNDS): Likewise.
87
88         * config/i386/i386.opt (msse4.1): New for SSE4.1.
89
90         * config/i386/predicates.md (const_pow2_1_to_2_operand): New.
91         (const_pow2_1_to_32768_operand): Likewise.
92
93         * config/i386/smmintrin.h: New. The SSE4.1 intrinsic header
94         file.
95
96         * config/i386/sse.md (*vec_setv4sf_sse4_1): New pattern for
97         SSE4.1.
98         (sse4_1_insertps): Likewise.
99         (*sse4_1_extractps): Likewise.
100         (sse4_1_ptest): Likewise.
101         (sse4_1_mulv2siv2di3): Likewise.
102         (*sse4_1_mulv4si3): Likewise.
103         (*sse4_1_smax<mode>3): Likewise.
104         (*sse4_1_umax<mode>3): Likewise.
105         (*sse4_1_smin<mode>3): Likewise.
106         (*sse4_1_umin<mode>3): Likewise.
107         (sse4_1_eqv2di3): Likewise.
108         (*sse4_1_pinsrb): Likewise.
109         (*sse4_1_pinsrd): Likewise.
110         (*sse4_1_pinsrq): Likewise.
111         (*sse4_1_pextrb): Likewise.
112         (*sse4_1_pextrb_memory): Likewise.
113         (*sse4_1_pextrw_memory): Likewise.
114         (*sse4_1_pextrq): Likewise.
115         (sse4_1_blendpd): Likewise.
116         (sse4_1_blendps): Likewise.
117         (sse4_1_blendvpd): Likewise.
118         (sse4_1_blendvps): Likewise.
119         (sse4_1_dppd): Likewise.
120         (sse4_1_dpps): Likewise.
121         (sse4_1_movntdqa): Likewise.
122         (sse4_1_mpsadbw): Likewise.
123         (sse4_1_packusdw): Likewise.
124         (sse4_1_pblendvb): Likewise.
125         (sse4_1_pblendw): Likewise.
126         (sse4_1_phminposuw): Likewise.
127         (sse4_1_extendv8qiv8hi2): Likewise.
128         (*sse4_1_extendv8qiv8hi2): Likewise.
129         (sse4_1_extendv4qiv4si2): Likewise.
130         (*sse4_1_extendv4qiv4si2): Likewise.
131         (sse4_1_extendv2qiv2di2): Likewise.
132         (*sse4_1_extendv2qiv2di2): Likewise.
133         (sse4_1_extendv4hiv4si2): Likewise.
134         (*sse4_1_extendv4hiv4si2): Likewise.
135         (sse4_1_extendv2hiv2di2): Likewise.
136         (*sse4_1_extendv2hiv2di2): Likewise.
137         (sse4_1_extendv2siv2di2): Likewise.
138         (*sse4_1_extendv2siv2di2): Likewise.
139         (sse4_1_zero_extendv8qiv8hi2): Likewise.
140         (*sse4_1_zero_extendv8qiv8hi2): Likewise.
141         (sse4_1_zero_extendv4qiv4si2): Likewise.
142         (*sse4_1_zero_extendv4qiv4si2): Likewise.
143         (sse4_1_zero_extendv2qiv2di2): Likewise.
144         (*sse4_1_zero_extendv2qiv2di2): Likewise.
145         (sse4_1_zero_extendv4hiv4si2): Likewise.
146         (*sse4_1_zero_extendv4hiv4si2): Likewise.
147         (sse4_1_zero_extendv2hiv2di2): Likewise.
148         (*sse4_1_zero_extendv2hiv2di2): Likewise.
149         (sse4_1_zero_extendv2siv2di2): Likewise.
150         (*sse4_1_zero_extendv2siv2di2): Likewise.
151         (sse4_1_roundpd): Likewise.
152         (sse4_1_roundps): Likewise.
153         (sse4_1_roundsd): Likewise.
154         (sse4_1_roundss): Likewise.
155         (mulv4si3): Don't expand for SSE4.1.
156         (smax<mode>3): Likewise.
157         (umaxv4si3): Likewise.
158         (uminv16qi3): Likewise.
159         (umin<mode>3): Likewise.
160         (umaxv8hi3): Rewrite.  Only enabled for SSE4.1.
161
162         * doc/extend.texi: Document SSE4.1 built-in functions.
163
164         * doc/invoke.texi: Document -msse4.1.
165
166 2007-05-22  Nathan Sidwell  <nathan@codesourcery.com>
167
168         * config/m68k/linux.h (ASM_SPEC): Add asm_pcrel_spec.
169         * config/m68k/m68k-none.h (ASM_SPEC): Don't override here.
170         * config/m68k/m68k.h (ASM_PCREL_SPEC): New.
171         (ASM_SPEC): Add asm_pcrel_spec.
172         (EXTRA_SPECS): Add asm_pcrel_spec.
173
174 2007-05-21  David Daney  <ddaney@avtrex.com>
175
176         * doc/install.texi (Building a cross compiler): Add requirements
177         for Java cross compiler.
178
179 2007-05-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
180
181         PR middle-end/31995
182         * tree-chrec.c (evolution_function_is_affine_multivariate_p):
183         Add loopno argument.  Use evolution_function_is_invariant_rec_p
184         instead of evolution_function_is_constant_p.
185         Update calls to evolution_function_is_affine_multivariate_p.
186         * tree-chrec.h  (evolution_function_is_affine_multivariate_p):
187         Add loopno argument.
188         * tree-scalar-evolution.c (gather_chrec_stats): Call
189         evolution_function_is_affine_multivariate_p with a  loop
190         number of 0.
191         * tree-data-ref.c (analyze_miv_subscript): Likewise.
192         (analyze_overlapping_iterations): Likewise.
193         (access_functions_are_affine_or_constant_p):
194         Likewise.
195         (build_classic_dist_vector_1): If the access functions
196         are equal, don't do anything.
197
198 2007-05-21  Paolo Bonzini  <bonzini@gnu.org>
199             Paolo Carlini  <pcarlini@suse.de>
200             Uros Bizjak  <ubizjak@gmail.com>
201
202         * c-cppbuiltin.c (c_cpp_builtins): Define
203         __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1, __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2,
204         __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8,
205         __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16, if appropriate.
206         * doc/cpp.texi ([Standard Predefined Macros]): Document.
207
208 2007-05-21  Mike Stump  <mrs@apple.com>
209
210         * config/darwin.h (LINK_COMMAND_SPEC): Add .cxx for dsymutil
211         handling as well.
212         * config/darwin9.h (LINK_COMMAND_SPEC): Likewise.
213
214 2007-05-21  Uros Bizjak  <ubizjak@gmail.com>
215
216         * config/i386/tmmintrin.h (_mm_alignr_epi8): Provide macro
217         implementation if __OPTIMIZE__ is not defined.
218         (_mm_alignr_pi8): Ditto.
219         * config/i386/ammintrin.h (_mm_extracti_si64): Ditto.
220         (_mm_inserti_si64): Ditto.
221         * config/i386/emmintrin.h (_mm_shuffle_pd): Ditto.
222         (_mm_slli_epi16): Ditto.
223         (_mm_slli_epi32): Ditto.
224         (_mm_slli_epi64): Ditto.
225         (_mm_srai_epi16): Ditto.
226         (_mm_srai_epi32): Ditto.
227         (_mm_srli_si128): Ditto.
228         (_mm_slli_si128): Ditto.
229         (_mm_srli_epi16): Ditto.
230         (_mm_srli_epi32): Ditto.
231         (_mm_srli_epi64): Ditto.
232         (_mm_extract_epi16): Ditto.
233         (_mm_insert_epi16): Ditto.
234         (_mm_shufflehi_epi16): Ditto.
235         (_mm_shufflelo_epi16): Ditto.
236         (_mm_shuffle_epi32): Ditto.
237         * config/i386/xmmintrin.h (_mm_extract_pi16): Ditto.
238         (_m_pextrw): Ditto.
239         (_mm_insert_pi16): Ditto.
240         (_m_pinsrw): Ditto.
241         (_mm_shuffle_pi16): Ditto.
242         (_m_pshufw): Ditto.
243         (_mm_shufle_ps): Ditto.
244         (_mm_prefetch): Ditto.
245
246 2007-05-21  Andreas Krebbel  <krebbel1@de.ibm.com>
247
248         * defaults.h (IBM_FLOAT_FORMAT): Macro definition removed.
249         * doc/tm.texi (IBM_FLOAT_FORMAT): Documentation entry removed.
250         * real.c (encode_i370_single, decode_i370_single,
251         encode_i370_double, decode_i370_double): Functions removed.
252         (i370_single_format, i370_double_format): Initializations removed.
253         (real_maxval, round_for_format, exact_real_truncate, significand_size):
254         Consider the log2_b field to always be one.
255         (ieee_single_format, mips_single_format, coldfire_single_format,
256         ieee_double_format, mips_double_format, coldfire_double_format,
257         ieee_extended_motorola_format, ieee_extended_intel_96_format,
258         ieee_extended_intel_128_format, ieee_extended_intel_96_round_53_format,
259         ibm_extended_format, mips_extended_format, ieee_quad_format,
260         mips_quad_format, vax_f_format, vax_d_format, vax_g_format,
261         decimal_single_format, decimal_double_format, decimal_quad_format,
262         c4x_single_format, c4x_extended_format, real_internal_format): Remove
263         initialization of log2_b.
264         * real.h (i370_single_format, i370_double_format): Declarations removed.
265         * c-cppbuiltin.c (builtin_define_float_constants): Consider the log2_b
266         field to always be one.
267
268 2007-05-21  Andreas Schwab  <schwab@suse.de>
269
270         * config/ia64/ia64.c (emit_predicate_relation_info): Fix use of
271         NOTE_INSN_BASIC_BLOCK_P.
272         (process_for_unwind_directive): Likewise.
273
274 2007-05-21  Nathan Sidwell  <nathan@codesourcery.com>
275
276         * builtins.c (expand_builtin_setjmp_setup): Update comment.
277         * function.h (struct function): Move va_list_gpr_size,
278         va_list_fpr_size, function_frequency to front of bitfields.  Add
279         calls_unwind_init.
280         (current_function_calls_unwind_init): New.
281         * except.c (expand_builtin_unwind_init): Set
282         current_function_calls_unwind_init not
283         current_function_has_nonlocal_label.
284         * reload1.c (has_nonexceptional_receiver): New.
285         (reload): Use it and current_function_calls_unwind_init to
286         determine whether call-saved regs must be saved.
287
288 2007-05-20  Jan Hubicka  <jh@suse.cz>
289
290         * gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of
291         NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
292         * ddg.c (create_ddg): LIkewise.
293         * final.c (final): Remove hunk moving line numbernotes around since
294         they are no longer present at this stage.
295         (final_scan_insn): Use NOTE_KIND instead of
296         NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
297         (output_asm_label): Likewise.
298         * reorg.c (dbr_schedule): Likewise.
299         * haifa-sched.c (unlink_other_notes): Likewise.
300         * mode-switching.c (optimize_mode_switching): Likewise.
301         * graph.c (start_bb): Likewise.
302         * rtl.def (NOTE): Update description.
303         * jump.c (squeeze_notes): Delete.
304         (mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use
305         NOTE_INSN_BASIC_BLOCK_P when possible.
306         * ifcvt.c (dead_or_predicable): Remove call of squeeze_notes.
307         * dwarf2out.c (gen_label_die): Use NOTE_KIND instead of
308         NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
309         (dwarf2out_var_location): Likewise.
310         * cfgbuild.c (make_edges): Likewise.
311         (find_basic_blocks_1): Likewise.
312         * function.c (reorder_blocks_1): Likewise.
313         (epilogue_done): Likewise.
314         (reposition_prologue_and_epilogue_notes): Likewise.
315         * print-rtl.c (print_rtx): Likewise; drop code for printing line number
316         notes.
317         (print_rtl): Likewise.
318         (print_rtl_single): Likewise.
319         * gcse.c (insert_insn_start_bb): Likewise.
320         * alias.c (init_alias_analysis): Likewise.
321         * calls.c (fixup_tail_calls): Likewise.
322         * except.c (sjlj_emit_function_enter): Likewise.
323         * emit-rtl.c (add_insn_after): Likeiwse.
324         (emit_label_before): Likewise.
325         (emit_label_after): Likewise.
326         (emit_note_before, emit_note_after, emit_note): Update
327         parameter to be enum insn_note; do not deal with source
328         files.
329         * cfgcleanup.c (merge_blocks_move_predecessor_nojumps):
330         Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P
331         when possible.
332         (merge_blocks_move_successor_nojumps): Simplify now when
333         we don't have BLOCK notes.
334         (try_optimize_cfg): Likewise.
335         * cfglayout.c (skip_insns_after_block): Likewise.
336         (record_effective_endpoints): Likewise.
337         (duplicate_insn_chain): Likewise.
338         * varasm.c (output_constant_pool_1): Likewise.
339         * sched-deps.c (sched_analyze): Likewise.
340         * rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS):
341         Exterminate.
342         (note_insn_name): Simplify now when NOTE_INSN_BIAS is gone.
343         * rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate.
344         (SET_INSN_DELETED): Simplify.
345         (NOTE_LINE_NUMBER): Exterminate.
346         (NOTE_LINE_KIND): New.
347         (NOTE_INSN_BASIC_BLOCK_P): Update.
348         (enum insn_note): Simplify.
349         (GET_NOTE_INSN_NAME) Simplify.
350         (emit_note_before, emit_note_after, emit_note): Update prototype.
351         (squeeze_notes): Remove.
352         * sched-int.h (NOTE_NOT_BB_P): Update.
353         * resource.c (mark_target_live_regs): Update.
354         * sched-rgn.c (debug_dependencies): Update.
355         * sched-vis.c (print_insn): Update.
356         * config/alpha/alpha.c (alpha_handle_trap_shadows): Update.
357         * config/i386/i386.c (ix86_output_function_epilogue): Update.
358         * config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0.
359         (TARGET_ADJUST_UNROLL_MAX): Likewise.
360         (split_branches): Update.
361         (sh_optimize_target_register_callee_saved): Remove hunk dead since gcc
362         4.0.0.
363         (sh_adjust_unroll_max): Exterminate.
364         * config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED.
365         * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise.
366         (m68hc11_reorg): Likewise.
367         * config/ia64/ia64.c (emit_insn_group_barriers): Update.
368         (emit_predicate_relation_info): Update.
369         (process_for_unwind_directive): Update.
370         * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update.
371         (output_call): Update.
372         * config/pa/pa.c (output_lbranch): Update.
373         (output_millicode_call): Update.
374         (output_call): Update.
375         (pa_combine_instructions): Update.
376         * config/mips/mips.c (mips16_gp_pseudo_reg): Update.
377         * config/bfin/bfin.c (gen_one_bundle): Update.
378         * cfgrtl.c (can_delete_note_p): Update.
379         (delete_insn): Update.
380         (rtl_merge_blocks): Update.
381         (commit_one_edge_insertion): Update.
382         (rtl_verify_flow_info): Update.
383         * stmt.c (expand_case): Do not call squeeze_notes.
384
385 2007-05-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
386         
387         PR middle-end/7651
388         PR c++/11856
389         PR c/12963
390         PR c/23587
391         PR other/29694
392         * c.opt (Wtype-limits): New.
393         * doc/invoke.texi (Wtype-limits): Document it.
394         (Wextra): Enabled by -Wextra.
395         * c-opts.c (c_common_post_options): Enabled by -Wextra.
396         * c-common.c (shorten_compare): Warn with Wtype-limits.
397
398 2007-05-20  Uros Bizjak  <ubizjak@gmail.com>
399
400         * config/i386/tmmintrin.h (_mm_alignr_epi32): Implement as always
401         inlined function, not as a macro.
402         (_mm_alignr_pi8): Ditto.
403         * config/i386/ammintrin.h (_mm_extracti_si64): Ditto.
404         (_mm_inserti_si64): Ditto.
405         * config/i386/emmintrin.h (_mm_shuffle_pd): Ditto.
406         (_mm_extract_epi16): Ditto.
407         (_mm_insert_epi16): Ditto.
408         (_mm_shufflehi_epi16): Ditto.
409         (_mm_shufflelo_epi16): Ditto.
410         (_mm_shuffle_epi32): Ditto.
411         * config/i386/xmmintrin.h (_mm_set_ss): Use 0.0f for float constant.
412         * config/386/mm3dnow.h: Add __attribute__((__always_inline__)) to
413         all functions.
414         (_m_from_float): Add __extension__ to conversion.  Use 0.0f for
415         float constant.
416         (_m_to_float): Use C89 compatible assignment.
417
418 2007-04-20  Martin Michlmayr  <tbm@cyrius.com>
419
420         PR target/32007
421         * config/arm/lib1funcs.asm: Define __ARM_ARCH__ on v2/v3 machines.
422
423 2007-05-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
424
425         PR middle-end/7651
426         * doc/invoke.texi (Wreturn-type): Complete description.
427         (Wextra): Delete item about return-type warning.
428         * c-decl.c: Delete redundant Wextra warning.
429         
430 2007-05-20  Uros Bizjak  <ubizjak@gmail.com>
431
432         PR target/31585
433         * config/i386/pmmintrin.h: Do not include xmmintrin.h
434         * config/i386/xmmintrin.h (_mm_extract_pi16): Implement as always
435         inlined function, not as a macro.
436         (_mm_prefetch): Ditto.
437         (_m_pextrw): Ditto.
438         (_mm_insert_pi16): Ditto.
439         (_m_pinsrw): Ditto.
440         (_mm_shuffle_pi16): Ditto.  Add const to __N argument.
441         (_m_pshufw): Ditto. Add const to __N argument.
442         (_mm_shufle_ps): Ditto.  Add const to __mask argument.
443         * config/i386/emmintrin.h (_mm_slli_epi16): Add const to __B argument.
444         (_mm_slli_epi32): Ditto.
445         (_mm_srli_si128): Implement as always inlined function, not as a macro.
446         Add __inline to function declaration.
447         (_mm_slli_si128): Ditto.
448
449 2007-05-19  Uros Bizjak  <ubizjak@gmail.com>
450
451         * config/i386/sfp-machine.h (FP_EX_INVALID, FP_EX_DENORM,
452         FP_EXP_DIVZERO, FP_EX_OVERFLOW, FP_EX_UNDERFLOW, FP_EX_INEXACT):
453         New constants.
454         (struct fenv): New structure.
455         (FP_HANDLE_EXCEPTIONS): New define.
456         (FP_RND_NEAREST, FP_RND_ZERO, FP_RND_PINF, FP_RND_MINF): New constants.
457         (_FP_DECL_EXP): New define.
458         (FP_INIT_ROUNDMODE): New define.
459         (FP_ROUNDMODE): New define.
460
461 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
462
463         * doc/invoke.texi (Warning Options): Add -Wconversion-sign.
464         (Wconversion): Update description.
465         (Wconversion-sign): New.
466         * c.opt (Wconversion-sign): New.
467         * c-opts.c (c_common_post_options): Uninitialized Wconversion-sign
468         means disabled for C++. Otherwise, take the status of Wconversion.
469         * c-common.c (conversion_warning): Warn with either Wconversion or
470         Wconversion-sign.
471         (warnings_for_convert_and_check): Conditions are already checked by
472         conversion_warning.
473         (convert_and_check): Don't check warnings if the conversion failed.
474
475 2007-05-19 Andy Hutchinson <HutchinsonAndy@netscape.net>
476            Anatoly Sokolov <aesok@dol.ru>
477
478         * config/avr/avr-protos.h (expand_prologue, expand_epilogue, 
479         avr_epilogue_uses) : Add declaration.
480         * config/avr/predicates.md (avr_sp_immediate_operand): New predicate.
481         * config/avr/constraints.md (R): New constraint.
482         config/avr/avr.md (SREG_ADDR, UNSPEC_SEI, UNSPEC_CLI, 
483         UNSPECV_PROLOGUE_SAVES, UNSPECV_EPILOGUE_RESTORES): New constants.
484         (*pop1, *pop2, *pop3, *pop4, *pop5): Combine into ...
485         (*addhi3_sp_R_pc2, *addhi3_sp_R_pc3): ... these patterns.
486         (*movhi_sp, popqi, pophi, enable_interrupt, disable_interrupt, 
487         call_prologue_saves, epilogue_restores, return_from_epilogue,
488         return_from_main_epilogue, return_from_interrupt_epilogue, 
489         return_from_naked_epilogue, prologue, epilogue): New patterns.
490         (jump): Handle symbol reference.
491         * config/avr/avr.c (out_adj_frame_ptr, out_set_stack_ptr, 
492         avr_output_function_prologue, avr_output_function_epilogue): Remove 
493         functions.
494         (avr_init_machine_status, expand_prologue, expand_epilogue, 
495         avr_asm_function_end_prologue, avr_epilogue_uses, 
496         avr_asm_function_begin_epilogue): New functions.
497         (prologue_size, epilogue_size, jump_tables_size): Remove global 
498         variables.
499         (TARGET_ASM_FUNCTION_PROLOGUE, TARGET_ASM_FUNCTION_EPILOGUE): Remove.
500         (TARGET_ASM_FUNCTION_END_PROLOGUE): Define.
501         (TARGET_ASM_FUNCTION_BEGIN_EPILOGUE): Define.
502         (avr_override_options): Initialise init_machine_status.
503         (output_movhi): Handle all stack pointer loads.
504         (out_movqi_r_mr, out_movqi_mr_r): Handle SREG_ADDR address.
505         (avr_output_addr_vec_elt): Do not use variable jump_tables_size.
506         * config/avr/avr.h (AVR_2_BYTE_PC, AVR_3_BYTE_PC): New.
507         (EPILOGUE_USES) Redefine.
508         (machine_function) Declare.
509
510 2007-05-19  Richard Sandiford  <richard@codesourcery.com>
511
512         * config/mips/mips.c (mips_offset_within_alignment_p): Tweak comment.
513         Use a single return statement.
514
515 2007-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
516
517         PR middle-end/30250
518         * builtins.c (do_mpfr_lgamma_r): New.
519         (fold_builtin_2): Handle builtin gamma_r/lgamma_r.
520         * tree.h (CASE_FLT_FN_REENT): New.
521
522 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
523
524         * dwarf2out.c (print_die): Use '%ld' not '%lu' to print a 'long'.
525         (output_die): Use 'unsigned long' with %x.
526         * sched-vis.c (print_value): Use 'unsigned HOST_WIDE_INT' and
527         HOST_WIDE_INT_PRINT_HEX to print HOST_WIDE_INT.
528         * tree-dump.c (dump_pointer): Use 'unsigned long' for %lx.
529
530         * unwind-dw2.c (uw_identify_context): Use the CFA, not the IP.
531
532 2007-05-18  H.J. Lu  <hongjiu.lu@intel.com>
533
534         PR target/31989
535         PR target/31681
536         PR target/31666
537         * config/i386/i386.c (init_cumulative_args): Set maybe_vaarg to
538         true if function has no argument.
539
540 2007-05-18  DJ Delorie  <dj@redhat.com>
541
542         * config/mips/mips.c (mips_offset_within_alignment_p): New.
543         (mips_symbolic_constant_p): Call it for TPREL and DTPREL symbols.
544
545 2007-05-18  Uros Bizjak  <ubizjak@gmail.com>
546
547         * longlong.h (__x86_64__): Add definitions for add_ssaaaa,
548         sub_ddmmss, umul_ppmm, udiv_qrnnd, count_leading_zeros and
549         count_trailing_zeros.
550         (__i386__): Implement count_leading_zeros using __builtin_clz().
551         Implement count_trailing_zeros usign __builtin_ctz().
552
553 2007-05-18  Richard Sandiford  <richard@codesourcery.com>
554
555         * config/i386/vxworks.h (ASM_PREFERRED_EH_DATA_FORMAT): Undefine.
556
557 2007-05-18  Uros Bizjak  <ubizjak@gmail.com>
558
559         PR middle-end/31344
560         * expr.c (emit_move_change_mode): Change mode of push operands here.
561
562 2007-05-17  Ian Lance Taylor  <iant@google.com>
563
564         PR tree-optimization/31953
565         * tree-vrp.c (set_value_range_to_value): Add equiv parameter.
566         Change all callers.
567         (set_value_range_to_null): Call set_value_range_to_value.
568         (extract_range_from_comparison): Likewise.
569
570 2007-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
571
572         * toplev.c (print_version): Output GMP/MPFR version info.
573
574         * builtins.c (CASE_MATHFN_REENT): New macro.
575         (mathfn_built_in): Use it.
576         * builtins.def (BUILT_IN_GAMMA_R, BUILT_IN_GAMMAF_R,
577         BUILT_IN_GAMMAL_R, BUILT_IN_LGAMMA_R, BUILT_IN_LGAMMAF_R,
578         BUILT_IN_LGAMMAL_R): New.
579         * doc/extend.texi: Document new builtins.
580
581         PR middle-end/31796
582         * builtins.c (do_mpfr_remquo): New.
583         (fold_builtin_2): Handle BUILT_IN_DREM/BUILT_IN_REMAINDER.
584         (fold_builtin_3): Handle BUILT_IN_REMQUO.
585
586         PR middle-end/30251
587         * builtins.c (fold_builtin_1): Handle y0, y1.
588         (fold_builtin_2): Handle yn.
589
590         PR middle-end/30251
591         * builtins.c (do_mpfr_bessel_n): New.
592         (fold_builtin_1): Handle BUILT_IN_J0 and BUILT_IN_J1.
593         (fold_builtin_2): Handle BUILT_IN_JN.
594
595 2007-05-17  Danny Smith  <dannysmith@users.sourceforge.net>
596
597         PR target/31965
598         * config/i386/mingw32.h (_INTEGRAL_MAX_BITS): Define builtin as
599         TYPE_PRECISION (intmax_type_node).
600
601 2007-05-17  Steve Ellcey  <sje@cup.hp.com>
602
603         PR target/31850
604         * reload.c (subst_reloads): Remove checking.
605
606 2007-05-17  Eric Botcazou  <ebotcazou@libertysurf.fr>
607
608         PR rtl-optimization/31691
609         * combine.c (simplify_set): Build a new src pattern instead of
610         substituting its operands in the COMPARE case.
611
612 2007-05-17  Zdenek Dvorak  <dvorakz@suse.cz>
613
614         * tree-vrp.c (finalize_jump_threads): Do not care about dominance info.
615         (execute_vrp): Preserve loops through jump threading.
616         * tree-ssa-threadupdate.c (thread_single_edge,
617         dbds_continue_enumeration_p, determine_bb_domination_status,
618         thread_through_loop_header): New functions.
619         (create_edge_and_update_destination_phis,
620         create_edge_and_update_destination_phis): Set loops for the new blocks.
621         (prune_undesirable_thread_requests): Removed.
622         (redirect_edges): Do not pretend that redirect_edge_and_branch can
623         create new blocks.
624         (thread_block): Do not call prune_undesirable_thread_requests.
625         Update loops.
626         (mark_threaded_blocks): Select edges to thread here.
627         (thread_through_all_blocks): Take may_peel_loop_headers argument.
628         Thread edges through loop headers independently.
629         * cfgloopmanip.c (create_preheader, mfb_keep_just): Export.
630         * tree-pass.h (TODO_mark_first_instance): New.
631         (first_pass_instance): Declare.
632         * cfghooks.c (duplicate_block): Put the block to the original loop
633         if copy is not specified.
634         * tree-ssa-dom.c (tree_ssa_dominator_optimize): Preserve loops through
635         jump threading.  Pass may_peel_loop_headers to
636         thread_through_all_blocks according to first_pass_instance.
637         * cfgloop.h (create_preheader): Declare.
638         * tree-flow.h (thread_through_all_blocks): Declaration changed.
639         * basic-block.h (mfb_keep_just, mfb_kj_edge): Declare.
640         * passes.c (first_pass_instance): New variable.
641         (next_pass_1): Set TODO_mark_first_instance.
642         (execute_todo): Set first_pass_instance.
643
644 2007-05-17  Uros Bizjak  <ubizjak@gmail.com>
645
646         PR tree-optimization/24659
647         * optabs.h (enum optab_index): Add OTI_vec_unpacks_float_hi,
648         OTI_vec_unpacks_float_lo, OTI_vec_unpacku_float_hi,
649         OTI_vec_unpacku_float_lo, OTI_vec_pack_sfix_trunc and
650         OTI_vec_pack_ufix_trunc.
651         (vec_unpacks_float_hi_optab): Define new macro.
652         (vec_unpacks_float_lo_optab): Ditto.
653         (vec_unpacku_float_hi_optab): Ditto.
654         (vec_unpacku_float_lo_optab): Ditto.
655         (vec_pack_sfix_trunc_optab): Ditto.
656         (vec_pack_ufix_trunc_optab): Ditto.
657         * genopinit.c (optabs): Implement vec_unpack[s|u]_[hi|lo]_optab
658         and vec_pack_[s|u]fix_trunc_optab using
659         vec_unpack[s|u]_[hi\lo]_* and vec_pack_[u|s]fix_trunc_* patterns
660         * tree-vectorizer.c (supportable_widening_operation): Handle
661         FLOAT_EXPR and CONVERT_EXPR.  Update comment.
662         (supportable_narrowing_operation): New function.
663         * tree-vectorizer.h (supportable_narrowing_operation): Prototype.
664         * tree-vect-transform.c (vectorizable_conversion): Handle
665         (nunits_in == nunits_out / 2) and (nunits_out == nunits_in / 2) cases.
666         (vect_gen_widened_results_half): Move before vectorizable_conversion.
667         (vectorizable_type_demotion): Call supportable_narrowing_operation()
668         to check for target support.
669         * optabs.c (optab_for_tree_code) Return vec_unpack[s|u]_float_hi_optab
670         for VEC_UNPACK_FLOAT_HI_EXPR, vec_unpack[s|u]_float_lo_optab
671         for VEC_UNPACK_FLOAT_LO_EXPR and vec_pack_[u|s]fix_trunc_optab
672         for VEC_PACK_FIX_TRUNC_EXPR.
673         (expand_binop): Special case mode of the result for
674         vec_pack_[u|s]fix_trunc_optab.
675         (init_optabs): Initialize vec_unpack[s|u]_[hi|lo]_optab and
676         vec_pack_[u|s]fix_trunc_optab.
677
678         * tree.def (VEC_UNPACK_FLOAT_HI_EXPR, VEC_UNPACK_FLOAT_LO_EXPR,
679         VEC_PACK_FIX_TRUNC_EXPR): New tree codes.
680         * tree-pretty-print.c (dump_generic_node): Handle
681         VEC_UNPACK_FLOAT_HI_EXPR, VEC_UNPACK_FLOAT_LO_EXPR and
682         VEC_PACK_FIX_TRUNC_EXPR.
683         (op_prio): Ditto.
684         * expr.c (expand_expr_real_1): Ditto.
685         * tree-inline.c (estimate_num_insns_1): Ditto.
686         * tree-vect-generic.c (expand_vector_operations_1): Ditto.
687
688         * config/i386/sse.md (vec_unpacks_float_hi_v8hi): New expander.
689         (vec_unpacks_float_lo_v8hi): Ditto.
690         (vec_unpacku_float_hi_v8hi): Ditto.
691         (vec_unpacku_float_lo_v8hi): Ditto.
692         (vec_unpacks_float_hi_v4si): Ditto.
693         (vec_unpacks_float_lo_v4si): Ditto.
694         (vec_pack_sfix_trunc_v2df): Ditto.
695
696         * doc/c-tree.texi (Expression trees) [VEC_UNPACK_FLOAT_HI_EXPR]:
697         Document.
698         [VEC_UNPACK_FLOAT_LO_EXPR]: Ditto.
699         [VEC_PACK_FIX_TRUNC_EXPR]: Ditto.
700         * doc/md.texi (Standard Names) [vec_pack_sfix_trunc]: Document.
701         [vec_pack_ufix_trunc]: Ditto.
702         [vec_unpacks_float_hi]: Ditto.
703         [vec_unpacks_float_lo]: Ditto.
704         [vec_unpacku_float_hi]: Ditto.
705         [vec_unpacku_float_lo]: Ditto.
706
707 2007-05-16  Uros Bizjak  <ubizjak@gmail.com>
708
709         * soft-fp/README: Update for new files.
710         * soft-fp/floattisf.c: New file.
711         * soft-fp/floattidf.c: New file.
712         * soft-fp/floattitf.c: New file.
713         * soft-fp/floatuntisf.c: New file.
714         * soft-fp/floatuntidf.c: New file.
715         * soft-fp/floatuntitf.c: New file.
716         * soft-fp/fixsfti.c: New file.
717         * soft-fp/fixdfti.c: New file.
718         * soft-fp/fixtfti.c: New file.
719         * soft-fp/fixunssfti.c: New file.
720         * soft-fp/fixunsdfti.c: New file.
721         * soft-fp/fixunstfti.c: New file.
722         * soft-fp/extendxftf.c: New file.
723         * soft-fp/trunctfxf.c: New file.
724
725         * libgcc-std.ver (__extendxftf2): Added to GCC_4.3.0 section.
726         (__trunctfxf2): Ditto.
727
728         * config/i386/libgcc-x86_64-glibc.ver (__addtf3, __divtf3, __eqtf2,
729         __extenddftf2, __extendsftf2, __fixtfdi, __fixtfsi, __fixtfti,
730         __fixunstfdi, __fixunstfsi, __fixunstfti, __floatditf, __floatsitf,
731         __floattitf, __floatunditf, __floatunsitf, __floatuntitf, __getf2,
732         __letf2, __multf3, __negtf2, __subtf3, __trunctfdf2, __trunctfsf2,
733         __unordtf2): Exclude and add to GCC_4.3.0 section for x86_64 targets.
734
735         * config/i386/t-fprules-softfp64: New file.
736         * config/i386/sfp-machine.h: New file.
737         * config.gcc (x86_64-*-linux*, x86_64-*-kfreebsd*-gnu,
738         x86_64-*-knetbsd*-gnu): Add i386/t-fprules-softfp64
739         and soft-fp/t-softfp to tmake_file.
740         (i[34567]86-*-linux*, i[34567]86-*-kfreebsd*-gnu,
741         i[34567]86-*-knetbsd*-gnu): Ditto for --enable-targets=all.
742         
743         * config/i386/t-linux64 (softfp_wrap_start): New.
744         (softfp_wrap_end): New.
745         * config/i386/i386.c (ix86_scalar_mode_supported): TFmode is
746         supported for TARGET_64BIT.
747
748 2007-05-16  Rafael Avila de Espindola  <espindola@google.com>
749
750         * c-common.c (c_common_signed_or_unsigned_type): Emulate 
751         c_common_unsigned_type behavior.
752
753 2007-05-16  Paolo Bonzini  <bonzini@gnu.org>
754
755         * config/i386/i386.c (legitimize_tls_address): Mark __tls_get_addr
756         calls as pure.
757
758 2007-05-16  Eric Christopher  <echristo@apple.com>
759
760         * config/rs6000/rs6000.c (rs6000_emit_prologue): Move altivec register
761         saving after stack push. Set sp_offset whenever we push.
762         (rs6000_emit_epilogue): Move altivec register restore before
763         stack push.
764
765 2007-05-16  Richard Sandiford  <richard@codesourcery.com>
766
767         * configure.ac: Allow sysroots to be relocated under $prefix as
768         well as $exec_prefix.
769         * configure: Regenerate.
770
771 2007-05-16  Richard Sandiford  <richard@codesourcery.com>
772
773         Revert:
774
775         2007-05-12  Richard Sandiford  <richard@codesourcery.com>
776
777         * configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix).
778         (gcc_tooldir): Likewise.
779         * configure: Regenerate.
780         * Makefile.in (libsubdir_to_prefix): New variable, based on the
781         old configure.ac gcc_tooldir setting.
782         (prefix_to_exec_prefix): New variable.
783         (DRIVER_DEFINES): Use $(libsubdir_to_prefix)$(prefix_to_exec_prefix)
784         rather than $(unlibsubdir)/../ to derive TOOLDIR_BASE_PREFIX.
785
786 2007-05-14  Janis Johnson  <janis187@us.ibm.com>
787
788         * c-typeck.c (build_binary_op): Return early for error.
789
790 2007-05-15  Zdenek Dvorak  <dvorakz@suse.cz>
791
792         * tree-ssa-loop-niter.c (record_estimate): Use GGC_NEW to allocate
793         struct nb_iter_bound.
794         (free_numbers_of_iterations_estimates_loop): Use ggc_free.
795         * gengtype.c (open_base_files): Add cfhloop.h to the list of includes.
796         * cfgloopmanip.c (place_new_loop): Vector larray is gc-allocated.
797         * tree-scalar-evolution.c: Include gt-tree-scalar-evolution.h.
798         (struct scev_info_str, scalar_evolution_info): Add GTY markers.
799         (new_scev_info_str): Use GGC_NEW to allocate struct scev_info_str.
800         (del_scev_info): Use ggc_free.
801         (scev_initialize): Allocate scalar_evolution_info in gc memory.
802         * loop-init.c: Include ggc.h.
803         (loop_optimizer_init): Use GGC_CNEW to allocate struct loops.
804         (loop_optimizer_finalize): Use ggc_free.
805         * tree-ssa-loop.c (pass_tree_unswitch, pass_vectorize,
806         pass_linear_transfom, pass_empty_loop, pass_complete_unroll,
807         pass_iv_optimize): Add TODO_ggc_collect.
808         * function.h (struct function): Remove skip marker from x_current_loops.
809         * cfgloop.c: Include ggc.h.
810         (flow_loops_free, flow_loop_free): Free the loop descriptions in gc
811         memory.
812         (establish_preds): Vector superloops is gc allocated.
813         (alloc_loop): Allocate loop using GGC_CNEW.  Allocate head of
814         loop->exits list.
815         (flow_loops_find): Vector larray is gc allocated.
816         (loop_exit_free): Use ggc_free.
817         (rescan_loop_exit): Use GGC_NEW to allocate struct loop_exit.  Reflect
818         that head of exits list is now not a part of struct loop.
819         (record_loop_exits): Allocate exits table in gc memory.
820         (get_loop_exit_edges, verify_loop_structure, single_exit): Reflect that
821         head of exits list is now not a part of struct loop.
822         * cfgloop.h (struct lpt_decision, struct nb_iter_bound,
823         struct loop_exit): Add GTY marker.
824         (struct loop): Add GTY marker.  Make superloops vector gc allocated.
825         Add skip marker to aux field.  Make head of exits list a separate
826         object.
827         (struct loops): Add GTY marker.  Make larray vector gc allocated.
828         Add param marker to exits table.
829         (get_loops): Type changed.
830         * Makefile.in (tree-scalar-evolution.o): Add gt-tree-scalar-evolution.h
831         dependency.
832         (cfgloop.o, loop-init.o): Add ggc.h dependency.
833         (GTFILES): Add cfgloop.h and tree-scalar-evolution.c.
834         * basic-block.h (struct basic_block_def): Remove skip marker from
835         loop_father field.
836
837 2007-05-14  Uros Bizjak  <ubizjak@gmail.com>
838
839         * builtins.c (expand_builtin_mathfn): Use EXPAND_NORMAL instead
840         of 0 in the call to expand_expr().
841         (expand_builtin_mathfn_3): Ditto.
842         (expand_builtin_interclass_mathfn): Ditto.
843         (expand_builtin_cexpi): Ditto.
844         (expand_builtin_int_roundingfn): Ditto.
845         (expand_builtin_int_roundingfn_2): Ditto.
846         (expand_builtin_pow): Ditto.
847         (expand_builtin_powi): Ditto.
848         (expand_builtin_bswap): Ditto.
849         (expand_builtin_unop): Ditto.
850         (expand_builtin_fabs): Ditto.
851         (get_builtin_sync_mem): Use NULL_RTX instead of NULL in
852         the call to expand_expr().
853         (expand_builtin_sync_operation): Ditto.
854         (expand_builtin_compare_and_swap): Ditto.
855         (expand_builtin_lock_test_and_set): Ditto.
856         * except.c (expand_builtin_eh_return_data_regno): Use EXPAND_NORMAL
857         instead of 0 in the call to expand_expr().
858         (expand_builtin_extract_return_addr): Ditto.
859         (expand_builtin_eh_return): Ditto.
860         (expand_eh_return): Ditto.
861         * explow.c (expr_size): Ditto.
862         * expr.c (optimize_bitfield_assignment_op): Ditto.
863         (expand_assignement): Ditto.
864         (store_expr): Ditto.
865         (store_field): Ditto.
866         (expand_expr_addr_expr_1): Use NULL_RTX instead of NULL in
867         the call to expand_expr().
868         (expand_expr_real_1) [COMPLEX_CST]: Use EXPAND_NORMAL instead of 0
869         in the call to expand_expr().
870         [CONSTRUCTOR, PLUS_EXPR, MINUS_EXPR, NEGATE_EXPR, ABS_EXPR,
871         BIT_NOT_EXPR, LSHIFT_EXPR, LT_EXPR, TRUTH_NOT_EXPR]: Ditto.
872         [VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO]: Use expand_normal() instead
873         of expand_expr().
874         * optabs.c (expand_vec_shift_expr): Ditto.
875         (expand_vec_cond_expr): Ditto.
876         (vector_compare_rtx): Use EXPAND_STACK_PARM instead of 1 in the
877         call to expand_expr().
878         * stmt.c (expand_return): Use EXPAND_NORMAL instead of 0
879         in the call to expand_expr().
880
881 2007-05-14  Dave Korn  <dave.korn@artimi.com>
882
883         * genautomata.c (gen_regexp_el):  Allocate correct size for regexp.
884
885 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
886
887         * c-common.c (warnings_for_convert_and_check): Use unsigned_type_for
888         instead of c_common_unsigned_type.
889         (c_common_unsigned_type): Remove.
890         (shorten_compare): Use c_common_signed_or_unsigned_type instead of
891         c_common_unsigned_type.
892         (c_common_nodes_and_builtins): Use unsigned_type_for instead of
893         c_common_unsigned_type.
894         * c-common.h (c_common_unsigned_type): Remove.
895         * c-decl.c (grokdeclarator): Use unsigned_type_for instead of
896         c_common_unsigned_type.
897         * c-format.c (check_format_types): Use unsigned_type_for instead of
898         c_common_unsigned_type.
899         * c-objc-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
900         * c-typeck.c (convert_for_assignment): Use unsigned_type_for instead of
901         c_common_unsigned_type.
902         * convert.c (convert_to_integer): Use unsigned_type_for instead of
903         lang_hooks.types.unsigned_type.
904         * expmed.c (make_tree): Use unsigned_type_for instead of
905         lang_hooks.types.unsigned_type.
906         * fold-const.c (fold_negate_expr): Use unsigned_type_for instead of
907         lang_hooks.types.unsigned_type.
908         (build_range_check): Likewise.
909         (fold_unary): Likewise.
910         (fold_binary): Likewise.
911         (fold_ternary): Likewise.
912         * langhooks-def.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
913         * langhooks.h (lang_hooks_for_types): Remove unsigned_type.
914         * tree.c (get_unsigned_type): New.
915         (unsigned_type_for): Use get_unsigned_type instead of
916         lang_hooks.types.unsigned_type.
917
918 2007-05-14  Kazu Hirata  <kazu@codesourcery.com>
919
920         * config/m68k/m68k-protos.h: Rename m68k_interrupt_function_p
921         to m68k_get_function_kind.  Update its prototype.
922         * config/m68k/m68k.c (m68k_attribute_table): Add an entry for
923         interrupt_thread.
924         (m68k_interrupt_function_p): Return enum m68k_function_type
925         instead of bool.  Rename to m68k_get_function_kind.
926         (m68k_handle_fndecl_attribute): Reject interrupt_thread if the
927         target is not fido.
928         (m68k_compute_frame_layout): Don't mark any register for save
929         if an interrupt_thread attribute is specified.
930         (m68k_hard_regno_rename_ok): Update a use of
931         m68k_interrupt_function_p.
932         * config/m68k/m68k.h (EPILOGUE_USES): Update a use of
933         m68k_interrupt_function_p.
934         (m68k_function_type): New.
935         * config/m68k/m68k.md (*return): Output a 'sleep' instruction
936         for a function with an interrupt_thread attribute.
937         * doc/extend.texi: Document the interrupt_thread attribute.
938
939 2007-05-13  Daniel Berlin  <dberlin@dberlin.org>
940
941         Fix PR tree-optimization/31911
942         * tree-ssa-pre.c (phi_translate): Make sure to cache results even
943         if they didn't change the expression.
944
945 2007-05-13  Zdenek Dvorak  <dvorakz@suse.cz>
946
947         * tree-scalar-evolution.c (resolve_mixers): Exported.
948         * tree-scalar-evolution.h (resolve_mixers): Declare.
949         * tree-data-ref.c (object_analysis, ptr_decl_may_alias_p,
950         ptr_ptr_may_alias_p, may_alias_p, record_ptr_differ_p,
951         record_record_differ_p, record_array_differ_p, array_ptr_differ_p,
952         base_object_differ_p, base_addr_differ_p, analyze_array_indexes,
953         init_array_ref, init_pointer_ref, analyze_indirect_ref,
954         strip_conversion, analyze_offset_expr, address_analysis,
955         object_analysis, analyze_offset): Removed.
956         (dr_analyze_innermost, dr_analyze_indices, dr_analyze_alias,
957         split_constant_offset, canonicalize_base_object_address,
958         object_address_invariant_in_loop_p, disjoint_objects_p,
959         dr_may_alias_p, dr_address_invariant_p): New functions.
960         (create_data_ref): Use dr_analyze_innermost, dr_analyze_indices
961         and dr_analyze_alias.
962         (initialize_data_dependence_relation): Use dr_may_alias_p
963         and object_address_invariant_in_loop_p.
964         (compute_self_dependence): Handle the case when DDR_ARE_DEPENDENT (ddr)
965         is chrec_dont_know.
966         (find_data_references_in_stmt): Restrict the analysis of data references
967         to the given loop nest.
968         (find_data_references_in_loop): Made static.  Pass loop nest to
969         find_data_references_in_stmt.
970         (compute_data_dependences_for_loop): Use DR_VOPS.
971         (free_data_ref): Free DR_VOPS.
972         * tree-data-ref.h (struct first_location_in_loop): Replaced by ...
973         (struct innermost_loop_behavior): ... new.
974         (struct base_object_info): Replaced by ...
975         (struct indices): ... new.
976         (struct dr_alias): New.
977         (enum data_ref_type): Removed.
978         (struct data_reference): Consist of struct innermost_loop_behavior,
979         struct indices and struct dr_alias.
980         (DR_SET_ACCESS_FNS, DR_FREE_ACCESS_FNS): Removed.
981         (DR_MEMTAG): Renamed to ...
982         (DR_SYMBOL_TAG): ... this.
983         (find_data_references_in_loop): Declaration removed.
984         * tree-vect-analyze.c (vect_compute_data_ref_alignment): Use DR_INIT
985         instead of DR_OFFSET_MISALIGNMENT.  DR_ALIGNED_TO is never NULL.
986         (vect_analyze_data_refs): Use DR_SYMBOL_TAG instead of DR_MEMTAG.
987         * tree-vect-transform.c (vect_create_data_ref_ptr): Ditto.
988
989 2007-05-13  Revital Eres  <eres@il.ibm.com>
990
991         * tree-ssa-dse.c (get_use_of_stmt_lhs): New function
992         which walks virtual def-use chains to find redundant stores.
993         (dse_optimize_stmt): Call it.
994
995 2007-05-12  Steven Bosscher  <steven@gcc.gnu.org>
996
997         * gcse.c (gcse_main): Do jump bypassing in CPROP2.
998         * passes.c (init_optimization_passes): Move pass_jump_bypass
999         after loop2.
1000
1001         * basic-block.h (bb_has_eh_pred): Fix style issue.
1002
1003 2007-05-12  Steven Bosscher  <steven@gcc.gnu.org>
1004
1005         PR rtl-optimization/31848
1006         * loop-invariant.c (move_invariant_reg): If we move an insn
1007         with a REG_EQUAL note, and that insn is not always executed,
1008         remove the REG_EQUAL note.
1009
1010 2007-05-12  Richard Guenther  <rguenther@suse.de>
1011
1012         PR tree-optimization/31797
1013         * tree-ssa-forwprop.c (forward_propagate_addr_expr): Do not
1014         propagate into a stmt that has volatile ops.
1015
1016 2007-05-12  Richard Sandiford  <richard@codesourcery.com>
1017
1018         * configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix).
1019         (gcc_tooldir): Likewise.
1020         * configure: Regenerate.
1021         * Makefile.in (libsubdir_to_prefix): New variable, based on the
1022         old configure.ac gcc_tooldir setting.
1023         (prefix_to_exec_prefix): New variable.
1024         (DRIVER_DEFINES): Use $(libsubdir_to_prefix)$(prefix_to_exec_prefix)
1025         rather than $(unlibsubdir)/../ to derive TOOLDIR_BASE_PREFIX.
1026
1027 2007-05-11  Silvius Rus  <rus@google.com>
1028
1029         * Makefile.in (OBJS-common): Add tree-ssa-alias-warnings.o.
1030         * c-common.c (strict_aliasing_warning): Modify -Wstrict-aliasing logic.
1031         * c-common.h (strict_aliasing_warning): Change return type.
1032         * c-opts.c (c_common_handle_option): Add call to set_Wstrict_aliasing.
1033         * c-typeck.c (build_indirect_ref): Add call to strict_aliasing_warning.
1034         (build_c_cast): Condition call to strict_aliasing_warning.
1035         * doc/invoke.texi: Update description of -Wstrict-aliasing[=n].
1036         * flags.h (set_Wstrict_aliasing): Declare.
1037         * opts.c (set_Wstrict_alising): Define, add call to.
1038         * tree-flow.h (strict_aliasing_warning_backend): Declare.
1039         * tree-ssa-alias-warnings.c: New file.
1040         * tree-ssa-alias.c (compute_may_aliases): Add call to
1041         strict_aliasing_warning_backend.
1042
1043 2007-05-11  Zdenek Dvorak  <dvorakz@suse.cz>
1044
1045         * tree-loop-linear.c (gather_interchange_stats, try_interchange_loops):
1046         Use loop_depth and loop_outer accessor functions.
1047         * tree-ssa-loop-im.c (outermost_invariant_loop, set_level,
1048         determine_invariantness_stmt, move_computations_stmt): Ditto.
1049         * cfgloopmanip.c (fix_bb_placement, fix_loop_placement, remove_path,
1050         add_loop, loopify, unloop, fix_loop_structure): Ditto.
1051         * tree-ssa-loop-manip.c (find_uses_to_rename_use): Ditto.
1052         * tree-scalar-evolution.c (interpret_loop_phi,
1053         compute_scalar_evolution_in_loop, analyze_scalar_evolution_in_loop,
1054         instantiate_parameters_1, scev_const_prop): Ditto.
1055         * cfghooks.c (make_forwarder_block): Ditto.
1056         * cfgloopanal.c (mark_irreducible_loops, mark_loop_exit_edges): Ditto.
1057         * modulo-sched.c (loop_canon_p): Ditto.
1058         * tree-vectorizer.c (slpeel_tree_duplicate_loop_to_edge_cfg,
1059         slpeel_can_duplicate_loop_p): Ditto.
1060         * lambda-code.c (invariant_in_loop_and_outer_loops): Ditto.
1061         * tree-cfg.c (tree_duplicate_sese_region): Ditto.
1062         * cfgloop.c (flow_loop_dump, flow_loop_nodes_find, rescan_loop_exit,
1063         cancel_loop, verify_loop_structure): Ditto.
1064         (flow_loop_nested_p, superloop_at_depth, flow_loop_free,
1065         add_bb_to_loop, remove_bb_from_loops, find_common_loop): Use the
1066         superloops vector instead of "pred" array.
1067         (establish_preds): Take father loop as an argument.  Initialize the
1068         superloops vector.
1069         (flow_loop_tree_node_add): Pass father loop to establish_preds.  Do not
1070         initialize loop->outer.
1071         (flow_loop_tree_node_remove): Truncate the superloops vector.
1072         * cfgloop.h (struct loop): Removed field "outer", fields "depth" and
1073         "pred" merged to "superloops" vector.
1074         (loop_depth, loop_outer): New.
1075         (fel_init): Use loop_outer.
1076
1077 2007-05-11  Jan Hubicka  <jh@suse.cz>
1078
1079         * cgraphunit.c: Include gt-cgraphunit.h
1080         (static_ctors, static_dtors): New static vars.
1081         (record_cdtor_fn, build_cdtor, cgraph_build_cdtor_fns): New functions,
1082         based on implementation in c-common.c
1083         (cgraph_finalize_function): Call record_cdtor_fn.
1084         (cgraph_optimize): Call cgraph_build_cdtor_fns.
1085         * decl.c (finish_function): Do not call c_record_cdtor_fn.
1086         (c_write_global_declarations): Do not call c_build_cdtor_fns.
1087         * c-common.c (static_ctors, static_dtors, c_record_cdtor_fn,
1088         build_cdtor, c_build_cdtor_fns): Remove.
1089         * c-common.h (static_ctors, static_dtors, c_record_cdtor_fn,
1090         c_build_cdtor_fns): Remove prototype.
1091
1092 2007-05-11  Paolo Carlini  <pcarlini@suse.de>
1093
1094         PR other/31852
1095         * builtin-types.def: Add BT_FN_PTR_CONST_PTR_INT_SIZE.
1096         * builtins.def: Add BUILT_IN_MEMCHR, use the latter.
1097         * builtins.c (fold_builtin_memchr): New.
1098         (expand_builtin_memchr): Call the latter.
1099         (expand_builtin, fold_builtin_3): Deal with BUILT_IN_MEMCHR.
1100         * doc/extend.texi ([Other built-in functions provided by GCC]):
1101         Document memchr.
1102
1103 2007-05-11  Andreas Krebbel  <krebbel1@de.ibm.com>
1104
1105         * config/s390/s390.md (GPR0_REGNUM, FPR0_REGNUM, FPR2_REGNUM,
1106         PFPO_CONVERT, PFPO_OP_TYPE_SF, PFPO_OP_TYPE_DF, PFPO_OP_TYPE_TF,
1107         PFPO_OP_TYPE_SD, PFPO_OP_TYPE_DD, PFPO_OP_TYPE_TD, PFPO_OP0_TYPE_SHIFT,
1108         PFPO_OP1_TYPE_SHIFT): Constants added.
1109         (DFP_ALL): Mode macro defined.
1110         ("*trunc<BFP:mode><DFP_ALL:mode>2", "*trunc<DFP_ALL:mode><BFP:mode>2",
1111         "*extend<BFP:mode><DFP_ALL:mode>2", "*extend<DFP_ALL:mode><BFP:mode>2"):
1112         Insn definitions added.
1113         ("trunc<BFP:mode><DFP_ALL:mode>2", "trunc<DFP_ALL:mode><BFP:mode>2",
1114         "extend<BFP:mode><DFP_ALL:mode>2", "extend<DFP_ALL:mode><BFP:mode>2"):
1115         Expanders added.
1116
1117 2007-05-10  Zdenek Dvorak  <dvorakz@suse.cz>
1118
1119         PR tree-optimization/31885
1120         * tree-chrec.c (chrec_contains_undetermined): Do not consider NULL_TREE
1121         to be undetermined.
1122         (automatically_generated_chrec_p): Return false for NULL.
1123
1124 2007-05-08  Bernd Schmidt  <bernd.schmidt@analog.com>
1125
1126         * config/bfin/bfin.h (MOVE_RATIO): Define.
1127
1128 2007-05-10  Richard Sandiford  <richard@codesourcery.com>
1129
1130         * config.gcc (sparc-wrs-vxworks): New target.
1131         * config/sparc/vxworks.h, config/sparc/t-vxworks: New files.
1132         * config/sparc/sparc-protos.h (sparc_emit_call_insn): Declare.
1133         * config/sparc/sparc.h: Include vxworks-dummy.h.
1134         (PRINT_OPERAND_ADDRESS): Extend SYMBOL_REF handling to
1135         include LABEL_REFs too.
1136         * config/sparc/sparc.c (sparc_expand_move): Don't assume that
1137         _GLOBAL_OFFSET_TABLE_ - label_ref is a link-time constant on
1138         VxWorks.
1139         (legitimize_pic_address): Handle LABEL_REFs like SYMBOL_REFs
1140         on VxWorks.
1141         (load_pic_register): Use gen_vxworks_load_got for VxWorks.
1142         (sparc_emit_call_insn): New function.
1143         (sparc_function_ok_for_sibcall): Restrict sibcalls to locally-binding
1144         functions when generating VxWorks PIC.
1145         * config/sparc/sparc.md (vxworks_load_got): New pattern.
1146         (call, call_value): Use sparc_emit_call_insn instead of
1147         emit_call_insn.
1148
1149 2007-05-09  Bob Wilson  <bob.wilson@acm.org>
1150
1151         * config/xtensa/xtensa.c (xtensa_output_literal): Don't use #if.
1152
1153 2007-05-09  Bob Wilson  <bob.wilson@acm.org>
1154
1155         * config/xtensa/xtensa.c (xtensa_output_literal): Mask out high bits
1156         for floating-point values if HOST_BITS_PER_LONG > 32.  Use split_double
1157         instead of operand_subword.
1158
1159 2007-05-08  Bernd Schmidt  <bernd.schmidt@analog.com>
1160
1161         * config/bfin/bfin.h (LOCAL_ALIGNMENT): Define.
1162         * config/bfin/bfin.c (bfin_local_alignment): New function.
1163         * config/bfin/bfin-protos.h (bfin_local_alignment): Declare it.
1164
1165 2007-05-08  Chao-ying Fu  <fu@mips.com>
1166
1167         * doc/md.texi (msub@var{m}@var{n}4, usub@var{m}@var{n}4): Document.
1168         * optabs.h (OTI_smsub_widen, OTI_umsub_widen): New optab_indexes.
1169         (smsub_widen_optab, umsub_widen_optab): Define.
1170         * optabs.c (init_optabs): Initialize smsub_widen_optab and
1171         umsub_widen_optab.
1172         * genopinit.c (optabs): Fill in smsub_widen_optab and
1173         umsub_widen_optab.
1174         * expr.c (expand_expr_real_1): Try to use smsub_widen_optab
1175         and umsub_widen_optab to implement multiply-subtract sequences.
1176         * config/mips/mips.md (*msac<u>_di): Rename to...
1177         (<u>msubsidi4): ...this.  Extend condition to include
1178         GENERATE_MADD_MSUB and TARGET_DSPR2.  Change the constraint
1179         of operand 0 to "ka" and use the three-operand form of msub<u>
1180         for TARGET_DSPR2.
1181         * config/mips/mips-dspr2.md (mips_msub, mips_msubu): Convert
1182         to define_expands.
1183
1184 2007-05-08  Kaz Kojima  <kkojima@gcc.gnu.org>
1185
1186         PR rtl-optimization/28011
1187         * reload.c (push_reload): Set dont_share if IN appears in OUT
1188         also when IN is a PLUS rtx.
1189         (reg_overlap_mentioned_for_reload_p): Return true if X and IN
1190         are same PLUS rtx.
1191
1192 2007-05-08  Kazu Hirata  <kazu@codesourcery.com>
1193
1194         * emit-rtl.c (unshare_all_rtl_1): Don't copy DECL_RTL.  Don't
1195         call unshare_all_decls.
1196         (unshare_all_rtl): Adjust the call to unshare_all_rtl_1.
1197         (unshare_all_decls): Remove.
1198
1199 2007-05-08  Simon Martin  <simartin@users.sourceforge.net>
1200
1201         PR 31847
1202         * tree-dump.c (dump_options): Don't use TDF_DIAGNOSTIC in "*-all" tree
1203         dumps.
1204
1205 2007-05-08  Sandra Loosemore  <sandra@codesourcery.com>
1206             Nigel Stephens  <nigel@mips.com>
1207
1208         * config/mips/mips.h (MAX_FPRS_PER_FMT): Renamed from FP_INC.
1209         Update comments and all uses.
1210         (MIN_FPRS_PER_FMT): Define.
1211         * config/mips/mips.c (function_arg): Fix to correctly handle
1212         the -mips32r2 -mfp64 -mabi=32 case.
1213         (override_options): Enable use of odd-numbered registers for
1214         SFmode values on MIPS32.
1215         (mips_save_reg_p): Save whole floating-point register pair if
1216         either half is used.
1217         (compute_frame_size): Fix comment.
1218
1219 2007-05-08  Jie Zhang  <jie.zhang@analog.com>
1220
1221         * config/bfin/bfin-protos.h (bfin_expand_epilogue): Add a third
1222         argument of type bool.
1223         * config/bfin/bfin.c (add_to_reg): Add epilogue_p as a fourth
1224         argument. Safely select temporary P register according to it.
1225         (do_link): Change call site of add_to_reg accordingly.
1226         (do_unlink): Add epilogue_p as a fourth argument and pass it
1227         to add_to_reg.
1228         (expand_interrupt_handler_epilogue): Change call of do_unlink
1229         accordingly.
1230         (bfin_expand_prologue): Add a third argument sibcall_p.
1231         * config/bfin/bfin.md (epilogue): Change call of
1232         bfin_expand_epilogue accordingly.
1233         (sibcall_epilogue): Likewise.
1234         (eh_return_internal): Likewise.
1235
1236         * config/bfin/bfin-protos.h (enum bfin_cpu): Add
1237         BFIN_CPU_BF534, BFIN_CPU_BF536 and BFIN_CPU_BF561.
1238         * config/bfin/bfin.c (bfin_handle_option): Handle
1239         -mcpu=bf534, -mcpu=bf536 and -mcpu=bf561.
1240         * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS):
1241         Support bf534, bf536 and bf561.
1242         * doc/invoke.texi (Blackfin Options): Document -mcpu and -msim.
1243
1244 2007-05-08  Uros Bizjak  <ubizjak@gmail.com>
1245
1246         PR target/31854
1247         * config/i386/i386.c (ix86_function_regparm): Process local
1248         functions only when TREE_CODE (decl) equals FUNCTION_DECL.
1249
1250 2007-05-07  Mike Stump  <mrs@apple.com>
1251
1252         * doc/invoke.texi (Warning Options): Document that -Wempty-body
1253         also checks for and while statements in C++.
1254
1255 2007-05-07  Nathan Froyd  <froydnj@codesourcery.com>
1256
1257         * gcc.c (at_file_supplied): New variable.
1258         (main): Set it if we expanded argv.
1259         (do_spec_1): Pass an @-file to the linker if we were called with
1260         an @-file argument and HAVE_GNU_LD.
1261         * collect2.c (at_file_supplied): New variable.
1262         (response_file): New variable.
1263         (collect_exit): Unlink response_file if necessary.
1264         (handler): Likewise.
1265         (do_wait): Likewise.
1266         (main): Set at_file_supplied if we expanded argv.
1267         (collect_execute): Pass an @-file to subprocesses if we were called
1268         with an @-file argument.
1269         * configure.ac: Add define for HAVE_GNU_LD.
1270         * configure: Regenerate.
1271         * config.in: Regenerate.
1272
1273 2007-05-07  Naveen.H.S  <naveen.hs@kpitcummins.com>
1274
1275         * config/m32c/muldiv.md (mulhisi3_c): Limit the mode of the 2nd
1276         operand to HI mode.
1277         (mulsi3): New.
1278         (divsi3): New.
1279         (udivsi3): New.
1280
1281 2007-05-07  Jayant Sonar  <jayants@kpitcummins.com>
1282
1283         * config/m32c/m32c.c (SYMBOL_FLAG_FUNCVEC_FUNCTION): Define.
1284         (TARGET_ENCODE_SECTION_INFO): Re-define.
1285         (m32c_encode_section_info): New
1286         (function_vector_handler): New
1287         (current_function_special_page_vector): New
1288         (m32c_special_page_vector_p): New.
1289         * config/m32c/m32c-protos.h (m32c_special_page_vector_p):
1290         Prototype.
1291         * config/m32c/jump.md: Added instruction JSRS for functions
1292         with attribute "function_vector".
1293         * doc/extend.texi (function_vector): Added description
1294         for M16C, M32C targets.
1295
1296 2007-05-07  DJ Delorie  <dj@redhat.com>
1297
1298         PR 31794
1299         * config/m32c/shift.md (ashlpsi3_i, ashrpsi3_i, ashlpsi3,
1300         ashrpsi3, lshrpsi3): Update shift count constraint.
1301
1302 2007-05-07  Danny Smith  <dannysmith@users.sourceforge.net>
1303             Nathan Froyd  <froydnj@codesourcery.com>
1304
1305         PR 22133
1306         * c-incpath.c (add_path): Strip trailing path separators.
1307
1308 2007-05-07  Eric Botcazou  <ebotcazou@adacore.com>
1309
1310         * tree-ssa-dom.c (tree_ssa_dominator_optimize): Reset cfg_altered.
1311         Free dominance info before purging EH edges.
1312         (eliminate_degenerate_phis): Likewise.
1313         (propagate_rhs_into_lhs): Set cfg_altered to true instead of 1.
1314
1315 2007-05-07  Jan Hubicka  <jh@suse.cz>
1316
1317         * gimplify.c (gimplify_expr): Do not crash when folding
1318         (void *)(int)&a + 4.
1319
1320 2007-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1321
1322         PR driver/31694
1323         * c-opts.c (lang_fortran): Make it non static.
1324         * c-common.h (lang_fortran): New prototype.
1325         * c-cppbuiltin.c (c_cpp_builtins): Create a __GFORTRAN__ if the
1326         -lang-fortran option was passed by the driver.
1327
1328 2007-05-06  Eric Botcazou  <ebotcazou@adacore.com>
1329
1330         * timevar.c (timevar_print): Test ENABLE_ASSERT_CHECKING instead
1331         of ASSERT_CHECKING.  Tweak message.
1332
1333 2007-05-06  Revital Eres  <eres@il.ibm.com>
1334
1335         PR 30957
1336         * loop-unroll.c (insert_var_expansion_initialization):
1337         Initialize the expansions with -zero instead of +zero.
1338
1339 2007-05-05  Aurelien Jarno  <aurelien@aurel32.net>
1340
1341         * config/pa/pa.md: Split tgd_load, tld_load and tie_load
1342         into pic and non-pic versions. Mark r19 as used for
1343         tgd_load_pic, tld_load_pic and tie_load_pic. Mark r27 as used
1344         for tgd_load, tld_load and tie_load .
1345         * config/pa/pa.c (legitimize_tls_address): Emit pic or non-pic
1346         version of tgd_load, tld_load and tie_load depending on the
1347         value of flag_pic.
1348
1349 2007-05-04  Ulrich Drepper  <drepper@redhat.com>
1350             Jakub Jelinek  <jakub@redhat.com>
1351
1352         * crtstuff.c (HIDDEN_DTOR_LIST_END): New macro.
1353         (__do_global_dtors_aux): Use more paranoid loop to run
1354         destructors if HIDDEN_DTOR_LIST_END.
1355         (__DTOR_END__): Export as a hidden symbol when HIDDEN_DTOR_LIST_END.
1356
1357 2007-05-04  Jakub Jelinek  <jakub@redhat.com>
1358
1359         * varasm.c (align_variable): Don't increase alignment for
1360         DECL_THREAD_LOCAL_P variables above BITS_PER_WORD through
1361         DATA_ALIGNMENT or CONSTANT_ALIGNMENT.
1362
1363 2007-05-04  Josh Conner  <jconner@apple.com>
1364
1365         * basic-block.h (cdi_direction): Assign values to all enumeration
1366         constants.
1367         (dom_computed): Remove.
1368         (dom_info_state): New.
1369         (set_dom_info_availability): New.
1370         * tree-ssa-loop-im.c (determine_invariantness): Initialize
1371         walk_data.dom_direction.
1372         * cfghooks.c (delete_basic_block): Use dom_info_available_p()
1373         instead of dom_computed[].
1374         (split_edge): Likewise.
1375         (create_basic_block): Likewise.
1376         (merge_blocks): Likewise.
1377         * ifcvt.c (find_if_header): Likewise.
1378         * tree-cfgcleanup.c (cleanup_tree_cfg): Likewise.
1379         * tree-ssa-dce.c (remove_dead_stmt): Likewise.
1380         * tree-ssa.c (verify_ssa): Likewise.
1381         * tree-cfg.c (tree_verify_flow_info): Likewise.
1382         (remove_edge_and_dominated_blocks): Likewise.
1383         * dominance.c (dom_computed): Make static.
1384         (calc_dfs_tree_nonrec): Change third param to a bool.
1385         (calc_dfs_tree): Change second param to a bool.
1386         (calc_idioms): Change second param to a bool.  Use
1387         dom_convert_dir_to_idx.
1388         (init_dom_info): Validate dir before using.
1389         (dom_convert_dir_to_idx): New.
1390         (calculate_dominance_info): Use dom_convert_dir_to_idx.  New
1391         variable 'reverse' used for calling calc_dfs_tree and calc_idoms.
1392         (free_dominance_info): Use dom_convert_dir_to_idx.
1393         (get_immediate_dominator): Likewise.
1394         (set_immediate_dominator): Likewise.
1395         (get_dominated_by): Likewise.
1396         (redirect_immediate_dominators): Likewise.
1397         (nearest_common_denominator): Likewise.
1398         (dominated_by_p): Likewise.
1399         (bb_dom_dfs_in): Likewise.
1400         (bb_dom_dfs_out): Likewise.
1401         (recount_dominator): Likewise.
1402         (iterate_fix_dominators): Likewise.
1403         (add_to_dominance_info): Likewise.
1404         (delete_from_dominance_info): Likewise.
1405         (first_dom_son): Likewise.
1406         (next_dom_son): Likewise.
1407         (dom_info_available_p): Likewise.
1408         (dom_info_state): New.
1409         (set_dom_info_availability): New.
1410
1411 2007-05-04  Andreas Krebbel  <krebbel1@de.ibm.com>
1412
1413         * config/s390/s390.md ("fix_trunc<mode>di2", "fix_trunc<mode>si2"):
1414         Expander removed.
1415         ("fix_trunc<DSF:mode><GPR:mode>2"): Expander added.
1416
1417 2007-05-04  Bob Wilson  <bob.wilson@acm.org>
1418
1419         * config/xtensa/xtensa.md (adddi3, adddi_carry): Delete.
1420         (subdi3, subdi_carry): Delete.
1421
1422 2007-05-04  Jan Hubicka  <jh@suse.cz>
1423             Richard Guenther  <rguenther@suse.de>
1424
1425         * opts.c (decode_options): Do not fiddle with inlining
1426         parameters in case of optimizing for size.
1427         * ipa-inline.c (cgraph_decide_recursive_inlining): When optimizing
1428         for size do nothing.
1429         (cgraph_decide_inlining_of_small_function): When optimizing for
1430         size never inline functions increasing caller size.
1431         (cgraph_early_inlining): Inline for size when optimizing for size.
1432
1433 2007-04-18  Bernd Schmidt  <bernd.schmidt@analog.com>
1434
1435         * config/bfin/bfin.md (<optab>di3): Now a define_expand which expands
1436         logical operations piecewise.
1437         (<optab>di_zesidi_di, <optab>di_sesidi_di, negdi2, one_cmpldi2,
1438         zero_extendsidi2, subdi_di_zesidi, subdi_zesidi_di, subdi_di_sesidi,
1439         subdi_sesidi_di): Delete.
1440         (add_with_carry): Produce carry in CC instead of a DREG to shorten
1441         the generated sequence.  Allow three-reg add in constraints.  Rewrite
1442         the rtl expression for carry to avoid zero_extend of a constant.
1443         (sub_with_carry): New pattern.
1444         (adddi3, subdi3): Change into define_expand.  For subtract, generate a
1445         different sequence not involving jumps.
1446         (notbi): Now a named pattern.
1447
1448 2007-05-04  Bradley Lucier  <lucier@math.purdue.edu>
1449
1450         * doc/invoke.texi (i386 and x86-64 Options) [-mpc32, -mpc64, -mpc80]:
1451         Add the note about a significant loss of accuracy of some
1452         mathematical routines when these options are used.
1453
1454 2007-05-04  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>
1455
1456         * haifa-sched.c (rtx_vec_t): New typedef.
1457         (contributes_to_priority_p): Extract piece of priority () into new
1458         static function.
1459         (priority): Use the function.  Add assertion.
1460         (rank_for_schedule, set_priorities): Add assertion to check that
1461         insn's priority is initialized.
1462         (clear_priorities, calc_priorities): Change signature.  Make it update
1463         all relevant insns.  Update all callers ('add_to_speculative_block ()'
1464         and 'create_block_check_twin ()').
1465         * sched-int.h (struct haifa_insn_data): Remove field 'priority_known'.
1466         Add new field 'priority_status'.
1467         (INSN_PRIORITY_STATUS): New macro.
1468         (INSN_PRIORITY_KNOWN): Change to use INSN_PRIORITY_STATUS.
1469
1470 2007-05-04  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>
1471
1472         * sched-ebb.c (debug_ebb_dependencies): New static function.
1473         (init_ready_list): Use it.
1474
1475         * sched-rgn.c (debug_dependencies): Split into 'debug_dependencies ()'
1476         with changed signature and 'debug_rgn_dependencies ()'.
1477         (debug_rgn_dependencies): New static function.
1478         (init_ready_list): Use it.
1479
1480         * sched-int.h (debug_dependencies): Declare.
1481
1482 2007-05-04  Andreas Krebbel  <krebbel1@de.ibm.com>
1483
1484         * libgcc-std.ver (__ffssi2): Added to GCC_4.3.0 section.
1485
1486 2007-05-04  Dirk Mueller  <dmueller@suse.de>
1487
1488         * c.opt(Wmain,ffreestanding): Enable for C++,ObjC++.
1489
1490 2007-05-03  Jan Hubicka  <jh@suse.cz>
1491
1492         * fold-const.c (fold_unary): Convert (T1)(X op Y) into ((T1)X op (T1)Y),
1493         for pointer type in more cases than before.
1494
1495         * gimplify.c (gimplify_expr): Fold (void *)&a + 4.
1496
1497         * tree-object-size.c (plus_expr_object_size): When operand size is
1498         unknown, return unknown.
1499
1500 2007-05-03  Dirk Mueller  <dmueller@suse.de>
1501
1502         * doc/invoke.texi (-m386,-m486,-mpentium,-mpentiumpro): Remove.
1503
1504         * config/i386/i386.h (CC1_CPU_SPEC): Remove handling for deprecated
1505         options.
1506
1507         * config/i386/i386.opt (m386,m486,mpentium,mpentiumpro): Remove.
1508
1509 2007-05-03  Janis Johnson  <janis187@us.ibm.com>
1510
1511         * doc/sourcebuild.texi (Test Directives) Clarify dg-excess-errors.
1512
1513 2007-05-03  Joseph Myers  <joseph@codesourcery.com>
1514
1515         * config/soft-fp/double.h, config/soft-fp/extended.h,
1516         config/soft-fp/floatundidf.c, config/soft-fp/floatundisf.c,
1517         config/soft-fp/floatunsidf.c, config/soft-fp/floatunsisf.c,
1518         config/soft-fp/op-2.h, config/soft-fp/op-4.h,
1519         config/soft-fp/op-common.h, config/soft-fp/quad.h: Update from
1520         glibc CVS.
1521
1522 2007-05-03  Ian Lance Taylor  <iant@google.com>
1523
1524         * config/rs6000/rs6000.c (rs6000_override_options): Don't set
1525         MASK_PPC_GFXOPT for 8540 or 8548.
1526
1527 2007-05-03  Uros Bizjak  <ubizjak@gmail.com>
1528
1529         * tree-vect-transform.c (vect_update_inits_of_drs): Use
1530         vect_print_dump_info() to output debug information.
1531
1532 2007-05-03  Uros Bizjak  <ubizjak@gmail.com>
1533
1534         PR target/31768
1535         * config/i386/i386.c (print_operand) ['z']: Output 'w' for
1536         operands of size 2 when operand is not MEM_P.
1537
1538 2007-05-03  Zdenek Dvorak  <dvorakz@suse.cz>
1539
1540         PR tree-optimization/30565
1541         * lambda-code.c (perfect_nestify): Fix updating of dominators.
1542
1543 2007-05-03  Bernd Schmidt  <bernd.schmidt@analog.com>
1544
1545         * config/bfin/bfin.md (addpdi3, us_truncpdisi2): New patterns.
1546         (umulsi3_highpart): Use them.
1547         * config/bfin/lib1funcs.asm (__umulsi3_highpart): Use unsigned move
1548         for final accumulator to D regisster tranfser.
1549
1550 2007-05-03  Dorit Nuzman  <dorit@il.ibm.com>
1551
1552         PR tree-optimization/31699
1553         * tree-vect-analyze.c (vect_update_misalignment_for_peel): Remove wrong
1554         code.
1555         (vect_enhance_data_refs_alignment): Compute peel amount using
1556         TYPE_VECTOR_SUBPARTS instead of vf.
1557         * tree-vect-transform.c (vect_gen_niters_for_prolog_loop): Likewise.
1558
1559 2007-05-02  Brooks Moses  <brooks.moses@codesourcery.com>
1560
1561         PR bootstrap/31776
1562         * system.h: Remove inclusion of double-int.h
1563         * tree.h: Include double-int.h
1564         * gengtype.c: Likewise
1565         * cfgloop.h: Likewise
1566         * Makefile.in: Adjust dependencies on double-int.h
1567
1568 2007-05-02  Eric Christopher  <echristo@apple.com>
1569
1570         * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Translate
1571         -shared to -Zdynamiclib.
1572
1573 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
1574
1575         PR c++/31663
1576         * c-common.c (strip_pointer_or_array_types): New function.
1577         * c-common.h (strip_pointer_or_array_types): New function declaration.
1578
1579 2007-05-03  Zdenek Dvorak  <dvorakz@suse.cz>
1580
1581         PR tree-optimization/31771
1582         * tree-cfg.c (move_block_to_fn): Assign bb to the correct index.
1583
1584 2007-05-02  Paul Brook  <paul@codesourcery.com>
1585
1586         * config/arm/bpabi.S (aeabi_lcmp): Fix result on overflow.
1587
1588 2007-05-02  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1589
1590         PR middle-end/29715
1591         * fold-const.c (fold_comparision): Remove the "foo++ == CONST"
1592         transformation.
1593
1594 2007-05-02  Nick Clifton  <nickc@redhat.com>
1595
1596         * config/frv/predicates.md (symbolic_operand): Accept CONSTs.
1597
1598 2007-05-02  Richard Guenther  <rguenther@suse.de>
1599
1600         PR tree-optimization/31146
1601         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): New
1602         argument, single_use_p.  If we have a single use that is
1603         a conversion to the definition rhs type, propagate that rhs.
1604         (forward_propagate_addr_expr): Pass single_use_p argument
1605         to forward_propagate_addr_expr_1.
1606
1607 2007-05-01  H.J. Lu  <hongjiu.lu@intel.com>
1608
1609         * config/i386/i386.c (ix86_expand_sse_comi): Remove unused
1610         variable.
1611
1612 2007-05-01  Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
1613
1614         * doc/invoke.texi: Fix typo, 'AMD Family 10h core' instead of
1615         'AMD Family 10 core'.
1616
1617 2007-05-01  Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
1618
1619         * config/i386/i386.c (override_options): Accept k8-sse3, opteron-sse3
1620         and athlon64-sse3 as improved versions of k8, opteron and athlon64
1621         with SSE3 instruction set support.
1622         * doc/invoke.texi: Likewise.
1623
1624 2007-05-01  Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
1625
1626         * config/i386/i386.c (override_options): Tuning 32-byte loop
1627         alignment for amdfam10 architecture. Increasing the max loop
1628         alignment to 24 bytes.
1629
1630 2007-05-01  Kazu Hirata  <kazu@codesourcery.com>
1631
1632         * config/m68k/constraints.md: New.
1633         * config/m68k/m68k.h (REG_CLASS_FROM_LETTER,
1634         CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P,
1635         EXTRA_CONSTRAINT): Remove.
1636         * config/m68k/m68k.md: Include constraints.md.
1637         * expr.c (expand_expr_real_1): Copy DECL_RTL before using it.
1638
1639 2007-05-01  Ian Lance Taylor  <iant@google.com>
1640
1641         PR tree-optimization/31739
1642         * tree-vrp.c (vrp_val_is_max): New static function.
1643         (vrp_val_is_min): New static function.
1644         (set_value_range_to_value): Use TYPE_{MAX,MIN}_VALUE rather than
1645         copying the node.
1646         (set_value_range): Use vrp_val_is_{max,min}.
1647         (extract_range_from_assert): Likewise.
1648         (extract_range_from_binary_expr): Likewise.
1649         (extract_range_from_unary_expr): Likewise.
1650         (dump_value_range, vrp_meet): Likewise.
1651         (vrp_visit_phi_node): Likewise.
1652         * tree.c (build_distinct_type_copy): Revert change of 2007-04-27.
1653
1654 2007-05-01  Mark Mitchell  <mark@codesourcery.com>
1655
1656         * config/i386/gmon-sol2.c (size_t): New type.
1657         (intptr_t): Likewise.
1658         (s_textsize): Declare as size_t.
1659         (sbrk): Declare.
1660         (monstartup): Use size_t for sizes.
1661         (_mcount): Save and restore registers.
1662         (internal_mcount): Pass 0 as the first argument to monstartup
1663         in 64-bit mode.
1664         (moncontrol): Convert pointer to appropriately sized integer
1665         before passing to profil.
1666
1667 2007-05-01  Joseph Myers  <joseph@codesourcery.com>
1668
1669         * config/rs6000/darwin-ldouble.c (__gcc_qunord): Define if
1670         __NO_FPRS__, not just if _SOFT_DOUBLE.
1671         * config/rs6000/libgcc-ppc-glibc.ver (__gcc_qunord): Likewise.
1672         * config/rs6000/rs6000.c (rs6000_init_libfuncs): Use __gcc_qunord
1673         also for E500 double.
1674         * config/rs6000/rs6000.md (buneq, bunge, bungt, bunle, bunlt,
1675         suneq, sunge, sungt, sunle, sunlt): Disable for (TARGET_HARD_FLOAT
1676         && !TARGET_FPRS).
1677
1678 2007-05-01  Richard Guenther  <rguenther@suse.de>
1679
1680         * tree-ssa-loop-manip.c (ip_normal_pos): Check if last stmt
1681         is NULL.
1682
1683 2007-05-01  Joseph Myers  <joseph@codesourcery.com>
1684
1685         * config/rs6000/libgcc-ppc-glibc.ver (__gcc_qgt): Fix typo.
1686
1687 2007-05-01  Jan Hubicka  <jh@suse.cz>
1688
1689         * tree-vectorize.c (vect_is_simple_use): gimple_min_invariant is
1690         invariant.
1691
1692 2007-05-01  Jan Hubicka  <jh@suse.cz>
1693
1694         * tree.h (maybe_fold_offset_to_component_ref): Remove.
1695         (maybe_fold_offset_to_reference): Declare.
1696         * fold-const.c (fold_unary): Do not fold
1697         (type *)&A into &A->field_of_type_and_offset_0
1698         * tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): When base type
1699         size is unknown, give up.
1700         (maybe_fold_offset_to_component_ref): Ignore firelds with unknown
1701         offsets.
1702         (maybe_fold_offset_to_reference): New.
1703         (maybe_fold_stmt_indirect): Use it.
1704         (fold_stmt_r): Fold (type *)&A+offset into A->field_if_type_and_offset.
1705         * gimplify.c (gimplify_conversion): Canonicalize conversions to
1706         field references.
1707         (gimplify_expr): Likewise for plus_expr.
1708
1709 2007-05-01  Zdenek Dvorak  <dvorakz@suse.cz>
1710
1711         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Use
1712         bsi_after_labels.  Always insert statements before bsi.
1713         * tree-vect-transform.c (vect_create_epilog_for_reduction): Ditto.
1714         * predict.c (apply_return_prediction): Check for empty blocks.
1715         * cfgexpand.c (lab_rtx_for_bb): New variable.
1716         (label_rtx_for_bb): Do not create new tree labels.
1717         (expand_gimple_basic_block): Add labels recorded in lab_rtx_for_bb.
1718         (tree_expand_cfg): Initialize lab_rtx_for_bb.
1719         * tree-cfg.c (build_tree_cfg): Call cleanup_dead_labels after
1720         creating edges.
1721         (label_for_bb): Add field used.
1722         (update_eh_label, main_block_label): Mark the label used.
1723         (cleanup_dead_labels): Remove unused labels.
1724
1725 2007-05-01  Richard Guenther  <rguenther@suse.de>
1726
1727         * tree-vrp.c (set_value_range): Do not allocate equiv bitmap
1728         if it is not about to be set.
1729         (get_value_range): Do not pre-allocate equiv bitmap.
1730         (update_value_range): No need to clear equiv field.
1731         (add_equivalence): Change prototype to get bitmap pointer.
1732         Allocate bitmap here if it is not already.
1733         (extract_range_from_assert): Do not allocate bitmap here.
1734         Update callers to add_equivalence.
1735         (extract_range_from_ssa_name): Likewise.
1736         (get_vr_for_comparison): New static helper.
1737         (compare_name_with_value): Handle NULL equiv bitmap by
1738         peeling the first iteration of the comparison loop.
1739         Use get_vr_for_comparison.
1740         (compare_names): Handle NULL equiv bitmaps by using fake
1741         ones.  Use get_vr_for_comparison.
1742
1743 2007-04-30  Brooks Moses  <brooks.moses@codesourcery.com>
1744
1745         * double-int.c (mpz_set_double_int): Moved from
1746         tree-ssa-loop-niter.c.
1747         (mpz_get_double_int): Likewise; also, add option to wrap
1748         out-of-range integers.
1749         * double-int.h: New prototypes for above.
1750         * tree.c (get_static_type_bounds): Moved from
1751         tree-ssa-loop-niter.c; now returns TYPE_MIN_VALUE and
1752         TYPE_MAX_VALUE if they exist..
1753         * tree.h: New prototype for above.
1754         * tree-ssa-loop-niter.c: Adjust mpz_to_double_int and
1755         get_type_bounds calls.
1756         (mpz_set_double_int): Move to double-int.c.
1757         (get_type_bounds): Move to tree.c, rename to
1758         get_static_type_bounds.
1759         (mpz_to_double_int): Move to double-int.c, rename to
1760         mpz_get_double_int.
1761
1762 2007-04-30  Bob Wilson  <bob.wilson@acm.org>
1763
1764         * config/xtensa/lib1funcs.asm (__umodsi3, __modsi3): Rearrange so that
1765         DIV0 exception can fall through to a normal return.
1766
1767 2007-04-30  Alexandre Oliva  <aoliva@redhat.com>
1768
1769         PR middle-end/22156
1770         Temporarily revert:
1771         2007-04-06  Andreas Tobler  <a.tobler@schweiz.org>
1772         * tree-sra.c (sra_build_elt_assignment): Initialize min/maxshift.
1773         2007-04-05  Alexandre Oliva  <aoliva@redhat.com>
1774         * tree-sra.c (try_instantiate_multiple_fields): Needlessly
1775         initialize align to silence bogus warning.
1776         2007-04-05  Alexandre Oliva  <aoliva@redhat.com>
1777         * tree-sra.c (struct sra_elt): Add in_bitfld_block.  Remove
1778         all_no_warning.
1779         (struct sra_walk_fns): Remove use_all parameter from use.
1780         (sra_hash_tree): Handle BIT_FIELD_REFs.
1781         (sra_elt_hash): Don't hash bitfld blocks.
1782         (sra_elt_eq): Skip them in parent compares as well.  Handle
1783         BIT_FIELD_REFs.
1784         (sra_walk_expr): Don't maintain or pass down use_all_p.
1785         (scan_use): Remove use_all parameter.
1786         (scalarize_use): Likewise.  Re-expand assignment to
1787         BIT_FIELD_REF of gimple_reg.  De-scalarize before input or
1788         output, and re-scalarize after output.  Don't mark anything
1789         for no warning.
1790         (scalarize_ldst): Adjust.
1791         (scalarize_walk_gimple_modify_statement): Likewise.
1792         (build_element_name_1): Handle BIT_FIELD_REFs.
1793         (instantiate_element): Don't warn for any element whose parent
1794         is used as a whole.
1795         (instantiate_missing_elements_1): Return the sra_elt.
1796         (canon_type_for_field): New.
1797         (try_instantiate_multiple_fields): New.
1798         (instantiate_missing_elemnts): Use them.
1799         (mark_no_warning): Removed.
1800         (generate_one_element_ref): Handle BIT_FIELD_REFs.
1801         (REPLDUP, sra_build_elt_assignment): New.
1802         (generate_copy_inout): Use them.
1803         (generate_element_copy): Likewise.  Handle bitfld differences.
1804         (generate_element_zero): Don't recurse for blocks.  Use
1805         sra_build_elt_assignment.
1806         (generate_one_element_int): Take elt instead of var.  Use
1807         sra_build_elt_assignment.
1808         (generate_element_init_1): Adjust.
1809         (scalarize_use, scalarize_copy): Use REPLDUP.
1810         (scalarize_ldst): Move assert before dereference.
1811         (dump_sra_elt_name): Handle BIT_FIELD_REFs.
1812
1813 2007-04-30  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1814
1815         PR C++/31721
1816         * tree.c (reconstruct_complex_type): Reconstruct a reference
1817         correctly.
1818         Also use the same mode for the pointer as the old pointer type.
1819
1820 2007-04-30  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1821
1822         * doc/trouble.texi (Interoperation): Remove note about Ultrix
1823         Fortran compiler.
1824
1825 2007-04-29  Zdenek Dvorak  <dvorakz@suse.cz>
1826
1827         PR rtl-optimization/31676
1828         * df-scan.c (record_nonlocal_goto_receiver_defs): New function.
1829         (df_refs_record): Call it.
1830
1831 2007-04-29  Bernd Schmidt  <bernd.schmidt@analog.com>
1832
1833         * rtl.def (SS_ABS): New code.
1834         * config/bfin/bfin.c (print_operand): New modifier 'v'.
1835         (enum bfin_builtins): Add BFIN_BUILTIN_SUM_2X16, BFIN_BUILTIN_ABS_1x32,
1836         BFIN_BUILTIN_ROUND_1x32, BFIN_BUILTIN_MULT_1x32x32,
1837         BFIN_BUILTIN_MULT_1x32x32NS, BFIN_BUILTIN_SSASHIFT_1x32.
1838         (bfin_init_builtins): Define them.
1839         (bdesc_1arg, bdesc_2arg): Add some of them here, ...
1840         (bfin_expand_builtin): ... and handle the others here.
1841         * config/bfin/bfin.md (ssabssi2, ssroundsi2, ssashiftsi3,
1842         flag_mul_macv2hi_parts_acconly_andcc0): New patterns.
1843         (ss_absv2hi2): Renamed from absv2hi; use ss_abs code.
1844         (ssashiftv2hi3, ssashifthi3, lshiftv2hi3, lshifthi3): Shift count
1845         operand is only HImode.
1846
1847 2007-04-29  Steven Bosscher  <steven@gcc.gnu.org>
1848
1849         * regclass.c (scan_one_insn): Remove splitting of
1850         two address insns.
1851
1852 2007-04-28  Sandra Loosemore  <sandra@codesourcery.com>
1853             Nigel Stephens  <nigel@mips.com>
1854
1855         * config/mips/mips.h (SLOW_BYTE_ACCESS): Turn off for MIPS16.
1856
1857 2007-04-28  Jan Hubicka  <jh@suse.cz>
1858
1859         * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Use
1860         insn_locators_alloc instead of insn_locators_initialize;
1861         call reset_block_changes.
1862         * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
1863         * config/sh/sh.c (sparc_output_mi_thunk): Likewise.
1864         * config/is64/ia64.c (ia64_output_mi_thunk): Likewise.
1865         * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
1866         * config/score/score.c (th_output_mi_thunk): Likewise.
1867         * config/mips/mips.c (mips_output_mi_thunk): Likewise.
1868         * cfglyaout.c (set_curr_insn_source_location, set_curr_insn_block):
1869         tolerate uninitialized locator info.
1870
1871         Re-apply:
1872         * function.c (init_function_start): Don't init line number info.
1873         (expand_function_end): Update.
1874         (reset_block_changes, record_block_change, finalize_block_changes,
1875         check_block_change, free_block_changes): Kill.
1876         * function.h (reset_block_changes, record_block_change,
1877         finalize_block_changes, check_block_change, free_block_changes): Remove
1878         prototypes.
1879         (struct function): Remove ib_boundaries_block.
1880         * emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw):
1881         Use curr_insn_locator to initialize locator.
1882         (emit_line_note): Remove.
1883         * cfgexpand.c (expand_gimple_cond_expr): Update.
1884         (construct_exit_block): Likewise.
1885         (tree_expand_cfg): Initialize/finalize locators.
1886         * expr.c (expand_expr_real): Update.
1887         * cfglayout.c (line_locators_locs, line_locators_lines,
1888         file_locators_locs, file_locators_files): Remove.
1889         (set_block_levels): Move to cfgexpand.c.
1890         (insn_locators_initialize): Remove.
1891         (pass_insn_locators_initialize): Remove.
1892         (locations_locators_locs, locations_locators_vals): New static vars.
1893         (curr_location, last_location, curr_block, last_block, curr_rtl_loc):
1894         Likewise.
1895         (insn_locators_alloc, insn_locators_finalize,
1896         set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
1897         New functions.
1898         (locator_location): New.
1899         (locator_line, locator_file): Rewrite.
1900         * rtl.h (emit_line_note): Kill.
1901         (insn_locators_alloc, insn_locators_finalize,
1902         set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
1903         Declare.
1904         * tree-inline.c (initialize_cfun): Do not initialize
1905         ib_boundaries_block.
1906         * passes.c (pass_insn_locators_initialize): Remove.
1907
1908 2007-04-28  Zdenek Dvorak  <dvorakz@suse.cz>
1909
1910         * tree-cfg.c (move_block_to_fn): Release bb from dominance
1911         info.  Update last_basic_block correctly.
1912
1913 2007-04-27  Kaz Kojima  <kkojima@gcc.gnu.org>
1914
1915         PR target/31701
1916         * config/sh/sh.c (output_stack_adjust): Avoid using the frame
1917         register itself to hold the offset constant.  Tell flow the use
1918         of r4 and r5 when they are used.
1919
1920 2007-04-27  Richard Guenther  <rguenther@suse.de>
1921
1922         * tree-ssa-forwprop.c (forward_propagate_into_cond): Keep track
1923         if we simplified anything.
1924         (tree_ssa_forward_propagate_single_use_vars): Defer overflow
1925         warnings until we did a simplification and the stmt was not
1926         marked as TREE_NO_WARNING.
1927
1928 2007-04-27  Mike Stump  <mrs@apple.com>
1929
1930         * config/rs6000/darwin.h (ALWAYS_PUSH_CONSTS_USING_REGS_P): Remove.
1931
1932 2007-04-27  Ian Lance Taylor  <iant@google.com>
1933
1934         PR middle-end/31710
1935         * tree.c (build_distinct_type_copy): If TYPE_MIN_VALUE or
1936         TYPE_MAX_VALUE exist, convert them to the new type.
1937
1938 2007-04-27  Zdenek Dvorak  <dvorakz@suse.cz>
1939
1940         * tree-cfgcleanup.c (cleanup_tree_cfg): Verify dominance info
1941         if it claims to be available.
1942         * tree-ssa-dce.c (remove_dead_stmt): Mark cfg as altered when
1943         edge is redirected.
1944         (perform_tree_ssa_dce): Always free postdominators.
1945
1946 2007-04-27  Richard Henderson  <rth@redhat.com>
1947
1948         * config/alpha/predicates.md (aligned_memory_operand): Mark
1949         as define_special_predicate.
1950         (unaligned_memory_operand, normal_memory_operand): Likewise.
1951         (reg_or_unaligned_mem_operand): Remove.
1952         (any_memory_operand): Match the documentation and check for
1953         non-renumbered pseudos during reload.
1954         * config/alpha/alpha.c (alpha_secondary_reload): Rename from
1955         alpha_secondary_reload_class, update to new interface, make static.
1956         Handle CQImode like HImode.  Remove FP subreg check.
1957         (alpha_expand_mov): Use replace_equiv_address.
1958         (alpha_expand_mov_nobwx): Use any_memory_operand.
1959         (TARGET_SECONDARY_RELOAD): New.
1960         * config/alpha/alpha.h (SECONDARY_INPUT_RELOAD_CLASS): Remove.
1961         (SECONDARY_OUTPUT_RELOAD_CLASS): Remove.
1962         * config/alpha/sync.md (I12MODE, I48MODE, modesuffix): Move ...
1963         * config/alpha/alpha.md: ... here.
1964         (RELOAD12, reloadmode): New.
1965         (movcqi): New.
1966         (reload_in<RELOAD12>): Macro-ize from reload_inqi, reload_inhi.
1967         Don't handle the aligned case here.
1968         (reload_out<RELOAD12>): Macro-ize from reload_outqi, reload_outhi.
1969         (reload_in<I12MODE>_aligned): Macro-ize from reload_inqi_help,
1970         reload_inhi_help.  Don't expect a scratch register.
1971         (reload_out<I12MODE>_aligned): Macro-ize from reload_outqi_help,
1972         reload_outhi_help.
1973         * config/alpha/alpha-protos.h (alpha_secondary_reload_class): Remove.
1974
1975 2007-04-27  Richard Guenther  <rguenther@suse.de>
1976
1977         * tree-ssa-forwprop.c (get_prop_dest_stmt): Fix comment typo.
1978
1979 2007-04-27  Richard Guenther  <rguenther@suse.de>
1980
1981         PR tree-optimization/30965
1982         PR tree-optimization/30978
1983         * Makefile.in (tree-ssa-forwprop.o): Depend on $(FLAGS_H).
1984         * tree-ssa-forwprop.c (forward_propagate_into_cond_1): Remove.
1985         (find_equivalent_equality_comparison): Likewise.
1986         (simplify_cond): Likewise.
1987         (get_prop_source_stmt): New helper.
1988         (get_prop_dest_stmt): Likewise.
1989         (can_propagate_from): Likewise.
1990         (remove_prop_source_from_use): Likewise.
1991         (combine_cond_expr_cond): Likewise.
1992         (forward_propagate_comparison): New function.
1993         (forward_propagate_into_cond): Rewrite to use fold for
1994         tree combining.
1995         (tree_ssa_forward_propagate_single_use_vars): Call
1996         forward_propagate_comparison to propagate comparisons.
1997
1998 2007-04-27  Richard Guenther  <rguenther@suse.de>
1999
2000         PR tree-optimization/31715
2001         * tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Make
2002         sure to do computation on the offset in an appropriate
2003         signed type.
2004
2005 2007-04-27  Richard Sandiford  <richard@codesourcery.com>
2006
2007         * reload.h (elimination_target_reg_p): Declare.
2008         * reload.c (find_reloads): Don't apply the reg_rtx move
2009         optimization if the SET_DEST satisfies elimination_target_reg_p.
2010         * reload1.c (elimination_target_reg_p): New function.
2011         (gen_reload): In the move/add2 fallback, make sure that op0
2012         does not overlap the destination register.
2013
2014 2007-04-27  Zdenek Dvorak  <dvorakz@suse.cz>
2015
2016         * tree-ssa-loop-im.c (determine_invariantness_stmt): Attempt to
2017         transform only GIMPLE_MODIFY_STMTs.
2018         * tree-complex.c (expand_complex_operations_1): Ditto.
2019         (expand_complex_div_wide): Do not create gotos in COND_EXPR branches.
2020         * tree-ssa-loop-manip.c (build_if_stmt): Removed.
2021         (tree_transform_and_unroll_loop): Do not create gotos in COND_EXPR
2022         branches.
2023         * value-prof.c (tree_divmod_fixed_value, tree_mod_pow2,
2024         tree_mod_subtract, tree_ic, tree_stringop_fixed_value): Ditto.
2025         * omp-low.c (expand_parallel_call, expand_omp_for_generic,
2026         expand_omp_for_static_chunk, expand_omp_for_static_nochunk): Ditto.
2027         * tree-vectorizer.c (slpeel_make_loop_iterate_ntimes,
2028         slpeel_add_loop_guard): Ditto.
2029         * tree-mudflap.c (mf_build_check_statement_for): Ditto.
2030         * lambda-code.c (perfect_nestify): Ditto.
2031         * tree-iterator.c (tsi_split_statement_list_before): Fix splitting
2032         before the first statement.
2033         * tree-optimize.c (execute_free_datastructures): Fix comments.
2034         (execute_free_cfg_annotations): Do not call disband_implicit_edges.
2035         * tree-flow.h (disband_implicit_edges): Declaration removed.
2036         * tree-cfg.c (make_cond_expr_edges): Remove gotos from COND_EXPR
2037         branches.
2038         (cleanup_dead_labels, tree_redirect_edge_and_branch): Handle COND_EXPRs
2039         without gotos.
2040         (disband_implicit_edges, has_label_p): Removed.
2041         (tree_verify_flow_info): Verify that COND_EXPR branches are empty.
2042         (tree_lv_add_condition_to_bb): Do not create gotos in COND_EXPR
2043         branches.
2044         * tree.c (build3_stat): Mark COND_EXPRs used as statements as having
2045         side effects.
2046         * tree-pretty-print.c (dump_implicit_edges): Dump implicit edges
2047         also for COND_EXPRs.
2048         * cfgexpand.c (label_rtx_for_bb): New function.
2049         (expand_gimple_cond_expr): Do not expect gotos in COND_EXPR branches.
2050         Use label_rtx_for_bb to find the labels.
2051         (expand_gimple_basic_block): Remove RETURN_EXPR at the end of the
2052         last block.  Detect fallthru edges.
2053
2054 2007-04-26  Ian Lance Taylor  <iant@google.com>
2055
2056         PR target/28675
2057         * reload.c (find_reloads_subreg_address): If the address was valid
2058         in the original mode but not in the new mode, reload the whole
2059         address.
2060
2061 2007-04-27  Zdenek Dvorak  <dvorakz@suse.cz>
2062
2063         * tree-cfgcleanup.c (cfgcleanup_altered_bbs): New global variable.
2064         (remove_fallthru_edge): Use remove_edge_and_dominated_blocks.
2065         (cleanup_control_expr_graph): Do not invalidate dominance info.
2066         Record altered blocks.
2067         (cleanup_control_flow, cleanup_forwarder_blocks): Removed.
2068         (cleanup_control_flow_bb, split_bbs_on_noreturn_calls,
2069         cleanup_tree_cfg_bb): New functions.
2070         (remove_forwarder_block): Do not maintain the worklist of blocks.
2071         Record altered blocks.
2072         (cleanup_tree_cfg_1): Iterate over cfgcleanup_altered_bbs,
2073         not over whole cfg.
2074         (cleanup_tree_cfg): Do not iterate cleanup_tree_cfg_1.  Only call
2075         delete_unreachable_blocks if dominators are not available.
2076         * tree-inline.c (optimize_inline_calls): Free dominance information
2077         earlier.
2078         * tree-flow.h (remove_edge_and_dominated_blocks,
2079         cfgcleanup_altered_bbs): Altered.
2080         * tree-cfg.c (replace_uses_by, tree_merge_blocks): Record altered
2081         blocks.
2082         (get_all_dominated_blocks, remove_edge_and_dominated_blocks): New
2083         functions.
2084         (tree_purge_dead_eh_edges): Use remove_edge_and_dominated_blocks,
2085         do not invalidate dominators.
2086
2087 2007-04-26  Anatoly Sokolov <aesok@post.ru>
2088
2089         * config/avr/avr.c (avr_mcu_types): Add support for ATmega8HVA and
2090         ATmega16HVA devices. Move AT90USB82 device to 'avr5' architecture.
2091         * config/avr/avr.h (LINK_SPEC, CRT_BINUTILS_SPECS): (Ditto.).
2092         * config/avr/t-avr (MULTILIB_MATCHES): (Ditto.).
2093
2094 2007-04-26  Steve Ellcey  <sje@cup.hp.com>
2095
2096         * config/ia64/ia64.md (ip_value):  Fix itanium_class attribute.
2097
2098 2007-04-26  Richard Guenther  <rguenther@suse.de>
2099
2100         PR tree-optimization/31703
2101         * tree-ssa-loop-im.c (rewrite_bittest): Make sure to use
2102         the right type for the target of the bittest.
2103
2104 2007-04-26  Richard Sandiford  <richard@codesourcery.com>
2105
2106         * config/i386/vx-common.h (RETURN_IN_MEMORY): Use
2107         ix86_sol10_return_in_memory.
2108
2109 2007-04-26  Richard Sandiford  <richard@codesourcery.com>
2110
2111         * config/i386/i386.c (ix86_sol10_return_in_memory): Remove unused
2112         variables.
2113
2114 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
2115
2116         PR c++/31598
2117         * tree-inline.c (copy_body_r): Don't touch TREE_TYPE of OMP_CLAUSE.
2118
2119         PR tree-optimization/30558
2120         * tree-eh.c (lower_eh_filter): If EH_FILTER_MUST_NOT_THROW
2121         clear this_state.prev_try.
2122
2123 2007-04-26  Richard Sandiford  <richard@codesourcery.com>
2124             Mark Mitchell  <mark@codesourcery.com>
2125
2126         * config/i386/i386-protos.h (ix86_sol10_return_in_memory): Declare.
2127         * config/i386/i386.c (ix86_sol10_return_in_memory): New function.
2128         * config/i386/sol2-10.h (RETURN_IN_MEMORY): Use it.
2129
2130 2007-04-26  Richard Sandiford  <richard@codesourcery.com>
2131
2132         PR driver/31107
2133         * doc/invoke.texi (%:print-asm-header): Document.
2134         * gcc.c (asm_options): Use %:print-asm-header() for --target-help
2135         and -ftarget-help.
2136         (static_spec_functions): Add print-asm-header.
2137         (main): Print a banner before the --target-help linker options.
2138         (print_asm_header_spec_function): New function.
2139
2140 2007-04-25  Kaz Kojima  <kkojima@gcc.gnu.org>
2141
2142         PR target/31403
2143         * config/sh/sh.md (movsi_ie): Fix length for TARGET_SH2A.
2144         (movsf_ie): Likewise.
2145
2146 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
2147
2148         * doc/extend.texi ([Type Traits]): Adjust per N2255.
2149
2150 2007-04-25  Bob Wilson  <bob.wilson@acm.org>
2151
2152         * config/xtensa/lib1funcs.asm (__udivsi3, __divsi3): Throw an exception
2153         for divide-by-zero.
2154         (__umodsi3, __modsi3): Likewise.
2155
2156 2007-04-25  Dirk Mueller  <dmueller@suse.de>
2157
2158         * c-typeck.c (build_compound_expr): Annotate warning()
2159         call with OPT_Wunused_value.
2160         * tree-ssa.c (warn_uninit): Annotate warning with
2161         OPT_Wunintialized.
2162         * c-common.c (handle_sentinel_attribute): Annotate warning
2163         call with OPT_Wattributes.
2164
2165 2007-04-25  Thiemo Seufer  <ths@mips.com>
2166
2167         * config/mips/mips.opt (mdmx, mmt, mno-mdmx): New options.
2168         (mips16): Fix typo.
2169         * config/mips/mips.h (ASM_SPEC): Pass -mmt/-mno-mt and -mdmx/-mno-mdmx
2170         on to the assembler.  Improve handling of -mno-mips16.  Add handling
2171         of -mno-mips3d, -mno-dsp, -mno-dspr2.
2172         * doc/invoke.texi (MIPS Options): Whitespace cleanup.  Fix wrong use
2173         of @itemx.  Document -mno-dsp, -mno-dspr2, -mno-paired-single, -mdmx,
2174         -mno-mdmx, -mno-mips3d, -mmt and -mno-mt.
2175
2176 2007-04-25  Danny Smith  <dannysmith.users.sourceforge.net>
2177
2178         PR target/31680
2179         * config/i386/winnt.c (i386_pe_file_end): Strip only
2180         USER_LABEL_PREFIX when writing export name.
2181
2182 2007-04-25  Richard Sandiford  <richard@codesourcery.com>
2183
2184         * config.gcc (sh-wrs-vxworks): Don't include dbxelf.h.  Include
2185         sh/elf.h, vx-common.h and vxworks.h.
2186         * config/sh/sh.h: Include config/vxworks-dummy.h.
2187         (SUBTARGET_OVERRIDE_OPTIONS): Define.
2188         (OVERRIDE_OPTIONS): Use it.
2189         * config/sh/sh.md (GOTaddr2picreg): Add suport for VxWorks RTPs.
2190         (vxworks_picreg): New pattern.
2191         * config/sh/vxworks.h (TARGET_OS_CPP_BUILTINS): Use
2192         VXWORKS_OS_CPP_BUILTINS.
2193         (LIB_SPEC, LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Redefine
2194         to their VXWORKS_* equivalents.
2195         (SUBTARGET_OVERRIDE_OPTIONS, SUBTARGET_CPP_SPEC): Define.
2196         (SUBTARGET_LINK_EMUL_SUFFIX, FUNCTION_PROFILER): Define.
2197         * config/sh/lib1funcs.asm (NO_FPSCR_VALUES): Define for VxWorks PIC.
2198         (set_fpscr, ic_invalidate): Add VxWorks PIC sequences.
2199         * config/sh/t-vxworks (MULTILIB_OPTIONS): Add m4a, -mrtp and
2200         -mrtp/-fPIC multilibs.
2201         (MULTILIB_EXCEPTIONS): Generalize globs accordingly.
2202         (MULTILIB_MATCHES, EXTRA_MULTILIB_PARTS): Define.
2203         (MULTILIB_OSDIRNAMES): Delete.
2204
2205 2007-04-25  Anatoly Sokolov <aesok@post.ru>
2206
2207         PR target/18989
2208         * config/avr/avr.h (ASM_OUTPUT_ALIGN): Redefine.
2209
2210 2007-04-24  Brooks Moses  <brooks.moses@codesourcery.com>
2211
2212         * real.c (mpfr_from_real): Handle Inf and NaN, and allow the
2213         rounding mode to be specified by the caller.
2214         (real_to_mpfr) Likewise.
2215         * real.h: Update mpfr_from_real, mpfr_to_real prototypes to
2216         include new arguments.
2217         * builtins.c: Update mpfr_from_real, mpfr_to_real calls.
2218
2219 2007-04-24  Ian Lance Taylor  <iant@google.com>
2220
2221         PR tree-optimization/31605
2222         * tree-vrp.c (set_value_range): Check that min and max are not
2223         both overflow infinities.
2224         (set_value_range_to_value): New static function.
2225         (extract_range_from_binary_expr): Call set_value_range_to_value.
2226         (extract_range_from_cond_expr): Likewise.
2227         (extract_range_from_expr): Likewise.
2228         (extract_range_from_unary_expr): Likewise.  Don't create a range
2229         which overflows on both sides.
2230         (vrp_meet): Check for a useless range.
2231         (vrp_visit_phi_node): If we see a constant which looks like an
2232         overflow infinity, turn off the TREE_OVERFLOW flag.
2233
2234 2007-04-24  Ian Lance Taylor  <iant@google.com>
2235
2236         * flow.c (elim_reg_cond): Handle a comparison of a subreg.
2237
2238 2007-04-24  Simon Martin  <simartin@users.sourceforge.net>
2239
2240         PR diagnostic/25923
2241         * tree-pass.h (TDF_DIAGNOSTIC): New dump control to specify that a
2242         diagnostic message is being built.
2243         * tree-pretty-print.c (dump_generic_node): Only write the
2244         formatted text into BUFFER's stream if we are not building a
2245         diagnostic message.
2246         * toplev.c (default_tree_printer): Pass TDF_DIAGNOSTIC to
2247         dump_generic_node.
2248         * Makefile.in (toplev.o): Depend on tree-pass.h.
2249
2250 2007-04-24  Ian Lance Taylor  <iant@google.com>
2251
2252         PR tree-optimization/31602
2253         * tree-ssa-loop-ch.c (copy_loop_headers): Set TREE_NO_WARNING for
2254         conditionals in the copied loop header.
2255         * tree-cfg.c (fold_cond_expr_cond): Don't issue undefined overflow
2256         warnings if TREE_NO_WARNING is set.
2257         * doc/invoke.texi (Warning Options): Clarify that
2258         -Wstrict-overflow does not warn about loops.
2259
2260 2007-04-24  Janis Johnson  <janis187@us.ibm.com>
2261
2262         * config/rs6000/rs6000.c (function_arg_advance): For 32-bit ELF ABI,
2263         expand on the comment about _Decimal128 arguments and check the
2264         integer result of the modulus operation; for 64-bit ELF ABI, ensure
2265         that _Decimal128 argument uses even/odd register pair.
2266         (function_arg): Ditto.
2267
2268 2007-04-24  Hui-May Chang <hm.chang@apple.com>
2269
2270         * reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER
2271         instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction.
2272
2273 2007-04-24  Richard Guenther  <rguenther@suse.de>
2274             Olga Golovanevsky  <olga@il.ibm.com>
2275
2276         * fold-const.c (multiple_of_p): Check for bottom
2277         to be zero.
2278
2279 2007-04-24  Richard Henderson  <rth@redhat.com>
2280
2281         * libgcc2.h (AVOID_FP_TYPE_CONVERSION): Rename from
2282         IS_IBM_EXTENDED.  Also define in terms of WIDEST_HARDWARE_FP_SIZE.
2283         * libgcc2.c (__floatdisf): Avoid double-word arithmetic when
2284         looking for non-zero bits shifted out.  Avoid a recursive call
2285         when constructing the scalar.
2286         (__floatundisf): Likewise.
2287
2288 2007-04-24  Nathan Froyd  <froydnj@codesourcery.com>
2289
2290         * dwarf2out.c (field_byte_offset): Move the existing logic
2291         under the control of PCC_BITFIELD_TYPE_MATTERS and just use
2292         the bit offset of the field if !PCC_BITFIELD_TYPE_MATTERS.
2293
2294 2007-04-24  Andreas Krebbel  <krebbel1@de.ibm.com>
2295
2296         PR target/31641
2297         * config/s390/s390.c (s390_expand_setmem): Don't ICE for constant length
2298         argument of 0 for memset.
2299         (s390_expand_movmem, s390_expand_setmem, s390_expand_cmpmem): Use
2300         unsigned shift instead of the signed variant.
2301
2302 2007-04-24  Andreas Krebbel  <krebbel1@de.ibm.com>
2303
2304         * config/s390/s390.md ("*cmp<mode>_ccs_0_ibm", "*cmp<mode>_ccs_ibm",
2305         "fix_trunc<BFP:mode><GPR:mode>2_ieee", "fix_truncdfsi2_ibm",
2306         "floatsidf2_ibm", "floatsisf2", "truncdfsf2_ieee", "truncdfsf2_ibm",
2307         "*trunctfdf2_ieee", "*trunctfdf2_ibm", "*trunctfsf2_ieee",
2308         "*trunctfsf2_ibm", "extendsfdf2_ieee", "extendsfdf2_ibm",
2309         "*extenddftf2_ieee", "*extenddftf2_ibm", "*extendsftf2_ieee",
2310         "*extendsftf2_ibm", "*add<mode>3", "*add<mode>3_ibm", "*sub<mode>3_ibm",
2311         "*mul<mode>3", "*mul<mode>3_ibm", "*div<mode>3", "*div<mode>3_ibm",
2312         "*neg<mode>2_ibm", "*abs<mode>2_ibm"): Insn definitions removed.
2313         ("fix_trunc<BFP:mode><GPR:mode>2_bfp", "floatsi<mode>2",
2314         "truncdfsf2", "trunctf<mode>2", "add<mode>3", "sub<mode>3",
2315         "mul<mode>3", "div<mode>3"): Insn definitions added.
2316         ("fixuns_trunc<BFP:mode><GPR:mode>2", "fix_trunc<mode>di2",
2317         "fix_trunc<mode>si2"): gen_fix_trunc<BFP:mode><GPR:mode>2_ieee renamed
2318         to gen_fix_trunc<BFP:mode><GPR:mode>2_bfp.
2319         ("fix_truncdfsi2", "floatsitf2", "truncdfsf2", "trunctfdf2",
2320         "trunctfsf2", "extendsfdf2", "extenddftf2", "extendsftf2", "add<mode>3",
2321         "sub<mode>3", "mul<mode>3", "div<mode>3"): Expander removed.
2322         ("fix_trunc<mode>si2", "extend<DSF:mode><BFP:mode>2"): Expander added.
2323         * config/s390/s390.h (TARGET_IBM_FLOAT, TARGET_IEEE_FLOAT,
2324         TARGET_FLOAT_FORMAT): Macro definitions removed.
2325         (FP_REGNO_P): No special case for !TARGET_IEEE_FLOAT anymore.
2326         * config/s390/s390.c (struct processor_costs, z900_cost, z990_cost,
2327         z9_109_cost): Remove fields for hexfloat instructions: dxr, ddr and der.
2328         (s390_rtx_costs): Remove !TARGET_IEEE_FLOAT special branches.
2329         (s390_gen_rtx_const_DI): Function removed.
2330         * config/s390/s390-protos.h (s390_gen_rtx_const_DI): Prototype removed.
2331
2332 2007-04-24  Richard Sandiford  <richard@codesourcery.com>
2333
2334         * optabs.c (set_conv_libfunc): Prefer libgcc2's __ffsMM2 functions
2335         over an external ffs function.
2336
2337 2007-04-24  Chao-ying Fu  <fu@mips.com>
2338             Richard Sandiford  <richard@nildram.co.uk>
2339
2340         * doc/md.texi (madd@var{m}@var{n}4, umadd@var{m}@var{n}4): Document.
2341         * optabs.h (OTI_smadd_widen, OTI_umadd_widen): New optab_indexes.
2342         (smadd_widen_optab, umadd_widen_optab): Define.
2343         * optabs.c (init_optabs): Initialize smadd_widen_optab and
2344         umadd_widen_optab.
2345         * genopinit.c (optabs): Fill in smadd_widen_optab and
2346         umadd_widen_optab.
2347         * expr.c (expand_expr_real_1): Try to use smadd_widen_optab
2348         and umadd_widen_optab to implement multiply-add sequences.
2349         * config/mips/mips.md (*<su>mul_acc_di): Rename to...
2350         (<u>maddsidi4): ...this.  Extend condition to include
2351         GENERATE_MADD_MSUB and TARGET_DSPR2.  Change the constraint
2352         of operand 0 to "ka" and use the three-operand form of madd<u>
2353         for TARGET_DSPR2.
2354         * config/mips/mips-dspr2.md (mips_madd, mips_maddu): Convert
2355         to define_expands.
2356         * config/mips/constraints.md (ka): New register constraint.
2357
2358 2007-04-24  Jan Hubicka  <j@suse.cz>
2359
2360         Revert:
2361
2362         2007-04-23  Jan Hubicka  <jh@suse.cz>
2363         * function.c (init_function_start): Don't init line number info.
2364         (expand_function_end): Update.
2365         (reset_block_changes, record_block_change, finalize_block_changes,
2366         check_block_change, free_block_changes): Kill.
2367         * function.h (reset_block_changes, record_block_change,
2368         finalize_block_changes, check_block_change, free_block_changes): Remove
2369         prototypes.
2370         (struct function): Remove ib_boundaries_block.
2371         * emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw):
2372         Use curr_insn_locator to initialize locator.
2373         (emit_line_note): Remove.
2374         * cfgexpand.c (expand_gimple_cond_expr): Update.
2375         (construct_exit_block): Likewise.
2376         (tree_expand_cfg): Initialize/finalize locators.
2377         * expr.c (expand_expr_real): Update.
2378         * cfglayout.c (line_locators_locs, line_locators_lines,
2379         file_locators_locs, file_locators_files): Remove.
2380         (set_block_levels): Move to cfgexpand.c.
2381         (insn_locators_initialize): Remove.
2382         (pass_insn_locators_initialize): Remove.
2383         (locations_locators_locs, locations_locators_vals): New static vars.
2384         (curr_location, last_location, curr_block, last_block, curr_rtl_loc):
2385         Likewise.
2386         (insn_locators_alloc, insn_locators_finalize,
2387         set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
2388         New functions.
2389         (locator_location): New.
2390         (locator_line, locator_file): Rewrite.
2391         * rtl.h (emit_line_note): Kill.
2392         (insn_locators_alloc, insn_locators_finalize,
2393         set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
2394         Declare.
2395         * tree-inline.c (initialize_cfun): Do not initialize
2396         ib_boundaries_block.
2397         * passes.c (pass_insn_locators_initialize): Remove.
2398
2399 2007-04-24  Daniel Franke  <franke.daniel@gmail.com>
2400
2401         * doc/invoke.texi: Removed leading '-' from option index entries.
2402
2403 2007-04-23  Zdenek Dvorak  <dvorakz@suse.cz>
2404
2405         * tree-phinodes.c (reserve_phi_args_for_new_edge, remove_phi_node):
2406         Use phi_nodes_ptr.
2407         (create_phi_node): Use set_phi_nodes.
2408         * omp-low.c (expand_omp_parallel): Use bb_stmt_list.
2409         * tree-if-conv.c (process_phi_nodes): Use set_phi_nodes.
2410         (combine_blocks):  Use bb_stmt_list and set_bb_stmt_list.
2411         * tree-flow-inline.h (phi_nodes, set_phi_nodes,
2412         (bsi_start, bsi_last): Use bb_stmt_list.
2413         (phi_nodes_ptr, bb_stmt_list, set_bb_stmt_list): New functions.
2414         * cfgexpand.c (expand_gimple_basic_block): Use bb_stmt_list.
2415         Traverse the statements using tsi iterator.
2416         * basic-block.h (struct basic_block_def): Fields stmt_list
2417         and phi_nodes moved to ...
2418         (struct tree_bb_info): ... new structure.
2419         * tree-cfg.c (create_bb): Allocate il.tree.  Use set_bb_stmt_list.
2420         (tree_merge_blocks): Use bb_stmt_list and set_bb_stmt_list.
2421         (remove_bb): Handle blocks with NULL stmt list.  Clear il.tree field.
2422         (tree_verify_flow_info): Verify that il.tree is not set for
2423         entry and exit block.
2424         (tree_split_block): Use set_bb_stmt_list.
2425
2426 2007-04-23  Mike Stump  <mrs@apple.com>
2427
2428         * config/i386/i386.c (ix86_tune_features
2429         [X86_TUNE_DEEP_BRANCH_PREDICTION]: Prefer call over thunks on
2430         nocona and core2.
2431
2432 2007-04-23  H.J. Lu  <hongjiu.lu@intel.com>
2433
2434         * config/i386/i386.md (prefix_extra): New attribute.
2435         (length): Add prefix_extra.
2436
2437         * onfig/i386/sse.md (sse2_movdqu): Set prefix_data16.
2438         (sse2_movntv2di): Likewise.
2439         (sse2_cvtps2dq): Likewise.
2440         (sse2_cvtpd2pi): Likewise.
2441         (sse2_cvttpd2pi): Likewise.
2442         (*sse2_cvtpd2ps): Likewise.
2443         (*add<mode>3): Likewise.
2444         (sse2_ssadd<mode>3): Likewise.
2445         (sse2_usadd<mode>3): Likewise.
2446         (*sub<mode>3): Likewise.
2447         (sse2_sssub<mode>3): Likewise.
2448         (sse2_ussub<mode>3): Likewise.
2449         (*mulv8hi3): Likewise.
2450         (*smulv8hi3_highpart): Likewise.
2451         (*umulv8hi3_highpart): Likewise.
2452         (sse2_umulv2siv2di3): Likewise.
2453         (sse2_pmaddwd): Likewise.
2454         (ashr<mode>3): Likewise.
2455         (lshr<mode>3): Likewise.
2456         (ashl<mode>3): Likewise.
2457         (sse2_ashlti3): Likewise.
2458         (sse2_lshrti3): Likewise.
2459         (*umaxv16qi3): Likewise.
2460         (*smaxv8hi3): Likewise.
2461         (*uminv16qi3): Likewise.
2462         (*sminv8hi3): Likewise.
2463         (sse2_eq<mode>3): Likewise.
2464         (sse2_gt<mode>3): Likewise.
2465         (*and<mode>3): Likewise.
2466         (sse2_nand<mode>3): Likewise.
2467         (*ior<mode>3): Likewise.
2468         (*xor<mode>3): Likewise.
2469         (sse2_packsswb): Likewise.
2470         (sse2_packssdw): Likewise.
2471         (sse2_packuswb): Likewise.
2472         (sse2_punpckhbw): Likewise.
2473         (sse2_punpcklbw): Likewise.
2474         (sse2_punpckhwd): Likewise.
2475         (sse2_punpcklwd): Likewise.
2476         (sse2_punpckhdq): Likewise.
2477         (sse2_punpckldq): Likewise.
2478         (sse2_punpckhqdq): Likewise.
2479         (sse2_punpcklqdq): Likewise.
2480         (*sse2_pinsrw): Likewise.
2481         (*sse2_pextrw): Likewise.
2482         (sse2_pshufd_1): Likewise.
2483         (sse2_uavgv16qi3): Likewise.
2484         (sse2_uavgv8hi3): Likewise.
2485         (sse2_psadbw): Likewise.
2486         (sse2_pmovmskb): Likewise.
2487         (*sse2_maskmovdqu): Likewise.
2488         (*sse2_maskmovdqu_rex64): Likewise.
2489         (sse4a_extrqi): Likewise.
2490         (sse4a_extrq): Likewise.
2491         (sse3_lddqu): Set prefix_rep.
2492         (sse3_addsubv4sf3): Likewise.
2493         (sse3_haddv4sf3): Likewise.
2494         (sse3_hsubv4sf3): Likewise.
2495         (sse_cvtss2si): Likewise.
2496         (sse_cvtss2si_2): Likewise.
2497         (sse_cvtss2siq): Likewise.
2498         (sse_cvtss2siq_2): Likewise.
2499         (sse_cvttss2si): Likewise.
2500         (sse_cvttss2siq): Likewise.
2501         (sse2_cvttps2dq): Likewise.
2502         (sse3_movshdup): Likewise.
2503         (sse3_movsldup): Likewise.
2504         (sse2_cvtsd2si): Likewise.
2505         (sse2_cvtsd2si_2): Likewise.
2506         (sse2_cvtsd2siq): Likewise.
2507         (sse2_cvtsd2siq_2): Likewise.
2508         (sse2_cvttsd2si): Likewise.
2509         (sse2_cvttsd2siq): Likewise.
2510         (*sse2_cvtpd2dq): Likewise.
2511         (*sse2_cvttpd2dq): Likewise.
2512         (sse2_pshuflw_1): Likewise.
2513         (sse2_pshufhw_1): Likewise.
2514         (sse4a_insertqi): Likewise.
2515         (sse4a_insertq): Likewise.
2516         (ssse3_phaddwv8hi3): Set prefix_data16 and prefix_extra.
2517         (ssse3_phadddv4si3): Likewise.
2518         (ssse3_phaddswv8hi3): Likewise.
2519         (ssse3_phsubwv8hi3): Likewise.
2520         (ssse3_phsubdv4si3): Likewise.
2521         (ssse3_phsubswv8hi3): Likewise.
2522         (ssse3_pmaddubswv8hi3): Likewise.
2523         (ssse3_pmulhrswv8hi3): Likewise.
2524         (ssse3_pshufbv16qi3): Likewise.
2525         (ssse3_psign<mode>3): Likewise.
2526         (ssse3_palignrti): Likewise.
2527         (abs<mode>2): Likewise.
2528         (ssse3_phaddwv4hi3): Set prefix_extra.
2529         (ssse3_phadddv2si3): Likewise.
2530         (ssse3_phaddswv4hi3): Likewise.
2531         (ssse3_phsubwv4hi3): Likewise.
2532         (ssse3_phsubdv2si3): Likewise.
2533         (ssse3_phsubswv4hi3): Likewise.
2534         (ssse3_pmaddubswv4hi3): Likewise.
2535         (ssse3_pmulhrswv4hi3): Likewise.
2536         (ssse3_pshufbv8qi3): Likewise.
2537         (ssse3_psign<mode>3): Likewise.
2538         (ssse3_palignrdi): Likewise.
2539         (abs<mode>2): Likewise.
2540         (sse2_cvtdq2ps): Set mode to V4SF instead of V2DF.
2541         (*vec_dupv2df): Set mode to V2DF instead of V4SF.
2542         (sse2_pmovmskb): Set mode to SI instead of V2DF.
2543
2544 2007-04-23  Nick Clifton  <nickc@redhat.com>
2545
2546         * params.def: Fix formatting of emacs local variables.
2547
2548 2007-04-23  H.J. Lu  <hongjiu.lu@intel.com>
2549
2550         * config/i386/sse.md (sse2_stored): Don't split to inter-unit
2551         move if inter-unit move isn't allowed.
2552         Don't split moving the first element of V2DI to DI to inter-unit
2553         move if inter-unit move isn't allowed.
2554
2555 2007-04-23  Richard Guenther  <rguenther@suse.de>
2556
2557         * tree-ssa-sink.c (execute_sink_code): Calculate CDI_DOMINATORS
2558         and CDI_POST_DOMINATORS separately.
2559
2560 2007-04-23  Nick Clifton  <nickc@redhat.com>
2561
2562         * c.opt (Wformat-contains-nul): Add warning attribute.
2563
2564 2007-04-23  Jan Hubicka  <jh@suse.cz>
2565
2566         * function.c (init_function_start): Don't init line number info.
2567         (expand_function_end): Update.
2568         (reset_block_changes, record_block_change, finalize_block_changes,
2569         check_block_change, free_block_changes): Kill.
2570         * function.h (reset_block_changes, record_block_change,
2571         finalize_block_changes, check_block_change, free_block_changes): Remove
2572         prototypes.
2573         (struct function): Remove ib_boundaries_block.
2574         * emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw):
2575         Use curr_insn_locator to initialize locator.
2576         (emit_line_note): Remove.
2577         * cfgexpand.c (expand_gimple_cond_expr): Update.
2578         (construct_exit_block): Likewise.
2579         (tree_expand_cfg): Initialize/finalize locators.
2580         * expr.c (expand_expr_real): Update.
2581         * cfglayout.c (line_locators_locs, line_locators_lines,
2582         file_locators_locs, file_locators_files): Remove.
2583         (set_block_levels): Move to cfgexpand.c.
2584         (insn_locators_initialize): Remove.
2585         (pass_insn_locators_initialize): Remove.
2586         (locations_locators_locs, locations_locators_vals): New static vars.
2587         (curr_location, last_location, curr_block, last_block, curr_rtl_loc):
2588         Likewise.
2589         (insn_locators_alloc, insn_locators_finalize,
2590         set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
2591         New functions.
2592         (locator_location): New.
2593         (locator_line, locator_file): Rewrite.
2594         * rtl.h (emit_line_note): Kill.
2595         (insn_locators_alloc, insn_locators_finalize,
2596         set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
2597         Declare.
2598         * tree-inline.c (initialize_cfun): Do not initialize
2599         ib_boundaries_block.
2600         * passes.c (pass_insn_locators_initialize): Remove.
2601
2602 2007-04-22  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2603
2604         PR middle-end/31448
2605         * expr.c (reduce_to_bit_field_precision): Handle
2606         CONST_INT rtx's.
2607
2608 2007-04-22  Uros Bizjak  <ubizjak@gmail.com>
2609
2610         PR tree-optimization/24659
2611         * optabs.h (enum optab_index) [OTI_vec_unpacks_hi,
2612         OTI_vec_unpacks_lo]: Update comment to mention floating point operands.
2613         (vec_pack_trunc_optab): Rename from vec_pack_mod_optab.
2614         * genopinit.c (optabs): Rename vec_pack_mod_optab
2615         to vec_pack_trunc_optab.
2616         * tree-vect-transform.c (vectorizable_type_demotion): Do not fail
2617         early for scalar floating point operands for NOP_EXPR.
2618         (vectorizable_type_promotion): Ditto.
2619         * optabs.c (optab_for_tree_code) [VEC_PACK_TRUNC_EXPR]: Return
2620         vec_pack_trunc_optab.
2621         (expand_binop): Rename vec_float_trunc_optab to vec_pack_mod_optab.
2622
2623         * tree.def (VEC_PACK_TRUNC_EXPR): Rename from VEC_PACK_MOD_EXPR.
2624         * tree-pretty-print.c (dump_generic_node) [VEC_PACK_TRUNC_EXPR]:
2625         Rename from VEC_PACK_MOD_EXPR.
2626         (op_prio) [VEC_PACK_TRUNC_EXPR]: Ditto.
2627         * expr.c (expand_expr_real_1): Ditto.
2628         * tree-inline.c (estimate_num_insns_1): Ditto.
2629         * tree-vect-generic.c (expand_vector_operations_1): Ditto.
2630
2631         * config/i386/sse.md (vec_unpacks_hi_v4sf): New expander.
2632         (vec_unpacks_lo_v4sf): Ditto.
2633         (vec_pack_trunc_v2df): Ditto.
2634         (vec_pack_trunc_v8hi): Rename from vec_pack_mod_v8hi.
2635         (vec_pack_trunc_v4si): Rename from vec_pack_mod_v4si.
2636         (vec_pack_trunc_v2di): Rename from vec_pack_mod_v2di.
2637
2638         * config/rs6000/altivec.md (vec_pack_trunc_v8hi): Rename from
2639         vec_pack_mod_v8hi.
2640         (vec_pack_trunc_v4si): Rename from vec_pack_mod_v4si.
2641
2642         * doc/c-tree.texi (Expression trees) [VEC_PACK_TRUNC_EXPR]:
2643         Rename from VEC_PACK_MOD_EXPR.  This expression also represent
2644         packing of floating point operands.
2645         [VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR]: These expression also
2646         represent unpacking of floating point operands.
2647         * doc/md.texi (Standard Names) [vec_pack_trunc]: Update documentation.
2648         [vec_unpacks_hi]: Ditto.
2649         [vec_unpacks_lo]: Ditto.
2650
2651 2007-04-22  Jan Hubicka  <jh@suse.cz>
2652
2653         * final.c (rest_of_handle_final): Call
2654         targetm.asm_out.constructor/targetm.asm_out.destructor
2655         * cgraphunit.c (cgraph_build_static_cdtor): Don't do it here; set
2656         proper priority via decl_*_priority_insert.
2657         * c-common.c (c_expand_body): Likewise.
2658
2659 2007-04-22  Richard Guenther  <rguenther@suse.de>
2660
2661         PR tree-optimization/29789
2662         * tree-ssa-loop-im.c (stmt_cost): Adjust cost of shifts.
2663         (rewrite_reciprocal): New helper split out from
2664         determine_invariantness_stmt.
2665         (rewrite_bittest): Likewise.
2666         (determine_invariantness_stmt): Rewrite (A >> B) & 1 to
2667         A & (1 << B) if (1 << B) is loop invariant but (A >> B)
2668         is not.
2669
2670 2007-04-22  Revital Eres  <eres@il.ibm.com>
2671
2672         * loop-unroll.c (var_to_expand): New field to support also
2673         insns of the form x = something + x.
2674         (analyze_insn_to_expand_var): Use it.
2675         (expand_var_during_unrolling): Likewise.
2676
2677 2007-04-21  Zdenek Dvorak  <dvorakz@suse.cz>
2678
2679         * predict.c: Include pointer-set.h.
2680         (bb_predictions): New variable.
2681         (tree_predicted_by_p, tree_predict_edge,
2682         remove_predictions_associated_with_edge): Use bb_predictions map
2683         instead of bb->predictions.
2684         (clear_bb_predictions, assert_is_empty): New functions.
2685         (combine_predictions_for_bb): Use bb_predictions map.  Call
2686         clear_bb_predictions.
2687         (tree_estimate_probability): Create and free bb_predictions map.
2688         * Makefile.in (predict.o): Add pointer-set.h dependency.
2689         * basic-block.h (struct basic_block_def): Remove predictions
2690         field.
2691         * cfgrtl.c (rtl_verify_flow_info_1): Do not check bb->predictions.
2692
2693 2007-04-21  Kaz Kojima  <kkojima@gcc.gnu.org>
2694
2695         PR target/31480
2696         * config/sh/sh.md (length): Check if prev_nonnote_insn (insn)
2697         is null.
2698
2699 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2700
2701         * timevar.c (timevar_print): Change reference of --disable-checking to
2702         --enable-checking=release.  Also warn if assert checking is disabled.
2703
2704 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2705
2706         PR C/30265
2707         * c-gimplifier.c (gimplify_compound_literal_expr): Mark the
2708         decl as addressable if the compound literal was marked as
2709         addressable.
2710         Mark the decl as a gimple register if it is a complex or
2711         vector decl and does not live in memory.
2712
2713 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2714
2715         * tree.h (GIMPLE_TUPLE_P): Also true for PHI_NODEs.
2716         (GENERIC_NEXT): New function macro.
2717         (PHI_CHAIN): Use phi_node's new chain variable.
2718         (tree_phi_node): Change tree_common to tree_base
2719         and add the chain field.
2720         * tree-phinodes.c (make_phi_node): Don't set
2721         TREE_TYPE on the new node.
2722         * c-decl.c (lang_tree_node): Use GENERIC_NEXT
2723         instead of checking GIMPLE_TUPLE_P in chain_next.
2724         * tree-vect-transform.c
2725         (get_initial_def_for_induction): Look at
2726         PHI_RESULT_TREE for the type of the phi node.
2727         (update_vuses_to_preheader): Use PHI_CHAIN
2728         instead of TREE_CHAIN on the phi node.
2729         * tree-ssa-structalias.c (compute_points_to_sets):
2730         Likewise.
2731         (ipa_pta_execute): Likewise.
2732
2733 2007-04-21  Richard Guenther  <rguenther@suse.de>
2734
2735         PR middle-end/31136
2736         * fold-const.c (fold_unary): Call fold_convert_const on the
2737         original tree.
2738
2739 2007-04-21  Alexandre Oliva  <aoliva@redhat.com>
2740
2741         * gcse.c (store_killed_in_insn): Handle PARALLELs.
2742         (store_killed_in_pat): New.
2743
2744 2007-04-20  Richard Henderson  <rth@redhat.com>
2745
2746         PR target/31628
2747         * config/i386/i386.c (type_has_variadic_args_p): Look for any
2748         TREE_LIST with a void_type_node value, not void_list_node exactly.
2749
2750 2007-04-21  Douglas Gregor  <doug.gregor@gmail.com>
2751
2752         * doc/standards.texi: Re-arrange into language-specific
2753         subsections. Add a C++ section, documenting which standards we
2754         support.
2755
2756 2007-04-21  Zdenek Dvorak  <dvorakz@suse.cz>
2757
2758         * tree-ssa-structalias.c (delete_points_to_sets): Free graph->complex.
2759         * tree-ssa-operands.c (finalize_ssa_vuse_ops): Free new_ops.
2760
2761 2007-04-20  Daniel Jacobowitz  <dan@codesourcery.com>
2762
2763         * config/rs6000/sysv4.h (STARTFILE_DEFAULT_SPEC): Include
2764         ecrti.o and crtbegin.o.
2765         (LIB_DEFAULT_SPEC): Include -lc.
2766         (ENDFILE_DEFAULT_SPEC): Include crtend.o and ecrtn.o.
2767
2768 2007-04-20  Richard Henderson  <rth@redhat.com>
2769
2770         PR target/28623
2771         * config/alpha/alpha.c (get_unaligned_address): Remove extra_offset
2772         argument; update all callers.
2773         (get_unaligned_offset): New.
2774         * config/alpha/alpha.md (extendqidi2, extendhidi2): Don't use
2775         get_unaligned_address, just pass on the address directly.
2776         (unaligned_extendqidi): Use gen_lowpart instead of open-coding
2777         the subreg in the helper patterns.
2778         (unaligned_extendqidi_le): Use get_unaligned_offset.
2779         (unaligned_extendqidi_be, unaligned_extendhidi_le): Likewise.
2780         (unaligned_extendhidi_be): Likewise.
2781         (unaligned_extendhidi): Tidy.
2782         * config/alpha/alpha-protos.h: Update.
2783
2784 2007-04-20  Richard Henderson  <rth@redhat.com>
2785
2786         * config/alpha/alpha.h (CPP_SPEC, CPP_SUBTARGET_SPEC): Remove.
2787         (EXTRA_SPECS, SUBTARGET_EXTRA_SPECS): Remove.
2788         * config/alpha/linux.h (CPP_SPEC): Undef before redefine.
2789         * config/alpha/linux-elf.h (EXTRA_SPECS): Rename SUBTARGET_EXTRA_SPECS.
2790         * config/alpha/freebsd.h (EXTRA_SPECS): Rename SUBTARGET_EXTRA_SPECS.
2791         (CPP_SPEC): Don't include %(cpp_subtarget).
2792         * config/alpha/netbsd.h (CPP_SPEC): Rename CPP_SUBTARGET_SPEC.
2793         (EXTRA_SPECS): Rename SUBTARGET_EXTRA_SPECS.
2794         * config/alpha/osf.h (CPP_SPEC, EXTRA_SPECS): Similarly.
2795
2796 2007-04-20  Jakub Jelinek  <jakub@redhat.com>
2797
2798         * config/i386/i386.c (bdesc_2arg): Use ORDERED rather than UNORDERED
2799         for __builtin_ia32_cmpordss.
2800
2801         PR tree-optimization/31632
2802         * fold-const.c (fold_binary): Use op0 and op1 instead of arg0
2803         and arg1 for optimizations of comparison against min/max values.
2804         Fold arg0 to arg1's type for optimizations of comparison against
2805         min+1 and max-1 values.
2806
2807 2007-04-19  Bernd Schmidt  <bernd.schmidt@analog.com>
2808
2809         * reload.c (combine_reloads): When trying to use a dying register,
2810         check whether it's uninitialized and don't use if so.
2811
2812 2007-04-19  Brooks Moses  <brooks.moses@codesourcery.com>
2813
2814         * fold-const.c: Remove prototypes for native_encode_expr and
2815         native_interpret_expr.
2816         (native_encode_expr): Make non-static.
2817         (native_interpret_expr): Likewise.
2818         * tree.h: Add prototypes for the above.
2819
2820 2007-04-19  Joseph Myers  <joseph@codesourcery.com>
2821
2822         * config/rs6000/spe.md (*frob_tf_ti, *frob_ti_tf, *frob_ti_tf_2,
2823         *mov_si<mode>_e500_subreg0, *mov_si<mode>_e500_subreg0_2,
2824         *mov_sitf_e500_subreg8, *mov_sitf_e500_subreg8_2, spe_extenddftf2,
2825         spe_fix_trunctfsi2_internal, spe_negtf2_internal, cmptfeq_gpr,
2826         tsttfeq_gpr, cmptfgt_gpr, tsttfgt_gpr, cmptflt_gpr, tsttflt_gpr):
2827         Add length attributes.
2828
2829 2007-04-19  Janis Johnson  <janis187@us.ibm.com>
2830
2831         * ginclude/float.h: Check that __STDC_WANT_DEC_FP__ is defined,
2832         not that it is 1.
2833
2834         * c-cppbuiltin.c (c_cpp_builtins): Remove definition of
2835         __STDC_WANT_DEC_FP__.
2836
2837 2007-04-19  Joseph Myers  <joseph@codesourcery.com>
2838
2839         * configure.ac: Allow both powerpc*-*-linux* and powerpc*-*-gnu*
2840         for long double compatibility.
2841         * configure: Regenerate.
2842
2843 2007-04-19  Eric Botcazou  <ebotcazou@libertysurf.fr>
2844
2845         PR rtl-optimization/29841
2846         * cfgbuild.c (control_flow_insn_p): Return TRUE for unconditional
2847         trap instructions.
2848         * sched-deps.c (sched_analyze_insn): Prevent all non-jump instructions
2849         that may cause control flow transfer from being moved.
2850
2851 2007-04-18  Jan Hubicka  <jh@suse.cz>
2852
2853         * fold-const.c (div_if_zero_remainder): Do signed divide for pointer
2854         types.
2855
2856 2007-04-18  Eric Christopher  <echristo@apple.com>
2857
2858         * config/rs6000/darwin.md (load_macho_picbase): Use link register
2859         only. Update operands.
2860         * config/rs6000/rs6000.c (rs6000_emit_prologue): Update caller.
2861         * config/rs6000/rs6000.md (builtin_setjmp_receiver): Ditto. Move from
2862         link register to pic register.
2863
2864 2007-04-18  Dirk Mueller  <dmueller@suse.de>
2865
2866         PR diagnostic/31227
2867         * tree-vrp.c (search_for_addr_array): New.
2868         (check_array_bounds): Suppress warning about
2869         address taken of array refs if its not de-referenced.
2870
2871 2007-04-18  Dorit Nuzman  <dorit@il.ibm.com>
2872
2873         * tree-vectorizer.c (destroy_loop_vec_info): Set loop->aux to NULL.
2874         * tree-vect-analyze.c (vect_analyze_loop_form): Set loop->aux.
2875
2876         * tree-vectorizer.h (NITERS_KNOWN_P): New.
2877         * tree-vect-analyze.c (vect_analyze_loop_form): Call NITERS_KNOWN_P
2878         instead of LOOP_VINFO_INT_NITERS to avoid having to geneate loop_info.
2879
2880         * tree-vect-analyze.c (vect_determine_vectorization_factor): Add
2881         dump print.
2882         (vect_analyze_operations): Fix indenetation.  Fix a comment.  Fix a
2883         print message.
2884         (vect_analyze_scalar_cycles): Fix indentation.
2885         (vect_enhance_data_refs_alignment): Fix check in case of peeling.
2886         (vect_mark_relevant): Include phis in relevance analysis.
2887
2888         * tree-vect-transform.c (vect_transform_loop): Add an assert.
2889
2890 2007-04-18  Anatoly Sokolov <aesok@post.ru>
2891
2892         * config/avr/avr.c (ptrreg_to_str): Replace error() with
2893         output_operand_lossage().
2894
2895 2007-04-18  Dorit Nuzman  <dorit@il.ibm.com>
2896
2897         * tree-vect-transform.c (get_initial_def_for_reduction): Clean away
2898         the unused code for reduction without adjust-in-epilog to simplify the
2899         function.
2900
2901 2007-04-18  Wolfgang Gellerich  <gellerich@de.ibm.com>
2902
2903         * config/s390/s390.h (S390_TDC_POSITIVE_ZERO): New constant.
2904         (S390_TDC_NEGATIVE_ZERO): New constant.
2905         (S390_TDC_POSITIVE_NORMALIZED_NUMBER): New constant.
2906         (S390_TDC_NEGATIVE_NORMALIZED_NUMBER): New constant.
2907         (S390_TDC_POSITIVE_DENORMALIZED_NUMBER): New constant.
2908         (S390_TDC_NEGATIVE_DENORMALIZED_NUMBER): New constant.
2909         (S390_TDC_POSITIVE_INFINITY): New constant.
2910         (S390_TDC_NEGATIVE_INFINITY): New constant.
2911         (S390_TDC_POSITIVE_QUIET_NAN): New constant.
2912         (S390_TDC_NEGATIVE_QUIET_NAN): New constant.
2913         (S390_TDC_POSITIVE_SIGNALING_NAN): New constant.
2914         (S390_TDC_NEGATIVE_SIGNALING_NAN): New constant.
2915         (S390_TDC_INFINITY): New constant.
2916         * config/s390/s390.c (s390_canonicalize_comparison): Renamed
2917         UNSPEC_CMPINT to UNSPEC_CCU_TO_INT, added a UNSPEC_CCU_TO_INT-like
2918         optimization for UNSPEC_CCZ_TO_INT.
2919         * config/s390/s390.md ("*TDC_insn_<mode>"): New insn.
2920         ("*ccz_to_int"): New insn.
2921         ("isinf<mode>2"): New insn.
2922         (UNSPEC_CMPINT): Renamed to UNSPEC_CCU_TO_INT.
2923         (UNSPEC_CCU_TO_INT): New constant, replaces UNSPEC_CMPINT.
2924         (UNSPEC_CCZ_TO_INT): New constant.
2925
2926 2007-04-18  Richard Guenther  <rguenther@suse.de>
2927
2928         PR tree-optimization/19431
2929         PR tree-optimization/21463
2930         * tree-pass.h (pass_phiprop): Declare.
2931         * passes.c (init_optimization_passes): New phiprop pass.
2932         * tree-ssa-forwprop.c (struct phiprop_d): New structure.
2933         (phivn_valid_p): New helper function.
2934         (phiprop_insert_phi): Likewise.
2935         (propagate_with_phi): Likewise.
2936         (tree_ssa_phiprop): New propagator propagating loads
2937         through phi nodes if profitable.
2938
2939 2007-04-18  Dorit Nuzman  <dorit@il.ibm.com>
2940
2941         * tree-vect-analyze.c (process_use): New function.
2942         (vect_mark_stmts_to_be_vectorized): Factor out code to process_use.
2943         Check phis in all bbs.
2944         * tree-vectorizer.c (vect_is_simple_use): Remove a no longer relavant
2945         assert.
2946
2947 2007-04-18  Bernd Schmidt  <bernd.schmidt@analog.com>
2948
2949         * reload1.c (eliminte_regs_in_insn): Use REG_EQUIV notes the same way
2950         we use REG_EQUAL.
2951
2952 2007-04-17  Anatoly Sokolov <aesok@post.ru>
2953
2954         PR target/30483
2955         * config/avr/avr.c (ptrreg_to_str): Replace gcc_unreachable() with
2956         error().
2957
2958 2007-04-17  H.J. Lu  <hongjiu.lu@intel.com>
2959
2960         * config/i386/sse.md (sse_vmaddv4sf3): Use register_operand
2961         on "0".
2962         (sse_vmmulv4sf3): Likewise.
2963         (sse2_vmaddv2df3): Likewise.
2964         (sse2_vmmulv2df3): Likewise.
2965
2966 2007-04-17  Zdenek Dvorak  <dvorakz@suse.cz>
2967
2968         PR rtl-optimization/31360
2969         * cfgloopanal.c (target_small_cost, target_pres_cost): Removed.
2970         (target_reg_cost): New.
2971         (init_set_costs): Initialize target_reg_cost.  Add comments
2972         regarding the rationale of the costs.
2973         (global_cost_for_size): Renamed to...
2974         (estimate_reg_pressure_cost): ... and simplify.  Decrease importance
2975         of register pressure.
2976         * tree-ssa-loop-ivopts.c (ivopts_global_cost_for_size): Use
2977         estimate_reg_pressure_cost.  Add number of ivs.
2978         (determine_set_costs): Dump target_reg_cost.
2979         * loop-invariant.c (gain_for_invariant):  Use
2980         estimate_reg_pressure_cost.  Removed n_inv_uses argument.
2981         (best_gain_for_invariant, find_invariants_to_move): Remove
2982         n_inv_uses.
2983         * cfgloop.h (target_small_cost, target_pres_cost): Removed.
2984         (target_reg_cost): Declare.
2985         (global_cost_for_size): Declaration removed.
2986         (estimate_reg_pressure_cost): Declare.
2987
2988 2007-04-17  Peter Bergner  <bergner@vnet.ibm.com>
2989
2990         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Force TDmode
2991         regnos into even/odd register pairs.
2992         * config/rs6000/rs6000.h [SLOW_UNALIGNED_ACCESS]: Treat DDmode and
2993         TDmode similar to the other floating point modes.
2994         [SECONDARY_MEMORY_NEEDED]: Treat DDmode similar to DFmode.
2995         * config/rs6000/dfp.md (negdd2, absdd2, negtd2, abstd2): New
2996         define_expand's.
2997         (negdd2_fpr, absdd2_fpr, nabsdd2_fpr, negtd2_fpr, abstd2_fpr,
2998         nabstd2_fpr, movdd_hardfloat64_mfpgpr): New define_insn's.
2999         (movdd_hardfloat64): Use TARGET_MFPGPR.
3000
3001 2007-04-17  Bernd Schmidt  <bernd.schmidt@analog.com>
3002
3003         * reload1.c (delete_output_reload): Don't count output in n_inherited.
3004
3005         Revert
3006         2005-01-05  Richard Henderson  <rth@redhat.com>
3007         PR rtl-opt/10692
3008         * reload1.c (do_input_reload): Restrict the optimization deleteing
3009         a previous output reload to RELOAD_FOR_INPUT.
3010
3011 2007-04-17  Dorit Nuzman  <dorit@il.ibm.com>
3012
3013         * tree-vectorizer.h (stmt_vec_info_type): Add enum value
3014         induc_vec_info_type.
3015         (vectorizable_induction): New function declaration.
3016         * tree-vect-transform.c (get_initial_def_for_induction): No need to
3017         check if already vectorized.  Find first place in BB where new stmts
3018         can be inserted.  Takes only one argument.
3019         (vectorizable_induction): New function.
3020         (vect_transform_stmt): Add case for induc_vec_info_type to call
3021         vectorizable_induction.
3022         (vect_transform_loop): Consider phis for vectorization.
3023         * tree-vect-analyze.c (vect_determine_vectorization_factor): Simplify
3024         condition.
3025         (analyze_operations): Call vectorizable_induction when analyzing phis.
3026         Fix comment.
3027         (vect_mark_stmts_to_be_vectorized): Remove redundant checks.
3028         (vect_mark_relevant): Include phis in relevance analysis.
3029         (vect_mark_stmts_to_be_vectorize): Likewise.
3030         * tree-vect-patterns.c (widened_name_p): Remove obsolete asserts.
3031
3032 2007-04-16  Lawrence Crowl  <crowl@google.com>
3033
3034         * doc/invoke.texi (Debugging Options): Add documentation for the
3035         -femit-struct-debug options -femit-struct-debug-baseonly,
3036         -femit-struct-debug-reduced, and
3037         -femit-struct-debug-detailed[=...].
3038
3039         * c-opts.c (c_common_handle_option): Add
3040         OPT_femit_struct_debug_baseonly, OPT_femit_struct_debug_reduced,
3041         and OPT_femit_struct_debug_detailed_.
3042         * c.opt: Add specifications for
3043         -femit-struct-debug-baseonly, -femit-struct-debug-reduced,
3044         and -femit-struct-debug-detailed[=...].
3045         * opts.c (set_struct_debug_option): Parse the
3046         -femit-struct-debug-... options.
3047         * opts.c (matches_main_base, main_input_basename,
3048         main_input_baselength, base_of_path, matches_main_base): Add
3049         variables and functions to compare header base name to compilation
3050         unit base name.
3051         * opts.c (should_emit_struct_debug): Add to determine to emit a
3052         structure based on the option.
3053         (dump_struct_debug) Also disabled function to debug this
3054         function.
3055         * opts.c (handle_options): Save the base name of the
3056         compilation unit.
3057
3058         * langhooks-def.h (LANG_HOOKS_GENERIC_TYPE_P): Define.
3059         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add.
3060         This hook indicates if a type is generic.  Set it by default
3061         to "never generic".
3062         * langhooks.h (struct lang_hooks_for_types): Add a new hook
3063         to determine if a struct type is generic or not.
3064         * cp/cp-tree.h (class_tmpl_impl_spec_p): Declare a C++ hook.
3065         * cp/tree.c (class_tmpl_impl_spec_p): Implement the C++ hook.
3066         * cp/cp-lang.c (LANG_HOOKS_GENERIC_TYPE_P): Override null C hook
3067         with live C++ hook.
3068
3069         * flags.h (enum debug_info_usage): Add an enumeration to describe
3070         a program's use of a structure type.
3071         * dwarf2out.c (gen_struct_or_union_type_die): Add a new parameter
3072         to indicate the program's usage of the type.  Filter structs based
3073         on the -femit-struct-debug-... specification.
3074         (gen_type_die): Split into two routines, gen_type_die and
3075         gen_type_die_with_usage.  gen_type_die is now a wrapper
3076         that assumes direct usage.
3077         (gen_type_die_with_usage): Replace calls to gen_type_die
3078         with gen_type_die_with_usage adding the program usage of
3079         the referenced type.
3080         (dwarf2out_imported_module_or_decl): Suppress struct debug
3081         information using should_emit_struct_debug when appropriate.
3082
3083 2007-04-16  Ian Lance Taylor  <iant@google.com>
3084
3085         PR tree-optimization/31522
3086         * tree-vrp.c (vr_phi_edge_counts): New static variable.
3087         (vrp_initialize): Allocate vr_phi_edge_counts.
3088         (vrp_visit_phi_node): Don't push to infinity if we saw a new
3089         executable edge.  Drop test for all constants.
3090         (vrp_finalize): Free vrp_phi_edge_counts.
3091
3092         * doc/cpp.texi (Common Predefined Macros): Clarify description of
3093         __GNUC_GNU_INLINE__ and __GNUC_STDC_INLINE__.
3094
3095         * tree-ssa-propagate.c (cfg_blocks_add): Insert blocks with fewer
3096         predecessors at head rather than tail.
3097
3098 2007-04-16  Matthias Klose  <doko@debian.org>
3099
3100         * config/alpha/linux.h (CPP_SPEC): Define.
3101         * config/arm/linux-gas.h (SUBTARGET_CPP_SPEC): Extend.
3102
3103 2007-04-16  Aldy Hernandez  <aldyh@redhat.com>
3104
3105         * function.h: Remove sequence_stack extern declaration.
3106
3107 2007-04-16  Kazu Hirata  <kazu@codesourcery.com>
3108
3109         * config/m68k/m68k.h (LONG_DOUBLE_TYPE_SIZE): Change to 64 on
3110         TARGET_FIDOA.
3111         (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Change to 64 if __mfido__ is
3112         defined.
3113
3114 2007-04-16  Anatoly Sokolov <aesok@post.ru>
3115
3116         * config/avr/avr.c (avr_arch_types): Rearranging  array.
3117         (enum avr_arch): Add.
3118         (avr_mcu_types): Use avr_arch enumeration constants instead of
3119         numbers.
3120         * config/avr/avr.h (LINK_SPEC): Simplify.
3121
3122 2007-04-16  Kazu Hirata  <kazu@codesourcery.com>
3123
3124         * config/m68k/m68k.c (m68k_libcall_value,
3125         m68k_function_value): Use macros for register names more.
3126
3127         * config/m68k/m68k.h (FRAME_POINTER_REGNUM): Use A6_REG
3128         instead.
3129         (M68K_REGNAME): Use A6_REG.
3130         * config/m68k/m68k.md (FP_REG): Rename to A6_REG.
3131
3132 2007-04-16  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>
3133
3134         PR middle-end/28071
3135         * sched-int.h (struct deps): Split field 'pending_lists_length' into
3136         'pending_read_list_length' and 'pending_write_list_length'.  Update
3137         comment.
3138         * sched-deps.c (add_insn_mem_dependence): Change signature.  Update
3139         to handle two length counters instead of one.  Update all uses.
3140         (flush_pending_lists, sched_analyze_1, init_deps): Update to handle
3141         two length counters instead of one.
3142         * sched-rgn.c (propagate_deps): Update to handle two length counters
3143         instead of one.
3144
3145 2007-04-16  H.J. Lu  <hongjiu.lu@intel.com>
3146
3147         PR target/31582
3148         * config/i386/i386.c (ix86_expand_vec_set_builtin): Make a
3149         copy of source, pass it to ix86_expand_vector_set and return
3150         it as target.
3151
3152 2007-04-16  David Ung  <davidu@mips.com>
3153             Joseph Myers  <joseph@codesourcery.com>
3154
3155         * config/mips/mips.h (PROCESSOR_74KC, PROCESSOR_74KF,
3156         PROCESSOR_74KX, TUNE_74K, GENERATE_MADD_MSUB): Define.
3157         * config/mips/mips.c (mips_cpu_info_table, mips_rtx_cost_data):
3158         Add 74K processor information.
3159         * config/mips/mips.md: Include 74k.md.
3160         (cpu): Add 74kc,74kf,74kx.
3161         (ISA_HAS_MADD_MSUB): Change to GENERATE_MADD_MSUB throughout.
3162         * config/mips/74k.md: New.
3163         * doc/invoke.texi (MIPS Options): Document 74K support.
3164
3165 2007-04-16  Dorit Nuzman  <dorit@il.ibm.com>
3166
3167         * tree-vect-analyze.c (vect_analyze_operations): Reorganize calls to
3168         vectorizable_* functions.
3169         * tree-vect-transform.c (vectorizable_call): Add check for
3170         STMT_VINFO_RELEVANT_P, STMT_VINFO_DEF_TYPE and STMT_VINFO_LIVE_P.
3171         (vectorizable_store): likewise.
3172         (vectorizable_conversion): Add check for STMT_VINFO_DEF_TYPE.
3173         Add comments.
3174         (vectorizable_operation, vectorizable_type_demotion): Likewise.
3175         (vectorizable_type_promotion, vectorizable_load): Likewise.
3176         (vectorizable_live_operation, vectorizable_condition): Likewise.
3177         (vectorizable_assignment): Add check for STMT_VINFO_DEF_TYPE and
3178         STMT_VINFO_LIVE_P.
3179         (vect_transform_stmt): Reorganize calls to vectorizable_* functions.
3180
3181 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
3182
3183         * config/m68k/linux.h (FUNCTION_VALUE_REGNO_P): Use macros for
3184         register numbers more.
3185         * config/m68k/m68k.h (STACK_POINTER_REGNUM,
3186         FRAME_POINTER_REGNUM, STATIC_CHAIN_REGNUM,
3187         M68K_STRUCT_VALUE_REGNUM, FUNCTION_VALUE, LIBCALL_VALUE,
3188         FUNCTION_VALUE_REGNO_P): Likewise.
3189         * config/m68k/m68kelf.h (M68K_STRUCT_VALUE_REGNUM,
3190         STATIC_CHAIN_REGNUM): Likewise.
3191         * config/m68k/m68kemb.h (FUNCTION_VALUE_REGNO_P): Likewise.
3192         * config/m68k/netbsd-elf.h (M68K_STRUCT_VALUE_REGNUM,
3193         STATIC_CHAIN_REGNUM, FUNCTION_VALUE_REGNO_P): Likewise.
3194         * config/m68k/m68k.md (FP_REG): New.
3195
3196 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
3197
3198         * config/m68k/m68k.h (PREFERRED_STACK_BOUNDARY): Prefer 32-bit
3199         alignment on fido.
3200
3201 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
3202
3203         * config/i386/i386.c, config/s390/s390.c, config/s390/s390.md,
3204         tree-ssa-loop-niter.c, tree-ssa-structalias.c, tree-vrp.c: Fix
3205         comment typos.
3206
3207 2007-04-11  Zdenek Dvorak  <dvorakz@suse.cz>
3208
3209         * tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Ignore
3210         cold loops.
3211
3212 2007-04-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3213
3214         PR c/31520
3215         * c-decl.c (finish_decl): Grab the type of the decl after the call
3216         to store_init_value.
3217
3218 2007-04-14  Steven Bosscher  <steven@gcc.gnu.org>
3219
3220         * common.opt (fforward-propagate): Fix "Optimization" annotation.
3221
3222 2007-04-14  Jakub Jelinek  <jakub@redhat.com>
3223
3224         PR c++/25874
3225         * omp-low.c (expand_omp_parallel): If child_cfun->cfg, free dominators,
3226         post dominators and cleanup cfg before returning.
3227
3228 2007-04-14  Bernd Schmidt  <bernd.schmidt@analog.com>
3229
3230         * config/bfin/bfin.h (MODES_TIEABLE_P): Allow more modes to be tied.
3231         * config/bfin/bfin.md (movsi_insn): Delete two unused alternatives.
3232
3233 2007-04-14  Kazu Hirata  <kazu@codesourcery.com>
3234
3235         * config.gcc: Recognize fido.
3236         * config/m68k/m68k-devices.def (fidoa): New.
3237         * config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Define
3238         __mfido__.
3239         (FL_FIDOA, TARGET_FIDOA): New.
3240         * config/m68k/m68k.opt (mfidoa): New.
3241
3242 2007-04-13  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3243
3244         PR middle-end/31322
3245         * dwarf2out.c (output_call_frame_info): Call assemble_external_libcall
3246         when a personality function is used.
3247
3248 2007-04-13  Bob Wilson  <bob.wilson@acm.org>
3249
3250         * config/xtensa/xtensa.c (xtensa_expand_builtin): Use CALL_EXPR_FN.
3251
3252 2007-04-13  Mike Stump  <mrs@apple.com>
3253
3254         * config/darwin-c.c (handle_c_option): Handle -fapple-kext here so
3255         we can...
3256         * config/darwin.opt (fapple-kext): Make C++ only.
3257         * config/darwin.c (darwin_override_options): Remove code to ensure
3258         -fapple-kext is given for C++ only.
3259
3260 2007-04-13  Richard Sandiford  <richard@codesourcery.com>
3261
3262         * config/mips/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define.
3263         * config/mips/mips.c (override_options): Call
3264         SUBTARGET_OVERRIDE_OPTIONS, if defined.
3265
3266 2007-04-13  H.J. Lu  <hongjiu.lu@intel.com>
3267
3268         * config/i386/i386.opt (msvr3-shlib): Removed.
3269
3270         * doc/invoke.texi: Remove -msvr3-shlib.
3271
3272 2007-04-13  H.J. Lu  <hongjiu.lu@intel.com>
3273
3274         * config/i386/i386.opt (mpopcnt): Replace "popcount" instruction
3275         with "popcnt" instruction.
3276
3277 2007-04-13  Richard Guenther  <rguenther@suse.de>
3278
3279         PR tree-optimization/21258
3280         * tree-vrp.c (compare_case_labels): New helper.
3281         (find_switch_asserts): New function.
3282         (find_assert_locations): Call it for SWITCH_EXPRs.
3283
3284 2007-04-13  Uros Bizjak  <ubizjak@gmail.com>
3285
3286         * config/i386/i386.h (X87_FLOAT_MODE_P): Check for TARGET_80387.
3287         * config/i386/i386.md (*cmpfp0): Remove check for TARGET_80387, this
3288         check is now implied in X87_FLOAT_MODE_P.
3289         (*cmpfp_u, *cmpfp_<mode>, *cmpfp_i_i387): Ditto.
3290         (*cmpfp_iu_387, fix_trunc<mode>_fisttp_i386_1): Ditto.
3291         (fix_trunc<mode>_i386_fisttp): Ditto.
3292         (fix_trunc<mode>_i387_fisttp_with_temp): Ditto.
3293         (*fix_trunc<mode>_i387_1, fix_truncdi_i387): Ditto.
3294         (fix_truncdi_i387_with_temp, fix_trunc<mode>_i387): Ditto.
3295         (fix_trunc<mode>_i387_with_temp, *fp_jcc_1_387): Ditto.
3296         (*fp_jcc_2_387, *fp_jcc_5_387, *fp_jcc_6_387): Ditto.
3297         (*fp_jcc_7_387, *fp_jcc_8<mode>_387): Ditto.
3298         (unnamed_splitters): Ditto.
3299         * config/i386/i386.c (function_value_32): Generate FIRST_FLOAT_REG
3300         for X87_FLOAT_MODE_P mode.  Override FIRST_FLOAT_REG with
3301         FIRST_SSE_REG for local functions when SSE math is enabled or
3302         for functions with sseregparm attribute.
3303         (standard_80387_constant_p): Return -1 if mode is not
3304         X87_FLOAT_MODE_P.
3305         (ix86_cc_mode): Assert that scalar mode is not DECIMAL_FLOAT_MODE_P.
3306         (ix86_expand_compare): Ditto.
3307         (ix86_expand_carry_flag_compare): Ditto.
3308         (ix86_expand_int_movcc): Check for SCALAR_FLOAT_MODE_P instead
3309         of FLOAT_MODE_P for cmp_mode and assert that cmp_mode is not
3310         DECIMAL_FLOAT_MODE_P.
3311         (ix86_preferred_output_reload_class): Use X87_FLOAT_MODE_P instead
3312         of SCALAR_FLOAT_MODE_P.
3313         (ix86_rtx_costs) [PLUS] Remove FLOAT_MODE_P and fall through to ...
3314         [MINUS]: ... here.  Add SSE_FLOAT_MODE_P and X87_FLOAT_MODE_P
3315         checks before FLOAT_MODE_P.
3316         [MULT]: Add SSE_FLOAT_MODE_P and X87_FLOAT_MODE_P checks
3317         before FLOAT_MODE_P.
3318         [DIV]: Ditto.
3319         [NEG]: Ditto.
3320         [ABS]: Ditto.
3321         [SQRT]: Ditto.
3322         [FLOAT_EXTEND]: Use SSE_FLOAT_MODE_P.
3323
3324 2007-04-12  Paolo Bonzini  <bonzini@gnu.org>
3325             Charles Wilson  <libtool@cwilson.fastmail.fm>
3326
3327         * Makefile.in (stamp-as, stamp-collect-ld, stamp-nm): Remove.
3328         (libgcc.mvars): Don't depend on them.
3329         * configure.ac (as, collect-ld, nm): Create from exec-tool.in.
3330         * exec-tool.in: New.
3331
3332 2007-04-12  Brooks Moses  <brooks.moses@codesourcery.com>
3333
3334         * doc/invoke.text (--help): Document --help=common.
3335
3336 2007-04-12  Thomas Neumann  <tneumann@users.sourceforge.net>
3337
3338         * stub-objc.c (objc_build_keyword_decl): Avoid C++ keywords.
3339
3340 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
3341
3342         * Makefile.in (insn-emit.o): Depend on $(INTEGRATE_H).
3343         * genemit.c (main): Emit #include "integrate.h".
3344         * config/mips/mips-protos.h (SYMBOL_HALF): New mips_symbol_type.
3345         (LOADGP_RTP): New mips_loadgp_style.
3346         * config/mips/mips.h: Include config/vxworks-dummy.h.
3347         (TARGET_RTP_PIC): New macro.
3348         (TARGET_USE_GOT): Return true for TARGET_RTP_PIC.
3349         (TARGET_USE_PIC_FN_ADDR_REG): Return true for TARGET_VXWORKS_RTP.
3350         (ASM_OUTPUT_ADDR_DIFF_ELT): Emit function-relative case tables
3351         for TARGET_RTP_PIC.
3352         * config/mips/vxworks.h (SUBTARGET_ASM_SPEC): Define.  Pass down
3353         -mvxworks-pic when using -mrtp and a PIC option.
3354         * config/mips/mips.c (mips_classify_symbol): Return SYMBOL_GOT_DISP
3355         for RTP PIC.
3356         (mips_symbolic_constant_p, mips_symbolic_address_p)
3357         (mips_symbol_insns): Handle SYMBOL_HALF.
3358         (override_options): Warn about -G and -mrtp being used together.
3359         Initialize mips_lo_relocs[SYMBOL_HALF].
3360         (mips_current_loadgp_style): Return LOADGP_RTP for RTP PIC.
3361         (mips_emit_loadgp): Handle LOADGP_RTP.
3362         (mips_in_small_data_p): Return false for TARGET_VXWORKS_RTP.
3363         * config/mips/mips.md (loadgp_rtp): New insn and splitter.
3364         (tablejump): Handle function-relative case table entries if
3365         TARGET_RTP_PIC.
3366         * config/mips/predicates.md (symbol_ref_operand): New predicate.
3367
3368 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
3369
3370         * config/mips/mips.md (load_call<mode>): Allow any general register.
3371         destination.
3372         (sibcall_value_internal, sibcall_value_multiple_internal)
3373         (call_value_internal, call_value_split, call_value_multiple_internal)
3374         (call_value_multiple_split): Remove constraints from operand 0.
3375
3376 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
3377
3378         * config/mips/mips-protos.h: In comments, refer to loadgp_absolute
3379         rather than loadgp_noshared.
3380         * config/mips/mips.c (mips_emit_loadgp): Use gen_loadgp_absolute
3381         instead of gen_loadgp_noshared.  Use gen_loadgp_newabi instead of
3382         gen_loadgp.
3383         * config/mips/mips.md (loadgp): Rename to...
3384         (loadgp_newabi): ...this.
3385         (loadgp_noshared): Rename to...
3386         (loadgp_absolute): ...this.
3387
3388 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
3389
3390         * config/mips/mips.c (mips_ok_for_lazy_binding_p): Always return
3391         false for locally-binding symbols.
3392         (mips_dangerous_for_la25_p): Check mips_global_symbol_p.
3393
3394 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
3395
3396         * config/mips/mips-protos.h (SYMBOL_GOT_LOCAL): Rename to...
3397         (SYMBOL_GOT_PAGE_OFST): ...this.
3398         (SYMBOL_GOT_GLOBAL): Rename to...
3399         (SYMBOL_GOT_DISP): ...this.
3400         (SYMBOL_GOTOFF_GLOBAL): Rename to...
3401         (SYMBOL_GOTOFF_DISP): ...this.  Update comments accordingly.
3402         * config/mips/mips.c (mips_global_symbol_p): New function.
3403         (mips_symbol_binds_local_p): Likewise.
3404         (mips_classify_symbol): Rename SYMBOL_GOT_GLOBAL to SYMBOL_GOT_DISP
3405         and SYMBOL_GOT_LOCAL to SYMBOL_GOT_PAGE_OFST.  Use mips_global_symbol_p
3406         and mips_symbol_binds_local_p.
3407         (mips_symbolic_constant_p, mips_symbolic_address_p, mips_symbol_insns)
3408         (override_options): Rename SYMBOL_GOT_GLOBAL to SYMBOL_GOT_DISP,
3409         SYMBOL_GOT_LOCAL to SYMBOL_GOT_PAGE_OFST and SYMBOL_GOTOFF_GLOBAL to
3410         SYMBOL_GOTOFF_DISP.
3411         (mips_ok_for_lazy_binding_p): New function.
3412         (mips_load_call_address, mips_expand_call): Use it.
3413         (mips_dangerous_for_la25_p): Likewise.
3414         * config/mips/mips.md (*xgot_hi<mode>, *xgot_lo<mode>)
3415         (*got_disp<mode>): Use got_disp_operand instead of
3416         global_got_operand.  Use SYMBOL_GOTOFF_DISP instead of
3417         SYMBOL_GOTOFF_GLOBAL.
3418         (*got_page<mode>): Use got_page_ofst_operand instead of
3419         local_got_operand.
3420         * config/mips/predicates.md (const_call_insn_operand): Use
3421         SYMBOL_GOT_DISP instead of SYMBOL_GOT_GLOBAL.
3422         (global_got_operand): Rename to...
3423         (got_disp_operand): ...this and use SYMBOL_GOT_DISP instead of
3424         SYMBOL_GOT_GLOBAL.
3425         (local_got_operand): Rename to...
3426         (got_page_ofst_operand): ...this and use SYMBOL_GOT_PAGE_OFST instead
3427         of SYMBOL_GOT_LOCAL.
3428
3429 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
3430
3431         * config/mips/mips.h (TARGET_SPLIT_CALLS): Check
3432         TARGET_CALL_CLOBBERED_GP.
3433         (TARGET_SIBCALLS): Check TARGET_USE_GOT instead of TARGET_ABICALLS.
3434         (TARGET_USE_GOT, TARGET_CALL_CLOBBERED_GP): New macros.
3435         (TARGET_CALL_SAVED_GP, TARGET_USE_PIC_FN_ADDR_REG): Likewise.
3436         (STARTING_FRAME_OFFSET): Check TARGET_CALL_CLOBBERED_GP instead
3437         of TARGET_ABICALLS && !TARGET_NEWABI.
3438         (MIPS_CALL): Check TARGET_USE_GOT instead of TARGET_ABICALLS.
3439         * config/mips/mips.c (mips_load_call_address): Check
3440         TARGET_CALL_SAVED_GP instead of TARGET_NEWABI.
3441         (mips_global_pointer): Check TARGET_USE_GOT instead of TARGET_ABICALLS.
3442         Check TARGET_CALL_SAVED_GP instead of TARGET_NEWABI.
3443         (mips_save_reg_p): Check TARGET_CALL_SAVED_GP instead of
3444         TARGET_ABICALLS && TARGET_NEWABI.
3445         (mips_current_loadgp_style): Check TARGET_USE_GOT instead of
3446         TARGET_ABICALLS.
3447         (mips_expand_prologue): Check TARGET_OLDABI instead of !TARGET_NEWABI.
3448         (mips_expand_epilogue): Check TARGET_CALL_SAVED_GP instead of
3449         TARGET_ABICALLS && TARGET_NEWABI.
3450         (mips_output_mi_thunk): Check TARGET_USE_GOT instead of
3451         TARGET_ABICALLS.  Check TARGET_CALL_SAVED_GP instead of
3452         TARGET_NEWABI.  Use TARGET_USE_PIC_FN_ADDR_REG to decide
3453         whether indirect calls must use $25.
3454         (mips_extra_live_on_entry): Check TARGET_GOT instead of
3455         TARGET_ABICALLS.
3456         * config/mips/mips.md (jal_macro): Check flag_pic and
3457         TARGET_CALL_CLOBBERED_GP instead of TARGET_ABICALLS and TARGET_NEWABI.
3458         (builtin_setjmp_setup, builtin_longjmp): Check TARGET_USE_GOT
3459         instead of TARGET_ABICALLS.
3460         (exception_receiver): Check TARGET_CALL_CLOBBERED_GP instead of
3461         TARGET_ABICALLS && TARGET_OLDABI.
3462         (load_call<mode>): Check TARGET_USE_GOT instead of TARGET_ABICALLS.
3463         (sibcall): In the comment above the define_insn, mention
3464         TARGET_USE_PIC_FN_ADDR_REG instead of TARGET_ABICALLS.
3465         * config/mips/constraints.md (c): Check TARGET_USE_PIC_FN_ADDR_REG
3466         instead of TARGET_ABICALLS.
3467
3468 2007-04-12  Bernd Schmidt  <bernd.schmidt@analog.com>
3469
3470         * doc/md.texi (Blackfin family constraints): Document PA and PB.
3471         * config/bfin/bfin.h (CONST_OK_FOR_P): Handle PA and PB.
3472         (MACFLAGS_MATCH_P): New macro.
3473         * config/bfin/bfin.c (print_operand): Handle MACFLAG_IS_M.
3474         (bfin_secondary_reload): Treat EVEN_AREGS and ODD_AREGS like AREGS.
3475         * config/bfin/bfin.md (MACFLAG_IS_M): New constant.  Renumber some of
3476         the other MACFLAG constants.
3477         (sum_of_accumulators, lshrpdi3, ashrpdi3): New patterns.
3478         (flag_machi): Tighten constraints.  Renumber some of the operands.
3479         (flag_machi_acconly): Tighten constraints.  Correct operand numbers in
3480         output template.
3481         (flag_machi_parts_acconly): New pattern.
3482         (flag_macinithi): Tighten constraints.  Allow any accumulator to be
3483         used.
3484         (flag_macinit1hi): Tighten constraints.
3485         (flag_mul_macv2hi_parts_acconly): New pattern.
3486
3487         * config/bfin/lib1funcs.asm (___umulsi3_highpart, __smulsi3_highpart):
3488         Use a more efficient implementation.
3489         * config/bfin/bfin.md (umulsi3_highpart, smulsi3_highpart): Emit
3490         inline sequences when not optimizing for size.
3491
3492         * config/bfin/bfin.md (movhi_low2high, movhi_high2high, movhi_low2low,
3493         movhi_high2low): Delete, merge functionality into...
3494         (packv2hi): ... this pattern.
3495
3496         2007-02-11  Jie Zhang  <jie.zhang@analog.com>
3497         * config/bfin/bfin.opt (msim): New option.
3498         (mcpu=): New option.
3499         * config/bfin/bfin-protos.h (enum bfin_cpu): New.
3500         (bfin_cpu_t): Typedef of enum bfin_cpu.
3501         (bfin_cpu_type): New declaration.
3502         * config/bfin/elf.h (STARTFILE_SPEC): Add support for
3503         -msim and -mcpu= options.
3504         (LIB_SPEC): Likewise.
3505         * config/bfin/bfin.c (bfin_cpu_type): Define.
3506         (bfin_handle_option): Handle -mcpu= option.
3507         * config/bfin/bfin.h (DEFAULT_CPU_TYPE): Define as BFIN_CPU_BF532.
3508         (TARGET_CPU_CPP_BUILTINS): Define __ADSPBF531__, __ADSPBF532__,
3509         __ADSPBF533__ or __ADSPBF537__ according to the cpu type.
3510
3511 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
3512
3513         * config.gcc (*-*-vxworks*): Don't add to tm_files in this stanza.
3514         (arm-wrs-vxworks, mips-wrs-vxworks, powerpc-wrs-vxworks)
3515         (powerpc-wrs-vxworksae): Use ${tm_file}.
3516         (i[4567]86-wrs-vxworks, i[4567]86-wrs-vxworksae): Add svr4.h
3517         after elfos.h.  Remove i386/sysv4.h and add i386/vx-common.h.
3518         * config/i386/vx-common.h: New file.
3519
3520 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
3521
3522         * config/vxworks.h (VXWORKS_STARTFILE_SPEC): Use -l:crt0.o instead
3523         of crt0.o%s.
3524
3525 2007-04-12  Andreas Krebbel  <krebbel1@de.ibm.com>
3526
3527         * config/s390/s390.md ("trunctddd2"): Use TDmode for the target of
3528         ldxtr.
3529
3530 2007-04-12  Douglas Gregor  <doug.gregor@gmail.com>
3531
3532         PR c++/31078
3533         PR c++/31103
3534         * c-common.c (c_build_qualified_type): Set canonical type
3535         appropriately.
3536
3537 2007-04-12  Richard Guenther  <rguenther@suse.de>
3538
3539         * tree-pretty-print.c (dump_generic_node): Print ARRAY_REF
3540         lower bound and element size if lower bound is not zero
3541         or either of the ARRAY_REF operands is set.
3542
3543 2007-04-12  Richard Guenther  <rguenther@suse.de>
3544
3545         PR tree-optimization/24689
3546         PR tree-optimization/31307
3547         * fold-const.c (operand_equal_p): Compare INTEGER_CST array
3548         indices by value.
3549         * gimplify.c (canonicalize_addr_expr): To be consistent with
3550         gimplify_compound_lval only set operands two and three of
3551         ARRAY_REFs if they are not gimple_min_invariant.  This makes
3552         it never at this place.
3553         * tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Likewise.
3554
3555 2007-04-11  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3556
3557         * pa.c (pa_som_asm_init_sections): Ensure that cfun->machine is not
3558         null before emitting a .nsubspa directive.
3559
3560 2007-04-11  Diego Novillo  <dnovillo@redhat.com>
3561
3562         * tree-ssa-alias.c (dump_mem_ref_stats): Do not call
3563         need_to_partition_p if there are no memory statements in the
3564         function.
3565
3566 2007-04-11  Zdenek Dvorak  <dvorakz@suse.cz>
3567
3568         * tree-data-ref.c (chrec_steps_divide_constant_p): Removed.
3569         (gcd_of_steps_may_divide_p): New function.
3570         (analyze_miv_subscript): Use gcd_of_steps_may_divide_p.
3571
3572 2007-04-11  Bernd Schmidt  <bernd.schmidt@analog.com>
3573
3574         * reload.c (find_reloads_toplev, find_reloads_address,
3575         find_reloads_address_1, find_reloads_subreg_address): Use rtx_equal_p,
3576         not a pointer equality test, to decide if we need to call
3577         push_reg_equiv_alt_mem.
3578
3579 2007-04-11  Sebastian Pop  <sebastian.pop@inria.fr>
3580
3581         * tree-data-ref.c (affine_function_zero_p, constant_access_functions,
3582         insert_innermost_unit_dist_vector, add_distance_for_zero_overlaps): New.
3583         (build_classic_dist_vector): Call add_distance_for_zero_overlaps.
3584
3585 2007-04-11  Zdenek Dvorak  <dvorakz@suse.cz>
3586
3587         * tree-data-ref.c (add_multivariate_self_dist): Force the distance
3588         vector to be positive.
3589
3590 2007-04-11  Diego Novillo  <dnovillo@redhat.com>
3591
3592         PR 30735
3593         PR 31090
3594         * doc/invoke.texi: Document --params max-aliased-vops and
3595         avg-aliased-vops.
3596         * tree-ssa-operands.h (get_mpt_for, dump_memory_partitions,
3597         debug_memory_partitions): Move to tree-flow.h
3598         * params.h (AVG_ALIASED_VOPS): Define.
3599         * tree-ssa-alias.c (struct mp_info_def): Remove.  Update all
3600         users.
3601         (mp_info_t): Likewise.
3602         (get_mem_sym_stats_for): New.
3603         (set_memory_partition): Move from tree-flow-inline.h.
3604         (mark_non_addressable): Only clear the set of symbols for the
3605         partition if it exists.
3606         (dump_memory_partitions): Move from tree-ssa-operands.c
3607         (debug_memory_partitions): Likewise.
3608         (need_to_partition_p): New.
3609         (dump_mem_ref_stats): New.
3610         (debug_mem_ref_stats): New.
3611         (dump_mem_sym_stats): New.
3612         (debug_mem_sym_stats): New.
3613         (update_mem_sym_stats_from_stmt): New.
3614         (compare_mp_info_entries): New.
3615         (mp_info_cmp): Call it.
3616         (sort_mp_info): Change argument to a list of mem_sym_stats_t
3617         objects.
3618         (get_mpt_for): Move from tree-ssa-operands.c.
3619         (find_partition_for): New.
3620         (create_partition_for): Remove.
3621         (estimate_vop_reduction): New.
3622         (update_reference_counts): New.
3623         (build_mp_info): New.
3624         (compute_memory_partitions): Refactor.
3625         Document new heuristic.
3626         Call build_mp_info, update_reference_counts,
3627         find_partition_for and estimate_vop_reduction.
3628         (compute_may_aliases): Populate virtual operands before
3629         calling debugging dumps.
3630         (delete_mem_sym_stats): New.
3631         (delete_mem_ref_stats): New.
3632         (init_mem_ref_stats): New.
3633         (init_alias_info): Call it.
3634         (maybe_create_global_var): Remove alias_info argument.
3635         Get number of call sites and number of pure/const call sites
3636         from gimple_mem_ref_stats().
3637         (dump_alias_info): Call dump_memory_partitions first.
3638         (dump_points_to_info_for): Show how many times a pointer has
3639         been dereferenced.
3640         * opts.c (decode_options): For -O2 set --param
3641         max-aliased-vops to 500.
3642         For -O3 set --param max-aliased-vops to 1000 and --param
3643         avg-aliased-vops to 3.
3644         * fortran/options.c (gfc_init_options): Remove assignment to
3645         MAX_ALIASED_VOPS.
3646         * tree-flow-inline.h (gimple_mem_ref_stats): New.
3647         * tree-dfa.c (dump_variable): Dump memory reference
3648         statistics.
3649         Dump NO_ALIAS* settings.
3650         (referenced_var_lookup): Tidy.
3651         (mem_sym_stats): New.
3652         * tree-ssa-copy.c (may_propagate_copy): Return true if DEST
3653         and ORIG are different SSA names for a memory partition.
3654         * tree-ssa.c (delete_tree_ssa): Call delete_mem_ref_stats.
3655         * tree-flow.h (struct mem_sym_stats_d): Define.
3656         (mem_sym_stats_t): Define.
3657         (struct mem_ref_stats_d): Define.
3658         (struct gimple_df): Add field mem_ref_stats.
3659         (enum noalias_state): Define.
3660         (struct var_ann_d): Add bitfield noalias_state.
3661         (mem_sym_stats, delete_mem_ref_stats, dump_mem_ref_stats,
3662         debug_mem_ref_stats, debug_memory_partitions,
3663         debug_mem_sym_stats): Declare.
3664         * tree-ssa-structalias.c (update_alias_info): Update call
3665         sites, pure/const call sites and asm sites in structure
3666         returned by gimple_mem_ref_stats.
3667         Remove local variable IS_POTENTIAL_DEREF.
3668         Increase NUM_DEREFS if the memory expression is a potential
3669         dereference.
3670         Call update_mem_sym_stats_from_stmt.
3671         If the memory references memory, call
3672         update_mem_sym_stats_from_stmt for all the direct memory
3673         symbol references found.
3674         (intra_create_variable_infos): Set noalias_state field for
3675         pointer arguments according to the value of
3676         flag_argument_noalias.
3677         * tree-ssa-structalias.h (struct alias_info): Remove fields
3678         num_calls_found and num_pure_const_calls_found.
3679         (update_mem_sym_stats_from_stmt): Declare.
3680         * params.def (PARAM_MAX_ALIASED_VOPS): Change description.
3681         Set default value to 100.
3682         (PARAM_AVG_ALIASED_VOPS): Define.
3683
3684 2007-04-11  Richard Guenther  <rguenther@suse.de>
3685
3686         PR middle-end/31530
3687         * simplify-rtx.c (simplify_binary_operation_1): Do not simplify
3688         a * -b + c as c - a * b if we honor sign dependent rounding.
3689
3690 2007-04-11  Bernd Schmidt  <bernd.schmidt@analog.com>
3691
3692         * config/bfin/bfin-protos.h (bfin_expand_movmem): Renamed from
3693         bfin_expand_strmov.
3694         * config/bfin/bfin.c (bfin_expand_prologue, bfin_delegitimize_address,
3695         bfin_function_ok_for_sibcall, split_load_immediate): Remove unused
3696         variables.
3697         (initialize_trampoline): Don't use old-style function definition.
3698         (bfin_secondary_reload): Mark IN_P argument as unused.
3699
3700 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
3701
3702         PR tree-optimization/31343
3703         * tree-chrec.h (chrec_zerop): Moved before build_polynomial_chrec.
3704         (build_polynomial_chrec): Return a scalar when the evolution is zero.
3705         * testsuite/gcc.dg/vect/pr31343.c: New.
3706
3707 2007-04-10  Eric Christopher  <echristo@apple.com>
3708
3709         * config/i386/i386.h (X87_FLOAT_MODE_P): New.
3710         * config/i386/i386.md (*cmpfp0): Use.
3711         (*cmpfp_u, *cmpfp_<mode>, *cmpfp_i_i387): Ditto.
3712         (*cmpfp_iu_387, fix_trunc<mode>_fisttp_i386_1): Ditto.
3713         (fix_trunc<mode>_i386_fisttp): Ditto.
3714         (fix_trunc<mode>_i387_fisttp_with_temp): Ditto.
3715         (*fix_trunc<mode>_i387_1, fix_truncdi_i387): Ditto.
3716         (fix_truncdi_i387_with_temp, fix_trunc<mode>_i387): Ditto.
3717         (fix_trunc<mode>_i387_with_temp, *fp_jcc_1_387): Ditto.
3718         (*fp_jcc_2_387, *fp_jcc_5_387, *fp_jcc_6_387): Ditto.
3719         (*fp_jcc_7_387, *fp_jcc_8<mode>_387): Ditto.
3720         (unnamed_splitters): Ditto.
3721         * config/i386/i386.c (output_fix_trunc): Assert that
3722         we're not being passed a TFmode operand.
3723
3724 2007-04-10  Zdenek Dvorak  <dvorakz@suse.cz>
3725
3726         PR tree-optimization/31526
3727         * tree-inline.c (copy_cfg_body): Use last_basic_block instead of
3728         n_basic_blocks to find newly added blocks.
3729
3730 2007-04-10  Uros Bizjak  <ubizjak@gmail.com>
3731
3732         * config/i386/i386.md (fix_trunc<mode>di_sse): Remove "x" from "xm"
3733         alternative.
3734         (fix_trunc<mode>si_sse): Ditto.
3735         (*floatsisf2_mixed, *floatsisf2_sse): Ditto.
3736         (*floatsidf2_mixed, *floatsidf2_sse): Ditto.
3737         (*floatdisf2_mixed, *floatdisf2_sse): Ditto.
3738         (*floatdidf2_mixed, *floatdidf2_sse): Ditto.
3739         (floathi<mode>2): Rename from floathisf2 and floathidf2. Macroize
3740         expander using SSEMODEF mode macro.
3741         (floatsi<mode>2): Rename from floatsisf2 and floashidf2. Macroize
3742         expander using SSEMODEF mode macro.
3743         (*floathi<mode>2_i387): Rename from *floathisf2_i387 and
3744         *floathidf2_i387. Macroize insn using X87MODEF12 mode macro.
3745         (*floatsi<mode>2_i387): Rename from *floatsisf2_i387 and
3746         *floatsidf2_i387. Macroize insn using X87MODEF12 mode macro.
3747         (*floatdi<mode>2_i387): Rename from *floatdisf2_i387 and
3748         *floatdidf2_i387. Macroize insn using X87MODEF12 mode macro.
3749         (float<mode>xf2): Rename from floathixf2, floatsixf2 and floatdixf2.
3750         Macroize insn using X87MODEF mode macro.
3751
3752 2007-04-09  H.J. Lu  <hongjiu.lu@intel.com>
3753
3754         * config/i386/sse.md (sse2_pinsrw): Removed.
3755         (sse2_pextrw): Renamed to ...
3756         (*sse2_pextrw): This.
3757
3758 2007-04-09  Jan Hubicka  <jh@suse.cz>
3759
3760         PR target/27869
3761         * config/i386/sse.md
3762         (sse_vmaddv4sf3, sse_vmmulv4sf3): Remove '%' modifier.
3763         (sse_vmsmaxv4sf3_finite, sse_vmsminv4sf3_finite): Remove.
3764         (sse2_vmaddv2df3, sse2_vmmulv2df3): Remove '%' modifier.
3765         (sse2_vmsmaxv2df3_finite, sse2_vmsminv2df3_finite): Remove.
3766
3767 2007-04-09  Jan Hubicka  <jh@suse.cz>
3768
3769         * tree-ssa-ccp (maybe_fold_offset_to_component_ref): Recurse into
3770         multiple fields of union.
3771
3772 2007-04-09  Zdenek Dvorak  <dvorakz@suse.cz>
3773
3774         * cfgloopmanip.c (create_preheader): Do not use loop_preheader_edge.
3775         (create_preheaders): Check that loops are available.
3776         (fix_loop_structure): Clean up, improve comments.
3777         * tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa):
3778         Check that loops are available.  Set LOOP_CLOSED_SSA to the loops
3779         state flags.
3780         * tree-scalar-evolution.c (scev_finalize): Clear scalar_evolution_info.
3781         * predict.c (tree_estimate_probability): Do not call
3782         calculate_dominance_info.  Call create_preheaders.
3783         * tree-cfgcleanup.c (cleanup_tree_cfg_loop): Only call
3784         rewrite_into_loop_closed_ssa if LOOP_CLOSED_SSA is set in loops state
3785         flags.
3786         * cfgloop.c (loop_preheader_edge): Assert that loops have preheaders.
3787         * cfgloop.h (LOOP_CLOSED_SSA): New constant.
3788         * tree-cfg.c (tree_split_edge): Make an assert more precise.
3789         * tree-ssa-threadedge.c (thread_across_edge): Comment the function
3790         arguments.
3791
3792 2007-04-08  Jan Hubicka  <jh@suse.cz>
3793
3794         * tree.h (maybe_fold_offset_to_component_ref): Declare.
3795         * tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Export.
3796         * fold-const.c (fold_unary): Use it.
3797
3798 2007-04-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3799
3800         * varasm.c (assemble_variable): Remove call to
3801         lang_hooks.decls.prepare_assemble_variable.
3802         * langhooks-def.h (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
3803         (LANG_HOOKS_DECLS): Remove LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE.
3804         * langhooks.h (lang_hooks_for_decls): Remove
3805         prepare_assemble_variable.
3806
3807 2007-04-08  Mike Stump  <mrs@apple.com>
3808
3809         * config/i386/i386.c: Use inc/dec on Core2.
3810
3811 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
3812
3813         * langhooks.c (lhd_tree_inlining_add_pending_fn_decls,
3814         lhd_tree_inlining_anon_aggr_type_p, lhd_tree_inlining_start_inlining,
3815         lhd_tree_inlining_end_inlining): Remove.
3816         * langhooks.h (struct lang_hooks_for_tree_inlining): Remove then
3817         add_pending_fn_decls, anon_aggr_type_p, start_inlining, and
3818         end_inlining hooks.
3819         * langhooks-def.h (lhd_tree_inlining_add_pending_fn_decls,
3820         lhd_tree_inlining_anon_aggr_type_p, lhd_tree_inlining_start_inlining,
3821         lhd_tree_inlining_end_inlining): Remove prototypes.
3822         (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
3823         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3824         LANG_HOOKS_TREE_INLINING_START_INLINING,
3825         LANG_HOOKS_TREE_INLINING_END_INLINING): Remove.
3826
3827         * c-objc-common.h (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do
3828         not set it.
3829
3830 2007-04-08  Anatoly Sokolov <aesok@post.ru>
3831
3832         PR target/29932
3833         * config/avr/predicates.md (io_address_operand): Delete predicate.
3834         (low_io_address_operand): Don't use 'mode' argument.
3835         (higth_io_address_operand): Rename ...
3836         (high_io_address_operand): ... to this. Don't use 'mode' argument.
3837         * config/avr/avr.md (*sbix_branch_tmp, *sbix_branch_tmp_bit7): Adjust
3838         for above change.
3839
3840 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
3841
3842         Revert change removing staticp.
3843
3844 2007-04-07  Anatoly Sokolov <aesok@post.ru>
3845
3846         PR target/30289
3847         * config/avr/avr.md (*clrmemqi, *clrmemhi): Mark operand 4 as
3848         earlyclobber.
3849
3850 2007-04-07  Bruce Korb  <bkorb@gnu.org>
3851
3852         * c.opt: Add -Wformat-contains-nul.
3853         * c-format.c (set_Wformat):  Set warn_format_contains_nul to the
3854           -Wformat setting.
3855         (check_format_info_main): Check OPT_Wformat_contains_nul before emitting
3856         the NUL byte warning.
3857
3858 2007-04-07  H.J. Lu  <hongjiu.lu@intel.com>
3859
3860         * config/i386/i386.c (ix86_handle_option): Handle SSSE3.
3861
3862 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
3863
3864         * tree.c (staticp): No longer use staticp langhook.
3865         * langhooks.c (lhd_staticp): Removed.
3866         * langhooks.h (struct lang_hooks): Remove staticp.
3867         * c-common.c (c_staticp): Remove.
3868         * c-common.h (c_staticp): Ditto.
3869         * langhooks-defs.h (lhd_staticp): Ditto.
3870         (LHD_HOOKS_STATICP): Ditto
3871         * tree.h (gcc_assert_lowered): New macro.
3872
3873 2007-04-06  Zdenek Dvorak  <dvorakz@suse.cz>
3874
3875         * tree-ssa-loop-niter.c (idx_infer_loop_bounds): Add and use
3876         argument "reliable".
3877         (infer_loop_bounds_from_ref, infer_loop_bounds_from_array):
3878         Add argument "reliable".  Propagate it through calls.
3879         (infer_loop_bounds_from_undefined):  Derive number of iterations
3880         estimates from references in blocks that do not dominate loop latch.
3881         (gcov_type_to_double_int): New function.
3882         (estimate_numbers_of_iterations_loop): Use gcov_type_to_double_int
3883         and expected_loop_iterations_unbounded.
3884         * cfgloopanal.c (expected_loop_iterations_unbounded): New function.
3885         (expected_loop_iterations): Use expected_loop_iterations_unbounded.
3886         * tree-data-ref.c (estimated_loop_iterations): Export.
3887         (get_references_in_stmt): Fix -- do not return addresses of local
3888         objects.
3889         * cfgloop.h (expected_loop_iterations_unbounded,
3890         estimated_loop_iterations): Declare.
3891
3892 2007-04-06  Andreas Tobler  <a.tobler@schweiz.org>
3893
3894         * tree-sra.c (sra_build_elt_assignment): Initialize min/maxshift.
3895
3896 2007-04-06  Uros Bizjak  <ubizjak@gmail.com>
3897
3898         * config/i386/i386.md (extend<mode>xf2): Rename from extendsfxf2
3899         and extenddfxf2. Macroize expander using X87MODEF12 mode macro.
3900         (*truncdfsf_mixed, *truncdfsf_i387, *truncdfsf2_i387_1):
3901         Use output_387_reg_move().
3902         (*truncxf<mode>2): Rename from *truncxfsf2 and truncxfdf2. Macroize
3903         expander using X87MODEF12 mode macro.
3904         (*truncxfsf2_mixed): Combine alternatives, ignore "r" alternative when
3905         choosing register preferences.  Use output_387_reg_move().
3906         (*truncxfdf2_mixed): Combine alternatives, use "r" alternative
3907         instead of "x".  Use output_387_reg_move().
3908         (*truncxf<mode>2_i387_noop): Rename from *truncxfsf2_i387_noop and
3909         *truncxfdf2_i387_noop.  Macroize insn using X87MODEF12 mode macro.
3910         (*truncxf<mode>2_i387): Rename from *truncxfsf2_i387 and
3911         *truncxfdf2_i387.  Macroize insn using X87MODEF12 mode macro.
3912         Use output_387_reg_move().
3913         (*truncxf?f_mixed splitter): Macroize splitter using X87MODEF12
3914         mode macro.
3915         (*truncxf?f_i387 splitter): Ditto.
3916
3917 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
3918
3919         * langhooks-def.h (LANG_HOOKS_INITIALIZER): Remove
3920         LANG_HOOKS_SAFE_FROM_P.
3921         * expr.c (safe_from_p): Remove langhook call.
3922         * langhooks.h (lang_hooks): Remove safe_from_p.
3923         (lhd_safe_from_p): Remove prototype.
3924         * langhooks.c (lhd_safe_from_p): Remove.
3925
3926 2007-04-06  Jan Hubicka  <jh@suse.cz>
3927
3928         * cgraphunit.c (decide_is_function_needed): Do not keep always_inline
3929         functions.
3930
3931 2007-04-06  Uros Bizjak  <ubizjak@gmail.com>
3932
3933         * config/i386/i386.c (output_387_reg_move): Handle memory operand[0].
3934         * config/i386/i386.md (*movsf_1, *movdf_nointeger,
3935         *movdf_integer_rex64, *movdf_integer, *movxf_nointeger,
3936         *movxf_integer): Use output_387_reg_move() for x87 reg->mem
3937         alternative.
3938         (*extendsfdf2_mixed, *extendsfdf2_i387, *extendsfxf2_i387,
3939         *extenddfxf2_i387, *truncdfsf_fast_mixed): Ditto.
3940
3941 2007-04-05  Richard Henderson  <rth@redhat.com>
3942
3943         * config/alpha/alpha.c (print_operand) [+]: Remove.
3944         (alpha_end_function): Print nop if call at end of function.
3945         * config/alpha/alpha.h (PRINT_OPERAND_PUNCT_VALID_P): Remove +.
3946         * config/alpha/alpha.md (UNSPEC_LDGP1): New.
3947         (call_osf_1_er_noreturn, call_value_osf_1_er_noreturn): New.
3948         (call_osf_2_er_nogp, call_value_osf_2_er_nogp): New.
3949         (call_osf_2_er, call_value_osf_2_er): Merge the ldgp highpart into
3950         the call pattern. Update peepholes to match.
3951
3952 2007-04-05  Janis Johnson  <janis187@us.ibm.com>
3953
3954         * doc/extend.texi (Other Builtins): Add decimal float variants
3955         of signbit.
3956         * builtins.def: Ditto.
3957         * builtins.c (expand_builtin): Ditto.
3958
3959 2007-04-05  Uros Bizjak  <ubizjak@gmail.com>
3960             H.J. Lu  <hongjiu.lu@intel.com>
3961
3962         PR target/31478
3963         * config/i386/sse.md (sse2_umulv2siv2di3): Use V4SImode instead
3964         of V8HImode when calling ix86_binary_operator_ok.
3965         (sse2_pmaddwd): Call ix86_binary_operator_ok.
3966         (sdot_prodv8hi): Operands 1 and 2 must be register.
3967
3968 2007-04-05  Alexandre Oliva  <aoliva@redhat.com>
3969
3970         * tree-sra.c (try_instantiate_multiple_fields): Needlessly
3971         initialize align to silence bogus warning.
3972
3973 2007-04-05  Alexandre Oliva  <aoliva@redhat.com>
3974
3975         PR middle-end/22156
3976         * tree-sra.c (struct sra_elt): Add in_bitfld_block.  Remove
3977         all_no_warning.
3978         (struct sra_walk_fns): Remove use_all parameter from use.
3979         (sra_hash_tree): Handle BIT_FIELD_REFs.
3980         (sra_elt_hash): Don't hash bitfld blocks.
3981         (sra_elt_eq): Skip them in parent compares as well.  Handle
3982         BIT_FIELD_REFs.
3983         (sra_walk_expr): Don't maintain or pass down use_all_p.
3984         (scan_use): Remove use_all parameter