OSDN Git Service

bacd3d4c846ebc4e8cadf9e5e75648838cfe0dd7
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2010-07-14  Richard Guenther  <rguenther@suse.de>
2
3         * lto-streamer-in.c (maybe_fixup_handled_component): Remove.
4         (maybe_fixup_decls): Likewise.
5         (input_gimple_stmt): Do not fixup anything.
6         * lto-streamer-out.c (output_gimple_stmt): Make sure all
7         non-automatic variable uses are wrapped inside a MEM_REF.
8
9 2010-07-14  Richard Henderson  <rth@redhat.com>
10
11         * passes.c (rest_of_decl_compilation): Do not call assemble_variable
12         for functions.
13         * varasm.c (assemble_variable): Remove early exit for functions;
14         assert that we're given a variable.
15
16 2010-07-14  Jie Zhang  <jie@codesourcery.com>
17
18         * config/arm/cortex-a8.md (cortex_a8_alu): Don't use
19         cortex_a8_default when neon_type is not none.
20
21 2010-07-14  Bernd Schmidt  <bernds@codesourcery.com>
22
23         * lower-subreg.c (subreg_context): New static bitmap.
24         (decompose_multiword_subregs): Allocate and free it.
25         (find_decomposable_subregs): Set a bit in it for a register that
26         occurs in a subreg that changes mode but not size.
27         (can_decompose_p): Test it instead of non_decomposable_context.
28
29 2010-07-14  Richard Guenther  <rguenther@suse.de>
30
31         PR tree-optimization/44824
32         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Use
33         is_gimple_mem_ref_addr.
34         (tree_ssa_forward_propagate_single_use_vars): Do not propagate
35         non-decl_address_invariant_p addresses.
36
37 2010-07-14  Bernd Schmidt  <bernds@codesourcery.com>
38
39         * reload.c (find_reloads): Revert code to penalize small register
40         classes that was brought in with the IRA merge.
41
42 2010-07-14  Richard Guenther  <rguenther@suse.de>
43
44         * tree-ssa-ccp.c (fold_const_aggregate_ref): Handle MEM_REF
45         as base of ARRAY_REFs.
46
47 2010-07-14  Richard Guenther  <rguenther@suse.de>
48
49         PR middle-end/44930
50         * tree-pretty-print.c (do_niy): Do not print a newline.
51
52 2010-07-14  Bernd Schmidt  <bernds@codesourcery.com>
53
54         * ira-int.h (struct ira_object): New.
55         (ira_object_t): New typedef.  Add DEF_VEC_P and DEF_VEC_ALLOC_P
56         for it.
57         (struct ira_allocno): Remove members min, max,
58         conflict_allocno_array, conflict_id, conflict_allocno_array_size,
59         conflict_allocnos_num and conflict_vec_p.  Add new member object.
60         (OBJECT_CONFLICT_ARRAY, OBJECT_CONFLICT_VEC_P,
61         OBJECT_NUM_CONFLICTS, OBJECT_CONFLICT_ARRAY_SIZE,
62         OBJECT_CONFLICT_HARD_REGS, OBJECT_TOTAL_CONFLICT_HARD_REGS,
63         OBJECT_MIN, OBJECT_MAX, OBJECT_CONFLICT_ID): Renamed from
64         ALLOCNO_CONFLICT_ALLOCNO_ARRAY, ALLOCNO_CONFLICT_VEC_P,
65         ALLOCNO_CONFLICT_ALLOCNOS_NUM, ALLOCNO_CONFLICT_ALLOCNO_ARRAY_SIZE,
66         ALLOCNO_CONFLICT_HARD_REGS, ALLOCNO_TOTAL_CONFLICT_HARD_REGS)
67         ALLOCNO_MIN, ALLOCNO_MAX, and ALLOCNO_CONFLICT_ID; now operate on
68         an ira_object_t rather than ira_allocno_t.  All uses changed.
69         (ira_object_id_map): Renamed from ira_conflict_id_allocno_map; now
70         contains a vector of ira_object_t; all uses changed.
71         (ira_objects_num): Declare variable.
72         (ira_create_allocno_object): Declare function.
73         (ira_conflict_vector_profitable_p): Adjust prototype.
74         (ira_allocate_conflict_vec): Renamed from
75         ira_allocate_allocno_conflict_vec; first arg now ira_object_t.
76         (ira_allocate_object_conflicts): Renamed from
77         ira_allocate_allocno_conflicts; first arg now ira_object_t.
78         (struct ira_object_iterator): New.
79         (ira_object_iter_init, ira_object_iter_cond, FOR_EACH_OBJECT): New.
80         (ira_allocno_conflict_iterator): Renamed member allocno_conflict_vec_p
81         to conflict_vec_p.  All uses changed.
82         (ira_allocno_conflict_iter_init, ira_allocno_conflict_iter_cond):
83         Changed to take into account that conflicts are now tracked for
84         objects.
85         * ira-conflicts.c (OBJECTS_CONFLICT_P): Renamed from
86         CONFLICT_ALLOCNO_P.  Args changed to accept ira_object_t.  All
87         uses changed.
88         (allocnos_conflict_p): New static function.
89         (collected_conflict_objects): Renamed from collected_allocno_objects;
90         now a vector of ira_object_t.  All uses changed.
91         (build_conflict_bit_table): Changed to take into account that
92         conflicts are now tracked for objects.
93         (process_regs_for_copy, propagate_copies, build_allocno_conflicts)
94         (print_allocno_conflicts, ira_build_conflicts): Likewise.
95         * ira-color.c (assign_hard_reg, setup_allocno_available_regs_num)
96         setup_allocno_left_conflicts_size, allocno_reload_assign,
97         fast_allocation): Likewise.
98         * ira-lives.c (make_hard_regno_born, make_allocno_born)
99         process_single_reg_class_operands, process_bb_node_lives): Likewise.
100         * ira-emit.c (modify_move_list, add_range_and_copies_from_move_list):
101         Likewise.
102         * ira-build.c (ira_objects_num): New variable.
103         (ira_object_id_map): Renamed from ira_conflict_id_allocno_map; now
104         contains a vector of ira_object_t; all uses changed.
105         (ira_object_id_map_vec): Corresponding change.
106         (object_pool): New static variable.
107         (initiate_allocnos): Initialize it.
108         (finish_allocnos): Free it.
109         (ira_create_object, ira_create_allocno_object, create_allocno_objects):
110         New functions.
111         (ira_create_allocno): Don't set members that were removed.
112         (ira_set_allocno_cover_class): Don't change conflict hard regs.
113         (merge_hard_reg_conflicts): Changed to take into account that
114         conflicts are now tracked for objects.
115         (ira_conflict_vector_profitable_p, ira_allocate_conflict_vec,
116         allocate_conflict_bit_vec, ira_allocate_object_conflicts,
117         compress_conflict_vecs, remove_low_level_allocnos, ira_flattening,
118         setup_min_max_allocno_live_range_point, allocno_range_compare_func,
119         setup_min_max_conflict_allocno_ids, ):  Likewise.
120         ((add_to_conflicts): Renamed from add_to_allocno_conflicts, args changed
121         to ira_object_t; all callers changed.
122         (ira_add_conflict): Renamed from ira_add_allocno_conflict, args changed
123         to ira_object_t, all callers changed.
124         (clear_conflicts): Renamed from clear_allocno_conflicts, arg changed
125         to ira_object_t, all callers changed.
126         (conflict_check, curr_conflict_check_tick): Renamed from
127         allocno_conflict_check and curr_allocno_conflict_check_tick; all uses
128         changed.
129         (compress_conflict_vec): Renamed from compress_allocno_conflict_vec,
130         arg changed to ira_object_t, all callers changed.
131         (create_cap_allocno): Call ira_create_allocno_object.
132         (finish_allocno): Free the corresponding object.
133         (sort_conflict_id_map): Renamed from sort_conflict_id_allocno_map; all
134         callers changed.  Adjusted for dealing with objects.
135         (ira_build): Call create_allocno_objects after ira_costs.  Adjusted for
136         dealing with objects.
137         * ira.c (ira_bad_reload_regno_1): Adjusted for dealing with objects.
138
139         * ira-int.h (struct live_range): Rename allocno member to object and change
140         type to ira_object_t.
141         (struct ira_object): New member live_ranges.
142         (struct ira_allocno): Remove member live_ranges.
143         (ALLOCNO_LIVE_RANGES): Remove.
144         (OBJECT_LIVE_RANGES): New macro.
145         (ira_create_live_range, ira_copy_live_range_list,
146         ira_merge_live_range_list, ira_live_ranges_intersect_p,
147         ira_finish_live_range, ira_finish_live_range_list): Adjust declarations.
148         * ira-build.c (ira_create_object): Initialize live ranges here.
149         (ira_create_allocno): Not here.
150         (ira_create_live_range): Rename from ira_create_allocno_live_range, arg
151         changed to ira_object_t, all callers changed.
152         (copy_live_range): Rename from copy_allocno_live_range, all callers
153         changed.
154         (ira_copy_live_range_list): Rename from ira_copy_allocno_live_range_list,
155         all callers changed.
156         (ira_merge_live_ranges): Rename from ira_merge_allocno_live_range_list,
157         all callers changed.
158         (ira_live_ranges_intersect_p): Rename from
159         ira_allocno_live_ranges_intersect_p, all callers changed.
160         (ira_finish_live_range): Rename from ira_finish_allocno_live_range, all
161         callers changed.
162         (ira_finish_live_range_list): Rename from
163         ira_finish_allocno_live_range_list, all callers changed.
164         (change_object_in_range_list): Rename from change_allocno_in_range_list,
165         last arg changed to ira_object_t, all callers changed.
166         (finish_allocno): Changed to expect live ranges in the allocno's object.
167         (move_allocno_live_ranges, copy_allocno_live_ranges,
168         update_bad_spill_attribute, setup_min_max_allocno_live_range_point,
169         ira_flattening, ira_build): Likewise.
170         * ira-color.c (allocnos_have_intersected_live_ranges_p,
171         slot_coalesced_allocno_live_ranges_intersect,
172         setup_slot_coalesced_allocno_live_ranges, fast_allocation): Likewise.
173         * ira-conflicts.c (build_conflict_bit_table): Likewise.
174         * ira-emit.c (add_range_and_copies_from_move_list): Likewise.
175         * ira-lives.c (make_allocno_born, update_allocno_pressure_excess_length,
176         make_allocno_dead, create_start_finish_chains,
177         remove_some_program_points_and_update_live_ranges,
178         ira_debug_live_range_list): Likewise.
179
180         * ira-int.h (ira_object_conflict_iterator): Rename from
181         ira_allocno_conflict_iterator.
182         (ira_object_conflict_iter_init): Rename from
183         ira_allocno_conflict_iter_init, second arg changed to
184         * ira.c (check_allocation): Use FOR_EACH_OBJECT_CONFLICT rather than
185         FOR_EACH_ALLOCNO_CONFLICT.
186         * ira-color.c (assign_hard_reg, push_allocno_to_stack)
187         setup_allocno_left_conflicts_size, coalesced_allocno_conflict_p,
188         ira_reassign_conflict_allocnos, ira_reassign_pseudos): Likewise.
189         * ira-conflicts.c (print_allocno_conflicts): Likewise.
190
191 2010-07-13  Joern Rennecke  <joern.rennecke@embecosm.com>
192
193         PR other/44874
194         * tree-dump.c (dump_options): Add enumerate_locals entry.
195         Add TDF_NOID exclusion to all entry.
196         * tree-dump.h (dump_enumerated_decls): Declare.
197         * tree-pretty-print.c (dump_generic_node): For TDF_NOID,
198         Don't display type uid.
199         (print_declaration): Don't crash on TREE_TYPE (t) == 0.
200         * tree-pass.h (TDF_ENUMERATE_LOCALS): Define.
201         * tree-ssa-live.c: Include gimple.h.
202         (numbered_tree_d): New struct.
203         (numbered_tree): New typedef.
204         (DEF_VEC_O (numbered_tree): New.
205         (DEF_VEC_ALLOC_O (numbered_tree, heap)): Likewise.
206         (compare_decls_by_uid, dump_enumerated_decls_push): New functions.
207         (dump_enumerated_decls): Likewise.
208         * tree-optimize.c (execute_cleanup_cfg_post_optimizing): If comparing
209         debug info and flag_dump_final_insns, call dump_enumerated_decls.
210         * tree-cfg.c (dump_function_to_file): Call dump_enumerated_decls.
211         * Makefile.in (tree-ssa-live.o): Depend on $(GIMPLE_H).
212
213 2010-07-13  Richard Sandiford  <rdsandiford@googlemail.com>
214
215         * expmed.h (MAX_BITS_PER_WORD): Move to...
216         * defaults.h (MAX_BITS_PER_WORD): ...here.
217
218 2010-07-13  DJ Delorie  <dj@redhat.com>
219
220         * config/h8300/h8300.c (h8300_init_once): Default to
221         -fstrict_volatile_bitfields.
222
223         * config/sh/sh.c (sh_override_options): Default to
224         -fstrict_volatile_bitfields.
225
226         * config/rx/rx.c (rx_option_override): New.
227
228         * config/m32c/m32c.c (m32c_override_options): Default to
229         -fstrict_volatile_bitfields.
230
231 2010-07-13  Nathan Froyd  <froydnj@codesourcery.com>
232
233         * tree.h (build_function_call_expr): Delete.
234         (build_call_expr_loc_array): New function.
235         (build_call_expr_loc_vec): New function.
236         * tree-flow.h (struct omp_region): Change type of ws_args field
237         to a VEC.
238         * builtins.c (build_function_call_expr): Delete.
239         (build_call_expr_loc_array): New function.
240         (build_call_expr_loc): Call it.  Use XALLOCAVEC.
241         (build_call_expr): Likewise.
242         (build_call_expr_loc_vec): New function.
243         * cgraphunit.c (build_cdtor): Call build_call_expr instead of
244         build_function_call_expr.
245         * expr.c (emutls_var_address): Likewise.
246         * varasm.c (emutls_common_1): Likewise.
247         * omp-low.c (expand_omp_atomic_mutex): Likewise.
248         (expand_omp_taskreg): Adjust for new type of region->ws_args.
249         (get_ws_args_for): Return a VEC instead of a tree.
250         (expand_parallel_call): Call build_call_expr_loc_vec instead of
251         build_function_call_expr.
252         * stor-layout.c (self_referential_size): Likewise.
253
254 2010-07-13  Jakub Jelinek  <jakub@redhat.com>
255
256         PR testsuite/44701
257         * recog.c (constrain_operands): Allow side-effects in memory
258         operands if either < or > constraint is used, rather than if
259         both < and > is used.
260
261 2010-07-13  Richard Guenther  <rguenther@suse.de>
262
263         PR middle-end/44911
264         * tree-pretty-print.c (dump_generic_node): Use TDF_SLIM for
265         MEM_REF pointer type dumping.  Avoid recursing for TYPE_DECLs
266         without name.
267
268 2010-07-13  Kaz Kojima  <kkojima@gcc.gnu.org>
269
270         PR target/44761
271         * mode-switching.c (optimize_mode_switching): Add ATTRIBUTE_UNUSED
272         to variable emited.
273         * config/sh/sh.c (sh_expand_epilogue): Remove unused variable.
274         * config/sh/sh.md (symGOT_load): Likewise.
275         (symDTPOFF2reg): Likewise.
276         (symTPOFF2reg): Likewise.
277
278 2010-07-13  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
279
280         * expmed.c (MAX_BITS_PER_WORD): Moved to expmed.h.
281         * expmed.h (MAX_BITS_PER_WORD): Moved from expmed.c.
282
283 2010-07-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
284
285         * config/i386/sol2-unwind.h (x86_64_fallback_frame_state): Correct
286         explanation.
287         Find ucontext_t * on Solaris 11.
288         (x86_fallback_frame_state): Handle Solaris 9 multi-threaded pattern.
289         Handle new Solaris 11 __sighndlr patterns.
290
291 2010-07-13  Jakub Jelinek  <jakub@redhat.com>
292
293         PR debug/44901
294         * vec.h (VEC_block_remove): Fix comment.
295         * tree-ssa-live.c (remove_unused_locals): Don't use
296         VEC_unordered_remove on local_decls, instead replace a single
297         vector element in each iteration if at least one element had
298         to be removed and VEC_truncate at the end.
299         * omp-low.c (expand_omp_taskreg): Likewise.
300
301 2010-07-13  Manuel López-Ibáñez  <manu@gcc.gnu.org>
302
303         * c-decl.c (finish_function): Fix typo in comment.
304         
305 2010-07-12  H.J. Lu  <hongjiu.lu@intel.com>
306
307         PR bootstrap/44921
308         * postreload.c (move2add_use_add3_insn): Silence gcc warning
309         on min_regno.
310
311 2010-07-12  Jakub Jelinek  <jakub@redhat.com>
312
313         * tree-vrp.c (simplify_bit_ops_using_ranges): New function.
314         (simplify_stmt_using_ranges): Use it.
315
316 2010-07-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
317
318         * config/spu/spu.h (struct spu_builtin_description): Remove FNDECL
319         member.  Do not mark as GTY(()).
320         * config/spu/spu.c (spu_builtins): Remove FNDECL initializer elements.
321         (spu_builtin_decls): New static variable.
322         (spu_builtin_decl): Use it instead of spu_builtins[].fndecl.
323         (spu_init_builtins): Likewise.
324         (spu_builtin_mul_widen_even): Likewise.
325         (spu_builtin_mul_widen_odd): Likewise.
326         (spu_builtin_mask_for_load): Likewise.
327         (spu_builtin_vec_perm): Likewise.
328         * config/spu/spu-c.c: Include "target.h".
329         (spu_resolve_overloaded_builtin): Call targetm.builtin_decl instead
330         of using spu_builtins[].fndecl.
331
332 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
333
334         * config/mips/mips.c (mips_override_options): Make -mflip-mips16
335         imply -minterlink-mips16.
336
337 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
338
339         * config/mips/mips.h (mips16_globals): Declare.
340         (SWITCHABLE_TARGET): Define.
341         * config/mips/mips.c: Include target-globals.h.
342         (mips16_globals): New variable.
343         (mips_set_mips16_mode): Use save_target_globals and
344         restore_target_globals instead of target_reinit.
345
346 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
347
348         * reginfo.c (init_reg_sets): Don't zero globals here.  Update comment
349         to say that the function can be called more than once.
350         * target-globals.c (save_target_globals): Call init_reg_sets.
351
352 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
353
354         * Makefile.in (bb-reorder.o, target-globals.o): Depend on bb-reorder.h
355         * bb-reorder.h: New file.
356         * bb-reorder.c (default_target_bb_reorder): New variable.
357         (this_target_bb_reorder): New conditional variable.
358         (uncond_jump_length): Redefine as a macro.
359         * target-globals.h (this_target_bb_reorder): Declare.
360         (target_globals): Add a bb_reorder field.
361         (restore_target_globals): Copy the bb_reorder field to
362         this_target_bb-reorder.
363         * target-globals.c: Include bb-reorder.h.
364         (default_target_globals): Initialize the bb_reorder field.
365         (save_target_globals): Likewise.
366
367 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
368
369         * Makefile.in (gcse.o, target-globals.o): Depend on gcse.h..
370         * gcse.h: New file.
371         * gcse.c: Include gcse.h.
372         (default_target_gcse): New variable.
373         (this_target_gcse): New conditional variable.
374         (can_copy): Redefine as a macro.
375         (can_copy_init_p): New macro.
376         (can_copy_p): Remove can_copy_init_p.
377         * target-globals.h (this_target_gcse): Declare.
378         (target_globals): Add a gcse field.
379         (restore_target_globals): Copy the gcse field to
380         this_target_gcse.
381         * target-globals.c: Include gcse.h.
382         (default_target_globals): Initialize the gcse field.
383         (save_target_globals): Likewise.
384
385 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
386
387         * ira-int.h (target_ira_int): Add x_ira_prohibited_mode_move_regs
388         and x_ira_prohibited_mode_move_regs_initialized_p.
389         (ira_prohibited_mode_move_regs): Redefine as a macro.
390         * ira.c (ira_prohibited_mode_move_regs): Delete.
391         (ira_prohibited_mode_move_regs_initialized_p): Redefine as a macro.
392
393 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
394
395         * reload.h (target_reload): Add x_cached_reg_save_code and
396         x_cached_reg_restore_code.
397         * caller-save.c (cached_reg_save_code, cached_reg_restore_code):
398         Redefine as macros.
399
400 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
401
402         * Makefile.in (target-globals.o): Depend on builtins.h.
403         * builtins.h: New file.
404         * builtins.c: Include builtins.h.
405         (default_target_builtins): New variable.
406         (this_target_builtins): New conditional variable.
407         (apply_args_mode, apply_result_mode): Redefine as macros.
408         * target-globals.h (this_target_builtins): Declare.
409         (target_globals): Add a builtins field.
410         (restore_target_globals): Copy the builtins field to
411         this_target_builtins.
412         * target-globals.c: Include builtins.h.
413         (default_target_globals): Initialize the builtins field.
414         (save_target_globals): Likewise.
415
416 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
417
418         * expmed.h (alg_code, mult_cost, MULT_COST_LESS, CHEAPER_MULT_COST)
419         (algorithm, alg_hash_entry, NUM_ALG_HASH_ENTRIES, alg_hash): Moved
420         from expmed.c.
421         (target_expmed): Add x_alg_hash and x_alg_hash_used_p.
422         (alg_hash, alg_hash_used_p): New macros.
423         * expmed.c (init_expmed): Clear alg_hash if reinitializing.
424         (alg_code, mult_cost, MULT_COST_LESS, CHEAPER_MULT_COST, algorithm)
425         (alg_hash_entry, NUM_ALG_HASH_ENTRIES, alg_hash): Moved to expmed.h.
426
427 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
428
429         * ira-int.h (target_ira_int): Add x_max_struct_costs_size, x_init_cost,
430         x_temp_costs, x_op_costs, x_this_op_costs and x_cost_classes.
431         * ira-costs.c (max_struct_costs_size, init_cost, temp_costs, op_costs)
432         (this_op_costs, costs_classes): Redefine as macros.
433         (record_reg_classes): Don't take op_costs as a parameter.
434         (record_operand_costs): Likewise.  Update calls to record_reg_classes.
435         (scan_one_insn): Update call to record_operand_costs.
436
437 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
438
439         * Makefile.in (target-globals.o): Depend on $(IRA_INT_H).
440         * ira-int.h (ira_max_nregs, ira_important_class_nums): Delete.
441         (target_ira_int): New structure.
442         (default_target_ira_int): Declare.
443         (this_target_ira_int): Declare as a variable or define as a macro.
444         (ira_reg_mode_hard_regset, ira_register_move_cost)
445         (ira_may_move_in_cost, ira_may_move_out_cost, ira_class_subset_p)
446         (ira_non_ordered_class_hard_regs, ira_class_hard_reg_index)
447         (prohibited_class_mode_regs, ira_important_classes_num)
448         (ira_important_classes, ira_reg_class_intersect)
449         (ira_reg_classes_intersect_p, ira_reg_class_super_classes)
450         (ira_reg_class_union): Redefine as macros.
451         * ira.h (target_ira): New structure.
452         (default_target_ira): Declare.
453         (this_target_ira): Declare as a variable or define as a macro.
454         (ira_available_class_regs, ira_hard_regno_cover_class)
455         (ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate)
456         (ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs)
457         (ira_class_hard_regs_num): Redefine as macros.
458         * ira.c (default_target_ira, default_target_ira_int): New variables.
459         (this_target_ira, this_target_ira_int): New conditional variables.
460         (ira_reg_mode_hard_regset, ira_memory_move_cost)
461         (ira_register_move_cost, ira_may_move_in_cost, ira_may_move_out_cost)
462         (ira_class_subset_p): Delete.
463         (no_unit_alloc_regs): Redefine as a macro.
464         (ira_class_hard_regs, ira_non_ordered_class_hard_regs)
465         (ira_class_hard_regs_num, ira_class_hard_reg_index)
466         (ira_available_class_regs): Delete.
467         (alloc_reg_class_subclasses): Redefine as a macro.
468         (ira_reg_class_cover_size, ira_reg_class_cover)
469         (ira_important_classes_num, ira_important_classes)
470         (ira_important_class_nums, ira_class_translate): Delete.
471         (cover_class_order): Document the variable's lifetime.
472         (reorder_important_classes): Don't set ira_important_class_nums.
473         (ira_reg_class_intersect, ira_reg_classes_intersect_p)
474         (ira_reg_class_super_classes, ira_reg_class_union)
475         (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_max_nregs):
476         Delete.
477         (setup_reg_class_nregs): Don't set ira_max_regs.
478         (prohibited_class_mode_regs): Delete.
479         * target-globals.h (this_target_ira, this_target_ira_int): Declare.
480         (target_globals): Add ira and ira_int fields.
481         (restore_target_globals): Copy the ira field to this_target_ira
482         and the ira_int field to this_target_ira_int.
483         * target-globals.c: Include ira-int.h.
484         (default_target_globals): Initialize the ira and ira_int fields.
485         (save_target_globals): Likewise.
486
487 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
488
489         * Makefile.in (target-globals.o): Depend on $(CFGLOOP_H).
490         * cfgloop.h (target_cfgloop): New structure.
491         (default_target_cfgloop): Declare.
492         (this_target_cfgloop): Declare as a variable or define as a macro.
493         (target_avail_regs, target_clobbered_regs, target_res_regs)
494         (target_reg_cost, target_spill_cost): Redefine as macros.
495         * cfgloopanal.c (default_target_cfgloop): New variable.
496         (this_target_cfgloop): New conditional variable.
497         (target_avail_regs, target_clobbered_regs, target_res_regs)
498         (target_reg_cost, target_spill_cost): Delete.
499         * target-globals.h (this_target_cfgloop): Declare.
500         (target_globals): Add a cfgloop field.
501         (restore_target_globals): Copy the cfgloop field to
502         this_target_cfgloop.
503         * target-globals.c: Include cfgloop.h.
504         (default_target_globals): Initialize the cfgloop field.
505         (save_target_globals): Likewise.
506
507 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
508
509         * regs.h (target_regs): Add x_direct_load, x_direct_store and
510         x_float_extend_from_mem.
511         (direct_load, direct_store, float_extend_from_mem): New macros.
512         * expr.c (direct_load, direct_store, float_extend_from_mem): Delete.
513
514 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
515
516         * Makefile.in (LIBFUNCS_H): Add $(HASHTAB_H).
517         (target-globals.o): Depend on $(LIBFUNCS_H).
518         * libfuncs.h: Include hashtab.h.
519         (libfunc_entry): Moved from optabs.c.
520         (target_libfuncs): New structure.
521         (default_target_libfuncs): Declare.
522         (this_target_libfuncs): Declare as a variable or define as a macro.
523         (libfunc_table): Redefine as a macro.
524         * optabs.c (default_target_libfuncs): New variable.
525         (this_target_libfuncs): New conditional variable.
526         (libfunc_table): Delete.
527         (libfunc_entry): Moved to optabs.h.
528         (libfunc_hash): Redefine as a macro.
529         (hash_libfunc, eq_libfunc): Fix comments.
530         (init_optabs): Use libfunc_hash to detect cases where the function
531         has already been called.  Clear the hash table instead of
532         recreating it.
533         * target-globals.h (this_target_libfuncs): Declare.
534         (target_globals): Add a libfuncs field.
535         (restore_target_globals): Copy the libfuncs field to
536         this_target_libfuncs.
537         * target-globals.c: Include libfuncs.h.
538         (default_target_globals): Initialize the libfuncs field.
539         (save_target_globals): Likewise.
540
541 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
542
543         * Makefile.in (LIBFUNCS_H): New variable.  Use instead of libfuncs.h
544         in all dependency lists.
545
546 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
547
548         * Makefile.in (target-globals.o): Depend on $(EXPR_H) and $(OPTABS_H).
549         * optabs.h (target_optabs): New structure.
550         (default_target_optabs): Declare.
551         (this_target_optabs): Declare as a variable or define as a macro.
552         (optab_table, convert_optab_table, direct_optab_table): Redefine
553         as macros.
554         * optabs.c (default_target_optabs): New variable.
555         (this_target_optabs): New conditional variable.
556         (optab_table, convert_optab_table, direct_optab_table): Delete.
557         * target-globals.h (this_target_optabs): Declare.
558         (target_globals): Add a optabs field.
559         (restore_target_globals): Copy the optabs field to
560         this_target_optabs.
561         * target-globals.c: Include expr.h and optabs.h.
562         (default_target_globals): Initialize the optabs field.
563         (save_target_globals): Likewise.
564
565 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
566
567         * flags.h (target_flagstate): Add x_flag_excess_precision.
568         (flag_excess_precision): Redefine as a macro.
569         * toplev.c (flag_excess_precision): Delete.
570
571 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
572
573         * defaults.h (MAX_MOVE_MAX, MIN_UNITS_PER_WORD): Define if not defined.
574         * libgcc2.c (MIN_UNITS_PER_WORD): Delete.
575         * hard-reg-set.h (target_hard_regs): Add x_no_caller_save_reg_set.
576         (no_caller_save_reg_set): Redefine as a macro.
577         * reload.h (target_reload): Add x_caller_save_initialized_p and
578         x_regno_save_mode.
579         (caller_save_initialized_p): Redefine as a macro.
580         * caller-save.c (caller_save_initialized_p, no_caller_save_reg_set)
581         (MAX_MOVE_MAX, MIN_UNITS_PER_WORD): Delete.
582         (regno_save_mode): Redefine as a macro.
583
584 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
585
586         * Makefile.in (expmed.o, target-globals.o): Depend on expmed.h.
587         * expmed.h: New file.
588         * expmed.c (default_target_costs): New variable.
589         (this_target_costs): New conditional variable.
590         (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, neg_cost)
591         (shift_cost, shiftadd_cost, shiftsub0_cost, shiftsub1_cost, mul_cost)
592         (sdiv_cost, udiv_cost, mul_widen_cost, mul_highpart_cost): Delete.
593         * target-globals.h (this_target_expmed): Declare.
594         (target_globals): Add a expmed field.
595         (restore_target_globals): Copy the expmed field to
596         this_target_expmed.
597         * target-globals.c: Include expmed.h.
598         (default_target_globals): Initialize the expmed field.
599         (save_target_globals): Likewise.
600
601 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
602
603         * Makefile.in (target-globals.o): Depend on reload.h.
604         * reload.h (target_reload): New structure.
605         (default_target_reload): Declare.
606         (this_target_reload): Declare as a variable or define as a macro.
607         (indirect_symref_ok, double_reg_address_ok): Redefine as macros.
608         * reload1.c (default_target_reload): New variable
609         (this_target_reload): New conditional variable.
610         (indirect_symref_ok, double_reg_address_ok): Delete.
611         (spill_indirect_levels): Redefine as a macro.
612         * target-globals.h (this_target_reload): Declare.
613         (target_globals): Add a reload field.
614         (restore_target_globals): Copy the reload field to
615         this_target_reload.
616         * target-globals.c: Include hard-reg-set.h.
617         (default_target_globals): Initialize the reload field.
618         (save_target_globals): Likewise.
619
620 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
621
622         * rtl.h (target_rtl): Add x_static_reg_base_value.
623         * alias.c (static_reg_base_value): Redefine as a macro.
624
625 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
626
627         * Makefile.in (reginfo.o): Don't depend on $(GGC_H) or gt-reginfo.h.
628         (GTFILES): Remove reginfo.c.
629         * rtl.h (target_rtl): Add x_top_of_stack.
630         (top_of_stack): New macro.
631         * reginfo.c: Don't include ggc.h or gt-reginfo.h.
632         (top_of_stack): Delete.
633
634 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
635
636         * regs.h (target_regs): Add x_hard_regs_of_mode, x_contains_reg_of_mode,
637         x_move_cost, x_may_move_in_cost, x_may_move_out_cost and
638         x_last_mode_for_init_move_cost.
639         (have_regs_of_mode, contains_reg_of_mode, move_cost)
640         (may_move_in_cost, may_move_out_cost): Redefine as macros.
641         * reginfo.c (have_regs_of_mode, contains_reg_of_mode, move_cost)
642         (may_move_in_cost, may_move_out_cost): Delete.
643         (last_mode_for_init_move_cost): Redefine as a macro.
644
645 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
646
647         * hard-reg-set.h (target_hard_regs): New structure.
648         (default_target_hard_regs): Declare.
649         (this_target_hard_regs): Declare as a variable or define as a macro.
650         (fixed_regs, fixed_reg_set, call_used_regs, call_really_used_regs)
651         (call_used_reg_set, call_fixed_reg_set, regs_invalidated_by_call)
652         (reg_alloc_order, inv_reg_alloc_order, reg_class_contents)
653         (reg_class_size, reg_class_subclasses, reg_class_subunion)
654         (reg_class_superunion, reg_names): Redefine as macros.
655         * reginfo.c (fixed_regs, fixed_reg_set, call_used_regs)
656         (call_used_reg_set, call_really_used_regs, call_fixed_reg_set)
657         (regs_invalidated_by_call, reg_alloc_order, inv_reg_alloc_order)
658         (reg_class_contents, reg_class_size, reg_class_subclasses)
659         (reg_class_subunion, reg_class_superunion, reg_names): Delete.
660         (default_target_hard_regs): New variable
661         (this_target_hard_regs, initial_call_really_used_regs)
662         (initial_reg_alloc_order): New conditional variables.
663         (initial_reg_names): New variable.
664         (init_reg_sets): Assert that initial_call_really_used_regs,
665         initial_reg_alloc_order and initial_reg_names
666         are all the same size as their variable counterparts.  Use them to
667         initialize those counterparts.
668         * target-globals.h (this_target_hard_regs): Declare.
669         (target_globals): Add a hard_regs field.
670         (restore_target_globals): Copy the hard_regs field to
671         this_target_hard_regs.
672         * target-globals.c: Include hard-reg-set.h.
673         (default_target_globals): Initialize the hard_regs field.
674         (save_target_globals): Likewise.
675
676 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
677
678         * Makefile.in (target-globals.o): Depend on $(RTL_H).
679         * rtl.h: (target_rtl): New structure.
680         (default_target_rtl): Declare.
681         (this_target_rtl): Declare as a variable or define as a macro.
682         (global_rtl, pic_offset_table_rtx, return_address_pointer_rtx):
683         Redefine as macros.
684         * emit-rtl.c (default_target_rtl): New variable.
685         (this_target_rtl): New conditional variable.
686         (global_rtl, static_regno_reg_rtx, pic_offset_table_rtx)
687         (return_address_pointer_rtx): Delete.
688         (initial_regno_reg_rtx): New macro.
689         (init_emit): Use initial_regno_reg_rtx instead of static_regno_reg_rtx.
690         (init_emit_regs): Likewise.
691         * target-globals.h (this_target_rtl): Declare.
692         (target_globals): Add a rtl field.
693         (restore_target_globals): Copy the rtl field to this_target_rtl.
694         * target-globals.c: Include rtl.h.
695         (default_target_globals): Initialize the rtl field.
696         (save_target_globals): Likewise.
697
698 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
699
700         * Makefile.in (target-globals.o): Depend on $(REGS_H).
701         * regs.h (target_reg_modes): New structure.
702         (default_target_reg_modes): Declare.
703         (this_target_reg_modes): Declare as a variable or define as a macro.
704         (hard_regno_nregs, reg_raw_mode): Redefine as macros.
705         * reginfo.c (default_target_reg_modes): New variable.
706         (this_target_reg_modes): New conditional variable.
707         (hard_regno_nregs, reg_raw_mode): Delete.
708         * target-globals.h (this_target_regs): Declare.
709         (target_globals): Add a regs field.
710         (restore_target_globals): Copy the regs field to this_target_regs.
711         * target-globals.c: Include regs.h.
712         (default_target_globals): Initialize the regs field.
713         (save_target_globals): Likewise.
714
715 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
716
717         * doc/tm.texi.in (SWITCHABLE_TARGET): Document.
718         * doc/tm.texi: Regenerate.
719         * Makefile.in (OBJS-common): Add target-globals.o.
720         (gtype-desc.o): Depend on $(IPA_PROP_H), $(LTO_STREAMER_H)
721         and target-globals.h.
722         (target-globals.o): New rule.
723         (GTFILES): Include $(srcdir)/target-globals.h.
724         * defaults.h (SWITCHABLE_TARGET): Define.
725         * gengtype.c (open_base_files): Add target-globals.h to the
726         list of includes.
727         * target-globals.h: New file.
728         * target-globals.c: Likewise.
729
730         * Makefile.in (target-globals.o): Depend on $(FLAGS_H).
731         * flags.h (target_flag_state): New structure.
732         (default_target_flag_state): Declare.
733         (this_target_flag_state): Declare as a variable or define as a macro.
734         (align_loops_log): Redefine as a macro.
735         (align_loops_max_skip, align_jumps_log): Likewise.
736         (align_jumps_max_skip, align_labels_log): Likewise.
737         (align_labels_max_skip, align_functions_log): Likewise.
738         * toplev.c (default_target_flag_state): New variable.
739         (this_target_flag_state): New conditional variable.
740         (align_loops_log): Delete.
741         (align_loops_max_skip, align_jumps_log): Likewise.
742         (align_jumps_max_skip, align_labels_log): Likewise.
743         (align_labels_max_skip, align_functions_log): Likewise.
744         * target-globals.h (this_target_flag_state): Declare.
745         (target_globals): Add a flag_state field.
746         (restore_target_globals): Copy the flag_state field to
747         this_target_flag_state.
748         * target-globals.c: Include flags.h.
749         (default_target_globals): Initialize the flag_state field.
750         (save_target_globals): Likewise.
751
752 2010-07-12  Jie Zhang  <jie@codesourcery.com>
753
754         * postreload.c (reg_symbol_ref[]): New.
755         (move2add_use_add2_insn): New.
756         (move2add_use_add3_insn): New.
757         (reload_cse_move2add): Handle SYMBOL + OFFSET case.
758         (move2add_note_store): Likewise.
759
760 2010-07-12  Joern Rennecke  <joern.rennecke@embecosm.com>
761
762         PR rtl-optimization/44752
763         * genautomata.c (main): Don't emit an empty file even if there
764         is no automaton.
765
766 2010-07-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
767
768         * config/i386/i386.c (ix86_sol10_return_in_memory): Rename to
769         ix86_solaris_return_in_memory.
770         * config/i386-protos.h: Reflect this.
771         * config/i386/vx-common.h (SUBTARGET_RETURN_IN_MEMORY): Likewise.
772         * config/i386/sol2-10.h (SUBTARGET_RETURN_IN_MEMORY): Likewise.
773         Move ...
774         * config/i386/sol2.h (SUBTARGET_RETURN_IN_MEMORY): ... here.
775
776 2010-07-12  Jie Zhang  <jie@codesourcery.com>
777
778         * config/arm/arm.c (arm_get_frame_offsets): Don't use r3 to
779         align the stack when it's going to be saved.
780
781 2010-07-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
782
783         PR pch/14940
784         * config/host-solaris.c (mmap_fixed): New function.
785         (sol_gt_pch_get_address): Use it.
786         (sol_gt_pch_use_address): Likewise.
787
788 2010-07-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
789
790         * config.gcc (i[34567]86-*-solaris2*): Default with_arch_32 to
791         pentiumpro on Solaris 8 and 9/x86.
792         * doc/install.texi (Specific, i?86-*-solaris2.[89]): Recommend GNU as.
793         Document SSE/SSE2 support.
794         * doc/sourcebuild.texi (Effective-Target Keywords): Document sse.
795
796 2010-07-12  Andi Kleen  <ak@linux.intel.com>
797
798         * lto-symtab.c (lto_symtab_merge_decls_1): Use fatal_error
799         instead of gcc_assert to print better error message for multiple
800         prevailing defs.
801
802 2010-07-12  Uros Bizjak  <ubizjak@gmail.com>
803
804         * config/i386/i386.c (ix86_asm_output_function_label): Change format
805         string placeholder from 0x%x to %#x.
806         (ix86_code_end): Use putc to output '\n'.
807         (ix86_print_operand) <case ';'>: Use putc to output ';'.
808
809 2010-07-11  Kai Tietz  <kai.tietz@onevision.com>
810
811         * config/i386/winnt.c (i386_pe_file_end): Quote symbol name
812         in directive -export.
813
814 2010-07-10  Anatoly Sokolov  <aesok@post.ru>
815
816         * reginfo.h (reg_classes_intersect_p): Change arguments type to
817         reg_class_t.
818         * rtl.h (reg_classes_intersect_p): Adjust prototype.
819
820         * config/rs6000/rs6000.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST):
821         Remove macros.
822         * config/rs6000/rs6000-protos.h (rs6000_register_move_cost,
823         rs6000_memory_move_cost): Remove
824         * config/rs6000/rs6000.c (TARGET_REGISTER_MOVE_COST,
825         TARGET_MEMORY_MOVE_COST): Define.
826         (rs6000_register_move_cost): Make static. Change arguments type from
827         enum reg_class to reg_class_t. Adjust rs6000_memory_move_cost calls.
828         (rs6000_memory_move_cost): Make static. Change arguments type from
829         'enum reg_class' to reg_class_t.
830
831 2010-07-10  Sandra Loosemore  <sandra@codesourcery.com>
832
833         PR middle-end/42505
834         * tree-inline.c (estimate_num_insns): Refactor builtin complexity
835         lookup code into....
836         * builtins.c (is_simple_builtin, is_inexpensive_builtin): ...these
837         new functions.
838         * tree.h (is_simple_builtin, is_inexpensive_builtin): Declare.
839         * cfgloopanal.c (target_clobbered_regs): Define.
840         (init_set_costs): Initialize target_clobbered_regs.
841         (estimate_reg_pressure_cost): Add call_p argument.  When true,
842         adjust the number of available registers to exclude the
843         call-clobbered registers.
844         * cfgloop.h (target_clobbered_regs): Declare.
845         (estimate_reg_pressure_cost): Adjust declaration.
846         * tree-ssa-loop-ivopts.c (struct ivopts_data): Add body_includes_call.
847         (ivopts_global_cost_for_size): Pass it to estimate_reg_pressure_cost.
848         (determine_set_costs): Dump target_clobbered_regs.
849         (loop_body_includes_call): New function.
850         (tree_ssa_iv_optimize_loop): Use it to initialize new field.
851         * loop-invariant.c (gain_for_invariant): Adjust arguments to pass
852         call_p flag through.
853         (best_gain_for_invariant): Likewise.
854         (find_invariants_to_move): Likewise.
855         (move_single_loop_invariants): Likewise, using already-computed
856         has_call field.
857
858 2010-07-10  Richard Guenther  <rguenther@suse.de>
859             Joern Rennecke  <joern.rennecke@embecosm.com>
860
861         PR debug/44832
862         * tree-ssa-live.c (mark_all_vars_used_1): Set TREE_USED for LABEL_DECL.
863         (remove_unused_scope_block_p): Don't drop TREE_USED LABEL_DECLs
864         unless they have DECL_IGNORED_P set.
865
866 2010-07-10  Richard Guenther  <rguenther@suse.de>
867
868         PR lto/44889
869         * gimple.c (gimple_fixup_complete_and_incomplete_subtype_p): New
870         helper function.
871         (gimple_types_compatible_p): Similar to pointed-to
872         types allow and merge a mix of complete and incomplete aggregate.
873         Use gimple_fixup_complete_and_incomplete_subtype_p for that.
874         (iterative_hash_gimple_type): Adjust for that.
875
876 2010-07-10  Richard Sandiford  <r.sandiford@uk.ibm.com>
877
878         * tree.h (DECL_REPLACEABLE_P): Strengthen check for weak symbols.
879
880 2010-07-10  Iain Sandoe  <iains@gcc.gnu.org>
881
882         PR objc/44140
883         * config/darwin.c (output_objc_section_asm_op): Save and restore
884         section when outputting ObjC section list.
885
886 2010-07-09  Jan Hubicka  <jh@suse.cz>
887
888         * lto-streamer-out.c (produce_symtab): Do not write alias
889         cgraph/varpool nodes.
890
891 2010-07-09  Jan Hubicka  <jh@suse.cz>
892
893         * tree-inline.c (declare_return_variable): Fix ICE while
894         inlining DECL_BY_VALUE function not in SSA form
895
896 2010-07-09  Changpeng Fang  <changpeng.fang@amd.com>
897
898         PR tree-optimization/44576
899         * tree-ssa-loop-prefetch.c (trip_count_to_ahead_ratio_too_small_p):
900         New.  Pull out from is_loop_prefetching_profitable to implement
901         the trip count to ahead ratio heuristic.
902         (mem_ref_count_reasonable_p): New.  Pull out from
903         is_loop_prefetching_profitable to implement the instruction to
904         memory reference ratio heuristic.  Also consider not reasonable if
905         the memory reference count is above a threshold (to avoid
906         explosive compilation time.
907         (insn_to_prefetch_ratio_too_small_p): New.  Pull out from
908         is_loop_prefetching_profitable to implement the instruction to
909         prefetch ratio heuristic.
910         (is_loop_prefetching_profitable): Removed.
911         (loop_prefetch_arrays): Distribute the cost analysis across the
912         function to allow early exit of the prefetch analysis.
913         is_loop_prefetching_profitable is splitted into three functions,
914         with each one called as early as possible.
915         (PREFETCH_MAX_MEM_REFS_PER_LOOP): New.  Threshold above which the
916         number of memory references in a loop is considered too many.
917
918 2010-07-09  Bernd Schmidt  <bernds@codesourcery.com>
919
920         * reload.c (find_reloads): Don't clear badop if we have a winreg
921         alternative, but not win, and the class only has fixed regs.
922         * hard-reg-set.h (class_only_fixed_regs): Declare.
923         * reginfo.c (class_only_fixed_regs): New array.
924         (init_reg_sets_1): Initialize it.
925         * config/arm/arm.md (arm_addsi3, thumb1_addsi3, arm_subsi3_insn): Don't
926         discourage alternatives using the stack pointer.
927
928         * config/arm/arm.md (addsi3_cbranch): Switch alternatives 0 and 1.
929
930         * config/arm/arm.md (Thumb-1 ldrsb peephole): New.
931
932         * config/arm/arm.md (cbranchqi4): Fix array size.
933         (addsi3_cbranch): Also andle alternative 2 like alternative 3 when
934         calculating length.
935
936 2010-07-09  Richard Guenther  <rguenther@suse.de>
937
938         * gimple.c (struct type_fixup_s): New struct and VEC type.
939         (gimple_register_type_fixups): New static global.
940         (gimple_queue_type_fixup): New function.
941         (gimple_types_compatible_p): Queue type fixups instead of
942         applying them here.
943         (gimple_register_type): Apply queued fixups for the
944         canonical type.  Empty the type fixup queue.
945
946 2010-07-09  Uros Bizjak  <ubizjak@gmail.com>
947
948         * configure.ac (gcc_cv_as_ix86_rep_lock_prefix): Fix test.
949         * configure: Regenerate.
950         * config.in: Ditto.
951
952 2010-07-09  Jakub Jelinek  <jakub@redhat.com>
953             Denys Vlasenko  <dvlasenk@redhat.com>
954             Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
955
956         PR tree-optimization/28632
957         * tree-vrp.c (zero_nonzero_bits_from_vr): New function.
958         (extract_range_from_binary_expr): Further optimize
959         BIT_AND_EXPR and BIT_IOR_EXPR.
960
961 2010-07-09  Sebastian Pop  <sebastian.pop@amd.com>
962
963         * tree-if-conv.c (fold_or_predicates): New.
964         (add_to_predicate_list): Call it.
965
966 2010-07-09  Richard Guenther  <rguenther@suse.de>
967
968         PR middle-end/44890
969         * tree-ssa-address.c (create_mem_ref_raw): Only build a MEM_REF
970         if base is a pointer.
971         * tree-cfg.c (verify_expr): Update MEM_REF checking.
972
973 2010-07-08  Michael Meissner  <meissner@linux.vnet.ibm.com>
974
975         PR target/44877
976         * config/rs6000/rs6000.c (rs6000_expand_builtin): Use
977         POINTER_TYPE_P instead of checking only for POINTER_TYPE for the
978         builtin mask for load/store builtins.
979
980 2010-07-09  Uros Bizjak  <ubizjak@gmail.com>
981
982         * configure.ac (gcc_cv_as_ix86_rep_lock_prefix): Also check
983         for "lock addl".
984         * configure: Regenerate.
985         * config/i386/i386.c (ix86_print_operand) <case ';'>:
986         Remove TARGET_MACHO.
987
988 2010-07-09  Peter Bergner  <bergner@vnet.ibm.com>
989
990         * config/rs6000/rs6000.c (rs6000_override_options): Fix setting of
991         default ISA flags.
992         * config/rs6000/rs6000.h (ASM_CPU_SPEC): Add -mvsx.
993
994 2010-07-09  Tom de Vries  <tjvries@xs4all.nl>
995
996         * tree.c (type_hash_if_marked_p): Removed non-ggc_marked_p clause.
997
998 2010-07-09  Hariharan Sandanagobalane  <hariharan@picochip.com>
999
1000         * config/picochip/picochip.md (commsTestPort): Emit more
1001         efficient sequence for tstport instruction.
1002
1003 2010-07-09  Uros Bizjak  <ubizjak@gmail.com>
1004
1005         * config/i386/i386.c (ix86_veclib_handler): Make static.
1006
1007 2010-07-09  Richard Guenther  <rguenther@suse.de>
1008
1009         PR tree-optimization/44852
1010         * tree-ssa-alias.c: Include toplev.h for exact_log2.
1011         (indirect_ref_may_alias_decl_p): Properly handle negative offsets
1012         in MEM_REF.
1013         (indirect_refs_may_alias_p): Likewise.
1014         * Makefile.in (tree-ssa-alias.o): Add $(TOPLEV_H).
1015
1016 2010-07-09  Richard Guenther  <rguenther@suse.de>
1017
1018         PR tree-optimization/44882
1019         * tree-vect-stmts.c (vectorizable_store): Do not assert alias
1020         sets do conflict.
1021         (vectorizable_load): Likewise.
1022
1023 2010-07-09  Bernd Schmidt  <bernds@codesourcery.com>
1024
1025         PR target/40657
1026         * config/arm/arm.c (thumb1_extra_regs_pushed): New arg FOR_PROLOGUE.
1027         All callers changed.
1028         Handle the case when we're called for the epilogue.
1029         (thumb_unexpanded_epilogue): Use it.
1030         (thumb1_expand_epilogue): Likewise.
1031
1032 2010-07-09  Jakub Jelinek  <jakub@redhat.com>
1033
1034         * tree-vrp.c (extract_range_from_binary_expr) <BIT_AND_EXPR>: If
1035         both ranges are range_int_cst_p with non-negative minimum,
1036         try harder to derive smaller range.
1037
1038 2010-07-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1039
1040         * genrecog.c: Include diagnostic-core.h before toplev.h.
1041         * genoutput.c: Likewise.
1042         * genextract.c: Likewise.
1043         * genautomata.c: Likewise.
1044         * genemit.c: Likewise.
1045         * genpeep.c: Likewise.
1046         * genattrtab.c: Likewise.
1047         * genconditions.c: Likewise.
1048         * genpreds.c: Likewise.
1049
1050 2010-07-08  Andi Kleen  <ak@linux.intel.com>
1051
1052         * lto-section-in.c (lto_section_name): Add missing comma.
1053
1054 2010-07-08  Anatoly Sokolov  <aesok@post.ru>
1055
1056         * config/ia64/ia64.h (OVERRIDE_OPTIONS): Remove macros.
1057         * config/ia64/ia64-protos.h (ia64_override_options): Remove.
1058         * config/ia64/ia64.c (TARGET_OPTION_OVERRIDE): Define.
1059         (ia64_override_options): Rename to...
1060         (ia64_option_override): ... this one. Make static.
1061
1062 2010-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1063
1064         PR middle-end/44843
1065         * emit-rtl.c (set_mem_attributes_minus_bitpos): Do not rely on the
1066         pointed-to type of the offset in a MEM_REF to compute the alignment.
1067
1068 2010-07-08  Kai Tietz  <kai.tietz@onevision.com>
1069
1070         * final.c (final_scan_insn): Replace
1071         TARGET_UNWIND_INFO macro check by unwind_emit
1072         hook NULL check.
1073         * targhooks.c (default_unwind_emit): Removed.
1074         * targhooks.h (default_unwind_emit): Likewise.
1075         * target.def (unwind_emit): Set default value to NULL.
1076
1077         * config/i386/i386-protos.h (ix86_asm_output_function_label):
1078         New prototype.
1079         * config/i386/i386.c (ix86_function_ms_hook_prologue): Check
1080         for NULL fntype argument and allow 64-bit targets.
1081         (ix86_asm_output_function_label): New function.
1082         (ix86_expand_prologue): Handle 64-bit ms hook prologue.
1083         (ix86_handle_fndecl_attribute): Likewise.
1084         * doc/extend.texi (ms_hook_prologue): Adjust documentation.
1085         * doc/doc/tm.texi: Regenerated.
1086         * doc/doc/doc/tm.texi.in (ASM_OUTPUT_FUNCTION_LABEL): New.
1087         (ASM_DECLARE_FUNCTION_NAME): Adjust documentation.
1088         * defaults.h (ASM_OUTPUT_FUNCTION_LABEL): New macro.
1089         * config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use
1090         ASM_OUTPUT_FUNCTION_LABEL instead of ASM_OUTPUT_LABEL.
1091         * config/elfos.h: Likewise.
1092         * config/i386/cygming.h: Likewise.
1093         * config/netbsd-aout.h: Likewise.
1094         * config/openbsd.h: Likewise.
1095         * config/i386/i386.h (ASM_OUTPUT_FUNCTION_LABEL): Override
1096         by ix86_asm_output_function_label function call.
1097         * varasm.c (assemble_start_function): Use
1098         ASM_OUTPUT_FUNCTION_LABEL instead of ASM_OUTPUT_LABEL.
1099
1100 2010-07-08  Jan Hubicka  <jh@suse.cz>
1101
1102         * cgraph.c (cgraph_will_be_removed_from_program_if_no_direct_calls):
1103         New function.
1104         * cgraph.h (cgraph_will_be_removed_from_program_if_no_direct_calls):
1105         Declare.
1106         * ipa-cp.c (ipcp_estimate_growth): Use it.
1107         * ipa-inline.c (cgraph_estimate_growth, cgraph_decide_inlining):
1108         Likewise.
1109
1110 2010-07-08  Jan Hubicka  <jh@suse.cz>
1111
1112         * tree-inline.c (declare_return_variable): Allocate annotation for new
1113         temporary.
1114
1115 2010-07-08  Sebastian Pop  <sebastian.pop@amd.com>
1116
1117         PR tree-optimization/44710
1118         * tree-if-conv.c (parse_predicate): New.
1119         (add_to_predicate_list): Call it, call maybe_fold_or_comparisons.
1120         Make sure that the predicates are either SSA_NAMEs or gimple_condexpr.
1121
1122 2010-07-08  Sebastian Pop  <sebastian.pop@amd.com>
1123
1124         * common.opt (ftree-loop-if-convert): New flag.
1125         * doc/invoke.texi (ftree-loop-if-convert): Documented.
1126         * tree-if-conv.c (gate_tree_if_conversion): Enable if-conversion
1127         when flag_tree_loop_if_convert is set.
1128
1129 2010-07-08  Uros Bizjak  <ubizjak@gmail.com>
1130
1131         * config/i386/i386.c: Use short syntax for function calls
1132         through function pointers.
1133         * config/i386/i386.md: Ditto.
1134
1135 2010-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1136
1137         * emit-rtl.c (set_mem_attributes_minus_bitpos): Fix formatting issues.
1138
1139 2010-07-08  Richard Guenther  <rguenther@suse.de>
1140
1141         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Fix
1142         stmt check for POINTER_PLUS_EXPRs, fix the pointer assignment.
1143
1144 2010-07-08  Jakub Jelinek  <jakub@redhat.com>
1145
1146         * dwarf2out.c (mem_loc_descriptor): Use DW_OP_const[48]u
1147         instead of DW_OP_addr for DW_OP_GNU_push_tls_address operand.
1148         (loc_list_from_tree): Likewise.
1149         (output_loc_operands): Handle outputting DW_OP_const[48]u
1150         with loc->dtprel set.
1151         (resolve_addr_in_expr): Handle loc->dtprel like DW_OP_addr.
1152
1153 2010-07-08  Jan Hubicka  <jh@suse.cz>
1154
1155         * ipa.c: Include pointer-set.h
1156         (cgraph_externally_visible_p): New attribute ALIASED;
1157         when in LTO, hidden symbols are local unless they are aliased.
1158         (function_and_variable_visibility): Compute aliased nodes;
1159         handle LTO and hidden symbol on functions and vars.
1160         * cgraph.c (cgraph_make_decl_local): Clear NAMED_SECTION
1161         for COMDAT symbols; handle COMDAT_GROUPS also at vars.
1162
1163 2010-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1164
1165         * config/i386/cygming.h (STACK_CHECK_STATIC_BUILTIN): Define to 1.
1166         * config/i386/freebsd.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
1167         * config/i386/linux.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
1168         * config/i386/linux64.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
1169         * config/i386/sol2.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
1170         * config/i386/i386.c (ix86_gen_adjust_stack_and_probe): New variable.
1171         (ix86_gen_probe_stack_range): Likewise.
1172         (override_options): Set them.
1173         (ix86_target_stack_probe): New function.
1174         (ix86_compute_frame_layout): Force use of push instructions to
1175         save registers if stack checking with probes is enabled.
1176         (get_scratch_register_on_entry): New function.
1177         (release_scratch_register_on_entry): Likewise.
1178         (ix86_adjust_stack_and_probe): Likewise.
1179         (output_adjust_stack_and_probe): Likewise.
1180         (ix86_emit_probe_stack_range): Likewise.
1181         (output_probe_stack_range): Likewise.
1182         (ix86_expand_prologue): Emit stack checking code if static built-in
1183         stack checking is enabled.
1184         Test ix86_target_stack_probe instead of TARGET_STACK_PROBE.
1185         * config/i386/i386-protos.h (ix86_target_stack_probe): Declare.
1186         (output_adjust_stack_and_probe): Likewise.
1187         (output_probe_stack_range): Likewise.
1188         * config/i386/i386.md (UNSPECV_PROBE_STACK_RANGE): New constant.
1189         (allocate_stack_worker_32): Test ix86_target_stack_probe instead of
1190         TARGET_STACK_PROBE.
1191         (allocate_stack_worker_64): Likewise.
1192         (allocate_stack): Likewise.
1193         (adjust_stack_and_probe): New insn.
1194         (probe_stack_range): Likewise.
1195
1196 2010-07-08  Richard Guenther  <rguenther@suse.de>
1197
1198         PR tree-optimization/44831
1199         * tree-ssa-phiprop.c (phiprop_insert_phi): Properly build
1200         a MEM_REF preserving TBAA info of the original dereference.
1201         Dereference the original pointer if the address is not invariant.
1202         (propagate_with_phi): Fixup type checks wrt MEM_REFs.  Require
1203         at least one invariant address that we are going to dereference.
1204
1205 2010-07-08  Richard Guenther  <rguenther@suse.de>
1206
1207         PR tree-optimization/44861
1208         * tree-vect-stmts.c (vectorizable_store): Preserve TBAA
1209         information when building MEM_REFs.
1210         (vectorizable_load): Likewise.
1211         * tree-vect-data-refs.c (vect_setup_realignment): Likewise.
1212
1213 2010-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1214
1215         * config/sol2-c.c: Do not include diagnostic-core.h.
1216
1217 2010-07-08  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1218
1219         PR bootstrap/44768
1220         * cfgexpand.c (estimated_stack_frame_size): Make self-contained
1221         with respect to current_function_decl. Pass decl of the function.
1222         * tree-inline.h (estimated_stack_frame_size): Adjust prototype.
1223         * ipa-inline.c (compute_inline_parameters): Pass decl to
1224         estimated_stack_frame_size.
1225
1226 2010-07-08  Richard Guenther  <rguenther@suse.de>
1227
1228         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
1229         New function.
1230         (valueize_refs): Call it.
1231
1232 2010-07-08  Richard Guenther  <rguenther@suse.de>
1233
1234         PR rtl-optimization/44838
1235         * tree-ssa-alias.c (indirect_refs_may_alias_p): When not in
1236         SSA form do not use pointer equivalence.
1237
1238 2010-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1239
1240         * dwarf2out.c (AT_linkage_name): Delete.
1241         (add_linkage_attr): New function.
1242         (add_linkage_name): Call it to emit the linkage attribute.
1243         (dwarf2out_finish): Likewise.
1244         (move_linkage_attr): Explicitly accept both attribute variants.
1245
1246 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1247
1248         * toplev.h: Do not include diagnostic-core.h.
1249         Include diagnostic-core.h in every file that includes toplev.h.
1250         * c-tree.h: Do not include toplev.h.
1251         * pretty-print.h: Update comment.
1252         * Makefile.in: Update dependencies.
1253         * alias.c: Include diagnostic-core.h in every file that includes
1254         toplev.h.
1255         * attribs.c: Likewise.
1256         * auto-inc-dec.c: Likewise.
1257         * bb-reorder.c: Likewise.
1258         * bt-load.c: Likewise.
1259         * caller-save.c: Likewise.
1260         * calls.c: Likewise.
1261         * cfg.c: Likewise.
1262         * cfganal.c: Likewise.
1263         * cfgbuild.c: Likewise.
1264         * cfgcleanup.c: Likewise.
1265         * cfghooks.c: Likewise.
1266         * cfgloop.c: Likewise.
1267         * combine.c: Likewise.
1268         * config/alpha/alpha.c: Likewise.
1269         * config/arc/arc.c: Likewise.
1270         * config/arm/arm.c: Likewise.
1271         * config/arm/pe.c: Likewise.
1272         * config/avr/avr.c: Likewise.
1273         * config/bfin/bfin.c: Likewise.
1274         * config/cris/cris.c: Likewise.
1275         * config/crx/crx.c: Likewise.
1276         * config/darwin-c.c: Likewise.
1277         * config/darwin.c: Likewise.
1278         * config/fr30/fr30.c: Likewise.
1279         * config/frv/frv.c: Likewise.
1280         * config/h8300/h8300.c: Likewise.
1281         * config/host-darwin.c: Likewise.
1282         * config/i386/i386.c: Likewise.
1283         * config/i386/netware.c: Likewise.
1284         * config/i386/nwld.c: Likewise.
1285         * config/i386/winnt-cxx.c: Likewise.
1286         * config/i386/winnt-stubs.c: Likewise.
1287         * config/i386/winnt.c: Likewise.
1288         * config/ia64/ia64-c.c: Likewise.
1289         * config/ia64/ia64.c: Likewise.
1290         * config/iq2000/iq2000.c: Likewise.
1291         * config/lm32/lm32.c: Likewise.
1292         * config/m32c/m32c-pragma.c: Likewise.
1293         * config/m32c/m32c.c: Likewise.
1294         * config/m32r/m32r.c: Likewise.
1295         * config/m68hc11/m68hc11.c: Likewise.
1296         * config/m68k/m68k.c: Likewise.
1297         * config/mcore/mcore.c: Likewise.
1298         * config/mep/mep-pragma.c: Likewise.
1299         * config/mep/mep.c: Likewise.
1300         * config/mmix/mmix.c: Likewise.
1301         * config/mn10300/mn10300.c: Likewise.
1302         * config/moxie/moxie.c: Likewise.
1303         * config/pa/pa.c: Likewise.
1304         * config/pdp11/pdp11.c: Likewise.
1305         * config/picochip/picochip.c: Likewise.
1306         * config/rs6000/rs6000-c.c: Likewise.
1307         * config/rs6000/rs6000.c: Likewise.
1308         * config/rx/rx.c: Likewise.
1309         * config/s390/s390.c: Likewise.
1310         * config/score/score.c: Likewise.
1311         * config/score/score3.c: Likewise.
1312         * config/score/score7.c: Likewise.
1313         * config/sh/sh.c: Likewise.
1314         * config/sh/symbian-base.c: Likewise.
1315         * config/sh/symbian-c.c: Likewise.
1316         * config/sh/symbian-cxx.c: Likewise.
1317         * config/sol2-c.c: Likewise.
1318         * config/sol2.c: Likewise.
1319         * config/sparc/sparc.c: Likewise.
1320         * config/spu/spu.c: Likewise.
1321         * config/stormy16/stormy16.c: Likewise.
1322         * config/v850/v850-c.c: Likewise.
1323         * config/v850/v850.c: Likewise.
1324         * config/vax/vax.c: Likewise.
1325         * config/vxworks.c: Likewise.
1326         * config/xtensa/xtensa.c: Likewise.
1327         * convert.c: Likewise.
1328         * cse.c: Likewise.
1329         * cselib.c: Likewise.
1330         * dbgcnt.c: Likewise.
1331         * dbxout.c: Likewise.
1332         * ddg.c: Likewise.
1333         * dominance.c: Likewise.
1334         * emit-rtl.c: Likewise.
1335         * explow.c: Likewise.
1336         * expmed.c: Likewise.
1337         * fixed-value.c: Likewise.
1338         * fold-const.c: Likewise.
1339         * fwprop.c: Likewise.
1340         * gcse.c: Likewise.
1341         * ggc-common.c: Likewise.
1342         * ggc-page.c: Likewise.
1343         * ggc-zone.c: Likewise.
1344         * gimple-low.c: Likewise.
1345         * gimplify.c: Likewise.
1346         * graph.c: Likewise.
1347         * haifa-sched.c: Likewise.
1348         * ifcvt.c: Likewise.
1349         * implicit-zee.c: Likewise.
1350         * integrate.c: Likewise.
1351         * ira-build.c: Likewise.
1352         * ira-color.c: Likewise.
1353         * ira-conflicts.c: Likewise.
1354         * ira-costs.c: Likewise.
1355         * ira-lives.c: Likewise.
1356         * ira.c: Likewise.
1357         * lists.c: Likewise.
1358         * loop-doloop.c: Likewise.
1359         * loop-iv.c: Likewise.
1360         * lto-opts.c: Likewise.
1361         * lto-symtab.c: Likewise.
1362         * main.c: Likewise.
1363         * modulo-sched.c: Likewise.
1364         * optabs.c: Likewise.
1365         * params.c: Likewise.
1366         * plugin.c: Likewise.
1367         * postreload-gcse.c: Likewise.
1368         * postreload.c: Likewise.
1369         * predict.c: Likewise.
1370         * profile.c: Likewise.
1371         * real.c: Likewise.
1372         * regcprop.c: Likewise.
1373         * reginfo.c: Likewise.
1374         * regmove.c: Likewise.
1375         * reorg.c: Likewise.
1376         * resource.c: Likewise.
1377         * rtl.c: Likewise.
1378         * rtlanal.c: Likewise.
1379         * sched-deps.c: Likewise.
1380         * sched-ebb.c: Likewise.
1381         * sched-rgn.c: Likewise.
1382         * sdbout.c: Likewise.
1383         * sel-sched-dump.c: Likewise.
1384         * sel-sched-ir.c: Likewise.
1385         * simplify-rtx.c: Likewise.
1386         * stmt.c: Likewise.
1387         * stor-layout.c: Likewise.
1388         * store-motion.c: Likewise.
1389         * targhooks.c: Likewise.
1390         * tree-cfg.c: Likewise.
1391         * tree-cfgcleanup.c: Likewise.
1392         * tree-dump.c: Likewise.
1393         * tree-eh.c: Likewise.
1394         * tree-inline.c: Likewise.
1395         * tree-nomudflap.c: Likewise.
1396         * tree-object-size.c: Likewise.
1397         * tree-optimize.c: Likewise.
1398         * tree-outof-ssa.c: Likewise.
1399         * tree-phinodes.c: Likewise.
1400         * tree-profile.c: Likewise.
1401         * tree-ssa-ccp.c: Likewise.
1402         * tree-ssa-coalesce.c: Likewise.
1403         * tree-ssa-live.c: Likewise.
1404         * tree-ssa-loop-niter.c: Likewise.
1405         * tree-ssa-loop-prefetch.c: Likewise.
1406         * tree-ssa-loop.c: Likewise.
1407         * tree-ssa-structalias.c: Likewise.
1408         * tree-ssa-uninit.c: Likewise.
1409         * tree-ssa.c: Likewise.
1410         * tree-vect-data-refs.c: Likewise.
1411         * tree-vect-loop-manip.c: Likewise.
1412         * tree-vect-loop.c: Likewise.
1413         * tree-vect-patterns.c: Likewise.
1414         * tree-vect-stmts.c: Likewise.
1415         * tree-vrp.c: Likewise.
1416         * varasm.c: Likewise.
1417         * vec.c: Likewise.
1418         * web.c: Likewise.
1419         * xcoffout.c: Likewise.
1420
1421 2010-07-07  Richard Sandiford  <rdsandiford@googlemail.com>
1422
1423         * gengtype.c (write_field_root): New function.
1424         (write_root): Use it.
1425
1426 2010-07-07  Wei Guozhi  <carrot@google.com>
1427
1428         * config/arm/thumb2.md (peephole2 to convert zero_extract/compare
1429         of lowest bits to lshift/compare): Add a missing line.
1430
1431 2010-07-07  Wei Guozhi  <carrot@google.com>
1432
1433         * config/arm/thumb2.md (peephole2 to convert zero_extract/compare
1434         of lowest bits to lshift/compare): New.
1435
1436 2010-07-07  Tom Tromey  <tromey@redhat.com>
1437
1438         * doc/tm.texi: Update.
1439         * doc/tm.texi.in (SDB and DWARF) <TARGET_WANT_DEBUG_PUB_SECTIONS>:
1440         Add @hook.
1441         * target.def (want_debug_pub_sections): New hook.
1442         * config/darwin.h (TARGET_WANT_DEBUG_PUB_SECTIONS): Define.
1443         * dwarf2out.c (add_pubname_string): Check
1444         targetm.want_debug_pub_sections.
1445         (add_pubname): Likewise.
1446         (add_pubtype): Likewise.
1447
1448 2010-07-07  Jie Zhang  <jie@codesourcery.com>
1449
1450         * genautomata.c (output_automata_list_min_issue_delay_code):
1451         Correctly decompress min_issue_delay.
1452
1453 2010-07-07  Bernd Schmidt  <bernds@codesourcery.com>
1454
1455         PR rtl-optimization/44404
1456         * auto-inc-dec.c (find_inc): Avoid calling count_occurrences if
1457         possible, use reg_overlap_mentioned_p instead.
1458
1459 2010-07-07  Duncan Sands  <baldrick@free.fr>
1460
1461         PR middle-end/41355
1462         * tree.c (build_function_type_skip_args): Copy the original type using
1463         build_distinct_type_copy rather than copy_node.
1464
1465 2010-07-07  H.J. Lu  <hongjiu.lu@intel.com>
1466
1467         PR target/44850
1468         * config/i386/i386.c (ix86_function_ms_hook_prologue): Revert
1469         revision 161876.
1470         (ix86_expand_prologue): Likewise.
1471         (ix86_handle_fndecl_attribute): Likewise.
1472         (ix86_asm_declare_function_name): Likewise.
1473         * config/i386/i386.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
1474         * config/i386/cygming.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
1475         (SUBTARGET_ASM_DECLARE_FUNCTION_NAME): Likewise.
1476         * config/i386/i386-protos.h (ix86_asm_declare_function_name): Likewise.
1477         * doc/extend.texi: Likewise.
1478
1479 2010-07-07  H.J. Lu  <hongjiu.lu@intel.com>
1480
1481         PR target/44844
1482         * config/i386/i386.md (rdrand<mode>): Changed to expand to
1483         retry if the carry flag isn't valid.
1484         (rdrand<mode>_1): New.
1485
1486 2010-07-07  Richard Guenther  <rguenther@suse.de>
1487
1488         PR middle-end/44790
1489         * expr.c (expand_expr_real_1): Go the POINTER_PLUS_EXPR path
1490         for expanding the constant offset for MEM_REFs.
1491
1492 2010-07-07  Richard Guenther  <rguenther@suse.de>
1493
1494         * tree-ssa-propagate.h (valid_gimple_call_p): Remove.
1495         * tree-ssa-propagate.c (valid_gimple_call_p): Make static.  Fix.
1496         * gimple.h (is_gimple_operand): Remove.
1497         * gimple.c (is_gimple_operand): Likewise.
1498         (walk_gimple_op): Fix wi->val_only setting for calls.
1499         * tree-cfg.c (verify_gimple_call): Fix argument validation.
1500         * tree-profile.c (tree_gen_ic_func_profiler): Do not create
1501         invalid gimple calls.
1502
1503 2010-07-06  Jan Hubicka  <jh@suse.cz>
1504
1505         * lto-cgraph.c (output_cgraph): Add missing declaration.
1506
1507 2010-07-06  Jan Hubicka  <jh@suse.cz>
1508
1509         * lto-cgraph.c (output_cgraph): Output toplevel asms only into first
1510         partition.
1511
1512 2010-07-06  Alexandre Oliva  <aoliva@redhat.com>
1513
1514         * doc/gimple.texi (GIMPLE_DEBUG): Document.
1515         * doc/rtl.texi (Debug Information): New node.
1516         (NOTE_INSN_VAR_LOCATION): Document.
1517         (debug_insn): Likewise.
1518         * doc/generic.texi (DEBUG_EXPR_DECL): Document.
1519
1520 2010-07-07  Jan Hubicka  <jh@suse.cz>
1521
1522         With parts by Richard Guenther.
1523
1524         PR middle-end/44813
1525         * tree-ssa-uninit.c (ssa_undefined_value_p): Result decl is defined
1526         for functions passed by reference.
1527         * tree.c (needs_to_live_in_memory): RESULT_DECL don't need to live
1528         in memory when passed by reference.
1529         * tree-ssa-ccp.c (get_default_value): Only VAR_DECL is undefined at
1530         beggining.
1531         * ipa-split.c (split_function): Cleanup way return value is passed;
1532         handle SSA DECL_BY_REFERENCE retvals.
1533         * tree-ssa.c (verify_def): Verify that RESULT_DECL is read only when
1534         DECL_BY_REFERENCE is set.
1535         * tree-ssa-structalias.c (get_constraint_for_ssa_var, get_fi_for_callee,
1536         find_what_p_points_to): Handle RESULT_DECL.
1537         * tree-inline.c (declare_return_variable): Get new entry_block argument;
1538         when passing by reference ensure that RESULT_DECL is gimple_val.
1539         (remap_gimple_op_r): Remap RESULT_DECL ssa name.
1540         (remap_gimple_stmt): Handle SSA DECL_BY_REFERENCE returns.
1541
1542 2010-07-07  Bernd Schmidt  <bernds@codesourcery.com>
1543
1544         PR rtl-optimization/44787
1545         * config/arm/arm.md (arith_shiftsi): Allow stack pointer in operand 2.
1546         * config/arm/thumb2.md (thumb2_arith_shiftsi): Likewise.
1547
1548 2010-07-06  Jan Hubicka  <jh@suse.cz>
1549
1550         * lto-symtab.c (lto_cgraph_replace_node): Handle aliases.
1551         (lto_symtab_resolve_can_prevail_p): Also alias of cgraph node
1552         with body can prevail.
1553         (lto_symtab_resolve_symbols): Use cgraph_get_node_or_alias.
1554         (lto_symtab_merge_cgraph_nodes_1): Do not remove nodes from aliases.
1555         * cgraph.c (cgraph_get_node_or_alias): New function.
1556         * cgraph.h (cgraph_get_node_or_alias): Declare.
1557
1558 2010-07-06  Kai Tietz  <kai.tietz@onevision.com>
1559
1560         * config/i386/i386.c (ix86_function_ms_hook_prologue): Enable x64
1561         support.
1562         (ix86_expand_prologue): Likewise.
1563         (ix86_handle_fndecl_attribute): Likewise.
1564         (ix86_asm_declare_function_name): New function for
1565         ASM_DECLARE_FUNCTION_NAME.
1566         * config/i386/i386.h (ASM_DECLARE_FUNCTION_NAME): New macro.
1567         * config/i386/cygming.h (ASM_DECLARE_FUNCTION_NAME): Removed.
1568         (SUBTARGET_ASM_DECLARE_FUNCTION_NAME): New macro.
1569         * config/i386/i386-protos.h (ix86_asm_declare_function_name): New.
1570         * doc/extend.texi: Adjust documentation about ms_hook_prologue
1571         attribute.
1572
1573 2010-07-06  Uros Bizjak  <ubizjak@gmail.com>
1574
1575         * config/i386/i386.md (immediate_operand): New mode attribute.
1576
1577         (pro_epilogue_adjust_stack_<mode>_1): Macroize insn from
1578         pro_epilogue_adjust_stack  and pro_epilogue_adjust_stack_rex64
1579         using P mode iterator.
1580         (pro_epilogue_adjust_stack_di_2): Rename from
1581         pro_epilogue_adjust_stack_rex64_2.
1582
1583         * config/i386/i386.c (pro_epilogue_adjust_stack): Update for rename.
1584
1585 2010-07-06  Uros Bizjak  <ubizjak@gmail.com>
1586
1587         * config/i386/i386.md (insv): Call gen_movdi_insv1 or gen_movsi_insv1
1588         through gen_mov_insv_1 function pointer.
1589         (fmod<mode>3): Call gen_truncxf<mode>2_i387_noop_unspec or
1590         gen_truncxf<mode>2 through gen_truncxf function pointer.
1591         (remainder<mode>3): Ditto.
1592         (cmpstrnsi): Rename cmp_insn function pointer to gen_cmp.
1593         (allocate_stack): Call gen_allocate_stack_worker_64 or
1594         gen_allocate_stack_worker_32 through gen_allocate_stack_worker
1595         function pointer.
1596         (probe_stack): Call gen_iordi3 or gen_iorsi3 through gen_ior3
1597         function pointer.
1598
1599 2010-07-06  Uros Bizjak  <ubizjak@gmail.com>
1600
1601         * config/i386/i386.md (*add<mode>3_cconly_overflow): Use <g>
1602         operand constraint instead of <r><i>m.
1603
1604 2010-07-06  Richard Guenther  <rguenther@suse.de>
1605
1606         PR middle-end/44828
1607         * convert.c (convert_to_integer): Watch out for overflowing
1608         MULT_EXPR as well.
1609
1610 2010-07-05  Jan Hubicka  <jh@suse.cz>
1611
1612         * lto-streamer.c (write_symbol_vec): Rename to ...
1613         (write_symbol) ... this one; write only symbol given and when
1614         present in cache. Sanity check that what is defined is present
1615         in cgraph/varpool with body/finalized decl.
1616         (write_symbols_of_kind): Remove.
1617         (produce_symtab): Take outputblock and sets; use cgraph/varpool/alias
1618         pairs to produce symtab.
1619         (produce_asm_for_decls): Update call of produce_symtab; don't do so
1620         when doing WPA streaming.
1621
1622 2010-07-05  Jan Hubicka  <jh@suse.cz>
1623
1624         * gimple-fold.c (gimple_fold_obj_type_ref_known_binfo): Check that
1625         function is still available to fold into.
1626
1627 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
1628
1629         * vec.h (FOR_EACH_VEC_ELT_REVERSE): New macro.
1630         * function.h (struct_function): Change type of local_decls field
1631         to a VEC.
1632         (add_local_decl): New function.
1633         (FOR_EACH_LOCAL_DECL): New macro.
1634         * cfgexpand.c (init_vars_expansion): Adjust for new type of
1635         cfun->local_decls.
1636         (estimated_stack_frame_size): Likewise.
1637         (expand_used_vars): Likewise.
1638         * cgraphbuild.c (build_cgraph_edges): Likewise.
1639         * function.c (instantiate_decls_1): Likewise.
1640         * ipa-struct-reorg.c (build_data_structure): Likewise.
1641         * ipa-type-escape.c (analyze_function): Likewise.
1642         * lto-streamer-in.c (input_function): Likewise.
1643         * lto-streamer-out.c (output_function): Likewise.
1644         * tree-ssa-live.c (remove_unused_locals): Likewise.
1645         * tree.c (free_lang_data_in_decl): Likewise.
1646         (find_decls_types_in_node): Likewise.
1647         * omp-low.c (remove_exit_barrier): Likewise.
1648         (expand_omp_taskreg): Likewise.
1649         (list2chain): Rename to...
1650         (vec2chain): ...this.  Adjust.
1651         * cgraphunit.c (assemble_thunk): Call add_local_decl.
1652         * tree-cfg.c (replace_by_duplicate_decl): Likewise.
1653         * gimple-low.c (record_vars_into): Likewise.
1654         * tree-inline.c (remap_decls): Likewise.
1655         (declare_return_variable): Likewise.
1656         (declare_inline_vars): Likewise.
1657         (copy_forbidden): Adjust for new type of cfun->local_decls.
1658         (add_local_variables): New function.
1659         (expand_call_inline): Call it.
1660         (tree_function_versioning): Likewise.
1661
1662 2010-07-05  H.J. Lu  <hongjiu.lu@intel.com>
1663
1664         AVX Programming Reference (June, 2010)
1665         * config/i386/cpuid.h (bit_F16C): New.
1666         (bit_RDRND): Likewise.
1667         (bit_FSGSBASE): Likewise.
1668
1669         * config/i386/i386-builtin-types.def: Add
1670         "DEF_FUNCTION_TYPE (UINT16)", function types for
1671         float16 <-> float conversions and
1672         "DEF_FUNCTION_TYPE (VOID, UINT64)".
1673
1674         * config/i386/i386-c.c (ix86_target_macros_internal): Support
1675         OPTION_MASK_ISA_FSGSBASE, OPTION_MASK_ISA_RDRND and
1676         OPTION_MASK_ISA_F16C.
1677
1678         * config/i386/i386.c (OPTION_MASK_ISA_FSGSBASE_SET): New.
1679         (OPTION_MASK_ISA_RDRND_SET): Likewise.
1680         (OPTION_MASK_ISA_F16C_SET): Likewise.
1681         (OPTION_MASK_ISA_FSGSBASE_UNSET): Likewise.
1682         (OPTION_MASK_ISA_RDRND_UNSET): Likewise.
1683         (OPTION_MASK_ISA_F16C_UNSET): Likewise.
1684         (OPTION_MASK_ISA_AVX_UNSET): Add OPTION_MASK_ISA_F16C_UNSET.
1685         (ix86_handle_option): Handle OPT_mfsgsbase, OPT_mrdrnd and OPT_mf16c.
1686         (ix86_target_string): Support -mfsgsbase, -mrdrnd and -mf16c.
1687         (pta_flags): Add PTA_FSGSBASE, PTA_RDRND and PTA_F16C.
1688         (override_options): Handle them.
1689         (ix86_valid_target_attribute_inner_p): Handle fsgsbase, rdrnd and f16c.
1690         (ix86_builtins): Add IX86_BUILTIN_RDFSBASE32,
1691         IX86_BUILTIN_RDFSBASE64, IX86_BUILTIN_RDGSBASE32,
1692         IX86_BUILTIN_RDGSBASE64, IX86_BUILTIN_WRFSBASE32,
1693         IX86_BUILTIN_WRFSBASE64, IX86_BUILTIN_WRGSBASE32,
1694         IX86_BUILTIN_WRGSBASE64, IX86_BUILTIN_RDRAND16,
1695         IX86_BUILTIN_RDRAND32, IX86_BUILTIN_RDRAND64,
1696         IX86_BUILTIN_CVTPH2PS, IX86_BUILTIN_CVTPH2PS256,
1697         IX86_BUILTIN_CVTPS2PH and IX86_BUILTIN_CVTPS2PH256.
1698         (bdesc_args): Likewise.
1699         (ix86_expand_args_builtin): Handle V8SF_FTYPE_V8HI,
1700         V4SF_FTYPE_V8HI, V8HI_FTYPE_V8SF_INT and V8HI_FTYPE_V4SF_INT.
1701         (ix86_expand_special_args_builtin): Handle VOID_FTYPE_UINT64,
1702         VOID_FTYPE_UNSIGNED, UNSIGNED_FTYPE_VOID and UINT16_FTYPE_VOID.
1703         Handle non-memory store.
1704
1705         * config/i386/i386.h (TARGET_FSGSBASE): New.
1706         (TARGET_RDRND): Likewise.
1707         (TARGET_F12C): Likewise.
1708
1709         * config/i386/i386.md (UNSPEC_VCVTPH2PS): New.
1710         (UNSPEC_VCVTPS2PH): Likewise.
1711         (UNSPECV_RDFSBASE): Likewise.
1712         (UNSPECV_RDGSBASE): Likewise.
1713         (UNSPECV_WRFSBASE): Likewise.
1714         (UNSPECV_WRGSBASE): Likewise.
1715         (UNSPECV_RDRAND): Likewise.
1716         (rdfsbase<mode>): Likewise.
1717         (rdgsbase<mode>): Likewise.
1718         (wrfsbase<mode>): Likewise.
1719         (wrgsbase<mode>): Likewise.
1720         (rdrand<mode>): Likewise.
1721
1722         * config/i386/i386.opt: Add -mfsgsbase, -mrdrnd and -mf16c.
1723
1724         * config/i386/immintrin.h (_rdrand_u16): New.
1725         (_rdrand_u32): Likewise.
1726         (_readfsbase_u32): Likewise.
1727         (_readfsbase_u64): Likewise.
1728         (_readgsbase_u32): Likewise.
1729         (_readgsbase_u64): Likewise.
1730         (_writefsbase_u32): Likewise.
1731         (_writefsbase_u64): Likewise.
1732         (_writegsbase_u32): Likewise.
1733         (_writegsbase_u64): Likewise.
1734         (_rdrand_u64): Likewise.
1735         (_cvtsh_ss): Likewise.
1736         (_mm_cvtph_ps): Likewise.
1737         (_mm256_cvtph_ps): Likewise.
1738         (_cvtss_sh): Likewise.
1739         (_mm_cvtps_ph): Likewise.
1740         (_mm256_cvtps_ph): Likewise.
1741
1742         * config/i386/sse.md (vcvtph2ps): New.
1743         (*vcvtph2ps_load): Likewise.
1744         (vcvtph2ps256): Likewise.
1745         (vcvtps2ph): Likewise.
1746         (*vcvtps2ph): Likewise.
1747         (*vcvtps2ph_store): Likewise.
1748         (vcvtps2ph256): Likewise.
1749
1750         * doc/extend.texi: Document FSGSBASE and RDRND built-in functions.
1751
1752         * doc/invoke.texi: Document -mfsgsbase, -mrdrnd and -mf16c.
1753
1754 2010-07-05  Joern Rennecke  <joern.rennecke@embecosm.com>
1755
1756         PR bootstrap/44512
1757         * genenums.c (main): Output include of insn-constants.h
1758         * Makefile.in (insn-enums.o): Depend on insn-constants.h.
1759
1760 2010-07-05  Uros Bizjak  <ubizjak@gmail.com>
1761
1762         * config/i386/i386.c (ix86_gen_allocate_stack_worker): New.
1763         (override_options): Initialize it.
1764         (ix86_expand_prologue): Use it.
1765
1766 2010-07-05  Jakub Jelinek  <jakub@redhat.com>
1767
1768         * tree-nrv.c (tree_nrv): Set DECL_VALUE_EXPR on found to result.
1769
1770 2010-07-05  Anatoly Sokolov  <aesok@post.ru>
1771
1772         * double-int.h (fit_double_type): Remove declaration.
1773         * double-int.c (fit_double_type): Remove function.
1774         * tree.h (int_fits_type_p): Adjust prototype.
1775         * tree.c (int_fits_type_p): Return bool. Use double_int_fits_to_tree_p
1776         instead of fit_double_type.
1777         (build_int_cst_type): Use double_int_to_tree and shwi_to_double_int
1778         instead of fit_double_type and build_int_cst_wide.
1779         * builtins.c (): Use double_int_fits_to_tree_p and double_int_to_tree
1780         instead of fit_double_type and build_int_cst_wide.
1781         (fold_builtin_object_size): Use double_int_fits_to_tree_p instead
1782         of fit_double_type.
1783
1784 2010-07-05  Jan Hubicka  <jh@suse.cz>
1785
1786         * cgraph.h (cgraph_node, cgraph_varpool_node): Update docmentation of
1787         in_other_partition.
1788         * lto-cgraph.c (referenced_from_other_partition_p,
1789         reachable_from_other_partition_p): Use in_other_partition flags.
1790         (output_node, output_varpool_node): COMDAT nodes always have private
1791         copies and thus are never used from other partition.
1792
1793 2010-07-05  Anatoly Sokolov  <aesok@post.ru>
1794
1795         * config/ia64/ia64.h (MEMORY_MOVE_COST): Remove macro.
1796         * config/ia64/t-ia64 (ia64.o): Depend on reload.h.
1797         * config/ia64/ia64.c Include reload.h.
1798         (ia64_memory_move_cost): New function.
1799         (TARGET_MEMORY_MOVE_COST): Define.
1800         (ia64_register_move_cost): Replace MEMORY_MOVE_COST with
1801         memory_move_cost.
1802
1803 2010-07-05  Sandra Loosemore  <sandra@codesourcery.com>
1804
1805         PR middle-end/42505
1806         * tree-ssa-loop-ivopts.c (determine_set_costs): Delete obsolete
1807         comments about cost model.
1808         (try_add_cand_for):  Add second strategy for choosing initial set
1809         based on original IVs, controlled by ORIGINALP argument.
1810         (get_initial_solution): Add ORIGINALP argument.
1811         (find_optimal_iv_set_1): New function, split from find_optimal_iv_set.
1812         (find_optimal_iv_set): Try two different strategies for choosing
1813         the IV set, and return the one with lower cost.
1814
1815 2010-07-05  Richard Guenther  <rguenther@suse.de>
1816
1817         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Copy alias info.
1818
1819 2010-07-05  Richard Guenther  <rguenther@suse.de>
1820
1821         * tree.c (reference_alias_ptr_type): New function.
1822         * tree.h (reference_alias_ptr_type): Declare.
1823         * tree-ssa-loop-ivopts.c (copy_ref_info): Restructure to
1824         allow non-TARGET_MEM_REF new refs.
1825         (rewrite_use_address): Pass old alias pointer type to create_mem_ref.
1826         * tree-ssa-address.c (create_mem_ref_raw): Get alias pointer type.
1827         Build a MEM_REF instead of a TARGET_MEM_REF if possible.
1828         (create_mem_ref): Get alias pointer type.  Adjust calls to
1829         create_mem_ref_raw.
1830         (maybe_fold_tmr): Likewise.
1831         * tree-flow.h (create_mem_ref): Adjust prototype.
1832
1833 2010-07-05  Jakub Jelinek  <jakub@redhat.com>
1834
1835         PR c++/44808
1836         * gimplify.c (gimplify_modify_expr): Only SET_DECL_DEBUG_EXPR if
1837         *from_p is VAR_DECL.
1838
1839 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
1840
1841         * tree.h (build_call_list): Remove.
1842         * tree.c (build_call_list): Remove.
1843
1844 2010-07-05  Richard Guenther  <rguenther@suse.de>
1845
1846         * double-int.h (double_int_sub): Declare.
1847         * double-int.c (double_int_sub): New function.
1848         * dwarf2out.c (field_byte_offset): Use it.
1849         * fixed-value.c (do_fixed_add): Likewise.
1850         (do_fixed_multiply): Likewise.
1851         (do_fixed_divide): Likewise.
1852         * tree-predcom.c (add_ref_to_chain): Likewise.
1853         (determine_roots_comp): Likewise.
1854         * tree-ssa-loop-niter.c (derive_constant_upper_bound_ops): Likewise.
1855
1856 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
1857
1858         * vec.h (VEC_splice, VEC_safe_splice): New macros.  Add function
1859         implementations.
1860
1861 2010-07-05  Bernd Schmidt  <bernds@codesourcery.com>
1862
1863         * config/arm/arm.c (get_arm_condition_code): Remove CC_NOTBmode case.
1864         * arm-modes.def (CC_NOTB): Don't define.
1865         * config/arm/arm.md (arm_adddi3): Generate canonical RTL.
1866         (adddi_sesidi_di, adddi_zesidi_di): Likewise.
1867         (LTUGEU): New code_iterator.
1868         (cnb, optab): New corresponding code_attrs.
1869         (addsi3_carryin_<optab>): Renamed from addsi3_carryin.  Change pattern
1870         to canonical form.  Operands 1 and 2 are commutative.  Parametrize
1871         using LTUGEU.
1872         (addsi3_carryin_shift_<optab>): Likewise.
1873         (addsi3_carryin_alt2_<optab>): Renamed from addsi3_carryin_alt2.
1874         Operands 1 and 2 are commutative.  Parametrize using LTUGEU.
1875         (addsi3_carryin_alt1, addsi3_carryin_alt3): Remove.
1876         (subsi3_compare): Renamed from subsi3_compare0_c.
1877         Change CC_NOTB to CC.
1878         (arm_subsi3_insn): Allow constants for operand 0.
1879         (compare_scc peephole for eq case): New.
1880         (compare_scc splitters): Change CC_NOTB to CC.
1881
1882 2010-07-05  Richard Guenther  <rguenther@suse.de>
1883
1884         * tree-ssa-loop-im.c (for_each_index): Do not handle
1885         ALIGN_INDIRECT_REF.
1886         (gen_lsm_tmp_name): Likewise.
1887         * tree-dump.c (dequeue_and_dump): Likewise.
1888         * tree-pretty-print.c (dump_generic_node): Likewise.
1889         (op_code_prio): Likewise.
1890         (op_symbol_code): Likewise.
1891         * tree.c (staticp): Likewise.
1892         (build1_stat): Likewise.
1893         * tree.h (INDIRECT_REF_P): Likewise.
1894         * fold-const.c (maybe_lvalue_p): Likewise.
1895         (operand_equal_p): Likewise.
1896         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
1897         (ao_ref_init_from_vn_reference): Likewise.
1898         * tree-ssa-loop-ivopts.c (idx_find_step): Likewise.
1899         (find_interesting_uses_address): Likewise.
1900         * dwarf2out.c (loc_list_from_tree): Likewise.
1901         * gimplify.c (gimplify_expr): Likewise.
1902         * tree-eh.c (tree_could_trap_p): Likewise.
1903         * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
1904         * cfgexpand.c (expand_debug_expr): Likewise.
1905         * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise.
1906         * tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise.
1907         * tree-cfg.c (verify_types_in_gimple_min_lval): Likewise.
1908         * config/rs6000/rs6000 (rs6000_check_sdmode): Likewise.
1909         * tree-ssa-operands.c (get_expr_operands): Likewise.
1910         * expr.c (safe_from_p): Likewise.
1911         (expand_expr_real_1): Likewise.  TER BIT_AND_EXPRs into MEM_REFs.
1912         * tree-vect-data-refs.c (vect_setup_realignment): Build
1913         BIT_AND_EXPR and MEM_REF instead of ALIGN_INDIRECT_REF.
1914         * tree-vect-stmts.c (vectorizable_load): Likewise.
1915         * tree.def (ALIGN_INDIRECT_REF): Remove.
1916
1917 2010-07-05  Richard Guenther  <rguenther@suse.de>
1918
1919         PR tree-optimization/44784
1920         * tree-ssa-pre.c (bitmap_find_leader): Fix dominance check
1921         for inserted stmts.
1922         (find_or_generate_expression): Fix SCCVN insertion check.
1923
1924 2010-07-05  Nathan Sidwell  <nathan@codesourcery.com>
1925
1926         * config/rs6000/e500crtsavg64gprctr.asm: Correct done label name.
1927         * config/rs6000/e500crtsav64gprctr.asm: Likewise.
1928         * config/rs6000/e500crtres64gprctr.asm: Likewise. Add FUNC_END
1929         directives.
1930
1931 2010-07-05  Ira Rosen  <irar@il.ibm.com>
1932
1933         * tree-vect-loop.c (vect_get_single_scalar_iteraion_cost): Skip
1934         statements that are not vectorized.
1935         * tree-vect-stmts.c (vect_get_load_cost): Update the value stored
1936         in INSIDE_COST.
1937
1938 2010-07-05  Mikael Pettersson  <mikpe@it.uu.se>
1939
1940         PR bootstrap/44820
1941         * config/arm/arm.c (arm_attr_length_move_neon): Delete regno.
1942
1943 2010-07-05  Richard Guenther  <rguenther@suse.de>
1944
1945         * tree-cfg.c (verify_gimple_return): Handle DECL_BY_REFERENCE
1946         RESULT_DECLs properly.
1947
1948 2010-07-04  H.J. Lu  <hongjiu.lu@intel.com>
1949
1950         PR rtl-optimization/44695
1951         * config/i386/i386.md (extract_code): Removed.
1952         (<u>divmodqi4): Likewise.
1953         (divmodqi4): New.
1954         (udivmodqi4): Likewise.
1955         (divmodhiqi3): Change div/mod to HImode and extend operand 2 to HImode.
1956         (udivmodhiqi3): Likewise.
1957
1958 2010-07-04  Jan Hubicka  <jh@suse.cz>
1959
1960         * lto-cgraph.c (input_edge): Do not care about resolution decisions.
1961
1962 2010-07-04  Jan Hubicka  <jh@suse.cz>
1963
1964         * cgraphunit.c (init_cgraph): Only initialize dump file if it
1965         is not already initialized.
1966
1967 2010-07-04  Richard Sandiford  <rdsandiford@googlemail.com>
1968
1969         * optabs.h (reload_in_optab, reload_out_optab, code_to_optab)
1970         (vcond_gen_code, vcondu_gen_code, movmem_optab, setmem_optab)
1971         (cmpstr_optab, cmpstrn_optab, cmpmem_optab, sync_add_optab)
1972         (sync_sub_optab, sync_ior_optab, sync_and_optab, sync_xor_optab)
1973         (sync_nand_optab, sync_old_add_optab, sync_old_sub_optab)
1974         (sync_old_ior_optab, sync_old_and_optab, sync_old_xor_optab)
1975         (sync_old_nand_optab, sync_new_add_optab, sync_new_sub_optab)
1976         (sync_new_ior_optab, sync_new_and_optab, sync_new_xor_optab)
1977         (sync_new_nand_optab): Redefine as macros.
1978         (sync_compare_and_swap, sync_lock_test_and_set, sync_lock_release):
1979         Delete.
1980         (direct_optab_index): New enum.
1981         (direct_optab_d): New structure.
1982         (direct_optab): New typedef.
1983         (direct_optab_table): Declare.
1984         (direct_optab_handler, set_direct_optab_handler): New functions.
1985         (sync_compare_and_swap_optab, sync_lock_test_and_set_optab)
1986         (sync_lock_release_optab): New macros.
1987         * optabs.c (direct_optab_table): New variable.
1988         (movcc_gen_code, vcond_gen_code, vcondu_gen_code): Delete.
1989         (prepare_cmp_insn): Use direct_optab_handler for cmpmem_optab,
1990         cmpstr_optab and cmpstrn_optab.
1991         (emit_conditional_move): Likewise for movcc_optab.
1992         (can_conditionally_move_p): Likewise for movcc_gen_code.
1993         (init_insn_codes): Clear direct_optab_table.
1994         (init_optabs): Don't initialize the new "direct optabs" here.
1995         (get_vcond_icode): Use direct_optab_handler for vcondu_gen_code and
1996         vcond_gen_code.
1997         (expand_val_compare_and_swap): Likewise sync_compare_and_swap_optab.
1998         (expand_bool_compare_and_swap): Likewise sync_compare_and_swap_optab.
1999         (expand_compare_and_swap_loop): Likewise sync_compare_and_swap_optab.
2000         (expand_sync_operation): Likewise other sync_*_optabs.
2001         (expand_sync_fetch_operation): Likewise.  Rename sync_compare_and_swap
2002         to sync_compare_and_swap_optab.
2003         (expand_sync_lock_test_and_set): Use direct_optab_handler for
2004         sync_lock_test_and_set and sync_compare_and_swap, adding "_optab"
2005         to the names of both.
2006         * builtins.c (expand_builtin_strcmp): Use direct_optab_handler for
2007         cmpstr_optab and cmpstrn_optab.
2008         (expand_builtin_lock_release): Likewise sync_lock_release.
2009         * expr.c (movmem_optab, setmem_optab, cmpstr_optab, cmpstrn_optab)
2010         (cmpmem_optab, sync_add_optab, sync_sub_optab, sync_ior_optab)
2011         (sync_and_optab, sync_xor_optab, sync_nand_optab, sync_old_add_optab)
2012         (sync_old_sub_optab, sync_old_ior_optab, sync_old_and_optab)
2013         (sync_old_xor_optab, sync_old_nand_optab, sync_new_add_optab)
2014         (sync_new_sub_optab, sync_new_ior_optab, sync_new_and_optab)
2015         (sync_new_xor_optab, sync_new_nand_optab, sync_compare_and_swap)
2016         (sync_lock_test_and_set, sync_lock_release): Delete.
2017         (emit_block_move_via_movmem): Use direct_optab_handler for movmem_optab.
2018         (emit_block_move_via_setmem): Use direct_optab_handler for setmem_optab.
2019         * genopinit.c (optabs): Use set_direct_optab_handler for the new
2020         macro optabs.
2021         * omp-low.c (expand_omp_atomic_fetch_op): Update the type of
2022         the "optab" local variable.  Use direct_optab_handler for optab and
2023         sync_compare_and_swap_optab.
2024         * reload1.c (reload_in_optab, reload_out_optab): Delete.
2025         * targhooks.c (default_secondary_reload): Use direct_optab_handler for
2026         reload_in_optab and reload_out_optab.
2027         * config/alpha/alpha.c (alpha_secondary_reload): Likewise.
2028         * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
2029         * config/pa/pa.c (pa_secondary_reload): Likewise.
2030         * java/builtins.c (compareAndSwapInt_builtin): Use direct_optab_handler
2031         for sync_compare_and_swap, renaming it to sync_compare_and_swap_optab.
2032         (compareAndSwapLong_builtin, compareAndSwapObject_builtin): Likewise.
2033         (VMSupportsCS8_builtin): Likewise.
2034
2035 2010-07-04  Richard Sandiford  <rdsandiford@googlemail.com>
2036
2037         * optabs.h (optab_handlers): Change type of insn_code to int.
2038         (optab_handler, set_optab_handler, convert_optab_handler)
2039         (set_convert_optab_handler): Treat the insn_code field as "insn_code -
2040         CODE_FOR_nothing".
2041         * optabs.c (optab_table, convert_optab_table): Always zero-initialize.
2042         (init_insn_codes): Zero both the above arrays.
2043         (init_optabs): Never call init_insn_codes first time around.
2044
2045 2010-07-04  Richard Sandiford  <rdsandiford@googlemail.com>
2046
2047         * optabs.h (optab_handler, convert_optab_handler): Turn into
2048         inline functions that return an insn code.
2049         (set_optab_handler, set_convert_optab_handler): New functions.
2050         * builtins.c: Replace optab_handler(X)->insn_code with
2051         optab_handler or set_optab_handler thoughout.  Likewise
2052         convert_optab_handler(X)->insn_code with convert_optab_handler
2053         and set_convert_optab_handler.
2054         * expmed.c, expr.c, genopinit.c, ifcvt.c, optabs.c, reload.c,
2055         reload1.c, stmt.c, targhooks.c, tree-ssa-loop-prefetch.c,
2056         tree-ssa-math-opts.c, tree-vect-data-refs.c, tree-vect-generic.c,
2057         tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c,
2058         tree-vect-stmts.c, config/m32c/m32c.c, config/rs6000/rs6000.c,
2059         config/spu/spu.c: Likewise.
2060
2061 2010-07-04  Kaz Kojima  <kkojima@gcc.gnu.org>
2062
2063         PR target/44531
2064         * config.gcc (sh*-*-*): Use regular expressions instead of
2065         the 'i' modifier for sed substitutions.
2066
2067 2010-07-04  Jeremie Salvucci  <jeremie.salvucci@free.fr>
2068
2069         * gimple.c (gimple_body): Comments added.
2070
2071 2010-07-04  Richard Guenther  <rguenther@suse.de>
2072
2073         PR middle-end/44809
2074         * gimplify.c (gimplify_expr): Properly build a MEM_REF instead
2075         of an INDIRECT_REF.
2076
2077 2010-07-04  Richard Guenther  <rguenther@suse.de>
2078
2079         PR tree-optimization/44479
2080         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Avoid
2081         extra SSA name copy statements which preserves points-to
2082         information.
2083         * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref):
2084         Copy points-to information for all pointers.  Properly handle
2085         MEM_REFs.
2086         (vect_create_data_ref_ptr): Likewise.  Avoid extra SSA name
2087         copy statements.
2088         * Makefile.in (tree-ssa-loop-ivopts.o): Add tree-ssa-propagate.h
2089         dependency.
2090
2091 2010-07-04  Richard Guenther  <rguenther@suse.de>
2092
2093         PR middle-end/44785
2094         * tree-inline.c (initialize_inlined_parameters): Do not
2095         re-use pointer-map slot over remap_type call.
2096
2097 2010-07-04  Richard Guenther  <rguenther@suse.de>
2098
2099         * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix last commit.
2100
2101 2010-07-04  Richard Guenther  <rguenther@suse.de>
2102
2103         PR tree-optimization/44656
2104         * tree-ssa-sccvn.c (vn_reference_lookup_3): Try disambiguation
2105         again after value-replacing in the defintions lhs.
2106
2107 2010-07-04  Ira Rosen  <irar@il.ibm.com>
2108             Revital Eres  <eres@il.ibm.com>
2109
2110         * doc/tm.texi.in (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST):
2111         Document new arguments.
2112         * doc/tm.texi: Regenerate.
2113         * targhooks.c (default_builtin_vectorization_cost): Add new arguments.
2114         Handle unaligned store.
2115         * targhooks.h (default_builtin_vectorization_cost): Add new arguments.
2116         * target.def (builtin_vectorization_cost): Add new arguments.
2117         * target.h (enum vect_cost_for_stmt): Add unaligned_store.
2118         * tree-vect-loop-manip.c (vect_gen_niters_for_prolog_loop): Take number
2119         of iterations of prolog loop directly from LOOP_PEELING_FOR_ALIGNMENT.
2120         (vect_vfa_segment_size): Fix indentation.
2121         * tree-vectorizer.h (struct _vect_peel_info): New.
2122         (struct _vect_peel_extended_info): New.
2123         (struct _loop_vec_info): Add new field for peeling hash table and a
2124         macro for its access.
2125         (VECT_MAX_COST): Define.
2126         (vect_get_load_cost): Declare.
2127         (vect_get_store_cost, vect_get_known_peeling_cost,
2128         vect_get_single_scalar_iteraion_cost): Likewise.
2129         (vect_supportable_dr_alignment): Add new argument.
2130         * tree-vect-loop.c (new_loop_vec_info): Initialize peeling hash table
2131         field.
2132         (destroy_loop_vec_info): Free peeling hash table.
2133         (vect_analyze_loop_form): Update call to builtin_vectorization_cost.
2134         (vect_analyze_loop): Move vect_enhance_data_refs_alignment before
2135         vect_analyze_slp. Fix indentation.
2136         (vect_get_single_scalar_iteraion_cost): New function.
2137         (vect_get_known_peeling_cost): Likewise.
2138         (vect_estimate_min_profitable_iters): Rename byte_misalign to npeel.
2139         Call vect_get_single_scalar_iteraion_cost instead of cost_for_stmt per
2140         statement. Move outside cost calculation inside unknown peeling case.
2141         Call vect_get_known_peeling_cost for known amount of peeling.
2142         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Add data
2143         reference to the print message of forced alignment.
2144         (vect_verify_datarefs_alignment): Update call to
2145         vect_supportable_dr_alignment.
2146         (vect_get_data_access_cost): New function.
2147         (vect_peeling_hash, vect_peeling_hash_eq, vect_peeling_hash_insert,
2148         vect_peeling_hash_get_most_frequent, vect_peeling_hash_get_lowest_cost,
2149         vect_peeling_hash_choose_best_peeling): Likewise.
2150         (vect_enhance_data_refs_alignment): Fix documentation. Use hash table
2151         to store all the accesses in the loop and find best possible access to
2152         align using peeling for known alignment case. For unknown alignment
2153         check if stores are preferred or if peeling is worthy.
2154         (vect_find_same_alignment_drs): Analyze pairs of loads too.
2155         (vect_supportable_dr_alignment): Add new argument and check aligned
2156         accesses according to it.
2157         * tree-vect-stmts.c (vect_get_stmt_cost): New function.
2158         (cost_for_stmt): Call vect_get_stmt_cost.
2159         (vect_model_simple_cost): Likewise.
2160         (vect_model_store_cost): Call vect_get_stmt_cost. Call
2161         vect_get_store_cost to calculate the cost of the statement.
2162         (vect_get_store_cost): New function.
2163         (vect_model_load_cost): Call vect_get_stmt_cost. Call
2164         vect_get_load_cost to calculate the cost of the statement.
2165         (vect_get_load_cost): New function.
2166         (vectorizable_store): Update call to vect_supportable_dr_alignment.
2167         (vectorizable_load): Likewise.
2168         * config/spu/spu.c (spu_builtin_vectorization_cost): Add new arguments.
2169         * config/i386/i386.c (ix86_builtin_vectorization_cost): Add new
2170         arguments. Handle unaligned store.
2171         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): New.
2172         (rs6000_builtin_support_vector_misalignment): Return true for word and
2173         double word alignments for VSX.
2174         * tree-vect-slp.c (vect_build_slp_tree): Update calls to
2175         vect_supportable_dr_alignment and builtin_vectorization_cost.
2176
2177 2010-07-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2178
2179         PR target/44597
2180         * config/pa/predicates.md (prefetch_cc_operand): Remove.
2181         (prefetch_nocc_operand): Likewise.
2182         * config/pa/pa.md (prefetch): Revise expander to use prefetch_20.
2183         (prefetch_20): New insn.
2184         (prefetch_cc): Remove.
2185         (prefetch_nocc): Likewise.
2186
2187 2010-07-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2188
2189         * expr.c (vector_mode_valid_p): Move to c-common.c.
2190         * expr.h (vector_mode_valid_p): Do not declare here.
2191         * system.h: Poison GCC_EXPR_H in front-ends.
2192         * Makefile.in: Update dependencies.
2193
2194 2010-07-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2195
2196         PR target/44705
2197         * config/pa/pa.h (GO_IF_LEGITIMATE_ADDRESS): Reject LABEL_REF.
2198
2199 2010-07-03  Jan Hubicka  <jh@suse.cz>
2200
2201         * timevar.def (TV_OUT_OF_SSA, TV_VAR_EXPAND, TV_POST_EXPAND,
2202         TV_VAR_TRACKING_DATAFLOW, TV_VAR_TRACKING_EMIT): New timevars.
2203         * cfgexpand.c (gimple_expand_cfg): Use new timevars.
2204         * var-tracking.c (vt_find_locations, variable_tracking_main_1):
2205         Likewise.
2206
2207         * lto-stramer-out.c (pass_ipa_lto_gimple_out, pass_ipa_lto_finish_out):
2208         Update timevars.V
2209         * timevar.def (TV_IPA_LTO_GIMPLE_IO, TV_IPA_LTO_DECL_IO): Remove.
2210         (TV_IPA_LTO_GIMPLE_IN, TV_IPA_LTO_GIMPLE_OUT, TV_IPA_LTO_DECL_IN,
2211         TV_IPA_LTO_DECL_OUT): New.
2212         * lto.c (read_cgraph_and_symbols, materialize_cgraph): Update timevars.
2213
2214 2010-07-03  Jan Hubicka  <jh@suse.cz>
2215
2216         * ipa-inline.c (update_edge_key): Break out from ...
2217         update_callers_keys): ... here;
2218         (update_callee_keys): Update only the edges from caller to callee.
2219         (update_all_calle_keys): Do what update_calle_keys did.
2220         (decide_inlining_of_small_functions): Avoid recomputing of all
2221         callees when badness increase.
2222
2223 2010-07-03  Jie Zhang  <jie@codesourcery.com>
2224
2225         * config/arm/arm.c (arm_attr_length_move_neon): New.
2226         * config/arm/arm-protos.h (arm_attr_length_move_neon): Declare.
2227         * config/arm/neon.md (define_mode_attr V_slen): Remove.
2228         (neon_mov<mode> for VSTRUCT): Use arm_attr_length_move_neon
2229         to compute length attribute.
2230
2231 2010-07-03  Jie Zhang  <jie@codesourcery.com>
2232
2233         * config/arm/vfp.md (*push_multi_vfp): Use vfp_register_operand
2234         as predicate for operand 1 and remove its constraint.
2235         * config/arm/predicates.md (vfp_register_operand): New.
2236         * config/arm/arm.md (*push_multi): Remove the constraint of operand 1.
2237         (*push_fp_multi): Likewise.
2238
2239 2010-07-03  Eric Botcazou  <ebotcazou@adacore.com>
2240
2241         * gimplify.c (mostly_copy_tree_r): Deal with BIND_EXPR.
2242
2243 2010-07-03  Jan Hubicka  <jh@suse.cz>
2244
2245         * config/i386/i386.c (override_options): Revert accidental commit.
2246
2247 2010-07-02  Le-Chun Wu  <lcwu@google.com>
2248
2249         PR c++/44128
2250         * doc/invoke.texi: Update documentation of -Wshadow.
2251
2252 2010-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
2253             Julian Brown  <julian@codesourcery.com>
2254             Sandra Loosemore <sandra@codesourcery.com>
2255
2256         * config/arm/arm.c (arm_canonicalize_comparison): Canonicalize DImode
2257         comparisons.  Adjust to take both operands.
2258         (arm_select_cc_mode): Handle DImode comparisons.
2259         (arm_gen_compare_reg): Generate a scratch register for DImode
2260         comparisons which require one.  Use xor for Thumb equality checks.
2261         (arm_const_double_by_immediates): New.
2262         (arm_print_operand): Allow 'Q' and 'R' for constants.
2263         (get_arm_condition_code): Handle new CC_CZmode and CC_NCVmode.
2264         * config/arm/arm.h (CANONICALIZE_COMPARISON): Always use
2265         arm_canonicalize_comparison.
2266         * config/arm/arm-modes.def: Add CC_CZmode and CC_NCVmode.
2267         * config/arm/arm-protos.h (arm_canonicalize_comparison): Update
2268         prototype.
2269         (arm_const_double_by_immediates): Declare.
2270         * config/arm/constraints.md (Di): New constraint.
2271         * config/arm/predicates.md (arm_immediate_di_operand)
2272         (arm_di_operand, cmpdi_operand): New.
2273         * config/arm/arm.md (cbranchdi4): Handle non-Cirrus also.
2274         (*arm_cmpdi_insn, *arm_cmpdi_unsigned)
2275         (*arm_cmpdi_zero, *thumb_cmpdi_zero): New insns.
2276         (cstoredi4): Handle non-Cirrus also.
2277
2278 2010-07-02  Julian Brown  <julian@codesourcery.com>
2279             Sandra Loosemore <sandra@codesourcery.com>
2280
2281         PR target/43703
2282         * config/arm/vec-common.md (add<mode>3, sub<mode>3, smin<mode>3)
2283         (smax<mode>3): Disable for NEON float modes when
2284         flag_unsafe_math_optimizations is false.
2285         * config/arm/neon.md (*add<mode>3_neon, *sub<mode>3_neon)
2286         (*mul<mode>3_neon)
2287         (mul<mode>3add<mode>_neon, mul<mode>3neg<mode>add<mode>_neon)
2288         (reduc_splus_<mode>, reduc_smin_<mode>, reduc_smax_<mode>): Disable
2289         for NEON float modes when flag_unsafe_math_optimizations is false.
2290         (quad_halves_<code>v4sf): Only enable if
2291         flag_unsafe_math_optimizations is true.
2292         * doc/invoke.texi (ARM Options): Add note about floating point
2293         vectorization requiring -funsafe-math-optimizations.
2294
2295 2010-07-02  Sandra Loosemore  <sandra@codesourcery.com>
2296             Julian Brown  <julian@codesourcery.com>
2297
2298         * config/arm/neon.md (UNSPEC_VABA): Delete.
2299         (UNSPEC_VABAL): Delete.
2300         (UNSPEC_VABS): Delete.
2301         (UNSPEC_VMUL_N): Delete.
2302         (adddi3_neon): New.
2303         (subdi3_neon): New.
2304         (mul<mode>3add<mode>_neon): Make the pattern named.
2305         (mul<mode>3neg<mode>add<mode>_neon): Likewise.
2306         (neon_vadd<mode>): Replace with define_expand, and move the remaining
2307         unspec parts...
2308         (neon_vadd<mode>_unspec): ...to this.
2309         (neon_vmla<mode>, neon_vmla<mode>_unspec): Likewise.
2310         (neon_vlms<mode>, neon_vmls<mode>_unspec): Likewise.
2311         (neon_vsub<mode>, neon_vsub<mode>_unspec): Likewise.
2312         (neon_vaba<mode>): Rewrite in terms of vabd.
2313         (neon_vabal<mode>): Rewrite in terms of vabdl.
2314         (neon_vabs<mode>): Rewrite without unspec.
2315         * config/arm/arm.md (*arm_adddi3): Disable for TARGET_NEON.
2316         (*arm_subdi3): Likewise.
2317         * config/arm/neon.ml (Vadd, Vsub): Split out 64-bit variants and add
2318         No_op attribute to disable assembly output checks.
2319         * config/arm/arm_neon.h: Regenerated.
2320         * doc/arm-neon-intrinsics.texi: Regenerated.
2321
2322 2010-07-02  Jan Hubicka  <jh@suse.cz>
2323
2324         * ipa-split.c (split_function): For aggregate values, set the return
2325         slot optimization bit.  When passing DECL_BY_REFERENCE, produce
2326         *<retval> = fncall.part ().
2327         (execute_split_functions): Do not care about DECL_BY_REFERENCE.
2328
2329 2010-07-02  Sandra Loosemore  <sandra@codesourcery.com>
2330
2331         * config/arm/neon.md (UNSPEC_VAND): Delete.
2332         (UNSPEC_VBIC): Delete.
2333         (UNSPEC_VCLZ): Delete.
2334         (UNSPEC_VCNT): Delete.
2335         (UNSPEC_VEOR): Delete.
2336         (UNSPEC_VORN): Delete.
2337         (UNSPEC_VORR): Delete.
2338         (iordi3_neon): Rewrite RTL without unspec.  Add alternatives to handle
2339         core registers too.
2340         (anddi3_neon): Likewise.
2341         (orndi3_neon): Likewise.
2342         (bicdi3_neon): Likewise.
2343         (xordi3_neon): Likewise.
2344         (neon_vclz<mode>): Rewrite as define_expand and clz<mode>2 to get
2345         rid of unspec and handle unused operand.
2346         (neon_vcnt<mode>): Similarly, with popcount<mode>2.
2347         * config/arm/predicates.md (imm_for_neon_logic_operand):
2348         Require TARGET_NEON.
2349         (imm_for_neon_inv_logic_operand): Likewise.
2350         * config/arm/arm.md (define_split for logical_binary_operator):
2351         Disable for NEON registers.
2352         (anddi3): Add new define_expand, and rename the insn.  Disable
2353         this insn for NEON, where anddi3_neon now applies.
2354         (*anddi_notdi_di): Disable for TARGET_NEON, where bicdi3_neon applies.
2355         (iordi3): As for anddi3.
2356         (xordi3): Likewise.
2357         * config/arm/neon.ml (Vand): Split DImode variants and mark them
2358         as No_op to disable testing for exact instruction match.
2359         (Vorr): Likewise.
2360         (Veor): Likewise.
2361         (Vbic): Likewise.
2362         (Vorn): Likewise.
2363         * config/arm/arm_neon.h: Regenerated.
2364         * doc/arm-neon-intrinsics.texi: Regenerated.
2365
2366 2010-07-02  Eric Botcazou  <ebotcazou@adacore.com>
2367
2368         * expr.h (emit_stack_probe): Declare.
2369         * explow.c (emit_stack_probe): Make global.
2370         (anti_adjust_stack_and_probe): Fix comments.
2371         * config/sparc/linux.h (STACK_CHECK_STATIC_BUILTIN): Define to 1.
2372         * config/sparc/linux64.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
2373         * config/sparc/sol2.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
2374         * config/sparc/sparc.c: Include except.h.
2375         (sparc_emit_probe_stack_range): New function.
2376         (output_probe_stack_range): Likewise.
2377         (sparc_expand_prologue): Invoke sparc_emit_probe_stack_range if static
2378         built-in stack checking is enabled.
2379         * config/sparc/sparc-protos.h (output_probe_stack_range): Declare.
2380         * config/sparc/sparc.md (UNSPECV_PROBE_STACK_RANGE): New constant.
2381         (probe_stack_range): New insn.
2382
2383 2010-07-02  Richard Guenther  <rguenther@suse.de>
2384
2385         PR target/43958
2386         * config/pa/pa.c (hppa_gimplify_va_arg_expr): Use pointer arithmetic
2387         for argument alignment.
2388
2389 2010-07-02  Jan Hubicka  <jh@suse.cz>
2390
2391         * ipa-split.c (verify_non_ssa_vars): Break out from ...; perform DFS
2392         walk backwards from entry_bb to check only those basic block of header
2393         that might lead to execution of split part.
2394         (consider_split) ... here.
2395         (find_return_bb): Allow assignment in return BB.
2396         (find_retval): New.
2397         (split_function): Fix name of cloned function; take care of updating
2398         return value in return_bb containing move.
2399
2400 2010-07-02  Andreas Schwab  <schwab@linux-m68k.org>
2401
2402         PR target/44771
2403         * config/m68k/m68k.c (m68k_expand_prologue): Remove set but not
2404         used variable insn.
2405
2406 2010-07-02  Eric Botcazou  <ebotcazou@adacore.com>
2407
2408         * implicit-zee.c (combine_reaching_defs): Fix long lines.
2409         (is_set_with_extension_DI): Delete.
2410         (struct zero_extend_info): New structure.
2411         (add_removable_zero_extend): New function.
2412         (find_removable_zero_extends): Use note_stores to find SETs.
2413         (find_and_remove_ze): Fix long line, remove superfluous parentheses.
2414
2415 2010-07-02  Changpeng Fang  <changpeng.fang@amd.com>
2416
2417         * tree-ssa-loop-prefetch.c (compute_miss_rate): Rename to
2418         is_miss_rate_acceptable. Pull total_positions computation
2419         out of the loops.  Early return if miss_positions exceeds
2420         the acceptable threshold.
2421         * tree-ssa-loop-prefetch.c (prune_ref_by_group_reuse): Call
2422         is_miss_rate_acceptable after renaming of compute_miss_rate.
2423
2424 2010-07-02  Changpeng Fang  <changpeng.fang@amd.com>
2425
2426         PR middle-end/44576
2427         * tree-ssa-loop-prefetch.c (compute_miss_rate): Return 1000 (out
2428         of 1000) for miss rate if the address diference is greater than or
2429         equal to the cache line size (the two reference will never hit the
2430         same cache line).
2431
2432 2010-07-02  Bernd Schmidt  <bernds@codesourcery.com>
2433
2434         PR target/42835
2435         * config/arm/arm-modes.def (CC_NOTB): New mode.
2436         * config/arm/arm.c (get_arm_condition_code): Handle it.
2437         * config/arm/thumb2.md (thumb2_compare_scc): Delete pattern.
2438         * config/arm/arm.md (subsi3_compare0_c): New pattern.
2439         (compare_scc): Now a define_and_split.  Add a number of extra
2440         splitters before it.
2441
2442         PR target/42172
2443         * config/arm/arm.c (thumb1_rtx_costs): Improve support for SIGN_EXTEND
2444         and ZERO_EXTEND.
2445         (arm_rtx_costs_1): Likewise.
2446         (arm_size_rtx_costs): Use arm_rtx_costs_1 for these codes.
2447         * config/arm/arm.md (is_arch6): New attribute.
2448         (zero_extendhisi2, zero_extendqisi2, extendhisi2,
2449         extendqisi2): Tighten the code somewhat, avoiding invalid
2450         RTL to occur in the expander patterns.
2451         (thumb1_zero_extendhisi2): Merge with thumb1_zero_extendhisi2_v6.
2452         (thumb1_zero_extendhisi2_v6): Delete.
2453         (thumb1_extendhisi2): Merge with thumb1_extendhisi2_v6.
2454         (thumb1_extendhisi2_v6): Delete.
2455         (thumb1_extendqisi2): Merge with thumb1_extendhisi2_v6.
2456         (thumb1_extendqisi2_v6): Delete.
2457         (zero_extendhisi2 for register input splitter): New.
2458         (zero_extendqisi2 for register input splitter): New.
2459         (thumb1_extendhisi2 for register input splitter): New.
2460         (extendhisi2 for register input splitter): New.
2461         (extendqisi2 for register input splitter): New.
2462         (TARGET_THUMB1 extendqisi2 for memory input splitter): New.
2463         (arm_zero_extendhisi2): Allow nonimmediate_operand for operand 1,
2464         and add support for a register alternative requiring a split.
2465         (thumb1_zero_extendqisi2): Likewise.
2466         (arm_zero_extendqisi2): Likewise.
2467         (arm_extendhisi2): Likewise.
2468         (arm_extendqisi2): Likewise.
2469
2470 2010-07-02  Sandra Loosemore  <sandra@codesourcery.com>
2471
2472         * config/arm/arm.c (neon_vdup_constant): Expand into canonical RTL
2473         instead of an unspec.
2474         (neon_expand_vector_init): Likewise.
2475         * config/arm/neon.md (UNSPEC_VCOMBINE): Delete.
2476         (UNSPEC_VDUP_LANE): Delete.
2477         (UNSPEC VDUP_N): Delete.
2478         (UNSPEC_VGET_HIGH): Delete.
2479         (UNSPEC_VGET_LANE): Delete.
2480         (UNSPEC_VGET_LOW): Delete.
2481         (UNSPEC_VMVN): Delete.
2482         (UNSPEC_VSET_LANE): Delete.
2483         (V_double_vector_mode): New.
2484         (vec_set<mode>_internal): Make code emitted match that for the
2485         corresponding intrinsics.
2486         (vec_setv2di_internal): Likewise.
2487         (neon_vget_lanedi): Rewrite to expand into emit_move_insn.
2488         (neon_vget_lanev2di): Rewrite to expand into vec_extractv2di.
2489         (neon_vset_lane<mode>): Combine double and quad patterns and
2490         expand into vec_set<mode>_internal instead of UNSPEC_VSET_LANE.
2491         (neon_vset_lanedi): Rewrite to expand into emit_move_insn.
2492         (neon_vdup_n<mode>): Rewrite RTL without unspec.
2493         (neon_vdup_ndi): Rewrite as define_expand and use emit_move_insn.
2494         (neon_vdup_nv2di): Rewrite RTL without unspec and merge with
2495         with neon_vdup_lanev2di, adjusting the pattern from the latter
2496         to be predicable for consistency.
2497         (neon_vdup_lane<mode>_internal): New.
2498         (neon_vdup_lane<mode>): Turn into a define_expand and rewrite
2499         to avoid using an unspec.
2500         (neon_vdup_lanedi): Rewrite RTL pattern to avoid unspec.
2501         (neon_vdup_lanev2di): Turn into a define_expand.
2502         (neon_vcombine): Rewrite pattern to eliminate UNPSEC_VCOMBINE.
2503         (neon_vget_high<mode>): Replace with....
2504         (neon_vget_highv16qi): New pattern using canonical RTL.
2505         (neon_vget_highv8hi): Likewise.
2506         (neon_vget_highv4si): Likewise.
2507         (neon_vget_highv4sf): Likewise.
2508         (neon_vget_highv2di): Likewise.
2509         (neon_vget_low<mode>): Replace with....
2510         (neon_vget_lowv16qi): New pattern using canonical RTL.
2511         (neon_vget_lowv8hi): Likewise.
2512         (neon_vget_lowv4si): Likewise.
2513         (neon_vget_lowv4sf): Likewise.
2514         (neon_vget_lowv2di): Likewise.
2515
2516         * config/arm/neon.ml (Vget_lane): Add No_op attribute to suppress
2517         test for this emitting vmov.
2518         (Vset_lane): Likewise.
2519         (Vdup_n): Likewise.
2520         (Vmov_n): Likewise.
2521
2522         * doc/arm-neon-intrinsics.texi: Regenerated.
2523
2524 2010-07-02  Sandra Loosemore  <sandra@codesourcery.com>
2525
2526         * config/arm/neon.md (vec_extractv2di): Correct error in register
2527         numbering to reconcile with neon_vget_lanev2di.
2528
2529 2010-07-02  Richard Guenther  <rguenther@suse.de>
2530
2531         * tree-ssa-structalias.c (pt_solution_set_var): New function.
2532         * tree-ssa-alias.h (pt_solution_set_var): Declare.
2533         * tree-ssa-loop-ivopts.c (copy_ref_info): Also copy or create
2534         points-to information.
2535
2536 2010-07-02  Christian Borntraeger  <borntraeger@de.ibm.com>
2537
2538         * config/s390/s390.c (override_options): Adopt prefetching
2539         at -O3 to handle flag_prefetch_loop_arrays as a tristate.
2540
2541 2010-07-02  Jan Hubicka  <jh@suse.cz>
2542
2543         * df-problems.c (df_kill_notes): Do not collect dead  notes.
2544         (df_set_note): Just call add_reg_note.
2545         (df_set_unused_notes_for_mw, df_set_dead_notes_for_mw,
2546         df_create_unused_note): Do not deal with lists of old notes.
2547         (df_note_bb_compute): Likewise.
2548
2549 2010-07-02  Richard Guenther  <rguenther@suse.de>
2550
2551         * tree-ssa-structalias.c (find_func_aliases): Handle
2552         pointer alignment via BIT_AND_EXPR.
2553         * tree-vrp.c (extract_range_from_binary_expr): Likewise.
2554
2555 2010-07-02  Richard Guenther  <rguenther@suse.de>
2556
2557         * tree-data-ref.c (initialize_data_dependence_relation): Handle
2558         mismatching number of dimensions properly.
2559
2560 2010-07-02  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
2561
2562         PR target/44707
2563         * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Recognize
2564         (lo_sum (high ...) ...) patterns generated by earlier passes.
2565
2566 2010-07-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2567
2568         * doc/install.texi (Prerequisites): Document Perl requirement on
2569         Solaris 2.
2570         (Specific, *-*-solaris2*): Document GNU c++filt requirement.
2571
2572 2010-07-02  Richard Guenther  <rguenther@suse.de>
2573
2574         PR middle-end/44777
2575         * tree-cfg.c (gimple_block_ends_with_call_p): Handle empty BBs.
2576
2577 2010-07-02  Jan Hubicka  <jh@suse.cz>
2578
2579         PR middle-end/44706
2580         * predict.c (predict_paths_for_bb): Handle case when control dependence
2581         BB has only abnormal edges.
2582
2583 2010-07-02  Richard Guenther  <rguenther@suse.de>
2584
2585         PR tree-optimization/44748
2586         * tree-ssa-ccp.c (fold_const_aggregate_ref): Properly handle
2587         the embedded conversion in MEM_REFs.
2588
2589 2010-07-01  López-Ibáñez  <manu@gcc.gnu.org>
2590
2591         * reload.c: Include toplev.h.
2592         * recog.c:  Likewise.
2593         * Makefile.in: Adjust dependencies.
2594
2595 2010-07-01  Jakub Jelinek  <jakub@redhat.com>
2596
2597         PR debug/44694
2598         * dwarf2out.c (reg_loc_descriptor): For eliminated arg_pointer_rtx
2599         or frame_pointer_rtx use DW_OP_fbreg offset DW_OP_stack_value.
2600
2601 2010-07-01  Richard Guenther  <rguenther@suse.de>
2602
2603         * emit-rtl.c (set_mem_attributes_minus_bitpos): Use unsigned
2604         types for offsets.
2605
2606 2010-07-01  Joern Rennecke  <joern.rennecke@embecosm.com>
2607
2608         PR target/44732
2609         * config/ia64/ia64.c (ia64_register_move_cost): Remove stray '{'.
2610         Fix argument types.
2611
2612 2010-07-01  Bernd Schmidt  <bernds@codesourcery.com>
2613
2614         PR target/44727
2615         * config/i386/i386.md (peephole2 for arithmetic ops with memory):
2616         Make sure operand 0 dies.
2617
2618 2010-07-01  Richard Guenther  <rguenther@suse.de>
2619
2620         PR middle-end/42834
2621         PR middle-end/44468
2622         * doc/gimple.texi (is_gimple_mem_ref_addr): Document.
2623         * doc/generic.texi (References to storage): Document MEM_REF.
2624         * tree-pretty-print.c (dump_generic_node): Handle MEM_REF.
2625         (print_call_name): Likewise.
2626         * tree.c (recompute_tree_invariant_for_addr_expr): Handle MEM_REF.
2627         (build_simple_mem_ref_loc): New function.
2628         (mem_ref_offset): Likewise.
2629         * tree.h (build_simple_mem_ref_loc): Declare.
2630         (build_simple_mem_ref): Define.
2631         (mem_ref_offset): Declare.
2632         * fold-const.c: Include tree-flow.h.
2633         (operand_equal_p): Handle MEM_REF.
2634         (build_fold_addr_expr_with_type_loc): Likewise.
2635         (fold_comparison): Likewise.
2636         (fold_unary_loc): Fold
2637         VIEW_CONVERT_EXPR <T1, MEM_REF <T2, ...>> to MEM_REF <T1, ...>.
2638         (fold_binary_loc): Fold MEM[&MEM[p, CST1], CST2] to MEM[p, CST1 + CST2],
2639         fold MEM[&a.b, CST2] to MEM[&a, offsetof (a, b) + CST2].
2640         * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle MEM_REF.
2641         (ptr_deref_may_alias_ref_p_1): Likewise.
2642         (ao_ref_base_alias_set): Properly differentiate base object for
2643         offset and TBAA.
2644         (ao_ref_init_from_ptr_and_size): Use MEM_REF.
2645         (indirect_ref_may_alias_decl_p): Handle MEM_REFs properly.
2646         (indirect_refs_may_alias_p): Likewise.
2647         (refs_may_alias_p_1): Likewise.  Remove pointer SSA name def
2648         chasing code.
2649         (ref_maybe_used_by_call_p_1): Handle MEM_REF.
2650         (call_may_clobber_ref_p_1): Likewise.
2651         * dwarf2out.c (loc_list_from_tree): Handle MEM_REF.
2652         * expr.c (expand_assignment): Handle MEM_REF.
2653         (store_expr): Handle MEM_REFs from STRING_CSTs.
2654         (store_field): If expanding a MEM_REF of a non-addressable
2655         decl use bitfield operations.
2656         (get_inner_reference): Handle MEM_REF.
2657         (expand_expr_addr_expr_1): Likewise.
2658         (expand_expr_real_1): Likewise.
2659         * tree-eh.c (tree_could_trap_p): Handle MEM_REF.
2660         * alias.c (ao_ref_from_mem): Handle MEM_REF.
2661         (get_alias_set): Likewise.  Properly handle VIEW_CONVERT_EXPRs.
2662         * tree-data-ref.c (dr_analyze_innermost): Handle MEM_REF.
2663         (dr_analyze_indices): Likewise.
2664         (dr_analyze_alias): Likewise.
2665         (object_address_invariant_in_loop_p): Likewise.
2666         * gimplify.c (mark_addressable): Handle MEM_REF.
2667         (gimplify_cond_expr): Build MEM_REFs.
2668         (gimplify_modify_expr_to_memcpy): Likewise.
2669         (gimplify_init_ctor_preeval_1): Handle MEM_REF.
2670         (gimple_fold_indirect_ref): Adjust.
2671         (gimplify_expr): Handle MEM_REF.  Gimplify INDIRECT_REF to MEM_REF.
2672         * tree.def (MEM_REF): New tree code.
2673         * tree-dfa.c: Include toplev.h.
2674         (get_ref_base_and_extent): Handle MEM_REF.
2675         (get_addr_base_and_unit_offset): New function.
2676         * emit-rtl.c (set_mem_attributes_minus_bitpos): Handle MEM_REF.
2677         * gimple-fold.c (may_propagate_address_into_dereference): Handle
2678         MEM_REF.
2679         (maybe_fold_offset_to_array_ref): Allow possibly out-of bounds
2680         accesses if the array has just one dimension.  Remove always true
2681         parameter.  Do not require type compatibility here.
2682         (maybe_fold_offset_to_component_ref): Remove.
2683         (maybe_fold_stmt_indirect): Remove.
2684         (maybe_fold_reference): Remove INDIRECT_REF handling.
2685         Fold back to non-MEM_REF.
2686         (maybe_fold_offset_to_address): Simplify.  Deal with type
2687         mismatches here.
2688         (maybe_fold_reference): Likewise.
2689         (maybe_fold_stmt_addition): Likewise.  Also handle
2690         &ARRAY + I in addition to &ARRAY[0] + I.
2691         (fold_gimple_assign): Handle ADDR_EXPR of MEM_REFs.
2692         (gimple_get_relevant_ref_binfo): Handle MEM_REF.
2693         * cfgexpand.c (expand_debug_expr): Handle MEM_REF.
2694         * tree-ssa.c (useless_type_conversion_p): Make most pointer
2695         conversions useless.
2696         (warn_uninitialized_var): Handle MEM_REF.
2697         (maybe_rewrite_mem_ref_base): New function.
2698         (execute_update_addresses_taken): Implement re-writing of MEM_REFs
2699         to SSA form.
2700         * tree-inline.c (remap_gimple_op_r): Handle MEM_REF, remove
2701         INDIRECT_REF handling.
2702         (copy_tree_body_r): Handle MEM_REF.
2703         * gimple.c (is_gimple_addressable): Adjust.
2704         (is_gimple_address): Likewise.
2705         (is_gimple_invariant_address): ADDR_EXPRs of MEM_REFs with
2706         invariant base are invariant.
2707         (is_gimple_min_lval): Adjust.
2708         (is_gimple_mem_ref_addr): New function.
2709         (get_base_address): Handle MEM_REF.
2710         (count_ptr_derefs): Likewise.
2711         (get_base_loadstore): Likewise.
2712         * gimple.h (is_gimple_mem_ref_addr): Declare.
2713         (gimple_call_fndecl): Handle invariant MEM_REF addresses.
2714         * tree-cfg.c (verify_address): New function, split out from ...
2715         (verify_expr): ... here.  Use for verifying ADDR_EXPRs and
2716         the address operand of MEM_REFs.  Verify MEM_REFs.  Reject
2717         INDIRECT_REFs.
2718         (verify_types_in_gimple_min_lval): Handle MEM_REF.  Disallow
2719         INDIRECT_REF.  Allow conversions.
2720         (verify_types_in_gimple_reference): Verify VIEW_CONVERT_EXPR of
2721         a register does not change its size.
2722         (verify_types_in_gimple_reference): Verify MEM_REF.
2723         (verify_gimple_assign_single): Disallow INDIRECT_REF.
2724         Handle MEM_REF.
2725         * tree-ssa-operands.c (opf_non_addressable, opf_not_non_addressable):
2726         New.
2727         (mark_address_taken): Handle MEM_REF.
2728         (get_indirect_ref_operands): Pass through opf_not_non_addressable.
2729         (get_asm_expr_operands): Pass opf_not_non_addressable.
2730         (get_expr_operands): Handle opf_[not_]non_addressable.
2731         Handle MEM_REF.  Remove INDIRECT_REF handling.
2732         * tree-vrp.c: (check_array_ref): Handle MEM_REF.
2733         (search_for_addr_array): Likewise.
2734         (check_array_bounds): Likewise.
2735         (vrp_stmt_computes_nonzero): Adjust for MEM_REF.
2736         * tree-ssa-loop-im.c (for_each_index): Handle MEM_REF.
2737         (ref_always_accessed_p): Likewise.
2738         (gen_lsm_tmp_name): Likewise.  Handle ADDR_EXPR.
2739         * tree-complex.c (extract_component): Do not handle INDIRECT_REF.
2740         Handle MEM_REF.
2741         * cgraphbuild.c (mark_load): Properly check for NULL result
2742         from get_base_address.
2743         (mark_store): Likewise.
2744         * tree-ssa-loop-niter.c (array_at_struct_end_p): Handle MEM_REF.
2745         * tree-loop-distribution.c (generate_builtin): Exchange INDIRECT_REF
2746         handling for MEM_REF.
2747         * tree-scalar-evolution.c (follow_ssa_edge_expr): Handle
2748         &MEM[ptr + CST] similar to POINTER_PLUS_EXPR.
2749         * builtins.c (stabilize_va_list_loc): Use the function ABI
2750         valist type if we couldn't canonicalize the argument type.
2751         Always dereference with the canonical va-list type.
2752         (maybe_emit_free_warning): Handle MEM_REF.
2753         (fold_builtin_memory_op): Simplify and handle MEM_REFs in folding
2754         memmove to memcpy.
2755         * builtins.c (fold_builtin_memory_op): Use ref-all types
2756         for all memcpy foldings.
2757         * omp-low.c (build_receiver_ref): Adjust for MEM_REF.
2758         (build_outer_var_ref): Likewise.
2759         (scan_omp_1_op): Likewise.
2760         (lower_rec_input_clauses): Likewise.
2761         (lower_lastprivate_clauses): Likewise.
2762         (lower_reduction_clauses): Likewise.
2763         (lower_copyprivate_clauses): Likewise.
2764         (expand_omp_atomic_pipeline): Likewise.
2765         (expand_omp_atomic_mutex): Likewise.
2766         (create_task_copyfn): Likewise.
2767         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle MEM_REF.
2768         Remove old union trick.  Initialize constant offsets.
2769         (ao_ref_init_from_vn_reference): Likewise.  Do not handle
2770         INDIRECT_REF.  Init base_alias_set properly.
2771         (vn_reference_lookup_3): Replace INDIRECT_REF handling with MEM_REF.
2772         (vn_reference_fold_indirect): Adjust for MEM_REFs.
2773         (valueize_refs): Fold MEM_REFs.  Re-evaluate constant offset
2774         for ARRAY_REFs.
2775         (may_insert): Remove.
2776         (visit_reference_op_load): Do not test may_insert.
2777         (run_scc_vn): Remove parameter, do not fiddle with may_insert.
2778         * tree-ssa-sccvn.h (struct vn_reference_op_struct): Add
2779         a field to store the constant offset this op applies.
2780         (run_scc_vn): Adjust prototype.
2781         * cgraphunit.c (thunk_adjust): Adjust for MEM_REF.
2782         * tree-ssa-ccp.c (ccp_fold): Replace INDIRECT_REF folding with
2783         MEM_REF.  Propagate &foo + CST as &MEM[&foo, CST].  Do not
2784         bother about volatile qualifiers on pointers.
2785         (fold_const_aggregate_ref): Handle MEM_REF, do not handle INDIRECT_REF.
2786         * tree-ssa-loop-ivopts.c
2787         * tree-ssa-loop-ivopts.c (determine_base_object): Adjust for MEM_REF.
2788         (strip_offset_1): Likewise.
2789         (find_interesting_uses_address): Replace INDIRECT_REF handling with
2790         MEM_REF handling.
2791         (get_computation_cost_at): Likewise.
2792         * ipa-pure-const.c (check_op): Handle MEM_REF.
2793         * tree-stdarg.c (check_all_va_list_escapes): Adjust for MEM_REF.
2794         * tree-ssa-sink.c (is_hidden_global_store): Handle MEM_REF
2795         and constants.
2796         * ipa-inline.c (likely_eliminated_by_inlining_p): Handle MEM_REF.
2797         * tree-parloops.c (take_address_of): Adjust for MEM_REF.
2798         (eliminate_local_variables_1): Likewise.
2799         (create_call_for_reduction_1): Likewise.
2800         (create_loads_for_reductions): Likewise.
2801         (create_loads_and_stores_for_name): Likewise.
2802         * matrix-reorg.c (may_flatten_matrices_1): Sanitize.
2803         (ssa_accessed_in_tree): Handle MEM_REF.
2804         (ssa_accessed_in_assign_rhs): Likewise.
2805         (update_type_size): Likewise.
2806         (analyze_accesses_for_call_stmt): Likewise.
2807         (analyze_accesses_for_assign_stmt): Likewise.
2808         (transform_access_sites): Likewise.
2809         (transform_allocation_sites): Likewise.
2810         * tree-affine.c (tree_to_aff_combination): Handle MEM_REF.
2811         * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Do
2812         not handle INDIRECT_REF.
2813         * tree-ssa-phiopt.c (add_or_mark_expr): Handle MEM_REF.
2814         (cond_store_replacement): Likewise.
2815         * tree-ssa-pre.c (create_component_ref_by_pieces_1): Handle
2816         MEM_REF, no not handle INDIRECT_REFs.
2817         (insert_into_preds_of_block): Properly initialize avail.
2818         (phi_translate_1): Fold MEM_REFs.  Re-evaluate constant offset
2819         for ARRAY_REFs.  Properly handle reference lookups that
2820         require a bit re-interpretation.
2821         (can_PRE_operation): Do not handle INDIRECT_REF.  Handle MEM_REF.
2822         * tree-sra.c (build_access_from_expr_1): Handle MEM_REF.
2823         (build_ref_for_offset_1): Remove.
2824         (build_ref_for_offset): Build MEM_REFs.
2825         (gate_intra_sra): Disable for now.
2826         (sra_ipa_modify_expr): Handle MEM_REF.
2827         (ipa_early_sra_gate): Disable for now.
2828         * tree-sra.c (create_access): Swap INDIRECT_REF handling for
2829         MEM_REF handling.
2830         (disqualify_base_of_expr): Likewise.
2831         (ptr_parm_has_direct_uses): Swap INDIRECT_REF handling for
2832         MEM_REF handling.
2833         (sra_ipa_modify_expr): Remove INDIRECT_REF handling.
2834         Use mem_ref_offset.  Remove bogus folding.
2835         (build_access_from_expr_1): Properly handle MEM_REF for non IPA-SRA.
2836         (make_fancy_name_1): Add support for MEM_REF.
2837         * tree-predcom.c (ref_at_iteration): Handle MEM_REFs.
2838         * tree-mudflap.c (mf_xform_derefs_1): Adjust for MEM_REF.
2839         * ipa-prop.c (compute_complex_assign_jump_func): Handle MEM_REF.
2840         (compute_complex_ancestor_jump_func): Likewise.
2841         (ipa_analyze_virtual_call_uses): Likewise.
2842         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Replace
2843         INDIRECT_REF folding with more generalized MEM_REF folding.
2844         (tree_ssa_forward_propagate_single_use_vars): Adjust accordingly.
2845         (forward_propagate_addr_into_variable_array_index): Also handle
2846         &ARRAY + I in addition to &ARRAY[0] + I.
2847         * tree-ssa-dce.c (ref_may_be_aliased): Handle MEM_REF.
2848         * tree-ssa-ter.c (find_replaceable_in_bb): Avoid TER if that
2849         creates assignments with overlap.
2850         * tree-nested.c (get_static_chain): Adjust for MEM_REF.
2851         (get_frame_field): Likewise.
2852         (get_nonlocal_debug_decl): Likewise.
2853         (convert_nonlocal_reference_op): Likewise.
2854         (struct nesting_info): Add mem_refs pointer-set.
2855         (create_nesting_tree): Allocate it.
2856         (convert_local_reference_op): Insert to be folded mem-refs.
2857         (fold_mem_refs): New function.
2858         (finalize_nesting_tree_1): Perform defered folding of mem-refs
2859         (free_nesting_tree): Free the pointer-set.
2860         * tree-vect-stmts.c (vectorizable_store): Adjust for MEM_REF.
2861         (vectorizable_load): Likewise.
2862         * tree-ssa-phiprop.c (phiprop_insert_phi): Adjust for MEM_REF.
2863         (propagate_with_phi): Likewise.
2864         * tree-object-size.c (addr_object_size): Handle MEM_REFs
2865         instead of INDIRECT_REFs.
2866         (compute_object_offset): Handle MEM_REF.
2867         (plus_stmt_object_size): Handle MEM_REF.
2868         (collect_object_sizes_for): Dispatch to plus_stmt_object_size
2869         for &MEM_REF.
2870         * tree-flow.h (get_addr_base_and_unit_offset): Declare.
2871         (symbol_marked_for_renaming): Likewise.
2872         * Makefile.in (tree-dfa.o): Add $(TOPLEV_H).
2873         (fold-const.o): Add $(TREE_FLOW_H).
2874         * tree-ssa-structalias.c (get_constraint_for_1): Handle MEM_REF.
2875         (find_func_clobbers): Likewise.
2876         * ipa-struct-reorg.c (decompose_indirect_ref_acc): Handle MEM_REF.
2877         (decompose_access): Likewise.
2878         (replace_field_acc): Likewise.
2879         (replace_field_access_stmt): Likewise.
2880         (insert_new_var_in_stmt): Likewise.
2881         (get_stmt_accesses): Likewise.
2882         (reorg_structs_drive): Disable.
2883         * config/i386/i386.c (ix86_va_start): Adjust for MEM_REF.
2884         (ix86_canonical_va_list_type): Likewise.
2885
2886 2010-06-30  Joern Rennecke  <joern.rennecke@embecosm.com>
2887
2888         PR other/44566
2889         * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define.
2890         * target.def (struct gcc_target): Replace enum reg_class with
2891         reg_class_t in hook argument / return types.
2892         * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise.
2893         (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise.
2894         (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise.
2895         * targhooks.h (default_branch_target_register_class): Likewise.
2896         (default_ira_cover_classes, default_secondary_reload): Likewise.
2897         (default_memory_move_cost, default_register_move_cost): Likewise.
2898         * targhooks.c (default_branch_target_register_class): Likewise.
2899         (default_ira_cover_classes, default_secondary_reload): Likewise.
2900         (default_memory_move_cost, default_register_move_cost): Likewise.
2901         * reload.c (push_secondary_reload, secondary_reload_class): Likewise.
2902         * bt-load.c (branch_target_load_optimize): Likewise.
2903         * ira.c (setup_cover_and_important_classes): Likewise.
2904         * ira-costs.c (copy_cost): Likewise.
2905         * reload1.c (emit_input_reload_insns): Likewise.
2906         * config/alpha/alpha.c (alpha_secondary_reload): Likewise.
2907         * config/frv/frv.c (frv_secondary_reload): Likewise.
2908         * config/s390/s390.c (s390_secondary_reload): Likewise.
2909         * config/i386/i386.c (i386_ira_cover_classes): Likewise.
2910         (ix86_secondary_reload, ix86_memory_move_cost): Likewise.
2911         (ix86_register_move_cost): Likewise.
2912         * config/sh/sh-protos.h (sh_secondary_reload): Likewise.
2913         * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise.
2914         * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise.
2915         * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise.
2916         * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise.
2917         (rs6000_ira_cover_classes): Likewise.
2918         * config/picochip/picochip.c (picochip_secondary_reload): Likewise.
2919         * config/picochip/picochip-protos.h (picochip_secondary_reload):
2920         Likewise.
2921         * config/pa/pa.c (pa_secondary_reload): Likewise.
2922         * config/mips/mips.c (mips_ira_cover_classes): Likewise.
2923         * config/bfin/bfin.c (bfin_secondary_reload): Likewise.
2924         * config/ia64/ia64.c (ia64_register_move_cost): Likewise.
2925         * doc/tm.texi: Regenerate.
2926
2927 2010-06-30  Sebastian Pop  <sebastian.pop@amd.com>
2928
2929         PR bootstrrap/44726
2930         * graphite-sese-to-poly.c (build_poly_dr): Avoid uninitialized
2931         use.
2932         (build_alias_set_optimal_p): Likewise.
2933         (build_base_obj_set_for_drs): Likewise.
2934
2935 2010-06-30  Joern Rennecke  <joern.rennecke@embecosm.com>
2936
2937         * target.def: Remove comment about licensing problems of function
2938         declarations.
2939
2940         * target.def (declare_constant_name): Change exp to expr.  Use DEFHOOK.
2941         * doc/tm.texi.in (TARGET_ASM_DECLARE_CONSTANT_NAME): Use @hook.
2942         * doc/tm.texi: Regenerate.
2943
2944         * target.def (builtin_reciprocal): Change tm_fn to md_fn.  Use DEFHOOK.
2945         * doc/tm.texi.in (TARGET_BUILTIN_RECIPROCAL): Use @hook.
2946
2947         * target.def (enum_va_list_p): Use DEFHOOK.
2948         * doc/tm.texi.in (TARGET_ENUM_VA_LIST_P): Use @hook.
2949         Rename ptype to ptree.
2950         * doc/tm.texi: Regenerate.
2951
2952         * target.def (fold_builtin): Rename nargs to n_args.  Use DEFHOOK.
2953         * doc/tm.texi.in (TARGET_FOLD_BUILTIN): Use @hook.
2954         * doc/tm.texi: Regenerate.
2955
2956         * target.def (memory_move_cost): Use DEFHOOK.
2957         * doc/tm.texi.in (TARGET_MEMORY_MOVE_COST): Use @hook.
2958         Rename regclass AKA class to rclass.
2959         * doc/tm.texi: Regenerate.
2960
2961         * target.def (pragma_parse): Use DEFHOOK.
2962         * doc/tm.texi.in (TARGET_OPTION_PRAGMA_PARSE): Use @hook.
2963         s/TARGET_VALID_OPTION_ATTRIBUTE_P/TARGET_OPTION_VALID_ATRIBUTE_P/ .
2964         * doc/tm.texi: Regenerate.
2965
2966         * target.def (pass_by_reference): Use DEFHOOK.
2967         * doc/tm.texi.in (TARGET_PASS_BY_REFERENCE): Use @hook.
2968         * doc/tm.texi: Regenerate.
2969
2970         * target.def (resolve_overloaded_builtin): Rename params to arglist.
2971         Use DEFHOOK.
2972         * doc/tm.texi.in (TARGET_RESOLVE_OVERLOADED_BUILTIN): Use @hook.
2973         * doc/tm.texi: Regenerate.
2974
2975         * target.def (return_pops_args): Use DEFHOOK.
2976         * doc/tm.texi.in (TARGET_RETURN_POPS_ARGS): Use @hook.
2977         Rename stack-size to size.
2978         * doc/tm.texi: Regenerate.
2979
2980         * target.def (dfa_new_cycle): Use DEFHOOK.  Rename dump_file to dump,
2981         last-sched_cycle to last_clock, cur_cycle to clock.
2982         * doc/tm.texi.in: Use @hook.
2983         * doc/tm.texi: Regenerate.
2984
2985         * target.def (print_operand, print_operand_address): Update comment.
2986         (print_operand_punct_valid_p): Likewise.
2987
2988 2010-06-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2989
2990         * toplev.h (_fatal_insn_not_found, _fatal_insn): Move declarations
2991         to rtl.h.
2992         (error_for_asm, warning_for_asm): Move declarations to rtl-error.h.
2993         * rtl.h (_fatal_insn_not_found, _fatal_insn): Move declarations here.
2994         * rtl-error.h: New.
2995         * regrename.c: Do not include toplev.h. Include rtl-error.h.
2996         * rtl-error.c: Likewise.
2997         * reload.c: Likewise.
2998         * recog.c:  Likewise.
2999         * sel-sched.c: Likewise.
3000         * function.c: Likewise.
3001         * reg-stack.c: Likewise.
3002         * cfgrtl.c: Likewise.
3003         * reload1.c: Likewise.
3004         * final.c: Include rtl-error.
3005         * Makefile.in: Adjust dependencies.
3006
3007 2010-06-30  Jan Hubicka  <jh@suse.cz>
3008
3009         PR middle-end/PR44706
3010         * ipa-split (split_function): Refine conditions when to use DECL_RESULT
3011         to return the value.
3012
3013 2010-06-30  Michael Matz  <matz@suse.de>
3014
3015         PR bootstrap/44699
3016         * tree-vrp.c (vrp_finalize): Deal with changing num_ssa_names.
3017         * gimple-fold.c (gimplify_and_update_call_from_tree): If LHS is
3018         a gimple reg, attach the original VDEF to the last store in the
3019         sequence.
3020
3021 2010-06-30  Iain Sandoe  <iains@gcc.gnu.org>
3022
3023         PR other/44034
3024         * config/darwin.c (darwin_override_options): Use renamed
3025         targetm.asm_out.emit_unwind_label.
3026
3027 2010-06-30  Bernd Schmidt  <bernds@codesourcery.com>
3028
3029         PR tree-optimization/39799
3030         * tree-inline.c (remap_ssa_name): Initialize variable only if
3031         SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
3032
3033 2010-06-30  Nathan Froyd  <froydnj@codesourcery.com>
3034
3035         * c-parser.c (c_parser_omp_for_loop): Use a VEC for for_block.
3036
3037 2010-06-30  Richard Guenther  <rguenther@suse.de>
3038
3039         PR target/44722
3040         * config/i386/i386.md (peephole2 for fix:SSEMODEI24): Guard
3041         against oscillation with reverse peephole2.
3042
3043 2010-06-30  H.J. Lu  <hongjiu.lu@intel.com>
3044
3045         PR target/44721
3046         * config/i386/i386.md (peephole2 for arithmetic ops with memory):
3047         Fix last commit.
3048
3049 2010-06-30  Nick Clifton  <nickc@redhat.com>
3050
3051         * config/rx/rx-modes.def: New file.
3052         * config/rx/rx.h (FIRST_PSEUDO_REGISTER): Increase to 17.
3053         (CC_REGNUM): Define.
3054         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add cc
3055         register.
3056         (CC_NO_CARRY, NOTICE_UPDATE_CC): Delete.
3057         (SELECT_CC_MODE): Define.
3058         * config/rx/rx.md (CC_REG): Define.  Update all patterns to use
3059         (reg:CC CC_REG) instead of (cc0).
3060         (attr "cc"): Delete.
3061         (cbranchsi4): Do not split compare and branch here. Instead move
3062         it to...
3063         (cbranchsi4_<code>): ... here.  New patterns.
3064         (cmpsi): Call rx-compare_redundant to find out if it is necessary
3065         to emit the compare instruction.
3066         * config/rx/rx.c (rx_gen-cond_branch_template): Remove tests of
3067         cc_status flags.
3068         (rx_get_stack_layout): Iterate up to before CC_REGNUM not
3069         FIRST_PSEUDO_REGNUM.
3070         (rx_expand_prologue, rx_expand_epilogue): Likewise.
3071         (rx_notice_update_cc): Delete.
3072         (rx_cc_modes_compatible): New function.
3073         (flags_needed_for_conditional): New function.
3074         (flags_from_mode): New function.
3075         (rx_compare_redundant): New function - scans backwards through
3076         insn list to find out if condition flags are already set correctly.
3077         (TARGET_CC_MODES_COMPATIBLE): Define.
3078         * config/rx/rx-protos.h (rx_compare_redundant): Prototype.
3079
3080         * config/rx/rx.h (BRANCH_COST): Define.
3081         (REGISTER_MOVE_COST): Define.
3082         * config/rx/predicates (rx_source_operand): Allow all constant types.
3083         * config/rx/rx.md (addsi3): Add alternative for swapped operands.
3084         (tstsi4): New pattern.
3085         * config/rx/rx.c (rx_memory_move_cost): Define.
3086         (TARGET_MEMORY_MOVE_COST): Define.
3087
3088 2010-06-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3089
3090         * tree.h (block_may_fallthru): Declare here.
3091         * tree-flow.h (block_may_fallthru): Do not declare here.
3092         * c-typeck.c: Do not include tree-flow.h. Include gimple.h and
3093         bitmap.h
3094         * Makefile.in (c-typeck.o): Update dependencies.
3095
3096 2010-06-30  Jakub Jelinek  <jakub@redhat.com>
3097
3098         PR debug/44694
3099         * cselib.h (cselib_preserve_cfa_base_value): Add regno argument.
3100         * cselib.c (cfa_base_preserved_regno): New static variable.
3101         (cselib_reset_table): Don't reset cfa_base_preserved_regno instead
3102         of REGNO (cfa_base_preserved_val->locs->loc).
3103         (cselib_preserve_cfa_base_value): Add regno argument, set
3104         cfa_base_preserved_regno to it.
3105         (cselib_invalidate_regno): Allow removal of registers other than
3106         cfa_base_preserved_regno from cfa_base_preserved_val.
3107         (cselib_finish): Set cfa_base_preserved_regno to INVALID_REGNUM.
3108         * var-tracking.c (adjust_mems): Replace sp or hfp even outside
3109         of MEM addresses, if not on LHS.
3110         (reverse_op): Don't add reverse ops for cfa_base_rtx.
3111         (vt_init_cfa_base): Adjust cselib_preserve_cfa_base_value caller.
3112
3113 2010-06-30  Bernd Schmidt  <bernds@codesourcery.com>
3114
3115         * recog.c (peep2_do_rebuild_jump_labels, peep2_do_cleanup_cfg): New
3116         static variables.
3117         (peep2_buf_position): New static function.
3118         (peep2_regno_dead_p, peep2_reg_dead_p, peep2_find_free_register,
3119         peephole2_optimize): Use it.
3120         (peep2_attempt, peep2_update_life): New static functions, broken out
3121         of peephole2_optimize.
3122         (peep2_fill_buffer): New static function.
3123         (peephole2_optimize): Change the main loop to try to fill the buffer
3124         with the maximum number of insns before matching them against
3125         peepholes.  Use a forward scan.  Remove special case for targets with
3126         conditional execution.
3127         * genrecog.c (change_state): Delete dead code.
3128         * config/i386/i386.md (peephole2 for arithmetic ops with memory):
3129         Rewrite so as not to expect the second insn to have had a peephole
3130         applied yet.
3131
3132 2010-06-29  Nathan Froyd  <froydnj@codesourcery.com>
3133
3134         * genhooks.c (emit_findices): Cast field precision to int.
3135         (emit_documentation): Likewise.
3136
3137 2010-06-29  Jakub Jelinek  <jakub@redhat.com>
3138
3139         PR tree-optimization/43801
3140         * cgraph.c (cgraph_create_virtual_clone): Clear DECL_SECTION_NAME
3141         if old_decl was DECL_ONE_ONLY.
3142
3143         PR debug/44668
3144         * dwarf2out.c (add_accessibility_attribute): New function.
3145         (gen_subprogram_die, gen_variable_die, gen_field_die): Use it
3146         instead of adding DW_AT_accessibility manually.
3147         (gen_enumeration_type_die, gen_struct_or_union_type_die,
3148         gen_typedef_die): Use it.
3149
3150 2010-06-29  Douglas B Rupp  <rupp@gnat.com>
3151
3152         * vmsdbgout.c (full_name): Just output the file name if not native.
3153
3154 2010-06-29  Douglas B Rupp  <rupp@gnat.com>
3155
3156         * vmsdbgout.c (func_table): Replace with VEC func{nam,num}_tables.
3157         (funcnam_table): New static table.
3158         (funcnum_table): New static table.
3159         (write_rtnbeg): Write value saved in funcnum_table.
3160         (write_rtnend): Write value saved in funcnum_table.
3161         (vmsdbgout_begin_function): Save current function info in
3162         (vmsdbgout_init): Initialize func{nam,num}_tables. Minor reformatting.
3163         (vmsdbgout_finish): Iterate over funcnum_table.
3164
3165 2010-06-29  Douglas B Rupp  <rupp@gnat.com>
3166
3167         * vmsdbgout.c (vmsdbgout_begin_epilogue): Declare
3168         (vmsdbgout_type_decl): Declare
3169         (vmsdbg_debug_hooks): Add entry for type_decl and begin_epilogue.
3170         (FUNC_EPILOGUE_LABEL): New macro
3171         (vmsdbgout_begin_epilogue): New function.
3172         (vmsdbgout_type_decl): New function.
3173
3174 2010-06-29  Douglas B Rupp  <rupp@gnat.com>
3175
3176         * vmsdbg.h: Update copyright.
3177
3178 2010-06-29  Douglas B Rupp  <rupp@gnat.com>
3179
3180         * vmsdbg.h (DST_K_TBG): New DST constant.
3181         * vmsdbgout.c (addr_const_to_string): Removed, not referenced.
3182         (write_modbeg): Cast module_language to avoid warning.
3183         (write_rtnbeg): Use DST_K_TBG vice magic mystery number.
3184
3185 2010-06-29  Joern Rennecke  <joern.rennecke@embecosm.com>
3186
3187         PR other/44034
3188         * target.def, doc/tm.texi.in, genhooks.c: New files.
3189         * target.h: Instead of defining individual hook members,
3190         define DEFHOOKPOD / DEFHOOK / DEFHOOK_UNDOC / HOOKSTRUCT and
3191         include target.def.
3192         * target-def.h: Instead of defining individual hook initializers,
3193         include target-hooks-def.h.
3194         * df-scan.c, haifa-sched.c, sel-sched.c: Rename targetm members:
3195         targetm.live_on_entry -> targetm.extra_live_on_entry
3196         targetm.sched.md_finish ->targetm.sched.finish
3197         targetm.sched.md_init -> targetm.sched.init
3198         targetm.sched.md_init_global -> targetm.sched.init_global
3199         targetm.asm_out.unwind_label -> targetm.asm_out.emit_unwind_label
3200         targetm.asm_out.except_table_label ->
3201           targetm.asm_out.emit_except_table_label
3202         targetm.asm_out.visibility -> targetm.asm_out.assemble_visibility
3203         targetm.target_help -> targetm.help
3204         targetm.vectorize.builtin_support_vector_misalignment ->
3205           targetm.vectorize.support_vector_misalignment
3206         targetm.file_start_app_off -> targetm.asm_file_start_app_off
3207         targetm.file_start_file_directive ->
3208          targetm.asm_file_start_file_directive
3209         * dwarf2out.c, opts.c, tree-vect-data-refs.c, except.c: Likewise.
3210         * varasm.c, config/alpha/alpha.c, config/cris/cris.c: Likewise.
3211         * gcc/config/spu/spu.c, config/ia64/ia64.c: Rename target macros:
3212         TARGET_VECTOR_ALIGNMENT_REACHABLE ->
3213           TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE
3214         TARGET_SUPPORT_VECTOR_MISALIGNMENT ->
3215           TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT
3216         TARGET_UNWIND_EMIT -> TARGET_ASM_UNWIND_EMIT
3217         * config/rs6000/rs6000.c, config/arm/arm.c: Likewise.
3218         * Makefile.in (TARGET_H): Depend on target.def.
3219         (TARGET_DEF_H): Depend on target-hooks-def.h.
3220         (target-hooks-def.h, tm.texi, s-target-hooks-def-h): New rules.
3221         (s-tm-texi, build/genhooks.o, build/genhooks): Likewise.
3222         * doc/tm.texi: Regenerate.
3223
3224         * Makefile.in (s-tm-texi): Remove stray tab / rule.
3225
3226         * config/m68k/m68k.c (targetm.sched.init_global): Update comment.
3227         (targetm.sched.init): Likewise.
3228
3229 2010-06-29  Nathan Froyd  <froydnj@codesourcery.com>
3230
3231         PR bootstrap/44713
3232         * config/i386/i386.c (type_natural_mode): Const-ify CUM parameter.
3233         (function_arg_advance_32): Const-ify TYPE parameter.
3234         (function_arg_advance_64): Likewise.  Change type of NAMED to bool.
3235         (ix86_function_arg_advance): Change type of NAMED to bool.
3236         (function_arg_32): Const-ify CUM and TYPE parameters.
3237         (function_arg_64): Likewise.  Change type of NAMED to bool.
3238         (function_arg_ms_64): Const-ify CUM parameter. Change type of NAMED
3239         to bool.
3240         (ix86_function_arg): Change type of NAMED to bool.
3241         (ix86_setup_incoming_varargs): Call ix86_function_arg_advance.  Pass
3242         last argument as a bool.
3243
3244 2010-06-29  Joern Rennecke  <joern.rennecke@embecosm.com>
3245
3246         * doc/tm.texi (TARGET_OPTION_OVERRIDE): Document.
3247         (OVERRIDE_OPTIONS): Add note of obsolescence.
3248         Replace references with references to TARGET_OPTION_OVERRIDE.
3249         (Except for C_COMMON_OVERRIDE_OPTIONS, which remains similar to
3250          the macro).
3251         * targhooks.c (default_target_option_override): New function.
3252         * targhooks.h (default_target_option_override): Declare.
3253         * target.h (struct gcc_target): Add override member to
3254         target_option member.
3255         * toplev.c (process_options): Replace OVERRIDE_OPTIONS use with
3256         targetm.target_option.override call.
3257         * target-def.h (TARGET_OPTION_OVERRIDE): Define.
3258         (TARGET_OPTION_HOOKS): Add TARGET_OPTION_OVERRIDE.
3259
3260 2010-06-29  Jan Hubicka  <jh@suse.cz>
3261
3262         * tree-inline.c: Replace incomming by incomin and clonning by cloning.
3263
3264 2010-06-29  Jan Hubicka  <jh@suse.cz>
3265
3266         * predict.c (propagate_freq): Clear EXIT_BLOCK_PTR frequency if it is
3267         unreachable.
3268         (rebuild_frequencies): New function.
3269         * predict.h (rebuild_frequencies): Declare.
3270         * tree-inline.c (copy_cfg_body): Compute properly count & frequency of
3271         entry block and edge reaching new_entry.
3272         (tree_function_versioning): When doing partial cloning, rebuild
3273         frequencies when done.
3274         * passes.c (execute_function_todo): Use rebild_frequencies.
3275
3276 2010-06-29  Richard Guenther  <rguenther@suse.de>
3277
3278         * tree-dfa.c (dump_variable): Remove noalias_state dumping.
3279         * tree-flow.h (enum noalias_state): Remove.
3280         (struct var_ann_d): Remove noalias_state member.
3281
3282 2010-06-29  Bernd Schmidt  <bernds@codesourcery.com>
3283
3284         PR target/43902
3285         * config/arm/arm.md (maddsidi4, umaddsidi4): New expanders.
3286         (maddhisi4): Renamed from mulhisi3addsi.  Operands renumbered.
3287         (maddhidi4): Likewise.
3288
3289         Revert parts of the change for PR25130.
3290         * cse.c (exp_equiv_p): For MEMs, if for_gcse, only compare
3291         MEM_ALIAS_SET.
3292
3293 2010-06-29  Nathan Froyd  <froydnj@codesourcery.com>
3294
3295         * calls.c, dse.c, expr.c, function.c: Call targetm.calls.function_arg,
3296         targetm.calls.function_incoming_arg, and
3297         targetm.calls.function_arg_advance instead of FUNCTION_ARG,
3298         FUNCTION_INCOMING_ARG, and FUNCTION_ARG_ADVANCE, respectively.
3299         * target.h (struct gcc_target): Add function_arg_advance,
3300         function_arg, and function_incoming_arg fields.
3301         * target-def.h (TARGET_FUNCTION_ARG_ADVANCE, TARGET_FUNCTION_ARG):
3302         (TARGET_FUNCTION_INCOMING_ARG): Define.
3303         (TARGET_CALLS): Add TARGET_FUNCTION_ARG_ADVANCE, TARGET_FUNCTION_ARG,
3304         and TARGET_FUNCTION_INCOMING_ARG.
3305         * targhooks.h (default_function_arg_advance): Declare.
3306         (default_function_arg, default_function_incoming_arg): Declare.
3307         * targhooks.c (default_function_arg_advance): New function.
3308         (default_function_arg, default_function_incoming_arg): New function.
3309         * config/i386/i386.c (function_arg_advance): Rename to...
3310         (ix86_function_arg_advance): ...this.  Make static.
3311         (function_arg): Rename to...
3312         (ix86_function_arg): ...this.  Make static.
3313         (TARGET_FUNCTION_ARG_ADVANCE): Define.
3314         (TARGET_FUNCTION_ARG): Define.
3315         * config/i386/i386.h (FUNCTION_ARG_ADVANCE): Delete.
3316         (FUNCTION_ARG): Delete.
3317         * config/i386/i386-protos.h (function_arg_advance): Delete prototype.
3318         (function_arg): Delete prototype.
3319
3320 2010-06-29  Nathan Froyd  <froydnj@codesourcery.com>
3321
3322         * reginfo.c (init_reg_sets_1): Adjust comments.
3323         * combine-stack-adj.c (rest_of_handle_stack_adjustments): Likewise.
3324         * calls.c (prepare_call_address): Likewise.
3325         (emit_call_1): Use targetm.calls.return_pops_args.
3326         (expand_call): Likewise.
3327         * function.c (assign_parms): Likewise.
3328         * system.h (RETURN_POPS_ARGS): Add to #pragma poison list.
3329         * target.h (struct gcc_target) [struct calls]: Add
3330         return_pops_args field.
3331         * targhooks.h (default_return_pops_args): Declare.
3332         * targhooks.c (default_return_pops_args): Define.
3333         * target-def.h (TARGET_RETURN_POPS_ARGS): Define.
3334         (TARGET_CALLS): Add TARGET_RETURN_POPS_ARGS.
3335         * doc/tm.texi (RETURN_POPS_ARGS): Rename to...
3336         (TARGET_RETURN_POPS_ARGS): ...this.  Use deftypefn.  Adjust
3337         documentation.
3338         * config/alpha/alpha.h (RETURN_POPS_ARGS): Delete.
3339         * config/arc/arc.h (RETURN_POPS_ARGS): Likewise.
3340         * config/arm/arm.h (RETURN_POPS_ARGS): Likewise.
3341         * config/avr/avr.h (RETURN_POPS_ARGS): Likewise.
3342         * config/bfin/bfin.h (RETURN_POPS_ARGS): Likewise.
3343         * config/cris/cris.h (RETURN_POPS_ARGS): Likewise.
3344         * config/crx/crx.h (RETURN_POPS_ARGS): Likewise.
3345         * config/fr30/fr30.h (RETURN_POPS_ARGS): Likewise.
3346         * config/frv/frv.h (RETURN_POPS_ARGS): Likewise.
3347         * config/h8300/h8300.h (RETURN_POPS_ARGS): Likewise.
3348         * config/ia64/ia64.h (RETURN_POPS_ARGS): Likewise.
3349         * config/iq2000/iq2000.h (RETURN_POPS_ARGS): Likewise.
3350         * config/lm32/lm32.h (RETURN_POPS_ARGS): Likewise.
3351         * config/m32c/m32c.h (RETURN_POPS_ARGS): Likewise.
3352         * config/m32r/m32r.h (RETURN_POPS_ARGS): Likewise.
3353         * config/m68hc11/m68hc11.h (RETURN_POPS_ARGS): Likewise.
3354         * config/mcore/mcore.h (RETURN_POPS_ARGS): Likewise.
3355         * config/mep/mep.h (RETURN_POPS_ARGS): Likewise.
3356         * config/mips/mips.h (RETURN_POPS_ARGS): Likewise.
3357         * config/mmix/mmix.h (RETURN_POPS_ARGS): Likewise.
3358         * config/mn10300/mn10300.h (RETURN_POPS_ARGS): Likewise.
3359         * config/moxie/moxie.h (RETURN_POPS_ARGS): Likewise.
3360         * config/pa/pa.h (RETURN_POPS_ARGS): Likewise.
3361         * config/pdp11/pdp11.h (RETURN_POPS_ARGS): Likewise.
3362         * config/picochip/picochip.h (RETURN_POPS_ARGS): Likewise.
3363         * config/rs6000/rs6000.h (RETURN_POPS_ARGS): Likewise.
3364         * config/rx/rx.h (RETURN_POPS_ARGS): Likewise.
3365         * config/s390/s390.h (RETURN_POPS_ARGS): Likewise.
3366         * config/score/score.h (RETURN_POPS_ARGS): Likewise.
3367         * config/sh/sh.h (RETURN_POPS_ARGS): Likewise.
3368         * config/sparc/sparc.h (RETURN_POPS_ARGS): Likewise.
3369         * config/spu/spu.h (RETURN_POPS_ARGS): Likewise.
3370         * config/stormy16/stormy16.h (RETURN_POPS_ARGS): Likewise.
3371         * config/v850/v850.h (RETURN_POPS_ARGS): Likewise.
3372         * config/xtensa/xtensa.h (RETURN_POPS_ARGS): Likewise.
3373         * config/i386/i386-protos.h (ix86_return_pops_args): Delete.
3374         * config/i386/i386.h (RETURN_POPS_ARGS): Delete.
3375         * config/i386/i386.c (ix86_return_pops_args): Make static.
3376         Constify arguments.
3377         (TARGET_RETURN_POPS_ARGS): Define.
3378         * config/m68k/m68k.h (RETURN_POPS_ARGS): Move to...
3379         * config/m68k/m68k.c (m68k_return_pops_args): ...here.  New function.
3380         (TARGET_RETURN_POPS_ARGS): Define.
3381         * config/vax/vax.h (RETURN_POPS_ARGS): Move to...
3382         * config/vax/vax.c (vax_return_pops_args): ...here.  New function.
3383         (TARGET_RETURN_POPS_ARGS): Define.
3384
3385 2010-06-29  Richard Guenther  <rguenther@suse.de>
3386
3387         PR middle-end/44667
3388         * tree-inline.c (initialize_inlined_parameters): Make sure
3389         to remap the inlined parameter variable substitutions types.
3390
3391 2010-06-29  Eric Botcazou  <ebotcazou@adacore.com>
3392
3393         PR rtl-optimization/44659
3394         * combine.c (make_compound_operation) <SUBREG>: Do not return the
3395         result of force_to_mode if it partially re-expanded the compound.
3396
3397 2010-06-28  Jan Hubicka  <jh@suse.cz>
3398
3399         PR middle-end/44671
3400         * ipa-split.c (test_nonssa_use, mark_nonssa_use): Check also uses of
3401         RESULT_DECL.
3402
3403 2010-06-28  Anatoly Sokolov  <aesok@post.ru>
3404
3405         * double-int.h (force_fit_type_double): Remove declaration.
3406         * double-int.c (force_fit_type_double): Move to tree.c.
3407         * tree.h (force_fit_type_double): Declare.
3408         * tree.h (force_fit_type_double): Moved from double-int.c. Use
3409         double_int type for 'cst' argument. Use double_int_fits_to_tree_p and
3410         double_int_to_tree instead of fit_double_type and build_int_cst_wide.
3411         * convert.c (convert_to_pointer): Adjust call to
3412         force_fit_type_double.
3413         * tree-vrp.c (extract_range_from_assert,
3414         extract_range_from_unary_expr): Adjust call to force_fit_type_double.
3415         * fold-const.c: Update comment.
3416         (int_const_binop, fold_convert_const_int_from_int,
3417         fold_convert_const_int_from_real, fold_convert_const_int_from_fixed,
3418         extract_muldiv_1, fold_div_compare, fold_sign_changed_comparison,
3419         fold_unary_loc, fold_negate_const, fold_abs_const, fold_not_const,
3420         round_up_loc): Adjust call to force_fit_type_double.
3421
3422 2010-06-28  Philipp Tomsich  <philipp.tomsich@theobroma-systems.com>
3423
3424         * config/rs6000/rs6000.h (PROCESSOR_TITAN): Declare.
3425
3426 2010-06-28  Martin Jambor  <mjambor@suse.cz>
3427
3428         * tree-sra.c (convert_callers): New parameter, change fndecls of
3429         recursive calls.
3430         (modify_function): Pass the old decl to convert_callers.
3431
3432 2010-06-28  Martin Jambor  <mjambor@suse.cz>
3433
3434         * ipa-cp.c (ipcp_init_cloned_node): Replace calls to
3435         ipa_check_create_node_params and ipa_initialize_node_params with
3436         checking asserts they are not necessary.
3437
3438 2010-06-28  Jan Hubicka  <jh@suse.cz>
3439
3440         PR tree-optimization/44687
3441         * ipa-split.c (split_function): Use DECL_RESULT to store return value.
3442
3443 2010-06-28  Martin Jambor  <mjambor@suse.cz>
3444
3445         PR c++/44535
3446         * gimple-fold.c (get_first_base_binfo_with_virtuals): New function.
3447         (gimple_get_relevant_ref_binfo): Use get_first_base_binfo_with_virtuals
3448         instead of BINFO_BASE_BINFO.
3449
3450 2010-06-28  Michael Matz  <matz@suse.de>
3451
3452         PR middle-end/44592
3453         * gimple-fold.c (gimplify_and_update_call_from_tree): Maintain
3454         proper VDEF chain for intermediate stores in the sequence.
3455
3456 2010-06-28  Jan Hubicka  <jh@suse.cz>
3457
3458         PR tree-optimization/44357
3459         * ipa-inline.c (add_new_edges_to_heap): Do not add edges to
3460         uninlinable functions.
3461
3462 2010-06-28  Philipp Tomsich  <philipp.tomsich@theobroma-systems.com>
3463
3464         * config.gcc (powerpc*-*-*): Handle titan.
3465         * config/rs6000/rs6000.c (titan_cost): New costs.
3466         (rs6000_override_options): Add "titan" to processor_target_table.
3467         Add Titan to branch alignment logic.
3468         Correctly set rs6000_cost for titan.
3469         * config/rs6000/rs6000.md (cpu): Add titan.  Include "titan.md".
3470         * config/rs6000/titan.md: New file.
3471         * doc/invoke.texi (RS/6000 and PowerPC Options): Document -mcpu=titan.
3472
3473 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
3474
3475         * tree-browser.c (TB_history_stack): Convert to a VEC.
3476         (TB_SET_HEAD): Adjust for new type of TB_history_stack.
3477         (TB_history_prev): Likewise.
3478
3479 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
3480
3481         * vec.h (vec_heap_free): Add parentheses around free.
3482
3483 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
3484
3485         * system.h: Poison GCC_EXCEPT_H for front-end files.
3486
3487         * langhooks.h (struct lang_hooks): Add eh_protect_cleanup_actions
3488         langhook.
3489         * langhooks-def.h (LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS) New.
3490         Define to NULL by default.
3491         * except.h: Define GCC_EXCEPT_H.
3492         (doing_eh): Remove prototype.
3493         (init_eh, init_eh_for_function): Move prototypes to toplev.h.
3494         (lang_protect_cleanup_actions): Remove.
3495         * except.c (lang_protect_cleanup_actions): Remove.
3496         (doing_eh): Remove.
3497         (gen_eh_region): Don't check doing_eh here.
3498         * toplev.h (init_eh, init_eh_for_function_): Moved from except.h.
3499         * tree-eh.c (honor_protect_cleanup_actions): Use new langhook
3500         instead of lang_protect_cleanup_actions.
3501         * omp-low.c (maybe_catch_exception): Likewise.
3502         * Makefile.in: Update dependencies.
3503
3504 2010-06-28  Bingfeng Mei  <bmei@broadcom.com>
3505
3506         * cgraph.h (struct varpool_node): new used_from_object_file flag.
3507         (struct cgraph_local_info): new used_from_object_file flag.
3508         * cgraph.c (dump_cgraph_node): dump used_from_object_file flag.
3509         (cgraph_clone_node): initialize used_from_object_file.
3510         (cgraph_create_virtual_clone): initialize used_from_object_file.
3511         * lto-symbtab.c (lto_symtab_merge_decls_1): Set
3512         used_from_object_file flags for symbols of LDPR_PREVAILING_DEF
3513         when compiling with -fwhole-program.
3514         (lto_symtab_resolve_symbols) Use LDPR_PREVAILING_DEF_IRONLY for
3515         internal resolver.
3516         * ipa.c (function_and_variable_visibility): Set externally_visible
3517         flag of varpool_node if used_from_object_file flag is set.
3518         (cgraph_externally_visible_p): check used_from_object_file flag.
3519         * doc/invoke.texi (-fwhole-program option): Change description of
3520         externally_visible attribute accordingly.
3521         * doc/extend.texi (externally_visible): Ditto.
3522
3523 2010-06-27  Jan Hubicka  <jh@suse.cz>
3524
3525         * params.def (max-inline-insns-auto): Default to 40.
3526         * doc/invoke.texi (max-inline-insns-auto): Document the change.
3527
3528 2010-06-27  Jan Hubicka  <jh@suse.cz>
3529
3530         PR middle-end/44671
3531         PR middle-end/44686
3532         * tree.c (build_function_decl_skip_args): Clear DECL_BUILT_IN on
3533         signature change.
3534         * ipa-split.c (split_function): Always clear DECL_BUILT_IN.
3535         * ipa-prop.c (ipa_modify_formal_parameters): Likewise.
3536
3537 2010-06-27  Anatoly Sokolov  <aesok@post.ru>
3538
3539         * target.h (struct gcc_target): Add register_move_cost field.
3540         * target-def.h (TARGET_REGISTER_MOVE_COST): New.
3541         (TARGET_INITIALIZER): Use TARGET_REGISTER_MOVE_COST.
3542         * targhooks.c (default_register_move_cost): New function.
3543         * targhooks.h (default_register_move_cost): Declare function.
3544         * defaults.h (REGISTER_MOVE_COST): Delete.
3545         * ira-int.h (ira_register_move_cost): Update comment.
3546         * ira.c: (ira_register_move_cost): Update comment.
3547         * reload.h (register_move_cost): Declare.
3548         * reginfo.c (register_move_cost): New function.
3549         (move_cost): Update comment.
3550         (init_move_cost, memory_move_secondary_cost): Replace
3551         REGISTER_MOVE_COST with register_move_cost.
3552         * postreload.c (reload_cse_simplify_set): (Ditto.).
3553         * reload.c (find_valid_class, find_reloads): (Ditto.).
3554         * reload1.c (choose_reload_regs): (Ditto.).
3555         * doc/tm.texi (TARGET_REGISTER_MOVE_COST): New.
3556         (REGISTER_MOVE_COST, TARGET_MEMORY_MOVE_COST): Update documentation.
3557         * doc/md.texi (can_create_pseudo_p): Update documentation.
3558
3559         * config/i386/i386.h (MEMORY_MOVE_COST): Remove macro.
3560         * config/i386/i386-protos.h (int ix86_memory_move_cost): Remove.
3561         * config/i386/i386.h (ix86_memory_move_cost): Make static.
3562         (TARGET_MEMORY_MOVE_COST): Define.
3563
3564         * config/ia64/ia64.h (MEMORY_MOVE_COST): Remove macro.
3565         * config/ia64/ia64-protos.h (int ia64_memory_move_cost): Remove.
3566         * config/ia64/ia64.h (ia64_memory_move_cost): Make static.
3567         (TARGET_MEMORY_MOVE_COST): Define.
3568
3569 2010-06-27  Richard Guenther  <rguenther@suse.de>
3570
3571         PR tree-optimization/44683
3572         * tree-ssa-dom.c (record_edge_info): Record equivalences for the
3573         false edge from the inverted condition.
3574
3575 2010-06-27  Richard Guenther  <rguenther@suse.de>
3576
3577         PR middle-end/44684
3578         * tree-ssa-alias.c (refs_may_alias_p_1): Allow SSA name refs.
3579         (stmt_may_clobber_ref_p_1): Do not bother to call the oracle
3580         for register LHS.  Or non-store assignments.
3581
3582 2010-06-26  Eric Botcazou  <ebotcazou@adacore.com>
3583
3584         * config/sparc/sparc.c (sparc_emit_set_const32): Make static.
3585         (sparc_emit_set_const64): Likewise.  Remove disabled code.
3586         * config/sparc/sparc-protos.h (sparc_emit_set_const32): Delete.
3587         (sparc_emit_set_const64): Likewise.
3588
3589 2010-06-26  Catherine Moore  <clm@codesourcery.com>
3590
3591         * config/mips/mips.md (alu_type): New attribute.
3592         (type): Infer type from alu_type.
3593         (*add<mode>3, *add<mode>3_mips16, *addsi3_extended,
3594         *baddu_si_eb, *baddu_si_el, *baddu_di, sub<mode>3,
3595         *subsi3_extended, negsi2, negdi2, *low<mode>,
3596         *low<mode>_mips16, *ior<mode>3, *ior<mode>3_mips16,
3597         xor<mode>3, *nor<mode>3,
3598         *zero_extend<GPR:mode>_trunc<SHORT:mode>,
3599         *zero_extendhi_truncqi):  Set alu_type instead of type.
3600
3601 2010-06-26  Douglas B Rupp  <rupp@gnat.com>
3602
3603         * config/alpha/alpha.c (alpha_need_linkage): Adjust
3604         splay_tree_new_ggc call.
3605         (alpha_use_linkage): Likewise.
3606
3607 2010-06-26  Joseph Myers  <joseph@codesourcery.com>
3608
3609         * collect2.c (main): Remove SWITCHES_NEED_SPACES conditional.
3610         * doc/tm.texi (SWITCHES_NEED_SPACES): Don't document.
3611         * gcc.c (SWITCHES_NEED_SPACES, switches_need_spaces): Remove.
3612         (static_specs): Remove switches_need_spaces.
3613         (process_command, do_self_spec): Hardcode handling "-o" instead of
3614         checking switches_need_spaces.
3615         * system.h (SWITCHES_NEED_SPACES): Poison.
3616
3617 2010-06-26  Richard Guenther  <rguenther@suse.de>
3618
3619         PR tree-optimization/44393
3620         * tree-loop-distribution.c (generate_loops_for_partition): Fix
3621         stmt removal and VOP renaming.
3622         (generate_memset_zero): Remove redundant stmt updating.
3623         * tree-flow.h (mark_virtual_ops_in_bb): Remove.
3624         * tree-cfg.c (mark_virtual_ops_in_bb): Likewise.
3625
3626 2010-06-26  Jan Hubicka  <jh@suse.cz>
3627
3628         * ipa-split.c (consider_split): PHI in entry block is OK as long as all
3629         edges comming from header are equivalent.
3630         (visit_bb): Handle PHIs correctly.
3631         * tree-inline.c (copy_phis_for_bb): Be able to copy
3632         PHI from entry edge.
3633         (copy_cfg_body): Produce edge from entry BB before copying PHIs.
3634
3635 2010-06-26  Richard Guenther  <rguenther@suse.de>
3636
3637         PR middle-end/44674
3638         * tree-ssa-alias.c (refs_may_alias_p_1): Allow all kind of
3639         decls.  Handle LABEL_DECLs like FUNCTION_DECLs.
3640
3641 2010-06-26  Joseph Myers  <joseph@codesourcery.com>
3642
3643         * gcc.c (n_switches_alloc, n_infiles_alloc, alloc_infile,
3644         add_infile, alloc_switch): New.
3645         (process_command): Remove variable lang_n_infiles.  Process
3646         options in a single pass.  Use new functions for allocating
3647         infiles and switches arrays.  Properly skip operands of
3648         -Xpreprocessor and -Xassembler.
3649
3650 2010-06-26  Jan Hubicka  <jh@suse.cz>
3651
3652         PR middle-end/44671
3653         * cgraphunit.c (cgraph_function_versioning): Remove wrong
3654         cgraph_make_decl_local call; fix typo copying RTL data.
3655
3656 2010-06-25  DJ Delorie  <dj@redhat.com>
3657
3658         * config/m32c/m32c-protos.h (m32c_note_pragma_address): Declare.
3659         (m32c_output_aligned_common): Likewise.
3660         * config/m32c/m32c.h (ASM_OUTPUT_ALIGNED_DECL_COMMON): New.
3661         (ASM_OUTPUT_ALIGNED_DECL_LOCAL): New.
3662         * config/m32c/m32c-pragma.c (m32c_pragma_address): New.
3663         (m32c_register_pragmas): Register it.
3664         * config/m32c/m32c.c (m32c_get_pragma_address): New.
3665         (m32c_insert_attributes): Set #pragma address decls volatile.
3666         (pragma_entry_eq): New.
3667         (pragma_entry_hash): New.
3668         (m32c_note_pragma_address): New.
3669         (m32c_get_pragma_address): New.
3670         (m32c_output_aligned_common): New.
3671         * doc/extend.texi: Document the new pragma.
3672
3673         * config/m32c/m32c.c (m32c_illegal_subreg_p): Reject illegal MEMs
3674         also.
3675         * config/m32c/predicates.md (m32c_any_operand): Check the code
3676         instead of memory_operand so as to allow matching volatile MEMs.
3677         (m32c_nonimmediate_operand): Likewise.
3678         (mra_operand): Allow volatiles.
3679
3680 2010-06-25  Alexandre Oliva  <aoliva@redhat.com>
3681
3682         PR debug/44610
3683         * simplify-rtx.c (delegitimize_mem_from_attrs): Don't use a base
3684         address if the offset is unknown.
3685
3686 2010-06-25  Douglas B Rupp  <rupp@gnat.com>
3687
3688         * dwarf2out.c (dwarf2out_vms_debug_main_pointer): New function.
3689         * dwarf2out.h (dwarf2out_vms_debug_main_pointer): Declare new function.
3690         * config/ia64/ia64-protos.h (ia64_start_function): Declare.
3691         * config/ia64/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Move contents
3692         to ia64_start_function. Invoke it.
3693         * config/ia64/ia64.c (ia64_start_function): Call new function
3694         dwarf2out_vms_debug_main_pointer.
3695
3696 2010-06-25  Sebastian Pop  <sebastian.pop@amd.com>
3697
3698         * tree-if-conv.c (insert_gimplified_predicates): Do not insert
3699         statements computing the true predicate.
3700
3701 2010-06-25  Sebastian Pop  <sebastian.pop@amd.com>
3702
3703         * tree-if-conv.c (init_bb_predicate): Initialize the predicate
3704         to boolean_true_node.
3705         (reset_bb_predicate): New.
3706         (predicate_bbs): Call reset_bb_predicate.
3707
3708 2010-06-25  Sebastian Pop  <sebastian.pop@amd.com>
3709
3710         * tree-if-conv.c (combine_blocks): Remove FIXME comment.
3711         (tree_if_conversion): Returns true when something has been changed.
3712         (main_tree_if_conversion): Return TODO_cleanup_cfg when if-conversion
3713         changed something.
3714
3715 2010-06-25  Sebastian Pop  <sebastian.pop@amd.com>
3716
3717         * Makefile.in (tree-if-conv.o): Depends on DBGCNT_H.
3718         * dbgcnt.def (if_conversion_tree): New DEBUG_COUNTER.
3719         * tree-if-conv.c: Include dbgcnt.h.
3720         (tree_if_conversion): Use if_conversion_tree to count the number of
3721         if-convertible loops.
3722
3723 2010-06-25  Changpeng Fang  <changpeng.fang@amd.com>
3724
3725         * common.opt (fprefetch-loop-arrays): Re-define
3726         -fprefetch-loop-arrays as a tri-state option with the initial
3727         value of -1.
3728         * tree-ssa-loop.c (gate_tree_ssa_loop_prefetch): Invoke prefetch
3729         pass only when flag_prefetch_loop_arrays > 0.
3730         * toplev.c (process_options): Note that, with tri-states,
3731         flag_prefetch_loop_arrays>0 means prefetching is enabled.
3732         * config/i386/i386.c (override_options): Enable prefetching at -O3
3733         for a set of CPUs that sw prefetching is helpful.
3734         (software_prefetching_beneficial_p): New.  Return TRUE if software
3735         prefetching is beneficial for the given CPU.
3736
3737 2010-06-25  H.J. Lu  <hongjiu.lu@intel.com>
3738
3739         PR rtl-optimization/44326
3740         * implicit-zee.c (find_removable_zero_extends): Replace
3741         INSN_P with NONDEBUG_INSN_P.
3742
3743 2010-06-25  Martin Jambor  <mjambor@suse.cz>
3744
3745         * ipa-prop.h (struct ipa_param_descriptor): Removed the modified flag.
3746         (struct ipa_node_params): Removed the modification_analysis_done flag.
3747         (ipa_is_param_modified): Removed.
3748         (ipa_analyze_node): Declare.
3749         (ipa_compute_jump_functions): Remove declaration.
3750         (ipa_count_arguments): Likewise.
3751         (ipa_detect_param_modifications): Likewise.
3752         (ipa_analyze_params_uses): Likewise.
3753         * ipa-prop.c (struct param_analysis_info): New type.
3754         (visit_store_addr_for_mod_analysis): Removed.
3755         (visit_load_for_mod_analysis): Renamed to visit_ref_for_mod_analysis,
3756         moved down in the file.
3757         (ipa_detect_param_modifications): Merged into ipa_analyze_params_uses.
3758         (ipa_count_arguments): Made static.
3759         (mark_modified): New function.
3760         (is_parm_modified_before_call): New function.
3761         (compute_pass_through_member_ptrs): New parameter parms_info, call
3762         is_parm_modified_before_call instead of ipa_is_param_modified.
3763         (ipa_compute_jump_functions_for_edge): New parameter parms_info, pass
3764         it to compute_pass_through_member_ptrs.
3765         (ipa_compute_jump_functions): New parameter parms_info, pass it to
3766         ipa_compute_jump_functions_for_edge.  Call ipa_initialize_node_params
3767         on the callee if it is analyzed.  Made static.
3768         (ipa_analyze_indirect_call_uses): New parameter parms_info, call
3769         is_parm_modified_before_call instead of ipa_is_param_modified.
3770         (ipa_analyze_call_uses): New parameter parms_info, pass it to
3771         ipa_analyze_indirect_call_uses.
3772         (ipa_analyze_stmt_uses): New parameter parms_info, pass it to
3773         ipa_analyze_call_uses.
3774         (ipa_analyze_params_uses): New parameter parms_info, pass it to
3775         ipa_analyze_stmt_uses.  Also perform the used analysis.  Made static.
3776         (ipa_analyze_node): New function.
3777         (ipa_print_node_params): Do not dump the modified flag.
3778         (ipa_write_node_info): Assert uses_analysis_done rather than streaming
3779         it.  Do not stream the modified parameter flag.
3780         (ipa_read_node_info): Set uses_analysis_done to 1 instead of streaming
3781         it.  Do not stream the modified parameter flag.
3782         * ipa-cp.c (ipcp_analyze_node): Removed.
3783         (ipcp_init_stage): Iterate only once over the nodes, analyze each one
3784         with only a call to ipa_analyze_node.
3785         * ipa-inline.c (inline_indirect_intraprocedural_analysis): Analyze the
3786         node with only a call to ipa_analyze_node.
3787
3788 2010-06-25  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3789
3790         * doc/invoke.texi (-Wsuggest-attribute): Add item for noreturn.
3791
3792 2010-06-25  Jan Hubicka  <jh@suse.cz>
3793
3794         * tree-pass.h (pass_split_functions): Declare.
3795         * opts.c (decode_options): Enable function splitting at -O2
3796         * timevar.def (TV_IPA_FNSPLIT): New macro.
3797         * ipa-split.c: New file.
3798         * common.opt (-fpartial-inlining): New flag.
3799         * Makefile.in (ipa-split.o): New object file.
3800         * passes.c (init_optimization_passes): Add ipa-split.
3801         * params.def (partial-inlining-entry-probability): New parameters.
3802         * doc/invoke.texi (-fpartial-inlining): New.
3803
3804 2010-06-25  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3805
3806         PR 44665
3807         * tree-inline.c (gimple_expand_calls_inline): Fix typo in comment.
3808         * gimplify.c (is_gimple_reg_rhs_or_call): Likewise.
3809         (gimplify_expr): Likewise.
3810
3811 2010-06-25  Martin Jambor  <mjambor@suse.cz>
3812
3813         * ipa-prop.c (determine_cst_member_ptr): Ignore non-clobbering
3814         statements instead of bailing out on them.
3815         (ipa_analyze_indirect_call_uses): Do not require that loads from the
3816         parameter are in the same BB as the condition.  Update comments.
3817
3818 2010-06-25  Jakub Jelinek  <jakub@redhat.com>
3819
3820         PR middle-end/43866
3821         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): If stmt is always
3822         true or always false, return NULL_TREE.
3823         (tree_unswitch_single_loop): Optimize conditions even when reaching
3824         max-unswitch-level parameter.  If num > 0, optimize first all conditions
3825         using entry checks, then do still reachable block discovery and consider
3826         only conditions in still reachable basic blocks in the loop.
3827
3828         PR tree-optimization/44539
3829         * tree-cfgcleanup.c (fixup_noreturn_call): Call update_stmt even when
3830         the call doesn't have LHS, but has VDEF.
3831
3832 2010-06-25  Joseph Myers  <joseph@codesourcery.com>
3833
3834         * config/pa/pa.h (MODIFY_TARGET_NAME): Remove.
3835         * doc/tm.texi (MODIFY_TARGET_NAME): Don't document.
3836         * gcc.c (enum add_del, struct modify_target, modify_target): Remove.
3837         (process_command): Remove code conditional on MODIFY_TARGET_NAME.
3838         * system.h (MODIFY_TARGET_NAME): Poison.
3839
3840 2010-06-25  Alan Modra  <amodra@gmail.com>
3841
3842         * doc/invoke.texi: Delete mcmodel=medium from powerpc options.
3843         * config/rs6000/rs6000.h (enum rs6000_cmodel): Delete CMODEL_MEDIUM.
3844         * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Set
3845         CMODEL_LARGE as default.
3846         * config/rs6000/rs6000.c (rs6000_handle_option): Remove mcmodel=medium.
3847         (offsettable_ok_by_alignment): Delete.
3848         (rs6000_emit_move): Remove mcmodel=medium optimization.
3849
3850 2010-06-25  Bernd Schmidt  <bernds@codesourcery.com>
3851
3852         With large parts from Jim Wilson:
3853         PR target/43902
3854         * tree-pretty-print.c (dump_generic_node, op_code_prio): Add
3855         WIDEN_MULT_PLUS_EXPR and WIDEN_MULT_MINUS_EXPR.
3856         * optabs.c (optab_for_tree_code): Likewise.
3857         (expand_widen_pattern_expr): Likewise.
3858         * tree-ssa-math-opts.c (convert_mult_to_widen): New function, broken
3859         out of execute_optimize_widening_mul.
3860         (convert_plusminus_to_widen): New function.
3861         (execute_optimize_widening_mul): Use the two new functions.
3862         * expr.c (expand_expr_real_2): Add support for GIMPLE_TERNARY_RHS.
3863         Remove code to generate widening multiply-accumulate.  Add support
3864         for WIDEN_MULT_PLUS_EXPR and WIDEN_MULT_MINUS_EXPR.
3865         * gimple-pretty-print.c (dump_ternary_rhs): New function.
3866         (dump_gimple_assign): Call it when appropriate.
3867         * tree.def (WIDEN_MULT_PLUS_EXPR, WIDEN_MULT_MINUS_EXPR): New codes.
3868         * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise.
3869         (expand_gimple_stmt_1): Likewise.
3870         (expand_debug_expr): Support WIDEN_MULT_PLUS_EXPR and
3871         WIDEN_MULT_MINUS_EXPR.
3872         * tree-ssa-operands.c (get_expr_operands): Likewise.
3873         * tree-inline.c (estimate_operator_cost): Likewise.
3874         * gimple.c (extract_ops_from_tree_1): Renamed from
3875         extract_ops_from_tree.  Add new arg for a third operand; fill it.
3876         (gimple_build_assign_stat): Support operations with three operands.
3877         (gimple_build_assign_with_ops_stat): Likewise.
3878         (gimple_assign_set_rhs_from_tree): Likewise.
3879         (gimple_assign_set_rhs_with_ops_1): Renamed from
3880         gimple_assign_set_rhs_with_ops.  Add new arg for a third operand.
3881         (get_gimple_rhs_num_ops): Support GIMPLE_TERNARY_RHS.
3882         (get_gimple_rhs_num_ops): Handle WIDEN_MULT_PLUS_EXPR and
3883         WIDEN_MULT_MINUS_EXPR.
3884         * gimple.h (enum gimple_rhs_class): Add GIMPLE_TERNARY_RHS.
3885         (extract_ops_from_tree_1): Adjust declaration.
3886         (gimple_assign_set_rhs_with_ops_1): Likewise.
3887         (gimple_build_assign_with_ops): Pass NULL for last operand.
3888         (gimple_build_assign_with_ops3): New macro.
3889         (gimple_assign_rhs3, gimple_assign_rhs3_ptr, gimple_assign_set_rhs3,
3890         gimple_assign_set_rhs_with_ops, extract_ops_from_tree): New inline
3891         functions.
3892         * tree-cfg.c (verify_gimple_assign_ternary): New static function.
3893         (verify_gimple_assign): Call it.
3894         * doc/gimple.texi (Manipulating operands): Document GIMPLE_TERNARY_RHS.
3895         (Tuple specific accessors, subsection GIMPLE_ASSIGN): Document new
3896         functions for dealing with three-operand statements.
3897         * tree.c (commutative_ternary_tree_code): New function.
3898         * tree.h (commutative_ternary_tree_code): Declare it.
3899         * tree-vrp.c (gimple_assign_nonnegative_warnv_p): Return false for
3900         ternary statements.
3901         (gimple_assign_nonzero_warnv_p): Likewise.
3902         * tree-ssa-sccvn.c (stmt_has_constants): Handle GIMPLE_TERNARY_RHS.
3903         * tree-ssa-ccp.c (get_rhs_assign_op_for_ccp): New static function.
3904         (ccp_fold): Use it.  Handle GIMPLE_TERNARY_RHS.
3905         * tree-ssa-dom.c (enum expr_kind): Add EXPR_TERNARY.
3906         (struct hashtable_expr): New member ternary in the union.
3907         (initialize_hash_element): Handle GIMPLE_TERNARY_RHS.
3908         (hashable_expr_equal_p): Fix indentation.  Handle EXPR_TERNARY.
3909         (iterative_hash_hashable_expr): Likewise.
3910         (print_expr_hash_elt): Handle EXPR_TERNARY.
3911         * gimple-fold.c (fold_gimple_assign): Handle GIMPLE_TERNARY_RHS.
3912         * tree-ssa-threadedge.c (fold_assignment_stmt): Remove useless break
3913         statements.  Handle GIMPLE_TERNARY_RHS.
3914
3915 2010-06-25  Jan Hubicka  <jh@suse.cz>
3916
3917         * doc/invoke.texi (-Wsuggest-attribute): Add noreturn.
3918
3919 2010-06-25  Shujing Zhao  <pearly.zhao@oracle.com>
3920
3921         PR c/44517
3922         * c-parser.c (c_parser_parms_list_declarator): Return NULL if one of
3923         parameters are not good.
3924         (c_parser_parameter_declaration): Error unknown type name if the type
3925         name can't start declaration specifiers.
3926
3927 2010-06-25  Joseph Myers  <joseph@codesourcery.com>
3928
3929         * gcc.c (translate_options): Don't mention +e in comment.
3930         (process_command): Don't handle +e specially.
3931
3932 2010-06-25  Bernd Schmidt  <bernds@codesourcery.com>
3933
3934         * ira.c (allocno_pool, copy_pool, allocno_live_range_pool): Delete.
3935
3936         * ira-build.c (merge_hard_reg_conflicts): New function.
3937         (create_cap_allocno, copy_info_to_removed_store_destinations,
3938         propagate_some_info_from_allocno, propagate_allocno_info): Use it.
3939         (move_allocno_live_ranges, copy_allocno_live_ranges): New functions.
3940         (remove_unnecessary_allocnos, remove_low_level_allocnos)
3941         copy_nifo_to_removed_store_destination): Use them.
3942         * ira-lives.c (make_hard_regno_born): New function, split out of
3943         make_regno_born.
3944         (make_allocno_born): Likewise.
3945         (make_hard_regno_dead): New function, split out of make_regno_dead.
3946