OSDN Git Service

PR target/43888
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2010-05-06  Dave Korn  <dave.korn.cygwin@gmail.com>
2
3         PR target/43888
4         * config/i386/winnt.c (i386_pe_binds_local_p): Tweak weak symbol
5         handling to still return true for x64 targets.
6
7 2010-05-06  Maxim Kuvyrkov  <maxim@codesourcery.com>
8
9         * config/m68k/uclinux.h (LIB_SPEC): Bring in sync with config/linux.h.
10
11 2010-05-06  Jan Hubicka  <jh@suse.cz>
12
13         PR tree-optimization/43791
14         * ipa-inline.c (update_caller_keys): Remove bogus
15         disregard_inline_limits check.
16
17 2010-05-06  Michael Matz  <matz@suse.de>
18
19         PR tree-optimization/43984
20         * tree-ssa-pre.c (inserted_phi_names): Remove.
21         (inserted_exprs): Change to bitmap.
22         (create_expression_by_pieces): Set bits, don't append to vector.
23         (insert_into_preds_of_block): Don't handle inserted_phi_names.
24         (eliminate): Don't look at inserted_phi_names, remove deleted
25         insns from inserted_exprs.
26         (remove_dead_inserted_code): Adjust to use bitmaps instead of
27         vectors.
28         (init_pre, fini_pre): Allocate and free bitmaps.
29         (execute_pre): Insert insns on edges before elimination.
30
31 2010-05-06  Maxim Kuvyrkov  <maxim@codesourcery.com>
32
33         * tree.c (initializer_zerop): Handle STRING_CST.
34
35 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
36
37         PR 40989
38         * doc/invoke.texi (Wimplicit): Document as C only.
39         * opts.c (common_handle_option): Add argument kind.
40         (handle_option): Rename as read_cmdline_option. Factor out code to...
41         (handle_option): ... here. New.
42         (handle_options): Rename as read_cmdline_options.
43         (decode_options): Update call.
44         (set_option): Use option index instead of option pointer. Classify
45         diagnostics correctly.
46         (enable_warning_as_error): Call handle_option.
47         * opts.h (set_option): Update declaration.
48         (handle_option): Declare.
49         * langhooks.h (struct lang_hooks): Add argument kind to
50         handle_option.
51         * c.opt (Wimplicit,Wimplicit-int): Initialize to -1.
52         * c-opts.c (set_Wimplicit): Delete.
53         (c_family_lang_mask): New static constant.
54         (c_common_handle_option): Add argument kind. Use handle_option
55         instead of set_Wimplicit.
56         (c_common_post_options): warn_implicit and warn_implicit_int
57         are disabled by default.
58         * c-common.c (warn_implicit): Do not define here.
59         * c-common.h (warn_implicit): Do not declare here.
60         (c_common_handle_option): Update declaration.
61         * lto-opts.c (lto_reissue_options): Update call to set_option.
62
63 2010-05-06  Richard Guenther  <rguenther@suse.de>
64
65         PR tree-optimization/43571
66         * domwalk.c (walk_dominator_tree): Walk the dominator
67         sons in more optimal order.
68
69 2010-05-06  Richard Guenther  <rguenther@suse.de>
70
71         PR tree-optimization/43934
72         * tree-ssa-loop-im.c (movement_possibility): Handle PHI nodes.
73         (stmt_cost): Likewise.
74         (extract_true_false_args_from_phi): New helper.
75         (determine_max_movement): For PHI nodes verify we can hoist them
76         and compute their cost.
77         (determine_invariantness_stmt): Handle PHI nodes.
78         (move_computations_stmt): Likewise.  Hoist PHI nodes in
79         if-converted form using COND_EXPRs.
80         (move_computations): Return TODO_cleanup_cfg if we hoisted PHI
81         nodes.
82         (tree_ssa_lim): Likewise.
83         * tree-flow.h (tree_ssa_lim): Adjust prototype.
84         * tree-ssa-loop.c (tree_ssa_loop_im): Return todo.
85
86 2010-05-06  Richard Guenther  <rguenther@suse.de>
87
88         PR tree-optimization/43987
89         * tree-ssa-structalias.c (could_have_pointers): For possibly
90         address-taken variables force pointers to be recorded.
91         (create_variable_info_for_1): Likewise.
92         (push_fields_onto_fieldstack): Pass in wheter all fields
93         must have pointers.
94         (find_func_aliases): Query types instead of vars whether
95         they contain pointers where appropriate.
96
97 2010-05-06  Jan Hubicka  <jh@suse.cz>
98
99         * cgraphbuild.c (record_reference_ctx): Add varpool_node.
100         (record_reference, mark_address, mark_load, mark_store): Record
101         references.
102         (record_references_in_initializer): Update call of record_references.
103         (rebuild_cgraph_edges): Remove all references before rebuiding.
104         * cgraph.c (cgraph_create_node): Clear ref list.
105         (cgraph_remove_node): Remove references.
106         (dump_cgraph_node): Dump references.
107         (cgraph_clone_node): Clone references.
108         * cgraph.h: Include ipa-ref.h and ipa-ref-inline.h
109         (struct cgraph_node, varpool_node): Add ref_lst.
110         * ipa-ref.c: New file.
111         * ipa-ref.h: New file.
112         * ipa-ref-inline.h: New file.
113         * lto-cgraph.c (output_varpool): Take cgrag node set argument.
114         (referenced_from_other_partition_p): New function.
115         (lto_output_varpool_node): Take set arugment; call
116         referenced_from_other_partition.
117         (lto_output_ref): New.
118         (add_references): New.
119         (output_refs): New.
120         (output_cgraph): Compute boundary based on references;
121         output refs.
122         (output_varpool): Accept cgraph_node_set argument.
123         (input_ref): New.
124         (input_refs): New.
125         (input_cgraph): Call input_refs.
126         * lto-section-in.c (lto_section_name): Add refs.
127         * Makefile.in: (cgraph.h): Include ipa-ref.h and ipa-ref-inline.h
128         (ipa-ref.o): New file.
129         * varpool.c (varpool_node): Clear ipa ref list.
130         (varpool_remove_node): Remove references.
131         (dump_varpool_node): Dump references.
132         (varpool_assemble_decl): Only compile finalized ones.
133         (varpool_extra_name_alias): Initialize ref list.
134         * lto-streamer.c (lto-get_section_name): Add .refs section.
135         * lto-streamer.h (lto_section_type): Add LTO_section_refs.
136         (referenced_from_other_partition_p): Declared.
137
138 2010-05-06  Ira Rosen  <irar@il.ibm.com>
139
140         PR tree-optimization/43901
141         * tree-vect-stmts.c (vectorizable_call): Assert that vector
142         type is not NULL if it's transformation phase, and return
143         FALSE if it's analysis.
144         (vectorizable_conversion, vectorizable_operation, 
145         vectorizable_type_demotion, vectorizable_type_promotion):
146         Likewise.
147
148 2010-05-05  Andrew Pinski  <andrew.pinski@caviumnetworks.com>
149
150         * config/mips/mips.h (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P):
151         Delete.
152         * config/mips/mips.c (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P):
153         New define.
154         * config/mips/mips-protos.h
155         (mips_small_register_classes_for_mode_p): Delete prototype.
156
157 2010-05-06  Bernd Schmidt  <bernds@codesourcery.com>
158
159         * config/arm/arm.h (MAX_LDM_STM_OPS): New macro.
160         * config/arm/arm.c (multiple_operation_profitable_p,
161         compute_offset_order): New static functions.
162         (load_multiple_sequence, store_multiple_sequence): Use them.
163         Replace constant 4 with MAX_LDM_STM_OPS.  Compute order[0] from
164         memory offsets, not register numbers.
165         (emit_ldm_seq, emit_stm_seq): Replace constant 4 with MAX_LDM_STM_OPS.
166
167 2010-05-05  Steven Bosscher  <steven@gcc.gnu.org>
168
169         * stor-layout.c (pending_sizes): Change the type to
170         VEC(tree,gc) *.
171         (get_pending_sizes, put_pending_size, put_pending_sizes):
172         Update the uses of pending_sizes.
173         * c-decl.c (store_parm_decls): Likewise.
174         * c-tree.h (struct c_arg_info): Likewise.
175         * tree.h: Update the prototype for get_pending_sizes and
176         put_pending_sizes.
177
178 2010-05-05  Jason Merrill  <jason@redhat.com>
179
180         PR debug/43370
181         * c-common.c (handle_aligned_attribute): Respect
182         ATTR_FLAG_TYPE_IN_PLACE.
183
184         PR testsuite/43758
185         * target.h (struct gcc_target): Add attribute_takes_identifier_p.
186         * target_def.h (TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P): Define.
187         (TARGET_INITIALIZER): Use it.
188         * c-common.c (attribute_takes_identifier_p): Call it.
189         * c-common.h: Update prototype.
190         * config/rs6000/rs6000.c (rs6000_attribute_takes_identifier_p): New.
191         (TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P): Define.
192
193 2010-05-05  Jakub Jelinek  <jakub@redhat.com>
194
195         PR debug/43950
196         * dwarf2out.c (gen_compile_unit_die): Add DW_AT_identifier_case
197         DW_ID_down_case for Fortran compilation units.
198
199 2010-05-05  Jan Hubicka  <jh@suse.cz>
200
201         * lto-cgraph.c (lto_output_varpool_node, input_varpool_node): Correctly
202         handle aliases.
203
204 2010-05-05  Eric Botcazou  <ebotcazou@adacore.com>
205
206         * gimplify.c (gimplify_return_expr): Gimplify the size expressions of
207         a variable-sized RESULT_DECL.
208
209 2010-05-05  Maxim Kuvyrkov  <maxim@codesourcery.com>
210
211         * doc/invoke.texi (-mfix-cortex-m3-ldrd): Move from ARC section to ARM.
212
213 2010-05-05  Jason Merrill  <jason@redhat.com>
214
215         PR c++/43787
216         * gimplify.c (gimplify_expr): Keep working if gimplify_modify_expr
217         returns GS_OK.
218         (gimplify_modify_expr_rhs): Return GS_OK if anything changed.
219
220 2010-05-05  Alexandre Oliva  <aoliva@redhat.com>
221             Jakub Jelinek  <jakub@redhat.com>
222
223         PR debug/43478
224         * df-problems.c (struct dead_debug_use, struct dead_debug): New.
225         (dead_debug_init, dead_debug_finish): New functions.
226         (dead_debug_add, dead_debug_insert_before): Likewise.
227         (df_note_bb_compute): Initialize a dead_debug object, add dead
228         debug uses to it, insert debug bind insns before death insns,
229         reset debug insns that refer to pending uses at the end.
230         * rtl.h (make_debug_expr_from_rtl): New prototype.
231         * varasm.c (make_debug_expr_from_rtl): New function.
232
233 2010-05-05  Jan Hubicka  <jh@suse.cz>
234
235         * lto-cgraph.c (output_varpool): Forward declare; work on encoder.
236         (lto_varpool_encoder_new, lto_varpool_encoder_delete, lto_varpool_encoder_encode
237         lto_varpool_encoder_lookup, lto_varpool_encoder_deref, lto_varpool_encoder_size,
238         lto_varpool_encoder_encode_initializer_p,
239         lto_set_varpool_encoder_encode_initializer): New functions.
240         (lto_output_cgraph): Take vset parameter too; compute varpool encoder;
241         call output_varpool.
242         (input_varpool_node): Do not always set analyzed.
243         (input_cgraph_1): Return vector of cgraph nodes.
244         (input_varpool_1): Return vector of varpools.
245         (input_cgraph): Free the vectors.
246         * lto-streamer-out.c (lto_output_ts_decl_common_tree_pointers):
247         output only initializers needed.
248         (lto_output): Only call output_cgraph.
249         (produce_asm_for_decls): Call lto_varpool_encoder_delete.
250         * lto-section-out.c (lto_new_out_decl_state): Initialize
251         state->varpool_node_encoder.
252         * lto-streamer.h (lto_varpool_encoder_d): New.
253         (lto_out_decl_state, lto_file_decl_data): Add varpool_node_encoder.     
254         (lto_cgraph_encoder_delete, output_cgraph): Update prototype.
255         (lto_varpool_encoder_deref, lto_varpool_encoder_lookup,
256         lto_varpool_encoder_encode, lto_varpool_encoder_delete,
257         lto_varpool_encoder_encode_initializer_p, lto_varpool_encoder_new):
258         Declare.
259         (output_varpool, input_varpool): Remove declarations.
260
261 2010-05-05  Jan Hubicka  <jh@suse.cz>
262
263         * lto-symtab.c (lto_symtab_resolve_can_prevail_p): Alias of variable
264         with body can prevail.
265
266 2010-05-05  Jan Hubicka  <jh@suse.cz>
267
268         * lto-symtab.c (lto_symtab_merge_decls_1): Prefer declarations with
269         size.
270
271 2010-05-05  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
272
273         * Makefile.in (build/gengtype.o): Add $(HASHTAB_H) to
274         dependencies.
275
276         * gengtype.h (erro_at_line): Constify pos argument.
277
278         * gengtype.c: Include hashtab.h.
279         (enum gc_used): Document GC_MAYBE_POINTED_TO.
280         (error_at_line): Constify pos argument.
281         (do_typedef): Initialize p->opt field.
282         (get_file_gtfilename): Fix comment typo.
283         (struct walk_type_data): Constify line field.
284         (get_output_file_for_structure): New function.
285         (write_local_func_for_structure): Constify orig_s argument.
286         Use get_output_file_for_structure.
287         (write_func_for_structure): Use get_output_file_for_structure.
288         (INDENT): New define.
289         (dump_pair, dump_type, dump_type_list, dump_typekind)
290         (dump_gc_used, dump_options, dump_fileloc, dump_type_u_s)
291         (dump_type_u_a, dump_type_u_param_struct, dump_everything): New
292         functions.
293         (seen_types): New variable.
294         (main): New variable do_dump.  Process "-d" command line option.
295         Call dump_everything if dump requested.
296
297 2010-05-05  Jakub Jelinek  <jakub@redhat.com>
298
299         * var-tracking.c (var_debug_decl): Save DECL_DEBUG_EXPR value
300         in a temporary instead of invoking the macro multiple times.
301         (track_expr_p): Likewise.
302
303 2010-05-04  Neil Vachharajani <nvachhar@google.com>
304
305         * doc/invoke.texi (-Wcoverage-mismatch): Updated documentation as
306         per new semantics.
307         * opts.c (decode_options): Enable -Werror=coverage-mismatch.
308         * coverage.c (get_coverage_counts): Always emit a warning.  Adjust
309         conditions for printing notes.
310         * common.opt (-Wcoverage-mismatch): Allow negative, default to
311         true, update documentation.
312         * Makefile.in (coverage.o): Add dependence on DIAGNOSTIC_H and intl.h.
313
314 2010-05-04  Jakub Jelinek  <jakub@redhat.com>
315
316         PR c/43981
317         * c-parser.c (c_parser_direct_declarator_inner): Call mark_exp_read
318         on dimen.
319
320 2010-05-04  H.J. Lu  <hongjiu.lu@intel.com>
321
322         PR target/43799
323         * config/i386/i386.md (sse_prologue_save): Add clobber CC
324         register.
325         (*sse_prologue_save_insn1): Likewise.
326         (SSE prologue save splitter): Likewise.
327
328 2010-05-04  Eric Botcazou  <ebotcazou@adacore.com>
329
330         * tree.c (free_lang_data_in_one_sizepos): New inline function.
331         (free_lang_data_in_type): Call it on TYPE_{MIN|MAX}_VALUE of numerical
332         types.  Call it on TYPE_SIZE and TYPE_SIZE_UNIT of all types.
333         (free_lang_data_in_decl): Call it on DECL_SIZE and DECL_SIZE_UNIT of
334         all decls.  Call it on DECL_FIELD_OFFSET of fields.
335         (find_decls_types_r): Follow DECL_VALUE_EXPR.
336         (iterative_hash_expr) <PLACEHOLDER_EXPR>: New case.
337
338 2010-05-04  Martin Jambor  <mjambor@suse.cz>
339
340         * tree-sra.c (build_access_from_expr_1): The first parameter type
341         changed to simple tree.
342         (build_access_from_expr): Likewise, gsi parameter was eliminated.
343         (scan_assign_result): Renamed to assignment_mod_result, enum elements
344         renamed as well.
345         (build_accesses_from_assign): Removed all parameters except for a
346         simple gimple statement.  Now returns a simple bool.
347         (scan_function): All non-analysis parts moved to separate functions
348         sra_modify_function_body and ipa_sra_modify_function_body.  Removed all
349         parameters and updated both callers.
350         (sra_modify_expr): Removed parameter data.
351         (sra_modify_function_body): New function.
352         (perform_intra_sra): Call sra_modify_function_body to modify the
353         function body.
354         (replace_removed_params_ssa_names): Parameter data changed into
355         adjustments vector.
356         (sra_ipa_modify_expr): Likewise.  Also removed unused parameter gsi and
357         changed the parameter dont_convert to convert with the opposite
358         meaning.
359         (sra_ipa_modify_assign): Parameter data changed into adjustments
360         vector, return value changed to bool.
361         (ipa_sra_modify_function_body): New function.
362         (sra_ipa_reset_debug_stmts): Updated a comment.
363         (modify_function): Use ipa_sra_modify_function_body to modify function
364         body.
365
366 2010-05-04  H.J. Lu  <hongjiu.lu@intel.com>
367
368         PR middle-end/43671
369         * alias.c (true_dependence): Handle the same VALUE in x and mem.
370         (canon_true_dependence): Likewise.
371         (write_dependence_p): Likewise.
372
373 2010-05-04  Jan Hubicka  <jh@suse.cz>
374
375         * Makefile.in (cgraphbuild.o): Add dependency on ipa-utils.h
376         * cgraphbuild.c: Include ipa-utils.h
377         (record_reference_ctx): New struct.
378         (record_reference): Simplify to work on initializers; not statements.
379         (mark_address, mark_load, mark_store): New.
380         (build_cgraph_edges): Simplify using walk_stmt_load_store_addr_ops;
381         walk PHI nodes too.
382         (record_references_in_initializer): Update use of record_reference.
383         (rebuild_cgraph_edges): Simplify using walk_stmt_load_store_addr_ops;
384         walk PHI nodes too.
385
386 2010-05-04  Jan Hubicka  <jh@suse.cz>
387
388         * lto-symtab.c (lto_cgraph_replace_node): Do not remove edges;
389         node will be removed anyway.
390         (lto_varpool_replace_node): Allow also unanalyzed nodes;
391         relink aliases of node into prevailing node.
392         * varpool.c (varpool_remove_node): Remove aliases properly;
393         when removing node, remove all its aliases too; remove DECL_INITIAL
394         of removed node; ggc_free the varpool node.
395
396 2010-05-04  Richard Guenther  <rguenther@suse.de>
397
398         PR tree-optimization/43879
399         * tree-ssa-structalias.c (alias_get_name): Use
400         DECL_ASSEMBLER_NAME if available.
401         (create_function_info_for): Return the varinfo node.
402         (ipa_pta_execute): Associate same-body aliases and extra names
403         with their origin nodes varinfo.  Dump DECL_ASSEMBLER_NAME.
404
405 2010-05-04  Kaz Kojima  <kkojima@gcc.gnu.org>
406
407         * config/sh/sh.c (sh_small_register_classes_for_mode_p): Remove
408         static.
409
410 2010-05-04  Mikael Pettersson  <mikpe@it.uu.se>
411
412         PR bootstrap/43964
413         * ira-color.c (assign_hard_reg): Declare rclass and add_cost
414         only if HONOR_REG_ALLOC_ORDER is not defined.
415
416 2010-05-04  Richard Guenther  <rguenther@suse.de>
417
418         PR tree-optimization/43949
419         * tree-vrp.c (extract_range_from_binary_expr): Only handle
420         TRUNC_MOD_EXPR.
421
422 2010-04-26  Jason Merrill  <jason@redhat.com>
423
424         * c.opt (-fstrict-enums): New.
425         * doc/invoke.texi (C++ Dialect Options): Document -fstrict-enums.
426
427 2010-05-03  David Ung <davidu@mips.com>
428             James E. Wilson  <wilson@codesourcery.com>
429
430         * config/mips/mips.c (mips_output_division): If GENERATE_DIVIDE_TRAPS,
431         emit the trap instruction before the divide for TUNE_74K.
432
433 2010-05-03  Steven Bosscher  <steven@gcc.gnu.org>
434
435         * doc/tm.texi (defmac SMALL_REGISTER_CLASSES): Remove.
436         (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): Add documentation,
437         based on the above, for new target hook.
438
439         * hooks.c (hook_bool_mode_true): New generic hook.
440         * hooks.h (hook_bool_mode_true): Add prototype.
441
442         * target.h (struct gcc_target): Add small_register_classes_for_mode_p
443         target hook.
444         * target-def.h (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): New default
445         target hook, set to hook_bool_mode_false.
446         * regs.h: Remove default definition of SMALL_REGISTER_CLASSES.
447         * reload.c (push_secondary_reload): Replace SMALL_REGISTER_CLASSES
448         with targetm.small_register_classes_for_mode_p.
449         (find_reusable_reload): Likewise.
450         (combine_reloads): Likewise.
451         * reload1.c (reload_as_needed): Likewise.
452         * cse.c (approx_reg_cost_1, hash_rtx_cb): Likewise.
453         * ifcvt.c (noce_process_if_block, check_cond_move_block,
454         dead_or_predicable): Likewise.
455         * regmove.c (optimize_reg_copy_1): Likewise.
456         * calls.c (prepare_call_address): Likewise.
457         (precompute_register_parameters): Likewise.
458
459         * config/sh/sh.h: Replace SMALL_REGISTER_CLASSES with new target
460         hook definition.
461         * config/sh/sh.c (sh_small_register_classes_for_mode_p): Add
462         implementation of the hook that considers all register classes
463         small except for SH64.
464         (sh_override_options): Use the new hook.
465         * config/sh/sh-protos.h (sh_small_register_classes_for_mode_p):
466         Add prototype.
467
468         * config/arm/arm.h: Replace SMALL_REGISTER_CLASSES with new target
469         hook definition.
470         * config/arm/arm.c (arm_small_register_classes_for_mode_p): Add
471         implementation of the hook that considers all register classes
472         small for THUMB1.
473         * config/arm/arm-protos.h (arm_small_register_classes_for_mode_p):
474         Add prototype.
475
476         * config/mips/mips.h: Replace SMALL_REGISTER_CLASSES with new target
477         hook definition.
478         * config/mips/mips.c (mips_small_register_classes_for_mode_p): Add
479         implementation of the hook that considers all register classes
480         small for MIPS16.
481         * config/mips/mips-protos.h (mips_small_register_classes_for_mode_p):
482         Add prototype.
483
484         * config/i386/i386.h: Replace SMALL_REGISTER_CLASSES with new target
485         hook definition.
486         * config/m32c/m32c.h: Likewise.
487         * config/pdp11/pdp11.h: Likewise.
488         * config/avr/avr.h: Likewise.
489         * config/xtensa/xtensa.h: Likewise.
490         * config/m68hc11/m68hc11.h: Likewise.
491         * config/mn10300/mn10300.h: Likewise.
492         * config/mcore/mcore.h: Likewise.
493         * config/h8300/h8300.h: Likewise.
494         * config/bfin/bfin.h: Likewise.
495
496         * config/iq2000/iq2000.h: Remove SMALL_REGISTER_CLASSES definition.
497         * config/rx/rx.h: Remove SMALL_REGISTER_CLASSES definition.
498
499 2010-05-03  Anatoly Sokolov  <aesok@post.ru>
500
501         * double-int.h (tree_to_double_int): Remove macro.
502         (double_int_to_tree, double_int_fits_to_tree_p): Move prototypes ...
503         * tree.h (double_int_to_tree, double_int_fits_to_tree_p): ... here.
504         (tree_to_double_int): New function.
505         * double-int.c (double_int_to_tree, double_int_fits_to_tree_p):
506         Move ...
507         * tree.c (double_int_to_tree, double_int_fits_to_tree_p): ... here.
508
509 2010-05-03  Richard Guenther  <rguenther@suse.de>
510
511         PR tree-optimization/43971
512         * tree-ssa-structalias.c (get_constraint_for_1): Fix
513         constraints in the !flag_delete_null_pointer_checks case.
514
515 2010-05-03  Jakub Jelinek  <jakub@redhat.com>
516
517         PR debug/43972
518         * config/i386/i386.c (ix86_delegitimize_address): Make sure the
519         result mode matches original rtl mode.
520
521 2010-05-03  Dave Korn  <dave.korn.cygwin@gmail.com>
522
523         PR target/43888
524         * config/i386/winnt.c (i386_pe_binds_local_p): Handle weak decls.
525
526 2010-05-02  Uros Bizjak  <ubizjak@gmail.com>
527
528         * config/i386/i386.c (ix86_target_string): Output 'flags', not 'isa',
529         when processing flag options.
530
531 2010-05-02  Uros Bizjak  <ubizjak@gmail.com>
532
533         * gcov-iov.c (main): Change format string placeholder
534         from %#08x to 0x%08x.
535         * genchecksum.c (dosum): Change format string placeholder
536         from %#02x to 0x%02x.
537
538 2010-05-02  Richard Guenther  <rguenther@suse.de>
539
540         PR tree-optimization/43879
541         * tree-tailcall.c (find_tail_calls): Clobbers also prevent tail calls.
542
543 2010-05-02  Bruno Haible  <bruno@clisp.org>
544
545         * doc/extend.texi (Function Attributes): Fix a typo.
546
547 2010-05-02  Uros Bizjak  <ubizjak@gmail.com>
548
549         Revert:
550         * hwint.h (HOST_WIDE_INT_PRINT_DOUBLE_HEX): Change format string
551         placeholder from 0x%x to %#x.
552         (HOST_WIDEST_INT_PRINT_DOUBLE_HEX): Ditto.
553         * config/i386/i386elf.h (ASM_OUTPUT_ASCII): Ditto.
554         * config/i386/i386-interix.h (ASM_OUTPUT_ASCII): Ditto.
555         * config/i386/att.h (ASM_OUTPUT_ASCII): Ditto.
556         * config/i386/sysv4.h (ASM_OUTPUT_ASCII): Ditto.
557         * config/i386/i386.c (ix86_target_string): Ditto.
558         * config/i386/i386.c (output_pic_addr_const): Ditto.
559         (print_operand): Ditto.
560
561 2010-05-02  Uros Bizjak  <ubizjak@gmail.com>
562
563         * vmsdbgout.c (ASM_OUTPUT_DEBUG_DATA1): Change format string
564         placeholder from 0x%x to %#x.
565         (ASM_OUTPUT_DEBUG_DATA1): Ditto.
566         (ASM_OUTPUT_DEBUG_DATA4): Ditto.
567         (ASM_OUTPUT_DEBUG_DATA): Ditto.
568         (ASM_OUTPUT_DEBUG_ADDR_DATA): Ditto.
569         (ASM_OUTPUT_DEBUG_DATA8): Ditto.
570         * optc-gen.awk: Ditto.
571         * hwint.h (HOST_WIDE_INT_PRINT_DOUBLE_HEX): Ditto.
572         (HOST_WIDE_INT_PRINT_HEX): Ditto.
573         (HOST_WIDEST_INT_PRINT_HEX): Ditto.
574         (HOST_WIDEST_INT_PRINT_DOUBLE_HEX): Ditto.
575
576 2010-05-01  Anatoly Sokolov  <aesok@post.ru>
577
578         * target.h (struct calls): Add function_value_regno_p field.
579         * target-def.h (TARGET_FUNCTION_VALUE_REGNO_P): Define.
580         (TARGET_INITIALIZER): Use TARGET_FUNCTION_VALUE_REGNO_P.
581         * targhooks.c (default_function_value_regno_p): New function.
582         * targhooks.h (default_function_value_regno_p): Declare function.
583         * rtlanal.c (keep_with_call_p): Use function_value_regno_p hook.
584         * builtins.c. (apply_result_size): (Ditto.).
585         * combine.c. (likely_spilled_retval_p): (Ditto.).
586         * mode-switching.c. Include 'target.h'.
587         (create_pre_exit): Use function_value_regno_p hook.
588         * Makefile.in (mode-switching.o): Add dependency on TARGET_H.
589         * doc/tm.texi (FUNCTION_VALUE_REGNO_P,
590         TARGET_FUNCTION_VALUE_REGNO_P): Revise documentation.
591
592         * config/i386/i386.h (TARGET_FUNCTION_VALUE_REGNO_P): Remove macro.
593         * config/i386/i386.c (TARGET_FUNCTION_VALUE_REGNO_P): Define macro.
594         (ix86_function_value_regno_p): Declare as static, change argument
595         type to const unsigned int.
596         * config/i386/i386-protos.h (ix86_function_value_regno_p): Remove.
597
598 2010-05-01  Richard Guenther  <rguenther@suse.de>
599
600         PR tree-optimization/43949
601         * tree-vrp.c (ssa_name_nonnegative_p): Return true for unsigned
602         types.
603         (extract_range_from_binary_expr): Handle *_MOD_EXPR.
604
605 2010-05-01  Anatoly Sokolov  <aesok@post.ru>
606
607         * rtl.h (CONST_DOUBLE_P): Define.
608         (rtx_to_double_int): Declare.
609         * emit-rtl.c (rtx_to_double_int): New function.
610         * dwarf2out.c (insert_double): New function.
611         (loc_descriptor, add_const_value_attribute): Clean up, use
612         rtx_to_double_int and insert_double functions.
613
614 2010-05-01  Jonathan Wakely  <jwakely.gcc@gmail.com>
615
616         * doc/extend.texi (Inline): Add missing return keyword to examples.
617         (Function Attributes, Variable Attributes, Pragmas): Hyphenate
618         "command-line".
619
620 2010-04-30  Eric Botcazou  <ebotcazou@adacore.com>
621
622         * tree-ssa-loop-ivopts.c (may_be_unaligned_p): Check the alignment of
623         the variable part of the offset as well.  Use highest_pow2_factor for
624         all alignment checks.
625
626 2010-04-30  Richard Guenther  <rguenther@suse.de>
627
628         PR tree-optimization/43879
629         * tree-ssa-structalias.c (type_could_have_pointers): Functions
630         can have pointers.
631
632 2010-04-30  Jan Hubicka  <jh@suse.cz>
633
634         * lto-symtab.c (lto_symtab_resolve_can_prevail_p): Chose var with
635         varpool.
636         (lto_symtab_merge_decls_1): Remove logic looking for an initializer.
637
638 2010-04-30  Jan Hubicka  <jh@suse.cz>
639
640         * cgraph.h (cgraph_node_set_nonempty_p, varpool_node_set_nonempty_p):
641         New.
642         * lto-cgraph.c (input_cgraph): Remove call to lto_mark_file_for_ltrans.
643         * lto-streamer.h (lto_file_decl_data): Remove needs_ltrans_p.
644         (lto_file_needs_ltrans_p, lto_mark_file_for_ltrans,
645         cgraph_node_set_needs_ltrans_p): Remove.
646
647 2010-04-30  Steven Bosscher  <steven@gcc.gnu.org>
648
649         * sdbout.c: Include vec.h, do not include varray.h.
650         (deferred_global_decls, sdbout_global_decl,
651         sdbout_finish, sdbout_init): Use VEC instead of VARRAY.
652         * toplev.c: Do not include varray.h.
653         (dump_memory_report): Do not dump VARRAY statistics.
654         * gengtype.c (open_base_file): Ignore varray.h.
655         * Makefile.in: Update for abovementioned changes.
656         Remove all traces of varray.c and varray.h.
657         * varray.c: Remove file.
658         * varray.h: Remove file.
659
660 2010-04-30  Jan Hubicka  <jh@suse.cz>
661
662         * lto-cgraph.c (lto_output_varpool_node): Always output constant pool
663         references.
664
665 2010-04-30  Jan Hubicka  <jh@suse.cz>
666
667         * tree-profile.c (tree_init_ic_make_global_vars): Mark new decls as
668         needed.
669
670 2010-04-30  Richard Guenther  <rguenther@suse.de>
671
672         * tree-ssa-structalias.c (get_constraint_for_1): Generate
673         constraints for CONSTRUCTOR.
674
675 2010-04-30  Richard Guenther  <rguenther@suse.de>
676
677         PR lto/43946
678         * passes.c (init_optimization_passes): Move pass_ipa_free_lang_data
679         first after all lowering passes.
680
681 2010-04-30  Steven Bosscher  <steven@gcc.gnu.org>
682
683         * toplev.c: Include varray.h for statistics dumping.
684         * tree.h: Do not declare varray_head_tag.
685         * tree-into-ssa.c, tree-ssa-uninit.c, tree-phinodes.c, omega.c,
686         regs.h, lto-cgraph.c, tree-ssa-loop-ivopts.c, tree-nomudflap.c,
687         c-objc-common.c, lto-streamer-out.c, tree-ssa-propagate.c,
688         gimple-low.c, c-semantics.c, dwarf2out.c, lto-streamer-in.c,
689         lto-section-in.c, alias.c, tree-if-conv.c, gimplify.c, ggc-zone.c,
690         tree-ssa.c, tree-ssa-loop-prefetch.c, integrate.h, c-gimplify.c,
691         c-common.c, c-common.h, reg-stack.c, basic-block.h,
692         tree-ssa-structalias.c, lto-section-out.c, tree-ssanames.c: Do not
693         include varray.h.
694         * Makefile.in: Update for abovementioned changes.
695
696 2010-04-30  Jakub Jelinek  <jakub@redhat.com>
697
698         PR debug/43942
699         * tree.c (auto_var_in_fn_p): Return false for DECL_EXTERNAL vars.
700
701 2010-04-30  Hariharan Sandanagobalane  <hariharan@picochip.com>
702
703         * config/picochip/picochip.c (picochip_legitimize_address): Define.
704         Use this function to do machine-specific conversion.
705         (picochip_legitimize_reload_address): Likewise.
706         (picochip_legitimate_address_p): Check valid base register only if
707         strict.
708         (picochip_check_conditional_copy): Check for modw only if opnd is
709         register.
710         * config/picochip/picochip.h (LEGITIMIZE_RELOAD_ADDRESS): Use this
711         to call the function in c.
712         * config/picochip/picochip-protos.h
713         (picochip_legitimize_reload_address): Define.
714         * config/picochip/picochip.md (supported_compare1): Define.
715
716 2010-04-30  Jan Hubicka  <jh@suse.cz>
717
718         * cgraph.h (cgraph_local_info): Remove for_functions_valid.
719         (cgraph_global_info): Remove inlined.
720         (LTO_cgraph_tag_names): Remove.
721         (LTO_cgraph_tags, LCC_NOT_FOUND): Move to ...
722         * lto-cgraph.c (LTO_cgraph_tags, LCC_NOT_FOUND): ... here;
723         simplify cgraph tags and document.
724         (lto_output_node): Use only LTO_cgraph_unavail_node and
725         LTO_cgraph_analyzed_node; Do not save analzed, reachable,
726         for_functions_valid, global info, process and output flags.
727         (input_overwrite_node): Initialize estimated stack size and
728         estimated growth.  Do not read flags we no longer store.
729         (input_node): Likewise do not read info no longer stored.
730         * ipa-inline.c (cgraph_mark_inline_edge): Do not set global.inlined
731         flag.
732
733 2010-04-30  Richard Guenther  <rguenther@suse.de>
734
735         PR tree-optimization/43879
736         * tree-ssa-structalias.c (get_constraint_for_1): Properly
737         handle non-zero initializers.
738
739 2010-04-30  Richard Guenther  <rguenther@suse.de>
740
741         * builtins.c (fold_builtin_1): Delete free (0).
742
743 2010-04-29  Jan Hubicka  <jh@suse.cz>
744
745         * gengtype.c (open_base_files): Add lto-streamer.h
746         * cgraph.h (cgraph_local_info): lto_file_data is now in GGC.
747         (pass_ipa_cp): GGC collect.
748         * toplev. (compile_file): Do not output symbols.
749         * ipa-inline.c (pass_ipa_inline): Add ggc collect.
750         * timevar.def (TV_VARPOOL, TV_IPA_LTO_DECL_INIT_IO,
751         TV_IPA_LTO_DECL_MERGE, TV_IPA_LTO_CGRAPH_MERGE, TV_VAROUT): New.
752         * lto-section-in.c: Include ggc.h
753         (lto_new_in_decl_state): Alloc in GGC.
754         (lto_delete_in_decl_state): Likewise.
755         * ipa.c (pass_ipa_function_visibility, pass_ipa_whole_program):
756         Collect.
757
758 2010-04-29  Bernd Schmidt  <bernds@codesourcery.com>
759
760         PR target/42895
761         * doc/tm.texi (ADJUST_REG_ALLOC_ORDER): Renamed from
762         ORDER_REGS_FOR_LOCAL_ALLOC.  All instances of this macro changed.
763         (HONOR_REG_ALLOC_ORDER): Describe new macro.
764         * ira.c (setup_alloc_regs): Use ADJUST_REG_ALLOC_ORDER if defined.
765         * ira-color.c (assign_hard_reg): Take prologue/epilogue costs into
766         account only if HONOR_REG_ALLOC_ORDER is not defined.
767         * config/arm/arm.h (HONOR_REG_ALLOC_ORDER): Define.
768         * system.h (ORDER_REGS_FOR_LOCAL_ALLOC): Poison.
769
770 2010-04-29  Jon Grant  <04@jguk.org>
771
772         * collect2.c (vflag): Change type from int to bool.
773         (debug): Likewise.
774         (helpflag): New global bool.
775         (main): Set vflag and debug with boolean, not integer truth values.
776         Accept new "--help" option and output usage text if found.
777         * collect2.h (vflag): Update prototype.
778         (debug): Likewise.
779
780 2010-04-29  H.J. Lu  <hongjiu.lu@intel.com>
781
782         PR bootstrap/43936
783         * plugin.h (flag_plugin_added): Moved out of invoke_plugin_callbacks.
784
785 2010-04-29  Richard Guenther  <rguenther@suse.de>
786
787         PR bootstrap/43935
788         * plugin.h (invoke_plugin_callbacks): Annotate arguments
789         with ATTRIBUTE_UNUSED.
790
791 2010-04-29  H.J. Lu  <hongjiu.lu@intel.com>
792
793         PR target/43921
794         * config/i386/i386.c (get_some_local_dynamic_name): Replace
795         INSN_P with NONDEBUG_INSN_P.
796         (distance_non_agu_define): Likewise.
797         (distance_agu_use): Likewise.
798
799 2010-04-29  Bernd Schmidt  <bernds@codesourcery.com>
800
801         From Dominique d'Humieres <dominiq@lps.ens.fr>
802         PR bootstrap/43858
803         * ifcvt.c (dead_or_predicable): Use df_simulate_find_defs to compute
804         test_set.
805
806 2010-04-29  Brian Hackett  <bhackett1024@gmail.com>
807
808         * plugin.h (invoke_plugin_callbacks): New inline function.
809         * plugin.c (flag_plugin_added): New global flag.
810         (add_new_plugin): Initialize above flag.
811         (invoke_plugin_callbacks): Rename to ...
812         (invoke_plugin_callbacks_full): ... this.
813
814 2010-04-28  Jan Hubicka  <jh@suse.cz>
815
816         * lto-symtab.c (lto_symtab_entry_def) Add vnode.
817         (lto_varpool_replace_node): New.
818         (lto_symtab_resolve_symbols): Resolve varpool nodes.
819         (lto_symtab_merge_decls_1): Prefer decls with varpool node.
820         (lto_symtab_merge_cgraph_nodes_1): Merge varpools.
821         * cgraph.h (varpool_node_ptr): New type.
822         (varpool_node_ptr): New vector.
823         (varpool_node_set_def): New structure.
824         (varpool_node_set): New type.
825         (varpool_node_set): New vector.
826         (varpool_node_set_element_def): New structure.
827         (varpool_node_set_element, const_varpool_node_set_element): New types.
828         (varpool_node_set_iterator): New type.
829         (varpool_node): Add prev pointers, add used_from_other_partition,
830         in_other_partition.
831         (varpool_node_set_new, varpool_node_set_find, varpool_node_set_add,
832         varpool_node_set_remove, dump_varpool_node_set, debug_varpool_node_set,
833         varpool_get_node, varpool_remove_node): Declare.
834         (vsi_end_p, vsi_next, vsi_node, vsi_start, varpool_node_in_set_p,
835         varpool_node_set_size): New inlines.
836         * cgraph.c (dump_cgraph_node): Dump asm names of aliases.
837         * tree-pass.h (varpool_node_set_def): Forward declare.
838         (ipa_opt_pass_d): Summary writting takes vnode sets too.
839         (ipa_write_optimization_summaries): Update prototype.
840         * ipa-cp.c (ipcp_write_summary): Update.
841         * ipa-reference.c (ipa_reference_write_summary): Update.
842         * lto-cgraph.c (lto_output_varpool_node): New static function.
843         (output_varpool): New function.
844         (input_varpool_node): New static function.
845         (input_varpool_1): New function.
846         (input_cgraph): Input varpool.
847         * ipa-pure-const.c (pure_const_write_summary): Update.
848         * lto-streamer-out.c (lto_output): Update, output varpool too.
849         (write_global_stream): Kill WPA hack.
850         (produce_asm_for_decls): Update.
851         (output_alias_pair_p): Handle variables.
852         (output_unreferenced_globals): Output only needed partition of varpool.
853         * ipa-inline.c (inline_write_summary): Update.
854         * lto-streamer-in.c (lto_input_tree_ref, lto_input_tree): Do not build
855         cgraph.
856         * lto-section-in.c (lto_section_name): Add varpool and jump funcs.
857         * ipa.c (hash_varpool_node_set_element, eq_varpool_node_set_element,
858         varpool_node_set_new, varpool_node_set_add,
859         varpool_node_set_remove, varpool_node_set_find, dump_varpool_node_set,
860         debug_varpool_node_set): New functions.
861         * passes.c (rest_of_decl_compilation): when in LTO do not finalize.
862         (execute_one_pass): Process new decls too.
863         (ipa_write_summaries_2): Pass around vsets.
864         (ipa_write_summaries_1): Likewise.
865         (ipa_write_summaries): Build vset; be more selective about cgraph nodes
866         to add.
867         (ipa_write_optimization_summaries_1): Pass around vsets.
868         (ipa_write_optimization_summaries): Likewise.
869         * varpool.c (varpool_get_node): New.
870         (varpool_node): Update doubly linked lists.
871         (varpool_remove_node): New.
872         (dump_varpool_node): More dumping.
873         (varpool_enqueue_needed_node): Update doubly linked lists.
874         (decide_is_variable_needed): Kill ltrans hack.
875         (varpool_finalize_decl): Kill lto hack.
876         (varpool_assemble_decl): Skip decls in other partitions.
877         (varpool_assemble_pending_decls): Update doubly linkes lists.
878         (varpool_empty_needed_queue): Likewise.
879         (varpool_extra_name_alias): Likewise.
880         * lto-streamer.c (lto_get_section_name): Add vars section.
881         * lto-streamer.h (lto_section_type): Update.
882         (output_varpool, input_varpool): Declare.
883
884 2010-04-28  Mike Stump  <mikestump@comcast.net>
885
886         * config/i386/darwin.h (CC1_SPEC): Ignore -mdynamic-no-pic for now.
887
888 2010-04-28  Eric Botcazou  <ebotcazou@adacore.com>
889
890         * lto-streamer-in.c (unpack_ts_type_value_fields): Replace test for
891         record or union type with RECORD_OR_UNION_TYPE_P predicate.
892         (lto_input_ts_type_tree_pointers): Likewise.
893         * lto-streamer-out.c (pack_ts_type_value_fields): Likewise.
894         (lto_output_ts_type_tree_pointers): Likewise.
895
896 2010-04-28  Eric Botcazou  <ebotcazou@adacore.com>
897
898         Uniquization of constants at the Tree level
899         * tree.h (DECL_IN_CONSTANT_POOL): New macro.
900         (tree_decl_with_vis): Add in_constant_pool bit, move shadowed_for_var_p
901         bit to the end.
902         (tree_output_constant_def): Declare.
903         * gimplify.c (gimplify_init_constructor): When using block copy, first
904         uniquize the constant constructor on the RHS.
905         * lto-streamer-in.c (unpack_ts_decl_with_vis_value_fields): Deal with
906         DECL_IN_CONSTANT_POOL flag.
907         * lto-streamer-out.c (pack_ts_decl_with_vis_value_fields): Likewise.
908         * varasm.c (make_decl_rtl): Deal with variables belonging to the global
909         constant pool.
910         (assemble_variable): Deal with symbols belonging to the tree constant
911         pool.
912         (get_constant_section): Add ALIGN parameter and simplify.
913         (build_constant_desc): Build a VAR_DECL and attach it to the symbol.
914         (assemble_constant_contents): Use the expression of the VAR_DECL.
915         (output_constant_def_contents): Use the alignment of the VAR_DECL.
916         (tree_output_constant_def): New global function.
917         (mark_constant): Use the expression of the VAR_DECL.
918         (place_block_symbol): Use the alignment of the VAR_DECL and the size of
919         its expression.
920         (output_object_block): Likewise and assemble the expression.
921
922 2010-04-28  Eric Botcazou  <ebotcazou@adacore.com>
923
924         * lto-streamer.c [LTO_STREAMER_DEBUG] (tree_htab, tree_hash_entry,
925         hash_tree, eq_tree): New tree hash table.
926         (lto_streamer_init) [LTO_STREAMER_DEBUG]: Initialize it.
927         [LTO_STREAMER_DEBUG] (lto_orig_address_map, lto_orig_address_get,
928         lto_orig_address_remove): Reimplement.
929
930 2010-04-28  Xinliang David Li  <davidxl@google.com>
931
932         PR c/42643
933         * tree-ssa-uninit.c (can_skip_redundant_opnd): New function.
934         (compute_uninit_opnds_pos): New function.
935         (is_non_loop_exit_postdominating): New function.
936         (compute_control_dep_chain): New function.
937         (find_pdom): New function.
938         (convert_control_dep_chain_into_preds): New function.
939         (find_predicates): New function.
940         (find_control_equiv_block): New function.
941         (collect_phi_def_edges): New function.
942         (find_def_preds): New function.
943         (find_dom): New function.
944         (dump_predicates): New function.
945         (get_cmp_code): New function.
946         (is_value_included_in): New function.
947         (find_matching_predicate_in_rest_chains): New function.
948         (use_pred_not_overlap_with_undef_path_pred): New function.
949         (is_use_properly_guarded): New function.
950         (normalize_cond_1): New function.
951         (is_and_or_or): New function.
952         (normalize_cond): New function.
953         (is_gcond_subset_of): New function.
954         (is_subset_of_any): New function.
955         (is_or_set_subset_of): New function.
956         (is_and_set_subset_of): New function.
957         (is_norm_cond_subset_of): New function.
958         (is_pred_expr_subset_of): New function.
959         (is_pred_chain_subset_of): New function.
960         (is_included_in): New function.
961         (is_superset_of): New function.
962         (find_uninit_use): New function.
963         (warn_uninitialized_phi): New function.
964         (compute_possibly_undefined_names): New function.
965         (ssa_undefined_value_p): New function.
966         (execute_late_warn_uninitialized): New function.
967         * tree-ssa.c (ssa_undefined_value_p): Removed.
968         (warn_uninit): Changed to extern.
969         (warn_uninitialized_phi): Removed.
970         (warn_uninitialized_vars): Changed to extern.
971         (execute_late_warn_uninitialized): Removed
972         * tree-flow.h: Add new prototypes.
973         * timevar.def: Add new time variable.
974         * Makefile.in: Add new build file.
975
976 2010-04-28  Uros Bizjak  <ubizjak@gmail.com>
977
978         * config/alpha/elf.h (ASM_DECLARE_OBJECT_NAME): Use gnu_unique_object
979         type if available.
980
981 2010-04-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
982
983         PR target/22224
984         * config/alpha/osf5.h (ASM_OUTPUT_LOCAL): Redefine.
985
986 2010-04-28  Martin Jambor  <mjambor@suse.cz>
987
988         * cgraph.h (struct cgraph_node): New field indirect_calls.
989         (struct cgraph_indirect_call_info): New type.
990         (struct cgraph_edge): Removed field indirect_call. New fields
991         indirect_info, indirect_inlining_edge and indirect_unknown_callee.
992         (cgraph_create_indirect_edge): Declare.
993         (cgraph_make_edge_direct): Likewise.
994         (enum LTO_cgraph_tags): New item LTO_cgraph_indirect_edge.
995         * ipa-prop.h (struct ipa_param_call_note): Removed.
996         (struct ipa_node_params): Removed field param_calls.
997         (ipa_create_all_structures_for_iinln): Declare.
998         * cgraph.c: Described indirect edges and uids in initial comment.
999         (cgraph_add_edge_to_call_site_hash): New function.
1000         (cgraph_edge): Search also among the indirect edges, use
1001         cgraph_add_edge_to_call_site_hash to add edges to the call site hash.
1002         (cgraph_set_call_stmt): Possibly turn an indirect edge into a direct
1003         one, use cgraph_add_edge_to_call_site_hash to add edges to the call
1004         site hash.
1005         (initialize_inline_failed): Assign a reason to indirect edges.
1006         (cgraph_create_edge_1): New function.
1007         (cgraph_create_edge): Moved some functionality to
1008         cgraph_create_edge_1.
1009         (cgraph_create_indirect_edge): New function.
1010         (cgraph_edge_remove_callee): Add an assert checking for
1011         non-indirectness.
1012         (cgraph_edge_remove_caller): Special-case indirect edges.
1013         (cgraph_remove_edge): Likewise.
1014         (cgraph_set_edge_callee): New function.
1015         (cgraph_redirect_edge_callee): Use cgraph_set_edge_callee.
1016         (cgraph_make_edge_direct): New function.
1017         (cgraph_update_edges_for_call_stmt_node): Do nothing only when also
1018         the declaration of the call statement matches.
1019         (cgraph_node_remove_callees): Special-case indirect edges.
1020         (cgraph_clone_edge): Likewise.
1021         (cgraph_clone_node): Clone also the indirect edges.
1022         (dump_cgraph_node): Dump indirect_inlining_edge flag instead of
1023         indirect_call, dump count of indirect_calls edges.
1024         * ipa-prop.c (iinlining_processed_edges): New variable.
1025         (ipa_note_param_call): Create indirect edges instead of
1026         creating notes.  New parameter node.
1027         (ipa_analyze_call_uses): New parameter node, pass it on to
1028         ipa_note_param_call.
1029         (ipa_analyze_stmt_uses): Likewise.
1030         (ipa_analyze_params_uses): Pass node to ipa_analyze_stmt_uses.
1031         (print_edge_addition_message): Work on edges rather than on notes.
1032         (update_call_notes_after_inlining): Likewise, renamed to
1033         update_indirect_edges_after_inlining.
1034         (ipa_create_all_structures_for_iinln): New function.
1035         (ipa_free_node_params_substructures): Do not free notes.
1036         (ipa_edge_duplication_hook): Propagate bits within
1037         iinlining_processed_edges bitmap.
1038         (ipa_node_duplication_hook): Do not duplicate notes.
1039         (free_all_ipa_structures_after_ipa_cp): Renamed to
1040         ipa_free_all_structures_after_ipa_cp.
1041         (free_all_ipa_structures_after_iinln): Renamed to
1042         ipa_free_all_structures_after_iinln.g
1043         (ipa_write_param_call_note): Removed.
1044         (ipa_read_param_call_note): Removed.
1045         (ipa_write_indirect_edge_info): New function.
1046         (ipa_read_indirect_edge_info): Likewise.
1047         (ipa_write_node_info): Do not stream notes, do stream information
1048         in indirect edges.
1049         (ipa_read_node_info): Likewise.
1050         (lto_ipa_fixup_call_notes): Removed.
1051         * ipa-cp.c (pass_ipa_cp): Set stmt_fixup to NULL.
1052         * ipa-inline.c (pass_ipa_inline): Likewise.
1053         * cgraphunit.c (verify_cgraph_node): Check also indirect edges.
1054         * cif-code.def (INDIRECT_UNKNOWN_CALL): New reason.
1055         * tree-inline.c (copy_bb): Removed an unnecessary double check for
1056         is_gimple_call.
1057         * tree-inline.c (get_indirect_callee_fndecl): Do not consider indirect
1058         edges.
1059         * lto-cgraph.c (output_outgoing_cgraph_edges): New function.
1060         (output_cgraph): Stream also indirect edges.
1061         (lto_output_edge): Added capability to stream indirect edges.
1062         (input_edge): Likewise.
1063         (input_cgraph_1): Likewise.
1064         * lto-streamer-in.c (fixup_call_stmt_edges_1): Fixup also statements
1065         of indirect edges.
1066
1067 2010-04-28  Richard Guenther  <rguenther@suse.de>
1068
1069         PR tree-optimization/43879
1070         PR tree-optimization/43909
1071         * tree-ssa-structalias.c (struct variable_info): Add
1072         only_restrict_pointers flag.
1073         (new_var_info): Initialize it.  Increment stats.total_vars here.
1074         (create_function_info_for): Do not increment stats.total_vars
1075         here.
1076         (get_function_part_constraint): Fix build with C++.
1077         (insert_into_field_list): Remove.
1078         (push_fields_onto_fieldstack): Properly merge fields.
1079         (create_variable_info_for): Split and simplify.
1080         (create_variable_info_for_1): New piece.
1081         (intra_create_variable_infos): Properly make restrict constraints
1082         from parameters.
1083
1084 2010-04-28  Richard Guenther  <rguenther@suse.de>
1085
1086         PR c++/43880
1087         * tree-inline.c (copy_bind_expr): Also copy bind expr vars value-exprs.
1088
1089 2010-04-27  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1090             Jan Hubicka <hubicka@ucw.cz>
1091
1092         * doc/invoke.texi (-Wsuggest-attribute=const,
1093         -Wsuggest-attribute=pure): Document.
1094         * ipa-pure-const.c: Include toplev.h, intl.h and opts.h.
1095         (function_always_visible_to_compiler_p,
1096         suggest_attribute, warn_function_pure, warn_function_const):
1097         New functions.
1098         (check_call): Improve debug info.
1099         (analyze_function): Do not check availability.
1100         (add_new_function): Check availability.
1101         (propagate): Output warnings.
1102         (skip_function_for_local_pure_const): New function.
1103         (local_pure_const): Use it; output warnings.
1104         * common.opt (Wsuggest-attribute=const,
1105         Wsuggest-attribute=pure): New.
1106
1107 2010-04-27  Jakub Jelinek  <jakub@redhat.com>
1108
1109         * dwarf2out.c (def_cfa_1): After DW_CFA_def_cfa_expression
1110         force using DW_CFA_def_cfa instead of DW_CFA_def_cfa_register
1111         or DW_CFA_def_cfa_offset{,_sf}.
1112
1113 2010-04-27  Eric Botcazou  <ebotcazou@adacore.com>
1114
1115         * tree.h: Fix truncated long macros.
1116
1117 2010-04-27  Kai Tietz  <kai.tietz@onevision.com>
1118
1119         * collect2.c (TARGET_64BIT): Redefine to target's default.
1120         * tlink.c: Likewise.
1121         * config/i386/cygming.h (USER_LABEL_PREFIX): Define
1122         dependent to TARGET_64BIT and USE_MINGW64_LEADING_UNDERSCORES.
1123         * config/i386/i386.h (CRT_CALL_STATIC_FUNCTION): Use
1124         for underscoring __USER_LABEL_PREFIX__.
1125         * config/i386/mingw-w64.h (SUB_LINK_ENTRY): New macro.
1126         (SUB_LINK_ENTRY32): New.
1127         (SUB_LINK_ENTRY64): New.
1128         (LINK_SPEC): Replace entry point spec by SUB_LINK_ENTRY.
1129         * config/i386/mingw32 (SUB_LINK_ENTRY32): New.
1130         (SUB_LINK_ENTRY64): New.
1131         (SUB_LINK_ENTRY): New.
1132         (LINK_SPEC): Use SUB_LINK_ENTRY instead of hard-coded entry-point.
1133         (DWARF2_UNWIND_INFO): Error out for use of dw2 unwind when
1134         x64 target is choosen.
1135         * config.in (USE_MINGW64_LEADING_UNDERSCORES): New.
1136         * configure: Regenerated.
1137         * configure.ac (leading-mingw64-underscores): Option added.
1138
1139 2010-04-27  Jan Hubicka  <jh@suse.cz>
1140
1141         * doc/invoke.texi (-fipa-profile): Document.
1142         * opts.c (decode_options): Enable ipa-profile at -O1.
1143         * timevar.def (TV_IPA_PROFILE): Define.
1144         * common.opt (fipa-profile): Add.
1145         * cgraph.c (cgraph_clone_node): Set local flag and clear vtable method
1146         flag for clones.
1147         (cgraph_propagate_frequency): Handle only local ones.
1148         * tree-pass.h (pass_ipa_profile): Declare.
1149         * ipa-profile.c (gate_profile): Use flag_ipa_profile.
1150         (pass_ipa_profile): Use TV_IPA_PROFILE.
1151         * ipa.c (ipa_profile): New function.
1152         (gate_ipa_profile): Likewise.
1153         (pass_ipa_profile): New global variable.
1154         * passes.c (pass_ipa_profile): New.
1155
1156 2010-04-27  Nathan Froyd  <froydnj@codesourcery.com>
1157
1158         * config/arm/arm.c (arm_expand_builtin): Remove redundant declaration.
1159
1160 2010-04-27  Martin Jambor  <mjambor@suse.cz>
1161
1162         PR middle-end/43812
1163         * ipa.c (dissolve_same_comdat_group_list): New function.
1164         (function_and_variable_visibility): Call
1165         dissolve_same_comdat_group_list when comdat group contains external or
1166         newly local nodes.
1167         * cgraphunit.c (verify_cgraph_node): Verify that same_comdat_group
1168         lists are circular and that they contain only DECL_ONE_ONLY nodes.
1169
1170 2010-04-27  Eric Botcazou  <ebotcazou@adacore.com>
1171
1172         * varasm.c (decode_addr_const): Handle special case of INDIRECT_REF.
1173         (const_hash_1) <VECTOR_CST>: New case.
1174         (compare_constant) <VECTOR_CST>: Likewise.
1175         <ADDR_EXPR>: Deal with LABEL_REFs.
1176         (copy_constant) <VECTOR_CST>: New case.
1177
1178 2010-04-27  Jan Hubicka  <jh@suse.cz>
1179
1180         * cgraph.c (cgraph_propagate_frequency): New function.
1181         * cgraph.h (cgraph_propagate_frequency): Declare.
1182         * ipa-inline.c (cgraph_clone_inlined_nodes): Call
1183         cgraph_propagate_frequency.
1184
1185 2010-04-27  Jakub Jelinek  <jakub@redhat.com>
1186
1187         * unwind-dw2.c (_Unwind_DebugHook): Add used and noclone attributes.
1188
1189 2010-04-27  Bernd Schmidt  <bernds@codesourcery.com>
1190
1191         PR target/40657
1192         * config/arm/arm.c (thumb1_extra_regs_pushed): New function.
1193         (thumb1_expand_prologue, thumb1_output_function_prologue): Call it
1194         here to determine which regs to push and how much stack to reserve.
1195
1196 2010-04-27  Jie Zhang  <jie@codesourcery.com>
1197
1198         * doc/gimple.texi (gimple_statement_with_ops): Remove
1199         addresses_taken field.
1200         (gimple_statement_with_memory_ops): Likewise.
1201
1202 2010-04-27  Jan Hubicka  <jh@suse.cz>
1203
1204         * tree-inline.c (eni_inlining_weights): Remove.
1205         (estimate_num_insns): Special case more builtins.
1206
1207 2010-04-27  Shujing Zhao  <pearly.zhao@oracle.com>
1208
1209         PR c/32207
1210         * c-typeck.c (build_binary_op): Move forward check for comparison
1211         pointer with null pointer constant and adjust the diagnostic message.
1212
1213 2010-04-27  Dave Korn  <dave.korn.cygwin@gmail.com>
1214
1215         PR lto/42776
1216         * configure.ac (gcc_cv_as_section_has_align): Set if installed
1217         binutils supports extended .section directive needed by LTO, or
1218         warn if older binutils found.
1219         (LTO_BINARY_READER): New AC_SUBST'd variable.
1220         (LTO_USE_LIBELF): Likewise.
1221         * gcc/config.gcc (lto_binary_reader): New target-specific configure
1222         variable.
1223         * gcc/Makefile.in (LTO_BINARY_READER): Import AC_SUBST'd autoconf var.
1224         (LTO_USE_LIBELF): Likewise.
1225         * configure: Regenerate.
1226
1227         * collect2.c (is_elf): Rename from this ...
1228         (is_elf_or_coff): ... to this, and recognize and allow i386 COFF
1229          object files in addition to ELF-formatted ones.
1230         (scan_prog_file): Caller updated.  Also allow for LTO info marker
1231         symbol to be prefixed or not by an extra underscore.
1232
1233         * config/i386/t-cygming (winnt.o): Also depend on LTO_STREAMER_H.
1234         * config/i386/winnt.c: Also #include lto-streamer.h
1235         (i386_pe_asm_named_section): Specify 1-byte section alignment for
1236         LTO named sections.
1237         (i386_pe_asm_output_aligned_decl_common): Add comment.
1238         (i386_pe_maybe_record_exported_symbol): Allow decl arg to be NULL.
1239
1240 2010-04-27  Hans-Peter Nilsson  <hp@bitrange.com>
1241
1242         PR target/43889
1243         * config/mmix/mmix.md ("*divdi3_nonknuth", "*moddi3_nonknuth"):
1244         Add missing earlyclobber for second alternative.
1245
1246 2010-04-26  Bernd Schmidt  <bernds@codesourcery.com>
1247
1248         * df-problems.c (df_simulate_initialize_forwards): Set, don't clear,
1249         bits for artificial defs at the top of the block.
1250         * fwprop.c (single_def_use_enter_block): Don't call it.
1251
1252 2010-04-26  Jack Howarth <howarth@bromo.med.uc.edu>
1253
1254         PR 43715
1255         * gcc/configure.ac: Use "$gcc_cv_nm -g" on darwin
1256         instead of "$gcc_cv_objdump -T".
1257         Use "-undefined dynamic_lookup" on darwin.
1258         * gcc/configure: Regenerate.
1259
1260 2010-04-26  Jakub Jelinek  <jakub@redhat.com>
1261
1262         PR c/43893
1263         * c-omp.c (c_finish_omp_for): Handle also EQ_EXPR.
1264
1265 2010-04-26  Nathan Froyd  <froydnj@codesourcery.com>
1266
1267         * c-parser.c (struct c_token): Move location field up.
1268         * c-tree.h (struct c_typespec): Move expr_const_operands field up.
1269         (struct c_declspecs): Convert typespec_word, storage_class, and
1270         default_int_p into bitfields.
1271         (struct c_declarator): Move loc field up.
1272
1273 2010-04-26  Nathan Froyd  <froydnj@codesourcery.com>
1274
1275         * cfgloop.h (struct loop): Move can_be_parallel field up.
1276         * ipa-prop.h (struct ip_node_params): Move bitfields up.
1277         * tree-ssa-loop-ivopts.c (struct version_info): Move inv_id field
1278         down.
1279         (struct iv_cand): Convert pos field into a bitfield.
1280         * tree-vectorizer.h (struct _loop_vec_info): Move loop_line_number
1281         field up.
1282         (struct _stmt_vec_info): Shuffle fields for better packing.
1283
1284 2010-04-26  Eric Botcazou  <ebotcazou@adacore.com>
1285
1286         * varasm.c (IN_NAMED_SECTION): Remove guard.
1287         * config/arm/unknown-elf.h (IN_NAMED_SECTION): Rename to...
1288         (IN_NAMED_SECTION_P): ...this.
1289         (ASM_OUTPUT_ALIGNED_BSS): Adjust for above renaming.
1290         (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
1291
1292 2010-04-26  Eric Botcazou  <ebotcazou@adacore.com>
1293
1294         * gimplify.c (gimplify_cond_expr): Use THEN_ and ELSE_ local variables.
1295         Use VOID_TYPE_P for all void type tests.  Adjust TYPE variable instead
1296         of shadowing it.  Fix comments.
1297
1298 2010-04-26  Jan Hubicka  <jh@suse.cz>
1299
1300         * cgraph.c (cgraph_create_node): Set node frequency to normal.
1301         (cgraph_clone_node): Copy function frequency.
1302         * cgraph.h (node_frequency): New enum
1303         (struct cgraph_node): Add.
1304         * final.c (rest_of_clean_state): Update.
1305         * lto-cgraph.c (lto_output_node): Output node frequency.
1306         (input_overwrite_node): Input node frequency.
1307         * tre-ssa-loop-ivopts (computation_cost): Update.
1308         * lto-streamer-out.c (output_function): Do not output function
1309         frequency.
1310         * predict.c (maybe_hot_frequency_p): Update and handle functions
1311         executed once.
1312         (cgraph_maybe_hot_edge_p): Likewise; use cgraph frequency instead of
1313         attribute lookup.
1314         (probably_never_executed_bb_p, optimize_function_for_size_p): Update.
1315         (compute_function_frequency): Set noreturn functions to be executed
1316         once.
1317         (choose_function_section): Update.
1318         * lto-streamer-in.c (input_function): Do not input function frequency.
1319         * function.c (allocate_struct_function): Do not initialize function
1320         frequency.
1321         * function.h (function_frequency): Remove.
1322         (struct function): Remove function frequency.
1323         * ipa-profile.c (CGRAPH_NODE_FREQUENCY): Remove.
1324         (try_update): Update.
1325         * tree-inline.c (initialize_cfun): Do not update function frequency.
1326         * passes.c (pass_init_dump_file): Update.
1327         * i386.c (ix86_compute_frame_layout): Update.
1328         (ix86_pad_returns): Update.
1329
1330 2010-04-26  Jie Zhang  <jie@codesourcery.com>
1331
1332         PR tree-optimization/43833
1333         * tree-vrp.c (range_int_cst_p): New.
1334         (range_int_cst_singleton_p): New.
1335         (extract_range_from_binary_expr): Optimize BIT_AND_EXPR case
1336         when both operands are constants.  Use range_int_cst_p in
1337         BIT_IOR_EXPR case.
1338
1339 2010-04-26  Jan Hubicka  <jh@suse.cz>
1340
1341         * cgraphunit.c (cgraph_copy_node_for_versioning): Fix profile updating.
1342
1343 2010-04-26  Richard Guenther  <rguenther@suse.de>
1344
1345         PR lto/43080
1346         * gimple.c (gimple_decl_printable_name): Deal gracefully
1347         with a NULL DECL_NAME.
1348
1349 2010-04-26  Richard Guenther  <rguenther@suse.de>
1350
1351         PR lto/42425
1352         * tree.c (free_lang_data_in_type): Do not free TYPE_CONTEXT
1353         if emitting debug information and it is either a function
1354         or a namespace decl.
1355
1356 2010-04-26  Ira Rosen  <irar@il.ibm.com>
1357
1358         * tree-vectorizer.h (struct _stmt_vec_info): Add new field to
1359         determine if the statement is vectorizable, and a macro to access it.
1360         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
1361         Skip statements that can't be vectorized. If the analysis fails,
1362         mark the statement as unvectorizable if vectorizing basic block.
1363         (vect_compute_data_refs_alignment): Likewise.
1364         (vect_verify_datarefs_alignment): Skip statements marked as
1365         unvectorizable. Add print.
1366         (vect_analyze_group_access): Skip statements that can't be
1367         vectorized. If the analysis fails, mark the statement as
1368         unvectorizable if vectorizing basic block.
1369         (vect_analyze_data_ref_accesses, vect_analyze_data_refs): Likewise.
1370         * tree-vect-stmts.c (vectorizable_store): Fix the number of
1371         generated stmts for SLP.
1372         (new_stmt_vec_info): Initialize the new field.
1373         * tree-vect-slp.c (vect_build_slp_tree): Fail to vectorize
1374         statements marked as unvectorizable.
1375
1376 2010-04-25  Joseph Myers  <joseph@codesourcery.com>
1377
1378         * c-common.c (flag_isoc1x): New.
1379         (flag_isoc99): Update comment.
1380         * c-common.h (flag_isoc1x): New.
1381         (flag_isoc99): Update comment.
1382         * c-cppbuiltin.c (builtin_define_float_constants): Also define
1383         __<type>_DECIMAL_DIG__.
1384         * c-opts.c (set_std_c1x): New.
1385         (c_common_handle_option): Handle -std=c1x and -std=gnu1x.
1386         (set_std_c89, set_std_c99): Also set flag_isoc1x to 0.
1387         * c.opt (-std=c1x, -std=gnu1x): New options.
1388         * doc/cpp.texi: Mention -std=c1x.
1389         * doc/cppopts.texi (-std=c1x, -std=gnu1x): Document.
1390         * doc/extend.texi: Mention -std=c1x and -std=gnu1x.
1391         * doc/invoke.texi (-std=c1x, -std=gnu1x): Document.
1392         * doc/standards.texi: Mention C1X.
1393         * ginclude/float.h (FLT_DECIMAL_DIG, DBL_DECIMAL_DIG,
1394         LDBL_DECIMAL_DIG, FLT_HAS_SUBNORM, DBL_HAS_SUBNORM,
1395         LDBL_HAS_SUBNORM, FLT_TRUE_MIN, DBL_TRUE_MIN, LDBL_TRUE_MIN):
1396         Define for C1X.
1397
1398 2010-04-25  Uros Bizjak  <ubizjak@gmail.com>
1399
1400         * config/i386/gmon-sol2.c (_mcleanup): Change format string
1401         placeholder from 0x%x to %#x.
1402         * config/i386/i386elf.h (ASM_OUTPUT_ASCII): Ditto.
1403         * config/i386/i386-interix.h (ASM_OUTPUT_ASCII): Ditto.
1404         * config/i386/att.h (ASM_OUTPUT_ASCII): Ditto.
1405         * config/i386/sysv4.h (ASM_OUTPUT_ASCII): Ditto.
1406         * config/i386/i386.c (ix86_target_string): Ditto.
1407         (output_pic_addr_const): Ditto.
1408         (print_operand): Ditto.
1409
1410 2010-04-25  Paolo Bonzini  <bonzini@gnu.org>
1411
1412         * combine.c (find_split_point): Add third argument.  Use it
1413         to find nested multiply-accumulate instructions.  Adjust calls.
1414         (try_combine): Adjust call to find_split_point.
1415
1416 2010-04-24  Gerald Pfeifer  <gerald@pfeifer.com>
1417
1418         * doc/contrib.texi (Contributors): Add Dodji Seketeli.
1419
1420 2010-04-24  Bernd Schmidt  <bernds@codesourcery.com>
1421
1422         PR tree-optimization/41442
1423         * fold-const.c (merge_truthop_with_opposite_arm): New function.
1424         (fold_binary_loc): Call it.
1425
1426 2010-04-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1427
1428         * toplev.c (general_init): Set default for fdiagnostics-show-option.
1429         * opts.c (common_handle_option): Allow disabling it.
1430         * common.opt (fdiagnostics-show-option): Add Var. Enabled by default.
1431
1432 2010-04-23  Eric Botcazou  <ebotcazou@adacore.com>
1433
1434         * expr.c (expand_expr_real_1) <VIEW_CONVERT_EXPR>: Only use conversion
1435         between modes if both types are integral.
1436
1437 2010-04-23  Richard Guenther  <rguenther@suse.de>
1438
1439         PR tree-optimization/43572
1440         * tree-tailcall.c (find_tail_calls): Allow PARM_DECL uses.
1441
1442 2010-04-23  Richard Guenther  <rguenther@suse.de>
1443
1444         PR lto/43455
1445         * tree-inline.c (tree_can_inline_p): Also check compatibility
1446         of return types.
1447
1448 2010-04-23  Martin Jambor  <mjambor@suse.cz>
1449
1450         PR tree-optimization/43846
1451         * tree-sra.c (struct access): New flag grp_assignment_read.
1452         (build_accesses_from_assign): Set grp_assignment_read.
1453         (sort_and_splice_var_accesses): Propagate grp_assignment_read.
1454         (enum mark_read_status): New type.
1455         (analyze_access_subtree): Propagate grp_assignment_read, create
1456         accesses also if both direct_read and root->grp_assignment_read.
1457
1458 2010-04-23  Martin Jambor  <mjambor@suse.cz>
1459
1460         PR middle-end/43835
1461         * tree-sra.c (ipa_sra_preliminary_function_checks): Check that the
1462         function does not have type attributes.
1463
1464 2010-04-23  Richard Guenther  <rguenther@suse.de>
1465
1466         PR lto/42653
1467         * tree.c (free_lang_data_in_decl): Do not reset DECL_CONTEXT
1468         of FUNCTION_DECLs.
1469
1470 2010-04-22  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1471
1472         * sese.h (create_if_region_on_edge): Remove.
1473
1474         * sese.c (create_if_region_on_edge): Make static.
1475
1476         * tree-inline.c: Do not include ggc.h.
1477
1478         * expr.c: Do not include ggc.h.
1479
1480         * Makefile.in (tree-inline.o, expr.o): Remove $(GGC_H) from
1481         dependencies.
1482
1483 2010-04-22  Kaz Kojima  <kkojima@gcc.gnu.org>
1484
1485         PR target/43744
1486         * config/sh/sh.c (find_barrier): Don't emit a constant pool
1487         in the middle of insns for casesi_worker_2.
1488
1489 2010-04-22  David Edelsohn  <edelsohn@gnu.org>
1490
1491         * config/rs6000/x-aix: Override LDFLAGS for all COMPILERS.
1492
1493 2010-04-22  Ira Rosen  <irar@il.ibm.com>
1494
1495         PR tree-optimization/43842
1496         * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
1497         loop unrolling in update of exit phis. Fix comment.
1498         * tree-vect-slp.c (vect_analyze_slp): Check that there are at
1499         least two reduction statements in the loop before starting SLP
1500         analysis.
1501
1502 2010-04-22  Nick Clifton  <nickc@redhat.com>
1503
1504         * config/stormy16/stormy16-lib2.c (__ucmpsi2): Fix thinko.
1505
1506 2010-04-22  Alexander Monakov  <amonakov@ispras.ru>
1507
1508         * tree-ssa-reassoc.c (eliminate_plus_minus_pair): Handle BIT_NOT_EXPR
1509         to simplify a + ~a.
1510
1511 2010-04-22  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1512
1513         * tree-parloops.c (loop_parallel_p): New argument
1514         parloop_obstack.  Pass it down.
1515         (parallelize_loops): New variable parloop_obstack.  Initialize it,
1516         pass it down, free it.
1517
1518         * tree-loop-linear.c (linear_transform_loops): Pass down
1519         lambda_obstack.
1520
1521         * tree-data-ref.h (lambda_compute_access_matrices): New argument
1522         of type struct obstack *.
1523
1524         * tree-data-ref.c (analyze_subscript_affine_affine): New variable
1525         scratch_obstack.  Initialize it, pass down, free it.
1526
1527         * lambda.h (lambda_loop_new): Remove.
1528         (lambda_matrix_new, lambda_matrix_inverse)
1529         (lambda_trans_matrix_new, lambda_trans_matrix_inverse): New
1530         argument of type struct obstack *.
1531
1532         * lambda-trans.c (lambda_trans_matrix_new): New argument
1533         lambda_obstack.  Pass it down, use obstack allocation for ret.
1534         (lambda_trans_matrix_inverse): New argument lambda_obstack.  Pass
1535         it down.
1536
1537         * lambda-mat.c (lambda_matrix_get_column)
1538         (lambda_matrix_project_to_null): Remove.
1539         (lambda_matrix_new): New argument lambda_obstack.  Use obstack
1540         allocation for mat.
1541         (lambda_matrix_inverse_hard, lambda_matrix_inverse): New argument
1542         lambda_obstack.
1543
1544         * lambda-code.c (lambda_loop_new): New function.
1545         (lambda_lattice_new, compute_nest_using_fourier_motzkin)
1546         (lambda_compute_auxillary_space, lambda_compute_target_space)
1547         (lambda_loopnest_transform, gcc_loop_to_lambda_loop)
1548         (lambda_loopnest_to_gcc_loopnest): Pass down lambda_obstack.
1549         (build_access_matrix): New argument lambda_obstack.  Use obstack
1550         allocation for am.
1551         (lambda_compute_step_signs, lambda_compute_access_matrices): New
1552         argument lambda_obstack.  Pass it down.
1553
1554 2010-04-22  Bernd Schmidt  <bernds@codesourcery.com>
1555
1556         * optabs.h (expand_widening_mult): Declare.
1557
1558 2010-04-22  Richard Guenther  <rguenther@suse.de>
1559
1560         PR tree-optimization/43845
1561         * tree-ssa-pre.c (create_component_ref_by_pieces_1): Properly
1562         lookup the CALL_EXPR function and arguments.
1563
1564 2010-04-22  Nick Clifton  <nickc@redhat.com>
1565
1566         * config/stormy16/stormy16.c
1567         (xstormy16_asm_output_aligned_common): Handle a NULL decl parameter.
1568         * config/stormy16/stormy16.h: Tidy up formatting.
1569         (DONT_USE_BUILTIN_SETJMP): Remove definition.
1570         * config/stormy16/stormy16.c (cbranchsi4): Delete pattern.
1571         (ineqbranchsi): Delete pattern.
1572         * config/stormy16/stormy16-lib2-ucmpsi2.c: New file.
1573         * config/stormy16/stormy16-lib2.c (__ucmpsi2): New function.
1574         * config/stormy16/t-stormy16 (LIB2FUNCS_EXTRA): Add
1575         stormy16-lib2-ucmpsi2.c.
1576
1577 2010-04-22  Bernd Schmidt  <bernds@codesourcery.com>
1578
1579         * ifcvt.c (dead_or_predicable): Use df_simulate_find_defs and
1580         df_simulate_find_noclobber_defs as appropriate.  Keep track of an
1581         extra set merge_set_noclobber, and use it to relax the final test
1582         slightly.
1583         * df.h (df_simulate_find_noclobber_defs): Declare.
1584         * df-problems.c (df_simulate_find_defs): Don't ignore partial or
1585         conditional defs.
1586         (df_simulate_find_noclobber_defs): New function.
1587
1588 2010-04-22  Uros Bizjak  <ubizjak@gmail.com>
1589
1590         * config/i386/i386.md: Use {} around multi-line preparation statements.
1591
1592 2010-04-22  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1593
1594         * c-tree.h (push_init_level, pop_init_level, set_init_index)
1595         (process_init_element): New argument of type struct obstack *.
1596
1597         * c-typeck.c (push_init_level, pop_init_level, set_designator)
1598         (set_init_index, set_init_label, set_nonincremental_init)
1599         (set_nonincremental_init_from_string, find_init_member)
1600         (output_init_element, output_pending_init_elements)
1601         (process_init_element): New argument braced_init_obstack.  Pass it
1602         down.
1603         (push_range_stack, add_pending_init): New argument
1604         braced_init_obstack.  Use obstack allocation.
1605
1606         * c-parser.c (c_parser_initelt, c_parser_initval): New argument
1607         braced_init_obstack.  Pass it down.
1608         (c_parser_braced_init): New variables ret, braced_init_obstack.
1609         Initialize obstack, pass it down and finally free it.
1610
1611 2010-04-22  Bernd Schmidt  <bernds@codesourcery.com>
1612
1613         PR middle-end/29274
1614         * tree-pass.h (pass_optimize_widening_mul): Declare.
1615         * tree-ssa-math-opts.c (execute_optimize_widening_mul,
1616         gate_optimize_widening_mul): New static functions.
1617         (pass_optimize_widening_mul): New.
1618         * expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: New case.
1619         <case MULT_EXPR>: Remove support for widening multiplies.
1620         * tree.def (WIDEN_MULT_EXPR): Tweak comment.
1621         * cfgexpand.c (expand_debug_expr) <case WIDEN_MULT_EXPR>: Use
1622         simplify_gen_unary rather than directly building extensions.
1623         * tree-cfg.c (verify_gimple_assign_binary): Add tests for
1624         WIDEN_MULT_EXPR.
1625         * expmed.c (expand_widening_mult): New function.
1626         * passes.c (init_optimization_passes): Add pass_optimize_widening_mul.
1627
1628 2010-04-21  Jan Hubicka  <jh@suse.cz>
1629
1630         * timevar.def (TV_WHOPR_WPA_FIXUP): Remove.
1631         * lto-section-in.c (lto_section_name): Remove wpa_fixup.
1632         * lto-wpa-fixup.c: Remove.
1633         * Makefile.in (lto-wpa-fixup.o): Remove.
1634         * passes.c (init_optimization_passes): Remove pass_ipa_lto_wpa_fixup.
1635         (execute_all_ipa_transforms): Set cgraph_state to CGRAPH_STATE_IPA_SSA.
1636         * lto-streamer.c (lto_get_section_name): Remove wpa_fixup section.
1637
1638 2010-04-21  Jan Hubicka  <jh@suse.cz>
1639
1640         * tree-pass.h (ipa_opt_pass_d): Rename function_read_summary;
1641         add write_optimization_summary, read_optimization_summary.
1642         (ipa_write_summaries_of_cgraph_node_set): Remove.
1643         (ipa_write_optimization_summaries): Declare.
1644         (ipa_read_optimization_summaries): Declare.
1645         * ipa-cp.c (pass_ipa_cp): Update.
1646         * ipa-reference.c (pass_ipa_reference): Update.
1647         * ipa-pure-const.c (pass_ipa_pure_const): Update.
1648         * lto-streamer-out.c (pass_ipa_lto_gimple, pass_ipa_lto_finish):
1649         Update.
1650         * ipa-inline.c (pass_ipa_inline): Update.
1651         * ipa.c (pass_ipa_whole_program): Update.
1652         * lto-wpa-fixup.c (pass_ipa_lto_wpa_fixup): Update.
1653         * passes.c (ipa_write_summaries_1): Do not test wpa.
1654         (ipa_write_optimization_summaries_1): New.
1655         (ipa_write_optimization_summaries): New.
1656         (ipa_read_summaries): Do not test ltrans.
1657         (ipa_read_optimization_summaries_1): New.
1658         (ipa_read_optimization_summaries): New.
1659
1660 2010-04-21  Jan Hubicka  <jh@suse.cz>
1661
1662         * lto-cgraph.c (lto_output_node): Do not output comdat groups
1663         for boundary nodes.
1664         (output_cgraph): Do not arrange comdat groups for boundary nodes.
1665
1666 2010-04-21  Jakub Jelinek  <jakub@redhat.com>
1667
1668         PR debug/40040
1669         * dwarf2out.c (add_name_and_src_coords_attributes): Add
1670         DW_AT_{,MIPS_}linkage_name even for Fortran decls.
1671
1672 2010-04-21  Jan Hubicka  <jh@suse.cz>
1673
1674         * ipa-prop.c (ipa_edge_removal_hook): Check for bounds.
1675
1676 2010-04-21  Jan Hubicka  <jh@suse.cz>
1677
1678         * varpool.c (decide_is_variable_needed): Variable is always needed
1679         during ltrans.
1680
1681 2010-04-21  Jan Hubicka  <jh@suse.cz>
1682
1683         * opts.c (decode_options): Enable pure-const pass for whopr.
1684
1685 2010-04-21  Jan Hubicka  <jh@suse.cz>
1686
1687         * cgraph.c (dump_cgraph_node): Dump also assembler name.
1688         * ipa-inline.c (cgraph_decide_inlining_of_small_functions): Do not ice
1689         at WPA dumping.
1690         (cgraph_decide_inlining): Do not expect callee to be removed in all
1691         cases.
1692
1693 2010-04-21  Eric B. Weddington  <eric.weddington@atmel.com>
1694
1695         * config/avr/avr-devices.c (avr_mcu_types): Add missing comma.
1696
1697 2010-04-21  Uros Bizjak  <ubizjak@gmail.com>
1698
1699         * config/i386/i386.md (x86_shrd): Add athlon_decode and
1700         amdfam10_decode attributes.
1701
1702 2010-04-21  Jakub Jelinek  <jakub@redhat.com>
1703
1704         PR middle-end/43570
1705         * omp-low.c (scan_sharing_clauses): Don't scan_omp_op
1706         OMP_CLAUSE_DECL for OMP_CLAUSE_COPYPRIVATE.
1707         (lower_copyprivate_clauses): Use private var in outer
1708         context instead of original var.  Make sure the types
1709         are correct for VLAs.
1710
1711 2010-04-21  Richard Guenther  <rguenther@suse.de>
1712
1713         * tree-ssa-structalias.c (do_ds_constraint): Avoid escaping
1714         to non-pointer objects.
1715
1716 2010-04-21  Jakub Jelinek  <jakub@redhat.com>
1717
1718         * dwarf2out.c (add_var_loc_to_decl): Add LABEL argument.  Drop
1719         last chain entry if it starts with the still current label.
1720         (add_location_or_const_value_attribute): Check that
1721         loc_list->first->next is NULL instead of comparing ->first with ->last.
1722         (dwarf2out_var_location): Pass last_label resp. last_postcall_label
1723         to add_var_loc_to_decl.
1724
1725         * dwarf2out.c (output_call_frame_info): For dw_cie_version
1726         >= 4 add also address size and segment size fields into CIE header.
1727
1728         * unwind-dw2.c (extract_cie_info): Handle CIE version 4, as
1729         long as address size is the same as sizeof (void *) and
1730         segment size is 0.
1731         * unwind-dw2-fde.c (get_cie_encoding): Likewise.  If
1732         address size or segment size is unexpected, return DW_EH_PE_omit.
1733         (classify_object_over_fdes): If get_cie_encoding returned
1734         DW_EH_PE_omit, return -1.
1735         (init_object): If classify_object_over_fdes returned -1,
1736         pretend there were no FDEs at all.
1737
1738 2010-04-21  Uros Bizjak  <ubizjak@gmail.com>
1739
1740         * config/i386/i386.md (bswap<mode>2): Macroize expander from
1741         bswap{si,di}2 using SWI48 mode iterator.
1742         (*bswap<mode>2_movbe): Macroize insn from *bswap{si,di}_movbe using
1743         SWI48 mode iterator.  Set type attribute of bswap insn to bitmanip,
1744         set modrm attribute of bswap insn to 0 and remove length attribute.
1745         (*bswap<mode>2_1): Macroize insn from *bswap{si,di}_1 using SWI48 mode
1746         iterator.  Set type attribute to bitmanip, set modrm attribute to 0,
1747         set mode attribute to <MODE> and remove length attribute.
1748
1749 2010-04-20  James E. Wilson  <wilson@codesourcery.com>
1750
1751         PR rtl-optimization/43520
1752         * ira-lives.c (ira_implicitly_set_insn_hard_regs): Exclude classes with
1753         zero available registers.
1754
1755 2010-04-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1756
1757         * builtins.c (fold_builtin_cproj): Fold more cases.
1758
1759 2010-04-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1760
1761         * builtins.c (build_complex_cproj, fold_builtin_cproj): New.
1762         (fold_builtin_1): Fold builtin cproj.
1763         * builtins.def (BUILT_IN_CPROJ, BUILT_IN_CPROJF, BUILT_IN_CPROJL):
1764         Use ATTR_CONST_NOTHROW_LIST.
1765
1766 2010-04-20  Uros Bizjak  <ubizjak@gmail.com>
1767
1768         * config/i386/i386.md (ffs<mode>2): Macroize expander from ffs_cmove
1769         and ffsdi2 using SWI48 mode iterator.  Expand SImode insn through
1770         ffsi2_no_cmove for !TARGET_CMOVE.
1771         (ffssi2_no_cmove): Rename from *ffs_no_cmove.  Make public.
1772         (ffssi2): Remove expander.
1773         (*ffs<mode>_1): Macroize insn from *ffs{si,di} using SWI48
1774         mode iterator.
1775         (ctz<mode>2): Ditto from ctz{si,di}2.
1776         (clz<mode>2): Macroize expander from ctz{hi,si,di}2 using SWI248
1777         mode iterator.
1778         (clz<mode>2_abm): Macroize insn from clz{hi,si,di}2_abm using SWI248
1779         mode iterator.
1780
1781 2010-04-20  Jakub Jelinek  <jakub@redhat.com>
1782
1783         * dwarf2out.c (AT_linkage_name): Define.
1784         (clone_as_declaration): Handle DW_AT_linkage_name.
1785         (add_name_and_src_coords_attributes): Use AT_linkage_name instead
1786         of DW_AT_MIPS_linkage_name.
1787         (move_linkage_attr): Likewise.
1788         (dwarf2out_finish): Likewise.
1789
1790 2010-04-20  Xinliang David Li  <davidxl@gcc.gnu.org>
1791
1792         PR middle-end/41952
1793         * fold-const.c (fold_comparison): New folding rule.
1794
1795 2010-04-20  Anatoly Sokolov  <aesok@post.ru>
1796
1797         * double-int.h (double_int_setbit): Declare.
1798         * double-int.c (double_int_setbit): New function.
1799         * rtl.h (immed_double_int_const): Declare.
1800         * emit-rtl.c (immed_double_int_const): New function.
1801         * builtins.c (expand_builtin_signbit): Clean up, use double_int_*
1802         and immed_double_int_const functions.
1803         * optabs.c (expand_absneg_bit, expand_copysign_absneg,
1804         expand_copysign_bit):  (Ditto.).
1805         * simplify-rtx.c (simplify_binary_operation_1): (Ditto.).
1806         * tree-ssa-address.c (addr_for_mem_ref): (Ditto.).
1807         * dojump.c (prefer_and_bit_test): (Ditto.).
1808         * expr.c (convert_modes, reduce_to_bit_field_precision,
1809         const_vector_from_tree): (Ditto.).
1810         * expmed.c (mask_rtx, lshift_value): (Ditto.).
1811
1812 2010-04-20  Jan Hubicka  <jh@suse.cz>
1813
1814         * cgraph.c (cgraph_remove_node): Kill bodies in other partitoin.
1815         (dump_cgraph_node): Dump new flags.
1816         * cgraph.h (struct cgraph_node): Add flags
1817         reachable_from_other_partition and in_other_partition.
1818         (cgraph_can_remove_if_no_direct_calls_p): Functions used by
1819         other partition can not be removed.
1820         * cgraphunit.c (cgraph_mark_functions_to_output): Functions used by
1821         the other partition must be output; silence sanity checking on
1822         leaking functions bodies from other paritition.
1823         * lto-cgraph.c (reachable_from_other_partition_p): New function.
1824         (lto_output_node): Output new flags; do not sanity check that inline
1825         clones are output; drop lto_forced_extern_inline_p code; do not mock
1826         visibility flags at partition boundaries.
1827         (add_node_to): New function.
1828         (output_cgraph): Use it to sort functions so masters appear before
1829         clones.
1830         (input_overwrite_node): Input new flags.
1831         * passes.c (ipa_write_summaries): Do not call
1832         lto_new_extern_inline_states.
1833         * lto-section-out.c (forced_extern_inline,
1834         lto_new_extern_inline_states lto_delete_extern_inline_states,
1835         lto_force_functions_extern_inline, lto_forced_extern_inline_p): Kill.
1836         * lto-streamer.h (lto_new_extern_inline_states,
1837         * lto_delete_extern_inline_states, lto_force_functions_extern_inline,
1838         lto_forced_extern_inline_p): Kill.
1839
1840 2010-04-20  Richard Guenther  <rguenther@suse.de>
1841
1842         * tree-ssa-structalias.c (do_sd_constraint): Add edges only
1843         from vars that can have pointers.
1844         (process_constraint): Dump useless constraints.
1845
1846 2010-04-20  Richard Guenther  <rguenther@suse.de>
1847
1848         * tree-ssa-structalias.c (do_structure_copy): Properly handle DEREF.
1849         (dump_sa_points_to_info): Remove asserts.
1850         (init_base_vars): nothing_id isn't an escape point nor does it
1851         have pointers.
1852
1853 2010-04-20  Jakub Jelinek  <jakub@redhat.com>
1854
1855         * tree.h (TYPE_REF_IS_RVALUE): Define.
1856         * dwarf2out.c (attr_checksum_ordered, is_type_die, is_comdat_die,
1857         should_move_die_to_comdat, prune_unused_types_walk): Handle
1858         DW_TAG_rvalue_reference_type like DW_TAG_reference_type.
1859         (modified_type_die, gen_reference_type_die): Emit
1860         DW_TAG_rvalue_reference_type instead of DW_TAG_reference_type
1861         if TYPE_REF_IS_RVALUE and -gdwarf-4.
1862
1863 2010-04-20  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
1864
1865         PR target/43635
1866         * config/s390/s390.c (s390_emit_call): Turn direct into indirect
1867         calls for -fpic -m31 if they have been sibcall optimized.
1868
1869 2010-04-19  James E. Wilson  <wilson@codesourcery.com>
1870
1871         * config/ia64/ia64.h (FIXED_REGISTERS, CALL_USED_REGISTERS): Make
1872         ar.lc fixed and call-used.
1873
1874         * config/ia64/ia64.c (TARGET_INVALID_WITHIN_DOLOOP): Define.
1875
1876 2010-04-19  Jan Hubicka  <jh@suse.cz>
1877
1878         * opts.c (decode_options): Disable whpr incompatible passes.
1879         * lto/lto.c (lto_1_to_1_map): Skip clones.
1880         (read_cgraph_and_symbols): Do not mark everything as needed.
1881         (do_whole_program_analysis): Do map only after optimizing;
1882         set proper cgraph_state; use passmanager.
1883
1884 2010-04-19  DJ Delorie  <dj@redhat.com>
1885
1886         * cfgexpand.c (expand_debug_expr): Check for mismatched modes in
1887         POINTER_PLUS_EXPR and fix them.
1888
1889 2010-04-19  Eric B. Weddington  <eric.weddington@atmel.com>
1890
1891         * config/avr/avr-devices.c (avr_mcu_types): Add support for new
1892         devices atmega644pa, attiny2313a, attiny24a, attiny261a, attiny4313,
1893         attiny44a, attiny861a, atmega16a, atmega168a, atmega164a, atmega165a,
1894         atmega169a, atmega169pa, atmega16hva2, atmega324a, atmega324pa,
1895         atmega325a, atmega3250a, atmega328, atmega329a, atmega329pa,
1896         atmega3290a, atmega48a, atmega644a, atmega645a, atmega645p,
1897         atmega6450a, atmega6450p, atmega649a, atmega649p, atmega6490a,
1898         atmega6490p, atmega64hve, atmega88a, atmega88pa, attiny461a, attiny84a,
1899         m3000. Remove support for devices atmega8m1, atmega8c1, atmega16c1,
1900         atmega4hvd, atmega8hvd, attiny327, m3000f, m3000s, m3001b.
1901         * config/avr/t-avr.c (MULTILIB_MATCHES): Same.
1902
1903 2010-04-19  Eric Botcazou  <ebotcazou@adacore.com>
1904
1905         * ifcvt.c (noce_try_cmove_arith): Fix long lines.
1906         (check_cond_move_block): Likewise.
1907         (cond_move_process_if_block): Likewise.
1908         (noce_find_if_block): Improve formatting.
1909         (find_if_header): Pass 0 to memset and tweak conditions.
1910         (cond_exec_find_if_block): Fix long lines and tweak conditions.
1911
1912 2010-04-19  Jakub Jelinek  <jakub@redhat.com>
1913
1914         * dwarf2out.c (lower_bound_default): For DW_LANG_Python return 0
1915         for -gdwarf-4.
1916
1917         PR middle-end/43337
1918         * tree-nested.c (convert_nonlocal_omp_clauses): OMP_CLAUSE_PRIVATE
1919         with non-local decl doesn't need chain.
1920
1921 2010-04-19  Vladimir Makarov  <vmakarov@redhat.com>
1922
1923         * ira-color.c (allocno_reload_assign): Avoid accumulating
1924         reload registers in ALLOCNO_TOTAL_CONFLICT_HARD_REGS.
1925
1926 2010-04-19  Martin Jambor  <mjambor@suse.cz>
1927
1928         * gimple.h (create_tmp_reg): Declare.
1929         * gimplify.c (create_tmp_reg): New function.
1930         (gimplify_return_expr): Use create_tmp_reg.
1931         (gimplify_omp_atomic): Likewise.
1932         (gimple_regimplify_operands): Likewise.
1933         * tree-dfa.c (make_rename_temp): Likewise.
1934         * tree-predcom.c (predcom_tmp_var): Likewise.
1935         (reassociate_to_the_same_stmt): Likewise.
1936         * tree-sra.c (replace_uses_with_default_def_ssa_name): Likewise.
1937         (get_replaced_param_substitute): Likewise.
1938         * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
1939         * tree-ssa-phiopt.c (cond_store_replacement): Likewise.
1940         * tree-ssa-pre.c (get_representative_for): Likewise.
1941         (create_expression_by_pieces): Likewise.
1942         * tree-tailcall.c (adjust_return_value_with_ops): Likewise.
1943         (create_tailcall_accumulator): Likewise.
1944
1945 2010-04-19  Martin Jambor  <mjambor@suse.cz>
1946
1947         * cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Update
1948         new_stmt.
1949         (cgraph_materialize_all_clones): Assert !need_ssa_update_p.
1950
1951 2010-04-19  Richard Guenther  <rguenther@suse.de>
1952
1953         PR tree-optimization/43796
1954         * tree-vrp.c (adjust_range_with_scev): Lookup init and step
1955         from SCEV in the lattice.
1956         (vrp_visit_phi_node): Dump change.
1957
1958 2010-04-19  Richard Guenther  <rguenther@suse.de>
1959
1960         * configure.ac: Fix quoting around elf_getshstrndx ABI check.
1961         * configure: Re-generated.
1962
1963 2010-04-19  Richard Guenther  <rguenther@suse.de>
1964
1965         PR tree-optimization/43783
1966         * tree-ssa-pre.c (create_component_ref_by_pieces_1): Drop
1967         constant ARRAY_REF operands two and three if possible.
1968
1969 2010-04-19  Uros Bizjak  <ubizjak@gmail.com>
1970
1971         PR target/43766
1972         * config/i386/i386.c (ix86_decompose_address): Handle ASHIFT addends.
1973
1974 2010-04-19  Jie Zhang  <jie@codesourcery.com>
1975
1976         PR target/43662
1977         * reginfo.c (reinit_regs): Set caller_save_initialized_p to false.
1978
1979 2010-04-19  Ira Rosen  <irar@il.ibm.com>
1980
1981         PR tree-optimization/37027
1982         * tree-vectorizer.h (struct _loop_vec_info): Add new field reductions
1983         and macro to access it.
1984         (vectorizable_reduction): Add argument.
1985         (vect_get_slp_defs): Likewise.
1986         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Collect reduction
1987         statements for possible use in SLP.
1988         (new_loop_vec_info): Initialize LOOP_VINFO_REDUCTIONS.
1989         (destroy_loop_vec_info): Free LOOP_VINFO_REDUCTIONS.
1990         (vect_create_epilog_for_reduction): Handle SLP. Modify documentation,
1991         add new argument.
1992         (vectorizable_reduction): Likewise.
1993         * tree-vect-stmts.c (vect_get_vec_defs): Update call to
1994         vect_get_slp_defs.
1995         (vectorizable_type_demotion, vectorizable_type_promotion,
1996         vectorizable_store): Likewise.
1997         (vect_analyze_stmt): Update call to vectorizable_reduction.
1998         (vect_transform_stmt): Likewise.
1999         * tree-vect-slp.c (vect_get_and_check_slp_defs): Handle reduction.
2000         (vect_build_slp_tree): Fix indentation. Check that there are no loads
2001         from different interleaving chains in same node.
2002         (vect_slp_rearrange_stmts): New function.
2003         (vect_supported_load_permutation_p): Allow load permutations for
2004         reductions. Call vect_slp_rearrange_stmts() to rearrange statements
2005         inside SLP nodes if necessary.
2006         (vect_analyze_slp_instance): Handle reductions.
2007         (vect_analyze_slp): Try to build SLP instances originating from groups
2008         of reductions.
2009         (vect_detect_hybrid_slp_stmts): Skip reduction statements.
2010         (vect_get_constant_vectors): Create initial vectors for reductions
2011         according to reduction code. Add new argument.
2012         (vect_get_slp_defs): Add new argument, pass it to
2013         vect_get_constant_vectors.
2014         (vect_schedule_slp_instance): Remove SLP tree root statements.
2015
2016 2010-04-19  Jakub Jelinek  <jakub@redhat.com>
2017
2018         * tree.h (ENUM_IS_SCOPED): Define.
2019         * dwarf2out.c (gen_enumeration_type_die): Add DW_AT_enum_class
2020         for ENUM_IS_SCOPED enums.
2021
2022 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2023
2024         * fold-const.c (fold_comparison): Use ssizetype.
2025         * gimple-fold.c (maybe_fold_offset_to_array_ref): Likewise.
2026         * ipa-prop.c (ipa_modify_call_arguments): Use sizetype.
2027         * tree-loop-distribution.c (build_size_arg_loc): Likewise.
2028         * tree-object-size.c (compute_object_sizes): Use size_type_node.
2029
2030         * tree.h (initialize_sizetypes): Remove parameter.
2031         (build_common_tree_nodes): Remove second parameter.
2032         * stor-layout.c (initialize_sizetypes): Remove parameter.
2033         Always create an unsigned type.
2034         (set_sizetype): Assert that the passed type is unsigned and simplify.
2035         * tree.c (build_common_tree_nodes): Remove second parameter.
2036         Adjust call to initialize_sizetypes.
2037         * c-decl.c (c_init_decl_processing): Remove second argument in call to
2038         build_common_tree_nodes.
2039
2040 2010-04-18  Matthias Klose  <doko@ubuntu.com>
2041
2042         * gcc.c (main): Search for liblto_plugin.so with mode R_OK.
2043
2044 2010-04-18  Ira Rosen  <irar@il.ibm.com>
2045
2046         PR tree-optimization/43771
2047         * tree-vect-slp.c (vect_supported_load_permutation_p): Check that
2048         load permutation doesn't have gaps.
2049
2050 2010-04-18  Jan Hubicka  <jh@suse.cz>
2051
2052         * i386.md (UNSPEC_SSE_PROLOGUE_SAVE_LOW): New.
2053         (sse_prologue_save_insn expander): Use new pattern.
2054         (sse_prologue_save_insn1): New pattern and splitter.
2055         (sse_prologue_save_insn): Update to deal also with 64bit aligned
2056         blocks.
2057         * i386.c (setup_incoming_varargs_64): Do not compute jump
2058         destination here.
2059         (ix86_gimplify_va_arg): Update alignment needed.
2060         (ix86_local_alignment): Do not align all local arrays to 128bit.
2061
2062 2010-04-17  Jan Hubicka  <jh@suse.cz>
2063
2064         * ipa-inline.c (cgraph_early_inlining): Handle flattening too.
2065
2066 2010-04-17  Richard Earnshaw  <rearnsha@arm.com>
2067
2068         * arm.md (negdi2): Remove redundant code to force values into a
2069         register.
2070
2071 2010-04-17  Richard Earnshaw  <rearnsha@arm.com>
2072
2073         * arm/bpabi.S: Add EABI alignment attributes to objects.
2074         * arm/bpabi-v6m.S: Likewise.
2075         * arm/crti.asm: Likewise.
2076         * arm/crtn.asm: Likewise.
2077         * arm/lib1funcs.asm: Likewise.
2078         * arm/libunwind.S: Likewise.
2079
2080 2010-04-17  Richard Earnshaw  <rearnsha@arm.com>
2081
2082         * arm-protos.h (tune_params): New structure.
2083         * arm.c (current_tune): New variable.
2084         (arm_constant_limit): Delete.
2085         (struct processors): Add pointer to the tune parameters.
2086         (arm_slowmul_tune): New tuning option.
2087         (arm_fastmul_tune, arm_xscale_tune, arm_9e_tune): Likewise.
2088         (all_cores): Adjust to pick up the tuning model.
2089         (arm_constant_limit): New function.
2090         (arm_override_options): Select the appropriate tuning model.  Delete
2091         initialization of arm_const_limit.
2092         (arm_split_constant): Use the new constant-limit model.
2093         (arm_rtx_costs): Pick up the current tuning model.
2094         * arm.md (is_strongarm, is_xscale): Delete.
2095         * arm-generic.md (load_ldsched_x, load_ldsched): Test explicitly
2096         for Xscale variant architectures.
2097         (mult_ldsched_strongarm, mult_ldsched): Similarly for StrongARM.
2098
2099 2010-04-17  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2100
2101         * config/arm/arm.c (arm_gen_constant): Remove unused variable
2102         can_shift.
2103         (arm_rtx_costs_1): Remove unused variable extra_cost.
2104         (arm_unwind_emit_set): Use variable offset.
2105         (thumb1_output_casesi): Remove unused variable flags.
2106
2107 2010-04-16  Jeff Law  <law@redhat.com>
2108
2109         * ira-color.c (ira_reassign_pseudos): Collect and sort all the pseudos
2110         needing assignment rather than doing a two-phase assignment.  Remove
2111         unused variable 'm'.
2112
2113 2010-04-16  Jakub Jelinek  <jakub@redhat.com>
2114
2115         PR bootstrap/43767
2116         * alias.c (memrefs_conflict_p): Don't crash if CSELIB_VAL_PTR is NULL.
2117
2118 2010-04-16  Doug Kwan  <dougkwan@google.com>
2119
2120         * tree-ssa-reassoc.c (struct operand_entry): Add new field ID.
2121         (next_operand_entry_id): New static variable.
2122         (sort_by_operand_rank): Stabilize qsort comparator by using unique IDs.
2123         (add_to_ops_vec): Assigned unique ID to operand entry.
2124         (struct oecount_s): New field ID.
2125         (oecount_cmp): Stabilize qsort comparotor by using unique IDs.
2126         (undistribute_ops_list): Assign unique IDs to oecounts.
2127         (init_reassoc): reset next_operand_entry_id.
2128
2129 2010-04-16  Doug Kwan  <dougkwan@google.com>
2130
2131         * config/i386/i386.md (*jcc_bt<mode>): Fix build breakage by adding
2132         missing left parenthesis.
2133
2134 2010-04-16  Uros Bizjak  <ubizjak@gmail.com>
2135
2136         * config/i386/i386.md (*bt<mode>): Macroize insn from *btsi and
2137         *btdi_rex64 using SWI48 mode iterator.
2138         (*jcc_bt<mode>): Ditto from *jcc_btsi and *jcc_btdi_rex64.
2139         (*jcc_bt<mode>_mask): Ditto from *jcc_btsi_mask and
2140         *jcc_btdi_mask_rex64.
2141
2142 2010-04-16  Anatoly Sokolov  <aesok@post.ru>
2143
2144         * double-int.h (tree_to_double_int): Convert to macro.
2145         * double-int.c (tree_to_double_int): Remove.
2146
2147 2010-04-16  Jakub Jelinek  <jakub@redhat.com>
2148
2149         PR debug/43762
2150         * dwarf2out.c (add_bound_info): Always call loc_list_from_tree
2151         with want_address 2 and in case a single element list might be
2152         possible, call it again with want_address 0.
2153
2154 2010-04-12  Kaushik Phatak  <kaushik.phatak@kpitcummins.com>
2155
2156         * config/h8300/h8300.c (print_operand) : Modify case 'V' and
2157         case 'W' print operands for HI mode.
2158         * config/h8300/h8300.h (Y0, Y2) : New constraints.
2159         * config/h8300/h8300.md (bclrqi_msx, bclrhi_msx): New patterns
2160         (bsetqi_msx, bsethi_msx, bnotqi_msx, bnothi_msx): Likewise.
2161         * config/h8300/predicate.md (bit_register_indirect_operand): New.
2162
2163         * config/h8300/h8300.h (OK_FOR_U): Support 'U' constraint for H8300SX.
2164
2165         * config/h8300/h8300.md (movqi_h8sx, movhi_h8sx, movsi_h8sx,
2166         cmphi_h8300hs_znvc, cmpsi, addhi3_h8sx) : Emit instructions in
2167         #xx:3 and #xx:4 mode.
2168
2169         * config/h8300/h8300.md (inverted load with HImode dest): Add
2170         support for H8300SX.
2171
2172         * config/h8300/predicate.md (bit_operand): Allow immediate values that
2173         satisfy 'U' constraint.
2174
2175 2010-04-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2176
2177         * configure.ac: Check for elf_getshdrstrndx or elf_getshstrndx flavor.
2178         * configure: Regenerate.
2179         * config.in: Regenerate.
2180         * doc/install.texi (Prerequisites): Document that Solaris 2 libelf
2181         works.
2182
2183 2010-04-16  Richard Guenther  <rguenther@suse.de>
2184
2185         * tree.h (struct tree_decl_minimal): Move pt_uid ...
2186         (struct tree_decl_common): ... here.
2187         (DECL_PT_UID): Adjust.
2188         (SET_DECL_PT_UID): Likewise.
2189         (DECL_PT_UID_SET_P): Likewise.
2190
2191 2010-04-16  Richard Guenther  <rguenther@suse.de>
2192
2193         PR tree-optimization/43572
2194         * tree-ssa-alias.h (call_may_clobber_ref_p): Declare.
2195         * tree-ssa-alias.c (call_may_clobber_ref_p): Export.
2196         * tree-flow.h (is_call_clobbered): Remove.
2197         * tree-flow-inline.h (is_call_clobbered): Likewise.
2198         * tree-dfa.c (dump_variable): Do not dump call clobber state.
2199         * tree-nrv.c (dest_safe_for_nrv_p): Use the alias oracle.
2200         (execute_return_slot_opt): Adjust.
2201         * tree-tailcall.c (suitable_for_tail_opt_p): Remove
2202         check for call clobbered vars here.
2203         (find_tail_calls): Move tailcall verification to the
2204         proper place.
2205
2206 2010-04-16  Diego Novillo  <dnovillo@google.com>
2207
2208         * doc/invoke.texi: Explain how are unrecognized -Wno- warnings handled.
2209
2210 2010-04-16  Bernd Schmidt  <bernds@codesourcery.com>
2211
2212         PR target/40603
2213         * config/arm/arm.md (cbranchqi4): New pattern.
2214         * config/arm/predicates.md (const0_operand,
2215         cbranchqi4_comparison_operator): New predicates.
2216
2217 2010-04-16  Richard Guenther  <rguenther@suse.de>
2218
2219         * gimple-pretty-print.c (dump_gimple_phi): Dump alias info.
2220         (dump_gimple_stmt): Likewise.
2221
2222 2010-04-16  Bernd Schmidt  <bernds@codesourcery.com>
2223
2224         * recog.h (struct recog_data): New field is_operator.
2225         (struct insn_operand_data): New field is_operator.
2226         * recog.c (extract_insn): Set recog_data.is_operator.
2227         * genoutput.c (output_operand_data): Emit code to set the
2228         is_operator field.
2229         * reload.c (find_reloads): Use it rather than testing for an
2230         empty constraint string.
2231
2232         PR target/41514
2233         * config/arm/arm.md (cbranchsi4_insn): Renamed from "*cbranchsi4_insn".
2234         If the previous insn is a cbranchsi4_insn with the same arguments,
2235         omit the compare instruction.
2236
2237         * config/arm/arm.md (addsi3_cbranch): If destination is a high
2238         register, inputs must be low registers and we need a low register
2239         scratch.  Handle alternative 2 like alternative 3.
2240
2241 2010-04-16  Jakub Jelinek  <jakub@redhat.com>
2242
2243         * alias.c (memrefs_conflict_p): If x and y are the same VALUE,
2244         don't call get_addr on both.  If one expression is a VALUE and
2245         the other a REG, check VALUE's locs if the REG isn't among them.
2246
2247 2010-04-16  Christian Bruel  <christian.bruel@st.com>
2248
2249         * config/sh/sh.h (sh_frame_pointer_required): New function.
2250         * config/sh/sh.h (TARGET_FRAME_POINTER_REQUIRED): New macro.
2251         (flag_omit_frame_pointer) Set.
2252         (MASK_ACCUMULATE_OUTGOING_ARGS) Define and Set.
2253         (rounded_frame_size): Adjust size with outgoing_args_size.
2254         (sh_set_return_address): Must return from stack pointer.
2255         * gcc/config/sh/sh.h (CAN_DEBUG_WITHOUT_FP): Define.
2256         (SUBTARGET_FRAME_POINTER_REQUIRED): Define.
2257         (ACCUMULATE_OUTGOING_ARGS): Define.
2258         * doc/invoke.texi (maccumulate-outgoing-args): Document for SH.
2259         * gcc/config/sh/sh.opt: (maccumulate-outgoing-args): New option.
2260
2261 2010-04-15  Kaz Kojima  <kkojima@gcc.gnu.org>
2262
2263         PR target/43471
2264         * config/sh/sh.c (sh_legitimize_reload_address): Use
2265         MAYBE_BASE_REGISTER_RTX_P instead of BASE_REGISTER_RTX_P.
2266         Remove a unneeded check for offset_base.
2267
2268 2010-04-15  H.J. Lu  <hongjiu.lu@intel.com>
2269
2270         * configure: Regenerated.
2271
2272 2010-04-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2273
2274         * config/s390/s390.c (s390_call_save_register_used): Switch back
2275         to HARD_REGNO_NREGS.
2276
2277 2010-04-15  Richard Guenther  <rguenther@suse.de>
2278
2279         * alias.c (alias_set_subset_of): Handle alias-set zero
2280         child properly.
2281
2282 2010-04-15  Mark Shinwell  <shinwell@codesourcery.com>
2283             Julian Brown  <julian@codesourcery.com>
2284
2285         * config/arm/thumb2.md (thumb2_movsi_insn): Split ldr and str
2286         alternatives according to use of high and low regs.
2287         * config/arm/vfp.md (thumb2_movsi_vfp): Likewise.
2288         * config/arm/arm.h (CONDITIONAL_REGISTER_USAGE): Use high regs when
2289         optimizing for size on Thumb-2.
2290
2291 2010-04-15  Thomas Schwinge  <tschwinge@gnu.org>
2292
2293         * config.gcc <i[34567]86-*-gnu*>: Handle softfp as for Linux.
2294
2295 2010-04-15  Richard Guenther  <rguenther@suse.de>
2296
2297         * tree-ssa-structalias.c (struct variable_info): Add
2298         is_fn_info flag.
2299         (new_var_info): Initialize it.
2300         (dump_constraints): Support printing last added constraints.
2301         (debug_constraints): Adjust.
2302         (dump_constraint_graph): Likewise.
2303         (make_heapvar_for): Check for NULL cfun.
2304         (get_function_part_constraint): New function.
2305         (get_fi_for_callee): Likewise.
2306         (find_func_aliases): Properly implement IPA PTA constraints.
2307         (process_ipa_clobber): New function.
2308         (find_func_clobbers): Likewise.
2309         (insert_into_field_list_sorted): Remove.
2310         (create_function_info_for): Properly allocate vars for IPA mode.
2311         Do not use insert_into_field_list_sorted.
2312         (create_variable_info_for): Properly generate constraints for
2313         global vars in IPA mode.
2314         (dump_solution_for_var): Always dump the solution.
2315         (set_uids_in_ptset): Initialize DECL_PT_UID if in ipa-mode.
2316         (find_what_var_points_to): Adjust.
2317         (pt_solution_set): Change.
2318         (pt_solution_ior_into): New function.
2319         (pt_solution_empty_p): Export.
2320         (pt_solution_includes_global): Adjust.
2321         (pt_solution_includes_1): Likewise.
2322         (pt_solutions_intersect_1): Likewise.
2323         (dump_sa_points_to_info): Check some invariants.
2324         (solve_constraints): Move constraint dumping ...
2325         (compute_points_to_sets): ... here.
2326         (ipa_pta_execute): ... and here.
2327         (compute_may_aliases): Do not re-compute points-to info
2328         locally if IPA info is available.
2329         (ipa_escaped_pt): New global var.
2330         (ipa_pta_execute): Properly implement IPA PTA.
2331         * tree-into-ssa.c (dump_decl_set): Support dumping
2332         decls not in referenced-vars.
2333         * tree-flow.h (struct gimple_df): Add ipa_pta flag.
2334         * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Adjust.
2335         (dump_points_to_solution): Likewise.
2336         * tree-dfa.c (dump_variable): Also dump DECL_PT_UID.
2337         * tree-inline.c (remap_ssa_name): Copy IPA points-to solution.
2338         (remap_gimple_stmt): Reset call clobber/use information if necessary.
2339         (copy_decl_to_var): Copy DECL_PT_UID.
2340         (copy_result_decl_to_var): Likewise.
2341         * tree.c (make_node_stat): Initialize DECL_PT_UID.
2342         (copy_node_stat): Copy it.
2343         * tree.h (DECL_PT_UID): New macro.
2344         (SET_DECL_PT_UID): Likewise.
2345         (DECL_PT_UID_SET_P): Likewise.
2346         (struct tree_decl_minimal): Add pt_uid member.
2347         * tree-ssa-alias.h (struct pt_solution): Add ipa_escaped flag.
2348         (pt_solution_empty_p): Declare.
2349         (pt_solution_set): Adjust.
2350         (ipa_escaped_pt): Declare.
2351         * cfgexpand.c (update_alias_info_with_stack_vars): Adjust.
2352         * gimple-pretty-print.c (pp_points_to_solution): New function.
2353         (dump_gimple_call): Dump call clobber/use information.
2354         * tree-dump.c (dump_option_value_in): Add TDF_ALIAS entry.
2355         * tree-pass.h (TDF_ALIAS): New dump option.
2356         * tree-pretty-print.c (dump_decl_name): Dump DECL_PT_UID if asked to.
2357         * doc/invoke.texi (-fipa-pta): Update documentation.
2358
2359 2010-04-15  Richard Guenther  <rguenther@suse.de>
2360
2361         * Makefile.in (OBJS-common): Add gimple-fold.o.
2362         (gimple-fold.o): New rule.
2363         * tree.h (maybe_fold_offset_to_reference,
2364         maybe_fold_offset_to_address, maybe_fold_stmt_addition): Move
2365         prototypes ...
2366         * gimple.h: ... here.
2367         * tree-flow.h (fold_stmt, fold_stmt_inplace, get_symbol_constant_value,
2368         may_propagate_address_into_dereference): Move prototypes ...
2369         * gimple.h: ... here.
2370         * tree-ssa-ccp.c (get_symbol_constant_value,
2371         may_propagate_address_into_dereference, maybe_fold_offset_to_array_ref,
2372         maybe_fold_offset_to_component_ref, maybe_fold_offset_to_reference,
2373         maybe_fold_offset_to_address, maybe_fold_stmt_indirect,
2374         maybe_fold_stmt_addition, maybe_fold_reference, get_maxval_strlen,
2375         ccp_fold_builtin, fold_gimple_assign, fold_gimple_cond,
2376         fold_gimple_call, fold_stmt_1, fold_stmt, fold_stmt_inplace,
2377         gimplify_and_update_call_from_tree): Move ...
2378         * gimple-fold.c: ... here.  New file.
2379         (ccp_fold_builtin): Rename to ...
2380         (gimple_fold_builtin): ... this.
2381         * tree-ssa-ccp.c (execute_fold_all_builtins): Adjust.
2382
2383 2010-04-15  Richard Guenther  <rguenther@suse.de>
2384
2385         * fold-const.c (LOWPART, HIGHPART, BASE, encode, decode,
2386         fit_double_type, force_fit_type_double, add_double_with_sign,
2387         neg_double, mul_double_with_sign, lshift_double, rshift_double,
2388         lrotate_double, rrotate_double, div_and_round_double): Move ...
2389         * double-int.c: ... here.
2390         * tree.h (force_fit_type_double, fit_double_type, add_double_with_sign,
2391         add_double, neg_double, mul_double_with_sign, mul_double,
2392         lshift_double, rshift_double, lrotate_double, rrotate_double,
2393         div_and_round_double): Move prototypes ...
2394         * double-int.h: ... here.
2395
2396 2010-04-15  Bernd Schmidt  <bernds@codesourcery.com>
2397
2398         PR target/43742
2399         * config/sh/sh.md (doloop_end_split, dect): Undo previous patch.  Use
2400         matching constraints to ensure inputs match the output.
2401
2402 2010-04-15  Kaz Kojima  <kkojima@gcc.gnu.org>
2403
2404         PR target/43742
2405         * config/sh/sh.md (doloop_end_split): Remove "+r" constraint
2406         in an input-only operand.
2407
2408 2010-04-15  Anatoly Sokolov  <aesok@post.ru>
2409
2410         * double-int.h (HOST_BITS_PER_DOUBLE_INT): Define.
2411         (double_int_not, double_int_lshift, double_int_rshift): Declare.
2412         (double_int_negative_p): Convert to static inline function.
2413         * double-int.c (double_int_lshift, double_int_lshift): New functions.
2414         (double_int_negative_p): Remove.
2415         * tree.h (lshift_double, rshift_double):
2416         * tree.c (build_low_bits_mask): Clean up, use double_int_* functions.
2417         * fold-const.c (fold_convert_const_int_from_real,
2418         fold_convert_const_int_from_fixed, div_if_zero_remainder): (Ditto.).
2419         (lshift_double): Change type of arith argument to bool.
2420         (rshift_double): Change type of arith argument to bool. Correct
2421         comment.
2422         * expmed.c (mask_rtx, lshift_value): (Ditto.).
2423
2424 2010-04-14  Bernd Schmidt  <bernds@codesourcery.com>
2425
2426         PR target/21803
2427         * ifcvt.c (cond_exec_process_if_block): Look for identical sequences
2428         at the start and end of the then/else blocks, and omit them from the
2429         conversion.
2430         * cfgcleanup.c (flow_find_cross_jump): No longer static.  Remove MODE
2431         argument; all callers changed.  Pass zero to old_insns_match_p instead.
2432         (flow_find_head_matching_sequence): New function.
2433         (old_insns_match_p): Check REG_EH_REGION notes for calls.
2434         * basic-block.h (flow_find_cross_jump,
2435         flow_find_head_matching_sequence): Declare functions.
2436
2437 2010-04-14  Jason Merrill  <jason@redhat.com>
2438
2439         PR c++/36625
2440         * c-common.c (attribute_takes_identifier_p): New fn.
2441         * c-common.h: Declare it.
2442
2443 2010-04-14  Uros Bizjak  <ubizjak@gmail.com>
2444
2445         * config/i386/i386.md (*divmod<mode>4): Remove stray "&&" from
2446         splitter condition.
2447         (*udivmod<mode>4): Ditto.
2448
2449 2010-04-14  Uros Bizjak  <ubizjak@gmail.com>
2450
2451         * config/i386/i386.md (maxmin_int): Rename code attribute from
2452         maxminiprefix and update all users.
2453         (maxmin_float): Ditto from maxminfprefix.
2454         (logic): Ditto from logicprefix.
2455         (absneg_mnemonic): Ditto from absnegprefix.
2456         * config/i386/mmx.md: Update all users of maxminiprefix,
2457         maxminfprefix and logicprefix for rename.
2458         * config/i386/sse.md: Ditto.
2459         * config/i386/sync.md (sync_<code><mode>): Update for
2460         logicprefix rename.
2461
2462 2010-04-14  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2463
2464         PR 42966
2465         * diagnostics.c (diagnostic_report_diagnostic): Mark specially
2466         warnings converted to errors.
2467
2468 2010-04-14  Uros Bizjak  <ubizjak@gmail.com>
2469
2470         * config/alpha/alpha.c (alpha_adjust_cost): Remove set but not
2471         used insn_type variable.
2472         (function_value): Add ATTRIBUTE_UNUSED to dummy variable declaration
2473         to avoid set-but-not-used warning.
2474
2475 2010-04-14  Uros Bizjak  <ubizjak@gmail.com>
2476
2477         * df-core.c (df_ref_debug): Change format string placeholder
2478         from 0x%x to %#x.
2479         * dwarf2asm.c (dw2_asm_output_data_raw,
2480         dw2_asm_output_data_uleb128_raw, dw2_asm_output_data_uleb128,
2481         dw2_asm_output_data_sleb128_raw, dw2_asm_output_data_sleb128): Ditto.
2482         * dwarf2out.c (output_cfi, output_cfi_directive,
2483         dwarf2out_do_cfi_startproc, output_loc_sequence_raw,
2484         output_cfa_loc_raw, output_die, output_ranges, output_file_names):
2485         Ditto.
2486         * genattrtab.c (write_test_expr, write_attr_valueq): Ditto.
2487         * print-rtl.c (print_rtx): Ditto.
2488
2489 2010-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
2490
2491         PR middle-end/42694
2492         * builtins.c (expand_builtin_pow_root): New function to expand pow
2493         calls with exponents 0.25, 0.50, 0.75, 1./3., and 1./6. into a
2494         series of sqrt and cbrt calls under -ffast-math.
2495         (expand_builtin_pow): Call it.
2496
2497 2010-04-14  Michael Matz  <matz@suse.de>
2498
2499         PR tree-optimization/42963
2500         * tree-cfg.c (touched_switch_bbs): New static variable.
2501         (group_case_labels_stmt): New function broken out from ...
2502         (group_case_labels): ... here, use the above.
2503         (start_recording_case_labels): Allocate touched_switch_bbs.
2504         (end_recording_case_labels): Deallocate it, call
2505         group_case_labels_stmt.
2506         (gimple_redirect_edge_and_branch): Remember index of affected BB.
2507
2508 2010-04-14  Uros Bizjak  <ubizjak@gmail.com>
2509
2510         * config/i386/i386.md (*popcountsi2_cmp_zext): Remove mode attribute
2511         from insn template.
2512
2513 2010-04-14  Uros Bizjak  <ubizjak@gmail.com>
2514
2515         * config/i386/i386.md (*ashlqi3_1_slp): New insn pattern.
2516
2517 2010-04-13  Jan Hubicka  <jh@suse.cz>
2518
2519         * ipa-inline.c (cgraph_mark_inline_edge): Avoid double accounting
2520         of optimized out static functions.
2521         (cgraph_edge_badness): Add DUMP parameter and dump reasons for the
2522         cost computation.  Also sanity check for overflows.
2523         (update_caller_keys): Update cgraph_edge_badness call; properly
2524         update fibheap and sanity check that it is up to date.
2525         (add_new_edges_to_heap): Update cgraph_edge_badness.
2526         (cgraph_decide_inlining_of_small_function): Likewise;
2527         add sanity checking that badness in heap is up to date;
2528         improve dumping of reason; Update badness of calls to the
2529         offline copy of function currently inlined; dump badness
2530         of functions not inlined because of unit growth limits.
2531
2532 2010-04-13  Eric Botcazou  <ebotcazou@adacore.com>
2533
2534         PR middle-end/32628
2535         * c-common.c (pointer_int_sum): Disregard overflow that occured only
2536         because of sign-extension change when converting to sizetype here...
2537         * fold-const.c (fold_convert_const_int_from_int): ...and not here.
2538
2539         * fold-const.c (fold_binary_op_with_conditional_arg): Do not restrict
2540         the folding to constants.  Remove redundant final conversion.
2541         (fold_binary) <associate>: Do not associate if the re-association of
2542         constants alone overflows.
2543         (fold_binary) <FLOOR_MOD_EXPR>: Move transformation into BIT_AND_EXPR
2544         to the end of the list.
2545         (multiple_of_p) <COND_EXPR>: New case.
2546
2547 2010-04-13  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2548
2549         * opt-functions.awk (opt_sanitized_name): New.
2550         (opt_enum): New.
2551         * optc-gen.awk: Use it
2552         * opth-gen.awk: Use it.
2553
2554 2010-04-13  Martin Jambor  <mjambor@suse.cz>
2555
2556         * tree-sra.c (replace_uses_with_default_def_ssa_name): New function.
2557         (sra_modify_assign): Delete stmts loading dead data even if racc has no
2558         children.  Call replace_uses_with_default_def_ssa_name to handle
2559         SSA_NAES on lhs.
2560
2561 2010-04-13  Michael Matz  <matz@suse.de>
2562
2563         PR middle-end/43730
2564         * builtins.c (expand_builtin_interclass_mathfn): Also create
2565         a register if the predicate doesn't match.
2566
2567 2010-04-13  Diego Novillo  <dnovillo@google.com>
2568
2569         * Makefile.in (c-pch.o, ggc-common.o): Depend on timevar.h.
2570         * c-pch.c: Include timevar.h.
2571         (c_common_write_pch): Use TV_PCH_SAVE and TV_PCH_CPP_SAVE timers.
2572         (c_common_read_pch): Use TV_PCH_RESTORE and TV_PCH_CPP_RESTORE timers.
2573         * ggc-common.c: Include timevar.h.
2574         (gt_pch_save): Use TV_PCH_PTR_REALLOC and TV_PCH_PTR_SORT timers.
2575         * timevar.def (TV_PCH_SAVE): Define.
2576         (TV_PCH_CPP_SAVE): Define.
2577         (TV_PCH_PTR_REALLOC): Define.
2578         (TV_PCH_PTR_SORT): Define.
2579         (TV_PCH_RESTORE): Define.
2580         (TV_PCH_CPP_RESTORE): Define.
2581
2582 2010-04-13  Michael Matz  <matz@suse.de>
2583
2584         * tree-ssa-reassoc.c (repropagate_negates): Merge negates also
2585         into MINUS_EXPRs.
2586         (can_reassociate_p): New function.
2587         (break_up_subtract_bb, reassociate_bb): Use it.
2588
2589 2010-04-13  Richard Guenther  <rguenther@suse.de>
2590
2591         PR bootstrap/43737
2592         * builtins.c (c_readstr): Fix assert.
2593
2594 2010-04-13  Uros Bizjak  <ubizjak@gmail.com>
2595
2596         * config/i386/i386.md (extendsidi2 splitter): Also check for DX_REG
2597         when generating cltd insn.
2598
2599         (*ashl<mode>3_1): Remove special handling for register operand 2.
2600         (*ashlsi3_1_zext): Ditto.
2601         (*ashlhi3_1): Ditto.
2602         (*ashlhi3_1_lea): Ditto.
2603         (*ashlqi3_1): Ditto.
2604         (*ashlqi3_1_lea): Ditto.
2605         (*<shiftrt_insn><mode>3_1): Ditto.
2606         (*<shiftrt_insn>si3_1_zext): Ditto.
2607         (*<shiftrt_insn>qi3_1_slp): Ditto.
2608         (*<rotate_insn><mode>3_1): Ditto.
2609         (*<rotate_insn>si3_1_zext): Ditto.
2610         (*<rotate_insn>qi3_1_slp): Ditto.
2611
2612 2010-04-13  Richard Guenther  <rguenther@suse.de>
2613
2614         * tree-ssa-structalias.c (callused_id): Remove.
2615         (call_stmt_vars): New.
2616         (get_call_vi): Likewise.
2617         (lookup_call_use_vi): Likewise.
2618         (lookup_call_clobber_vi): Likewise.
2619         (get_call_use_vi): Likewise.
2620         (get_call_clobber_vi): Likewise.
2621         (make_transitive_closure_constraints): Likewise.
2622         (handle_const_call): Adjust to do per-call call-used handling.
2623         (handle_pure_call): Likewise.
2624         (find_what_var_points_to): Remove general callused handling.
2625         (init_base_vars): Likewise.
2626         (init_alias_vars): Initialize call_stmt_vars.
2627         (compute_points_to_sets): Process call-used and call-clobbered
2628         vars for call statements.
2629         (delete_points_to_sets): Free call_stmt_vars.
2630
2631 2010-04-13  Richard Guenther  <rguenther@suse.de>
2632
2633         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
2634         Only add RW dependence for dependence distance zero.
2635         Adjust maximal vectorization factor according to dependences.
2636         Move alignment handling ...
2637         (vect_find_same_alignment_drs): ... here.  New function.
2638         (vect_analyze_data_ref_dependences): Adjust.
2639         (vect_analyze_data_refs_alignment): Call vect_find_same_alignment_drs.
2640         (vect_analyze_data_refs): Adjust minimal vectorization factor
2641         according to data references.
2642         * tree-vect-loop.c (vect_analyze_loop): Analyze data-ref
2643         dependences before determining the vectorization factor.
2644         Analyze alignment after determining the vectorization factor.
2645         * tree-vect-slp.c ((vect_slp_analyze_bb): Analyze data-ref
2646         dependences before alignment.
2647         * tree-vectorizer.h (vect_analyze_data_ref_dependences):
2648         Adjust prototype.
2649         (vect_analyze_data_refs): Likewise.
2650         (MAX_VECTORIZATION_FACTOR): New define.
2651
2652 2010-04-13  Duncan Sands  <baldrick@free.fr>
2653
2654         * except.h (lang_eh_type_covers): Remove.
2655         * except.c (lang_eh_type_covers): Likewise.
2656
2657 2010-04-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2658             Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
2659
2660         * gcc/config/s390/s390.md: Replace TARGET_64BIT with TARGET_ZARCH.
2661         * gcc/config/s390/s390.c: Replace UNTIS_PER_WORD with
2662         UNITS_PER_LONG where it is ABI relevant.
2663         (s390_return_addr_rtx): Likewise.
2664         (s390_back_chain_rtx): Likewise.
2665         (s390_frame_area): Likewise.
2666         (s390_frame_info): Likewise.
2667         (s390_initial_elimination_offset): Likewise.
2668         (save_gprs): Likewise.
2669         (s390_emit_prologue): Likewise.
2670         (s390_emit_epilogue): Likewise.
2671         (s390_function_arg_advance): Likewise.
2672         (s390_function_arg): Likewise.
2673         (s390_va_start): Likewise.
2674         (s390_gimplify_va_arg): Likewise.
2675         (s390_function_profiler): Likewise.
2676         (s390_optimize_prologue): Likewise.
2677         (s390_rtx_costs): Likewise.
2678         (s390_secondary_reload): Likewise.
2679         (s390_promote_function_mode): Likewise.
2680         (s390_hard_regno_mode_ok): Replace TARGET_64BIT with TARGET_ZARCH.
2681         (s390_scalar_mode_supported_p): Disallow TImode if no 64 bit
2682         registers available.
2683         (s390_unwind_word_mode): New function.
2684         (s390_function_value): Split 64 bit values into register pair if
2685         used as return value.
2686         (s390_call_saved_register_used): Don't use HARD_REGNO_NREGS for
2687         function call parameters.  Handle parallels.
2688         (TARGET_SCALAR_MODE_SUPPORTED_P): New macro.
2689         (HARD_REGNO_CALL_PART_CLOBBERED): New macro.
2690         (DWARF_CIE_DATA_ALIGNMENT): New macro.
2691         (s390_expand_setmem): Remove unused variable src_addr.
2692         * gcc/longlong.h: Make smul_ppmm and sdiv_qrnnd inline asms to
2693         deal with 64 bit registers.
2694         * gcc/config/s390/s390.h: Define __zarch__ predefined macro.
2695         Replace UNITS_PER_WORD with UNITS_PER_LONG where it is ABI relevant.
2696         (UNITS_PER_LONG): New macro.
2697         * libjava/include/s390-signal.h: Define extended ucontext
2698         structure containing the upper halfs of the 64 bit registers.
2699
2700 2010-04-13  Simon Baldwin  <simonb@google.com>
2701
2702         * cfgexpand.c (gimple_expand_cfg): Clarify warning message text.
2703
2704 2010-04-13  Eric Botcazou  <ebotcazou@adacore.com>
2705
2706         * gimple.c (walk_gimple_op) <GIMPLE_ASSIGN>: Do not request a pure
2707         rvalue on the RHS if the LHS is of a non-renamable type.
2708         * tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Fold result.
2709
2710 2010-04-13  Matthias Klose  <doko@ubuntu.com>
2711
2712         * gcc.c (cc1_options): Handle -iplugindir before processing
2713         the cc1 spec. Only add -iplugindir once.
2714         (cpp_unique_options): Add -iplugindir option if -fplugin* options
2715         found.
2716         * common.opt (iplugindir): Remove `Separate' property, initialize.
2717         * plugin.c (default_plugin_dir_name): Error with missing -iplugindir
2718         option.
2719         * Makefile.in (check-%, check-parallel-%): Create plugin dir.
2720         (distclean): Remove plugin dir.
2721         * doc/invoke.texi: Document -iplugindir.
2722
2723 2010-04-13  Basile Starynkevitch  <basile@starynkevitch.net>
2724
2725         * doc/plugins.texi (Loading Plugins): Document short
2726         -fplugin=foo option.
2727         (Plugin API): Mention default_plugin_dir_name function.
2728
2729         * gcc.c (find_file_spec_function): Add new declaration.
2730         (static_spec_func): Use it for "find-file".
2731         (find_file_spec_function): Add new function.
2732         (cc1_options): Add -iplugindir option if -fplugin* options found.
2733
2734         * gcc-plugin.h (default_plugin_dir_name): Added new declaration.
2735
2736         * plugin.c (add_new_plugin): Updated comment, and handle short
2737         plugin name.
2738         (default_plugin_dir_name): Added new function.
2739
2740         * common.opt (iplugindir): New option to set the plugin directory.
2741
2742 2010-04-12  Uros Bizjak  <ubizjak@gmail.com>
2743
2744         * config/i386/i386.md (any_rotate): New code iterator.
2745         (rotate_insn): New code attribute.
2746         (rotate): Ditto.
2747         (SWIM124): New mode iterator.
2748         (<rotate_insn>ti3): New expander.
2749         (<rotate_insn>di3): Macroize expander from {rotl,rotr}di3 using
2750         any_rotate code iterator.
2751         (<rotate_insn><mode>3) Macroize expander from {rotl,rotr}{qi,hi,si}3
2752         using any_rotate code iterator and SWIM124 mode iterator.
2753         (ix86_rotlti3): New insn_and_split pattern.
2754         (ix86_rotrti3): Ditto.
2755         (ix86_rotl<dwi>3_doubleword): Macroize insn_and_split pattern from
2756         ix86_rotl{di,ti}3 patterns.
2757         (ix86_rotr<dwi>3_doubleword): Ditto from ix86_rotr{di,ti}3 patterns.
2758         (*<rotate_insn><mode>3_1): Merge with *{rotl,rotr}{qi,hi,si}3_1_one_bit
2759         and *{rotl,rotr}di3_1_one_bit_rex64. Macroize insn from
2760         *{rotl,rotr}{qi,hi,si}3_1 and *{rotl,rotr}di3_1_rex64 using any_rotate
2761         code iterator and SWI mode iterator.
2762         (*<rotate_insn>si3_1_zext): Merge with *{rotl,rotr}si3_1_one_bit_zext.
2763         Macroize insn from {rotl,rotr}si3_1_zext using any_rotate
2764         code iterator.
2765         (*<rotate_insn>qi3_1_slp): Merge with *{rotl,rotr}qi3_1_one_bit_slp.
2766         Macroize insn from {rotl,rotr}qi3_1_slp using any_rotate code iterator.
2767         (bswap rotatert splitter): Add splitter.
2768         (bswap splitter): Macroize splitter using any_rotate code iterator.
2769         Add insn predicate to split only for TARGET_USE_XCHGB or when
2770         optimizing function for size.
2771
2772 2010-04-12  Steve Ellcey  <sje@cup.hp.com>
2773
2774         * config/pa/pa.c (emit_move_sequence): Remove use of
2775         deleted variable flag_argument_noalias.
2776
2777 2010-04-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2778
2779         * config.gcc: Removed *-*-solaris2.7* from list of obsolete
2780         configurations.
2781         Add to unsupported targets list.
2782         * configure.ac (gcc_cv_as_tls): Removed i[34567]86-*-solaris2.[567]*,
2783         sparc*-sun-solaris2.[567]* from target lists.
2784         * configure: Regenerate.
2785         * doc/install.texi (Specific, *-*-solaris2*): Document Solaris 7
2786         removal.
2787         Remove Solaris 7 patch references.
2788         (Specific, sparc-sun-solaris2.7): Removed.
2789         (sparc-sun-solaris2*): Update Solaris 7 example.
2790         (sparc64-*-solaris2*): Likewise.
2791
2792 2010-04-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2793
2794         * config.build (alpha*-dec-osf4*): Remove.
2795         * config.gcc: Remove alpha*-dec-osf4*, alpha-dec-osf5.0* from list
2796         of obsolete configurations.
2797         (alpha*-dec-osf[45]*): Remove alpha*-dec-osf4*, alpha-dec-osf5.0*
2798         support.
2799         * config/alpha/t-osf4: Renamed to ...
2800         * config/alpha/t-osf5: ... this.
2801         * config/alpha/osf.h: Renamed to ...
2802         * config/alpha/osf5.h: ... this.
2803         Merged old osf5.h contents.
2804         Update comments.
2805         (ASM_SPEC): Use ASM_OLDAS_SPEC directly.
2806         (EXTRA_SPECS): Removed.
2807         * doc/install.texi (Specific, alpha*-dec-osf5.1): Renamed to
2808         reflect removal of Tru64 UNIX V4.0/V5.0 support.
2809         Document that.
2810
2811 2010-04-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2812
2813         * doc/contrib.texi (Contributors, Rainer Orth): Update.
2814
2815 2010-04-12  Kai Tietz  <kai.tietz@onevision.com>
2816
2817         PR/43702
2818         * config/i386/i386.c (x86_this_parameter): Handle aggregate for
2819         __thiscall convention.
2820
2821 2010-04-12  Steve Ellcey  <sje@cup.hp.com>
2822
2823         * config/pa/pa.c (hppa_legitimize_address): Remove unused variable
2824         orig_base.
2825         * config/pa/pa.md (call, call_value): Remove unused variable call_insn.
2826
2827 2010-04-12  Steve Ellcey  <sje@cup.hp.com>
2828
2829         * function.c (assign_parms_initialize_all): Add unused attribute
2830         to fntype.
2831
2832 2010-04-12  Richard Guenther  <rguenther@suse.de>
2833
2834         * gsstruct.def (GSS_CALL): New.
2835         * gimple.def (GIMPLE_CALL): Change to GSS_CALL.
2836         * gimple.h: Include tree-ssa-alias.h.
2837         (struct gimple_statement_call): New.
2838         (union gimple_statement_struct_d): Add gimple_call member.
2839         (gimple_call_reset_alias_info): Declare.
2840         (gimple_call_use_set): New function.
2841         (gimple_call_clobber_set): Likewise.
2842         * Makefile.in (GIMPLE_H): Add tree-ssa-alias.h.
2843         * gimple.c (gimple_call_reset_alias_info): New function.
2844         (gimple_build_call_1): Call it.
2845         * lto-streamer-in.c (input_gimple_stmt): Likewise.
2846         * tree-inline.c (remap_gimple_stmt): Likewise.
2847         (expand_call_inline): Remove callused handling.
2848         * cfgexpand.c (update_alias_info_with_stack_vars): Likewise.
2849         * tree-dfa.c (dump_variable): Likewise.
2850         * tree-parloops.c (parallelize_loops): Likewise.
2851         * tree-ssa.c (init_tree_ssa): Likewise.
2852         (delete_tree_ssa): Likewise.
2853         * tree-flow-inline.h (is_call_used): Remove.
2854         * tree-flow.h (struct gimple_df): Remove callused member.
2855         * tree-nrv.c (dest_safe_for_nrv_p): Adjust predicate.
2856         * tree-ssa-alias.c (dump_alias_info): Remove callused handling.
2857         (ref_maybe_used_by_call_p_1): Simplify.
2858         (call_may_clobber_ref_p_1): Likewise.
2859         * tree-ssa-structalias.c (compute_points_to_sets): Set
2860         the call stmt used and clobbered sets.
2861         * tree-tailcall.c (suitable_for_tail_opt_p): Adjust predicate.
2862         (find_tail_calls): Verify the tail call.
2863
2864 2010-04-12  Richard Guenther  <rguenther@suse.de>
2865
2866         * ipa.c (cgraph_postorder): Adjust postorder to guarantee
2867         single-iteration always-inline inlining.
2868         * ipa-inline.c (cgraph_mark_inline): Do not return anything.
2869         (cgraph_decide_inlining): Do not handle always-inline specially.
2870         (try_inline): Remove always-inline cycle detection special case.
2871         Do not recurse on always-inlines.
2872         (cgraph_early_inlining): Do not iterate if not optimizing.
2873         (cgraph_gate_early_inlining): remove.
2874         (pass_early_inline): Run unconditionally.
2875         (gate_cgraph_decide_inlining): New function.
2876         (pass_ipa_inline): Use it.  Do not run the IPA inliner if
2877         not inlining or optimizing.
2878         (cgraph_decide_inlining_of_small_functions): Also consider
2879         always-inline functions.
2880         (cgraph_default_inline_p): Return true for nodes which should
2881         disregard inline limits.
2882         (estimate_function_body_sizes): Assume zero size and time for
2883         nodes which are marked as disregarding inline limits.
2884         (cgraph_decide_recursive_inlining): Do not perform recursive
2885         inlining on always-inline nodes.
2886
2887 2010-04-12  Jakub Jelinek  <jakub@redhat.com>
2888
2889         PR bootstrap/43699
2890         * c-typeck.c (c_process_expr_stmt): Call mark_exp_read even
2891         for exprs satisfying handled_component_p.
2892
2893 2010-04-12  Eric Botcazou  <ebotcazou@adacore.com>
2894
2895         * expr.c (categorize_ctor_elements_1): Properly count sub-elements of
2896         non-constant aggregate elements.
2897
2898         * gimplify.c (gimplify_init_constructor): Do not pre-evaluate if this
2899         is a real initialization.
2900
2901 2010-04-12  Shujing Zhao  <pearly.zhao@oracle.com>
2902
2903         PR c/36774
2904         * c-decl.c (start_function): Move forward check for nested function.
2905
2906 2010-04-11  Kaz Kojima  <kkojima@gcc.gnu.org>
2907
2908         * config/sh/sh-protos.h (sh_legitimize_reload_address): Declare.
2909         * config/sh/sh.c: Include reload.h.
2910         (sh_legitimize_reload_address): New.
2911         * config/sh/sh.h (LEGITIMIZE_RELOAD_ADDRESS): Use
2912         sh_legitimize_reload_address.
2913
2914 2010-04-11  Kaushik Phatak  <kaushik.phatak@kpitcummins.com>
2915
2916         * config/sh/sh.md (*movqi_pop): New insn pattern.
2917         * config/sh/predicates.md (sh_no_delay_pop_operand): New predicate.
2918
2919 2010-04-11  Uros Bizjak  <ubizjak@gmail.com>
2920
2921         * config/i386/i386.md (any_shiftrt): New code iterator.
2922         (shiftrt_insn): New code attribute.
2923         (shiftrt): Ditto.
2924         (<shiftrt_insn><mode>3): Macroize expander from {ashr,lshr}<mode>3
2925         using any_shiftrt code iterator.
2926         (*<shiftrt_insn><mode>3_doubleword): Macroize insn_and_split from
2927         *{ashr,lshr}<mode>3_doubleword using any_shiftrt code iterator.
2928         (*<shiftrt_insn><mode>3_doubleword peephole2): Macroize peephole2
2929         pattern from corresponding peephole2 patterns.
2930         (*<shiftrt_insn><mode>3_1): Macroize insn from *{ashr,lshr}<mode>3_1
2931         using any_shiftrt code iterator.
2932         (*<shiftrt_insn>si3_1_zext): Ditto from *{ashr,lshr}si3_1_zext.
2933         (*<shiftrt_insn>qi3_1_slp): Ditto from *{ashr,lshr}qi3_1_slp.
2934         (*<shiftrt_insn><mode>3_cmp): Ditto from *{ashr,lshr}<mode>3_cmp.
2935         (*<shiftrt_insn><mode>3_cmp_zext): Ditto from
2936         *{ashr,lshr}<mode>3_cmp_zext.
2937         (*<shiftrt_insn><mode>3_cconly): Ditto from *{ashr,lshr}<mode>3_cconly.
2938
2939 2010-04-11  Uros Bizjak  <ubizjak@gmail.com>
2940
2941         * config/i386/i386.md (*ashr<mode>3_cconly): Fix wrong mode of
2942         scratch register.
2943         (*lshr<mode>3_cconly): Ditto.
2944
2945 2010-04-11  Uros Bizjak  <ubizjak@gmail.com>
2946
2947         * config/i386/i386.md (lshr<mode>3): Macroize expander from
2948         lshr{qi,hi,si,di,ti}3_1 using SDWIM mode iterator.
2949         (*lshr<mode>3_doubleword): New insn_and_split_pattern.  Macroize
2950         pattern from *lshr{di,ti}3_1 and corresponding splitters using
2951         DWI mode iterator.
2952         (*lshr<mode>3_doubleword peephole2): Macroize peephole2 pattern
2953         from corresponding peephole2 patterns.
2954         (*lshr<mode>3_1): Merge with *lshr{qi,hi,si}3_1_one_bit and
2955         *lshrdi3_1_one_bit_rex64. Macroize insn from *lshr{qi,hi,si}3_1
2956         and *lshrdi3_1_rex64 using SWI mode iterator.
2957         (*lshrsi3_1_zext): Merge with *lshrsi3_1_one_bit_zext.
2958         (*lshrqi3_1_slp): Merge with *lshrqi3_1_one_bit_slp.
2959         (*lshr<mode>3_cmp): Merge with *lshr{qi,hi,si}3_one_bit_cmp and
2960         *lshrdi3_one_bit_cmp_rex64. Macroize insn from *lshr{qi,hi,si}3_cmp
2961         and *lshrdi3_cmp_rex64 using SWI mode iterator.
2962         (*lshrsi3_cmp_zext): Merge with *lshrsi3_cmp_one_bit_zext.
2963         (*lshr<mode>3_cconly): Merge with *lshr{qi,hi,si}3_one_bit_cconly and
2964         *lshrdi3_one_bit_cconly_rex64. Macroize insn from
2965         *lshr{qi,hi,si}3_cconly and *lshrdi3_cconly_rex64 using
2966         SWI mode iterator.
2967
2968 2010-04-10  Uros Bizjak  <ubizjak@gmail.com>
2969
2970         * config/i386/i386.md (ashr<mode>3): Macroize expander from
2971         ashr{qi,hi,si,di,ti}3_1 using SDWIM mode iterator.
2972         (*ashr<mode>3_doubleword): New insn_and_split_pattern.  Macroize
2973         pattern from *ashr{di,ti}3_1 and corresponding splitters using
2974         DWI mode iterator.
2975         (*ashr<mode>3_doubleword peephole2): Macroize peephole2 pattern
2976         from corresponding peephole2 patterns.
2977         (ashrdi3_cvt): Rename from ashrdi3_63_rex64.
2978         (ashrsi3_cvt): Rename from ashrsi3_31.
2979         (*ashrsi3_cvt_zext): Rename from *ashrsi3_31_zext.
2980         (x86_shift<mode>_adj_3): Macroize expander from x86_shift_adj_3
2981         and x86_64_shift_adj_3 using SWI48 mode iterator.
2982         (*ashr<mode>3_1): Merge with *ashr{qi,hi,si}3_1_one_bit and
2983         *ashrdi3_1_one_bit_rex64. Macroize insn from *ashr{qi,hi,si}3_1
2984         and *ashrdi3_1_rex64 using SWI mode iterator.
2985         (*ashrsi3_1_zext): Merge with *ashrsi3_1_one_bit_zext.
2986         (*ashrqi3_1_slp): Merge with *ashrqi3_1_one_bit_slp.
2987         (*ashr<mode>3_cmp): Merge with *ashr{qi,hi,si}3_one_bit_cmp and
2988         *ashrdi3_one_bit_cmp_rex64. Macroize insn from *ashr{qi,hi,si}3_cmp
2989         and *ashrdi3_cmp_rex64 using SWI mode iterator.
2990         (*ashrsi3_cmp_zext): Merge with *ashrsi3_cmp_one_bit_zext.
2991         (*ashr<mode>3_cconly): Merge with *ashr{qi,hi,si}3_one_bit_cconly and
2992         *ashrdi3_one_bit_cconly_rex64. Macroize insn from
2993         *ashr{qi,hi,si}3_cconly and *ashrdi3_cconly_rex64 using
2994         SWI mode iterator.
2995         (sign_extend splitters): Update for renamed ashr{di,si}3_cvt patterns.
2996         * config/i386/i386.c (ix86_split_ashr): Update for renamed
2997         x86_shift<mode>_adj_3 expanders.
2998
2999 2010-04-10  Wei Guozhi  <carrot@google.com>
3000
3001         PR target/42601
3002         * config/arm/arm.c (arm_pic_static_addr): New function.
3003         (legitimize_pic_address): Call arm_pic_static_addr when it detects
3004         a static symbol.
3005         (arm_output_addr_const_extra): Output expression for new pattern.
3006         * config/arm/arm.md (UNSPEC_SYMBOL_OFFSET): New unspec symbol.
3007
3008 2010-04-10  Bernd Schmidt  <bernds@codesourcery.com>
3009
3010         * ira-costs.c (record_reg_classes): Ignore alternatives that are
3011         not enabled.
3012
3013         * Makefile.in (web.o): Depend on insn-config.h and $(RECOG_H).
3014         * web.c: Include "insn-config.h" and "recog.h".
3015         (union_match_dups): New function.
3016         (web_main): Call it.
3017         (union_defs): Don't try to recognize match_dups.
3018
3019         * reload1.c (eliminate_regs_in_insn): Don't restore an operand
3020         if doing so would replace the entire pattern.
3021
3022 2010-04-09  Uros Bizjak  <ubizjak@gmail.com>
3023
3024         PR target/43707
3025         PR target/43709
3026         * config/i386/i386.md (*ashl<mode>3_doubleword): Split to insn
3027         and splitter pattern.  Change splitter operand 1 predicate to
3028         nonmemory_operand.
3029
3030 2010-04-09  Martin Jambor  <mjambor@suse.cz>
3031
3032         * ipa-cp.c (ipcp_lats_are_equal): Return true also if the two
3033         lattices are addresses of CONST_DECLs with the same initial value.
3034         (ipcp_print_all_lattices): Print values of CONST_DECLs.
3035         * ipa-prop.c (ipa_print_node_jump_functions): Likewise.
3036
3037 2010-04-09  Eric Botcazou  <ebotcazou@adacore.com>
3038             Bernd Schmidt  <bernds@codesourcery.com>
3039
3040         * loop-invariant.c (replace_uses): New static function.
3041         (move_invariant_reg): Use it to ensure we can replace the uses.
3042
3043 2010-04-09  Hariharan Sandanagobalane  <hariharan@picochip.com>
3044
3045         * config/picochip/picochip.c (picochip_rtx_costs): Use correct
3046         function template.
3047         (picochip_override_options): Enable section anchors only above -O1.
3048         (picochip_reorg): Fixed a couple of build warnings.
3049
3050 2010-04-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3051
3052         * configure.ac (plugin -rdynamic test): Log result.
3053         * configure: Regenerate.
3054         * config/sol2.h (LINK_SPEC): Handle -rdynamic.
3055         (RDYNAMIC_SPEC): Define.
3056         * config/sol2-gld.h (RDYNAMIC_SPEC): Redefine.
3057
3058 2010-04-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3059
3060         * configure.ac: Determine Sun ld version numbers.
3061         (comdat_group): Restrict GNU ld version checks to gld.
3062         (comdat_group, *-*-solaris2.1[1-9]*): Enable for Sun ld > 1.1688.
3063         (enable_comdat): Support --enable-comdat.
3064         * configure: Regenerate.
3065         * doc/install.texi (Configuration): Document --enable-comdat.
3066
3067 2010-04-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3068
3069         * config/sparc/sol2-gld.h: Remove SPARC reference.  Rename ...
3070         * config/sol2-gld.h: ... here.
3071         * config.gcc (sparc*-*-solaris2*): Reflect this.
3072         (i[34567]86-*-solaris2*): Use it.
3073
3074 2010-04-09  Steve Ellcey  <sje@cup.hp.com>
3075
3076         * config/ia64/ia64.c (ia64_dfa_new_cycle): Remove unused variable
3077         setup_clocks_p.
3078         (final_emit_insn_group_barriers): Remove unused variable prev_insn.
3079
3080 2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3081
3082         PR 42965
3083         * diagnostic.c (diagnostic_initialize): Initialize
3084         some_warnings_are_errors.
3085         (diagnostic_finish): New.
3086         (diagnostic_action_after_output): Call it before exiting.
3087         (diagnostic_report_diagnostic): Do not print message here. Set
3088         some_warnings_are_errors.
3089         * diagnostic.h (diagnostic_context): Delete
3090         issue_warnings_are_errors_message. Add some_warnings_are_errors.
3091         (diagnostic_finish): Declare.
3092         * toplev.c (toplev_main): Call it before exit.
3093
3094 2010-04-09  Jason Merrill  <jason@redhat.com>
3095
3096         PR c++/42623
3097         * c-common.c (c_sizeof_or_alignof_type): Return error_mark_node
3098         for incomplete type.
3099
3100         PR c++/41788
3101         * stor-layout.c (finalize_record_size): Don't change TYPE_PACKED
3102         based on a warning flag.
3103
3104 2010-04-09  Richard Guenther  <rguenther@suse.de>
3105
3106         * tree-pretty-print.c (dump_generic_node): Dump TYPE_VECTOR_SUBPARTS.
3107
3108 2010-04-09  Iain Sandoe  <iains@gcc.gnu.org>
3109
3110         PR bootstrap/43684
3111         * varasm.c (default_assemble_visibility): Wrap vars that are
3112         set, but unused, by targets without GAS.
3113         * config/rs6000/rs6000.c: (paired_emit_vector_compare):
3114         Remove set, but unused, vars.
3115         (rs6000_legitimize_tls_address): Likewise.
3116         (altivec_expand_dst_builtin): Likewise.
3117         * config/darwin.c (machopic_classify_symbol): Likewise.
3118         (machopic_indirection_name): Likewise.
3119
3120 2010-04-09  Uros Bizjak  <ubizjak@gmail.com>
3121
3122         * config/i386/i386.md (DWI): New mode iterator.
3123         (S): New mode attribute.
3124         (shift_operand): Ditto.
3125         (shift_immediate_operand): Ditto.
3126         (ashl_input_operand): Ditto.
3127         (ashl<mode>3): Macroize expander from ashl{qi,hi,si,di,ti}3_1
3128         using SDWIM mode iterator.
3129         (*ashl<mode>3_doubleword): New insn_and_split_pattern.  Macroize
3130         pattern from *ashl{di,ti}3_1 and corresponding splitters using
3131         DWI mode iterator.
3132         (*ashl<mode>3_doubleword peephole2): Macroize peephole2 pattern
3133         from corresponding peephole2 patterns.
3134         (x86_shift<mode>_adj_1): Macroize expander from x86_shift_adj_1
3135         and x86_64_shift_adj_1 using SWI48 mode iterator.
3136         (x86_shift<mode>_adj_2): Ditto.
3137         (*ashldi3_1_rex64): Split TYPE_LEA pattern.
3138         (*ashl<mode>3_1): Macroize insn from *ashlsi3_1 and *ashldi3_1_rex64
3139         using SWI48 mode iterator.
3140         (*ashl<mode>3_cmp): Macroize insn from *ashl{qi,hi,si}3_cmp and
3141         *ashldi3_cmp_rex64 using SWI mode iterator.
3142         (*ashl<mode>3_cconly): Macroize insn from *ashl{qi,hi,si}3_cconly and
3143         *ashldi3_cconly_rex64 using SWI mode iterator.
3144         * config/i386/i386.c (ix86_split_ashl): Update for renamed
3145         x86_shift<mode>_adj_{1,2}.
3146         (ix86_split_ashr): Ditto.
3147         (ix86_split_lshr): Ditto.
3148
3149 2010-04-09  Richard Guenther  <rguenther@suse.de>
3150
3151         * target.h (builtin_conversion): Pass in input and output types.
3152         * targhooks.c (default_builtin_vectorized_conversion): Adjust.
3153         * targhooks.h (default_builtin_vectorized_conversion): Likewise.
3154         * tree-vect-stmts.c (vectorizable_conversion): Adjust.
3155         * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_CONVERSION): Adjust.
3156
3157         * config/i386/i386.c (ix86_vectorize_builtin_conversion): Adjust.
3158         Handle AVX modes.
3159         * config/rs6000/rs6000.c (rs6000_builtin_conversion): Adjust.
3160
3161 2010-04-09  Richard Guenther  <rguenther@suse.de>
3162
3163         PR target/43152
3164         * config/i386/sse.md (vcond<mode>): Handle AVX modes as well.
3165
3166 2010-04-09  Richard Guenther  <rguenther@suse.de>
3167
3168         * tree-vectorizer.h (struct _stmt_vec_info): Document
3169         that vectype is the type of the LHS.
3170         (supportable_widening_operation, supportable_narrowing_operation):
3171         Get both input and output vector types as arguments.
3172         (vect_is_simple_use_1): Declare.
3173         (get_same_sized_vectype): Likewise.
3174         * tree-vect-loop.c (vect_determine_vectorization_factor):
3175         Set STMT_VINFO_VECTYPE to the vector type of the def.
3176         (vectorizable_reduction): Adjust.
3177         * tree-vect-patterns.c (vect_recog_widen_mult_pattern):
3178         Adjust.  Specify the output vector type.
3179         (vect_pattern_recog_1): Adjust.
3180         * tree-vect-stmts.c (get_same_sized_vectype): New function.
3181         (vectorizable_call): Adjust.
3182         (vectorizable_conversion): Likewise.
3183         (vectorizable_operation): Likewise.
3184         (vectorizable_type_demotion): Likewise.
3185         (vectorizable_type_promotion): Likewise.
3186         (vect_analyze_stmt): Set STMT_VINFO_VECTYPE to the vector type of
3187         the def.
3188         (vect_is_simple_use_1): New function.
3189         (supportable_widening_operation): Get both input and output
3190         vector types.
3191         (supportable_narrowing_operation): Likewise.
3192         * tree-vect-slp.c (vect_schedule_slp_instance): Adjust.
3193
3194 2010-04-09  Kai Tietz  <kai.tietz@onevision.com>
3195
3196         * config/i386/cygming.h (TARGET_OS_CPP_BUILTINS): Add
3197         __thiscall and _thiscall as predefined macros.
3198         * config/i386/i386.c (ix86_handle_cconv_attribute): Add
3199         thiscall attribute handling.
3200         (ix86_comp_type_attributes): Likewise.
3201         (ix86_function_regparm): Likewise.
3202         (ix86_return_pops_args): Likewise.
3203         (init_cumulative_args): Likewise.
3204         (find_drap_reg): Likewise.
3205         (ix86_static_chain): Likewise.
3206         (x86_this_parameter): Likewise.
3207         (x86_output_mi_thunk): Likewise.
3208         (ix86_attribute_table): Add description for thiscall attribute.
3209         * config/i386/i386.h (ix86_args): Adjust comment for member fastcall.
3210         * doc/extend.texi: Add documentation for thiscall.
3211
3212 2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3213
3214         PR c++/28584
3215         * c.opt (Wint-to-pointer-cast): Available in C++.
3216         * doc/invoke.texi (Wint-to-pointer-cast): Available in C++.
3217
3218 2010-04-08  Eric Botcazou  <ebotcazou@adacore.com>
3219
3220         * tree.h (TREE_ADDRESSABLE): Document its effect for function types.
3221         * calls.c (expand_call): Pass the function type to aggregate_value_p.
3222         * function.c (aggregate_value_p): Do not honor DECL_BY_REFERENCE on
3223         the target function of a CALL_EXPR.  Honor TREE_ADDRESSABLE on the
3224         function type instead.  Reorder and simplify checks.
3225
3226         * gimplify.c (gimplify_modify_expr_rhs) <WITH_SIZE_EXPR>: New case.
3227
3228 2010-04-08  Jing Yu  <jingyu@google.com>
3229             Zdenek Dvorak  <ook@ucw.cz>
3230
3231         PR tree-optimization/42720
3232         * tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops): Move one-time
3233         loop unswitch conditions here from ...
3234         (tree_unswitch_single_loop): ... here.
3235
3236 2010-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3237
3238         * tree-if-conv.c: Fix comments and simplify logic.
3239
3240 2010-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3241
3242         * tree-if-conv.c (if_convertible_loop_p): Remove unused parameter.
3243         (tree_if_conversion): Same.  Update call to if_convertible_loop_p.
3244         (main_tree_if_conversion): Update call to tree_if_conversion.
3245
3246 2010-04-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3247
3248         PR 42485
3249         * doc/invoke.texi (-b,-V): Delete.
3250         * doc/tm.texi: Do not mention -b.
3251         * gcc.c (display_help): Delete -b and -V.
3252         (process_command): Delete -b and -V.
3253         * gcc.h (DEFAULT_SWITCH_TAKES_ARG): Delete -b and -V.
3254
3255 2010-04-08  Christian Borntraeger  <borntraeger@de.ibm.com>
3256             Wolfgang Gellerich  <gellerich@de.ibm.com>
3257
3258         Implement target hook for loop unrolling
3259         * target.h (loop_unroll_adjust): Add a new target hook function.
3260         * target-def.h (TARGET_LOOP_UNROLL_ADJUST): Likewise.
3261         * doc/tm.texi (TARGET_LOOP_UNROLL_ADJUST): Document it.
3262         * config/s390/s390.c (TARGET_LOOP_UNROLL_ADJUST): Define it.
3263         (s390_loop_unroll_adjust): Implement the new target hook for s390.
3264         * loop-unroll.c (decide_unroll_runtime_iterations): Call loop unroll
3265         target hook.
3266         (decide_unroll_stupid): Likewise.
3267
3268 2010-04-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3269
3270         PR target/43643
3271         * config/i386/gmon-sol2.c [__x86_64__]: Properly restore %rcx.
3272
3273 2010-04-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3274
3275         * doc/install.texi (Specific, i?86-*-solaris2.10): Fix grammar.
3276         (Specific, *-*-solaris2*): Likewise.
3277         Don't prefer Sun as over GNU as.
3278
3279 2010-04-08  Wolfgang Gellerich  <gellerich@de.ibm.com>
3280
3281         * config/s390/s390.c (override_options): Adjust the z10
3282           defaults for max-unroll-times, max-completely-peeled-insns
3283           and max-completely-peel-times.
3284
3285 2010-04-08  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
3286
3287         * config/s390/s390.c (s390_expand_movmem): Issue prefetch
3288         instructions for z10.
3289         (s390_expand_setmem): Likewise.
3290         (s390_expand_cmpmem): Likewise.
3291
3292 2010-04-08  Richard Guenther  <rguenther@suse.de>
3293
3294         PR tree-optimization/43679
3295         * tree-ssa-pre.c (eliminate): Only propagate copies.
3296
3297 2010-04-08  Jakub Jelinek  <jakub@redhat.com>
3298
3299         PR bootstrap/43681
3300         * expr.c (block_move_libcall_safe_for_call_parm): Avoid
3301         set but not used variable warning.
3302
3303 2010-04-08  Wei Guozhi  <carrot@google.com>
3304
3305         PR target/41653
3306         * config/arm/arm.c (thumb1_size_rtx_costs): New function.
3307         (arm_size_rtx_costs): Call the new function when optimized for size.
3308
3309 2010-04-08  Jakub Jelinek  <jakub@redhat.com>
3310
3311         PR debug/43670
3312         * cfgexpand.c (expand_debug_expr): If for non-NULL offset
3313         op0 is not a MEM, just return NULL instead of assertion
3314         failure.
3315         (discover_nonconstant_array_refs): Don't walk debug stmts.
3316
3317 2010-04-08  Doug Kwan  <dougkwan@google.com>
3318
3319         * configure.ac: Recognize gold and do not use its version number
3320         to test ld features.
3321         * configure: Regenerate.
3322
3323 2010-04-08  Maxim Kuvyrkov  <maxim@codesourcery.com>
3324
3325         PR middle-end/40815
3326         * tree-ssa-reassoc.c (broken_up_substracts): Rename to plus_negates.
3327         (negate_value): Move code to push elements to broken_up_substracts ...
3328         (eliminate_plus_minus_pair): ... here.  Push operands that have no
3329         negative pair to plus_negates.
3330         (repropagate_negates, init_reassoc, fini_reassoc): Update.
3331
3332 2010-04-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3333
3334         * doc/install.texi (Configuration): Move description of
3335         --enable-lto, --with-libelf*, --enable-gold from Java section to
3336         general section.
3337
3338         * doc/generic.texi (Working with declarations)
3339         (Function Properties, C and C++ Trees): Fix typos.
3340         * doc/sourcebuild.texi (Top Level): Likewise.
3341
3342 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
3343
3344         PR c/18624
3345         * tree.h (DECL_READ_P): Define.
3346         (struct tree_decl_common): Add decl_read_flag.
3347         * c-decl.c (pop_scope): If TREE_USED but !DECL_READ_P, issue
3348         a set but not used warning.
3349         (merge_decls): Merge DECL_READ_P flag.
3350         (finish_decl, build_compound_literal): Set DECL_READ_P flag.
3351         (finish_function): Issue -Wunused-but-set-parameter diagnostics.
3352         * c-common.c (handle_used_attribute, handle_unused_attribute):
3353         Likewise.
3354         * c-tree.h (default_function_array_read_conversion, mark_exp_read):
3355         New prototypes.
3356         * c-typeck.c (default_function_array_read_conversion, mark_exp_read):
3357         New functions.
3358         (default_conversion, c_process_expr_stmt): Call mark_exp_read.
3359         * c-parser.c (c_parser_initializer, c_parser_expr_no_commas,
3360         c_parser_binary_expression, c_parser_cast_expression,
3361         c_parser_expr_list, c_parser_omp_atomic, c_parser_omp_for_loop):
3362         Call default_function_array_read_conversion instead of
3363         default_function_array_conversion where needed.
3364         (c_parser_unary_expression, c_parser_conditional_expression,
3365         c_parser_postfix_expression_after_primary, c_parser_initelt):
3366         Likewise.  Call mark_exp_read where needed.
3367         (c_parser_statement_after_labels, c_parser_asm_operands,
3368         c_parser_typeof_specifier, c_parser_sizeof_expression,
3369         c_parser_alignof_expression, c_parser_initval): Call mark_exp_read
3370         where needed.
3371         * common.opt (Wunused-but-set-variable, Wunused-but-set-parameter):
3372         New.
3373         * toplev.c (warn_unused_but_set_variable): Default to warn_unused.
3374         (warn_unused_but_set_parameter): Default to warn_unused
3375         && extra_warnings.
3376         * doc/invoke.texi: Document -Wunused-but-set-variable and
3377         -Wunused-but-set-parameter.
3378
3379         * tree-ssa-pre.c (my_rev_post_order_compute): Remove set but not
3380         used count variable.
3381         * genemit.c (gen_expand, gen_split): Avoid set but not used warnings
3382         when operandN variables aren't used in the body of the expander
3383         or splitter.
3384         * tree-outof-ssa.c (FOR_EACH_ELIM_GRAPH_SUCC,
3385         FOR_EACH_ELIM_GRAPH_PRED): Avoid set but not used warnings.
3386         * tree-ssa-operands.h (FOR_EACH_SSA_TREE_OPERAND): Likewise.
3387         * tree-flow.h (FOR_EACH_IMM_USE_FAST, FOR_EACH_IMM_USE_STMT,
3388         FOR_EACH_IMM_USE_ON_STMT): Likewise.
3389         * tree.h (FOR_EACH_CONSTRUCTOR_ELT): Likewise.
3390         * tree.c (PROCESS_ARG): Likewise.
3391
3392 2010-04-07  Simon Baldwin  <simonb@google.com>
3393
3394         * diagnostic.h (diagnostic_override_option_index): New macro to
3395         set a diagnostic's option_index.
3396         * c-tree.h (c_cpp_error): Add warning reason argument.
3397         * opts.c (_warning_as_error_callback): New.
3398         (register_warning_as_error_callback): Store callback for
3399         warnings enabled via enable_warning_as_error.
3400         (enable_warning_as_error): Call callback, minor code tidy.
3401         * opts.h (register_warning_as_error_callback): Declare.
3402         * c-opts.c (warning_as_error_callback): New, set cpp_opts flag in
3403         response to -Werror=.
3404         (c_common_init_options): Register warning_as_error_callback in opts.c.
3405         * common.opt: Add -Wno-cpp option.
3406         * c-common.c (struct reason_option_codes_t): Map cpp warning
3407         reason codes to gcc option indexes.
3408         * (c_option_controlling_cpp_error): New function, lookup the gcc
3409         option index for a cpp warning reason code.
3410         * (c_cpp_error): Add warning reason argument, call
3411         c_option_controlling_cpp_error for diagnostic_override_option_index.
3412         * doc/invoke.texi: Document -Wno-cpp.
3413
3414 2010-04-07  Richard Guenther  <rguenther@suse.de>
3415
3416         * ipa-reference.c (mark_load): Use get_base_address.
3417         (mark_store): Likewise.
3418
3419         * tree-ssa-ccp.c (gimplify_and_update_call_from_tree): Avoid
3420         inserting GIMPLE_NOPs into the IL.
3421         * tree-ssa-structalias.c (get_constraint_for_component_ref):