OSDN Git Service

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