OSDN Git Service

c1aa2e0943e7b8a270328cb79d7e7713a7608616
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2007-03-16  Alexandre Oliva  <aoliva@redhat.com>
2
3         PR debug/29906
4         * dwarf2out.c (force_type_die): Adjust comment.
5         (dwarf2out_imported_module_or_decl): Handle base AT_import types.
6
7 2007-03-15  DJ Delorie  <dj@redhat.com>
8
9         * config/frv/predicates.md (minmax_operator): Don't check operands
10         here.
11
12 2007-03-15  Zdenek Dvorak  <dvorakz@suse.cz>
13
14         * tree-ssa-loop-niter.c (record_estimate): Add "upper" argument.
15         Update constant estimates of number of iterations.
16         (record_nonwrapping_iv): Add "upper" argument.  "data_size_bounds_p"
17         argument renamed to "realistic".
18         (compute_estimated_nb_iterations): Removed.
19         (record_niter_bound): New function.
20         (idx_infer_loop_bounds): For possible but unlikely tail arrays,
21         call record_nonwrapping_iv with upper = false.
22         (infer_loop_bounds_from_signedness): Pass upper argument to
23         record_nonwrapping_iv.
24         (estimate_numbers_of_iterations_loop): Do not call
25         compute_estimated_nb_iterations.  Record estimate based on profile
26         information.  Initialize the constant estimates of number of
27         iterations.
28         * tree-data-ref.c (estimated_loop_iterations): Return the recorded
29         estimates.
30         * tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Add dump when
31         number of iterations is too small.
32         * cfgloop.h (struct nb_iter_bound): Remove "realistic" field.
33         (EST_NOT_AVAILABLE): Removed.
34         (struct loop): Replace estimated_nb_iterations by any_upper_bound,
35         nb_iterations_upper_bound, any_estimate and nb_iterations_estimate
36         fields.
37
38 2007-03-15  Zdenek Dvorak  <dvorakz@suse.cz>
39
40         * tree-ssa-loop-niter.c (refine_bounds_using_guard, bound_difference):
41         Handle NE_EXPR guards.
42
43 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
44
45         PR c++/24924
46         * c-opts.c (c_common_post_options): Handle C++ post-processing here.
47         Set also -pedantic-errors by default for the  preprocessor unless
48         -fpermissive is given.
49         
50 2007-03-15  Richard Guenther  <rguenther@suse.de>
51
52         PR middle-end/29719
53         PR middle-end/31161
54         * builtins.c (expand_builtin_cexpi): As a fallback if we
55         don't have builtins for sincos or cexp create a function
56         declaration for cexp and expand to a call to that.
57         (expand_builtin_int_roundingfn): Always fall
58         back to floor/ceil and its variants even if they may be
59         not available.
60
61 2007-03-15  Steven Bosscher  <steven@gcc.gnu.org>
62
63         PR middle-end/31159
64         * cfglayout.c (fixup_reorder_chain): Postpone deleting dead
65         jump tables, move the call to delete_dead_jumptables from here...
66         (cfg_layout_finalize): ...to here.  But rebuild jump labels first.
67         * cfgrtl.c (cfg_layout_can_merge_blocks_p): When not optimizing,
68         don't allow merging of blocks that try_redirect_by_replacing_jump
69         also does not handle when not optimizing.
70
71 2007-03-15  Uros Bizjak  <ubizjak@gmail.com>
72             Francois-Xavier Coudert  <coudert@clipper.ens.fr>
73
74         * config/i386/i386.md (x86_sahf_1): Correctly handle
75         HAVE_AS_IX86_SAHF.
76
77 2007-03-15  Uros Bizjak  <ubizjak@gmail.com>
78
79         PR target/31167
80         * config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use
81         x86_64_general_operand as operand[2] predicate.  Remove "iF"
82         from operand constraints and use "e" constraint instead.
83         (*subti3_1, *subti3_1 splitter): Ditto.
84         (*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as
85         operand[1] predicate.
86
87 2007-03-14  Sebastian Pop  <sebastian.pop@inria.fr>
88
89         * tree-loop-linear.c (gather_interchange_stats): For multidimensional
90         arrays, multiply the access strides by the size of the sub-array.
91         * testsuite/gcc.dg/tree-ssa/ltrans-5.c: New.
92
93 2007-03-14  Uros Bizjak  <ubizjak@gmail.com>
94
95         * configure.ac (HAVE_AS_IX86_SAHF): On x86 targets check whether
96         the configured assembler supports the sahf mnemonic.
97         * configure: Regenerate.
98         * config.in: Regenerate.
99
100         * config/i386/i386.md (x86_sahf_1): Depending on HAVE_AS_IX86_SAHF,
101         emit "sahf" or ".byte\t0x9e" as asm template.
102
103 2007-03-14  Michael Meissner  <michael.meissner@amd.com>
104
105         PR 31018
106         * config/i386/i386.h (X86_TUNE_SHORTEN_X87_SSE): New tuning
107         option to replace hard coded TARGET_xxx in md file.
108         (X86_TUNE_AVOID_VECTOR_DECODE): Ditto.
109         (X86_TUNE_SLOW_IMUL_IMM32_MEM): Ditto.
110         (X86_TUNE_SLOW_IMUL_IMM8): Ditto.
111         (X86_TUNE_MOVE_M1_VIA_OR): Ditto.
112         (X86_TUNE_NOT_UNPAIRABLE): Ditto.
113         (X86_TUNE_NOT_VECTORMODE): Ditto.
114         (TUNE_SHORTEN_X87_SSE): Use new tuning option.
115         (TUNE_AVOID_VECTOR_DECODE): Ditto.
116         (TUNE_SLOW_IMUL_IMM32_MEM): Ditto.
117         (TUNE_SLOW_IMUL_IMM8): Ditto.
118         (TUNE_MOVE_M1_VIA_OR): Ditto.
119         (TUNE_NOT_UNPAIRABLE): Ditto.
120         (TUNE_NOT_VECTORMODE): Ditto.
121         
122         * config/i386/i386.c (ix86_tune_features): Fill in new tuning
123         options.
124
125         * config/i386/i386.md (fix_trunc?f?1_sse peephole2): Use new
126         tuning options instead of hard coded TARGET_xxx.
127         (fix ssemode peephole2's): Ditto.
128         (imul peephole2's): Ditto.
129         (movsi_or): Ditto.
130         (movdi_or_rex64): Ditto.
131         (move peephole2): Ditto.
132         (not peephole2's): Ditto.
133
134 2007-03-14  Dirk Mueller  <dmueller@suse.de>
135
136         * c-common.h (empty_body_warning): Rename to empty_if_body_warning.
137         * c-common.c (empty_if_body_warning): Rephrase diagnostic message.
138         * c-parser.c (c_parser_if_body): Always add an empty statement in case
139         of empty body.
140         * c-parser.c (c_parser_do_statement): Warn about empty body in
141         do/while statement.
142         * c-typeck (c_finish_if_stmt): Call empty_if_body_warning.
143         * doc/invoke.texi (-Wempty-body): Update documentation.
144
145 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
146
147         PR c/21438
148         * c-common.h (warn_for_div_by_zero): Declare.
149         * c-common.c (warn_for_div_by_zero): Define.
150         * c-typeck.c (build_binary_op): Call warn_for_div_zero instead of
151         warning.
152
153 2007-03-14  Richard Sandiford  <richard@codesourcery.com>
154
155         * Makefile.in (PREPROCESSOR_DEFINES): Add directory terminators
156         to PREFIX and STANDARD_PREFIX.
157
158 2007-03-14  Richard Sandiford  <richard@codesourcery.com>
159             Phil Edwards  <phil@codesourcery.com>
160
161         * gthr-vxworks.h: Add an extern "C" wrapper for C++.
162         (__gthread_once_t): Remove busy field for RTPs.
163         (__GTHREAD_ONCE_INIT): Update accordingly.
164
165 2007-03-14  Richard Sandiford  <richard@codesourcery.com>
166
167         * doc/invoke.texi: Document VxWorks options.
168
169 2007-03-14  Uros Bizjak  <ubizjak@gmail.com>
170
171         * doc/invoke.texi (i386 and x86-64 Options): Clarify -msahf option.
172
173 2007-03-13  Seongbae Park <seongbae.park@gmail.com>
174
175         PR tree-optimization/30590
176         * tree-nrv.c (tree_nrv): Check for the partial update of the
177         return value.
178
179 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
180
181         * flags.h (flag_random_seed): Remove declaration, in favor of...
182         * toplev.h (get_random_seed, set_random_seed): ... these.
183         * tree.c (get_file_function_name): Use the former.
184         * opts.c (common_handle_option): Use the latter.
185         * toplev.c
186
187 2007-03-13  Steven Bosscher  <steven@gcc.gnu.org>
188
189         PR middle-end/31127
190         * cse.c (cse_find_path): Do not bail out if a basic block that
191         we already visited now becomes part of a path that starts at a
192         different basic block.  Just disallow this, to make sure we
193         visit each basic block at most once.
194
195 2007-03-13  Jan Hubicka  <jh@suse.cz>
196
197         * ipa-inline.c (cgraph_maybe_hot_edge_p): Look for hot/cold attributes,
198         when profile esitmate is present, calls with very low frequency are
199         cold.
200
201 2007-03-13  Zdenek Dvorak  <dvorakz@suse.cz>
202
203         PR tree-optimization/30730
204         PR tree-optimization/26900
205         * tree-ssa-loop-niter.c: Include gmp.h.
206         (bounds): New type.
207         (mpz_set_double_int, get_type_bounds, mpz_to_double_int,
208         split_to_var_and_offset, determine_value_range,
209         bound_difference_of_offsetted_base, refine_bounds_using_guard,
210         bound_difference, bounds_add, bounds_negate,
211         number_of_iterations_ne_max, dump_affine_iv): New functions.
212         (number_of_iterations_ne, number_of_iterations_lt_to_ne,
213         assert_loop_rolls_lt, assert_loop_rolls_le): Use bounds on the
214         difference of initial and final value of control iv to validate
215         results.
216         (number_of_iterations_cond): Add loop parameter.  Determine bounds
217         on the difference of the extremes of the control iv.  Add dumps.
218         (expand_simple_operations): Handle phi nodes.
219         (simplify_using_initial_conditions): Do not record used conditions.
220         (number_of_iterations_exit): Pass loop to number_of_iterations_cond.
221         Do not set additional_info.
222         (implies_nonnegative_p, implies_ge_p): Removed.
223         (derive_constant_upper_bound): Do not use parameter `additional'.
224         (record_estimate): Parameter `additional' removed.  Parameter
225         `i_bound' added.  Do not call derive_constant_upper_bound.
226         (record_nonwrapping_iv): Use derive_constant_upper_bound to
227         bound the number of iterations estimate.
228         (estimate_numbers_of_iterations_loop): Pass the estimate from
229         the number of iterations analysis to record_estimate.
230         * tree.h (multiple_of_p): Declare.
231         * tree-scalar-evolution.c (expression_expensive_p): Removed.
232         (scev_const_prop): Do not check expression_expensive_p.
233         * fold-const.c (multiple_of_p): Exported.
234         * double-int.c (double_int_mask): Exported.
235         * double-int.h (double_int_mask): Declare.
236         * tree-flow.h (struct tree_niter_desc): Removed additional_info
237         field.  Added max field.
238
239 2007-03-13  David Taylor  <taylor@candd.org>
240
241         PR driver/12448:
242         * gcc.c (cpp_unique_options): If -MT or -MQ is seen, don't pass
243         default -MQ.
244
245 2007-03-13  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
246
247         PR target/31123
248         * pa.md (vdepi_ior): Don't allow zero length deposit.  Likewise for
249         two unamed patterns.
250         
251 2007-03-13  Uros Bizjak  <ubizjak@gmail.com>
252
253         * config/i386/i386.opt (mcx16, msahf): New options.
254         * config/i386/i386.c (x86_cmpxchg16b, x86_sahf): Remove.
255         (ix86_tune_features) [X86_TUNE_USE_SAHF]: Enable for m_GENERIC.
256
257         * config/i386/driver-i386.c (bit_LAHF_LM): New define.
258         (host_detect_local_cpu): Detect cx16 and lahf_lm cpuid bits.
259         Output -mcx16 and -msahf options when corresponding bit is set.
260
261         * doc/invoke.texi (i386 and x86-64 Options): Document -mcx16
262         and -msahf options.
263
264 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
265
266         * configure.ac: Test for assembler tolerance to # 0 "".
267         * configure, config.in: Rebuilt.
268         * final.c (final_scan_insn): Emit it if HAVE_AS_LINE_ZERO.
269
270 2007-03-13  Geoffrey Keating  <geoffk@apple.com>
271
272         * doc/invoke.texi (Spec Files): Update for '%{,' spec.
273
274         * config/rs6000/darwin-fallback.c: Compile file only on powerpc.
275         (handle_syscall): Handle direct system calls.
276         * config/rs6000/darwin.h (HAS_MD_FALLBACK_FRAME_STATE_FOR): Delete.
277
278 2007-03-12  Brooks Moses  <brooks.moses@codesourcery.com>
279
280         * doc/invoke.texi: Fix cpp.info cross-reference.
281         * doc/passes.texi: Fix gcc.info cross-reference.
282
283 2007-03-12  Zdenek Dvorak  <dvorakz@suse.cz>
284
285         PR tree-optimization/30835
286         * lambda-code.c (can_convert_to_perfect_nest): Check whether
287         bb_for_stmt is not NULL before accessing it.
288
289 2007-03-12  Joseph Myers  <joseph@codesourcery.com>
290
291         * gcc.c (main): Handle target_sysroot_hdrs_suffix being NULL for
292         some multilibs.
293
294 2007-03-12  Brooks Moses  <brooks.moses@codesourcery.com>
295
296         PR 30635
297         * doc/install.texi: Document --enable-stage1-languages
298
299 2007-03-12  Steven Bosscher  <steven@gcc.gnu.org>
300
301         * tree-pass.h (pass_into_cfg_layout_mode,
302         pass_outof_cfg_layout_mode): Declare.
303         * cfglayout.c (into_cfg_layout_mode, outof_cfg_layout_mode,
304         pass_into_cfg_layout_mode, pass_outof_cfg_layout_mode): New.
305         * passes.c (pass_into_cfg_layout_mode): Schedule before jump2.
306         (pass_outof_cfg_layout_mode): Schedule after pass_rtl_ifcvt.
307
308 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
309
310         * c-decl.c (warn_variable_length_array): New function.
311         Refactored from grokdeclarator to handle warn_vla
312         and handle unnamed array case.
313         (grokdeclarator): Refactored VLA warning case.
314         * c.opt (Wvla): New flag.
315         * doc/invoke.texi (Wvla): New warning.
316
317 2007-03-12  Richard Henderson  <rth@redhat.com>
318
319         * config/alpha/alpha.c (alpha_elf_section_type_flags): New.
320         (TARGET_SECTION_TYPE_FLAGS): New.
321
322 2007-03-12  Richard Henderson  <rth@redhat.com>
323
324         * config/darwin.c (machopic_reloc_rw_mask): New.
325         * config/darwin-protos.h (machopic_reloc_rw_mask): Declare.
326         * config/darwin.h (TARGET_ASM_RELOC_RW_MASK): New.
327
328 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
329
330         * cppdefault.c (cpp_EXEC_PREFIX): New variable.
331         * cppdefault.h (cpp_PREFIX): Document.
332         (cpp_PREFIX_len): Likewise.
333         (cpp_EXEC_PREFIX): New variable.
334         * Makefile.in (PREPROCESSOR_DEFINES): Add STANDARD_EXEC_PREFIX.
335         * c-incpath.c (add_standard_paths): Correct logic for relocating
336         paths within prefix.
337
338 2007-03-12  Uros Bizjak  <ubizjak@gmail.com>
339
340         * config/i386/i386.md (fixuns_trunc<mode>hi2): Implement from
341         fixuns_truncsfhi2 and fixuns_truncdfhi2 using SSEMODEF
342         mode macro.
343         (fix_trunc<mode>di_sse): Implement from fix_truncsfdi_sse and
344         fix_truncdfdi_sse using SSEMODEF mode macro.
345         (fix_trunc<mode>si_sse): Implement from fix_truncsfsi_sse and
346         fix_truncdfsi_sse using SSEMODEF mode macro.
347         (fix_trunc?f?i_sse peephole2): Implement using SSEMODEF mode macro.
348         (fix_trunc?f?i_sse K8 peephole2): Fix register constraint.
349
350 2007-03-12  Richard Sandiford  <richard@codesourcery.com>
351
352         * config.gcc (i[4567]86-wrs-vxworks, i[4567]86-wrs-vxworksae): Add
353         elfos.h to tm_file.
354
355 2007-03-12  Olga Golovanevsky  <olga@il.ibm.com>
356   
357         * tree.h : Add multiple_of_p declaration.
358         * fold-const.c (multiple_of_p): Make multiple_of_p public. 
359         * ipa-type-escape.c (results_of_malloc): Redundant.
360         (visited_stmts): New. Visited stmt for walk_use_def_chains.
361         (cast_type): Extended with new members.
362         (check_cast): Returns cast_type.
363         (cast): New structure for data of walk_use_def_chains.
364         (is_malloc_result, is_cast_from_non_pointer_1,
365         is_cast_from_non_pointer, 
366         is_array_access_through_pointer_and_index): New functions.
367         (look_for_casts): Returns cast types.
368         (check_call): Returns void.
369         (okay_pointer_operation): Use support of pointer plus index,
370         pointer plus constant and allow all multiplications.
371         
372 2007-03-11  Richard Guenther  <rguenther@suse.de>
373
374         PR tree-optimization/31115
375         * tree-vrp.c (extract_range_from_binary_expr): Make sure
376         the shift count is positive and non-anti-range for RSHIFT_EXPR.
377         A shift count of zero is not special as with *_DIV_EXPR.
378         (vrp_int_const_binop): Handle RSHIFT_EXPR for determining overflow
379         direction.
380
381 2007-03-11  Ian Lance Taylor  <iant@google.com>
382
383         * tree-vrp.c (vrp_int_const_binop): Handle PLUS_EXPR and
384         the *_DIV_EXPR codes correctly with overflow infinities.
385
386 2007-03-11  Ira Rosen  <irar@il.ibm.com>
387
388         * tree-data-ref.c (analyze_offset): Add a return value (bool) to 
389         indicate success/failure of the analysis. Add negation to subtrahend
390         in case of subtraction. Fail if both operands contain constants.
391         (create_data_ref): Fail if analyze_offset fails.
392
393 2007-03-11  Uros Bizjak  <ubizjak@gmail.com>
394
395         * config/i386/i386.md (frndintxf2): Rename to ...
396         (rintxf2): ... this. Remove expander having same name.
397         (rintsf2, rintdf2): Implement using SSEMODEF macro.
398         (roundsf2, rounddf2): Ditto.
399         (lrint<mode>di2, lrint<mode>si2): Implement using SSEMODEI24 macro.
400         (lround<mode>di2, lround<mode>si2): Ditto.
401
402 2007-03-11  Steven Bosscher  <steven@gcc.gnu.org>
403
404         * lower-subreg.c: Include except.h.
405         (decompose_multiword_subregs): Verify that the only control flow
406         insns we can split are loads to multi-words pseudos.
407         Handle breaking such blocks after splitting, instead of calling
408         find_many_sub_basic_blocks.
409
410         * loop-unroll.c (split_edge_and_insert): Don't set BB_SUPERBLOCK
411         on the new basic block.  Add a lengthy comment explaining why we
412         thought this was necessary.
413         * cfglayout.c (cfg_layout_finalize): Don't break superblocks.
414
415 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
416
417         PR c++/30924
418         * tree.c (walk_type_fields): Recurse into the element type of
419         ARRAY_TYPEs if there is a pointer set.
420
421 2007-03-10  Dirk Mueller  <dmueller@suse.de>
422
423         * c-common.c (warn_logical_operator): Fix condition.
424
425 2007-03-10  Tobias Schl├╝ter  <tobi@gcc.gnu.org>
426
427         * config/i386/darwin.h (DARWIN_MINVERSION_SPEC): Add missing
428         quotation mark.
429         * config/darwin.c (machopic_select_section): Remove superfluous
430         argument in call to categorize_decl_for_section.  Remove unused
431         variable shlib.
432
433 2007-03-10  Joseph Myers  <joseph@codesourcery.com>
434
435         * configure.ac (glibc_header_dir): Set using with_build_sysroot if
436         defined.
437         * configure: Regenerate.
438
439 2007-03-10  Uros Bizjak  <ubizjak@gmail.com>
440
441         PR target/31101
442         * config/i386/i386.md (UNSPEC_C2_FLAG): New constant.
443         (fpremxf4_i387, fprem1xf4_i387): Use UNSPEC_C2_FLAG.
444         (fmodxf3, fmod<mode>3, remainderxf3, remainder<mode>3):
445         Add LABEL_NUSES to emitted label.
446         * config/i386/i386.c (ix86_emit_fp_unordered_jump): Add
447         branch probability value to emitted jump insn.
448         * reg-stack.c (subst_stack_regs_pat)[UNSPEC]: Handle UNSPEC_C2_FLAG.
449         Do not check life information and do not re-arrange input operands
450         for UNSPEC_FSCALE_EXP, UNSPEC_FPREM_U and UNSPEC_FPREM1_U.
451
452 2007-03-10  Kaz Kojima  <kkojima@gcc.gnu.org>
453
454         * config/sh/sh.c (sh_insn_length_adjustment): Adjust for
455         the change of decode_asm_operands.
456
457 2007-03-10  Kaz Kojima  <kkojima@gcc.gnu.org>
458
459         * mode-switching.c (create_pre_exit): Skip blockage insn.
460
461 2007-03-09  Diego Novillo  <dnovillo@redhat.com>
462
463         * tree-pass.h (TODO_update_smt_usage): Remove.
464         Update all users.
465         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Remove
466         argument SOME.
467         Update all users.
468
469 2007-03-09  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
470
471         * pa.c (attr_length_call): Revise condition for long pc-relative branch.
472         (output_call): Use "LONG_PIC_SDIFF" instruction sequence for long local
473         calls on the SOM target.  Don't use "LONG_PIC_PCREL" call sequence on
474         SOM target.
475
476 2007-03-09  Geoffrey Keating  <geoffk@apple.com>
477
478         * gcc.c: Document %{, in big comment at top.
479         (input_suffix_matches): Remove special handling for .s and
480         .S.
481         (input_spec_matches): New.
482         (handle_braces): Handle %{,.
483         (validate_switches): ',' indicates a value which is not a switch.
484         * config/alpha/osf.h (ASM_FINAL_SPEC): Use %{, rather than %{.
485         to detect assembler input.
486         * config/i386/sol2.h (CPP_SPEC): Likewise.
487         * config/rs6000/sysv4.h (ASM_SPEC): Likewise.
488         * config/rs6000/vxworks.h (ASM_SPEC): Likewise.
489         * config/rs6000/lynx.h (ASM_SPEC): Likewise.
490         * config/rs6000/linux64.h (ASM_SPEC_COMMON): Likewise.
491         * config/i386/darwin.h (DARWIN_MINVERSION_SPEC): Objective-C plus
492         -m64 causes deployment target to default to 10.5.
493         * config/rs6000/darwin.h (DARWIN_MINVERSION_SPEC): Likewise.
494
495 2007-03-09  Richard Henderson  <rth@redhat.com>
496
497         PR target/26090
498         * target.h (targetm.asm.out.reloc_rw_mask): New.
499         * target-def.h (TARGET_ASM_RELOC_RW_MASK): New.
500         (TARGET_ASM_OUT): Use it.
501         * targhooks.c, targhooks.h (default_reloc_rw_mask): New.
502         * varasm.c (categorize_decl_for_section): Remove shlib argument;
503         use the new reloc_rw_mask target hook instead.
504         (default_section_type_flags_1): Merge into...
505         (default_section_type_flags): ... here.
506         (decl_readonly_section_1): Merge into...
507         (decl_readonly_section): ... here.
508         (default_elf_select_section_1): Merge into...
509         (default_elf_select_section): ... here.
510         (default_unique_section_1): Merge into...
511         (default_unique_section): ... here.
512         (compute_reloc_for_rtx_1, compute_reloc_for_rtx): New.
513         (default_select_rtx_section): Use it.
514         (default_elf_select_rtx_section): Likewise.
515         * output.h: Update to match.
516         * doc/tm.texi (TARGET_ASM_RELOC_RW_MASK): New.
517         * config/alpha/alpha.c (alpha_elf_reloc_rw_mask): New.
518         (TARGET_ASM_RELOC_RW_MASK): New.
519         * config/i386/i386.c (x86_64_elf_select_section): Adjust call
520         to categorize_decl_for_section.
521         (x86_64_elf_unique_section): Likewise.
522         * config/ia64/hpux.h (TARGET_ASM_SELECT_SECTION,
523         TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): Remove.
524         (TARGET_ASM_RELOC_RW_MASK): New.
525         * config/ia64/ia64.c (ia64_rwreloc_select_section,
526         ia64_rwreloc_unique_section, ia64_rwreloc_select_rtx_section): Remove.
527         (ia64_hpux_reloc_rw_mask, ia64_reloc_rw_mask): New.
528         (TARGET_RWRELOC): Remove.
529         (ia64_section_type_flags): Adjust call to default_section_type_flags.
530         * config/ia64/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New.
531         * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): Remove.
532         (rs6000_elf_select_section, rs6000_elf_unique_section): Remove.
533         (rs6000_elf_reloc_rw_mask, rs6000_xcoff_reloc_rw_mask): New.
534         (rs6000_xcoff_select_section): Use decl_readonly_section.
535         (rs6000_xcoff_section_type_flags): Use default_section_type_flags.
536         * config/rs6000/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New.
537         (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): Remove.
538         (TARGET_SECTION_TYPE_FLAGS): Remove.
539         * config/rs6000/xcoff.h (TARGET_ASM_RELOC_RW_MASK): New.
540
541 2007-03-09  Roger Sayle  <roger@eyesopen.com>
542
543         * fold-const.c (fold_comparison): Remove compile-time evaluation of
544         complex constant equality/inequality comparisons for here.
545         (fold_binary) <EQ_EXPR>: Simplify complex comparisons that are
546         known at compile-time or can be simplified to a scalar comparison.
547         (fold_relational_const): Move compile-time evaluation of complex
548         constant equality/inequality comparisons to here.
549
550 2007-03-09  Alexandre Oliva  <aoliva@redhat.com>
551
552         PR rtl-optimization/30643
553         * cse.c (cse_insn): Recompute dest_hash after insert_regs for
554         dest_addr_elt.
555         (fold_rtx): Recurse, like before 2006-11-03.
556
557 2007-03-09  DJ Delorie  <dj@redhat.com>
558
559         * config/m32c/t-m32c (m32c-pragma.o): Add TM_H dependency to
560         m32c-pragma.o.
561
562 2007-03-09  Aldy Hernandez  <aldyh@redhat.com>
563
564         PR tree-optimization/30375
565         * tree-ssa-dse.c (dse_possible_dead_store_p): Do not eliminate if
566         LHS of statements is not the same.
567         * testsuite/gcc.dg/tree-ssa/ssa-dse-10.c: New.
568
569 2007-03-09  Chao-ying Fu  <fu@mips.com>
570
571         * doc/extend.texi (MIPS DSP Built-in Functions): Document the DSP
572         REV 2.
573         * doc/invoke.texi (-mdspr2): Document new option.
574         * config/mips/mips.md (UNSPEC_ABSQ_S_QB .. UNSPEC_DPSQX_SA_W_PH):
575         New unspec for DSP REV 2.
576         (<u>mulsidi3_32bit_internal): Check if !TARGET_DSPR2, because
577         these instructions are extended in DSP REV 2.
578         (mips-dspr2.md): Include.
579         * config/mips/mips.opt (mdspr2): New option.
580         * config/mips/mips.c (mips_function_type): Add MIPS_V4QI_FTYPE_V4QI,
581         MIPS_SI_FTYPE_SI_SI_SI, MIPS_DI_FTYPE_DI_USI_USI, MIPS_DI_FTYPE_SI_SI,
582         MIPS_DI_FTYPE_USI_USI, MIPS_V2HI_FTYPE_SI_SI_SI.
583         (override_options): Check TARGET_DSPR2 to enable MASK_DSP.
584         (CODE_FOR_mips_mul_ph): Define it to CODE_FOR_mulv2hi3.
585         (dsp_bdesc): Add DSP REV 2 builtins.  Remove 32-bit only DSP builtins.
586         (dsp_32only_bdesc): New description table for 32-bit only DSP REV 1
587         and 2 builtins.
588         (bdesc_map): Add one field of unsupported_target_flags.
589         (bdesc_arrays):  Update entries to have extra fields.  Add
590         dsp_32only_bdesc.
591         (mips_init_builtins): Initialize new function types.
592         Check unsupported_target_fileds to filter out builtins.
593         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define __mips_dspr2 if
594         TARGET_DSPR2.
595         (ASM_SPEC): Pass mdspr2 to the assembler.
596         * config/mips/mips-dspr2.md: New file.
597
598 2007-03-09  Sa Liu  <saliu@de.ibm.com>
599
600         * config/rs6000/altivec.md: Fix vcond patterns using if_then_else.
601
602 2007-03-09  Ian Lance Taylor  <iant@google.com>
603
604         * opts.c (common_handle_option): Treat -Wstrict-overflow (with no
605         argument) like -Wstrict-overflow=2.
606         * doc/invoke.texi (Warning Options): Update documentation.
607
608 2007-03-09  Dirk Mueller  <dmueller@suse.de>
609
610         PR c++/17946
611         * doc/invoke.texi (-Wlogical-op): Document.
612         * common.opt (-Wlogical-op): New.
613         * c-common.h (warn_logical_operator): Declare.
614         * c-common.c (warn_logical_operator): Define.
615         * c-typeck.c (parser_build_binary_op): Call
616         warn_logical_operator.
617
618 2007-03-09  Alexandre Oliva  <aoliva@redhat.com>
619
620         * rtl.h (gen_rtx_ASM_INPUT): Use "" instead of NULL file name.
621         * final.c (final_scan_insn): Test for non-"" file name.
622
623 2007-03-09  Sebastian Pop  <sebastian.pop@inria.fr>
624
625         * doc/loop.texi: Document the Omega linear constraints solver.
626         * doc/invoke.texi: Document -fcheck-data-deps, omega-max-vars,
627         omega-max-geqs, omega-max-eqs, omega-max-wild-cards, 
628         omega-hash-table-size, omega-max-keys, and 
629         omega-eliminate-redundant-constraints.
630         * tree-pass.h (pass_check_data_deps): Declared.
631         * omega.c: New.
632         * omega.h: New.
633         * timevar.def (TV_CHECK_DATA_DEPS): Declared.
634         * tree-ssa-loop.c (check_data_deps, gate_check_data_deps, 
635         pass_check_data_deps): New.
636         * tree-data-ref.c (init_data_ref): Remove declaration.
637         (dump_data_dependence_relation): Dump DDR_INNER_LOOP.
638         (analyze_array): Renamed init_array_ref, move up initializations.
639         (init_data_ref): Renamed init_pointer_ref.  Moved before its call.
640         Removed arguments that are set to NULL.
641         (analyze_indirect_ref): Correct indentation, correct call to 
642         init_pointer_ref.
643         (object_analysis): Call init_array_ref instead of analyze_array.
644         (initialize_data_dependence_relation): Initialize DDR_INNER_LOOP.
645         (access_functions_are_affine_or_constant_p): Use DR_ACCESS_FNS instead
646         of DR_ACCESS_FNS_ADDR.
647         (init_omega_eq_with_af, omega_extract_distance_vectors, 
648         omega_setup_subscript, init_omega_for_ddr_1, init_omega_for_ddr,
649         ddr_consistent_p): New.
650         (compute_affine_dependence): Check consistency of ddrs when 
651         flag_check_data_deps is passed.
652         (analyze_all_data_dependences): Uncomment.
653         (tree_check_data_deps): New.
654         * tree-data-ref.h: Include omega.h.
655         (DR_ACCESS_FNS_ADDR): Removed.
656         (data_dependence_relation): Add inner_loop.
657         (DDR_INNER_LOOP): New.
658         * common.opt (fcheck-data-deps): New.
659         * tree-flow.h (tree_check_data_deps): Declare.
660         * Makefile.in (TREE_DATA_REF_H): Depend on omega.h.
661         (OBJS-common): Depend on omega.o.
662         (omega.o): Define.
663         * passes.c (pass_check_data_deps): Scheduled.
664         * params.def (PARAM_OMEGA_MAX_VARS, PARAM_OMEGA_MAX_GEQS, 
665         PARAM_OMEGA_MAX_EQS, PARAM_OMEGA_MAX_WILD_CARDS,
666         PARAM_OMEGA_HASH_TABLE_SIZE, PARAM_OMEGA_MAX_KEYS,
667         PARAM_VECT_MAX_VERSION_CHECKS,
668         PARAM_OMEGA_ELIMINATE_REDUNDANT_CONSTRAINTS): New.
669
670 2007-03-09  Richard Guenther  <rguenther@suse.de>
671
672         PR tree-optimization/30904
673         PR middle-end/31058
674         * tree-vrp.c (extract_range_from_binary_expr): Handle RSHIFT_EXPR
675         the same way as *_DIV_EXPR.
676
677 2007-03-09  Alexandre Oliva  <aoliva@redhat.com>
678
679         * recog.c (decode_asm_operands): No mixed declarations and code.
680
681 2007-03-09  Alexandre Oliva  <aoliva@redhat.com>
682
683         * rtl.def (ASM_INPUT): Add location.
684         * rtl.h (ASM_INPUT_SOURCE_LOCATION): New.
685         (ASM_INPUT_SOURCE_FILE, ASM_INPUT_SOURCE_LINE): New.
686         (decode_asm_operands): Add loc operand.
687         (gen_rtx_ASM_INPUT, gen_rtx_ASM_INPUT_loc): Define.
688         * stmt.c (expand_asm): Rename to...
689         (expand_asm_loc): ... this.  Add locus argument.  Pass it on to
690         gen_rtx_ASM_INPUT_loc.
691         (expand_asm_expr): Adjust.
692         * recog.c (decode_asm_operands): Add loc operand.
693         (check_asm_operands, extract_insn): Adjust.
694         * reload1.c (maybe_fix_stack_asms): Likewise.
695         * final.c (asm_insn_count): Likewise.
696         (final_scan_insn): Output # line before and after asm.
697
698 2007-03-09  Daniel Berlin  <dberlin@dberlin.org>
699
700         * tree-ssa-structalias.c (variable_info): Remove
701         finished_solution.
702         (new_var_info): Ditto.
703         (shared_bitmap_info_t): New structure.
704         (shared_bitmap_table): New variable.
705         (shared_bitmap_hash): New function.
706         (shared_bitmap_eq): Ditto
707         (shared_bitmap_lookup): Ditto.
708         (shared_bitmap_add): Ditto.
709         (merge_smts_into): Change to take bitmap directly.
710         (find_what_p_points_to): Rewrite to use shared bitmap hashtable.
711         (init_alias_vars): Init shared bitmap hashtable.
712         (delete_points_to_sets): Delete shared bitmap hashtable.
713         * tree-ssa-operands.c (add_virtual_operand): Partially revert the
714         is_aliased removal as a change that was still necessary was
715         deleted.
716
717 2007-03-09  Uros Bizjak  <ubizjak@gmail.com>
718
719         * config/i386/i386.h (override_options): Conditionally disable
720         x86_sahf for 64bit targets only.
721
722 2007-03-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>
723
724         PR C/31072
725         * c-decl.c (merge_decls): Don't call make_var_volatile.
726         * varasm.c (make_var_volatile): Remove.
727         * output.h (make_var_volatile): Remove.
728
729 2007-03-08  Zdenek Dvorak  <dvorakz@suse.cz>
730
731         PR tree-optimization/31085
732         * tree-ssa-address.c (create_mem_ref): Fix test of type of base.
733
734 2007-03-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
735
736         * builtins.def (lceil, lceilf, lceill, lfloor, lfloorf, lfloorl,
737         llceil, llceilf, llceill, llfloor, llfloorf, llfloorl): Mark with
738         ATTR_CONST_NOTHROW_LIST.
739         
740         * fold-const.c (tree_expr_nonnegative_warnv_p): Handle
741         FIX_TRUNC_EXPR.
742
743 2007-03-08  Diego Novillo  <dnovillo@redhat.com>
744
745         * doc/tree-ssa.texi: Remove documentation for V_MUST_DEF.
746
747 2007-03-08  Geoffrey Keating  <geoffk@apple.com>
748
749         PR 31013
750         * gccspec.c (lang_specific_driver): Do nothing when NEXT_OBJC_RUNTIME
751         is declared.
752         * config/darwin.h (REAL_LIBGCC_SPEC): When -fgnu-runtime is
753         passed, use shared libgcc.
754
755 2007-03-08  Roger Sayle  <roger@eyesopen.com>
756
757         * tree-eh.c (do_return_redirection): Call build_gimple_modify_stmt
758         instead of calling build2 with a GIMPLE_MODIFY_STMT.
759         (honor_protect_cleanup_actions, lower_try_finally_switch):
760         Likewise.
761         * tree-if-conv.c (replace_phi_with_cond_gimple_modify_stmt,
762         ifc_temp_var): Likewise.
763         * tree-inline.c (setup_one_parameter): Likewise.
764         * tree-mudflap.c (mf_decl_cache_locals,
765         mf_build_check_statement_for): Likewise.
766         * tree-nested.c (init_tmp_var, save_tmp_var,
767         finalize_nesting_tree_1): Likewise.
768         * tree-outof-ssa.c (insert_copy_on_edge,
769         insert_backedge_copies): Likewise.
770         * tree-profile.c (tree_gen_edge_profiler,
771         tree_gen_ic_profiler): Likewise.
772         * tree-scalar-evolution.c (scev_const_prop): Likewise.
773         * tree-sra.c (sra_build_assignment): Likewise.
774         * tree-ssa-loop-im.c (determine_invariantness_stmt): Likewise.
775         * tree-ssa-math-opts.c (insert_reciprocals,
776         execute_cse_sincos_1): Likewise.
777         * tree-tailcall.c (adjust_accumulator_values,
778         adjust_return_value): Likewise.
779         * tree-vect-patterns.c (vect_pattern_recog_1): Likewise.
780         * tree-vect-transform.c (vect_create_data_ref_ptr,
781         bump_vector_ptr, vect_init_vector, get_initial_def_for_induction,
782         vect_create_epilog_for_reduction, vectorizable_reduction,
783         vectorizable_call, vectorizable_conversion,
784         vectorizable_assignment, vectorizable_operation,
785         vectorizable_type_demotion, vect_gen_widened_results_half,
786         vect_permute_store_chain, vectorizable_store,
787         vect_setup_realignment, vect_permute_load_chain,
788         vectorizable_load, vectorizable_condition,
789         vect_create_cond_for_align_checks): Likewise.
790         * tree-vrp.c (build_assert_expr_for): Likewise.
791
792 2007-03-08  Ian Lance Taylor  <iant@google.com>
793
794         * tree-vrp.c: Include "intl.h".
795         (usable_range_p): New static function.
796         (compare_values_warnv): Don't test TYPE_OVERFLOW_UNDEFINED for
797         overflowed values, juts set *strict_overflow_p.
798         (compare_values): Only return -2 if one of the operands is not a
799         constant.
800         (compare_ranges): Call usable_range_p.
801         (compare_range_with_value): Likewise.
802         (vrp_evaluate_conditional_warnv): Rename from
803         vrp_evaluate_conditional.  Make static.  Change all callers.
804         (vrp_evaluate_conditional): New function.
805         (simplify_div_or_mod_using_ranges): Issue warning about reliance
806         on signed overflow.
807         (simplify_abs_using_ranges): Likewise.
808         (simplify_stmt_for_jump_threading): Add within_stmt parameter.
809         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Add
810         within_stmt parameter.
811         * tree-ssa-propagate.c (fold_predicate_in): Update call to
812         vrp_evaluate_conditional.
813         * tree-ssa-threadedge.c
814         (record_temporary_equivalences_from_stmts_at_dest): Change
815         simplify parameter to take a second tree parameter.
816         (simplify_control_stmt_condition): Likewise.
817         (thread_across_edge): Likewise.
818         * tree-flow.h (vrp_evaluate_conditional): Update declaration.
819         (thread_across_edge): Likewise.
820         * gcc/Makefile.in (tree-vrp.o): Depend upon intl.h.
821
822 2007-03-08  Uros Bizjak  <ubizjak@gmail.com>
823
824         * config/i386/i386.h (TARGET_SAHF): New define.
825         * config/i386/i386.c (ix86_tune_features) [X86_TUNE_USE_SAHF]:
826         Also enable for m_K8, m_AMDFAM10 and m_CORE2.
827         (x86_sahf): New global variable.
828         (override_options): Add PTA_NO_SAHF to pta_flags enum.  Recode
829         pta_flags masks using shifts.  Add PTA_NO_SAHF to x86_64 and
830         nocona processor flags.  Set x86_sahf when PTA_NO_SAHF is not set
831         in processor flags.  Do not unconditionally disable TARGET_USE_SAHF
832         for 64-bit.
833         (ix86_fp_comparison_sahf_cost): Return high value for !TARGET_SAHF.
834         (ix86_expand_fp_compare): Check for TARGET_CMOVE or TARGET_SAHF
835         when expanding fcomi/sahf based tests.
836         (ix86_emit_fp_unordered_jump): Check for TARGET_SAHF when
837         expanding sahf based alternative. Emit sahf based sequence when
838         optimizing for code size.
839         * config/i386/i386.md (x86_sahf_1): Do not disable for
840         TARGET_64BIT, enable for TARGET_SAHF. 
841
842 2007-03-08  Martin Michlmayr  <tbm@cyrius.com>
843
844         * tree-ssa-coalesce.c (fail_abnormal_edge_coalesce): Remove
845         spurious whitespace from error message.
846
847 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
848
849         PR c++/30852
850         * c-common.c (fold_offsetof_1): Handle COMPOUND_EXPR.
851
852 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
853
854         * c-decl.c (grokdeclarator): Disable warnings for anonymous
855         bitfields.
856         * tree-sra.c (instantiate_element): Propagate disabled warnings
857         from the element itself to the created variable.
858
859 2007-03-07  Richard Henderson  <rth@redhat.com>
860
861         PR target/30848
862         * reg-stack.c (emit_swap_insn): If a malformed asm was seen,
863         silently fix up the stack in the case of a missing register.
864
865 2007-03-07  Paul Brook  <paul@codesourcery.com>
866
867         * config/arm/libunwind.S: Add .arch/.object_arch for armv4 builds.
868
869 2007-03-07  Joseph Myers  <joseph@codesourcery.com>
870
871         * config/arm/unwind-arm.c (struct wmmxd_regs, struct wmmxc_regs):
872         New.
873         (phase1_vrs): Use them.
874         (DEMAND_SAVE_WMMXD, DEMAND_SAVE_WMMXC): New.
875         (__gnu_Unwind_Save_WMMXD, __gnu_Unwind_Restore_WMMXD,
876         __gnu_Unwind_Save_WMMXC, __gnu_Unwind_Restore_WMMXC): Declare.
877         (restore_non_core_regs): Call __gnu_Unwind_Restore_WMMXD and
878         __gnu_Unwind_Restore_WMMXC if required.
879         (_Unwind_VRS_Pop): Implement iWMMXt support.
880         * config/arm/libunwind.S (gnu_Unwind_Restore_WMMXD,
881         gnu_Unwind_Save_WMMXD, gnu_Unwind_Restore_WMMXC,
882         gnu_Unwind_Save_WMMXC): Define.
883
884 2007-03-07  Richard Sandiford  <richard@codesourcery.com>
885
886         * config/vxworks.h (vxworks_override_options): Declare.
887         (VXWORKS_OVERRIDE_OPTIONS): Use it.
888         * config/vxworks.c: Include target.h and toplev.h.
889         (vxworks_override_options): New function.
890         * config/t-vxworks (vxworks.o): Depend on $(TARGET_H) and toplev.h.
891
892 2007-03-07  Andreas Krebbel  <krebbel1@de.ibm.com>
893
894         * config/s390/s390.c (override_options): Don't emit an error when
895         -mstack-size is used without providing -mstack-guard.
896         (s390_emit_prologue): Choose stack_guard value automatically if not
897         provided via command line.
898         * doc/invoke.texi: Adjust description of -mstack-guard and -mstack-size.
899
900 2007-03-07  Richard Sandiford  <richard@codesourcery.com>
901
902         * config/i386/i386.c (output_set_got): Add a GOT initialization
903         sequence for VxWorks PIC.
904         (legitimate_pic_address_disp_p): Allow UNSPEC_GOT wrappers
905         around labels as well as symbols.  Use gotoff_operand instead
906         of local_symbolic_operand.
907         (legitimize_pic_address): Use gotoff_operand instead of
908         local_symbolic_operand.  Use @GOT accesses for labels as
909         well as symbols.
910         (ix86_output_addr_diff_elt): Use PC-relative rather than
911         GP-relative offsets for VxWorks PIC.
912         (ix86_expand_move): Pass NULL_RTX to legitimize_pic_address unless
913         no_new_pseudos.  Check whether the returned register is op0.
914         * config/i386/i386.md (tablejump): Use PC-relative rather than
915         GP-relative offsets for VxWorks PIC.
916         * config/i386/predicates.md (gotoff_operand): New predicate.
917
918 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
919
920         * config/vxworks.h (VXWORKS_GOTT_BASE, VXWORKS_GOTT_INDEX): Undefine
921         before defining.
922         * config/vxworks-dummy.h: New file.
923         * config/i386/i386.h: Include it.
924
925 2007-03-07  Alexandre Oliva  <aoliva@redhat.com>
926
927         * dwarf2out.c (is_inlined_entry_point): New
928         (add_high_low_attributes): Emit DW_AT_entry_pc along with
929         DW_AT_ranges if the first subblock is the entry point.
930
931 2007-03-06  David Daney  <ddaney@avtrex.com>
932
933         * doc/install.texi (mips-*-*): Change recommended binutils
934         version.
935
936 2007-03-06  Anatoly Sokolov <aesok@post.ru>
937
938         * config/avr/avr.c (avr_mcu_types): Add support for ATmega325P,
939         ATmega3250P, ATmega329P, ATmega3290P, AT90USB82 and AT90USB162 
940         devices.
941         * config/avr/avr.h (LINK_SPEC, CRT_BINUTILS_SPECS): (Ditto.).
942         * config/avr/t-avr (MULTILIB_MATCHES): (Ditto.).
943
944 2007-03-06  Jan Hubicka  <jh@suse.cz>
945
946         * errors.h (warning, error, fatal, internal_error): Mark as cold.
947         * predict.c (maybe_hot_bb): Cold functions are never hot; hot functions
948         are hot.
949         (probably_cold_bb_p): Cold functions are cold.
950         (probably_never_executed_bb_p): Cold functions are cold.
951         (tree_bb_level_predictions): Predict calls to cold functions as not
952         taken.
953         (compute_function_frequency): Check hot/cold attributes.
954         * function.h (function_frequency): Update comments.
955         * predict.def (PRED_COLD_FUNCTION): Predict cold function.
956         * c-common.c (handle_hot_attribute, handle_cold_attribute): New.
957         (c_common_att): Add cold and hot.
958
959         * doc/extend.texi (hot,cold attributes): Document.
960
961 2007-03-06  Andrew Haley  <aph@redhat.com>
962
963         * function.c (expand_function_end): Move blockage to just after we
964         emit the label for the naked return from the function.
965
966 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
967
968         * config/i386/att.h (ASM_OUTPUT_ASCII, ASM_OUTPUT_SKIP): Undefine
969         before redefining.
970
971 2007-03-06  Jan Hubicka  <jh@suse.cz>
972
973         * reg-stack.c (reg_to_stack): Large models don't allow NAN to be
974         loaded for constant large models.  Non-large 64bit PIC can do.
975         * i386.h (CASE_VECTOR_MODE): Large PIC cases are 64bit.
976         * cmodel.h: Add LARGE PIC.
977         * i386.md (UNSPEC_PLTOFF): New.
978         (UNSPEC_SET_RIP, UNSPEC_SET_GOT_OFFSET): New; renumber other unspecs as
979         needed.
980         (*call_1_rex64): Disable for large models.
981         (*call_1_rex64_large): New.
982         (*call_value_1_rex64): Disable for large models.
983         (*call_value_1_rex64_large): New.
984         (set_rip_rex4): New.
985         (set_got_offset_rex64): New.
986         * predicates.md (constant_call_address_operand): For large model
987         constant calls are not possible.
988         * i386-protos.h (construct_plt_address): Declare.
989         * i386.c (override_options): Accept large models.
990         (ix86_expand_prologue): Expand large PIC GOT pointer load.
991         (legitimate_constant_p): Add new UNSPECs.
992         (legitimate_pic_operand_p): Likewise.
993         (legitimate_pic_address_disp_p): Disallow local symbols for large PICs.
994         (legitimize_pic_address): Do easy RIP relative way for TLS only for
995         non-large model.
996         (output_pic_addr_const): Add PLTOFF.
997         (ix86_output_addr_diff_elt): Output 64bit tables when needed.
998         (ix86_expand_move): Legitimize pic address when in PIC mode.
999         (construct_plt_address): New function.
1000         (ix86_expand_call): Offload the address to register and use GOT pointer
1001         for large model.
1002         * invoke.texi (mcmodel=large): Update documentation.
1003
1004 2007-03-06  Richard Henderson  <rth@redhat.com>
1005
1006         * config/i386/i386.c (x86_use_leave, x86_push_memory,
1007         x86_zero_extend_with_and, x86_movx, x86_double_with_add,
1008         x86_use_bit_test, x86_unroll_strlen, x86_deep_branch,
1009         x86_branch_hints, x86_use_sahf, x86_partial_reg_stall,
1010         x86_partial_flag_reg_stall, x86_use_himode_fiop, x86_use_simode_fiop,
1011         x86_use_mov0, x86_use_cltd, x86_read_modify_write, x86_read_modify,
1012         x86_split_long_moves, x86_promote_QImode, x86_fast_prefix, 
1013         x86_single_stringop, x86_qimode_math, x86_promote_qi_regs,
1014         x86_himode_math, x86_promote_hi_regs, x86_sub_esp_4, x86_sub_esp_8,
1015         x86_add_esp_4, x86_add_esp_8, x86_integer_DFmode_moves, 
1016         x86_partial_reg_dependency, x86_memory_mismatch_stall, 
1017         x86_prologue_using_move, x86_epilogue_using_move, x86_shift1,
1018         x86_sse_partial_reg_dependency, x86_sse_split_regs, 
1019         x86_sse_unaligned_move_optimal, x86_sse_typeless_stores,
1020         x86_sse_load0_by_pxor, x86_use_ffreep, x86_use_incdec,
1021         x86_inter_unit_moves, x86_ext_80387_constants, x86_four_jump_limit,
1022         x86_schedule, x86_use_bt, x86_pad_returns,
1023         x86_use_xchgb): Merge into ...
1024         (ix86_tune_features): ... here.  New array.
1025         (x86_cmove, x86_cmpxchg, x86_cmpxchg8b, x86_xadd,
1026         x86_bswap): Merge into ...
1027         (ix86_arch_features): ... here.  New array.
1028         (x86_3dnow_a): Remove.
1029         (x86_accumulate_outgoing_args): Make static.
1030         (x86_arch_always_fancy_math_387): Make static.
1031         (ix86_tune_mask, ix86_arch_mask): Move ...
1032         (override_options): ... to local variables here.  Apply the
1033         appropriate mask to each element of ix86_arch_features and
1034         ix86_tune_features.  Adjust TARGET_CMOVE and TARGET_USE_SAHF
1035         as were done in the old macros.
1036         (standard_80387_constant_p): Use TARGET_EXT_80387_CONSTANTS.
1037         * config/i386/i386.h (x86_use_leave, x86_push_memory,
1038         x86_zero_extend_with_and, x86_use_bit_test, x86_cmove, x86_deep_branch,
1039         x86_branch_hints, x86_unroll_strlen, x86_double_with_add,
1040         x86_partial_reg_stall, x86_movx, x86_use_himode_fiop,
1041         x86_use_simode_fiop, x86_use_mov0, x86_use_cltd, x86_use_xchgb,
1042         x86_read_modify_write, x86_read_modify, x86_split_long_moves,
1043         x86_promote_QImode, x86_single_stringop, x86_fast_prefix,
1044         x86_himode_math, x86_qimode_math, x86_promote_qi_regs,
1045         x86_promote_hi_regs, x86_integer_DFmode_moves, x86_add_esp_4,
1046         x86_add_esp_8, x86_sub_esp_4, x86_sub_esp_8,
1047         x86_partial_reg_dependency, x86_memory_mismatch_stall,
1048         x86_accumulate_outgoing_args, x86_prologue_using_move,
1049         x86_epilogue_using_move, x86_decompose_lea,
1050         x86_arch_always_fancy_math_387, x86_shift1,
1051         x86_sse_partial_reg_dependency, x86_sse_split_regs,
1052         x86_sse_unaligned_move_optimal, x86_sse_typeless_stores,        
1053         x86_sse_load0_by_pxor, x86_use_ffreep, x86_inter_unit_moves,
1054         x86_schedule, x86_use_bt, x86_cmpxchg, x86_cmpxchg8b, x86_xadd,
1055         x86_use_incdec, x86_pad_returns, x86_bswap,
1056         x86_partial_flag_reg_stall): Remove.
1057         (enum ix86_tune_indices): New.
1058         (ix86_tune_features): New.
1059         (TARGET_USE_LEAVE, TARGET_PUSH_MEMORY, TARGET_ZERO_EXTEND_WITH_AND,
1060         TARGET_USE_BIT_TEST, TARGET_UNROLL_STRLEN,
1061         TARGET_DEEP_BRANCH_PREDICTION, TARGET_BRANCH_PREDICTION_HINTS,
1062         TARGET_DOUBLE_WITH_ADD, TARGET_USE_SAHF, TARGET_MOVX,
1063         TARGET_PARTIAL_REG_STALL, TARGET_PARTIAL_FLAG_REG_STALL,
1064         TARGET_USE_HIMODE_FIOP, TARGET_USE_SIMODE_FIOP, TARGET_USE_MOV0,
1065         TARGET_USE_CLTD, TARGET_USE_XCHGB, TARGET_SPLIT_LONG_MOVES,
1066         TARGET_READ_MODIFY_WRITE, TARGET_READ_MODIFY, TARGET_PROMOTE_QImode,
1067         TARGET_FAST_PREFIX, TARGET_SINGLE_STRINGOP, TARGET_QIMODE_MATH,
1068         TARGET_HIMODE_MATH, TARGET_PROMOTE_QI_REGS, TARGET_PROMOTE_HI_REGS,
1069         TARGET_ADD_ESP_4, TARGET_ADD_ESP_8, TARGET_SUB_ESP_4,
1070         TARGET_SUB_ESP_8, TARGET_INTEGER_DFMODE_MOVES,
1071         TARGET_PARTIAL_REG_DEPENDENCY, TARGET_SSE_PARTIAL_REG_DEPENDENCY,
1072         TARGET_SSE_UNALIGNED_MOVE_OPTIMAL, TARGET_SSE_SPLIT_REGS,
1073         TARGET_SSE_TYPELESS_STORES, TARGET_SSE_LOAD0_BY_PXOR,
1074         TARGET_MEMORY_MISMATCH_STALL, TARGET_PROLOGUE_USING_MOVE,
1075         TARGET_EPILOGUE_USING_MOVE, TARGET_SHIFT1, TARGET_USE_FFREEP,
1076         TARGET_INTER_UNIT_MOVES, TARGET_FOUR_JUMP_LIMIT, TARGET_SCHEDULE,
1077         TARGET_USE_BT, TARGET_USE_INCDEC, TARGET_PAD_RETURNS,
1078         TARGET_EXT_80387_CONSTANTS): Use it.
1079         (enum ix86_arch_indices): New.
1080         (ix86_arch_features): New.
1081         (TARGET_CMOVE, TARGET_CMPXCHG, TARGET_CMPXCHG8B, TARGET_XADD,
1082         TARGET_BSWAP): Use it.
1083         (ix86_tune_mask, ix86_arch_mask): Remove.
1084
1085 2007-03-06  Joseph Myers  <joseph@codesourcery.com>
1086
1087         PR bootstrap/31020
1088         * configure.ac (CROSS_SYSTEM_HEADER_DIR, build_system_header_dir):
1089         Define using $${sysroot_headers_suffix}.
1090         * configure: Regenerate.
1091         * cppdefault.c (cpp_include_defaults): Make FIXED_INCLUDE_DIR a
1092         multilib-suffixed directory if SYSROOT_HEADERS_SUFFIX_SPEC
1093         defined.
1094         * doc/invoke.texi (-print-sysroot-headers-suffix): Document.
1095         * gcc.c (print_sysroot_headers_suffix): New.
1096         (option_map): Include --print-sysroot-headers-suffix.
1097         (display_help): Mention -print-sysroot-headers-suffix.
1098         (process_command): Handle -print-sysroot-headers-suffix.
1099         (do_spec_1): Append multilib directory to include-fixed path if
1100         sysroot suffixes in use.
1101         (main): Handle -print-sysroot-headers-suffix.
1102         * Makefile.in (start.encap): Don't depend on xlimits.h
1103         (xlimits.h): Remove.
1104         (stmp-int-hdrs): Don't depend on xlimits.h.  Inline generation of
1105         limits.h for each multilib in fixinc_list.
1106         (fixinc_list, s-fixinc_list): New.
1107         (stmp-fixinc): Depend on fixinc_list.  If not copying headers,
1108         generate them for each multilib in fixinc_list.
1109         (stmp-fixproto): Use include-fixed.  Run fixproto for each
1110         multilib in fixinc_list.
1111         (mostlyclean): Don't remove xlimits.h.
1112         (clean): Remove include-fixed.
1113         (real-install-headers-tar, real-install-headers-cpio,
1114         real-install-headers-cp): Don't copy include, only include-fixed.
1115         (install-mkheaders): Depend on fixinc_list.  Don't depend on
1116         xlimits.h.  Save limits.h files for each multilib in fixinc_list.
1117         Always save mkinstalldirs.  Preserve ${sysroot_headers_suffix} in
1118         SYSTEM_HEADER_DIR setting in mkheaders.conf.
1119
1120 2007-03-06  Jan Hubicka  <jh@suse.cz>
1121
1122         * regstack.c (reg_to_stack): When in 64bit PIC mode, we still can load
1123         NANs easilly.
1124
1125 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
1126
1127         * configure.ac: Allow tm_file to contain build-directory files.
1128         * configure: Regenerate.
1129         * config.gcc (m68k-*-uclinux*): Add ./sysroot-suffix.h to tm_file.
1130         * config/m68k/t-uclinux (sysroot-suffix.h): New target.
1131         * config/m68k/print-sysroot-suffix.sh: New file.
1132
1133 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
1134
1135         * config/m68k/m68k.h (PIC_OFFSET_TABLE_REGNUM): Use the REGNO
1136         of pic_offset_table_rtx if reload_completed.
1137         (CONDITIONAL_REGISTER_USAGE): Use PIC_REG instead of
1138         PIC_OFFSET_TABLE_REGNUM.
1139         * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Always
1140         return true.
1141         (m68k_save_reg): Use PIC_REG instead of PIC_OFFSET_TABLE_REGNO.
1142         (m68k_output_mi_thunk): Rewrite to use RTL.  Honor vcall_offset.
1143
1144 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
1145
1146         * config/m68k/m68k.c (m68k_save_reg): Save the PIC register in
1147         functions that call eh_return.
1148
1149 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
1150
1151         * config/m68k/m68k.c (m68k_save_reg): Save the PIC register in
1152         functions that need a constant pool.
1153
1154 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
1155
1156         PR target/28181
1157         * config/m68k/m68k-protos.h (m68k_secondary_reload_class): Declare.
1158         (m68k_preferred_reload_class): Likewise.
1159         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Remove duplicated comment.
1160         (SECONDARY_RELOAD_CLASS): Define.
1161         (PREFERRED_RELOAD_CLASS): Use m68k_preferred_reload_class.
1162         (LIMIT_RELOAD_CLASS): Delete.
1163         * config/m68k/m68k.c (m68k_regno_mode_ok): Don't prevent address
1164         registers from storing bytes.
1165         (m68k_secondary_reload_class): New function.
1166         (m68k_preferred_reload_class): Likewise.
1167
1168 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
1169
1170         * config/m68k/m68k.c (m68k_save_reg): Remove special case for
1171         leaf functions.
1172         (m68k_expand_prologue): Likewise.
1173
1174 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
1175
1176         * config/m68k/m68k-protos.h (output_sibcall): Declare.
1177         (mips_expand_epilogue): Add a bool parameter.
1178         (m68k_legitimize_sibcall_address): Declare.
1179         * config/m68k/m68k.c (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
1180         (m68k_expand_epilogue): Add a parameter to select between sibling
1181         and normal epilogues.  Only generate a return for the latter.
1182         (m68k_ok_for_sibcall_p): New function.
1183         (m68k_legitimize_sibcall_address, output_sibcall): New functions.
1184         * config/m68k/m68k.md (sibcall, *sibcall): New patterns.
1185         (sibcall_value, *sibcall_value): Likewise.
1186         (*call, *call_value): Require !SIBLING_CALL_P.
1187         (epilogue): Update call to m68k_expand_epilogue.
1188         (sibcall_epilogue): New pattern.
1189         * config/m68k/predicates.md (const_call_operand): Say that this
1190         predicate applies to sibling calls too.
1191         (sibcall_operand): New predicate.
1192
1193 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
1194
1195         * config/m68k/m68k.md (movsf_cf_soft): Provide the same non-mov3q
1196         alternatives as movsi_cf.
1197         (movsf_cf_hard): Add commentary.
1198
1199 2007-03-06  Kazu Hirata  <kazu@codesourcery.com>
1200             Richard Sandiford  <richard@codesourcery.com>
1201
1202         * config/m68k/m68k-protos.h (m68k_interrupt_function_p): Declare.
1203         (m68k_movem_pattern_p, m68k_output_movem): Likewise.
1204         (m68k_expand_prologue, m68k_expand_epilogue): Likewise.
1205         * config/m68k/m68k.h (EPILOGUE_USES): Define.  Treat all registers
1206         as being live on exit from an interrupt function.
1207         (PRINT_OPERAND_PUNCT_VALID_P): Return true for '?'.
1208         * config/m68k/m68k.c (MIN_MOVEM_REGS, MIN_FMOVEM_REGS): New macros.
1209         (m68k_frame): Remove reg_rev_mask and fpu_rev_mask.
1210         (TARGET_ASM_FUNCTION_PROLOGUE, TARGET_ASM_FUNCTION_EPILOGUE): Delete.
1211         (m68k_interrupt_function_p): Globalize.
1212         (m68k_compute_frame_layout): Remove reverse mask code.
1213         (m68k_emit_movem, m68k_set_frame_related): New functions.
1214         (m68k_output_function_prologue): Delete in favor of...
1215         (m68k_expand_prologue): ...this new function.
1216         (m68k_output_function_epilogue): Delete in favor of...
1217         (m68k_expand_epilogue): ...this new function.
1218         (m68k_split_offset, m68k_movem_pattern_p, m68k_output_movem): New
1219         functions.
1220         (print_operand): Handle %?.
1221         * config/m68k/m68k.md (UNSPEC_SIN, UNSPEC_COS): Remove excess space.
1222         (UNSPEC_GOT, A1_REG, PIC_REG, FP0_REG): New constants.
1223         (prologue, epilogue): New patterns.
1224         (return): Turn into a define_expand.
1225         (*return): New pattern, derived from old "return" pattern.  Use rte
1226         rather than rts for interrupt functions.  Only use rtd if the pop
1227         count is nonzero.
1228         (*m68k_store_multiple, *m68k_store_multiple_automod): New patterns.
1229         (*m68k_load_multiple, *m68k_load_multiple_automod): Likewise.
1230         (link, *link, unlink, *unlink, load_got): Likewise.
1231
1232 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
1233
1234         PR target/23482
1235         PR target/17114
1236         * config/m68k/m68k-protos.h (m68k_legitimate_base_reg_p): Declare.
1237         (m68k_legitimate_index_reg_p, m68k_legitimate_address_p): Likewise.
1238         (m68k_matches_q_p, m68k_matches_u_p): Likewise.
1239         * config/m68k/m68k.h (EXTRA_CONSTRAINT): Use m68k_matches_q_p
1240         and m68k_matches_u_p.
1241         (PCREL_GENERAL_OPERAND_OK, LEGITIMATE_BASE_REG_P): Delete.
1242         (INDIRECTABLE_1_ADDRESS_P, GO_IF_NONINDEXED_ADDRESS): Delete.
1243         (GO_IF_INDEXABLE_BASE, GO_IF_INDEXING, GO_IF_INDEXED_ADDRESS): Delete.
1244         (LEGITIMATE_INDEX_REG_P, LEGITIMATE_INDEX_P): Delete.
1245         (GO_IF_COLDFIRE_FPU_LEGITIMATE_ADDRESS): Delete.
1246         (REG_STRICT_P): New macro.
1247         (LEGITIMATE_PIC_OPERAND_P): Use REG_STRICT_P rather than
1248         PCREL_GENERAL_OPERAND_OK.
1249         (REG_OK_FOR_BASE_P): Merge definitions.  Use REG_STRICT_P and
1250         m68k_legitimate_base_reg_p.
1251         (REG_MODE_OK_FOR_INDEX_P): Likewise m68k_legitimate_index_reg_p.
1252         (GO_IF_LEGITIMATE_ADDRESS): Likewise m68k_legitimate_address_p.
1253         (PIC_CASE_VECTOR_ADDRESS): Update comment.
1254         * config/m68k/m68k.c (m68k_address): New structure.
1255         (m68k_legitimate_base_reg_p, m68k_legitimate_index_reg_p)
1256         (m68k_decompose_index, m68k_legitimate_constant_address_p)
1257         (m68k_jump_table_ref_p, m68k_decompose_address)
1258         (m68k_legitimate_address_p, m68k_legitimate_mem_p, m68k_matches_q_p)
1259         (m68k_matches_u_p): New functions.
1260         (print_operand_address): Rewrite to use m68k_decompose_index.
1261
1262 2007-03-05  David Taylor  <dtaylor@emc.com>
1263
1264         * gcc.c: Correct copyright date in --version output.
1265
1266 2007-03-05  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1267
1268         * pa.md: In unamed move patterns, disparge copies between general
1269         and floating point registers using '?' modifier.  Don't include 'f'
1270         constraint for register preferences in DImode, SImode, HImode and
1271         QImode patterns.  Likewise for 'r' in DFmode and SFmode patterns.
1272         Remove constraints for copies between general and floating registers
1273         in soft-float DFmode pattern.
1274         (movdf): Fail if operand1 is a CONST_DOUBLE and operand0 is a hard
1275         floating register.
1276         (movsf): Likewise. 
1277
1278 2007-03-05  Mike Stump  <mrs@apple.com>
1279
1280         * c-common.c (targetcm): Add.
1281         * c-opts.c (c_common_handle_option): Handle language specific
1282         target options.
1283         * opts.c (handle_option): Verify language for target options, if
1284         any are given.
1285         * opth-gen.awk: Add CL_LANG_ALL.
1286         * target-def.h (TARGET_HANDLE_C_OPTION): Add.
1287         (TARGETCM_INITIALIZER): Add.
1288         * target.h (struct gcc_targetcm): Add.
1289         (targetcm): Add.
1290         * targhooks.c (default_handle_c_option): Add.
1291         * targhooks.h (default_handle_c_option): Add.
1292         * doc/tm.texi (TARGET_HANDLE_C_OPTION): Add.
1293
1294         * config/darwin.opt (iframework): Add.
1295         * config/darwin.h (TARGET_HAS_TARGETCM): Add.
1296         * config/darwin-c.c (handle_c_option): Add.
1297         (TARGET_HANDLE_C_OPTION): Add.
1298         (targetcm): Add.
1299         * doc/invoke.texi (Darwin Options): Add -iframework.
1300
1301 2007-03-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1302
1303         * convert.c (convert_to_integer): Fix nearbyint/rint -> *lrint
1304         conversion.
1305
1306 2007-03-05  Ian Lance Taylor  <iant@google.com>
1307
1308         * c.opt (fgnu89-inline): New option.
1309         * c-opts.c (c_common_post_options): Set default value for
1310         flag_gnu89_inline.
1311         * c-decl.c (WANT_C99_INLINE_SEMANTICS): Remove.
1312         (pop_scope): Check flag_gnu89_inline rather than flag_isoc99 for
1313         inline functions.
1314         (diagnose_mismatched_decls, merge_decls, start_decl): Likewise.
1315         (grokdeclarator, start_function): Likewise.
1316         * c-cppbuiltin.c (c_cpp_builtins): Define either
1317         __GNUC_GNU_INLINE__ or __GNUC_STDC_INLINE__.
1318         * doc/invoke.texi (Option Summary): Mention -fgnu89-inline.
1319         (C Dialect Options): Document -fgnu89-inline.
1320         * doc/extend.texi (Function Attributes): Explain what the
1321         gnu_inline attribute does.
1322         * doc/cpp.texi (Common Predefined Macros): Document
1323         __GNUC_GNU_INLINE__ and __GNUC_STDC_INLINE__.
1324
1325 2007-03-05  Ian Lance Taylor  <iant@google.com>
1326
1327         PR tree-optimization/31034
1328         * tree-vrp.c (extract_range_from_assert): Don't try to handle a
1329         half-range if the other side is an overflow infinity.
1330
1331 2007-03-05  Bernd Schmidt  <bernd.schmidt@analog.com>
1332
1333         * config.gcc (bfin*-uclinux*): Use t-bfin-uclinux.
1334         (bfin*-linux-uclibc*): New configuration.
1335         * config/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Undefined before
1336         defining.
1337         * config/bfin/linux.h: New file.
1338         * config/bfin/libgcc-bfin.ver: New file.
1339         * config/bfin/t-bfin-uclinux: New file.
1340         * config/bfin/t-bfin-linux: New file.
1341         * config/bfin/uclinux.h (LINUX_TARGET_OS_CPP_BUILTINS): New macro.
1342         (TARGET_OS_CPP_BUILTINS): New macro.
1343
1344 2007-03-05  Richard Guenther  <rguenther@suse.de>
1345
1346         * fold-const.c (fold_binary): Remove duplicate folding
1347         of comparison of non-null ADDR_EXPR against null.
1348
1349 2007-03-05  Richard Guenther  <rguenther@suse.de>
1350             Dorit Nuzman  <dorit@il.ibm.com>
1351
1352         PR tree-optimization/26420
1353         * tree-vectorizer.c (vectorize_loops): Bail out early if there
1354         are no loops in the function.  Only print the number of
1355         vectorized loops if it is greater than zero or we are supposed
1356         to print information about unvectorized loops.
1357
1358 2007-03-05  Revital Eres  <eres@il.ibm.com>
1359
1360         * gcc.dg/var-expand1.c: New test.
1361         * loop-unroll.c (analyze_insn_to_expand_var): Add dump info
1362         when an accumulator is expanded.
1363
1364 2007-03-04  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1365
1366         PR other/30465
1367         * c-common.c (convert_and_check): Don't give warnings for
1368         conversion if 'expr' already overflowed.
1369         
1370 2007-03-04  Roger Sayle  <roger@eyesopen.com>
1371
1372         PR middle-end/30744
1373         * fold-const.c (fold_comparison): Enforce type consistency when
1374         transforming ~X op ~Y to Y op X, and ~X op C to X op' ~C.
1375
1376 2007-03-04  Zdenek Dvorak  <dvorakz@suse.cz>
1377
1378         * tree-ssa-address.c (create_mem_ref): Do not put an expression
1379         containing a cast to the base of TARGET_MEM_REF.
1380
1381 2007-03-04  Martin Michlmayr  <tbm@cyrius.com>
1382
1383         * tree.c (tree_contains_struct_check_failed): Remove spurious
1384         whitespace from error message.
1385
1386 2007-03-04 Andrew Pinski <andrew_pinski@playstation.sony.com>
1387
1388         PR target/30406
1389         * config/rs6000/rs6000.c (rs6000_function_value): Look at bit size
1390         instead of precision.
1391
1392 2007-03-04  Roman Zippel <zippel@linux-m68k.org>
1393             Nathan Sidwell  <nathan@codesourcery.com>
1394
1395         * emit-rtl.c (find_auto_inc): New.
1396         (try_split): recreate REG_INC notes,
1397         Use regular for loops rather than whiles.
1398
1399 2007-03-03  Andreas Schwab  <schwab@suse.de>
1400
1401         * configure.ac (HAVE_AS_REL16): Move test back to correct place.
1402         * configure: Regenerate.
1403
1404 2007-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1405
1406         * builtins.def (ATTR_MATHFN_FPROUNDING): Rely on
1407         flag_rounding_math, not flag_unsafe_math_optimizations.
1408
1409         * c-pretty-print.c (pp_c_direct_abstract_declarator): Use
1410         fold_build2.
1411         * config/alpha/alpha.c (alpha_fold_builtin_zapnot,
1412         alpha_fold_vector_minmax): Likewise.
1413         * config/i386/i386.c (ix86_gimplify_va_arg): Likewise.
1414         * config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise.
1415
1416 2007-03-02  Eric Botcazou  <ebotcazou@adacore.com>
1417
1418         * tree-sra.c (sra_walk_fns) <ldst>: Document new restriction.
1419         (sra_walk_modify_expr) <rhs_elt>: Treat the reference as a use
1420         if the lhs has side-effects.
1421         <lhs_elt>: Treat the reference as a use if the rhs has side-effects.
1422
1423 2007-03-02  Uros Bizjak  <ubizjak@gmail.com>
1424
1425         * config/i386/i386.h (TUNEMASK): Remove define.
1426         (ARCHMASK): Remove define.
1427         (TARGET_*): Use ix86_tune_mask variable instead of TUNEMASK.
1428          Use ix86_arch_mask variable instead of ARCHMASK.
1429         * config/i386/i386.c (override_options): Ditto.
1430         (standard_80387_constant_p): Ditto.
1431
1432 2007-03-02  Ian Lance Taylor  <iant@google.com>
1433
1434         Used signed infinities in VRP.
1435         * tree-vrp.c (uses_overflow_infinity): New static function.
1436         (supports_overflow_infinity): New static function.
1437         (make_overflow_infinity): New static function.
1438         (negative_overflow_infinity): New static function.
1439         (positive_overflow_infinity): New static function.
1440         (is_negative_overflow_infinity): New static function.
1441         (is_positive_overflow_infinity): New static function.
1442         (is_overflow_infinity): New static function.
1443         (overflow_infinity_range_p): New static function.
1444         (compare_values_warnv): New function split out of compare_values.
1445         (compare_value): Call it.
1446         (set_value_range_to_nonnegative): Add overflow_infinity
1447         parameter.  Change caller.
1448         (vrp_expr_computes_nonnegative): Add strict_overflow_p parameter.
1449         Change callers.
1450         (vrp_expr_computes_nonzero): Likewise.
1451         (compare_ranges, compare_range_with_value): Likewise.
1452         (compare_name_with_value, compare_names): Likewise.
1453         (vrp_evaluate_conditional): Likewise.
1454         (set_value_range): Handle infinity
1455         (vrp_operand_equal_p, operand_less_p): Likewise.
1456         (extract_range_from_assert): Likewise.
1457         (vrp_int_const_binop): Likewise.
1458         (extract_range_from_binary_expr): Likewise.
1459         (extract_range_from_unary_expr): Likewise.
1460         (extract_range_from_comparison): Likewise.
1461         (extract_range_from_expr): Likewise.
1462         (dump_value_range): Likewise.
1463         (vrp_visit_cond_stmt, vrp_visit_phi_node): Likewise.
1464         (test_for_singularity): Likewise.
1465         (vrp_int_const_binop): Remove inline qualifier.
1466         (adjust_range_with_scev): Add comment.
1467         * tree-flow.h (vrp_evaluate_conditional): Update declaration.
1468
1469 2007-03-02  Diego Novillo  <dnovillo@redhat.com>
1470
1471         * tree-ssa-structalias.c (could_have_pointers): Tidy.
1472         (get_constraint_for): Likewise.
1473         (do_structure_copy): Likewise.
1474         (find_func_aliases): Fix references to MODIFY_EXPR.
1475         (intra_create_variable_infos): Tidy.
1476         * tree-ssa-operands.c (add_virtual_operand): Add argument
1477         IS_CALL_SITE.
1478         When adding members of alias sets, if IS_CALL_SITE is true and
1479         the symbol is not call-clobbered, skip it.
1480         Adjust all callers.
1481
1482 2007-03-02  Eric Botcazou  <ebotcazou@adacore.com>
1483
1484         * config/alpha/alpha.c (alpha_gp_save_rtx): Insert the insns at the
1485         entry by means of emit_insn_at_entry.
1486
1487 2007-03-02  Richard Henderson  <rth@redhat.com>
1488
1489         * expr.h (promoted_input_arg): Remove decl.
1490         * function.c (promoted_input_arg): Merge into ...
1491         * combine.c (setup_incoming_promotions): ... only caller.
1492         Rearrange to avoid double loop.
1493
1494 2007-03-02  Ben Elliston  <bje@au.ibm.com>
1495             Peter Bergner  <bergner@vnet.ibm.com>
1496             Janis Johnson  <janis187@us.ibm.com>
1497
1498         * config/rs6000/dfp.md: New file.
1499         * config/rs6000/rs6000.md: Include dfp.md.
1500         (add<mode>3_internal1): Disable for DECIMAL_FLOAT_MODE_P operands.
1501         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Handle DDmode
1502         and TDmode decimal float modes in FP registers.
1503         (num_insns_constant): Likewise.
1504         (rs6000_legitimate_offset_address_p): Likewise.
1505         (rs6000_legitimize_address): Likewise.
1506         (rs6000_legitimize_reload_address): Likewise.
1507         (rs6000_legitimate_address): Likewise.
1508         (rs6000_emit_move): Likewise.
1509         (function_arg_boundary): Likewise.
1510         (function_arg_advance): Likewise.
1511         (rs6000_darwin64_record_arg_recurse): Likewise.
1512         (function_arg): Likewise.
1513         (rs6000_gimplify_va_arg): Likewise.
1514         (rs6000_split_multireg_move): Likewise.
1515         (rs6000_output_function_epilogue): Likewise.
1516         (rs6000_output_function_epilogue): Likewise.
1517         (rs6000_register_move_cost): Likewise.
1518         (rs6000_function_value): Likewise.
1519         (rs6000_libcall_value): Likewise.
1520
1521 2007-03-02  Richard Sandiford  <richard@codesourcery.com>
1522
1523         * config/t-vxworks (LIMITS_H_TEST): Define to true for VxWorks.
1524
1525 2007-03-02  Richard Sandiford  <richard@codesourcery.com>
1526
1527         * config/t-vxworks (LIBGCC2_INCLUDES): Pass -nostdinc.
1528         Use $MULTIDIR to choose between the kernel and RTP headers,
1529         and use $WIND_BASE and $WIND_USR to locate them.
1530
1531 2007-03-02  Uros Bizjak  <ubizjak@gmail.com>
1532
1533         * config/i386/i386.c (override_options): Put initialization of
1534         ix86_tune_mask and ix86_arch_mask to the correct place.
1535
1536 2007-03-02  Uros Bizjak  <ubizjak@gmail.com>
1537             Michael Meissner  <michael.meissner@amd.com>
1538
1539         PR target/31019
1540         * config/i386/i386.h (TUNEMASK): Redefine to use ix86_tune_mask.
1541         (ARCHMASK): Define.
1542         (TARGET_CMOVE): Use ARCHMASK.
1543         (TARGET_CMPXCHG): Ditto.
1544         (TARGET_CMPXCHG8B): Ditto.
1545         (TARGET_XADD): Ditto.
1546         (TARGET_BSWAP): Ditto.
1547         * config/i386/i386.c (ix86_tune_mask): New global variable.
1548         (ix86_arch_mask): Ditto.
1549         (override_options): Initialize ix86_tune_mask and
1550         ix86_arch_mask. Use ARCHMASK to clear MASK_NO_FANCY_MATH_387 in
1551         target_flags.
1552
1553 2007-03-02  Ben Elliston  <bje@au.ibm.com>
1554
1555         PR 30992
1556         * config/dfp-bit.c (DFP_TO_INT): Initialise qval with "1.".
1557
1558 2007-03-02  Joseph Myers  <joseph@codesourcery.com>
1559
1560         * target.h (init_dwarf_reg_sizes_extra): New target hook.
1561         * target-def.h (TARGET_INIT_DWARF_REG_SIZES_EXTRA): New default.
1562         * doc/tm.texi (TARGET_INIT_DWARF_REG_SIZES_EXTRA): Document.
1563         * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): Call this
1564         hook.
1565         * config/rs6000/rs6000.c (TARGET_INIT_DWARF_REG_SIZES_EXTRA,
1566         rs6000_init_dwarf_reg_sizes_extra): New.
1567         * config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Support
1568         SPE register high parts.
1569
1570 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1571
1572         * Makefile.in: Add install-pdf target as
1573         copied from automake v1.10 rules.
1574         * configure.ac: Add install-pdf to target list.
1575         * configure: Regenerate.
1576
1577 2007-03-01  Paul Brook  <paul@codesourcery.com>
1578
1579         * config/arm/arm.c (arm_legitimate_index_p): Limit iWMMXt addressing
1580         modes to LDRD for DImode.
1581         (output_move_double): Fixup out of range ldrd/strd.
1582         (vfp_secondary_reload_class): Rename...
1583         (coproc_secondary_reload_class): ... to this.  Add wb argument.
1584         * config/arm/arm.h (SECONDARY_OUTPUT_RELOAD_CLASS): Use
1585         coproc_secondary_reload_class for CLASS_IWMMXT.
1586         (SECONDARY_INPUT_RELOAD_CLASS): Ditto.
1587         * arm-protos.h (coproc_secondary_reload_class): Update prototype.
1588
1589 2007-03-01  Zdenek Dvorak  <dvorakz@suse.cz>
1590
1591         * tree-ssa-loop-prefetch.c (determine_unroll_factor):  Bound the unroll
1592         factor by the estimated number of iterations.
1593         (loop_prefetch_arrays): Do not prefetch in loops that iterate less than
1594         prefetch latency.
1595
1596         * config/i386/driver-i386.c (describe_cache, detect_caches_amd,
1597         decode_caches_intel, detect_caches_intel): New functions.
1598         (host_detect_local_cpu): Use detect_caches_amd and
1599         detect_caches_intel.
1600
1601 2007-03-01  Richard Henderson  <rth@redhat.com>
1602
1603         * expr.c (emit_move_complex_push): Export.
1604         (emit_move_complex_parts): Split out from ...
1605         (emit_move_complex): ... here.
1606         * expr.h (emit_move_complex_push, emit_move_complex_parts): Declare.
1607         * config/i386/i386.md (movcdi): New.
1608
1609 2007-03-01  Uros Bizjak  <ubizjak@gmail.com>
1610
1611         * config/i386/i386.c (ix86_modes_tieable_p): Fix typo, use also
1612         size of mode1 to check for tieable modes in MMX case.
1613
1614 2007-03-01  Richard Sandiford  <richard@codesourcery.com>
1615
1616         * Makefile.in (rtlanal.o): Depend on tree.h.
1617         * rtl.h (offset_within_section_p, split_const): Declare.
1618         * rtlanal.c: Include tree.h.
1619         (offset_within_block_p): New function, taken from
1620         mips_offset_within_object_p.
1621         (split_const): New function, taken from mips_split_const.
1622         * config/m68k/m68k-protos.h (m68k_illegitimate_symbolic_constant_p):
1623         Declare.
1624         * config/m68k/m68k.h (M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P): Define.
1625         (CONSTANT_ADDRESS_P): Only accept legitimate constants.
1626         (LEGITIMATE_CONSTANT_P): Check m68k_illegitimate_symbolic_constant_p.
1627         * config/m68k/m68k.c (TARGET_CANNOT_FORCE_CONST_MEM): Define.
1628         (m68k_illegitimate_symbolic_constant_p): New function.
1629         * config/m68k/m68k.md (movsi): Remove misleading predicates.
1630         If M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P and the source is a
1631         symbolic constant that might be outside the symbol's section,
1632         move the symbol first and then add the offset.
1633         * config/m68k/uclinux.h (M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P):
1634         Override.
1635         * config/mips/mips.c (mips_split_const): Delete.
1636         (mips_offset_within_object_p): Delete.
1637         (mips_symbolic_constant_p): Use offset_within_section_p and
1638         split_const instead of mips_offset_within_object_p and
1639         mips_split_const.
1640         (mips_cannot_force_const_mem, mips_const_insns, mips_unspec_address)
1641         (mips_legitimize_const_move, print_operand_reloc)
1642         (mips_dangerous_for_la25_p): Use split_const instead of
1643         mips_split_const.
1644
1645 2007-02-28  Eric Christopher  <echristo@apple.com>
1646
1647         * Makefile.in (install-include-dir): Don't rm -rf include.
1648
1649 2007-02-28  Richard Guenther  <rguenther@suse.de>
1650
1651         PR middle-end/30364
1652         * fold-const.c (fold_binary): Do not associate expressions
1653         with more than one variable for integer types that do not wrap.
1654
1655 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
1656
1657         * builtins.c (fold_builtin_call_list, fold_builtin_call_valist):
1658         Delete, and replace with...
1659         (fold_builtin_call_array): This.  Update callers to use it.
1660         * fold-const.c (fold_build_call_list): Delete, and replace with...
1661         (fold_build_call_array): This.
1662         (fold_build_call_list_initializer): Delete, and replace with...
1663         (fold_build_call_array_initializer): This.
1664         * tree.h: Update declarations to reflect above changes.
1665
1666         * c-typeck.c (build_function_call): Store converted arguments
1667         in a stack-allocated array instead of building a list.
1668         (convert_arguments): Store arguments in the array passed in as an
1669         argument, and return the actual number of arguments.
1670         * c-format.c: (check_function_format): Pass arguments in an
1671         array instead of a list.
1672         * c-common.c (check_function_nonnull): Likewise.
1673         (check_function_sentinel): Likewise.
1674         (check_function_arguments): Likewise.
1675         * c-common.h: Update declarations to reflect above changes.
1676
1677 2007-02-28  Jan Hubicka  <jh@suse.cz>
1678
1679         * predict.def (PRED_TREE_EARLY_RETURN, PRED_CONST_RETURN,
1680         PRED_NEGATIVE_RETURN): Update outcomes.
1681
1682 2007-02-28  Bernd Schmidt  <bernd.schmidt@analog.com>
1683
1684         * calls.c (emit_library_call_value_1): Handle partial registers
1685         correctly when building up CALL_INSN_FUNCTION_USAGE.
1686
1687 2007-02-27  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1688
1689         * pa/predicates.md (move_src_operand): Allow zero for mode.
1690         * pa/pa.md: Fix constraints for zero CONST_DOUBLE in 64-bit DFmode
1691         move pattern.
1692
1693 2007-02-27  Uros Bizjak  <ubizjak@gmail.com>
1694
1695         PR target/30970
1696         * config/i386/sse.md (*mov<mode>_internal, *movv4sf_internal,
1697         *movv2df_internal): Enable pattern only for valid operand
1698         combinations.
1699         * config/i386/i386.c (ix86_modes_tieable_p): For SSE registers,
1700         tie only 128bit modes. For MMX registers, tie only 64bit modes.
1701
1702 2007-02-27  Mike Stump  <mrs@apple.com>
1703
1704         * config/darwin-crt3.c: Avoid compilation when compiling for a
1705         kext multilib.
1706
1707 2007-02-27  Joseph Myers  <joseph@codesourcery.com>
1708
1709         * Makefile.in (PREPROCESSOR_DEFINES, test-protoize-simple): Define
1710         FIXED_INCLUDE_DIR.
1711         (stmp-int-hdrs, stmp-fixinc, install-headers): Use include-fixed
1712         for fixed headers and limits.h.
1713         (install-include-dir, install-headers-tar, install-headers-cpio,
1714         install-headers-cp, real-install-headers-tar,
1715         real-install-headers-cpio, real-install-headers-cp): Handle
1716         include-fixed as well as include.
1717         (install-mkheaders): Don't install files that go only in include
1718         not include-fixed.
1719         * cppdefault.c (cpp_include_defaults): Separate FIXED_INCLUDE_DIR
1720         from GCC_INCLUDE_DIR.
1721         * gcc.c (process_command): Remove special -BstageN/ handling.
1722         (do_spec_1): Add include-fixed directories.
1723
1724 2007-02-27  Bernd Schmidt  <bernd.schmidt@analog.com>
1725
1726         * config/bfin/t-bfin-elf (LIB1ASMFUNCS): Add _umulsi3_highpart and
1727         _smulsi3_highpart.
1728         * config/bfin/lib1funcs.asm (___umulsi3_highpart, ___smulsi3_highpart):
1729         New functions.
1730         * config/bfin/bfin.md (smulsi3_highpart, umulsi3_highpart): New
1731         patterns.
1732
1733 2007-02-27  Mark Mitchell  <mark@codesourcery.com>
1734
1735         * c-common.c (get_priority): Add check for
1736         SUPPORTS_INIT_PRIORITY.
1737
1738 2007-02-27  Bernd Schmidt  <bernd.schmidt@analog.com>
1739
1740         * config/bfin/bfin.md (doloop_end): FAIL if counter reg isn't SImode.
1741
1742         * config/bfin/bfin.c: Include "cfglayout.h".
1743         (MAX_LSETUP_DISTANCE): New macro.
1744         (struct loop_info): New members incoming, incoming_src and
1745         incoming_dest.  Delete member predecessor.
1746         (length_for_loop): New function.
1747         (bfin_optimize_loop): Handle more different loop structures.
1748         (bfin_discover_loop): Rework detection of predecessor blocks by
1749         examining incoming edges.
1750         (bfin_discover_loops, bfin_free_loops): New functions, broken out of
1751         bfin_reorg_loops.
1752         (bfin_reorder_loops): New function.
1753         (bfin_reorg_loops): Use these three new functions.
1754
1755         * config/bfin/bfin.h (enum reg_class, REG_CLASS_NAMES,
1756         REG_CLASS_CONTENTS): Add D0REGS through D7REGS.
1757         (CONSTRAINT_LEN): Add entry for 'q'.
1758         (REG_CLASS_FROM_CONSTRAINT): Renamed from REG_CLASS_FROM_LETTER.
1759         Add 'q' constraints.
1760         (REGNO_REG_CLASS): For R0 through R7, return corresponding regclass.
1761         (CLASS_LIKELY_SPILLED_P): True for R0, R1 and R2.
1762
1763         * config/bfin/bfin.md (add_with_carry): New pattern.
1764         (s_or_u, su_optab, su_modifier): New code macros/attrs.
1765         (<su_optab>hisi_ll, <su_optab>hisi_lh, <su_optab>hisi_hl,
1766         <su_optab>hisi_hh): Renamed from mulhisi_xx patterns; macroized to
1767         support unsigned multiplies too.  Removed incorrect commutativity from
1768         operand 1 constraint where appropriate.
1769         (usmulhisi_ull, usmulhisi_ulh, usmulhisi_uhl, usmulhisi_uhh): New
1770         patterns.
1771         (<su_optab>hisi_ll_lh, <su_optab>hisi_ll_hl, <su_optab>hisi_ll_hh,
1772         <su_optab>hisi_lh_hl, <su_optab>hisi_lh_hh, <su_optab>hisi_hl_hh):
1773         New patterns.
1774         (usmulhisi_ll_lul, usmulhisi_ll_luh, usmulhisi_ll_hul,
1775         usmulhisi_ll_huh, usmulhisi_lh_lul, usmulhisi_lh_luh, usmulhisi_lh_hul,
1776         usmulhisi_lh_huh, usmulhisi_hl_lul, usmulhisi_hl_luh, usmulhisi_hl_hul,
1777         usmulhisi_hl_huh, usmulhisi_hh_lul, usmulhisi_hh_luh, usmulhisi_hh_hul,
1778         usmulhisi_hh_huh): New patterns.
1779
1780         * config/bfin/bfin.md (ssashiftv2hi3, ssashifthi3, lshiftv2hi3,
1781         lshifthi3): Fix output template to use half reg for operand 2.
1782
1783         * config/bfin/bfin.c (bfin_output_mi_thunk): Use R3 as scratch reg
1784         instead of R2.
1785
1786         * config/bfin/bfin.md (rotl16, rotlsi3, rotrsi3): New patterns.
1787
1788 2007-02-27  Andreas Schwab  <schwab@suse.de>
1789
1790         * Makefile.in (TEXI_GCCINSTALL_FILES): Add gcc-common.texi.
1791
1792 2007-02-27  Jan Hubicka  <jh@suse.cz>
1793
1794         * predict.c (last_basic_block_p): Remove.
1795         (tree_estimate_probability): Update return heuristic for commonized
1796         return blocks.
1797
1798 2007-02-26  Brooks Moses  <brooks.moses@codesourcery.com>
1799
1800         * Makefile.in (TEXI_GCCINSTALL_FILES): Add gcc-vers.texi dependency.
1801
1802 2007-02-26  Brooks Moses  <brooks.moses@codesourcery.com>
1803
1804         * doc/include/gcc-common.texi (versionsubtitle): New macro.
1805         * doc/cpp.texi: Standardize title page.
1806         * doc/cppinternals.texi: Likewise.
1807         * doc/gcc.texi: Standardize title page, remove version number
1808         from copyright page.
1809         * doc/gccint.texi: Likewise.
1810         * doc/install.texi: Standardize title page, add table of
1811         contents.
1812
1813 2007-02-26  Jan Hubicka  <jh@suse.cz>
1814
1815         * predict.def: Set outcomes according to more recent results.
1816         (PRED_LOOP_CONDITION, PRED_LOOP_PRECONDITIONING, PRED_LOOP_HEADER):
1817         Remove dead predictors.
1818         * predict.c (return_prediction): Fix pasto.
1819
1820 2007-02-27  Bernd Schmidt  <bernd.schmidt@analog.com>
1821
1822         * loop-iv.c (simplify_using_initial_values): Fix oversight in previous
1823         change; avoid a memory leak when returning early.
1824
1825 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
1826
1827         * c-decl.c (static_ctors): Move to c-common.c.
1828         (static_dtors): Likewise.
1829         (finish_function): Use c_record_cdtor_fn.
1830         (build_cdtor): Move to c-common.c.
1831         (c_write_global_declarations): Use c_build_cdtor_fns.
1832         * c-common.h (static_ctors): Declare.
1833         (static_dtors): Likewise.
1834         (c_record_cdtor_fn): Likewise.
1835         (c_build_cdtor_fns): Likewise.
1836         * c-common.c (static_ctors): New variable.
1837         (static_dtors): Likewise.
1838         (c_record_cdtor_fn): New function.
1839         (build_cdtor): Move from c-decl.c
1840         (c_build_cdtor_fns): New function.
1841
1842         * output.h (assemble_addr_to_section): Declare.
1843         (get_cdtor_priority_section): Likewise.
1844         * varasm.c (assemble_addr_to_section): New function.
1845         (get_cdtor_priority_section): Likewise.
1846         (default_named_section_asm_out_destructor): Use them.
1847         (destor_dtor_section_asm_out_destructor): Likewise.
1848         (default_named_section_asm_out_constructor): Likewise.
1849         (default_ctor_section_asm_out_constructor): Likewise.
1850         * config.gcc (*-*-vxworks*): Include vxworks.o.
1851         * config/t-vxworks (vxworks.o): New target.
1852         * config/vxworks.h (ALWAYS_NUMBER_CTORS_SECTIONS): Remove.
1853         (TARGET_ASM_CONSTRUCTOR): Define.
1854         (TARGET_ASM_DESTRUCTOR): Likewise.
1855         (vxworks_asm_out_constructor): Declare.
1856         (vxworks_asm_out_destructor): Likewise.
1857
1858         * c-common.c (get_priority): Check that we have not just an
1859         INTEGER_CST, but an integer constant with integeral type.
1860
1861 2007-02-25  Uros Bizjak  <ubizjak@gmail.com>
1862
1863         PR tree-optimization/30938
1864         * tree-vect-transform.c (vectorizable_call): Fix off-by-one error:
1865         use &dt[nargs-1] instead of &dt[nargs] in the call to
1866         vect_is_simple_use().
1867
1868 2007-02-25  Ulrich Weigand  <uweigand@de.ibm.com>
1869
1870         * reload.c (find_reloads_address_1): Handle PLUS expressions resulting
1871         from register elimination as PRE_MODIFY / POST_MODIFY increments.
1872         Do not attempt to handle MEM inside auto-inc expressions.
1873         * reload1.c (eliminate_regs_1): Do not attempt to handle elimination
1874         of a register modified by an auto-inc expression.  However, do handle
1875         elimination of a register used as PRE_MODIFY / POST_MODIFY increment.
1876         (elimination_effects): Prohibit elimination of a register modified
1877         by an auto-inc expression.  Disable register elimination rules whose
1878         target register is modified by an auto-inc expression with variable
1879         increment.
1880
1881 2007-02-25  Zdenek Dvorak  <dvorakz@suse.cz>
1882
1883         * tree-ssa-loop-niter.c (compute_estimated_nb_iterations): Fix
1884         off-by-one error.
1885         (array_at_struct_end_p): New function.
1886         (idx_infer_loop_bounds): Use it.
1887         (estimate_numbers_of_iterations_loop): Export.
1888         * predict.c (predict_loops): Use estimated_loop_iterations_int.
1889         Do not use PRED_LOOP_EXIT on exits predicted by # of iterations.
1890         (tree_estimate_probability): Call record_loop_exits.
1891         * tree-data-ref.c (get_number_of_iters_for_loop): Replaced by ...
1892         (estimated_loop_iterations, estimated_loop_iterations_int,
1893         estimated_loop_iterations_tree): New functions.
1894         (analyze_siv_subscript_cst_affine,
1895         compute_overlap_steps_for_affine_1_2,
1896         analyze_subscript_affine_affine): Use estimated_loop_iterations_int.
1897         (analyze_miv_subscript): Use estimated_loop_iterations_tree.
1898         * predict.def (PRED_LOOP_ITERATIONS): Update comment.
1899         (PRED_LOOP_ITERATIONS_GUESSED): New.
1900         * cfgloop.c (record_loop_exits): Do nothing if there are no loops.
1901         * cfgloop.h (estimate_numbers_of_iterations_loop,
1902         estimated_loop_iterations_int): Declare.
1903
1904 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
1905
1906         * doc/extend.texi: Document optional priority argument to
1907         constructors and destructors.
1908         * tree.c (init_priority_for_decl): Adjust GTY markers.
1909         (init_ttree): Use priority-info hash functions for
1910         init_priority_for_decl.
1911         (tree_map_eq): Rename to ...
1912         (tree_map_base_eq): ... this.
1913         (tree_map_marked_p): Rename to ...
1914         (tree_map_base_marked_p): ... this.
1915         (tree_map_base_hash): New function.
1916         (decl_init_priority_lookup): Rework.
1917         (decl_fini_priority_lookup): New function.
1918         (decl_priority_info): New function.
1919         (decl_init_priority_insert): Use it.
1920         (decl_fini_priority_insert): Likewise.
1921         (decl_restrict_base_lookup): Adjust for refactoring of tree_map
1922         hierarchy.
1923         (decl_restrict_base_insert): Likewise.
1924         (decl_debug_expr_insert): Likewise.
1925         (decl_value_expr_lookup): Likewise.
1926         (decl_value_expr_insert): Likewise.
1927         * tree.h (priority_type): New type.
1928         (decl_init_priority_lookup): Use priority_type.
1929         (decl_fini_priority_lookup): New function.
1930         (decl_init_priority_insert): Use priority_type.
1931         (decl_fini_priority_insert): New function.
1932         (DECL_HAS_INIT_PRIORITY): Tweak comments.
1933         (DECL_INIT_PRIORITY): Likewise.
1934         (SET_DECL_INIT_PRIORITY): Add comment.
1935         (DECL_FINI_PRIORITY): New macro.
1936         (SET_DECL_FINI_PRIORITY): Likewise.
1937         (DEFAULT_INIT_PRIORITY): Document.
1938         (MAX_INIT_PRIORITY): Likewise.
1939         (MAX_RESERVED_INIT_PRIORITY): Likewise.
1940         (tree_map_base): New type.
1941         (tree_map_base_eq): New function.
1942         (tree_map_base_hash): Likewise.
1943         (tree_map_base_marked_p): Likewise.
1944         (tree_map): Inherit from tree_map_base.
1945         (tree_map_eq): Make it a macro.
1946         (tree_map_marked_p): Likewise.
1947         (tree_int_map): Inherit from tree_map_base.
1948         (tree_int_map_eq): Make it a macro.
1949         (tree_int_map_hash): Likewise.
1950         (tree_int_map_marked_p): Likewise.
1951         (tree_priority_map): New type.
1952         (tree_priority_map_eq): New macro.
1953         (tree_priority_map_hash): Likewise.
1954         (tree_priority_map_marked_p): Likewise.
1955         * varasm.c (emults_decl): Adjust for refactoring of tree_map
1956         hierarchy.
1957         (emutls_common_1): Likewise.
1958         * lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise.
1959         * tree-ssa-structalias.c (heapvar_lookup): Adjust for refactoring
1960         of tree_map hierarchy.
1961         * tree-cfg.c (move_stmt_r): Likewise.
1962         (new_label_mapper): Likewise.
1963         * c-tree.h (c_expand_body): Move to ...
1964         * c-common.h (c_expand_body): ... here.
1965         * c-decl.c (c_expand_body): Move to ...
1966         * c-common.c (c_expand_body): ... here.
1967         (c_common_attribute_table): Allow 1 argument for the constructor
1968         and destructor attributes.
1969         (get_priority): New function.
1970         (handle_constructor_attribute): Set DECL_INIT_PRIORITY.
1971         (handle_destructor_attribute): Set DECL_FINI_PRIORITY.
1972
1973 2007-02-24  Jan Hubicka  <jh@suse.cz>
1974
1975         PR middle-end/30509
1976         * tree-inline.c (copy_bb): Produce exact copy of EH info when copying for inlining.
1977
1978 2007-02-24  Uros Bizjak  <ubizjak@gmail.com>
1979             Jan Hubicka  <jh@suse.cz>
1980
1981         PR target/30778
1982         * i386.c (counter_mode): New function.
1983         (expand_set_or_movmem_via_loop): Use it.
1984         (expand_movmem_epilogue): Likewise; fix pasto.
1985         (ix86_expand_movmem): Do emit guard even for constant counts.
1986         (ix86_expand_setmem): Likewise.
1987
1988 2007-02-25  Nick Clifton  <nickc@redhat.com>
1989
1990         * config/frv/frv.h (ASM_OUTPUT_CASE_LABEL): Delete.
1991         (JUMP_TABLES_IN_TEXT_SECTION): Define.
1992
1993 2007-02-24  Uros Bizjak  <ubizjak@gmail.com>
1994
1995         PR target/30770
1996         * config/i386/i386.md (expand_movmem_epilogue): Fix typo, mask
1997         count argument with 0x10, not with 0x16.
1998         (expand_setmem_epilogue): Ditto.
1999
2000 2007-02-24  Mike Stump  <mrs@apple.com>
2001
2002         * config/i386/i386.c (output_pic_addr_const): Stubify optimized
2003         symbols.
2004
2005 2007-02-24  Richard Guenther  <rguenther@suse.de>
2006
2007         PR middle-end/30951
2008         * fold-const.c (fold_binary): Fold x +- CST op x for
2009         EQ_EXPR and NE_EXPR.
2010
2011 2007-02-24  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2012
2013         * pa.md (muldi3): Force subregs to registers in 64-bit expander.
2014
2015 2007-02-24  Jan Hubicka  <jh@suse.cz>
2016
2017         * cgraphunit.c (decide_is_function_needed): Honor
2018         -fkeep-inline-functions.
2019
2020 2007-02-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2021
2022         * builtins.c (fold_builtin_modf): New.
2023         (fold_builtin_2): Use it.
2024
2025 2007-02-24  Bernd Schmidt  <bernd.schmidt@analog.com>
2026
2027         * loop-iv.c (implies_p): Detect additional cases where A implies B.
2028         (determine_max_iter): Take additional LOOP arg; all callers changed.
2029         Lose broken logic dealing with PLUS.  Try to limit the upper bound by
2030         one using simplifications.
2031         (simplify_using_initial_values): Return if the expression becomes
2032         invalid due to altered regs.
2033
2034 2007-02-23  DJ Delorie  <dj@redhat.com>
2035
2036         * doc/tm.h (BIGGEST_ALIGNMENT): Clarify the purpose of this macro.
2037
2038 2007-02-23  Mike Stump  <mrs@apple.com>
2039
2040         * tlink.c (scan_linker_output): Parse linker messages from
2041         darwin9's linker better.
2042
2043 2007-02-23  Steve Ellcey  <sje@cup.hp.com>
2044
2045         PR debug/29614
2046         * varpool.c (varpool_assemble_pending_decls):  Set
2047         varpool_last_needed_node to null.
2048
2049 2007-02-23  DJ Delorie  <dj@redhat.com>
2050
2051         * config/i386/i386.c (ix86_data_alignment): Don't specify an
2052         alignment bigger than the object file can handle.
2053
2054 2007-02-23  Uros Bizjak  <ubizjak@gmail.com>
2055
2056         PR target/30825
2057         * config/i386/i386.md (*movdi_1_rex64, zero_extendsidi2_32,
2058         zero_extendsidi2_rex64): Penalize MMX register<->memory moves.
2059         (*movsf_1): Penalize MMX moves.
2060
2061 2007-02-23  Bernd Schmidt  <bernd.schmidt@analog.com>
2062
2063         * config/bfin/bfin.md (doloop_end): Fail for loops that can iterate
2064         2^32-1 or more times unless flag_unsafe_loop_optimizations.
2065
2066         * loop-iv.c (determine_max_iter): Moved in front of its sole user.
2067
2068 2007-02-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2069
2070         * builtins.c (fold_builtin_logb, fold_builtin_significand): New.
2071         (fold_builtin_1): Use them.
2072         * fold-const.c (tree_expr_nonnegative_warnv_p): Handle
2073         BUILT_IN_SIGNIFICAND.
2074
2075 2007-02-23  H.J. Lu  <hongjiu.lu@intel.com>
2076
2077         * config/i386/i386.c (bdesc_1arg): Initialize
2078         IX86_BUILTIN_MOVSHDUP and IX86_BUILTIN_MOVSLDUP with
2079         "__builtin_ia32_movshdup" and "__builtin_ia32_movsldup".
2080         (ix86_init_mmx_sse_builtins): Remove IX86_BUILTIN_MOVSHDUP
2081         and IX86_BUILTIN_MOVSLDUP.
2082
2083 2007-02-22  Paolo Bonzini  <bonzini@gnu.org>
2084
2085         PR rtl-optimization/30841
2086         * fwprop.c (propagate_rtx_1): Accept a VOIDmode replacement address.
2087
2088 2007-02-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2089
2090         * builtins.c (fold_builtin_frexp): New.
2091         (fold_builtin_2): Use it.
2092
2093 2007-02-22  Mark Mitchell  <mark@codesourcery.com>
2094
2095         * doc/invoke.texi (Spec Files): Document getenv spec function.
2096
2097         * gcc.c (getenv_spec_function): New function.
2098         (static_spec_functions): Add it.
2099         * config/vxworks.h (VXWORKS_TARGET_DIR): Remove.
2100         (VXWORKS_ADDITIONAL_CPP_SPEC): Use getenv to find the VxWorks
2101         header files.
2102
2103 2007-02-22  Michael Matz  <matz@suse.de
2104
2105         PR c++/29433
2106         * dwarf2out.c (add_AT_string): Call ggc_strdup once per string.
2107         (type_tag): Use lang_hooks.dwarf_name instead of DECL_NAME.
2108
2109 2007-02-22  Ian Lance Taylor  <iant@google.com>
2110
2111         PR debug/30898
2112         * dwarf2out.c (concatn_mem_loc_descriptor): New static function.
2113         (mem_loc_descriptor): Call it.
2114
2115 2007-02-22  Zdenek Dvorak  <dvorakz@suse.cz>
2116             Ira Rosen  <irar@il.ibm.com>
2117
2118         * tree-data-ref.c (ptr_ptr_may_alias_p): Take alias sets into account.
2119
2120 2007-02-22  Ira Rosen  <irar@il.ibm.com>
2121
2122         PR tree-optimization/30843
2123         * tree-vect-transform.c (vect_transform_loop): Remove strided scalar
2124         stores only after all the group is vectorized.
2125
2126 2007-02-22  Dorit Nuzman  <dorit@il.ibm.com>
2127
2128         PR tree-optimization/30858
2129         * tree-vectorizer.c (vect_is_simple_reduction): Check that the stmts
2130         in the reduction cycle have a single use in the loop.
2131         * tree-vectorizer.h (relevant): Add documentation.
2132
2133 2007-02-20  Mike Stump  <mrs@apple.com>
2134
2135         * configure.ac (powerpc*-*-darwin*): #include <sys/cdefs.h>.
2136         * configure: Regenerate.
2137
2138 2007-02-21  Trevor Smigiel  <trevor_smigiel@playstation.sony.com>
2139
2140         Change the defaults of some parameters and options.
2141         * config/spu/spu-protos.h (spu_optimization_options): Declare.
2142         * config/spu/spu.c (spu_optimization_options): Add.
2143         (spu_override_options): Change params in spu_optimization_options.
2144         * config/spu/spu.h (OPTIMIZATION_OPTIONS): Define.
2145
2146         Register 127 is only 16 byte aligned when used as a frame pointer.
2147         * config/spu/spu-protos.h (spu_init_expanders): Declare.
2148         * config/spu/spu.c (spu_expand_prologue): Set REGNO_POINTER_ALIGN for
2149         HARD_FRAME_POINTER_REGNUM.
2150         (spu_legitimate_address):  Use regno_aligned_for_reload.
2151         (regno_aligned_for_load):  HARD_FRAME_POINTER_REGNUM is only 16 byte
2152         aligned when frame_pointer_needed is true.
2153         (spu_init_expanders): New.  Set alignment of HARD_FRAME_POINTER_REGNUM
2154         to 8 bits.
2155         * config/spu/spu.h (INIT_EXPANDERS): Define.
2156
2157         Make sure shift and rotate instructions have valid immediate operands.
2158         * config/spu/predicates.md (spu_shift_operand): Remove.
2159         * config/spu/spu.c (print_operand): Add [efghEFGH] modifiers.
2160         * config/spu/constraints.md (W, O): Extend range.
2161         * config/spu/spu.md (umask, nmask): Define.
2162         (ashl<mode>3, ashldi3, ashlti3_imm, shlqbybi_ti, shlqbi_ti, shlqby_ti,
2163         lshr<mode>3, rotm_<mode>, lshr<mode>3_imm, rotqmbybi_<mode>,
2164         rotqmbi_<mode>, rotqmby_<mode>, ashr<mode>3, rotma_<mode>,
2165         rotl<mode>3, rotlti3, rotqbybi_ti, rotqby_ti, rotqbi_ti): Use
2166         spu_nonmem_operand instead of spu_shift_operands.  Use new modifiers.
2167         (lshr<mode>3_reg):  Fix rtl description.
2168
2169         Make sure mulhisi immediate operands are valid.
2170         * config/spu/predicates.md (imm_K_operand): Add.
2171         * config/spu/spu.md (mulhisi3_imm, umulhisi3_imm): Use imm_K_operand.
2172
2173         Generate constants using fsmbi and andi.
2174         * config/spu/spu.c (enum immediate_class): Add IC_FSMBI2.
2175         (print_operand, spu_split_immediate, classify_immediate,
2176         fsmbi_const_p): Handle IC_FSMBI2.
2177
2178         Correctly handle a CONST_VECTOR containing symbols.
2179         * config/spu/spu.c (print_operand): Handle HIGH correctly.
2180         (spu_split_immediate): Split CONST_VECTORs with -mlarge-mem.
2181         (immediate_load_p): Allow symbols that use 2 instructions to create.
2182         (classify_immediate, spu_builtin_splats):  Don't accept a CONST_VECTOR
2183         with symbols when flag_pic is set.
2184         (const_vector_immediate_p): New.
2185         (logical_immediate_p, iohl_immediate_p, arith_immediate_p): Don't
2186         accept a CONST_VECTOR with symbols.
2187         (spu_legitimate_constant_p): Use const_vector_immediate_p.  Don't
2188         accept a CONST_VECTOR with symbols when flag_pic is set.  Handle HIGH
2189         correctly.
2190         * config/spu/spu.md (high, low): Delete.
2191         (low_<mode>): Define.
2192
2193         Remove INTRmode and INTR_REGNUM, which didn't work.
2194         * config/spu/spu.c (spu_conditional_register_usage): Remove reference
2195         of INTR_REGNUM.
2196         * config/spu/spu-builtins.md (spu_idisable, spu_ienable, set_intr,
2197         set_intr_pic, set_intr_cc, set_intr_cc_pic, set_intr_return, unnamed
2198         peephole2 pattern): Don't use INTR or 131.
2199         (movintrcc): Delete.
2200         * config/spu/spu.h (FIRST_PSEUDO_REGISTER, FIXED_REGISTERS,
2201         CALL_USED_REGISTERS, REGISTER_NAMES, INTR_REGNUM): Remove INTR_REGNUM.
2202         * config/spu/spu.md (UNSPEC_IDISABLE, UNSPEC_IENABLE): Remove.
2203         (UNSPEC_SET_INTR): Add.
2204         * config/spu/spu-modes.def (INTR): Remove.
2205
2206         More accurate warnings about run-time relocations.
2207         * config/spu/spu.c (reloc_diagnostic): Test in_section.
2208
2209         Correctly warn about immediate arguments to specific intrinsics.
2210         * config/spu/spu.c (spu_check_builtin_parm): Handle CONST_VECTORs.
2211         (spu_expand_builtin_1): Call spu_check_builtin_parm before checking
2212         the instruction predicate.
2213
2214         Fix tree check errors with latest update.
2215         * config/spu/spu.c (expand_builtin_args, spu_expand_builtin_1): Use
2216         CALL_EXPR_ARG.
2217         (spu_expand_builtin): Use CALL_EXPR_FN.
2218
2219         Add missing specific intrinsics.
2220         * config/spu/spu-builtins.def: Add si_bisled, si_bisledd and
2221         si_bislede.
2222         * config/spu/spu_internals.h: Ditto.
2223
2224         Fix incorrect operand modifiers.
2225         * config/spu/spu-builtins.md (spu_mpy, spu_mpyu):  Remove use of %H.
2226         * config/spu/spu.md (xor<mode>3):  Change %S to %J.
2227
2228         Optimize one case of zero_extend of a vec_select.
2229         * config/spu/spu.md (_vec_extractv8hi_ze):  Add.
2230
2231         Accept any immediate for hbr.
2232         * config/spu/spu.md (hbr):  Change s constraints to i.
2233
2234 2007-02-21  Paul Brook  <paul@codesourcery.com>
2235
2236         * config/arm/arm.c (thumb2_final_prescan_insn): Don't incrememnt
2237         condexec_count when skipping USE and CLOBBER.
2238
2239 2007-02-21  Nick Clifton  <nickc@redhat.com>
2240
2241         * common.opt (Warray-bounds): Add Warning attribute.
2242         (Wstrict-overflow, Wstrict-overflow=, Wcoverage-mismatch):
2243         Likewise.
2244         (fsized-zeroes): Add Optimization attribute.
2245         (fsplit-wide-types, ftree-scev-cprop): Likewise.
2246         * c.opt (Wc++0x-compat): Add Warning attribute.
2247
2248 2007-02-21  Ulrich Weigand  <uweigand@de.ibm.com>
2249
2250         PR middle-end/30761
2251         * reload1.c (eliminate_regs_in_insn): In the single_set special
2252         case, attempt to re-recognize the insn before falling back to
2253         having reload fix it up.
2254
2255 2007-02-20  Eric Christopher  <echristo@gmail.com>
2256
2257         * config/frv/frv.c (frv_read_argument): Take a tree and int argument.
2258         Rewrite accordingly.
2259         (frv_read_iacc_argument): Ditto.
2260         (frv_expand_set_builtin): Take a call instead of arglist, update for
2261         above changes.
2262         (frv_expand_unop_builtin): Ditto.
2263         (frv_expand_binop_builtin): Ditto.
2264         (frv_expand_cut_builtin): Ditto.
2265         (frv_expand_binopimm_builtin): Ditto.
2266         (frv_expand_voidbinop_builtin): Ditto.
2267         (frv_expand_int_void2arg): Ditto.
2268         (frv_expand_prefetches): Ditto.
2269         (frv_expand_voidtriop_builtin): Ditto.
2270         (frv_expand_voidaccop_builtin): Ditto.
2271         (frv_expand_load_builtin): Ditto.
2272         (frv_expand_store_builtin): Ditto.
2273         (frv_expand_mdpackh_builtin): Ditto.
2274         (frv_expand_mclracc_builtin): Ditto.
2275         (frv_expand_mrdacc_builtin): Ditto.
2276         (frv_expand_mwtacc_builtin): Ditto.
2277         (frv_expand_builtin): Remove usage of CALL_EXPR_ARGS, update
2278         calls for above.
2279
2280 2007-02-20  Janis Johnson  <janis187@us.ibm.com>
2281
2282         * doc/invoke.texi (RS/6000 and PowerPC Options): Add -mcmpb and -mdfp.
2283         * configure.ac (HAVE_GAS_CMPB): Check for assembler support of the
2284         cmpb instruction.
2285         (HAVE_GAS_DFP): Check for assembler support of decimal floating
2286         point instructions.
2287         * configure: Regenerate.
2288         * config.in: Regenerate.
2289         * config/rs6000/rs6000.opt (mcmpb, mdfp): New.
2290         * config/rs6000/rs6000.c (rs6000_override_options): Add CMPB and DFP
2291         masks to power6 and power6x and to POWERPC_MASKS.
2292         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
2293         _ARCH_PWR6.
2294         * config/rs6000/rs6000.h: Check assembler support for CMPB and DFP.
2295         * config/rs6000/sysv4.opt (mprototype): Use variable, not mask.
2296         * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS):
2297         Access PROTOTYPE as variable, not mask.
2298
2299 2007-02-20  Steven Bosscher  <steven@gcc.gnu.org>
2300
2301         * rtl.h (remove_reg_equal_equiv_notes): New prototype.
2302         * rtlanal.c (remove_reg_equal_equiv_notes): New function.
2303         * combine.c (adjust_for_new_dest): Use it.
2304         * postreload.c (reload_combine): Likewise.
2305
2306 2007-02-20  Steven Bosscher  <steven@gcc.gnu.org>
2307
2308         * rtlanal.c (find_reg_equal_equiv_note): Do not find REG_EQ*
2309         notes on an insn with multiple sets, even if single_set returns
2310         non-NULL for that insn.
2311
2312 2007-02-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2313
2314         * fold-const.c (tree_expr_nonnegative_warnv_p): Handle scalb,
2315         scalbn and scalbln.
2316
2317 2007-02-20  Geoffrey Keating  <geoffk@apple.com>
2318
2319         * config/darwin.h (LINK_SPEC): Default -mmacosx-version-min only
2320         if user didn't pass it.
2321         * config/i386/darwin.h (CC1_SPEC): Likewise.
2322         * config/rs6000/darwin.h (CC1_SPEC): Likewise.
2323         (DARWIN_MINVERSION_SPEC): Don't depend on user's setting of
2324         -mmacosx-version-min.
2325
2326 2007-02-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2327             Uros Bizjak  <ubizjak@gmail.com>
2328
2329         * optabs.h (enum optab_index): Add new OTI_scalb.
2330         (scalb_optab): Define corresponding macro.
2331         * optabs.c (init_optabs): Initialize scalb_optab.
2332         * genopinit.c (optabs): Implement scalb_optab using scalb?f3
2333         patterns.
2334         * builtins.c (expand_builtin_mathfn_2, expand_builtin): Handle
2335         BUILT_IN_SCALB{,F,L}, BUILT_IN_SCALBN{,F,L} and BUILT_IN_SCALBLN{,F,L}.
2336         (expand_builtin): Expand BUILT_IN_SCALB{,F,L}, BUILT_IN_SCALBN{,F,L}
2337         and BUILT_IN_SCALBLN{,F,L} using expand_builtin_mathfn_2 if
2338         flag_unsafe_math_optimizations is set.
2339
2340         * config/i386/i386.md (scalbxf3, scalb<mode>3): New expanders
2341         to implement scalbf, scalb and scalbl built-ins as inline x87
2342         intrinsics.
2343
2344 2007-02-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2345             DJ Delorie <dj@redhat.com>
2346
2347         PR other/30824
2348         * diagnostic.c (diagnostic_count_diagnostic): Move -Werror logic to...
2349         (diagnostic_report_diagnostic): ... here, and turn them into real
2350         errors. If warnings are inhibited, no need to do anything.
2351
2352 2007-02-20  Uros Bizjak  <ubizjak@gmail.com>
2353
2354         * config/i386/i386.md (expm1xf2): Reorder insn sequence for
2355         better code generation.
2356
2357 2007-02-20  Ben Elliston  <bje@au.ibm.com>
2358
2359         * config/m68hc11/m68hc11.h (OVERRIDE_OPTIONS): Remove extra ;.
2360
2361 2007-02-20  Kazu Hirata  <kazu@codesourcery.com>
2362
2363         * config/alpha/alpha.c, config/alpha/alpha.md,
2364         config/alpha/lib1funcs.asm, config/alpha/vms-crt0-64.c,
2365         config/alpha/vms-psxcrt0-64.c, config/arc/arc.c,
2366         config/arc/arc.h, config/arm/arm.c, config/arm/arm.md,
2367         config/arm/lib1funcs.asm: Follow spelling conventions.
2368
2369         * config/c4x/c4x.md, config/cris/cris.c, config/crx/crx.c,
2370         config/fr30/fr30.md, config/i386/i386.h,
2371         config/iq2000/iq2000.h, config/iq2000/predicates.md,
2372         config/pa/milli64.S, config/pa/pa.c, config/pa/pa.h,
2373         config/pa/pa.md, config/pa/pa32-regs.h, config/pa/pa64-regs.h,
2374         config/pdp11/pdp11.c, config/pdp11/pdp11.h,
2375         config/rs6000/altivec.md, config/rs6000/rs6000.c,
2376         config/s390/s390-modes.def, config/sparc/netbsd-elf.h,
2377         config/sparc/sparc.c, config/sparc/sparc.h,
2378         config/sparc/sparc.md, config/spu/constraints.md,
2379         config/spu/spu.c, config/stormy16/stormy16.md: Follow spelling
2380         conventions.
2381
2382 2007-02-20  Alan Modra  <amodra@bigpond.net.au>
2383
2384         PR target/29943
2385         * varasm.c (use_blocks_for_decl_p): Return false for decls with
2386         alias attribute.
2387
2388 2007-02-19  Kazu Hirata  <kazu@codesourcery.com>
2389
2390         * doc/invoke.texi (-ftree-lrs): Remove.
2391
2392 2007-02-19  Diego Novillo  <dnovillo@redhat.com>
2393
2394         * tree-ssa-pre.c (create_value_expr_from): Initialize POOL to
2395         NULL.
2396
2397 2007-02-19  Lee Millward  <lee.millward@codesourcery.com>
2398
2399         * config/ia64/ia64.c (ia64_expand_builtin): Use the
2400         new CALL_EXPR_FN macro for retrieving the function
2401         declaration of the input expression.
2402
2403 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2404
2405         * c.opt (Waddress): New.
2406         * common.opt (Walways-true): Delete.
2407         (Wstring-literal-comparison): Delete.
2408         * doc/invoke.texi (Warning Options): Delete -Walways-true and
2409         -Wstring-literal-comparison. Add -Waddress.
2410         (Waddress): New.
2411         (Walways-true): Delete.
2412         (Wstring-literal-comparison): Delete.
2413         * doc/extend.texi (#pragma GCC diagnostic): Use -Wformat
2414         consistently instead of -Walways-true in example.
2415         * c-opts.c (c_common_handle_option): -Waddress is enabled by -Wall.
2416         * c-typeck.c (parser_build_binary_op): Replace
2417         -Wstring-literal-comparison and -Walways-true with -Waddress.
2418         * c-common.c (c_common_truthvalue_conversion): Replace -Walways-true
2419         with -Waddress.
2420
2421 2007-02-19  Eric Botcazou  <ebotcazou@adacore.com>
2422
2423         * tree-cfg.c (dump_function_to_file): Be prepared for functions
2424         without DECL_STRUCT_FUNCTION initialized.
2425
2426 2007-02-19  Eric Botcazou  <ebotcazou@adacore.com>
2427
2428         * gimplify.c (gimplify_init_ctor_preeval_1): Detect potential overlap
2429         due to calls to functions taking pointers as parameters.
2430
2431 2007-02-19  Richard Henderson  <rth@redhat.com>
2432
2433         PR debug/29558
2434         * var-tracking.c (track_expr_p): Disallow AGGREGATE_TYPE_P
2435         in memory.
2436
2437 2007-02-19  Andreas Krebbel  <krebbel1@de.ibm.com>
2438
2439         * config/s390/s390.c (s390_call_saved_register_used,
2440         s390_function_ok_for_sibcall): Adjust the way CALL_EXPR arguments are
2441         accessed to the new scheme.
2442
2443 2007-02-19  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
2444
2445         * config/cris/cris.c (cris_movem_load_rest_p, cris_store_multiple_op_p)
2446         (cris_print_index, cris_print_operand, cris_print_operand_address)
2447         (cris_reload_address_legitimized, cris_rtx_costs, cris_address_cost)
2448         (cris_side_effect_mode_ok, cris_valid_pic_const, cris_split_movdx)
2449         (cris_expand_pic_call_address): Use xxx_P predicate macros instead of
2450         GET_CODE () == xxx.
2451         * config/cris/cris.h (SECONDARY_RELOAD_CLASS, EXTRA_CONSTRAINT_Q,
2452         EXTRA_CONSTRAINT_T, BDAP_INDEX_P, BIAP_INDEX_P, SIMPLE_ADDRESS_P,
2453         GO_IF_LEGITIMATE_ADDRESS): Ditto.
2454         * config/cris/cris.md (define_insns: *btst, movdi, *mov_side<mode>)
2455         (*mov_sidesisf, *mov_side<mode>_mem, *mov_sidesisf_mem)
2456         (*clear_side<mode>, movsi, *movsi_internal, *ext_sideqihi)
2457         (*ext_side<mode>si, *op_side<mode>, *op_swap_side<mode>, addsi3)
2458         (*extopqihi_side, *extop<mode>si_side, *extopqihi_swap_side)
2459         (*extop<mode>si_swap_side, addi_mul, *addi,andsi3, andhi3, ashl<mode>3)
2460         (uminsi3, call, call_value): Ditto.
2461         (define_split: indir_to_reg_split, unnamed): Ditto.
2462
2463 2007-02-19  Dorit Nuzman  <dorit@il.ibm.com>
2464
2465         PR tree-optimization/30975
2466         * tree-vect-trasnform.c (vect_get_vec_def_for_stmt_copy): Remove
2467         wrong assert.
2468
2469 2007-02-18  Eric Christopher  <echristo@gmail.com>
2470
2471         * mips.c (mips_prepare_builtin_arg): Add argnum parameter.
2472         Remove use of arglist.
2473         (mips_expand_builtin): Remove use of arglist, pass in expr.
2474         (mips_expand_builtin_direct): Rewrite handling for arglist removal.
2475         (mips_expand_builtin_movtf): Ditto.
2476         (mips_expand_builtin_compare): Ditto.
2477
2478 2007-02-19  Alexandre Oliva  <aoliva@redhat.com>
2479
2480         * tree-sra.c (sra_build_assignment): Replace assertion
2481         checking with a comment explaining why it can't be done.
2482
2483 2007-02-18  Sandra Loosemore  <sandra@codesourcery.com>
2484
2485         PR middle-end/30833
2486         * tree-dump.c (dequeue_and_dump): Add tcc_vl_exp case missed
2487         during CALL_EXPR representation conversion.
2488         * tree-ssa-propagate.c (set_rhs): Likewise.
2489
2490 2007-02-19  Alexandre Oliva  <aoliva@redhat.com>
2491
2492         * tree-sra.c (sra_build_assignment): Disable assertion checking
2493         for now.
2494
2495 2007-02-18  Roger Sayle  <roger@eyesopen.com>
2496
2497         * function.c (gimplify_parameters): Call build_gimple_modify_stmt
2498         instead of calling build2 with a GIMPLE_MODIFY_STMT.
2499         * gimple-low.c (lower_function_body, lower_builtin_setjmp):
2500         Likewise.
2501         * gimplify.c (build_stack_save_restore, gimplify_return_expr,
2502         gimplify_decl_expr,  gimplify_self_mod_expr, gimplify_cond_expr,
2503         gimplify_init_ctor_eval_range, gimple_push_cleanup,
2504         gimplify_omp_for, gimplify_omp_atomic_pipeline,
2505         gimplify_omp_atomic_mutex, gimplify_expr, gimplify_one_sizepos,
2506         force_gimple_operand): Likewise.
2507         * ipa-cp.c (constant_val_insert): Likewise.
2508         * lambda-code.c (lbv_to_gcc_expression, lle_to_gcc_expression,
2509         lambda_loopnest_to_gcc_loopnest, replace_uses_equiv_to_x_with_y,
2510         perfect_nestify): Likewise.
2511         * langhooks.c (lhd_omp_assignment): Likewise.
2512         * omp-low.c (lower_rec_input_clauses, lower_reduction_clauses,
2513         lower_copyprivate_clauses, lower_send_clauses,
2514         lower_send_shared_vars, expand_parallel_call,
2515         expand_omp_for_generic, expand_omp_for_static_nochunk,
2516         expand_omp_for_static_chunk, expand_omp_sections,
2517         lower_omp_single_copy, lower_omp_for_lastprivate,
2518         lower_omp_parallel, init_tmp_var, save_tmp_var): Likewise.
2519         * value-prof.c (tree_divmod_fixed_value, tree_mod_pow2,
2520         tree_mod_subtract, tree_ic, tree_stringop_fixed_value):
2521         Likewise.
2522
2523 2007-02-19  Kazu Hirata  <kazu@codesourcery.com>
2524
2525         * config/sh/divtab.c, config/sh/sh.c, config/sh/sh.h,
2526         config/sh/sh.md: Follow spelling conventions.
2527
2528         * config/frv/frv.c, config/frv/frv.h, config/frv/frv.md,
2529         config/frv/predicates.md: Follow spelling conventions.
2530
2531         * config/m68k/linux-unwind.h: Fix a comment typo.
2532         * target.h: Follow spelling conventions.
2533
2534 2007-02-18  Roger Sayle  <roger@eyesopen.com>
2535
2536         PR rtl-optimization/28173
2537         * simplify-rtx.c (simplify_binary_operation_1) <IOR>:  Optimize
2538         (X & C1) | C2 as C2 when (C1 & C2) == C1 and X has no side-effects.
2539         Optimize (X & C1) | C2 as X | C2 when (C1 | C2) == ~0.
2540         Canonicalize (X & C1) | C2 as (X & (C1 & ~C2)) | C2.
2541         <AND>: Canonicalize (X | C1) & C2 as (X & C2) | (C1 & C2).
2542
2543 2007-02-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2544
2545         * builtins.c (fold_builtin_load_exponent): New.
2546         (fold_builtin_2): Use it.
2547
2548 2007-02-18  Steven Bosscher  <steven@gcc.gnu.org>
2549
2550         PR rtl-optimization/30773
2551         * local-alloc.c (update_equiv_regs): Do not set reg_equiv_init
2552         if we fail to attach a REG_EQUIV note.
2553
2554 2007-02-18  David Edelsohn  <edelsohn@gnu.org>
2555             Roger Sayle  <roger@eyesopen.com>
2556
2557         * config/rs6000/rs6000.md (bswapsi2): New define_insn and splitter.
2558
2559 2007-02-18  Sandra Loosemore  <sandra@codesourcery.com>
2560
2561         * calls.c (initialize_argument_information): Pass original EXP
2562         and STRUCT_VALUE_ADDR_VALUE instead of a list of arguments.  Move
2563         code to split complex arguments here, as part of initializing the
2564         ARGS array.
2565         (expand_call): Remove code that builds a list of arguments and
2566         inserts implicit arguments into it.  Instead, just count how many
2567         implicit arguments there will be so we can determine the size of
2568         the ARGS array, and let initialize_argument_information do the work.
2569         (split_complex_values): Delete unused function.
2570
2571 2007-02-18  Eric Botcazou  <ebotcazou@adacore.com>
2572
2573         * tree-eh.c (tree_could_trap_p): Handle VIEW_CONVERT_EXPR.
2574
2575 2007-02-18  Eric Botcazou  <ebotcazou@adacore.com>
2576
2577         * calls.c (mem_overlaps_already_clobbered_arg_p): Return true
2578         for arg pointer based indexed addressing.
2579
2580 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
2581
2582         * config/ia64/ia64.h, config/ia64/ia64.md,
2583         config/ia64/predicates.md, config/ia64/sysv4.h: Follow
2584         spelling conventions.
2585
2586 2007-02-18  Roman Zippel <zippel@linux-m68k.org>
2587
2588         * config/m68k/m68k.c (split_di): New.
2589         * config/m68k/m68k-protos.h: Declare split_di.
2590         * config/m68k/m68k.md (extendsidi2*,ashldi3*,ashrdi3*,lshrdi3*):
2591           Improve predicate handling and split constant shifts.
2592
2593 2007-02-18  Roman Zippel <zippel@linux-m68k.org>
2594
2595         * config/m68k/m68k.md (extv,extzv,insv): disable dynamic
2596         parameter for register bitfield operations, general predicates
2597         cleanup
2598
2599 2007-02-18  Roman Zippel <zippel@linux-m68k.org>
2600
2601         * config/m68k/linux.h (MD_UNWIND_SUPPORT): Define.
2602         * config/m68k/linux-unwind.h: New file.
2603
2604 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
2605
2606         * cfgloop.c, config/alpha/alpha.c, config/bfin/bfin.c,
2607         config/i386/athlon.md, config/ia64/ia64.md,
2608         config/rs6000/rs6000.c, config/s390/s390.c, config/spu/spu.md,
2609         df-problems.c, df.h, fold-const.c, ipa-cp.c, ipa-inline.c,
2610         ipa-prop.h, see.c, struct-equiv.c, tree-inline.c,
2611         tree-ssa-loop-niter.c, tree-vect-analyze.c,
2612         tree-vect-transform.c: Fix comment typos.
2613
2614 2007-02-17  Kazu Hirata  <kazu@codesourcery.com>
2615
2616         * sched-deps.c (find_insn_list): Remove.
2617         * sched-int.h: Remove the prototype for find_insn_list.
2618
2619 2007-02-16  Geoffrey Keating  <geoffk@apple.com>
2620
2621         * config/darwin.h (LINK_SPEC): Always pass -macosx_version_min
2622         to linker.
2623         (DARWIN_EXTRA_SPECS): Add %(darwin_minversion).
2624         * config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): Just call
2625         darwin_rs6000_override_options.
2626         (C_COMMON_OVERRIDE_OPTIONS): Expect
2627         darwin_macosx_version_min to be non-NULL always.
2628         (TARGET_C99_FUNCTIONS): Likewise.
2629         (CC1_SPEC): Always pass -mmacosx-version-min to cc1*.
2630         (DARWIN_MINVERSION_SPEC): New.
2631         * config/rs6000/rs6000.c (darwin_rs6000_override_options): New.
2632         * config/i386/darwin.h (CC1_SPEC): Always pass -mmacosx-version-min
2633         to cc1*.
2634         (DARWIN_MINVERSION_SPEC): New.
2635         * config/darwin.opt (mmacosx-version-min): Initialize to non-NULL
2636         value.
2637         * config/darwin-c.c (darwin_cpp_builtins): Expect
2638         darwin_macosx_version_min to be non-NULL always.
2639
2640         * config/rs6000/rs6000.c: Clean up trailing whitespace.
2641
2642 2007-02-16  Uros Bizjak  <ubizjak@gmail.com>
2643
2644         * config/i386/i386.h (x86_use_xchgb): New.
2645         (TARGET_USE_XCHGB): New macro.
2646         * config/i386/i386.c (x86_use_xchgb): Set for PENT4.
2647         * config/i386/i386.md (*rotlhi3_1 splitter, *rotrhi3_1 splitter):
2648         Split after reload into bswaphi for shifts of 8.
2649         (bswaphi_lowpart): Generate rolw insn for HImode byte swaps.
2650         (*bswaphi_lowpart_1): Generate xchgb for Q registers for TARGET_XCHGB
2651         or when optimizing for size.
2652
2653 2007-02-16  Richard Guenther  <rguenther@suse.de>
2654             Christian Bruel  <christian.bruel@st.com>
2655
2656         * fold-const.c (tree_swap_operands_p): Treat SSA_NAMEs like
2657         DECLs but prefer SSA_NAMEs over DECLs.
2658
2659 2007-02-16  Richard Guenther  <rguenther@suse.de>
2660
2661         * tree-flow-inline.h (single_imm_use_p): Remove.
2662         (zero_imm_uses_p): Likewise.
2663         * tree-ssa-coalesce.c (create_outofssa_var_map): Use has_single_use
2664         instead of single_imm_use_p.
2665         * tree-cfg.c (replace_uses_by): Use has_zero_use instead of
2666         zero_imm_uses_p.
2667
2668 2007-02-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2669
2670         PR other/27843
2671         * Makefile.in (SYSTEM_HEADER_DIR): Use single quotes to avoid
2672         nested double- and backquotes.
2673
2674 2007-02-15  Roger Sayle  <roger@eyesopen.com>
2675
2676         PR middle-end/30391
2677         * tree.c (expr_align): Handle MODIFY_EXPR.  GIMPLE_MODIFY_STMT
2678         should be unreachable.
2679         (build2_stat): Allow construction of MODIFY_EXPR at any time.
2680         For the time being redirect GIMPLE_MODIFY_STMT to the new
2681         (renamed) build_gimple_modify_stmt_stat.
2682         (build2_gimple_stat): Rename to...
2683         (build_gimple_modify_stmt_stat): Now longer take a CODE argument.
2684         Always build a GIMPLE_MODIFY_STMT node.
2685         * tree.h (build2_gimple, build2_gimple_stat): Delete.
2686         (build_gimple_modify_stmt, build_gimple_modify_stmt_stat): New
2687         declarations.
2688
2689         * tree-cfg.c (factor_computed_gotos, tree_merge_blocks,
2690         gimplify_val): Use build_gimple_modify_stmt instead of build2_gimple.
2691         * tree-complex.c (set_component_ssa_name, expand_complex_move,
2692         expand_complex_div_wide): Likewise.
2693         * tree-ssa-dom.c (record_equivalences_from_stmt): Likewise.
2694         * tree-ssa-loop-im.c (schedule_sm): Likewise.
2695         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Likewise.
2696         * tree-ssa-loop-manip.c (create_iv): Likewise.
2697         * tree-ssa-phiopt.c (conditional_replacement, minmax_replacement,
2698         abs_replacement): Likewise.
2699         * tree-ssa-pre.c (create_expression_by_pieces, poolify_modify_stmt,
2700         realify_fake_stores): Likewise.
2701
2702         * builtins.c (std_expand_builtin_va_start): Build a MODIFY_EXPR
2703         node rather than a GIMPLE_MODIFY_STMT node.
2704         (std_gimpify_va_arg_expr, expand_builtin_va_copy,
2705         fold_builtin_memset, fold_builtin_memory_op, do_mpfr_sincos):
2706         Likewise.
2707         (integer_valued_real_p): Handle MODIFY_EXPR, not GIMPLE_MODIFY_STMT.
2708         * expr.c (expand_expr_real_1): Handle both MODIFY_EXPR and
2709         GIMPLE_MODIFY_STMT.
2710
2711 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2712
2713         PR middle-end/30433
2714         * fold-const.c (fold_comparison): Add back the
2715         folding of constant complex comparisions.
2716
2717 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2718
2719         PR middle-end/30729
2720         * stmt.c (warn_if_unused_value): VA_ARG_EXPR has side
2721         effects unknown to this function, return early.
2722
2723 2007-02-15  Ian Lance Taylor  <iant@google.com>
2724
2725         * lower-subreg.c (move_eh_region_note): New static function.
2726         (resolve_simple_move): Call it.
2727         (decompose_multiword_subregs): Track blocks for which we resolve a
2728         simple move which is also a control flow insn.  Pass them to
2729         find_many_sub_basic_blocks.
2730         (pass_lower_subreg): Add TODO_verify_flow.
2731         (pass_lower_subreg2): Likewise.
2732
2733 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2734             Brooks Moses  <brooks.moses@codesourcery.com>
2735             Lee Millward  <lee.millward@codesourcery.com>
2736
2737         * tree.h (enum tree_code_class): Add tcc_vl_exp.
2738         (VL_EXP_CLASS_P): New.
2739         (TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of
2740         TREE_CODE_LENGTH.
2741         (TREE_OPERAND_CHECK_CODE): Likewise.
2742         (GIMPLE_STMT_OPERAND_CHECK): Likewise.
2743         (TREE_RTL_OPERAND_CHECK): Likewise.
2744         (tree_operand_check_failed): Make second parameter the whole tree
2745         instead of its code.  Fixed callers.
2746         (VL_EXP_CHECK): New.
2747         (TREE_OPERAND_LENGTH): New.
2748         (VL_EXP_OPERAND_LENGTH): New.
2749         (CALL_EXPR_FN): New.
2750         (CALL_EXPR_STATIC_CHAIN): New.
2751         (CALL_EXPR_ARGS): New.
2752         (CALL_EXPR_ARG): New.
2753         (call_expr_nargs): New.
2754         (CALL_EXPR_ARGP): New.
2755         (build_nt_call_list): Declare.
2756         (build_vl_exp_stat): Declare.
2757         (build_vl_exp): New.
2758         (build_call_list): Declare.
2759         (build_call_nary): Declare.
2760         (build_call_valist): Declare.
2761         (build_call_array): Declare.
2762         (call_expr_arg): Declare.
2763         (call_expr_argp): Declare.
2764         (call_expr_arglist): Declare.
2765         (fold_build_call_list): Declare.
2766         (fold_build_call_list_initializer): Declare.
2767         (fold_call_expr): Declare to replace fold_builtin.
2768         (fold_builtin_fputs): Update to agree with modified definition.
2769         (fold_builtin_strcpy): Likewise.
2770         (fold_builtin_strncpy): Likewise.
2771         (fold_builtin_memory_chk): Likewise.
2772         (fold_builtin_stxcpy_chk): Likewise.
2773         (fold_builtin_strncpy_chk): Likewise.
2774         (fold_builtin_next_arg): Likewise.
2775         (fold_build_call_expr): Declare.
2776         (fold_builtin_call_list): Declare.
2777         (fold_builtin_call_valist): Declare.
2778         (build_call_expr): Declare.
2779         (validate_arglist): Update to agree with modified definition.
2780         (tree_operand_length): New.
2781         (call_expr_arg_iterator): New.
2782         (init_call_expr_arg_iterator): New.
2783         (next_call_expr_arg): New.
2784         (first_call_expr_arg): New.
2785         (more_call_expr_args_p): New.
2786         (FOR_EACH_CALL_EXPR_ARG): New.
2787
2788         * tree.c (tree_code_class_string): Add entries for tcc_vl_exp
2789         and tcc_gimple_stmt.
2790         (tree_code_size): Update documentation.  Use sizeof (tree) rather
2791         than sizeof (char *).
2792         (tree_size): Likewise.  Add case for tcc_vl_exp.
2793         (tree_node_structure): Add case for tcc_vl_exp.
2794         (contains_placeholder_p): Likewise.
2795         (substitute_in_expr): Likewise.
2796         (substitute_placeholder_in_expr): Likewise.
2797         (stabilize_reference_1): Likewise.
2798         (build3_stat): Remove logic for CALL_EXPRs.  Replace with assertion
2799         to diagnose breakage of this interface for constructing CALL_EXPRs.
2800         (build_nt): Add similar assertion here.
2801         (build_nt_call_list): New.
2802         (simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors.
2803         (iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of
2804         TREE_CODE_LENGTH.
2805         (get_callee_fndecl): Use new CALL_EXPR accessors.
2806         (tree_operand_check_failed): Change parameters to pass entire node
2807         instead of its code, so that we can call TREE_OPERAND_LENGTH on it.
2808         (process_call_operands): New.
2809         (build_vl_exp_stat): New.
2810         (build_call_list): New.
2811         (build_call_nary): New.
2812         (build_call_valist): New.
2813         (build_call_array): New.
2814         (walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
2815         (call_expr_arglist): New.
2816
2817         * tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use
2818         tcc_vl_exp instead of a fixed-size tcc_expression.
2819
2820         * doc/c-tree.texi (CALL_EXPR): Document new representation and
2821         accessors for CALL_EXPRs.
2822         (AGGR_INIT_EXPR): Likewise.
2823
2824 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2825             Brooks Moses  <brooks.moses@codesourcery.com>
2826             Lee Millward  <lee.millward@codesourcery.com>
2827
2828         * builtins.c (c_strlen): Return NULL_TREE instead of 0.
2829         (expand_builtin_nonlocal_goto): Change parameter to be entire
2830         CALL_EXPR instead of an arglist.  Use new CALL_EXPR accessors.
2831         (expand_builtin_prefetch): Likewise.
2832         (expand_builtin_classify_type): Likewise.
2833         (mathfn_built_in): Return NULL_TREE instead of 0.
2834         (expand_errno_check): Use new CALL_EXPR accessors.
2835         (expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors.
2836         Return NULL_RTX instead of 0.
2837         (expand_builtin_mathfn_2): Likewise.
2838         (expand_builtin_mathfn_3): Likewise.
2839         (expand_builtin_interclass_mathfn): Likewise.
2840         (expand_builtin_sincos): Likewise.
2841         (expand_builtin_cexpi): Likewise.
2842         (expand_builtin_int_roundingfn): Likewise.
2843         (expand_builtin_int_roundingfn_2): Likewise.
2844         (expand_builtin_pow): Likewise.
2845         (expand_builtin_powi): Likewise.
2846         (expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead
2847         of arglist, fixing callers appropriately.  Use new CALL_EXPR
2848         accessors and constructors.  Return NULL_RTX instead of 0.
2849         (expand_builtin_strstr): Likewise.
2850         (expand_builtin_strchr): Likewise.
2851         (expand_builtin_strrchr): Likewise.
2852         (expand_builtin_strpbrk): Likewise.
2853         (expand_builtin_memcpy): Likewise.
2854         (expand_builtin_mempcpy): Likewise.
2855         (expand_builtin_mempcpy_args): New.
2856         (expand_builtin_memmove): Similarly to expand_builtin_mempcpy.
2857         (expand_builtin_memmove_args): New.
2858         (expand_builtin_bcopy): Similarly to expand_builtin_mempcpy.
2859         (expand_movstr): Likewise.
2860         (expand_builtin_strcpy): Likewise.
2861         (expand_builtin_strcpy_args): New.
2862         (expand_builtin_stpcpy): Similarly to expand_builtin_strcpy.
2863         (expand_builtin_strncpy): Likewise.
2864         (expand_builtin_memset): Likewise.
2865         (expand_builtin_memset_args): New.
2866         (expand_builtin_bzero): Similarly to expand_builtin_memset.
2867         (expand_builtin_memcmp): Likewise.
2868         (expand_builtin_strcmp): Likewise.
2869         (expand_builtin_strncmp): Likewise.
2870         (expand_builtin_strcat): Likewise.
2871         (expand_builtin_strncat): Likewise.
2872         (expand_builtin_strspn): Likewise.
2873         (expand_builtin_strcspn): Likewise.
2874         (expand_builtin_args_info): Likewise.
2875         (expand_builtin_va_start): Likewise.
2876         (gimplify_va_arg_expr): Likewise.
2877         (expand_builtin_va_end): Likewise.
2878         (expand_builtin_va_copy): Likewise.
2879         (expand_builtin_frame_address): Likewise.
2880         (expand_builtin_alloca): Likewise.
2881         (expand_builtin_bswap): Likewise.
2882         (expand_builtin_unop): Likewise.
2883         (expand_builtin_fputs): Likewise.
2884         (expand_builtin_expect): Likewise.
2885         (expand_builtin_fabs): Likewise.
2886         (expand_builtin_copysign): Likewise.
2887         (expand_builtin_printf): Likewise.
2888         (expand_builtin_fprintf): Likewise.
2889         (expand_builtin_sprintf): Likewise.
2890         (expand_builtin_init_trampoline): Likewise.
2891         (expand_builtin_signbit): Likewise.
2892         (expand_builtin_fork_or_exec): Likewise.
2893         (expand_builtin_sync_operation): Likewise.
2894         (expand_builtin_compare_and_swap): Likewise.
2895         (expand_builtin_lock_test_and_set): Likewise.
2896         (expand_builtin_lock_release): Likewise.
2897         (expand_builtin): Likewise.
2898         (builtin_mathfn_code): Likewise.
2899
2900         (fold_builtin_constant_p): Pass call arguments individually instead
2901         of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
2902         accessors and constructors.  Return NULL_TREE instead of 0.
2903         (fold_builtin_expect): Likewise.
2904         (fold_builtin_classify_type): Likewise.
2905         (fold_builtin_strlen): Likewise.
2906         (fold_builtin_nan): Likewise.
2907         (integer_valued_real_p): Likewise.
2908         (fold_trunc_transparent_mathfn): Likewise.
2909         (fold_fixed_mathfn): Likewise.
2910         (fold_builtin_cabs): Likewise.
2911         (fold_builtin_sqrt): Likewise.
2912         (fold_builtin_cbrt): Likewise.
2913         (fold_builtin_cos): Likewise.
2914         (fold_builtin_cosh): Likewise.
2915         (fold_builtin_tan): Likewise.
2916         (fold_builtin_sincos): Likewise.
2917         (fold_builtin_cexp): Likewise.
2918         (fold_builtin_trunc): Likewise.
2919         (fold_builtin_floor): Likewise.
2920         (fold_builtin_ceil): Likewise.
2921         (fold_builtin_round): Likewise.
2922         (fold_builtin_int_roundingfn): Likewise.
2923         (fold_builtin_bitop): Likewise.
2924         (fold_builtin_bswap): Likewise.
2925         (fold_builtin_logarithm): Likewise.
2926         (fold_builtin_hypot): Likewise.
2927         (fold_builtin_pow): Likewise.
2928         (fold_builtin_powi): Likewise.
2929         (fold_builtin_exponent): Likewise.
2930         (fold_builtin_memset): Likewise.
2931         (fold_builtin_bzero): Likewise.
2932         (fold_builtin_memory_op): Likewise.
2933         (fold_builtin_bcopy): Deleted; call site changed to invoke
2934         fold_builtin_memory_op directly.
2935         (fold_builtin_strcpy): Similarly as for fold_builtin_memory_op.
2936         (fold_builtin_strncpy): Likewise.
2937         (fold_builtin_memcmp): Likewise.
2938         (fold_builtin_strcmp): Likewise.
2939         (fold_builtin_strncmp): Likewise.
2940         (fold_builtin_signbit): Likewise.
2941         (fold_builtin_copysign): Likewise.
2942         (fold_builtin_isascii): Likewise.
2943         (fold_builtin_toascii): Likewise.
2944         (fold_builtin_isdigit): Likewise.
2945         (fold_builtin_fabs): Likewise.
2946         (fold_builtin_abs): Likewise.
2947         (fold_builtin_fmin_fmax): Likewise.
2948         (fold_builtin_carg): Likewise.
2949         (fold_builtin_classify): Likewise.
2950         (fold_builtin_unordered_cmp): Likewise.
2951
2952         (fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4):
2953         New functions split out from fold_builtin_1.
2954         (fold_builtin_n): New.
2955         (fold_builtin_varargs): New.
2956         (fold_builtin): Deleted.  Most callers changed to use fold_call_expr
2957         instead.
2958         (fold_call_expr): New.
2959         (build_function_call_expr): Rewrite to use new helper function.
2960         (fold_builtin_call_list): New.
2961         (build_call_expr): New.
2962         (fold_builtin_call_valist): New.
2963         (rewrite_call_expr): New.
2964         (validate_arg): New.
2965         (validate_arglist): Change parameter to be entire CALL_EXPR instead
2966         of an arglist.  Change return type to bool.  Use new CALL_EXPR
2967         accessors.
2968
2969         (fold_builtin_strstr):  Pass call arguments individually instead
2970         of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
2971         accessors and constructors.  Return NULL_TREE instead of 0.
2972         (fold_builtin_strchr): Likewise.
2973         (fold_builtin_strrchr): Likewise.
2974         (fold_builtin_strpbrk): Likewise.
2975         (fold_builtin_strcat): Likewise.
2976         (fold_builtin_strncat): Likewise.
2977         (fold_builtin_strspn): Likewise.
2978         (fold_builtin_strcspn): Likewise.
2979         (fold_builtin_fputs): Likewise.
2980         (fold_builtin_next_arg): Likewise.
2981         (fold_builtin_sprintf): Likewise.
2982
2983         (expand_builtin_object_size): Use new CALL_EXPR accessors.  Use
2984         NULL_RTX instead of 0.
2985         (expand_builtin_memory_chk): Likewise.
2986         (maybe_emit_chk_warning): Likewise.
2987         (maybe_emit_sprintf_chk_warning): Likewise.
2988
2989         (fold_builtin_object_size): Pass call arguments individually instead
2990         of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
2991         accessors and constructors.  Return NULL_TREE instead of 0.
2992         (fold_builtin_memory_chk): Likewise.
2993         (fold_builtin_stxcpy_chk): Likewise.
2994         (fold_builtin_strncpy_chk): Likewise.
2995         (fold_builtin_strcat_chk): Likewise.
2996         (fold_builtin_strcat_chk): Likewise.
2997         (fold_builtin_strncat_chk): Likewise.
2998         (fold_builtin_sprintf_chk): Likewise.
2999         (fold_builtin_snprintf_chk): Likewise.
3000         (fold_builtin_printf): Likewise.
3001         (fold_builtin_vprintf): Likewise.
3002
3003         * fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and
3004         constructors.
3005         (operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case.
3006         (make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
3007         (extract_muldiv_1): Add VL_EXP_CLASS_P case.
3008         (fold_mathfn_compare): Use new CALL_EXPR accessors and constructors.
3009         (fold_unary): Likewise.
3010         (fold_binary): Likewise.
3011         (fold_ternary): Remove CALL_EXPR case, since they are no longer
3012         ternary expressions.
3013         (fold): Add logic for tcc_vl_exp.
3014         (fold_checksum_tree):  Make it know about tcc_vl_exp.  Use
3015         TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
3016         (fold_build3_stat): Add assertion to flag broken interface for
3017         constructing CALL_EXPRs.
3018         (fold_build_call_list): New.
3019         (fold_build_call_list_initializer): New.
3020         (tree_expr_nonnegative_p): Use new CALL_EXPR accessors and
3021         constructors.
3022         (fold_strip_sign_ops): Likewise.
3023
3024 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
3025             Brooks Moses  <brooks.moses@codesourcery.com>
3026             Lee Millward  <lee.millward@codesourcery.com>
3027
3028         * tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR
3029         accessors and dump arguments explicitly.
3030
3031         * tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of
3032         TREE_CODE_LENGTH.
3033         (dump_generic_node): Use new CALL_EXPR accessors and walk arguments
3034         explicitly.
3035         (print_call_name): Use new CALL_EXPR accessors.
3036
3037         * print-tree.c (print_node): Add case tcc_vl_exp.  Print
3038         CALL_EXPR arguments explicitly instead of as a list.  Use
3039         TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
3040
3041         * tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors.
3042         (vrp_visit_stmt): Likewise.
3043
3044         * tree-ssa-loop-im.c (outermost_invariant_loop_expr):  Make it
3045         know about tcc_vl_exp.  Use TREE_OPERAND_LENGTH instead of
3046         TREE_CODE_LENGTH.
3047         (force_move_till_expr): Likewise.
3048
3049         * targhooks.c (default_external_stack_protect_fail): Use
3050         build_call_expr instead of build_function_call_expr.
3051         (default_hidden_stack_protect_fail): Likewise.
3052
3053         * tree-complex.c (expand_complex_libcall): Use build_call_expr to
3054         build the call.
3055
3056         * cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors
3057         and walk arguments explicitly.
3058
3059         * tree-ssa-loop-niter.c (simplify_replace_tree): Use
3060         TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
3061         (expand_simple_operations): Likewise.
3062         (infer_loop_bounds_from_array): Use new CALL_EXPR accessors.
3063
3064         * gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead
3065         of TREE_CODE_LENGTH.
3066         (walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs.
3067
3068         * optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH
3069         instead of TREE_CODE_LENGTH.
3070
3071         * value_prof.c (tree_ic): Use new CALL_EXPR accessors.
3072         (tree_ic_transform): Likewise.
3073         (interesting_stringop_to_profile_p): Pass entire CALL_EXPR as
3074         parameter instead of arglist.  Fix callers.
3075         (tree_stringop_fixed_value): Use new CALL_EXPR accessors.
3076         (tree_stringops_transform): Likewise.
3077         (tree_indirect_call_to_profile): Likewise.
3078         (tree_stringops_values_to_profile): Likewise.
3079
3080         * tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator.
3081         (eliminate_tail_call): Likewise.
3082
3083         * ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors.
3084
3085         * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
3086         Use TREE_OPERAND_LENGTH and generalize to handle any number of
3087         operands.
3088         (instantiate_parameters_1): Can't handle tcc_vl_exp here.
3089
3090         * omp-low.c (build_omp_barrier): Use build_call_expr.
3091         (lower_rec_input_clauses): Likewise.
3092         (lower_reduction_clauses): Likewise.
3093         (expand_parallel_call): Likewise.
3094         (maybe_catch_exception): Likewise.
3095         (expand_omp_for_generic): Likewise.
3096         (expand_omp_for_static_nochunk): Likewise.
3097         (expand_omp_sections): Likewise.
3098         (lower_omp_single_simple): Likewise.
3099         (lower_omp_single_copy): Likewise.
3100         (lower_omp_master): Likewise.
3101         (lower_omp_ordered): Likewise.
3102         (lower_omp_critical): Likewise.
3103
3104         * ipa-reference.c (check-call): Use new CALL_EXPR iterator.
3105         (scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR.
3106
3107         * tree-gimple.c (is_gimple_call_addr): Fix doc.
3108         (recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of
3109         TREE_CODE_LENGTH.  Add tcc_vl_exp case.
3110
3111         * tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH
3112         and generalize to handle any number of operands.
3113         (chrec_contains_undetermined): Likewise.
3114         (tree_contains_chrecs): Likewise.
3115         (evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH.
3116
3117         * cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors.
3118
3119         * tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors.  Use
3120         fold_call_expr instead of fold_builtin.
3121         (ccp_fold_builtin): Likewise.  Update calls into builtins.c to
3122         match declarations there.
3123         (fold_stmt): Use new CALL_EXPR constructor and accessors.  Doc
3124         updates.
3125
3126         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use
3127         TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
3128
3129         * ipa-pure-const.c (check_call): Use new CALL_EXPR accessors.
3130         (scan_function): Add case tcc_vl_exp for CALL_EXPR.
3131
3132         * tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR
3133         accessors.
3134
3135         * tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr.
3136         (execute_cse_sincos): Use new CALL_EXPR accessors.
3137
3138         * tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator.
3139
3140         * gimple-low.c (lower_function_body): Use build_call_expr.
3141         (lower_builtin_setjmp): Likewise.
3142
3143         * expr.c (emit_block_move_via_libcall): Use build_call_expr.
3144         (set_storage_via_libcall): Likewise.
3145         (safe_from_p): Add tcc_vl_exp case.  Use TREE_OPERAND_LENGTH
3146         instead of TREE_CODE_LENGTH.
3147         (expand_expr_real_1): Use new CALL_EXPR accessors.
3148
3149         * tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and
3150         generalize to handle any number of operands.
3151         (TB_parent_eq): Likewise.
3152
3153         * predict.c (expr_expected_value): Use new CALL_EXPR accessors.
3154         (strip_builtin_expect): Likewise.
3155
3156         * function.c (gimplify_parameters): Use build_call_expr.
3157
3158         * tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH
3159         instead of TREE_CODE_LENGTH.
3160
3161         * ipa-type-escape.c (check_call): Use new CALL_EXPR iterators.
3162         (scan_for_refs): Add case tcc_vl_exp for CALL_EXPR.
3163
3164         * tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR
3165         iterators.
3166
3167         * gimplify.c (build_stack_save_restore): Use build_call_expr.
3168         (gimplify_decl_expr): Likewise.
3169         (gimplify_call_expr): Use fold_call_expr instead of fold_builtin.
3170         Use new CALL_EXPR iterators.
3171         (gimplify_modify_expr_to_memcpy): Use build_call_expr.
3172         (gimplify_modify_expr_to_memset): Likewise.
3173         (gimplify_variable_sized_compare): Likewise.
3174         (gimplify_omp_atomic_fetch_op): Likewise.
3175         (gimplify_omp_atomic_pipeline): Likewise.
3176         (gimplify_omp_atomic_mutex): Likewise.
3177         (gimplify_function_tree): Likewise.
3178
3179         * calls.c (alloca_call_p): Use new CALL_EXPR accessors.
3180         (call_expr_flags): Likewise.
3181         (expand_call): Likewise.
3182
3183         * except.c (expand_builtin_eh_return_data_regno): Pass entire
3184         CALL_EXPR as parameter instead of arglist.  Use new CALL_EXPR
3185         accessors.
3186
3187         * coverage.c (create_coverage): Use build_call_expr.
3188
3189         * tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete.
3190         (temp_call_expr_obstack): New.
3191         (pool_copy_list): Delete.
3192         (temp_copy_call_expr): New.
3193         (phi_translate): Add case tcc_vl_exp for CALL_EXPR.  Use new
3194         CALL_EXPR accessors.  Get rid of special goo for copying argument
3195         lists and use temp_copy_call_expr instead.
3196         (valid_in_sets): Add case tcc_vl_exp for CALL_EXPR.  Use new
3197         CALL_EXPR accessors.
3198         (create_expression_by_pieces): Likewise.  Use build_call_array
3199         to construct the result instead of fold_build3.
3200         (create_value_expr_from): Add tcc_vl_exp.  Delete special goo for
3201         dealing with argument lists.
3202         (init_pre): Remove references to expression_node_pool and
3203         list_node_pool.  Init temp_call_expr_obstack instead.
3204         (fini_pre): Remove references to expression_node_pool and
3205         list_node_pool.
3206
3207         * tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors
3208         and walk arguments explicitly instead of as a list.
3209
3210         * tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr.
3211         (mx_register_decls): Likewise.
3212         (mudflap_register_call): Likewise.
3213         (mudflap_finish_file): Likewise.
3214
3215         * ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors.
3216         (ipa_callsite_compute_param): Likewise.
3217
3218         * tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR
3219         accessors and constructor.
3220
3221         * tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR
3222         accessors and constructor.
3223         (convert_tramp_reference): Likewise.
3224         (convert_call_expr): Likewise.
3225         (finalize_nesting_tree_1): Likewise.
3226
3227         * tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR
3228         accessors.
3229
3230         * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr.
3231
3232         * tree-inline.c (initialize_inlined_parameters): Pass entire
3233         CALL_EXPR as parameter instead of arglist.  Use new CALL_EXPR
3234         accessors.
3235         (estimate_num_insns_1): Use new CALL_EXPR accessors.
3236         (expand_call_inline): Tidy up call to initialize_inlined_parameters.
3237
3238         * tree-vect-transform.c (vect_create_epilog_for_reduction):  Use
3239         TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
3240         (vectorizable_reduction): Likewise.
3241         (vectorizable_call): Use new CALL_EXPR iterators.
3242         (vectorizable_conversion): Use build_call_expr.
3243         (vectorizable_operation): Use TREE_OPERAND_LENGTH.
3244         (vect_gen_widened_results_half): Use build_call_expr.
3245         (vect_setup_realignment): Likewise.
3246         (vectorizable_live_operation): Use TREE_OPERAND_LENGTH.
3247
3248         * tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors.
3249         (pass_through_call): Likewise.
3250         (compute_object_sizes): Likewise.  Use fold_call_expr instead of
3251         fold_builtin.
3252
3253         * tree-profile.c (tree_gen_interval_profiler): Use build_call_expr.
3254         (tree_gen_pow2_profiler): Likewise.
3255         (tree_gen_one_value_profiler): Likewise.
3256         (tree_gen_ic_func_profiler): Likewise.
3257         (tree_gen_average_profiler): Likewise.
3258         (tree_gen_ior_profiler): Likewise.
3259
3260         * tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp.
3261         (find_func_aliases): Use new CALL_EXPR accessors.  Add case
3262         tcc_vl_exp.  Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
3263
3264         * tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead
3265         of TREE_CODE_LENGTH.
3266
3267         * stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead
3268         of TREE_CODE_LENGTH.
3269
3270         * convert.c (convert_to_real): Use new CALL_EXPR accessors and
3271         constructor.
3272         (convert_to_integer): Likewise.
3273
3274         * tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR
3275         accessors.
3276
3277 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
3278             Brooks Moses  <brooks.moses@codesourcery.com>
3279             Lee Millward  <lee.millward@codesourcery.com>
3280
3281         * config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR
3282         accessors.
3283         * config/frv/frv.c (frv_expand_builtin): Likewise.
3284         * config/s390/s390.c (s390_expand_builtin): Likewise.
3285
3286         * config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr.
3287         (sparc_expand_builtin): Use new CALL_EXPR accessors.
3288
3289         * config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise.
3290         (ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter
3291         instead of arglist.  Use new CALL_EXPR accessors on it.  Fix callers.
3292         (ix86_expand_store_builtin): Likewise.
3293         (ix86_expand_unop_builtin): Likewise.
3294         (ix86_expand_unop1_builtin): Likewise.
3295         (ix86_expand_sse_compare): Likewise.
3296         (ix86_expand_sse_comi): Likewise.
3297         (ix86_expand_vec_init_builtin): Likewise.
3298         (ix86_expand_vec_ext_builtin): Likewise.
3299         (ix86_expand_vec_set_builtin): Likewise.
3300         (ix86_expand_builtin): Use new CALL_EXPR accessors.
3301
3302         * config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors.
3303         * config/c4x/c4x.c (c4x_expand_builtin): Likewise.
3304
3305         * config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR
3306         instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
3307         (iq2000_expand_builtin): Use new CALL_EXPR accessors.
3308
3309         * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use
3310         build_call_expr.
3311         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise.
3312         (rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of
3313         arglist.  Use new CALL_EXPR accessors.  Fix callers.
3314         (altivec_expand_abs_builtin): Likewise.
3315         (rs6000_expand_binop_builtin): Likewise.
3316         (altivec_expand_predicate_builtin): Likewise.
3317         (altivec_expand_lv_builtin): Likewise.
3318         (spe_expand_stv_builtin): Likewise.
3319         (altivec_expand_stv_builtin): Likewise.
3320         (rs6000_expand_ternop_builtin): Likewise.
3321         (altivec_expand_ld_builtin): Use new CALL_EXPR accessors.
3322         (altivec_expand_st_builtin): Likewise.
3323         (altivec_expand_dst_builtin): Likewise.
3324         (altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of
3325         arglist.  Use new CALL_EXPR accessors.  Fix callers.
3326         (altivec_expand_vec_set_builtin): Likewise.
3327         (altivec_expand_vec_ext_builtin): Likewise.
3328         (altivec_expand_builtin): Use new CALL_EXPR accessors.
3329         (spe_expand_builtin): Likewise.
3330         (spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of
3331         arglist.  Use new CALL_EXPR accessors.  Fix callers.
3332         (spe_expand_evsel_builtin): Likewise.
3333         (rs6000_expand_builtin): Use new CALL_EXPR accessors.  VCFUX and
3334         FCFSX cases must construct whole new CALL_EXPR, not just arglist.
3335
3336         * config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR
3337         instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
3338         (arm_expand_unop_builtin): Likewise.
3339         (arm_expand_builtin): Use new CALL_EXPR accessors.
3340
3341         * config/mips/mips.c (mips_expand_builtin):  Use new CALL_EXPR
3342         accessors.
3343
3344         * config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR
3345         instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
3346         (bfin_expand_unop_builtin): Likewise.
3347         (bfin_expand_builtin): Use new CALL_EXPR accessors.
3348
3349 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
3350             Brooks Moses  <brooks.moses@codesourcery.com>
3351             Lee Millward  <lee.millward@codesourcery.com>
3352
3353         * c-semantics.c (build_stmt): Add internal diagnostic check.
3354
3355         * c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR
3356         accessors.  Print arguments explicitly instead of as a list.
3357
3358         * c-typeck.c (build_function_call): Use new CALL_EXPR constructors.
3359
3360         * c-omp.c (c_finish_omp_barrier): Use build_call_expr.
3361         (c_finish_omp_flish): Likewise.
3362
3363         * c-common.c (verify_tree): Use new CALL_EXPR accessors.  Traverse
3364         arguments explicitly instead of as a list.  Use TREE_OPERAND_LENGTH
3365         instead of TREE_CODE_LENGTH.
3366         (check_function_arguments_recurse): Use new CALL_EXPR accessors.
3367         (c_warn_unused_result): Likewise.
3368
3369 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3370
3371         PR c/26494
3372         * doc/invoke.texi (Warning Options): Remove
3373         -Werror-implicit-function-declaration.
3374         (Wimplicit-function-declaration): Update description.
3375         * opts.c (common_handle_option): Move handling of -Werror=* to...
3376         (enable_warning_as_error): ...here.
3377         * opts.h (enable_warning_as_error): Declare.
3378         * c-decl.c (implicit_decl_warning): Unless
3379         -Wno-implicit-function-declaration is given, emit a pedwarn if
3380         -std=c99 or emit a warning if -Wimplicit-function-declaration.
3381         * c.opt (Wimplicit-function-declaration): Replace
3382         mesg_implicit_function_declaration with
3383         warn_implicit_function_declaration.
3384         * c-opts.c (c_common_handle_option):
3385         -Werror-implicit-function-declaration is exactly equal as
3386         -Werror=implicit-function-declaration.
3387         (set_Wimplicit): Replace mesg_implicit_function_declaration with
3388         warn_implicit_function_declaration.
3389         (c_common_post_options): -Wimplict-function-declaration is enabled
3390         by default by -std=c99, otherwise is disabled by default.
3391         * c-objc-common.c (c_objc_common_init): Remove flawed logic.
3392
3393 2007-02-15  Eric Botcazou  <ebotcazou@adacore.com>
3394
3395         * gimplify.c (gimplify_modify_expr): During gimplification, attach a
3396         DECL on the rhs to a DECL on the lhs for debug info purposes if the
3397         former is ignored but not the latter.
3398
3399 2007-02-15  Eric Botcazou  <ebotcazou@adacore.com>
3400
3401         * expr.c (expand_expr_real_1) <normal_inner_ref>: If a temporary
3402         is made and the reference doesn't use the alias set of its type,
3403         do not create the temporary using that type.
3404
3405 2007-02-15  Aldy Hernandez  <aldyh@redhat.com>
3406
3407         * jump.c: Remove prototypes for delete_computation and
3408         delete_prior_computation.
3409
3410 2007-02-15  Paolo Bonzini  <bonzini@gnu.org>
3411
3412         * jump.c (get_label_after): Delete.
3413         (get_label_before, delete_computation, delete_jump,
3414         delete_prior_computation, follow_jumps): Move...
3415         * reorg.c (delete_computation, delete_prior_computation): ... here...
3416         (get_label_before, delete_jump): ... making these static ...
3417         (follow_jumps): ... and simplifying this since it only runs after
3418         reload.
3419         * rtl.h (get_label_after, get_label_before, delete_jump,
3420         follow_jumps): Delete prototypes.
3421
3422 2007-02-15  Paolo Bonzini  <bonzini@gnu.org>
3423
3424         * caller-save.c (save_call_clobbered_regs): Do not process sibcalls.
3425
3426 2007-02-15  Nick Clifton  <nickc@redhat.com>
3427
3428         * varasm.c (default_asm_output_anchor): Prepend * to . symbol in
3429         order to prevent it from being munged by the target.
3430
3431 2007-02-15  Uros Bizjak  <ubizjak@gmail.com>
3432
3433         * config/i386/i386.md: Remove misleading comment.
3434
3435 2007-02-15  Alexandre Oliva  <aoliva@redhat.com>
3436
3437         * config/frv/frv.md (reload_incc, reload_outcc, reload_incc_uns,
3438         reload_outcc_uns, reload_incc_nz, reload_outcc_nz): Remove
3439         invalid patterns.
3440
3441 2007-02-15  Alexandre Oliva  <aoliva@redhat.com>
3442
3443         * tree-sra.c (instantiate_missing_elements): Canonicalize
3444         bit-field types.
3445         (sra_build_assignment): New.
3446         (generate_copy_inout, generate_element_copy,
3447         generate_element_zero, generate_one_element_init): Use it.
3448
3449 2007-02-15  Alexandre Oliva  <aoliva@redhat.com>
3450
3451         * tree-sra.c (instantiate_missing_elements): Canonicalize
3452         bit-field types.
3453         (sra_build_assignment): New.
3454         (generate_copy_inout, generate_element_copy,
3455         generate_element_zero, generate_one_element_init): Use it.
3456
3457 2007-02-15  Alexandre Oliva  <aoliva@redhat.com>
3458
3459         * dwarf2out.c (dwarf2out_finish): Accept namespaces as context of
3460         limbo die nodes.
3461
3462 2007-02-14  Joseph Myers  <joseph@codesourcery.com>
3463
3464         * emit-rtl.c (set_mem_attributes_minus_bitpos): Treat complex
3465         types as aggregates not scalars.
3466         * function.c (assign_stack_temp_for_type): Likewise.
3467
3468 2007-02-14  Roger Sayle  <roger@eyesopen.com>
3469             Zdenek Dvorak  <dvorakz@suse.cz>
3470
3471         * tree-dump.c (dump_switch_p_1): Require exact match of the option
3472         name.
3473
3474 2007-02-14  Zdenek Dvorak  <dvorakz@suse.cz>
3475
3476         * passes.c (next_pass_1): Clear the next field of the copied
3477         pass structure.
3478
3479 2007-02-14  Richard Henderson  <rth@redhat.com>
3480
3481         * tree-sra.c (early_sra): New.
3482         (decl_can_be_decomposed_p): Deny va_list if early_sra.
3483         (tree_sra_early, pass_sra_early): New.
3484         * tree-pass.h (pass_sra_early): Declare.
3485         * passes.c (init_optimization_passes): Use it.
3486
3487 2007-02-14  Richard Guenther  <rguenther@suse.de>
3488
3489         * flags.h (issue_strict_overflow_warning): Convert to a macro.
3490
3491 2007-02-14  Dorit Nuzman  <dorit@il.ibm.com>
3492
3493          PR tree-optimization/30771
3494         * tree-vect-analyze.c (vect_determine_vectorization_factor): Traverse
3495         also phi nodes.
3496         (vect_analyze_operations): Induction phis can now be marked as
3497         used_in_loop.
3498         (vect_mark_stmts_to_be_vectorized): No special treatment for phis.
3499         Update documentation accordingly.
3500
3501 2007-02-14  Nick Clifton  <nickc@redhat.com>
3502
3503         * builtin-types.def (DEF_FUNCTION_TYPE_x): Do not imply that at
3504         most 3 arguments are supported.
3505         (DEF_FUNCTION_TYPE_VAR_5): Fix typo in its description.
3506
3507 2007-02-13  Seongbae Park <seongbae.park@gmail.com>
3508
3509         * bitmap.c (bitmap_and, bitmap_and_compl, bitmap_xor):
3510         Ensure dst->current is valid.
3511
3512 2007-02-13  Paul Brook  <paul@codesourcery.com>
3513
3514         * config.gcc: Add arm*-*-uclinux-*eabi.
3515         * config/arm/uclinux-elf.h (TARGET_OS_CPP_BUILTINS): Define.
3516         (SUBTARGET_EXTRA_LINK_SPEC): Define.
3517         (STARTFILE_SPEC, ENDFILE_SPEC): Remove broken -shared handling.
3518         (LINK_GCC_C_SEQUENCE_SPEC): Undef.
3519         (LINK_SPEC): Define.
3520         (LIB_SPEC): Define.
3521         * config/arm/arm.c (arm_override_options): Use r9 as EABI PIC
3522         register.
3523         * config/arm/uclinux-eabi.h: New file.
3524         * config/arm/linux-eabi.h (WCHAR_TYPE): Remove.
3525         * config/arm/linux-gas.h (WCHAR_TYPE): Use unsigned long on AAPCS
3526         based targets.
3527
3528 2007-02-13  Ian Lance Taylor  <iant@google.com>
3529
3530         * common.opt: Add Wstrict-overflow and Wstrict-overflow=.
3531         * flags.h (warn_strict_overflow): Declare.
3532         (enum warn_strict_overflow_code): Define.
3533         (issue_strict_overflow_warning): New static inline function.
3534         * opts.c (warn_strict_overflow): New variable.
3535         (common_handle_option): Handle OPT_Wstrict_overflow and
3536         OPT_Wstrict_overflow_.
3537         * c-opts.c (c_common_handle_option): Set warn_strict_overflow for
3538         OPT_Wall.
3539         * fold-const.c: Include intl.h.
3540         (fold_deferring_overflow_warnings): New static variable.
3541         (fold_deferred_overflow_warning): New static variable.
3542         (fold_deferred_overflow_code): New static variable.
3543         (fold_defer_overflow_warnings): New function.
3544         (fold_undefer_overflow_warnings): New function.
3545         (fold_undefer_and_ignore_overflow_warnings): New function.
3546         (fold_deferring_overflow_warnings_p): New function.
3547         (fold_overflow_warning): New static function.
3548         (make_range): Add strict_overflow_p parameter.  Change all
3549         callers.
3550         (extract_muldiv, extract_muldiv_1): Likewise.
3551         (fold_unary) [ABS_EXPR]: Check ABS_EXPR before calling
3552         tree_expr_nonnegative_p.
3553         (fold_negate_expr): Call fold_overflow_warning.
3554         (fold_range_test): Likewise.
3555         (fold_comparison): Likewise.
3556         (fold_binary): Likewise.  Call tree_expr_nonnegative_warnv_p
3557         instead of tree_expr_nonnegative_p.
3558         (tree_expr_nonnegative_warnv_p): Rename from
3559         tree_expr_nonnegative_p, add strict_overflow_p parameter.
3560         (tree_expr_nonnegative_p): New function.
3561         (tree_expr_nonzero_warnv_p): Rename from tree_expr_nonzero_p, add
3562         strict_overflow_p parameter.
3563         (tree_expr_nonzero_p): New function.
3564         * passes.c (verify_interpass_invariants): New static function.
3565         (execute_one_pass): Call it.
3566         * tree-ssa-loop-niter.c (expand_simple_operations): Ignore fold
3567         warnings.
3568         (number_of_iterations_exit, loop_niter_by_eval): Likewise.
3569         (estimate_numbers_of_iterations): Likewise.
3570         (scev_probably_wraps_p): Likewise.
3571         * tree-ssa-ccp.c: Include "toplev.h".
3572         (evaluate_stmt): Defer fold overflow warnings until we know we are
3573         going to optimize.
3574         (struct fold_stmt_r_data): Add stmt field.
3575         (fold_stmt_r): Defer fold overflow warnings until we know we
3576         optimized.
3577         (fold_stmt): Initialize stmt field of fold_stmt_r_data.
3578         (fold_stmt_inplace): Likewise.
3579         * tree-cfgcleanup.c: Include "toplev.h" rather than "errors.h".
3580         (cleanup_control_expr_graph): Defer fold overflow warnings until
3581         we know we are going to optimize.
3582         * tree-cfg.c (fold_cond_expr_cond): Likewise.
3583         * tree-ssa-threadedge.c (simplify_control_stmt_condition):
3584         Likewise.
3585         * tree-vrp.c (vrp_expr_computes_nonnegative): Call
3586         tree_expr_nonnegative_warnv_p instead of tree_expr_nonnegative_p.
3587         * tree-ssa-loop-manip.c (create_iv): Likewise.
3588         * c-typeck.c (build_conditional_expr): Likewise.
3589         (build_binary_op): Likewise.
3590         * tree-vrp.c (vrp_expr_computes_nonzero): Call
3591         tree_expr_nonzero_warnv_p instead of tree_expr_nonzero_p.
3592         (extract_range_from_unary_expr): Likewise.
3593         * simplify-rtx.c (simplify_const_relational_operation): Warn when
3594         assuming that signed overflow does not occur.
3595         * c-common.c (pointer_int_sum): Ignore fold overflow warnings.
3596         * tree.h (tree_expr_nonnegative_warnv_p): Declare.
3597         (fold_defer_overflow_warnings): Declare.
3598         (fold_undefer_overflow_warnings): Declare.
3599         (fold_undefer_and_ignore_overflow_warnings): Declare.
3600         (fold_deferring_overflow_warnings_p): Declare.
3601         (tree_expr_nonzero_warnv_p): Declare.
3602         * doc/invoke.texi (Option Summary): Add -Wstrict-overflow to list
3603         of warning options.
3604         (Warning Options): Document -Wstrict-overflow.
3605         * Makefile.in (tree-ssa-threadedge.o): Depend on toplev.h.
3606         (tree-ssa-ccp.o): Likewise.
3607         (tree-cfgcleanup.o): Change errors.h dependency to toplev.h.
3608         (fold-const.o): Depend on intl.h.
3609
3610 2007-02-13  Ian Lance Taylor  <iant@google.com>
3611
3612         PR middle-end/30751
3613         * lower-subreg.c (resolve_simple_move): Decompose subregs in
3614         addresses.
3615
3616 2007-02-13  Stuart Hastings  <stuart@apple.com>
3617
3618         * gcc/config/i386/i386.md (fixuns_truncdfhi2): Require SSE2.
3619
3620 2007-02-13  Richard Henderson  <rth@redhat.com>
3621
3622         * config/alpha/alpha.c (alpha_stdarg_optimize_hook): Strip
3623         handled_component_p before looking for the indirect_ref.
3624
3625 2007-02-13  Richard Henderson  <rth@redhat.com>
3626
3627         * config/i386/i386.md (bswapsi_1): Rename from bswapsi2,
3628         remove flags clobber.
3629         (bswapsi2): New expander, emit code for !TARGET_BSWAP.
3630         (bswaphi_lowpart): New.
3631         (bswapdi2): Rename from bswapdi2_rex, remove flags clobber,
3632         remove TARGET_BSWAP test.  Delete expander of the same name.
3633
3634         * optabs.c (widen_bswap, expand_doubleword_bswap): New.
3635         (expand_unop): Use them.
3636
3637 2007-02-13  Uros Bizjak  <ubizjak@gmail.com>
3638
3639         * config/i386/i386.md (cmpdi_ccno_1_rex64, *cmpsi_ccno_1,
3640         *cmphi_ccno_1, *cmpqi_ccno_1, *movsi_xor, *movstricthi_xor,
3641         *movstrictqi_xor, *movdi_xor_rex64, *ashldi3_1_rex64,
3642         *ashldi3_cmp_rex64, *ashldi3_cconly_rex64, ashlsi3, *ashlsi3_1_zext,
3643         *ashlsi3_cmp, *ashlsi3_cconly, *ashlsi3_cmp_zext, *ashlhi3_1_lea,
3644         *ashlhi3_1, *ashlhi3_cmp, *ashlhi3_cconly, *ashlqi3_1_lea,
3645         *ashlqi3_1, *ashlqi3_cmp, *ashlqi3_cconly): Remove equivalent
3646         assembler dialect choice from asm templates.
3647
3648 2007-02-12  Richard Henderson  <rth@redhat.com>
3649
3650         * config/i386/i386.md (fixuns_trunc<SSEMODEF>si_1): New insn.
3651         (fixuns_trunc<SSEMODEF>si2): Use it.
3652         * config/i386/sse.md (vec_setv4sf_0): Export.
3653         * config/i386/i386.c (ix86_build_const_vector): Export.
3654         (ix86_split_convert_uns_si_sse): Rename from
3655         ix86_expand_convert_uns_si_sse and rewrite as a splitter.
3656         * config/i386/i386-protos.h: Update.
3657
3658 2007-02-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3659
3660         PR c/29521
3661         * c-typeck.c (c_finish_return): Improve warning message.
3662
3663 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3664
3665         * alias.c (find_symbolic_term): Delete unused function.
3666
3667 2007-02-12  Uros Bizjak  <ubizjak@gmail.com>
3668
3669         * config/i386/i386.md (paritydi2, paritysi2): New expanders.
3670         (paritydi2_cmp, paritydi2_cmp): New insn and split patterns.
3671         (*parityhi2_cmp, *parityqi2_cmp): New insn patterns.
3672
3673 2007-02-12  Eric Botcazou  <ebotcazou@adacore.com>
3674
3675         * tree.h (DECL_IGNORED_P): Document further effect for FUNCTION_DECL.
3676         * cgraphunit.c (cgraph_expand_function): If DECL_IGNORED_P is set on
3677         the function, temporarily point the debug interface to the null one.
3678
3679 2007-02-12  Eric Botcazou  <ebotcazou@adacore.com>
3680
3681         * dwarf2out.c (round_up_to_align): New static function.
3682         (field_byte_offset): Use it to round the offset.
3683
3684 2007-02-12  Richard Henderson  <rth@redhat.com>
3685
3686         * config/alpha/alpha.md (bswapsi2, bswapdi2): New.
3687         (inswl_const): Export.
3688
3689 2007-02-12  Richard Henderson  <rth@redhat.com>
3690
3691         * calls.c (emit_library_call_value_1): If PROMOTE_MODE modifed the
3692         result mode of the libcall, convert back to outmode.
3693
3694 2007-02-12  Roger Sayle  <roger@eyesopen.com>
3695
3696         * config/i386/i386.md (*bswapdi2_rex): Renamed from bswapdi2.
3697         (bswapdi2): New define_expand to implement 32-bit implementation.
3698
3699 2007-02-12  Nick Clifton  <nickc@redhat.com>
3700
3701         * doc/invoke.texi (Overall Options): Document --help=.
3702         * gcc.c (target_help_flag): Rename to print_subprocess_flag.
3703         (cc1_options): Pass --help= on to cc1.
3704         (display_help): Add description of --help=.
3705         (process_command): Add code to handle --help=.  Allow translated
3706         --help and --target-help switches to be passed on to compiler
3707         sub-process.
3708         (main): Remove unused if statement.
3709         * opts.c (columns): Remove.
3710         (LEFT_COLUMN): Define.
3711         (wrap_help): Add columns argument.
3712         (print_filtered_help): Change parameters to be an include bitmask,
3713         an exclude bitmask, an any bitmask and the column width.  Move the
3714         code to display the params list here.  Add code to display the
3715         status of options rather than their descriptions if the quiet flag
3716         is not active.
3717         (print_specific_help): Change parameters to be an include bitmask,
3718         an exclude bitmask and an any bitmask.  Move code to look up the
3719         column width here.  Decide upon the title for an options listing.
3720         (common_handle_options): Add code to handle --help=.  Adapt code
3721         for --help and --target-help to use the revised form of the
3722         print_specific_help function.
3723         (print_help): Delete.
3724         (print_param_help): Delete.
3725         (print_switch): Delete.
3726         * opts.h (cl_lang_count): Add prototype.
3727         (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_MIN_OPTION_CLASS,
3728         CL_MAX_OPTION_CLASS): New defines.
3729         * optc-gen.awk: Add construction of cl_lang_count.
3730         * c.opt: Add Warning attribute to warning options and Optimization
3731         attribute to optimization options.
3732         * common.opt: Likewise.
3733         Add --help=.
3734         Add -fhelp and -ftarget-help as aliases for the transformed --help
3735         and --target-help options.
3736         * opt-functions.awk: Add code to handle Warning and Optimization
3737         attributes.
3738
3739 2007-02-12  Richard Henderson  <rth@redhat.com>
3740
3741         * config/alpha/constraints.md: New file.
3742         * config/alpha/alpha.c: Include tm-constrs.h.
3743         (alpha_const_ok_for_letter_p, alpha_const_double_ok_for_letter_p,
3744         alpha_extra_constraint): Remove.
3745         (alpha_emit_conditional_branch): Use satisfies_constraint_*.
3746         * config/alpha/alpha-protos.h: Update.
3747         * config/alpha/alpha.h (REG_CLASS_FROM_LETTER): Remove.
3748         (CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P): Remove.
3749         (EXTRA_CONSTRAINT): Remove.
3750         * config/alpha/alpha.md: Include constraints.md.
3751         (adddi splitter): Use satisfies_constraint_*.
3752         * config/alpha/predicates.md (add_operand): Likewise.
3753         (sext_add_operand, addition_operation): Likewise.
3754
3755 2007-02-12  Dorit Nuzman  <dorit@il.ibm.com>
3756
3757         PR tree-optimization/29145
3758         * tree-data-ref.c (base_addr_differ_p): Make us more conservative
3759         in our handling of restrict qualified pointers.
3760
3761 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3762
3763         PR middle-end/7651
3764         * doc/invoke.texi (Wunused-value): Update description.
3765         (Wextra): Delete item.
3766         * opts.c (set_Wextra): Don't use the value of Wextra to set the
3767         value of Wunused-value.
3768         * c-typeck.c (c_process_expr_stmt): Don't check extra_warnings.
3769         (c_finish_stmt_expr): Don't check extra_warnings.
3770         (emit_side_effect_warnings): The caller is responsible to check
3771         warn_unused_value.
3772
3773 2007-02-11  Roger Sayle  <roger@eyesopen.com>
3774             Matt Thomas  <matt@3am-software.com>
3775
3776         * simplify-rtx.c (simplify_relational_operation_1): Correct typo.
3777
3778 2007-02-11  Roger Sayle  <roger@eyesopen.com>
3779
3780         * simplify-rtx.c (simplify_relational_operation_1): Optimize
3781         comparisons of POPCOUNT against zero.
3782         (simplify_const_relational_operation): Likewise.
3783
3784 2007-02-11  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3785
3786         * doc/invoke.texi (Wextra): Delete outdated paragraph.
3787
3788 2007-02-11  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3789
3790         * dwarf2out.c (root_type): Delete unused function.
3791
3792 2007-02-11  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3793
3794         * genattrtab.c (contained_in_p): Delete unused function.
3795         (write_expr_attr_cache): Likewise.
3796
3797 2007-02-11  Jan Hubicka  <jh@suse.cz>
3798
3799         * ipa-inline.c (cgraph_edge_badness): Add "else" missing in the
3800         previous patch.
3801
3802 2007-02-11  Steven Bosscher  <steven@gcc.gnu.org>
3803
3804         * fwprop.c (try_fwprop_subst): Use set_unique_reg_note
3805         to add the REG_EQ* note.
3806         * see.c (see_merge_one_use_extension): Likewise.
3807         * local-alloc.c (update_equiv_regs): Likewise.  Also don't
3808         turn REG_EQUAL notes into REG_EQUIV notes if the target
3809         register may have more than one set.
3810         * function.c (assign_parm_setup_reg): Use set_unique_reg_note.
3811         * gcse.c (try_replace_reg): Likewise.
3812         * alias.c (init_alias_analysis): Use find_reg_equal_equiv_note.
3813         * calls.c (fixup_tail_calls): Likewise.  Abort if there is
3814         more than one REG_EQUIV note.
3815         * reload1.c (gen_reload): Use set_unique_reg_note.
3816
3817 2007-02-11  Uros Bizjak  <ubizjak@gmail.com>
3818
3819         * config/i386/i386.c (TARGET_VECTORIZE_BUILTIN_CONVERSION): Define.
3820         (ix86_builtin_conversion): New function.
3821
3822 2007-02-06  Mark Mitchell  <mark@codesourcery.com>
3823
3824         PR target/29487
3825         * tree.h (DECL_REPLACEABLE_P): New macro.
3826         * except.c (set_nothrow_function_flags): Likewise.
3827
3828 2007-02-11  Tehila Meyzels  <tehila@il.ibm.com>
3829             Ira Rosen  <irar@il.ibm.com>
3830             Dorit Nuzman  <dorit@il.ibm.com>
3831
3832         * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_CONVERSION): New target hook.
3833         * targhooks.c (default_builtin_vectorized_conversion): New.
3834         * targhooks.h (default_builtin_vectorized_function): New declaration.
3835         * target.h (struct vectorize): Add builtin_conversion field.
3836         * tree-vectorizer.h (type_conversion_vec_info_type): New enum
3837         stmt_vec_info_type value.
3838         (vectorizable_conversion): New declaration.
3839         * tree-vect-analyze.c (vect_analyze_operations): Add
3840         vectorizable_conversion call.
3841         * target-def.h (TARGET_VECTORIZE_BUILTIN_CONVERSION): New.
3842         * tree-vect-transform.c (vectorizable_conversion): New function.
3843         (vect_transform_stmt): Add case for type_conversion_vec_info_type.
3844         * tree-vect-generic.c (expand_vector_operations_1): Consider correct
3845         mode.
3846         * config/rs6000/rs6000.c (rs6000_builtin_conversion): New.
3847         (TARGET_VECTORIZE_BUILTIN_CONVERSION): Defined.
3848         (rs6000_expand_builtin): Add handling a case of ALTIVEC_BUILTIN_VCFUX
3849         or ALTIVEC_BUILTIN_VCFSX.
3850
3851 2007-02-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3852
3853         PR target/30634
3854         * pa.md (movdf): For 64-bit target, fail if operand 1 is a non-zero
3855         CONST_DOUBLE and operand 0 is a hard register.
3856         (movdi): For 64-bit target, remove code to force CONST_DOUBLE to
3857         memory.  Fail if operand 1 is a non-zero CONST_INT and operand 0
3858         is a hard floating-point register.
3859
3860 2007-02-10  Richard Henderson  <rth@redhat.com>
3861             Jakub Jelinek  <jakub@redhat.com>
3862             Alexandre Oliva  <aoliva@redhat.com>
3863
3864         * Makefile.in (libgcc-support, libgcc.mvars): Add emutls.c.
3865         * builtin-types.def (BT_WORD): Make unsigned.
3866         (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
3867         * builtins.def (BUILT_IN_EMUTLS_GET_ADDRESS): New.
3868         (BUILT_IN_EMUTLS_REGISTER_COMMON): New.
3869         * c-decl.c (grokdeclarator): Don't error if !have_tls.
3870         * c-parser.c (c_parser_omp_threadprivate): Likewise.
3871         * dwarf2out.c (loc_descriptor_from_tree_1): Don't do anything for
3872         emulated tls.
3873         * expr.c (emutls_var_address): New.
3874         (expand_expr_real_1): Expand emulated tls.
3875         (expand_expr_addr_expr_1): Likewise.
3876         * libgcc-std.ver: Add __emutls_get_address, __emutls_register_common.
3877         * output.h (emutls_finish): Declare.
3878         * toplev.c (compile_file): Call it.
3879         * tree-ssa-address.c (gen_addr_rtx): Check for const-ness of the
3880         address before wrapping in CONST.
3881         * varasm.c (emutls_htab, emutls_object_type): New.
3882         (EMUTLS_VAR_PREFIX, EMUTLS_TMPL_PREFIX): New.
3883         (get_emutls_object_name, get_emutls_object_type): New.
3884         (get_emutls_init_templ_addr, emutls_decl): New.
3885         (emutls_common_1, emutls_finish): New.
3886         (assemble_variable): When emulating tls, swap decls; generate
3887         constructor for the emutls objects.
3888         (do_assemble_alias): When emulating tls, swap decl and target name.
3889         (default_encode_section_info): Don't add SYMBOL_FLAG_TLS_SHIFT
3890         for emulated tls.
3891         * varpool.c (decide_is_variable_needed): Look at force_output.
3892         Recurse for emulated tls.
3893         (cgraph_varpool_remove_unreferenced_decls): Remove checks redundant
3894         with decide_is_variable_needed.
3895         * emutls.c: New file.
3896         * config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Only emit
3897         tls_object for real tls.
3898
3899 2007-02-10  Kaz Kojima  <kkojima@gcc.gnu.org>
3900
3901         PR rtl-optimization/29599
3902         * reload1.c (eliminate_regs_in_insn): Take the destination
3903         mode into account when computing the offset.
3904
3905 2007-02-09  Stuart Hastings  <stuart@apple.com>
3906             Richard Henderson  <rth@redhat.com>
3907
3908         * gcc/config/i386/i386.h (TARGET_KEEPS_VECTOR_ALIGNED_STACK): New.
3909         * gcc/config/i386/darwin.h: (TARGET_KEEPS_VECTOR_ALIGNED_STACK): New.
3910         * gcc/config/i386/i386.md (fixuns_trunc<mode>si2, fixuns_truncsfhi2,
3911         fixuns_truncdfhi2): New.
3912         (fix_truncsfdi_sse): Call ix86_expand_convert_sign_didf_sse.
3913         (floatunsdidf2): Call ix86_expand_convert_uns_didf_sse.
3914         (floatunssisf2): Add call to ix86_expand_convert_uns_sisf_sse.
3915         (floatunssidf2): Allow nonimmediate source.
3916         * gcc/config/i386/sse.md (movdi_to_sse): New.
3917         (vec_concatv2di): Drop '*'.
3918         * gcc/config/i386/i386-protos.h (ix86_expand_convert_uns_si_sse,
3919         ix86_expand_convert_uns_didf_sse, ix86_expand_convert_uns_sidf_sse,
3920         ix86_expand_convert_uns_sisf_sse, ix86_expand_convert_sign_didf_sse):
3921         New.
3922         * gcc/config/i386/i386.c (ix86_expand_convert_uns_si_sse,
3923         ix86_expand_convert_uns_didf_sse, ix86_expand_convert_uns_sidf_sse,
3924         ix86_expand_convert_uns_sisf_sse, ix86_expand_convert_sign_didf_sse,
3925         ix86_build_const_vector, ix86_expand_vector_init_one_nonzero): New.
3926         (ix86_build_signbit_mask): Fix decl of v, refactor to call
3927         ix86_build_const_vector.
3928         (x86_emit_floatuns): Rewrite.
3929
3930 2007-02-10  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3931
3932         * genautomata.c (longest_path_length): Delete unused function.
3933         (struct state): Delete unused longest_path_length.
3934         (UNDEFINED_LONGEST_PATH_LENGTH): Delete unused macro.
3935         (get_free_state): Delete unused.
3936
3937 2007-02-09  Jan Hubicka  <jh@suse.cz>
3938
3939         * params.def (PARAM_INLINE_UNIT_GROWTH): Set to 30.
3940         * doc/invoke.texi (inline-unit-growth): Update default value.
3941
3942         * Makefile.in (passes.o, ipa-inline.o): Add dependencies.
3943         * cgraphbuild.c (build_cgraph_edges): Compute frequencies.
3944         (rebuild_cgraph_edges): Likewise.
3945         * cgraph.c (cgraph_set_call_stmt): Add new argument frequency.
3946         (dump_cgraph_node): Dump frequencies.
3947         (cgraph_clone_edge): Add frequency scales.
3948         (cgraph_clone_node): Add freuqnecy.
3949         * cgraph.h (cgraph_edge): Add freuqnecy argument.
3950         (CGRAPH_FREQ_BASE, CGRAPH_FREQ_MAX): New constants.
3951         (cgraph_create_edge, cgraph_clone_edge, cgraph_clone_node): Update.
3952         * tree-pass.h (TODO_rebuild_frequencies): New constant.
3953         * cgraphunit.c (verify_cgraph_node): Verify frequencies.
3954         (cgraph_copy_node_for_versioning): Update call of cgraph_clone_edge.
3955         (save_inline_function_body): Likewise.
3956         * ipa-inline.c: inluce rtl.h
3957         (cgraph_clone_inlined_nods): Update call of cgraph_clone_node.
3958         (cgraph_edge_badness): Use frequencies.
3959         (cgraph_decide_recursive_inlining): Update clonning.
3960         (cgraph_decide_inlining_of_small_function): Dump frequency.
3961         * predict.c (estimate_bb_frequencies): Export.
3962         * predict.h (estimate_bb_frequencies): Declare.
3963         * tree-inline.c (copy_bb): Watch overflows.
3964         (expand_call_inline): Update call of cgraph_create_edge.
3965         (optimize_inline_calls): Use TODO flags to update frequnecies.
3966         * passes.h: Include predict.h
3967         (init_optimization_passes): Move profile ahead.
3968         (execute_function_todo): Handle TODO_rebuild_frequencies.
3969
3970 2007-02-09  Roger Sayle  <roger@eyesopen.com>
3971
3972         * config/alpha/alpha.c (emit_insxl): Force the first operand of
3973         the insbl or inswl pattern into a register.
3974
3975 2007-02-09  Roger Sayle  <roger@eyesopen.com>
3976
3977         * config/ia64/ia64.md (bswapdi2): New define_insn.
3978
3979 2007-02-09  Richard Henderson  <rth@redhat.com>
3980
3981         * config/i386/constraints.md (Ym): New constraint.
3982         * config/i386/i386.md (movsi_1): Change Y2 to Yi constraints.
3983         (movdi_1_rex64): Split sse and xmm general register moves from
3984         memory move alternatives.  Use conditional register constraints.
3985         (movsf_1, movdf_integer): Likewise.