OSDN Git Service

Fix PR debug/45024
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2010-07-22  Dodji Seketeli  <dodji@redhat.com>
2
3         PR debug/45024
4         * dwarf2out.c (scope_die_for): Don't fall back to the compilation
5         unit DIE if we can find the scope DIE.
6
7 2010-07-22  Bernd Schmidt  <bernds@codesourcery.com>
8
9         * ira-build.c (ira_create_object): New arg SUBWORD; all callers changed.
10         Initialize OBJECT_SUBWORD.
11         (ira_create_allocno): Clear ALLOCNO_NUM_OBJECTS.
12         (ira_create_allocno_objects): Renamed from ira_create_allocno_object;
13         all callers changed.
14         (merge_hard_reg_conflicts): Iterate over allocno subobjects.
15         (finish_allocno): Likewise.
16         (move_allocno_live_ranges, copy_allocno_live_ranges): Likewise.
17         (remove_low_level_allocnos): Likewise.
18         (update_bad_spill_attribute): Likewise.
19         (setup_min_max_allocno_live_range_point): Likewise.
20         (sort_conflict_id_map): Likewise.
21         (ira_flattening): Likewise.  Use ior_hard_reg_conflicts.
22         (ior_hard_reg_conflicts): New function.
23         (ior_allocate_object_conflicts): Renamed first argument to OBJ.
24         (compress_conflict_vecs): Iterate over objects, not allocnos.
25         (ira_add_live_range_to_object): New function.
26         (object_range_compare_func): Renamed from allocno_range_compare_func.
27         All callers changed.
28         (setup_min_max_conflict_allocno_ids): For allocnos with multiple
29         subobjects, widen the min/max range of the lowest-order object to
30         potentially include all other such low-order objects.
31         * ira.c (ira_bad_reload_regno_1): Iterate over allocno subobjects.
32         (check_allocation): Likewise.  Use more fine-grained tests for register
33         conflicts.
34         * ira-color.c (allocnos_have_intersected_live_ranges_p): Iterate over
35         allocno subobjects.
36         (assign_hard_reg): Keep multiple sets of conflicts.  Make finer-grained
37         choices about which bits to set in each set.  Don't use
38         ira_hard_reg_not_in_set_p, perform a more elaborate test for conflicts
39         using the multiple sets we computed.
40         (push_allocno_to_stack): Iterate over allocno subobjects.
41         (all_conflicting_hard_regs_coalesced): New static function.
42         (setup_allocno_available_regs_num): Use it.
43         (setup_allocno_left_conflicts_size): Likewise.  Iterate over allocno
44         subobjects.
45         (coalesced_allocno_conflict): Test subobject 0 in each allocno.
46         (setup_allocno_priorities): Divide ALLOCNO_EXCESS_PRESSURE_POINTS_NUM
47         by ALLOCNO_NUM_OBJECTS.
48         (calculate_spill_cost): Likewise.
49         (color_pass): Express if statement in a more normal way.
50         (ira_reassign_conflict_allocnos): Iterate over allocno subobjects.
51         (slot_coalesced_allocno_live_ranges_intersect_p): Likewise.
52         (setup_slot_coalesced_allocno_live_ranges): Likewise.
53         (allocno_reload_assign): Likewise.
54         (ira_reassign_pseudos): Likewise.
55         (fast_allocation): Likewise.
56         * ira-conflicts.c (build_conflict_bit_table): Likewise.
57         (print_allocno_conflicts): Likewise.
58         (ira_build_conflicts): Likewise.
59         (allocnos_conflict_for_copy_p): Renamed from allocnos_conflict_p.  All
60         callers changed.  Test subword 0 of each allocno for conflicts.
61         (build_object_conflicts): Renamed from build_allocno_conflicts.  All
62         callers changed.  Iterate over allocno subobjects.
63         * ira-emit.c (modify_move_list): Iterate over allocno subobjects.
64         * ira-int.h (struct ira_allocno): New member. num_objects.  Rename object
65         to objects and change it into an array.
66         (ALLOCNO_OBJECT): Add new argument N.
67         (ALLOCNO_NUM_OBJECTS, OBJECT_SUBWORD): New macros.
68         (ira_create_allocno_objects): Renamed from ira_create_allocno_object.
69         (ior_hard_reg_conflicts): Declare.
70         (ira_add_live_range_to_object): Declare.
71         (ira_allocno_object_iterator): New.
72         (ira_allocno_object_iter_init, ira_allocno_object_iter_cond): New.
73         (FOR_EACH_ALLOCNO_OBJECT): New macro.
74         * ira-lives.c (objects_live): Renamed from allocnos_live; all uses changed.
75         (allocnos_processed): New sparseset.
76         (make_object_born): Renamed from make_allocno_born; take an ira_object_t
77         argument.  All callers changed.
78         (make_object_dead): Renamed from make_allocno_dead; take an ira_object t
79         argument.  All callers changed.
80         (update_allocno_pressure_excess_length): Take an ira_obejct_t argument.
81         All callers changed.
82         (mark_pseudo_regno_live): Iterate over allocno subobjects.
83         (mark_pseudo_regno_dead): Likewise.
84         (mark_pseudo_regno_subword_live, mark_pseudo_regno_subword_dead): New
85         functions.
86         (mark_ref_live): Detect subword accesses and call
87         mark_pseudo_regno_subword_live as appropriate.
88         (mark_ref_dead): Likewise for mark_pseudo_regno_subword_dead.
89         (process_bb_nodes_live): Deal with object-related updates first; set
90         and test bits in allocnos_processed to avoid computing allocno
91         statistics more than once.
92         (create_start_finish_chains): Iterate over objects, not allocnos.
93         (print_object_live_ranges): New function.
94         (print_allocno_live_ranges): Use it.
95         (ira_create_allocno_live_ranges): Allocate and free allocnos_processed
96         and objects_live.
97
98 2010-07-22  Richard Guenther  <rguenther@suse.de>
99
100         PR lto/42451
101         * gimple.c (gtc_next_dfs_num): New global.
102         (struct sccs): Make value a union, add integer same_p member.
103         (gtc_visit): New function.
104         (gimple_types_compatible_p_1): New function, split out from ...
105         (gimple_types_compatible_p): ... here.  Start a DFS walk here.
106         (iterative_hash_gimple_type): Adjust for sccs change.
107
108 2010-07-22  Martin Jambor  <mjambor@suse.cz>
109
110         PR tree-optimization/44891
111         * tree-sra.c: Include gimple-pretty-print.h.
112         (replace_uses_with_default_def_ssa_name): Renamed to
113         get_repl_default_def_ssa_name, return the new SSA name instead of
114         replacing the old one.
115         (sra_modify_assign): Dump a message when removing a load, if the LHS
116         is an SSA_NAME, do not do any propagation, just set the RHS to a
117         default definition SSA NAME, type convert if necessary.
118         * Makefile.in (tree-sra.o): Add gimple-pretty-print.h to dependencies.
119
120 2010-07-22  Richard Guenther  <rguenther@suse.de>
121
122         PR tree-optimization/45017
123         * tree-ssa-sccvn.c (vn_reference_eq): Make sure we honor
124         TYPE_PRECISION of integral types in addition to size.
125
126 2010-07-22  Maxim Kuvyrkov  <maxim@codesourcery.com>
127
128         * config/rs6000/sysv4.h (CHOOSE_DYNAMIC_LINKER): Default to GLIBC
129         when no C library is specified.
130
131 2010-07-22  Martin Jambor  <mjambor@suse.cz>
132
133         * ipa-prop.h (struct ipa_node_params): Updated comment.
134         (struct ipa_edge_args): Likewise.
135         * Makefile.in (ipa-prop.o): Remove bogus $(GIMPLE_FOLD_H) dependency.
136
137 2010-07-22  Martin Jambor  <mjambor@suse.cz>
138
139         * cgraphunit.c (verify_edge_count_and_frequency): New function.
140         (verify_cgraph_node): Verify frequencies of indirect edges.
141         * tree-inline.c (tree_function_versioning): Update frequencies of
142         indirect edges.
143
144 2010-07-22  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
145
146         PR target/43698
147         * config/arm/arm.md: Split arm_rev into *arm_rev
148         and *thumb1_rev. Set *arm_rev to be predicable.
149
150 2010-07-22  Iain Sandoe  <iains@gcc.gnu.org>
151
152         * config/darwin.h (LINK_COMMAND_SPEC): Split into...
153         (LINK_COMMAND_SPEC_A): New.
154         (DSYMUTIL): New.
155         (DSYMUTIL_SPEC): New.
156         * config/darwin9.h (LINK_COMMAND_SPEC): Remove.
157         (DSYMUTIL_SPEC): Update for darwin >= 9 requirements.
158
159 2010-07-22  Iain Sandoe  <iains@gcc.gnu.org>
160
161         * calls.c (load_register_parameters): Move check for zero
162         sized items so that only the call to 
163         mem_overlaps_already_clobbered_arg_p () is protected.
164
165 2010-07-22  Jan Hubicka  <jh@suse.cz>
166
167         * ipa-pure-const.c (varying_state): Break out from ...
168         (get_function_state): ... here; always return varying_state
169         when state would be NULL otherwise.
170         (remove_node_data): Do not free varying state.
171
172 2010-07-22  Bernd Schmidt  <bernds@codesourcery.com>
173
174         PR bootstrap/44970
175         PR middle-end/45009
176         * postreload.c: Include "target.h".
177         (reload_combine_closest_single_use): Don't take DEBUG_INSNs
178         into account.
179         (fixup_debug_insns): Don't copy the rtx.
180         (reload_combine_recognize_const_pattern): DEBUG_INSNs can't
181         have uses.  Don't copy when replacing.  Call fixup_debug_insns
182         in the case where we merged one add with another.
183         (reload_combine_recognize_pattern): Fail if there aren't any
184         uses.  Try harder to determine whether we're picking a valid
185         index register.  Don't set store_ruid for an insn we're going
186         to scan in the next iteration.
187         (reload_combine): Remove unused code.
188         (reload_combine_note_use): When updating use information for
189         an old insn, ignore a use that occurs after store_ruid.
190         * Makefile.in (postreload.o): Update dependencies.
191
192         * function.c (record_hard_reg_sets): Restrict the previous change
193         to cases where the incoming nominal mode is the same as the
194         incoming promoted mode and everything happens in MODE_INT.
195
196 2010-07-21  Jakub Jelinek  <jakub@redhat.com>
197
198         PR debug/45015
199         * var-tracking.c (adjust_mems): Ignore ASM_OPERANDS with non-zero
200         ASM_OPERANDS_OUTPUT_IDX.
201         (adjust_insn): For inline asm with multiple sets ensure first
202         ASM_OPERANDS vectors are used by all following ASM_OPERANDS in
203         the insn.
204
205 2010-07-21  Richard Henderson  <rth@redhat.com>
206
207         * config/i386/i386.c (setup_incoming_varargs_64): Emit a simple
208         comparison for avoiding xmm register saves.  Emit the xmm register
209         saves explicitly.
210         * config/i386/i386.md (UNSPEC_SSE_PROLOGUE_SAVE): Remove.
211         (UNSPEC_SSE_PROLOGUE_SAVE_LOW): Remove.
212         (sse_prologue_save, sse_prologue_save_insn1, sse_prologue_save_insn):
213         Remove patterns and the associated splitters.
214
215 2010-07-21  Changpeng Fang  <changpeng.fang@amd.com>
216
217         * tree-ssa-loop-prefetch.c (analyze_ref): Strip off the real
218         and imagine parts of a complex, so that they can have the same
219         base and fall into the same group.
220
221 2010-07-21  Richard Guenther  <rguenther@suse.de>
222
223         PR lto/45018
224         * tree.c (find_decls_types_r): Do not follow TREE_CHAIN
225         of TYPE_DECLs.  Do not follow TYPE_NEXT_VARIANT,
226         TYPE_NEXT_PTR_TO, nor TYPE_NEXT_REF_TO or TYPE_CANONICAL.
227
228 2010-07-21  Martin Jambor  <mjambor@suse.cz>
229
230         PR tree-optimization/44900
231         * tree-sra.c (load_assign_lhs_subreplacements): Updated comments.
232         (sra_modify_assign): Move gsi to the next statmenent unconditionally.
233
234 2010-07-21  Bernd Schmidt  <bernds@codesourcery.com>
235
236         PR middle-end/44738
237         * tree-ssa.c (warn_uninit): Avoid emitting an unnecessary message.
238
239 2010-07-21  Richard Guenther  <rguenther@suse.de>
240
241         PR middle-end/45013
242         * tree-ssa.c (useless_type_conversion_p): Dispatch to
243         gimple_types_compatible_p only when in lto.
244         * gimple.c (gimple_types_compatible_p): Use canonical types
245         to speed up comparison.
246
247 2010-07-21  Richard Guenther  <rguenther@suse.de>
248
249         * tree-flow.h (referenced_var): Move define ...
250         * tree-flow-inline.h (referenced_var): ... here as an inline
251         function.  Assert here ...
252         * tree-dfa.c (referenced_var_lookup): ... instead of here.
253         * tree-ssa.c (maybe_optimize_var): Check if the variable
254         is in referenced vars.
255         (execute_update_addresses_taken): Remove old broken check.
256         * gimple-pretty-print.c (pp_points_to_solution): Use
257         referenced_var_lookup.
258         * tree-into-ssa.c (dump_decl_set): Likewise.
259
260 2010-07-21  Jakub Jelinek  <jakub@redhat.com>
261
262         PR debug/45003
263         * var-tracking.c (reverse_op): Also handle {SIGN,ZERO}_EXTEND of
264         a MEM.
265         * dwarf2out.c (loc_descriptor): Don't handle SIGN_EXTEND nor
266         ZERO_EXTEND here.
267
268 2010-07-20  Richard Henderson  <rth@redhat.com>
269
270         * vxworks.c (vxworks_emutls_var_fields): Pass locus to build_decls.
271
272 2010-07-20  Bernd Schmidt  <bernds@codesourcery.com>
273
274         * config/arm/arm.md (thumb1_addsi3): Add alternative and split for
275         computing the sum of the stack pointer and a large constant.
276         * config/arm/constraints.md (M): Remove superfluous parentheses.
277         (Pc): New constraint.
278
279 2010-07-20  Jakub Jelinek  <jakub@redhat.com>
280
281         PR debug/45006
282         * cfgexpand.c (expand_debug_expr): Only look at TYPE_UNSIGNED of
283         operand's type if exp is tcc_unary class tree.
284
285 2010-07-20  Nathan Froyd  <froydnj@codesourcery.com>
286
287         * config/rs6000/rs6000.md (abs<mode>2_isel, nabs<mode>2_isel):
288         Reverse sense of if_then_else condition.
289
290 2010-07-20  Nathan Froyd  <froydnj@codesourcery.com>
291
292         * config/rs6000/rs6000.opt (mblock-move-inline-limit): New option.
293         * config/rs6000/rs6000.c (rs6000_override_options): Set
294         rs6000_block_move_inline_limit appropriately.
295         (expand_block_move): Use rs6000_block_move_inline_limit.
296         * doc/invoke.texi (mblock-move-inline-limit): Document.
297
298 2010-07-20  Bernd Schmidt  <bernds@codesourcery.com>
299
300         * postreload.c (fixup_debug_insns): Remove arg REGNO.  New args
301         FROM and TO.  All callers changed.  Don't look for tracked uses,
302         just scan the RTL for DEBUG_INSNs and substitute.
303         (reload_combine_recognize_pattern): Call fixup_debug_insns.
304         (reload_combine): Ignore DEBUG_INSNs.
305
306 2010-07-20  Jakub Jelinek  <jakub@redhat.com>
307
308         * var-tracking.c (vt_expand_loc, vt_expand_loc_dummy): Bump maximum
309         depth to 8 from 5.
310
311         PR debug/45003
312         * cfgexpand.c (expand_debug_expr) <case NOP_EXPR>: Use ZERO_EXTEND
313         or SIGN_EXTEND depending on TYPE_UNSIGNED of the operand's type
314         instead of the result's type.
315
316 2010-07-20  Richard Guenther  <rguenther@suse.de>
317
318         PR tree-optimization/44977
319         * tree-ssa-dom.c (propagate_rhs_into_lhs): Do not create invalid
320         SSA form.
321
322 2010-07-20  Richard Guenther  <rguenther@suse.de>
323
324         * lto-symtab.c (lto_symtab_merge): Use gimple_types_compatible_p.
325         (lto_symtab_merge_decls_2): Likewise.
326         * gimple.h (gimple_types_compatible_p): Declare.
327         * gimple.c (gimple_queue_type_fixup): Remove.
328         (gimple_fixup_complete_and_incomplete_subtype_p): Likewise.
329         (gimple_compatible_complete_and_incomplete_type_p): New
330         function.
331         (gimple_types_compatible_p): Adjust.
332         (gimple_register_type): Remove type fixup code.
333         (print_gimple_types_stats): Adjust.
334         (free_gimple_type_tables): Likewise.
335         * lto-streamer-in.c (input_gimple_stmt): Use gimple_types_compatible_p.
336         * tree-ssa.c (useless_type_conversion_p): Likewise.
337
338 2010-07-20  Richard Guenther  <rguenther@suse.de>
339
340         PR middle-end/44971
341         PR middle-end/44988
342         * tree-ssa.c (maybe_optimize_var): New function split out from ...
343         (execute_update_addresses_taken): ... here.
344         (non_rewritable_mem_ref_base): Likewise.
345         (execute_update_addresses_taken): Do not iterate over all referenced
346         vars but just all local decls and parms.
347         Properly check call and asm arguments and rewrite call arguments.
348
349 2010-07-20  Maxim Kuvyrkov  <maxim@codesourcery.com>
350
351         * config.gcc (LIBC_GLIBC, LIBC_UCLIBC, LIBC_BIONIC): Move constants
352         to top level.
353         * config/linux.h (LINUX_TARGET_OS_CPP_BUILTINS): Move Android-specific
354         definitions ...
355         * config/linux-android.h (ANDROID_TARGET_OS_CPP_BUILTINS): ... here.
356         New macro.
357         * config/arm/linux-eabi.h (TARGET_OS_CPP_BUILTINS): Use it.
358
359 2010-07-19  Richard Sandiford  <rdsandiford@googlemail.com>
360
361         * gengtype.c (start_root_entry): New function, split out from
362         write_root.  Check whether V is null and raise an error if so.
363         (write_field_root): Check for V being null.  Don't raise an error here;
364         set V to null instead.
365         (write_root): Update comment above function.  Use start_root_entry.
366
367 2010-07-19  Xinliang David Li  <davidxl@google.com>
368
369         PR testsuite/44932
370         * tree-ssa-uninit.c (collect_phi_def_edges): Fix bug collecting def edges.
371         (find_uninit_use): Add dump.
372         (is_use_properly_guarded): Ditto.
373         (warn_uninitialized_phi): Ditto.
374         (execute_late_warn_uninitialized): Ditto.
375
376 2010-07-19  Richard Guenther  <rguenther@suse.de>
377
378         PR middle-end/44941
379         * expr.c (emit_block_move_hints): Move zero size check first.
380         Move asserts to more useful places.
381         * calls.c (load_register_parameters): Check for zero size.
382
383 2010-07-19  Richard Henderson  <rth@redhat.com>
384
385         * tree-optimize.c (execute_all_early_local_passes): New.  Change
386         cgraph_state here ...
387         (execute_early_local_optimizations): ... not here.  Remove.
388         (pass_early_local_passes, pass_all_early_optimizations): Update.
389
390 2010-07-19  Bernd Schmidt  <bernds@codesourcery.com>
391
392         * postreload.c (reload_combine_closest_single_use): Ignore the
393         number of uses for DEBUG_INSNs.
394         (fixup_debug_insns): New static function.
395         (reload_combine_recognize_const_pattern): Use it.  Don't let the
396         main loop be affected by DEBUG_INSNs.
397         Really disallow moving adds past a jump insn.
398         (reload_combine_recognize_pattern): Don't update use_ruid here.
399         (reload_combine_note_use): Do it here.
400         (reload_combine): Use control_flow_insn_p rather than JUMP_P.
401
402 2010-07-19  Bingfeng Mei  <bmei@broadcom.com>
403
404         * ddg.c (create_ddg): Exclude nodes of debug_insn in counting nodes
405         of a loop.
406         * loop-doloop.c (doloop_condition_get): Skip possible debug_insn.
407
408 2010-07-19  Iain Sandoe  <iains@gcc.gnu.org>
409
410         * config/i386/darwin.h: Define darwin_emit_branch_islands.
411         (TARGET_MACHO_BRANCH_ISLANDS): New.
412         (FUNCTION_PROFILER): Use TARGET_MACHO_BRANCH_ISLANDS.
413         * config/i386/i386.h (TARGET_MACHO_BRANCH_ISLANDS): Define a
414         default value.
415         * config/i386/i386.c (output_pic_addr_const): Do not emit
416         branch islands unless TARGET_MACHO_BRANCH_ISLANDS is set.
417         (x86_output_mi_thunk): Adjust symbol creation.
418         * config/rs6000/darwin.h: Define darwin_emit_branch_islands.
419         Remove out of date comment.
420         * config/rs6000/rs6000.c (print_operand): Adjust symbol.
421         DARWIN_LINKER_GENERATES_ISLANDS: Remove.
422         DARWIN_GENERATE_ISLANDS: Ditto.
423         (output_call):  Do not emit branch islands unless
424         darwin_emit_branch_islands is set.
425         * config/darwin.c: Declare darwin_emit_branch_islands.
426         (machopic_indirect_data_reference): Do not emit unless
427         darwin_emit_branch_islands is set.
428         (darwin_override_options): Set darwin_emit_branch_islands
429         where it is needed.
430         * config/darwin9.h
431         DARWIN_LINKER_GENERATES_ISLANDS: Remove.
432
433 2010-07-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
434
435         * doc/sourcebuild.texi (Effective-Target Keywords): Document
436         sse_runtime, sse2_runtime.
437
438 2010-07-18  Richard Sandiford  <rdsandiford@googlemail.com>
439
440         * config/mips/mips.c (mips16_build_call_stub): Zero-extend the
441         low half of a single-register SCmode return value before ORing
442         it with the high half.
443         * config/mips/mips16.S (MERGE_GPRf): Likewise.
444
445 2010-07-17  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
446
447         PR target/44805
448         * config/pa/pa.h (CONSTANT_ALIGNMENT): Align strings to BITS_PER_WORD
449         on all targets.
450
451 2010-07-17  Bernd Schmidt  <bernds@codesourcery.com>
452
453         PR target/42235
454         * postreload.c (reload_cse_move2add): Return bool, true if anything.
455         changed.  All callers changed.
456         (move2add_use_add2_insn): Likewise.
457         (move2add_use_add3_insn): Likewise.
458         (reload_cse_regs): If reload_cse_move2add changed anything, rerun
459         reload_combine.
460         (RELOAD_COMBINE_MAX_USES): Bump to 16.
461         (last_jump_ruid): New static variable.
462         (struct reg_use): New members CONTAINING_MEM and RUID.
463         (reg_state): New members ALL_OFFSETS_MATCH and REAL_STORE_RUID.
464         (reload_combine_split_one_ruid, reload_combine_split_ruids,
465         reload_combine_purge_insn_uses, reload_combine_closest_single_use
466         reload_combine_purge_reg_uses_after_ruid,
467         reload_combine_recognize_const_pattern): New static functions.
468         (reload_combine_recognize_pattern): Verify that ALL_OFFSETS_MATCH
469         is true for our reg and that we have available index regs.
470         (reload_combine_note_use): New args RUID and CONTAINING_MEM.  All
471         callers changed.  Use them to initialize fields in struct reg_use.
472         (reload_combine): Initialize last_jump_ruid.  Be careful when to
473         take PREV_INSN of the scanned insn.  Update REAL_STORE_RUID fields.
474         Call reload_combine_recognize_const_pattern.
475         (reload_combine_note_store): Update REAL_STORE_RUID field.
476
477 2010-07-16  Jason Merrill  <jason@redhat.com>
478
479         * Makefile.in (opts-common.o): Depend on options.h.
480
481 2010-07-16  Nathan Froyd  <froydnj@codesourcery.com>
482
483         * tree.c (build_common_builtin_nodes): Use build_function_type_list
484         instead of build_function_type.
485         * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Likewise.
486         * cgraphunit.c (cgraph_build_static_cdtor): Likewise.
487
488 2010-07-16  Nathan Froyd  <froydnj@codesourcery.com>
489
490         * config/rs6000/rs6000.c (rs6000_emit_sISEL): Let rs6000_emit_int_cmove
491         do all the work.
492         (rs6000_emit_int_cmove): Use function pointers for insn generation.
493         Don't force values into registers unnecessarily.
494         (output_isel): Assert that we're not given conditions we can't handle.
495         Delete corresponding code.
496         * config/rs6000/rs6000.md (isel_signed_<mode>): Use
497         scc_comparison_operator constraint.  Permit 0 for the consequent
498         operand.  Permit any GPR for the alternative operand.
499         (isel_unsigned_<mode>): Likewise.
500
501 2010-07-16  Jakub Jelinek  <jakub@redhat.com>
502
503         PR target/44942
504         * config/i386/i386-protos.h (ix86_function_arg_boundary): Change second
505         argument to const_tree.
506         * config/i386/i386.c (function_arg_advance): If padding needs to be
507         inserted before argument, increment cum->words by number of padding
508         words as well.
509         (contains_aligned_value_p): Change argument to const_tree.
510         (ix86_function_arg_boundary): Change second argument to const_tree.
511
512 2010-07-16  Bernd Schmidt  <bernds@codesourcery.com>
513
514         PR target/42235
515         * function.c (record_hard_reg_sets): New static function.
516         (assign_parm_setup_reg): If an optab for extending exists and the
517         generated code clobbbers no hard regs, emit the insn directly and
518         create a REG_EQUIV note.
519
520 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
521
522         * c-decl.c (detect_field_duplicates): Use DECL_CHAIN insted of
523         TREE_CHAIN.
524         * c-typeck.c (push_init_level): Likewise.
525         (process_init_element): Likewise.
526
527 2010-07-15  Anatoly Sokolov  <aesok@post.ru>
528
529         * tree.h (enum tree_index): Add TI_INTEGER_THREE.
530         (integer_three_node): Add.
531         * tree.c (build_common_tree_nodes_2): Use integer_type_node insead of
532         NULL_TREE in build_int_cst calls. Initialize the integer_three_node.
533         * builtins.c (expand_builtin_prefetch): Use common tree nodes instead
534         of call build_int_cst.
535         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Ditto.
536         * tree-ssa-loop-ivopts.c (idx_find_step): Ditto.
537         (find_interesting_uses_address): Ditto.
538         * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Ditto.
539         * tree-eh.c (lower_eh_constructs_2): Ditto.
540         * tree-vect-loop.c (get_initial_def_for_induction): Ditto.
541         * c-typeck.c (really_start_incremental_init, push_init_level): Ditto.
542         * expmed.c (expand_divmod): Ditto.
543         * tree-mudflap.c (mx_register_decls): Ditto.
544         * varasm.c (array_size_for_constructor): Ditto.
545         * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Ditto.
546         * c-parser.c (c_parser_postfix_expression): Ditto.
547
548 2010-07-15  Bernd Schmidt  <bernds@codesourcery.com>
549
550         * postreload.c (last_label_ruid, first_index_reg, last_index_reg):
551         New static variables.
552         (reload_combine_recognize_pattern): New static function, broken out
553         of reload_combine.
554         (reload_combine): Use it.  Only initialize first_index_reg and
555         last_index_reg once.
556
557 2010-07-15  Richard Henderson  <rth@redhat.com>
558
559         * cgraphunit.c (cgraph_build_static_cdtor): Clear current_function_decl
560         when done.
561
562 2010-07-15  Jan Hubicka  <jh@suse.cz>
563
564         * lto-symtab.c (lto_symtab_resolve_symbols): Remove hack handling comdats
565         for broken gold.
566         (lto_sy mtab_merge_decls_1): Set used_from_object_file correctly. 
567
568 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
569
570         * tree.h (TREE_RTL_OPERAND_CHECK): Delete.
571
572 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
573
574         * tree.h (DECL_CHAIN): Define.
575         * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
576         * c-decl.c: Likewise.
577         * c-parser.c: Likewise.
578         * c-typeck.c: Likewise.
579         * cfgexpand.c: Likewise.
580         * cgraph.c: Likewise.
581         * cgraphunit.c: Likewise.
582         * combine.c: Likewise.
583         * config/alpha/alpha.c: Likewise.
584         * config/arm/arm.c: Likewise.
585         * config/frv/frv.c: Likewise.
586         * config/i386/i386.c: Likewise.
587         * config/i386/winnt-cxx.c: Likewise.
588         * config/ia64/ia64.c: Likewise.
589         * config/iq2000/iq2000.c: Likewise.
590         * config/mep/mep.c: Likewise.
591         * config/mips/mips.c: Likewise.
592         * config/pa/som.h: Likewise.
593         * config/rs6000/rs6000.c: Likewise.
594         * config/s390/s390.c: Likewise.
595         * config/sh/sh.c: Likewise.
596         * config/sh/symbian-cxx.c: Likewise.
597         * config/sparc/sparc.c: Likewise.
598         * config/spu/spu.c: Likewise.
599         * config/stormy16/stormy16.c: Likewise.
600         * config/vxworks.c: Likewise.
601         * config/xtensa/xtensa.c: Likewise.
602         * coverage.c: Likewise.
603         * dbxout.c: Likewise.
604         * dwarf2out.c: Likewise.
605         * emit-rtl.c: Likewise.
606         * expr.c: Likewise.
607         * function.c: Likewise.
608         * gimple-low.c: Likewise.
609         * gimple-pretty-print.c: Likewise.
610         * gimplify.c: Likewise.
611         * integrate.c: Likewise.
612         * ipa-inline.c: Likewise.
613         * ipa-prop.c: Likewise.
614         * ipa-split.c: Likewise.
615         * ipa-struct-reorg.c: Likewise.
616         * ipa-type-escape.c: Likewise.
617         * langhooks.c: Likewise.
618         * lto-cgraph.c: Likewise.
619         * omp-low.c: Likewise.
620         * stor-layout.c: Likewise.
621         * tree-cfg.c: Likewise.
622         * tree-complex.c: Likewise.
623         * tree-dfa.c: Likewise.
624         * tree-dump.c: Likewise.
625         * tree-inline.c: Likewise.
626         * tree-mudflap.c: Likewise.
627         * tree-nested.c: Likewise.
628         * tree-object-size.c: Likewise.
629         * tree-pretty-print.c: Likewise.
630         * tree-sra.c: Likewise.
631         * tree-ssa-live.c: Likewise.
632         * tree-ssa-loop-niter.c: Likewise.
633         * tree-ssa-math-opts.c: Likewise.
634         * tree-ssa-reassoc.c: Likewise.
635         * tree-ssa-sccvn.c: Likewise.
636         * tree-ssa-structalias.c: Likewise.
637         * tree-tailcall.c: Likewise.
638         * tree-vrp.c: Likewise.
639         * tree.c: Likewise.
640         * var-tracking.c: Likewise.
641         * varasm.c: Likewise.
642
643 2010-07-15  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
644
645         PR target/44877
646         * config/spu/spu.c (spu_expand_builtin_1): Allow references
647         (as well as pointers) as argument to mask_for_load builtins.
648
649 2010-07-15  Richard Guenther  <rguenther@suse.de>
650
651         PR tree-optimization/44946
652         * tree-ssa-structalias.c (get_constraint_for_component_ref): Deal
653         with accessing only padding properly.
654
655 2010-07-15  Jan Hubicka  <jh@suse.cz>
656
657         * ipa.c (function_and_variable_visibility): Variables marked as used
658         should not be localized.
659
660 2010-07-15  Jan Hubicka  <jh@suse.cz>
661
662         * cgraph.c: Include lto-streamer.h
663         (change_decl_assembler_name): Work when assembler name hash is at place.
664         (cgraph_make_decl_local): When localizing COMDAT symbol at WPA stage, be
665         sure to rename it to avoid name clash.
666         * ipa.c (cgraph_externally_visible_p, function_and_variable_visibility):
667         Localize hidden symbols only when locally defined.
668
669 2010-07-15  Uros Bizjak  <ubizjak@gmail.com>
670
671         * config/i386/i386.h (SHIFT_COUNT_TRUNCATED): Expand comment.
672
673 2010-07-15  Magnus Granberg  <zorry@gentoo.org>
674             Kevin F. Quinn  <kevquinn@gentoo.org>
675
676         * builtins.c (expand_builtin_init_trampoline): Warn for -Wtrampolines.
677         * common.opt: Add -Wtrampolines.
678         * doc/invoke.texi: Add -Wtrampolines.
679
680 2010-07-15  Jie Zhang  <jie@codesourcery.com>
681
682         * config/arm/cortex-a8.md (cortex_a8_load_store_2): Reserve
683         cortex_a8_issue_ls.
684
685 2010-07-15  Dave Korn  <dave.korn.cygwin@gmail.com>
686
687         * config/i386/cygwin.h (LIBGCJ_SONAME): Update.
688         * config/i386/mingw32.h (LIBGCJ_SONAME): Likewise.
689
690 2010-07-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
691
692         * config/spu/spu.c (reg_names): Remove prototype.
693         (call_used_regs): Likewise.
694
695 2010-07-14  Dave Korn  <dave.korn.cygwin@gmail.com>
696
697         * config/i386/cygming-crtend.c (__FRAME_END__): Replace attribute
698         "unused" with attribute "used".
699         (__JCR_END__): Likewise.
700         * config/i386/cygming-crtbegin.c (__EH_FRAME_BEGIN__): Add missing
701         "used" attribute.
702         (__JCR_LIST__): Replace attribute "unused" with attribute "used".
703
704 2010-07-14  Richard Guenther  <rguenther@suse.de>
705
706         * lto-streamer-in.c (maybe_fixup_handled_component): Remove.
707         (maybe_fixup_decls): Likewise.
708         (input_gimple_stmt): Do not fixup anything.
709         * lto-streamer-out.c (output_gimple_stmt): Make sure all
710         non-automatic variable uses are wrapped inside a MEM_REF.
711
712 2010-07-14  Richard Henderson  <rth@redhat.com>
713
714         * passes.c (rest_of_decl_compilation): Do not call assemble_variable
715         for functions.
716         * varasm.c (assemble_variable): Remove early exit for functions;
717         assert that we're given a variable.
718
719 2010-07-14  Jie Zhang  <jie@codesourcery.com>
720
721         * config/arm/cortex-a8.md (cortex_a8_alu): Don't use
722         cortex_a8_default when neon_type is not none.
723
724 2010-07-14  Bernd Schmidt  <bernds@codesourcery.com>
725
726         * lower-subreg.c (subreg_context): New static bitmap.
727         (decompose_multiword_subregs): Allocate and free it.
728         (find_decomposable_subregs): Set a bit in it for a register that
729         occurs in a subreg that changes mode but not size.
730         (can_decompose_p): Test it instead of non_decomposable_context.
731
732 2010-07-14  Richard Guenther  <rguenther@suse.de>
733
734         PR tree-optimization/44824
735         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Use
736         is_gimple_mem_ref_addr.
737         (tree_ssa_forward_propagate_single_use_vars): Do not propagate
738         non-decl_address_invariant_p addresses.
739
740 2010-07-14  Bernd Schmidt  <bernds@codesourcery.com>
741
742         * reload.c (find_reloads): Revert code to penalize small register
743         classes that was brought in with the IRA merge.
744
745 2010-07-14  Richard Guenther  <rguenther@suse.de>
746
747         * tree-ssa-ccp.c (fold_const_aggregate_ref): Handle MEM_REF
748         as base of ARRAY_REFs.
749
750 2010-07-14  Richard Guenther  <rguenther@suse.de>
751
752         PR middle-end/44930
753         * tree-pretty-print.c (do_niy): Do not print a newline.
754
755 2010-07-14  Bernd Schmidt  <bernds@codesourcery.com>
756
757         * ira-int.h (struct ira_object): New.
758         (ira_object_t): New typedef.  Add DEF_VEC_P and DEF_VEC_ALLOC_P for it.
759         (struct ira_allocno): Remove members min, max,
760         conflict_allocno_array, conflict_id, conflict_allocno_array_size,
761         conflict_allocnos_num and conflict_vec_p.  Add new member object.
762         (OBJECT_CONFLICT_ARRAY, OBJECT_CONFLICT_VEC_P,
763         OBJECT_NUM_CONFLICTS, OBJECT_CONFLICT_ARRAY_SIZE,
764         OBJECT_CONFLICT_HARD_REGS, OBJECT_TOTAL_CONFLICT_HARD_REGS,
765         OBJECT_MIN, OBJECT_MAX, OBJECT_CONFLICT_ID): Renamed from
766         ALLOCNO_CONFLICT_ALLOCNO_ARRAY, ALLOCNO_CONFLICT_VEC_P,
767         ALLOCNO_CONFLICT_ALLOCNOS_NUM, ALLOCNO_CONFLICT_ALLOCNO_ARRAY_SIZE,
768         ALLOCNO_CONFLICT_HARD_REGS, ALLOCNO_TOTAL_CONFLICT_HARD_REGS)
769         ALLOCNO_MIN, ALLOCNO_MAX, and ALLOCNO_CONFLICT_ID; now operate on
770         an ira_object_t rather than ira_allocno_t.  All uses changed.
771         (ira_object_id_map): Renamed from ira_conflict_id_allocno_map; now
772         contains a vector of ira_object_t; all uses changed.
773         (ira_objects_num): Declare variable.
774         (ira_create_allocno_object): Declare function.
775         (ira_conflict_vector_profitable_p): Adjust prototype.
776         (ira_allocate_conflict_vec): Renamed from
777         ira_allocate_allocno_conflict_vec; first arg now ira_object_t.
778         (ira_allocate_object_conflicts): Renamed from
779         ira_allocate_allocno_conflicts; first arg now ira_object_t.
780         (struct ira_object_iterator): New.
781         (ira_object_iter_init, ira_object_iter_cond, FOR_EACH_OBJECT): New.
782         (ira_allocno_conflict_iterator): Renamed member allocno_conflict_vec_p
783         to conflict_vec_p.  All uses changed.
784         (ira_allocno_conflict_iter_init, ira_allocno_conflict_iter_cond):
785         Changed to take into account that conflicts are now tracked for
786         objects.
787         * ira-conflicts.c (OBJECTS_CONFLICT_P): Renamed from CONFLICT_ALLOCNO_P.
788         Args changed to accept ira_object_t.  All uses changed.
789         (allocnos_conflict_p): New static function.
790         (collected_conflict_objects): Renamed from collected_allocno_objects;
791         now a vector of ira_object_t.  All uses changed.
792         (build_conflict_bit_table): Changed to take into account that
793         conflicts are now tracked for objects.
794         (process_regs_for_copy, propagate_copies, build_allocno_conflicts)
795         (print_allocno_conflicts, ira_build_conflicts): Likewise.
796         * ira-color.c (assign_hard_reg, setup_allocno_available_regs_num)
797         setup_allocno_left_conflicts_size, allocno_reload_assign,
798         fast_allocation): Likewise.
799         * ira-lives.c (make_hard_regno_born, make_allocno_born)
800         process_single_reg_class_operands, process_bb_node_lives): Likewise.
801         * ira-emit.c (modify_move_list, add_range_and_copies_from_move_list):
802         Likewise.
803         * ira-build.c (ira_objects_num): New variable.
804         (ira_object_id_map): Renamed from ira_conflict_id_allocno_map; now
805         contains a vector of ira_object_t; all uses changed.
806         (ira_object_id_map_vec): Corresponding change.
807         (object_pool): New static variable.
808         (initiate_allocnos): Initialize it.
809         (finish_allocnos): Free it.
810         (ira_create_object, ira_create_allocno_object, create_allocno_objects):
811         New functions.
812         (ira_create_allocno): Don't set members that were removed.
813         (ira_set_allocno_cover_class): Don't change conflict hard regs.
814         (merge_hard_reg_conflicts): Changed to take into account that
815         conflicts are now tracked for objects.
816         (ira_conflict_vector_profitable_p, ira_allocate_conflict_vec,
817         allocate_conflict_bit_vec, ira_allocate_object_conflicts,
818         compress_conflict_vecs, remove_low_level_allocnos, ira_flattening,
819         setup_min_max_allocno_live_range_point, allocno_range_compare_func,
820         setup_min_max_conflict_allocno_ids, ):  Likewise.
821         (add_to_conflicts): Renamed from add_to_allocno_conflicts, args changed
822         to ira_object_t; all callers changed.
823         (ira_add_conflict): Renamed from ira_add_allocno_conflict, args changed
824         to ira_object_t, all callers changed.
825         (clear_conflicts): Renamed from clear_allocno_conflicts, arg changed
826         to ira_object_t, all callers changed.
827         (conflict_check, curr_conflict_check_tick): Renamed from
828         allocno_conflict_check and curr_allocno_conflict_check_tick; all uses
829         changed.
830         (compress_conflict_vec): Renamed from compress_allocno_conflict_vec,
831         arg changed to ira_object_t, all callers changed.
832         (create_cap_allocno): Call ira_create_allocno_object.
833         (finish_allocno): Free the corresponding object.
834         (sort_conflict_id_map): Renamed from sort_conflict_id_allocno_map; all
835         callers changed.  Adjusted for dealing with objects.
836         (ira_build): Call create_allocno_objects after ira_costs.  Adjusted for
837         dealing with objects.
838         * ira.c (ira_bad_reload_regno_1): Adjusted for dealing with objects.
839
840         * ira-int.h (struct live_range): Rename allocno member to object
841         and change type to ira_object_t.
842         (struct ira_object): New member live_ranges.
843         (struct ira_allocno): Remove member live_ranges.
844         (ALLOCNO_LIVE_RANGES): Remove.
845         (OBJECT_LIVE_RANGES): New macro.
846         (ira_create_live_range, ira_copy_live_range_list,
847         ira_merge_live_range_list, ira_live_ranges_intersect_p,
848         ira_finish_live_range, ira_finish_live_range_list): Adjust declarations.
849         * ira-build.c (ira_create_object): Initialize live ranges here.
850         (ira_create_allocno): Not here.
851         (ira_create_live_range): Rename from ira_create_allocno_live_range, arg
852         changed to ira_object_t, all callers changed.
853         (copy_live_range): Rename from copy_allocno_live_range, all callers
854         changed.
855         (ira_copy_live_range_list): Rename from
856         ira_copy_allocno_live_range_list, all callers changed.
857         (ira_merge_live_ranges): Rename from ira_merge_allocno_live_range_list,
858         all callers changed.
859         (ira_live_ranges_intersect_p): Rename from
860         ira_allocno_live_ranges_intersect_p, all callers changed.
861         (ira_finish_live_range): Rename from ira_finish_allocno_live_range, all
862         callers changed.
863         (ira_finish_live_range_list): Rename from
864         ira_finish_allocno_live_range_list, all callers changed.
865         (change_object_in_range_list): Rename from change_allocno_in_range_list,
866         last arg changed to ira_object_t, all callers changed.
867         (finish_allocno): Changed to expect live ranges in the allocno's object.
868         (move_allocno_live_ranges, copy_allocno_live_ranges,
869         update_bad_spill_attribute, setup_min_max_allocno_live_range_point,
870         ira_flattening, ira_build): Likewise.
871         * ira-color.c (allocnos_have_intersected_live_ranges_p,
872         slot_coalesced_allocno_live_ranges_intersect,
873         setup_slot_coalesced_allocno_live_ranges, fast_allocation): Likewise.
874         * ira-conflicts.c (build_conflict_bit_table): Likewise.
875         * ira-emit.c (add_range_and_copies_from_move_list): Likewise.
876         * ira-lives.c (make_allocno_born, update_allocno_pressure_excess_length,
877         make_allocno_dead, create_start_finish_chains,
878         remove_some_program_points_and_update_live_ranges,
879         ira_debug_live_range_list): Likewise.
880
881         * ira-int.h (ira_object_conflict_iterator): Rename from
882         ira_allocno_conflict_iterator.
883         (ira_object_conflict_iter_init): Rename from
884         ira_allocno_conflict_iter_init, second arg changed to
885         * ira.c (check_allocation): Use FOR_EACH_OBJECT_CONFLICT rather than
886         FOR_EACH_ALLOCNO_CONFLICT.
887         * ira-color.c (assign_hard_reg, push_allocno_to_stack)
888         setup_allocno_left_conflicts_size, coalesced_allocno_conflict_p,
889         ira_reassign_conflict_allocnos, ira_reassign_pseudos): Likewise.
890         * ira-conflicts.c (print_allocno_conflicts): Likewise.
891
892 2010-07-13  Joern Rennecke  <joern.rennecke@embecosm.com>
893
894         PR other/44874
895         * tree-dump.c (dump_options): Add enumerate_locals entry.
896         Add TDF_NOID exclusion to all entry.
897         * tree-dump.h (dump_enumerated_decls): Declare.
898         * tree-pretty-print.c (dump_generic_node): For TDF_NOID,
899         Don't display type uid.
900         (print_declaration): Don't crash on TREE_TYPE (t) == 0.
901         * tree-pass.h (TDF_ENUMERATE_LOCALS): Define.
902         * tree-ssa-live.c: Include gimple.h.
903         (numbered_tree_d): New struct.
904         (numbered_tree): New typedef.
905         (DEF_VEC_O (numbered_tree): New.
906         (DEF_VEC_ALLOC_O (numbered_tree, heap)): Likewise.
907         (compare_decls_by_uid, dump_enumerated_decls_push): New functions.
908         (dump_enumerated_decls): Likewise.
909         * tree-optimize.c (execute_cleanup_cfg_post_optimizing): If comparing
910         debug info and flag_dump_final_insns, call dump_enumerated_decls.
911         * tree-cfg.c (dump_function_to_file): Call dump_enumerated_decls.
912         * Makefile.in (tree-ssa-live.o): Depend on $(GIMPLE_H).
913
914 2010-07-13  Richard Sandiford  <rdsandiford@googlemail.com>
915
916         * expmed.h (MAX_BITS_PER_WORD): Move to...
917         * defaults.h (MAX_BITS_PER_WORD): ...here.
918
919 2010-07-13  DJ Delorie  <dj@redhat.com>
920
921         * config/h8300/h8300.c (h8300_init_once): Default to
922         -fstrict_volatile_bitfields.
923
924         * config/sh/sh.c (sh_override_options): Default to
925         -fstrict_volatile_bitfields.
926
927         * config/rx/rx.c (rx_option_override): New.
928
929         * config/m32c/m32c.c (m32c_override_options): Default to
930         -fstrict_volatile_bitfields.
931
932 2010-07-13  Nathan Froyd  <froydnj@codesourcery.com>
933
934         * tree.h (build_function_call_expr): Delete.
935         (build_call_expr_loc_array): New function.
936         (build_call_expr_loc_vec): New function.
937         * tree-flow.h (struct omp_region): Change type of ws_args field
938         to a VEC.
939         * builtins.c (build_function_call_expr): Delete.
940         (build_call_expr_loc_array): New function.
941         (build_call_expr_loc): Call it.  Use XALLOCAVEC.
942         (build_call_expr): Likewise.
943         (build_call_expr_loc_vec): New function.
944         * cgraphunit.c (build_cdtor): Call build_call_expr instead of
945         build_function_call_expr.
946         * expr.c (emutls_var_address): Likewise.
947         * varasm.c (emutls_common_1): Likewise.
948         * omp-low.c (expand_omp_atomic_mutex): Likewise.
949         (expand_omp_taskreg): Adjust for new type of region->ws_args.
950         (get_ws_args_for): Return a VEC instead of a tree.
951         (expand_parallel_call): Call build_call_expr_loc_vec instead of
952         build_function_call_expr.
953         * stor-layout.c (self_referential_size): Likewise.
954
955 2010-07-13  Jakub Jelinek  <jakub@redhat.com>
956
957         PR testsuite/44701
958         * recog.c (constrain_operands): Allow side-effects in memory
959         operands if either < or > constraint is used, rather than if
960         both < and > is used.
961
962 2010-07-13  Richard Guenther  <rguenther@suse.de>
963
964         PR middle-end/44911
965         * tree-pretty-print.c (dump_generic_node): Use TDF_SLIM for
966         MEM_REF pointer type dumping.  Avoid recursing for TYPE_DECLs
967         without name.
968
969 2010-07-13  Kaz Kojima  <kkojima@gcc.gnu.org>
970
971         PR target/44761
972         * mode-switching.c (optimize_mode_switching): Add ATTRIBUTE_UNUSED
973         to variable emited.
974         * config/sh/sh.c (sh_expand_epilogue): Remove unused variable.
975         * config/sh/sh.md (symGOT_load): Likewise.
976         (symDTPOFF2reg): Likewise.
977         (symTPOFF2reg): Likewise.
978
979 2010-07-13  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
980
981         * expmed.c (MAX_BITS_PER_WORD): Moved to expmed.h.
982         * expmed.h (MAX_BITS_PER_WORD): Moved from expmed.c.
983
984 2010-07-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
985
986         * config/i386/sol2-unwind.h (x86_64_fallback_frame_state): Correct
987         explanation.
988         Find ucontext_t * on Solaris 11.
989         (x86_fallback_frame_state): Handle Solaris 9 multi-threaded pattern.
990         Handle new Solaris 11 __sighndlr patterns.
991
992 2010-07-13  Jakub Jelinek  <jakub@redhat.com>
993
994         PR debug/44901
995         * vec.h (VEC_block_remove): Fix comment.
996         * tree-ssa-live.c (remove_unused_locals): Don't use
997         VEC_unordered_remove on local_decls, instead replace a single
998         vector element in each iteration if at least one element had
999         to be removed and VEC_truncate at the end.
1000         * omp-low.c (expand_omp_taskreg): Likewise.
1001
1002 2010-07-13  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1003
1004         * c-decl.c (finish_function): Fix typo in comment.
1005         
1006 2010-07-12  H.J. Lu  <hongjiu.lu@intel.com>
1007
1008         PR bootstrap/44921
1009         * postreload.c (move2add_use_add3_insn): Silence gcc warning
1010         on min_regno.
1011
1012 2010-07-12  Jakub Jelinek  <jakub@redhat.com>
1013
1014         * tree-vrp.c (simplify_bit_ops_using_ranges): New function.
1015         (simplify_stmt_using_ranges): Use it.
1016
1017 2010-07-12  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1018
1019         * config/spu/spu.h (struct spu_builtin_description): Remove FNDECL
1020         member.  Do not mark as GTY(()).
1021         * config/spu/spu.c (spu_builtins): Remove FNDECL initializer elements.
1022         (spu_builtin_decls): New static variable.
1023         (spu_builtin_decl): Use it instead of spu_builtins[].fndecl.
1024         (spu_init_builtins): Likewise.
1025         (spu_builtin_mul_widen_even): Likewise.
1026         (spu_builtin_mul_widen_odd): Likewise.
1027         (spu_builtin_mask_for_load): Likewise.
1028         (spu_builtin_vec_perm): Likewise.
1029         * config/spu/spu-c.c: Include "target.h".
1030         (spu_resolve_overloaded_builtin): Call targetm.builtin_decl instead
1031         of using spu_builtins[].fndecl.
1032
1033 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1034
1035         * config/mips/mips.c (mips_override_options): Make -mflip-mips16
1036         imply -minterlink-mips16.
1037
1038 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1039
1040         * config/mips/mips.h (mips16_globals): Declare.
1041         (SWITCHABLE_TARGET): Define.
1042         * config/mips/mips.c: Include target-globals.h.
1043         (mips16_globals): New variable.
1044         (mips_set_mips16_mode): Use save_target_globals and
1045         restore_target_globals instead of target_reinit.
1046
1047 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1048
1049         * reginfo.c (init_reg_sets): Don't zero globals here.  Update comment
1050         to say that the function can be called more than once.
1051         * target-globals.c (save_target_globals): Call init_reg_sets.
1052
1053 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1054
1055         * Makefile.in (bb-reorder.o, target-globals.o): Depend on bb-reorder.h
1056         * bb-reorder.h: New file.
1057         * bb-reorder.c (default_target_bb_reorder): New variable.
1058         (this_target_bb_reorder): New conditional variable.
1059         (uncond_jump_length): Redefine as a macro.
1060         * target-globals.h (this_target_bb_reorder): Declare.
1061         (target_globals): Add a bb_reorder field.
1062         (restore_target_globals): Copy the bb_reorder field to
1063         this_target_bb-reorder.
1064         * target-globals.c: Include bb-reorder.h.
1065         (default_target_globals): Initialize the bb_reorder field.
1066         (save_target_globals): Likewise.
1067
1068 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1069
1070         * Makefile.in (gcse.o, target-globals.o): Depend on gcse.h..
1071         * gcse.h: New file.
1072         * gcse.c: Include gcse.h.
1073         (default_target_gcse): New variable.
1074         (this_target_gcse): New conditional variable.
1075         (can_copy): Redefine as a macro.
1076         (can_copy_init_p): New macro.
1077         (can_copy_p): Remove can_copy_init_p.
1078         * target-globals.h (this_target_gcse): Declare.
1079         (target_globals): Add a gcse field.
1080         (restore_target_globals): Copy the gcse field to this_target_gcse.
1081         * target-globals.c: Include gcse.h.
1082         (default_target_globals): Initialize the gcse field.
1083         (save_target_globals): Likewise.
1084
1085 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1086
1087         * ira-int.h (target_ira_int): Add x_ira_prohibited_mode_move_regs
1088         and x_ira_prohibited_mode_move_regs_initialized_p.
1089         (ira_prohibited_mode_move_regs): Redefine as a macro.
1090         * ira.c (ira_prohibited_mode_move_regs): Delete.
1091         (ira_prohibited_mode_move_regs_initialized_p): Redefine as a macro.
1092
1093 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1094
1095         * reload.h (target_reload): Add x_cached_reg_save_code and
1096         x_cached_reg_restore_code.
1097         * caller-save.c (cached_reg_save_code, cached_reg_restore_code):
1098         Redefine as macros.
1099
1100 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1101
1102         * Makefile.in (target-globals.o): Depend on builtins.h.
1103         * builtins.h: New file.
1104         * builtins.c: Include builtins.h.
1105         (default_target_builtins): New variable.
1106         (this_target_builtins): New conditional variable.
1107         (apply_args_mode, apply_result_mode): Redefine as macros.
1108         * target-globals.h (this_target_builtins): Declare.
1109         (target_globals): Add a builtins field.
1110         (restore_target_globals): Copy the builtins field to
1111         this_target_builtins.
1112         * target-globals.c: Include builtins.h.
1113         (default_target_globals): Initialize the builtins field.
1114         (save_target_globals): Likewise.
1115
1116 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1117
1118         * expmed.h (alg_code, mult_cost, MULT_COST_LESS, CHEAPER_MULT_COST)
1119         (algorithm, alg_hash_entry, NUM_ALG_HASH_ENTRIES, alg_hash): Moved
1120         from expmed.c.
1121         (target_expmed): Add x_alg_hash and x_alg_hash_used_p.
1122         (alg_hash, alg_hash_used_p): New macros.
1123         * expmed.c (init_expmed): Clear alg_hash if reinitializing.
1124         (alg_code, mult_cost, MULT_COST_LESS, CHEAPER_MULT_COST, algorithm)
1125         (alg_hash_entry, NUM_ALG_HASH_ENTRIES, alg_hash): Moved to expmed.h.
1126
1127 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1128
1129         * ira-int.h (target_ira_int): Add x_max_struct_costs_size, x_init_cost,
1130         x_temp_costs, x_op_costs, x_this_op_costs and x_cost_classes.
1131         * ira-costs.c (max_struct_costs_size, init_cost, temp_costs, op_costs)
1132         (this_op_costs, costs_classes): Redefine as macros.
1133         (record_reg_classes): Don't take op_costs as a parameter.
1134         (record_operand_costs): Likewise.  Update calls to record_reg_classes.
1135         (scan_one_insn): Update call to record_operand_costs.
1136
1137 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1138
1139         * Makefile.in (target-globals.o): Depend on $(IRA_INT_H).
1140         * ira-int.h (ira_max_nregs, ira_important_class_nums): Delete.
1141         (target_ira_int): New structure.
1142         (default_target_ira_int): Declare.
1143         (this_target_ira_int): Declare as a variable or define as a macro.
1144         (ira_reg_mode_hard_regset, ira_register_move_cost)
1145         (ira_may_move_in_cost, ira_may_move_out_cost, ira_class_subset_p)
1146         (ira_non_ordered_class_hard_regs, ira_class_hard_reg_index)
1147         (prohibited_class_mode_regs, ira_important_classes_num)
1148         (ira_important_classes, ira_reg_class_intersect)
1149         (ira_reg_classes_intersect_p, ira_reg_class_super_classes)
1150         (ira_reg_class_union): Redefine as macros.
1151         * ira.h (target_ira): New structure.
1152         (default_target_ira): Declare.
1153         (this_target_ira): Declare as a variable or define as a macro.
1154         (ira_available_class_regs, ira_hard_regno_cover_class)
1155         (ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate)
1156         (ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs)
1157         (ira_class_hard_regs_num): Redefine as macros.
1158         * ira.c (default_target_ira, default_target_ira_int): New variables.
1159         (this_target_ira, this_target_ira_int): New conditional variables.
1160         (ira_reg_mode_hard_regset, ira_memory_move_cost)
1161         (ira_register_move_cost, ira_may_move_in_cost, ira_may_move_out_cost)
1162         (ira_class_subset_p): Delete.
1163         (no_unit_alloc_regs): Redefine as a macro.
1164         (ira_class_hard_regs, ira_non_ordered_class_hard_regs)
1165         (ira_class_hard_regs_num, ira_class_hard_reg_index)
1166         (ira_available_class_regs): Delete.
1167         (alloc_reg_class_subclasses): Redefine as a macro.
1168         (ira_reg_class_cover_size, ira_reg_class_cover)
1169         (ira_important_classes_num, ira_important_classes)
1170         (ira_important_class_nums, ira_class_translate): Delete.
1171         (cover_class_order): Document the variable's lifetime.
1172         (reorder_important_classes): Don't set ira_important_class_nums.
1173         (ira_reg_class_intersect, ira_reg_classes_intersect_p)
1174         (ira_reg_class_super_classes, ira_reg_class_union)
1175         (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_max_nregs):
1176         Delete.
1177         (setup_reg_class_nregs): Don't set ira_max_regs.
1178         (prohibited_class_mode_regs): Delete.
1179         * target-globals.h (this_target_ira, this_target_ira_int): Declare.
1180         (target_globals): Add ira and ira_int fields.
1181         (restore_target_globals): Copy the ira field to this_target_ira
1182         and the ira_int field to this_target_ira_int.
1183         * target-globals.c: Include ira-int.h.
1184         (default_target_globals): Initialize the ira and ira_int fields.
1185         (save_target_globals): Likewise.
1186
1187 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1188
1189         * Makefile.in (target-globals.o): Depend on $(CFGLOOP_H).
1190         * cfgloop.h (target_cfgloop): New structure.
1191         (default_target_cfgloop): Declare.
1192         (this_target_cfgloop): Declare as a variable or define as a macro.
1193         (target_avail_regs, target_clobbered_regs, target_res_regs)
1194         (target_reg_cost, target_spill_cost): Redefine as macros.
1195         * cfgloopanal.c (default_target_cfgloop): New variable.
1196         (this_target_cfgloop): New conditional variable.
1197         (target_avail_regs, target_clobbered_regs, target_res_regs)
1198         (target_reg_cost, target_spill_cost): Delete.
1199         * target-globals.h (this_target_cfgloop): Declare.
1200         (target_globals): Add a cfgloop field.
1201         (restore_target_globals): Copy the cfgloop field to
1202         this_target_cfgloop.
1203         * target-globals.c: Include cfgloop.h.
1204         (default_target_globals): Initialize the cfgloop field.
1205         (save_target_globals): Likewise.
1206
1207 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1208
1209         * regs.h (target_regs): Add x_direct_load, x_direct_store and
1210         x_float_extend_from_mem.
1211         (direct_load, direct_store, float_extend_from_mem): New macros.
1212         * expr.c (direct_load, direct_store, float_extend_from_mem): Delete.
1213
1214 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1215
1216         * Makefile.in (LIBFUNCS_H): Add $(HASHTAB_H).
1217         (target-globals.o): Depend on $(LIBFUNCS_H).
1218         * libfuncs.h: Include hashtab.h.
1219         (libfunc_entry): Moved from optabs.c.
1220         (target_libfuncs): New structure.
1221         (default_target_libfuncs): Declare.
1222         (this_target_libfuncs): Declare as a variable or define as a macro.
1223         (libfunc_table): Redefine as a macro.
1224         * optabs.c (default_target_libfuncs): New variable.
1225         (this_target_libfuncs): New conditional variable.
1226         (libfunc_table): Delete.
1227         (libfunc_entry): Moved to optabs.h.
1228         (libfunc_hash): Redefine as a macro.
1229         (hash_libfunc, eq_libfunc): Fix comments.
1230         (init_optabs): Use libfunc_hash to detect cases where the function
1231         has already been called.  Clear the hash table instead of
1232         recreating it.
1233         * target-globals.h (this_target_libfuncs): Declare.
1234         (target_globals): Add a libfuncs field.
1235         (restore_target_globals): Copy the libfuncs field to
1236         this_target_libfuncs.
1237         * target-globals.c: Include libfuncs.h.
1238         (default_target_globals): Initialize the libfuncs field.
1239         (save_target_globals): Likewise.
1240
1241 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1242
1243         * Makefile.in (LIBFUNCS_H): New variable.  Use instead of libfuncs.h
1244         in all dependency lists.
1245
1246 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1247
1248         * Makefile.in (target-globals.o): Depend on $(EXPR_H) and $(OPTABS_H).
1249         * optabs.h (target_optabs): New structure.
1250         (default_target_optabs): Declare.
1251         (this_target_optabs): Declare as a variable or define as a macro.
1252         (optab_table, convert_optab_table, direct_optab_table): Redefine
1253         as macros.
1254         * optabs.c (default_target_optabs): New variable.
1255         (this_target_optabs): New conditional variable.
1256         (optab_table, convert_optab_table, direct_optab_table): Delete.
1257         * target-globals.h (this_target_optabs): Declare.
1258         (target_globals): Add a optabs field.
1259         (restore_target_globals): Copy the optabs field to
1260         this_target_optabs.
1261         * target-globals.c: Include expr.h and optabs.h.
1262         (default_target_globals): Initialize the optabs field.
1263         (save_target_globals): Likewise.
1264
1265 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1266
1267         * flags.h (target_flagstate): Add x_flag_excess_precision.
1268         (flag_excess_precision): Redefine as a macro.
1269         * toplev.c (flag_excess_precision): Delete.
1270
1271 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1272
1273         * defaults.h (MAX_MOVE_MAX, MIN_UNITS_PER_WORD): Define if not defined.
1274         * libgcc2.c (MIN_UNITS_PER_WORD): Delete.
1275         * hard-reg-set.h (target_hard_regs): Add x_no_caller_save_reg_set.
1276         (no_caller_save_reg_set): Redefine as a macro.
1277         * reload.h (target_reload): Add x_caller_save_initialized_p and
1278         x_regno_save_mode.
1279         (caller_save_initialized_p): Redefine as a macro.
1280         * caller-save.c (caller_save_initialized_p, no_caller_save_reg_set)
1281         (MAX_MOVE_MAX, MIN_UNITS_PER_WORD): Delete.
1282         (regno_save_mode): Redefine as a macro.
1283
1284 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1285
1286         * Makefile.in (expmed.o, target-globals.o): Depend on expmed.h.
1287         * expmed.h: New file.
1288         * expmed.c (default_target_costs): New variable.
1289         (this_target_costs): New conditional variable.
1290         (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, neg_cost)
1291         (shift_cost, shiftadd_cost, shiftsub0_cost, shiftsub1_cost, mul_cost)
1292         (sdiv_cost, udiv_cost, mul_widen_cost, mul_highpart_cost): Delete.
1293         * target-globals.h (this_target_expmed): Declare.
1294         (target_globals): Add a expmed field.
1295         (restore_target_globals): Copy the expmed field to
1296         this_target_expmed.
1297         * target-globals.c: Include expmed.h.
1298         (default_target_globals): Initialize the expmed field.
1299         (save_target_globals): Likewise.
1300
1301 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1302
1303         * Makefile.in (target-globals.o): Depend on reload.h.
1304         * reload.h (target_reload): New structure.
1305         (default_target_reload): Declare.
1306         (this_target_reload): Declare as a variable or define as a macro.
1307         (indirect_symref_ok, double_reg_address_ok): Redefine as macros.
1308         * reload1.c (default_target_reload): New variable
1309         (this_target_reload): New conditional variable.
1310         (indirect_symref_ok, double_reg_address_ok): Delete.
1311         (spill_indirect_levels): Redefine as a macro.
1312         * target-globals.h (this_target_reload): Declare.
1313         (target_globals): Add a reload field.
1314         (restore_target_globals): Copy the reload field to
1315         this_target_reload.
1316         * target-globals.c: Include hard-reg-set.h.
1317         (default_target_globals): Initialize the reload field.
1318         (save_target_globals): Likewise.
1319
1320 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1321
1322         * rtl.h (target_rtl): Add x_static_reg_base_value.
1323         * alias.c (static_reg_base_value): Redefine as a macro.
1324
1325 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1326
1327         * Makefile.in (reginfo.o): Don't depend on $(GGC_H) or gt-reginfo.h.
1328         (GTFILES): Remove reginfo.c.
1329         * rtl.h (target_rtl): Add x_top_of_stack.
1330         (top_of_stack): New macro.
1331         * reginfo.c: Don't include ggc.h or gt-reginfo.h.
1332         (top_of_stack): Delete.
1333
1334 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1335
1336         * regs.h (target_regs): Add x_hard_regs_of_mode,
1337         x_contains_reg_of_mode, x_move_cost, x_may_move_in_cost,
1338         x_may_move_out_cost and x_last_mode_for_init_move_cost.
1339         (have_regs_of_mode, contains_reg_of_mode, move_cost)
1340         (may_move_in_cost, may_move_out_cost): Redefine as macros.
1341         * reginfo.c (have_regs_of_mode, contains_reg_of_mode, move_cost)
1342         (may_move_in_cost, may_move_out_cost): Delete.
1343         (last_mode_for_init_move_cost): Redefine as a macro.
1344
1345 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1346
1347         * hard-reg-set.h (target_hard_regs): New structure.
1348         (default_target_hard_regs): Declare.
1349         (this_target_hard_regs): Declare as a variable or define as a macro.
1350         (fixed_regs, fixed_reg_set, call_used_regs, call_really_used_regs)
1351         (call_used_reg_set, call_fixed_reg_set, regs_invalidated_by_call)
1352         (reg_alloc_order, inv_reg_alloc_order, reg_class_contents)
1353         (reg_class_size, reg_class_subclasses, reg_class_subunion)
1354         (reg_class_superunion, reg_names): Redefine as macros.
1355         * reginfo.c (fixed_regs, fixed_reg_set, call_used_regs)
1356         (call_used_reg_set, call_really_used_regs, call_fixed_reg_set)
1357         (regs_invalidated_by_call, reg_alloc_order, inv_reg_alloc_order)
1358         (reg_class_contents, reg_class_size, reg_class_subclasses)
1359         (reg_class_subunion, reg_class_superunion, reg_names): Delete.
1360         (default_target_hard_regs): New variable
1361         (this_target_hard_regs, initial_call_really_used_regs)
1362         (initial_reg_alloc_order): New conditional variables.
1363         (initial_reg_names): New variable.
1364         (init_reg_sets): Assert that initial_call_really_used_regs,
1365         initial_reg_alloc_order and initial_reg_names
1366         are all the same size as their variable counterparts.  Use them to
1367         initialize those counterparts.
1368         * target-globals.h (this_target_hard_regs): Declare.
1369         (target_globals): Add a hard_regs field.
1370         (restore_target_globals): Copy the hard_regs field to
1371         this_target_hard_regs.
1372         * target-globals.c: Include hard-reg-set.h.
1373         (default_target_globals): Initialize the hard_regs field.
1374         (save_target_globals): Likewise.
1375
1376 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1377
1378         * Makefile.in (target-globals.o): Depend on $(RTL_H).
1379         * rtl.h: (target_rtl): New structure.
1380         (default_target_rtl): Declare.
1381         (this_target_rtl): Declare as a variable or define as a macro.
1382         (global_rtl, pic_offset_table_rtx, return_address_pointer_rtx):
1383         Redefine as macros.
1384         * emit-rtl.c (default_target_rtl): New variable.
1385         (this_target_rtl): New conditional variable.
1386         (global_rtl, static_regno_reg_rtx, pic_offset_table_rtx)
1387         (return_address_pointer_rtx): Delete.
1388         (initial_regno_reg_rtx): New macro.
1389         (init_emit): Use initial_regno_reg_rtx instead of static_regno_reg_rtx.
1390         (init_emit_regs): Likewise.
1391         * target-globals.h (this_target_rtl): Declare.
1392         (target_globals): Add a rtl field.
1393         (restore_target_globals): Copy the rtl field to this_target_rtl.
1394         * target-globals.c: Include rtl.h.
1395         (default_target_globals): Initialize the rtl field.
1396         (save_target_globals): Likewise.
1397
1398 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1399
1400         * Makefile.in (target-globals.o): Depend on $(REGS_H).
1401         * regs.h (target_reg_modes): New structure.
1402         (default_target_reg_modes): Declare.
1403         (this_target_reg_modes): Declare as a variable or define as a macro.
1404         (hard_regno_nregs, reg_raw_mode): Redefine as macros.
1405         * reginfo.c (default_target_reg_modes): New variable.
1406         (this_target_reg_modes): New conditional variable.
1407         (hard_regno_nregs, reg_raw_mode): Delete.
1408         * target-globals.h (this_target_regs): Declare.
1409         (target_globals): Add a regs field.
1410         (restore_target_globals): Copy the regs field to this_target_regs.
1411         * target-globals.c: Include regs.h.
1412         (default_target_globals): Initialize the regs field.
1413         (save_target_globals): Likewise.
1414
1415 2010-07-12  Richard Sandiford  <rdsandiford@googlemail.com>
1416
1417         * doc/tm.texi.in (SWITCHABLE_TARGET): Document.
1418         * doc/tm.texi: Regenerate.
1419         * Makefile.in (OBJS-common): Add target-globals.o.
1420         (gtype-desc.o): Depend on $(IPA_PROP_H), $(LTO_STREAMER_H)
1421         and target-globals.h.
1422         (target-globals.o): New rule.
1423         (GTFILES): Include $(srcdir)/target-globals.h.
1424         * defaults.h (SWITCHABLE_TARGET): Define.
1425         * gengtype.c (open_base_files): Add target-globals.h to the
1426         list of includes.
1427         * target-globals.h: New file.
1428         * target-globals.c: Likewise.
1429
1430         * Makefile.in (target-globals.o): Depend on $(FLAGS_H).
1431         * flags.h (target_flag_state): New structure.
1432         (default_target_flag_state): Declare.
1433         (this_target_flag_state): Declare as a variable or define as a macro.
1434         (align_loops_log): Redefine as a macro.
1435         (align_loops_max_skip, align_jumps_log): Likewise.
1436         (align_jumps_max_skip, align_labels_log): Likewise.
1437         (align_labels_max_skip, align_functions_log): Likewise.
1438         * toplev.c (default_target_flag_state): New variable.
1439         (this_target_flag_state): New conditional variable.
1440         (align_loops_log): Delete.
1441         (align_loops_max_skip, align_jumps_log): Likewise.
1442         (align_jumps_max_skip, align_labels_log): Likewise.
1443         (align_labels_max_skip, align_functions_log): Likewise.
1444         * target-globals.h (this_target_flag_state): Declare.
1445         (target_globals): Add a flag_state field.
1446         (restore_target_globals): Copy the flag_state field to
1447         this_target_flag_state.
1448         * target-globals.c: Include flags.h.
1449         (default_target_globals): Initialize the flag_state field.
1450         (save_target_globals): Likewise.
1451
1452 2010-07-12  Jie Zhang  <jie@codesourcery.com>
1453
1454         * postreload.c (reg_symbol_ref[]): New.
1455         (move2add_use_add2_insn): New.
1456         (move2add_use_add3_insn): New.
1457         (reload_cse_move2add): Handle SYMBOL + OFFSET case.
1458         (move2add_note_store): Likewise.
1459
1460 2010-07-12  Joern Rennecke  <joern.rennecke@embecosm.com>
1461
1462         PR rtl-optimization/44752
1463         * genautomata.c (main): Don't emit an empty file even if there
1464         is no automaton.
1465
1466 2010-07-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1467
1468         * config/i386/i386.c (ix86_sol10_return_in_memory): Rename to
1469         ix86_solaris_return_in_memory.
1470         * config/i386-protos.h: Reflect this.
1471         * config/i386/vx-common.h (SUBTARGET_RETURN_IN_MEMORY): Likewise.
1472         * config/i386/sol2-10.h (SUBTARGET_RETURN_IN_MEMORY): Likewise.
1473         Move ...
1474         * config/i386/sol2.h (SUBTARGET_RETURN_IN_MEMORY): ... here.
1475
1476 2010-07-12  Jie Zhang  <jie@codesourcery.com>
1477
1478         * config/arm/arm.c (arm_get_frame_offsets): Don't use r3 to
1479         align the stack when it's going to be saved.
1480
1481 2010-07-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1482
1483         PR pch/14940
1484         * config/host-solaris.c (mmap_fixed): New function.
1485         (sol_gt_pch_get_address): Use it.
1486         (sol_gt_pch_use_address): Likewise.
1487
1488 2010-07-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1489
1490         * config.gcc (i[34567]86-*-solaris2*): Default with_arch_32 to
1491         pentiumpro on Solaris 8 and 9/x86.
1492         * doc/install.texi (Specific, i?86-*-solaris2.[89]): Recommend GNU as.
1493         Document SSE/SSE2 support.
1494         * doc/sourcebuild.texi (Effective-Target Keywords): Document sse.
1495
1496 2010-07-12  Andi Kleen  <ak@linux.intel.com>
1497
1498         * lto-symtab.c (lto_symtab_merge_decls_1): Use fatal_error
1499         instead of gcc_assert to print better error message for multiple
1500         prevailing defs.
1501
1502 2010-07-12  Uros Bizjak  <ubizjak@gmail.com>
1503
1504         * config/i386/i386.c (ix86_asm_output_function_label): Change format
1505         string placeholder from 0x%x to %#x.
1506         (ix86_code_end): Use putc to output '\n'.
1507         (ix86_print_operand) <case ';'>: Use putc to output ';'.
1508
1509 2010-07-11  Kai Tietz  <kai.tietz@onevision.com>
1510
1511         * config/i386/winnt.c (i386_pe_file_end): Quote symbol name
1512         in directive -export.
1513
1514 2010-07-10  Anatoly Sokolov  <aesok@post.ru>
1515
1516         * reginfo.h (reg_classes_intersect_p): Change arguments type to
1517         reg_class_t.
1518         * rtl.h (reg_classes_intersect_p): Adjust prototype.
1519
1520         * config/rs6000/rs6000.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST):
1521         Remove macros.
1522         * config/rs6000/rs6000-protos.h (rs6000_register_move_cost,
1523         rs6000_memory_move_cost): Remove
1524         * config/rs6000/rs6000.c (TARGET_REGISTER_MOVE_COST,
1525         TARGET_MEMORY_MOVE_COST): Define.
1526         (rs6000_register_move_cost): Make static. Change arguments type from
1527         enum reg_class to reg_class_t. Adjust rs6000_memory_move_cost calls.
1528         (rs6000_memory_move_cost): Make static. Change arguments type from
1529         'enum reg_class' to reg_class_t.
1530
1531 2010-07-10  Sandra Loosemore  <sandra@codesourcery.com>
1532
1533         PR middle-end/42505
1534         * tree-inline.c (estimate_num_insns): Refactor builtin complexity
1535         lookup code into....
1536         * builtins.c (is_simple_builtin, is_inexpensive_builtin): ...these
1537         new functions.
1538         * tree.h (is_simple_builtin, is_inexpensive_builtin): Declare.
1539         * cfgloopanal.c (target_clobbered_regs): Define.
1540         (init_set_costs): Initialize target_clobbered_regs.
1541         (estimate_reg_pressure_cost): Add call_p argument.  When true,
1542         adjust the number of available registers to exclude the
1543         call-clobbered registers.
1544         * cfgloop.h (target_clobbered_regs): Declare.
1545         (estimate_reg_pressure_cost): Adjust declaration.
1546         * tree-ssa-loop-ivopts.c (struct ivopts_data): Add body_includes_call.
1547         (ivopts_global_cost_for_size): Pass it to estimate_reg_pressure_cost.
1548         (determine_set_costs): Dump target_clobbered_regs.
1549         (loop_body_includes_call): New function.
1550         (tree_ssa_iv_optimize_loop): Use it to initialize new field.
1551         * loop-invariant.c (gain_for_invariant): Adjust arguments to pass
1552         call_p flag through.
1553         (best_gain_for_invariant): Likewise.
1554         (find_invariants_to_move): Likewise.
1555         (move_single_loop_invariants): Likewise, using already-computed
1556         has_call field.
1557
1558 2010-07-10  Richard Guenther  <rguenther@suse.de>
1559             Joern Rennecke  <joern.rennecke@embecosm.com>
1560
1561         PR debug/44832
1562         * tree-ssa-live.c (mark_all_vars_used_1): Set TREE_USED for LABEL_DECL.
1563         (remove_unused_scope_block_p): Don't drop TREE_USED LABEL_DECLs
1564         unless they have DECL_IGNORED_P set.
1565
1566 2010-07-10  Richard Guenther  <rguenther@suse.de>
1567
1568         PR lto/44889
1569         * gimple.c (gimple_fixup_complete_and_incomplete_subtype_p): New
1570         helper function.
1571         (gimple_types_compatible_p): Similar to pointed-to
1572         types allow and merge a mix of complete and incomplete aggregate.
1573         Use gimple_fixup_complete_and_incomplete_subtype_p for that.
1574         (iterative_hash_gimple_type): Adjust for that.
1575
1576 2010-07-10  Richard Sandiford  <r.sandiford@uk.ibm.com>
1577
1578         * tree.h (DECL_REPLACEABLE_P): Strengthen check for weak symbols.
1579
1580 2010-07-10  Iain Sandoe  <iains@gcc.gnu.org>
1581
1582         PR objc/44140
1583         * config/darwin.c (output_objc_section_asm_op): Save and restore
1584         section when outputting ObjC section list.
1585
1586 2010-07-09  Jan Hubicka  <jh@suse.cz>
1587
1588         * lto-streamer-out.c (produce_symtab): Do not write alias
1589         cgraph/varpool nodes.
1590
1591 2010-07-09  Jan Hubicka  <jh@suse.cz>
1592
1593         * tree-inline.c (declare_return_variable): Fix ICE while
1594         inlining DECL_BY_VALUE function not in SSA form
1595
1596 2010-07-09  Changpeng Fang  <changpeng.fang@amd.com>
1597
1598         PR tree-optimization/44576
1599         * tree-ssa-loop-prefetch.c (trip_count_to_ahead_ratio_too_small_p):
1600         New.  Pull out from is_loop_prefetching_profitable to implement
1601         the trip count to ahead ratio heuristic.
1602         (mem_ref_count_reasonable_p): New.  Pull out from
1603         is_loop_prefetching_profitable to implement the instruction to
1604         memory reference ratio heuristic.  Also consider not reasonable if
1605         the memory reference count is above a threshold (to avoid
1606         explosive compilation time.
1607         (insn_to_prefetch_ratio_too_small_p): New.  Pull out from
1608         is_loop_prefetching_profitable to implement the instruction to
1609         prefetch ratio heuristic.
1610         (is_loop_prefetching_profitable): Removed.
1611         (loop_prefetch_arrays): Distribute the cost analysis across the
1612         function to allow early exit of the prefetch analysis.
1613         is_loop_prefetching_profitable is splitted into three functions,
1614         with each one called as early as possible.
1615         (PREFETCH_MAX_MEM_REFS_PER_LOOP): New.  Threshold above which the
1616         number of memory references in a loop is considered too many.
1617
1618 2010-07-09  Bernd Schmidt  <bernds@codesourcery.com>
1619
1620         * reload.c (find_reloads): Don't clear badop if we have a winreg
1621         alternative, but not win, and the class only has fixed regs.
1622         * hard-reg-set.h (class_only_fixed_regs): Declare.
1623         * reginfo.c (class_only_fixed_regs): New array.
1624         (init_reg_sets_1): Initialize it.
1625         * config/arm/arm.md (arm_addsi3, thumb1_addsi3, arm_subsi3_insn): Don't
1626         discourage alternatives using the stack pointer.
1627
1628         * config/arm/arm.md (addsi3_cbranch): Switch alternatives 0 and 1.
1629
1630         * config/arm/arm.md (Thumb-1 ldrsb peephole): New.
1631
1632         * config/arm/arm.md (cbranchqi4): Fix array size.
1633         (addsi3_cbranch): Also andle alternative 2 like alternative 3 when
1634         calculating length.
1635
1636 2010-07-09  Richard Guenther  <rguenther@suse.de>
1637
1638         * gimple.c (struct type_fixup_s): New struct and VEC type.
1639         (gimple_register_type_fixups): New static global.
1640         (gimple_queue_type_fixup): New function.
1641         (gimple_types_compatible_p): Queue type fixups instead of
1642         applying them here.
1643         (gimple_register_type): Apply queued fixups for the
1644         canonical type.  Empty the type fixup queue.
1645
1646 2010-07-09  Uros Bizjak  <ubizjak@gmail.com>
1647
1648         * configure.ac (gcc_cv_as_ix86_rep_lock_prefix): Fix test.
1649         * configure: Regenerate.
1650         * config.in: Ditto.
1651
1652 2010-07-09  Jakub Jelinek  <jakub@redhat.com>
1653             Denys Vlasenko  <dvlasenk@redhat.com>
1654             Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
1655
1656         PR tree-optimization/28632
1657         * tree-vrp.c (zero_nonzero_bits_from_vr): New function.
1658         (extract_range_from_binary_expr): Further optimize
1659         BIT_AND_EXPR and BIT_IOR_EXPR.
1660
1661 2010-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1662
1663         * tree-if-conv.c (fold_or_predicates): New.
1664         (add_to_predicate_list): Call it.
1665
1666 2010-07-09  Richard Guenther  <rguenther@suse.de>
1667
1668         PR middle-end/44890
1669         * tree-ssa-address.c (create_mem_ref_raw): Only build a MEM_REF
1670         if base is a pointer.
1671         * tree-cfg.c (verify_expr): Update MEM_REF checking.
1672
1673 2010-07-08  Michael Meissner  <meissner@linux.vnet.ibm.com>
1674
1675         PR target/44877
1676         * config/rs6000/rs6000.c (rs6000_expand_builtin): Use
1677         POINTER_TYPE_P instead of checking only for POINTER_TYPE for the
1678         builtin mask for load/store builtins.
1679
1680 2010-07-09  Uros Bizjak  <ubizjak@gmail.com>
1681
1682         * configure.ac (gcc_cv_as_ix86_rep_lock_prefix): Also check
1683         for "lock addl".
1684         * configure: Regenerate.
1685         * config/i386/i386.c (ix86_print_operand) <case ';'>:
1686         Remove TARGET_MACHO.
1687
1688 2010-07-09  Peter Bergner  <bergner@vnet.ibm.com>
1689
1690         * config/rs6000/rs6000.c (rs6000_override_options): Fix setting of
1691         default ISA flags.
1692         * config/rs6000/rs6000.h (ASM_CPU_SPEC): Add -mvsx.
1693
1694 2010-07-09  Tom de Vries  <tjvries@xs4all.nl>
1695
1696         * tree.c (type_hash_if_marked_p): Removed non-ggc_marked_p clause.
1697
1698 2010-07-09  Hariharan Sandanagobalane  <hariharan@picochip.com>
1699
1700         * config/picochip/picochip.md (commsTestPort): Emit more
1701         efficient sequence for tstport instruction.
1702
1703 2010-07-09  Uros Bizjak  <ubizjak@gmail.com>
1704
1705         * config/i386/i386.c (ix86_veclib_handler): Make static.
1706
1707 2010-07-09  Richard Guenther  <rguenther@suse.de>
1708
1709         PR tree-optimization/44852
1710         * tree-ssa-alias.c: Include toplev.h for exact_log2.
1711         (indirect_ref_may_alias_decl_p): Properly handle negative offsets
1712         in MEM_REF.
1713         (indirect_refs_may_alias_p): Likewise.
1714         * Makefile.in (tree-ssa-alias.o): Add $(TOPLEV_H).
1715
1716 2010-07-09  Richard Guenther  <rguenther@suse.de>
1717
1718         PR tree-optimization/44882
1719         * tree-vect-stmts.c (vectorizable_store): Do not assert alias
1720         sets do conflict.
1721         (vectorizable_load): Likewise.
1722
1723 2010-07-09  Bernd Schmidt  <bernds@codesourcery.com>
1724
1725         PR target/40657
1726         * config/arm/arm.c (thumb1_extra_regs_pushed): New arg FOR_PROLOGUE.
1727         All callers changed.
1728         Handle the case when we're called for the epilogue.
1729         (thumb_unexpanded_epilogue): Use it.
1730         (thumb1_expand_epilogue): Likewise.
1731
1732 2010-07-09  Jakub Jelinek  <jakub@redhat.com>
1733
1734         * tree-vrp.c (extract_range_from_binary_expr) <BIT_AND_EXPR>: If
1735         both ranges are range_int_cst_p with non-negative minimum,
1736         try harder to derive smaller range.
1737
1738 2010-07-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1739
1740         * genrecog.c: Include diagnostic-core.h before toplev.h.
1741         * genoutput.c: Likewise.
1742         * genextract.c: Likewise.
1743         * genautomata.c: Likewise.
1744         * genemit.c: Likewise.
1745         * genpeep.c: Likewise.
1746         * genattrtab.c: Likewise.
1747         * genconditions.c: Likewise.
1748         * genpreds.c: Likewise.
1749
1750 2010-07-08  Andi Kleen  <ak@linux.intel.com>
1751
1752         * lto-section-in.c (lto_section_name): Add missing comma.
1753
1754 2010-07-08  Anatoly Sokolov  <aesok@post.ru>
1755
1756         * config/ia64/ia64.h (OVERRIDE_OPTIONS): Remove macros.
1757         * config/ia64/ia64-protos.h (ia64_override_options): Remove.
1758         * config/ia64/ia64.c (TARGET_OPTION_OVERRIDE): Define.
1759         (ia64_override_options): Rename to...
1760         (ia64_option_override): ... this one. Make static.
1761
1762 2010-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1763
1764         PR middle-end/44843
1765         * emit-rtl.c (set_mem_attributes_minus_bitpos): Do not rely on the
1766         pointed-to type of the offset in a MEM_REF to compute the alignment.
1767
1768 2010-07-08  Kai Tietz  <kai.tietz@onevision.com>
1769
1770         * final.c (final_scan_insn): Replace
1771         TARGET_UNWIND_INFO macro check by unwind_emit
1772         hook NULL check.
1773         * targhooks.c (default_unwind_emit): Removed.
1774         * targhooks.h (default_unwind_emit): Likewise.
1775         * target.def (unwind_emit): Set default value to NULL.
1776
1777         * config/i386/i386-protos.h (ix86_asm_output_function_label):
1778         New prototype.
1779         * config/i386/i386.c (ix86_function_ms_hook_prologue): Check
1780         for NULL fntype argument and allow 64-bit targets.
1781         (ix86_asm_output_function_label): New function.
1782         (ix86_expand_prologue): Handle 64-bit ms hook prologue.
1783         (ix86_handle_fndecl_attribute): Likewise.
1784         * doc/extend.texi (ms_hook_prologue): Adjust documentation.
1785         * doc/doc/tm.texi: Regenerated.
1786         * doc/doc/doc/tm.texi.in (ASM_OUTPUT_FUNCTION_LABEL): New.
1787         (ASM_DECLARE_FUNCTION_NAME): Adjust documentation.
1788         * defaults.h (ASM_OUTPUT_FUNCTION_LABEL): New macro.
1789         * config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use
1790         ASM_OUTPUT_FUNCTION_LABEL instead of ASM_OUTPUT_LABEL.
1791         * config/elfos.h: Likewise.
1792         * config/i386/cygming.h: Likewise.
1793         * config/netbsd-aout.h: Likewise.
1794         * config/openbsd.h: Likewise.
1795         * config/i386/i386.h (ASM_OUTPUT_FUNCTION_LABEL): Override
1796         by ix86_asm_output_function_label function call.
1797         * varasm.c (assemble_start_function): Use
1798         ASM_OUTPUT_FUNCTION_LABEL instead of ASM_OUTPUT_LABEL.
1799
1800 2010-07-08  Jan Hubicka  <jh@suse.cz>
1801
1802         * cgraph.c (cgraph_will_be_removed_from_program_if_no_direct_calls):
1803         New function.
1804         * cgraph.h (cgraph_will_be_removed_from_program_if_no_direct_calls):
1805         Declare.
1806         * ipa-cp.c (ipcp_estimate_growth): Use it.
1807         * ipa-inline.c (cgraph_estimate_growth, cgraph_decide_inlining):
1808         Likewise.
1809
1810 2010-07-08  Jan Hubicka  <jh@suse.cz>
1811
1812         * tree-inline.c (declare_return_variable): Allocate annotation for new
1813         temporary.
1814
1815 2010-07-08  Sebastian Pop  <sebastian.pop@amd.com>
1816
1817         PR tree-optimization/44710
1818         * tree-if-conv.c (parse_predicate): New.
1819         (add_to_predicate_list): Call it, call maybe_fold_or_comparisons.
1820         Make sure that the predicates are either SSA_NAMEs or gimple_condexpr.
1821
1822 2010-07-08  Sebastian Pop  <sebastian.pop@amd.com>
1823
1824         * common.opt (ftree-loop-if-convert): New flag.
1825         * doc/invoke.texi (ftree-loop-if-convert): Documented.
1826         * tree-if-conv.c (gate_tree_if_conversion): Enable if-conversion
1827         when flag_tree_loop_if_convert is set.
1828
1829 2010-07-08  Uros Bizjak  <ubizjak@gmail.com>
1830
1831         * config/i386/i386.c: Use short syntax for function calls
1832         through function pointers.
1833         * config/i386/i386.md: Ditto.
1834
1835 2010-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1836
1837         * emit-rtl.c (set_mem_attributes_minus_bitpos): Fix formatting issues.
1838
1839 2010-07-08  Richard Guenther  <rguenther@suse.de>
1840
1841         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Fix
1842         stmt check for POINTER_PLUS_EXPRs, fix the pointer assignment.
1843
1844 2010-07-08  Jakub Jelinek  <jakub@redhat.com>
1845
1846         * dwarf2out.c (mem_loc_descriptor): Use DW_OP_const[48]u
1847         instead of DW_OP_addr for DW_OP_GNU_push_tls_address operand.
1848         (loc_list_from_tree): Likewise.
1849         (output_loc_operands): Handle outputting DW_OP_const[48]u
1850         with loc->dtprel set.
1851         (resolve_addr_in_expr): Handle loc->dtprel like DW_OP_addr.
1852
1853 2010-07-08  Jan Hubicka  <jh@suse.cz>
1854
1855         * ipa.c: Include pointer-set.h
1856         (cgraph_externally_visible_p): New attribute ALIASED;
1857         when in LTO, hidden symbols are local unless they are aliased.
1858         (function_and_variable_visibility): Compute aliased nodes;
1859         handle LTO and hidden symbol on functions and vars.
1860         * cgraph.c (cgraph_make_decl_local): Clear NAMED_SECTION
1861         for COMDAT symbols; handle COMDAT_GROUPS also at vars.
1862
1863 2010-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1864
1865         * config/i386/cygming.h (STACK_CHECK_STATIC_BUILTIN): Define to 1.
1866         * config/i386/freebsd.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
1867         * config/i386/linux.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
1868         * config/i386/linux64.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
1869         * config/i386/sol2.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
1870         * config/i386/i386.c (ix86_gen_adjust_stack_and_probe): New variable.
1871         (ix86_gen_probe_stack_range): Likewise.
1872         (override_options): Set them.
1873         (ix86_target_stack_probe): New function.
1874         (ix86_compute_frame_layout): Force use of push instructions to
1875         save registers if stack checking with probes is enabled.
1876         (get_scratch_register_on_entry): New function.
1877         (release_scratch_register_on_entry): Likewise.
1878         (ix86_adjust_stack_and_probe): Likewise.
1879         (output_adjust_stack_and_probe): Likewise.
1880         (ix86_emit_probe_stack_range): Likewise.
1881         (output_probe_stack_range): Likewise.
1882         (ix86_expand_prologue): Emit stack checking code if static built-in
1883         stack checking is enabled.
1884         Test ix86_target_stack_probe instead of TARGET_STACK_PROBE.
1885         * config/i386/i386-protos.h (ix86_target_stack_probe): Declare.
1886         (output_adjust_stack_and_probe): Likewise.
1887         (output_probe_stack_range): Likewise.
1888         * config/i386/i386.md (UNSPECV_PROBE_STACK_RANGE): New constant.
1889         (allocate_stack_worker_32): Test ix86_target_stack_probe instead of
1890         TARGET_STACK_PROBE.
1891         (allocate_stack_worker_64): Likewise.
1892         (allocate_stack): Likewise.
1893         (adjust_stack_and_probe): New insn.
1894         (probe_stack_range): Likewise.
1895
1896 2010-07-08  Richard Guenther  <rguenther@suse.de>
1897
1898         PR tree-optimization/44831
1899         * tree-ssa-phiprop.c (phiprop_insert_phi): Properly build
1900         a MEM_REF preserving TBAA info of the original dereference.
1901         Dereference the original pointer if the address is not invariant.
1902         (propagate_with_phi): Fixup type checks wrt MEM_REFs.  Require
1903         at least one invariant address that we are going to dereference.
1904
1905 2010-07-08  Richard Guenther  <rguenther@suse.de>
1906
1907         PR tree-optimization/44861
1908         * tree-vect-stmts.c (vectorizable_store): Preserve TBAA
1909         information when building MEM_REFs.
1910         (vectorizable_load): Likewise.
1911         * tree-vect-data-refs.c (vect_setup_realignment): Likewise.
1912
1913 2010-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1914
1915         * config/sol2-c.c: Do not include diagnostic-core.h.
1916
1917 2010-07-08  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1918
1919         PR bootstrap/44768
1920         * cfgexpand.c (estimated_stack_frame_size): Make self-contained
1921         with respect to current_function_decl. Pass decl of the function.
1922         * tree-inline.h (estimated_stack_frame_size): Adjust prototype.
1923         * ipa-inline.c (compute_inline_parameters): Pass decl to
1924         estimated_stack_frame_size.
1925
1926 2010-07-08  Richard Guenther  <rguenther@suse.de>
1927
1928         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
1929         New function.
1930         (valueize_refs): Call it.
1931
1932 2010-07-08  Richard Guenther  <rguenther@suse.de>
1933
1934         PR rtl-optimization/44838
1935         * tree-ssa-alias.c (indirect_refs_may_alias_p): When not in
1936         SSA form do not use pointer equivalence.
1937
1938 2010-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1939
1940         * dwarf2out.c (AT_linkage_name): Delete.
1941         (add_linkage_attr): New function.
1942         (add_linkage_name): Call it to emit the linkage attribute.
1943         (dwarf2out_finish): Likewise.
1944         (move_linkage_attr): Explicitly accept both attribute variants.
1945
1946 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1947
1948         * toplev.h: Do not include diagnostic-core.h.
1949         Include diagnostic-core.h in every file that includes toplev.h.
1950         * c-tree.h: Do not include toplev.h.
1951         * pretty-print.h: Update comment.
1952         * Makefile.in: Update dependencies.
1953         * alias.c: Include diagnostic-core.h in every file that includes
1954         toplev.h.
1955         * attribs.c: Likewise.
1956         * auto-inc-dec.c: Likewise.
1957         * bb-reorder.c: Likewise.
1958         * bt-load.c: Likewise.
1959         * caller-save.c: Likewise.
1960         * calls.c: Likewise.
1961         * cfg.c: Likewise.
1962         * cfganal.c: Likewise.
1963         * cfgbuild.c: Likewise.
1964         * cfgcleanup.c: Likewise.
1965         * cfghooks.c: Likewise.
1966         * cfgloop.c: Likewise.
1967         * combine.c: Likewise.
1968         * config/alpha/alpha.c: Likewise.
1969         * config/arc/arc.c: Likewise.
1970         * config/arm/arm.c: Likewise.
1971         * config/arm/pe.c: Likewise.
1972         * config/avr/avr.c: Likewise.
1973         * config/bfin/bfin.c: Likewise.
1974         * config/cris/cris.c: Likewise.
1975         * config/crx/crx.c: Likewise.
1976         * config/darwin-c.c: Likewise.
1977         * config/darwin.c: Likewise.
1978         * config/fr30/fr30.c: Likewise.
1979         * config/frv/frv.c: Likewise.
1980         * config/h8300/h8300.c: Likewise.
1981         * config/host-darwin.c: Likewise.
1982         * config/i386/i386.c: Likewise.
1983         * config/i386/netware.c: Likewise.
1984         * config/i386/nwld.c: Likewise.
1985         * config/i386/winnt-cxx.c: Likewise.
1986         * config/i386/winnt-stubs.c: Likewise.
1987         * config/i386/winnt.c: Likewise.
1988         * config/ia64/ia64-c.c: Likewise.
1989         * config/ia64/ia64.c: Likewise.
1990         * config/iq2000/iq2000.c: Likewise.
1991         * config/lm32/lm32.c: Likewise.
1992         * config/m32c/m32c-pragma.c: Likewise.
1993         * config/m32c/m32c.c: Likewise.
1994         * config/m32r/m32r.c: Likewise.
1995         * config/m68hc11/m68hc11.c: Likewise.
1996         * config/m68k/m68k.c: Likewise.
1997         * config/mcore/mcore.c: Likewise.
1998         * config/mep/mep-pragma.c: Likewise.
1999         * config/mep/mep.c: Likewise.
2000         * config/mmix/mmix.c: Likewise.
2001         * config/mn10300/mn10300.c: Likewise.
2002         * config/moxie/moxie.c: Likewise.
2003         * config/pa/pa.c: Likewise.
2004         * config/pdp11/pdp11.c: Likewise.
2005         * config/picochip/picochip.c: Likewise.
2006         * config/rs6000/rs6000-c.c: Likewise.
2007         * config/rs6000/rs6000.c: Likewise.
2008         * config/rx/rx.c: Likewise.
2009         * config/s390/s390.c: Likewise.
2010         * config/score/score.c: Likewise.
2011         * config/score/score3.c: Likewise.
2012         * config/score/score7.c: Likewise.
2013         * config/sh/sh.c: Likewise.
2014         * config/sh/symbian-base.c: Likewise.
2015         * config/sh/symbian-c.c: Likewise.
2016         * config/sh/symbian-cxx.c: Likewise.
2017         * config/sol2-c.c: Likewise.
2018         * config/sol2.c: Likewise.
2019         * config/sparc/sparc.c: Likewise.
2020         * config/spu/spu.c: Likewise.
2021         * config/stormy16/stormy16.c: Likewise.
2022         * config/v850/v850-c.c: Likewise.
2023         * config/v850/v850.c: Likewise.
2024         * config/vax/vax.c: Likewise.
2025         * config/vxworks.c: Likewise.
2026         * config/xtensa/xtensa.c: Likewise.
2027         * convert.c: Likewise.
2028         * cse.c: Likewise.
2029         * cselib.c: Likewise.
2030         * dbgcnt.c: Likewise.
2031         * dbxout.c: Likewise.
2032         * ddg.c: Likewise.
2033         * dominance.c: Likewise.
2034         * emit-rtl.c: Likewise.
2035         * explow.c: Likewise.
2036         * expmed.c: Likewise.
2037         * fixed-value.c: Likewise.
2038         * fold-const.c: Likewise.
2039         * fwprop.c: Likewise.
2040         * gcse.c: Likewise.
2041         * ggc-common.c: Likewise.
2042         * ggc-page.c: Likewise.
2043         * ggc-zone.c: Likewise.
2044         * gimple-low.c: Likewise.
2045         * gimplify.c: Likewise.
2046         * graph.c: Likewise.
2047         * haifa-sched.c: Likewise.
2048         * ifcvt.c: Likewise.
2049         * implicit-zee.c: Likewise.
2050         * integrate.c: Likewise.
2051         * ira-build.c: Likewise.
2052         * ira-color.c: Likewise.
2053         * ira-conflicts.c: Likewise.
2054         * ira-costs.c: Likewise.
2055         * ira-lives.c: Likewise.
2056         * ira.c: Likewise.
2057         * lists.c: Likewise.
2058         * loop-doloop.c: Likewise.
2059         * loop-iv.c: Likewise.
2060         * lto-opts.c: Likewise.
2061         * lto-symtab.c: Likewise.
2062         * main.c: Likewise.
2063         * modulo-sched.c: Likewise.
2064         * optabs.c: Likewise.
2065         * params.c: Likewise.
2066         * plugin.c: Likewise.
2067         * postreload-gcse.c: Likewise.
2068         * postreload.c: Likewise.
2069         * predict.c: Likewise.
2070         * profile.c: Likewise.
2071         * real.c: Likewise.
2072         * regcprop.c: Likewise.
2073         * reginfo.c: Likewise.
2074         * regmove.c: Likewise.
2075         * reorg.c: Likewise.
2076         * resource.c: Likewise.
2077         * rtl.c: Likewise.
2078         * rtlanal.c: Likewise.
2079         * sched-deps.c: Likewise.
2080         * sched-ebb.c: Likewise.
2081         * sched-rgn.c: Likewise.
2082         * sdbout.c: Likewise.
2083         * sel-sched-dump.c: Likewise.
2084         * sel-sched-ir.c: Likewise.
2085         * simplify-rtx.c: Likewise.
2086         * stmt.c: Likewise.
2087         * stor-layout.c: Likewise.
2088         * store-motion.c: Likewise.
2089         * targhooks.c: Likewise.
2090         * tree-cfg.c: Likewise.
2091         * tree-cfgcleanup.c: Likewise.
2092         * tree-dump.c: Likewise.
2093         * tree-eh.c: Likewise.
2094         * tree-inline.c: Likewise.
2095         * tree-nomudflap.c: Likewise.
2096         * tree-object-size.c: Likewise.
2097         * tree-optimize.c: Likewise.
2098         * tree-outof-ssa.c: Likewise.
2099         * tree-phinodes.c: Likewise.
2100         * tree-profile.c: Likewise.
2101         * tree-ssa-ccp.c: Likewise.
2102         * tree-ssa-coalesce.c: Likewise.
2103         * tree-ssa-live.c: Likewise.
2104         * tree-ssa-loop-niter.c: Likewise.
2105         * tree-ssa-loop-prefetch.c: Likewise.
2106         * tree-ssa-loop.c: Likewise.
2107         * tree-ssa-structalias.c: Likewise.
2108         * tree-ssa-uninit.c: Likewise.
2109         * tree-ssa.c: Likewise.
2110         * tree-vect-data-refs.c: Likewise.
2111         * tree-vect-loop-manip.c: Likewise.
2112         * tree-vect-loop.c: Likewise.
2113         * tree-vect-patterns.c: Likewise.
2114         * tree-vect-stmts.c: Likewise.
2115         * tree-vrp.c: Likewise.
2116         * varasm.c: Likewise.
2117         * vec.c: Likewise.
2118         * web.c: Likewise.
2119         * xcoffout.c: Likewise.
2120
2121 2010-07-07  Richard Sandiford  <rdsandiford@googlemail.com>
2122
2123         * gengtype.c (write_field_root): New function.
2124         (write_root): Use it.
2125
2126 2010-07-07  Wei Guozhi  <carrot@google.com>
2127
2128         * config/arm/thumb2.md (peephole2 to convert zero_extract/compare
2129         of lowest bits to lshift/compare): Add a missing line.
2130
2131 2010-07-07  Wei Guozhi  <carrot@google.com>
2132
2133         * config/arm/thumb2.md (peephole2 to convert zero_extract/compare
2134         of lowest bits to lshift/compare): New.
2135
2136 2010-07-07  Tom Tromey  <tromey@redhat.com>
2137
2138         * doc/tm.texi: Update.
2139         * doc/tm.texi.in (SDB and DWARF) <TARGET_WANT_DEBUG_PUB_SECTIONS>:
2140         Add @hook.
2141         * target.def (want_debug_pub_sections): New hook.
2142         * config/darwin.h (TARGET_WANT_DEBUG_PUB_SECTIONS): Define.
2143         * dwarf2out.c (add_pubname_string): Check
2144         targetm.want_debug_pub_sections.
2145         (add_pubname): Likewise.
2146         (add_pubtype): Likewise.
2147
2148 2010-07-07  Jie Zhang  <jie@codesourcery.com>
2149
2150         * genautomata.c (output_automata_list_min_issue_delay_code):
2151         Correctly decompress min_issue_delay.
2152
2153 2010-07-07  Bernd Schmidt  <bernds@codesourcery.com>
2154
2155         PR rtl-optimization/44404
2156         * auto-inc-dec.c (find_inc): Avoid calling count_occurrences if
2157         possible, use reg_overlap_mentioned_p instead.
2158
2159 2010-07-07  Duncan Sands  <baldrick@free.fr>
2160
2161         PR middle-end/41355
2162         * tree.c (build_function_type_skip_args): Copy the original type using
2163         build_distinct_type_copy rather than copy_node.
2164
2165 2010-07-07  H.J. Lu  <hongjiu.lu@intel.com>
2166
2167         PR target/44850
2168         * config/i386/i386.c (ix86_function_ms_hook_prologue): Revert
2169         revision 161876.
2170         (ix86_expand_prologue): Likewise.
2171         (ix86_handle_fndecl_attribute): Likewise.
2172         (ix86_asm_declare_function_name): Likewise.
2173         * config/i386/i386.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
2174         * config/i386/cygming.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
2175         (SUBTARGET_ASM_DECLARE_FUNCTION_NAME): Likewise.
2176         * config/i386/i386-protos.h (ix86_asm_declare_function_name): Likewise.
2177         * doc/extend.texi: Likewise.
2178
2179 2010-07-07  H.J. Lu  <hongjiu.lu@intel.com>
2180
2181         PR target/44844
2182         * config/i386/i386.md (rdrand<mode>): Changed to expand to
2183         retry if the carry flag isn't valid.
2184         (rdrand<mode>_1): New.
2185
2186 2010-07-07  Richard Guenther  <rguenther@suse.de>
2187
2188         PR middle-end/44790
2189         * expr.c (expand_expr_real_1): Go the POINTER_PLUS_EXPR path
2190         for expanding the constant offset for MEM_REFs.
2191
2192 2010-07-07  Richard Guenther  <rguenther@suse.de>
2193
2194         * tree-ssa-propagate.h (valid_gimple_call_p): Remove.
2195         * tree-ssa-propagate.c (valid_gimple_call_p): Make static.  Fix.
2196         * gimple.h (is_gimple_operand): Remove.
2197         * gimple.c (is_gimple_operand): Likewise.
2198         (walk_gimple_op): Fix wi->val_only setting for calls.
2199         * tree-cfg.c (verify_gimple_call): Fix argument validation.
2200         * tree-profile.c (tree_gen_ic_func_profiler): Do not create
2201         invalid gimple calls.
2202
2203 2010-07-06  Jan Hubicka  <jh@suse.cz>
2204
2205         * lto-cgraph.c (output_cgraph): Add missing declaration.
2206
2207 2010-07-06  Jan Hubicka  <jh@suse.cz>
2208
2209         * lto-cgraph.c (output_cgraph): Output toplevel asms only into first
2210         partition.
2211
2212 2010-07-06  Alexandre Oliva  <aoliva@redhat.com>
2213
2214         * doc/gimple.texi (GIMPLE_DEBUG): Document.
2215         * doc/rtl.texi (Debug Information): New node.
2216         (NOTE_INSN_VAR_LOCATION): Document.
2217         (debug_insn): Likewise.
2218         * doc/generic.texi (DEBUG_EXPR_DECL): Document.
2219
2220 2010-07-07  Jan Hubicka  <jh@suse.cz>
2221
2222         With parts by Richard Guenther.
2223
2224         PR middle-end/44813
2225         * tree-ssa-uninit.c (ssa_undefined_value_p): Result decl is defined
2226         for functions passed by reference.
2227         * tree.c (needs_to_live_in_memory): RESULT_DECL don't need to live
2228         in memory when passed by reference.
2229         * tree-ssa-ccp.c (get_default_value): Only VAR_DECL is undefined at
2230         beggining.
2231         * ipa-split.c (split_function): Cleanup way return value is passed;
2232         handle SSA DECL_BY_REFERENCE retvals.
2233         * tree-ssa.c (verify_def): Verify that RESULT_DECL is read only when
2234         DECL_BY_REFERENCE is set.
2235         * tree-ssa-structalias.c (get_constraint_for_ssa_var, get_fi_for_callee,
2236         find_what_p_points_to): Handle RESULT_DECL.
2237         * tree-inline.c (declare_return_variable): Get new entry_block argument;
2238         when passing by reference ensure that RESULT_DECL is gimple_val.
2239         (remap_gimple_op_r): Remap RESULT_DECL ssa name.
2240         (remap_gimple_stmt): Handle SSA DECL_BY_REFERENCE returns.
2241
2242 2010-07-07  Bernd Schmidt  <bernds@codesourcery.com>
2243
2244         PR rtl-optimization/44787
2245         * config/arm/arm.md (arith_shiftsi): Allow stack pointer in operand 2.
2246         * config/arm/thumb2.md (thumb2_arith_shiftsi): Likewise.
2247
2248 2010-07-06  Jan Hubicka  <jh@suse.cz>
2249
2250         * lto-symtab.c (lto_cgraph_replace_node): Handle aliases.
2251         (lto_symtab_resolve_can_prevail_p): Also alias of cgraph node
2252         with body can prevail.
2253         (lto_symtab_resolve_symbols): Use cgraph_get_node_or_alias.
2254         (lto_symtab_merge_cgraph_nodes_1): Do not remove nodes from aliases.
2255         * cgraph.c (cgraph_get_node_or_alias): New function.
2256         * cgraph.h (cgraph_get_node_or_alias): Declare.
2257
2258 2010-07-06  Kai Tietz  <kai.tietz@onevision.com>
2259
2260         * config/i386/i386.c (ix86_function_ms_hook_prologue): Enable x64
2261         support.
2262         (ix86_expand_prologue): Likewise.
2263         (ix86_handle_fndecl_attribute): Likewise.
2264         (ix86_asm_declare_function_name): New function for
2265         ASM_DECLARE_FUNCTION_NAME.
2266         * config/i386/i386.h (ASM_DECLARE_FUNCTION_NAME): New macro.
2267         * config/i386/cygming.h (ASM_DECLARE_FUNCTION_NAME): Removed.
2268         (SUBTARGET_ASM_DECLARE_FUNCTION_NAME): New macro.
2269         * config/i386/i386-protos.h (ix86_asm_declare_function_name): New.
2270         * doc/extend.texi: Adjust documentation about ms_hook_prologue
2271         attribute.
2272
2273 2010-07-06  Uros Bizjak  <ubizjak@gmail.com>
2274
2275         * config/i386/i386.md (immediate_operand): New mode attribute.
2276
2277         (pro_epilogue_adjust_stack_<mode>_1): Macroize insn from
2278         pro_epilogue_adjust_stack  and pro_epilogue_adjust_stack_rex64
2279         using P mode iterator.
2280         (pro_epilogue_adjust_stack_di_2): Rename from
2281         pro_epilogue_adjust_stack_rex64_2.
2282
2283         * config/i386/i386.c (pro_epilogue_adjust_stack): Update for rename.
2284
2285 2010-07-06  Uros Bizjak  <ubizjak@gmail.com>
2286
2287         * config/i386/i386.md (insv): Call gen_movdi_insv1 or gen_movsi_insv1
2288         through gen_mov_insv_1 function pointer.
2289         (fmod<mode>3): Call gen_truncxf<mode>2_i387_noop_unspec or
2290         gen_truncxf<mode>2 through gen_truncxf function pointer.
2291         (remainder<mode>3): Ditto.
2292         (cmpstrnsi): Rename cmp_insn function pointer to gen_cmp.
2293         (allocate_stack): Call gen_allocate_stack_worker_64 or
2294         gen_allocate_stack_worker_32 through gen_allocate_stack_worker
2295         function pointer.
2296         (probe_stack): Call gen_iordi3 or gen_iorsi3 through gen_ior3
2297         function pointer.
2298
2299 2010-07-06  Uros Bizjak  <ubizjak@gmail.com>
2300
2301         * config/i386/i386.md (*add<mode>3_cconly_overflow): Use <g>
2302         operand constraint instead of <r><i>m.
2303
2304 2010-07-06  Richard Guenther  <rguenther@suse.de>
2305
2306         PR middle-end/44828
2307         * convert.c (convert_to_integer): Watch out for overflowing
2308         MULT_EXPR as well.
2309
2310 2010-07-05  Jan Hubicka  <jh@suse.cz>
2311
2312         * lto-streamer.c (write_symbol_vec): Rename to ...
2313         (write_symbol) ... this one; write only symbol given and when
2314         present in cache. Sanity check that what is defined is present
2315         in cgraph/varpool with body/finalized decl.
2316         (write_symbols_of_kind): Remove.
2317         (produce_symtab): Take outputblock and sets; use cgraph/varpool/alias
2318         pairs to produce symtab.
2319         (produce_asm_for_decls): Update call of produce_symtab; don't do so
2320         when doing WPA streaming.
2321
2322 2010-07-05  Jan Hubicka  <jh@suse.cz>
2323
2324         * gimple-fold.c (gimple_fold_obj_type_ref_known_binfo): Check that
2325         function is still available to fold into.
2326
2327 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
2328
2329         * vec.h (FOR_EACH_VEC_ELT_REVERSE): New macro.
2330         * function.h (struct_function): Change type of local_decls field
2331         to a VEC.
2332         (add_local_decl): New function.
2333         (FOR_EACH_LOCAL_DECL): New macro.
2334         * cfgexpand.c (init_vars_expansion): Adjust for new type of
2335         cfun->local_decls.
2336         (estimated_stack_frame_size): Likewise.
2337         (expand_used_vars): Likewise.
2338         * cgraphbuild.c (build_cgraph_edges): Likewise.
2339         * function.c (instantiate_decls_1): Likewise.
2340         * ipa-struct-reorg.c (build_data_structure): Likewise.
2341         * ipa-type-escape.c (analyze_function): Likewise.
2342         * lto-streamer-in.c (input_function): Likewise.
2343         * lto-streamer-out.c (output_function): Likewise.
2344         * tree-ssa-live.c (remove_unused_locals): Likewise.
2345         * tree.c (free_lang_data_in_decl): Likewise.
2346         (find_decls_types_in_node): Likewise.
2347         * omp-low.c (remove_exit_barrier): Likewise.
2348         (expand_omp_taskreg): Likewise.
2349         (list2chain): Rename to...
2350         (vec2chain): ...this.  Adjust.
2351         * cgraphunit.c (assemble_thunk): Call add_local_decl.
2352         * tree-cfg.c (replace_by_duplicate_decl): Likewise.
2353         * gimple-low.c (record_vars_into): Likewise.
2354         * tree-inline.c (remap_decls): Likewise.
2355         (declare_return_variable): Likewise.
2356         (declare_inline_vars): Likewise.
2357         (copy_forbidden): Adjust for new type of cfun->local_decls.
2358         (add_local_variables): New function.
2359         (expand_call_inline): Call it.
2360         (tree_function_versioning): Likewise.
2361
2362 2010-07-05  H.J. Lu  <hongjiu.lu@intel.com>
2363
2364         AVX Programming Reference (June, 2010)
2365         * config/i386/cpuid.h (bit_F16C): New.
2366         (bit_RDRND): Likewise.
2367         (bit_FSGSBASE): Likewise.
2368
2369         * config/i386/i386-builtin-types.def: Add
2370         "DEF_FUNCTION_TYPE (UINT16)", function types for
2371         float16 <-> float conversions and
2372         "DEF_FUNCTION_TYPE (VOID, UINT64)".
2373
2374         * config/i386/i386-c.c (ix86_target_macros_internal): Support
2375         OPTION_MASK_ISA_FSGSBASE, OPTION_MASK_ISA_RDRND and
2376         OPTION_MASK_ISA_F16C.
2377
2378         * config/i386/i386.c (OPTION_MASK_ISA_FSGSBASE_SET): New.
2379         (OPTION_MASK_ISA_RDRND_SET): Likewise.
2380         (OPTION_MASK_ISA_F16C_SET): Likewise.
2381         (OPTION_MASK_ISA_FSGSBASE_UNSET): Likewise.
2382         (OPTION_MASK_ISA_RDRND_UNSET): Likewise.
2383         (OPTION_MASK_ISA_F16C_UNSET): Likewise.
2384         (OPTION_MASK_ISA_AVX_UNSET): Add OPTION_MASK_ISA_F16C_UNSET.
2385         (ix86_handle_option): Handle OPT_mfsgsbase, OPT_mrdrnd and OPT_mf16c.
2386         (ix86_target_string): Support -mfsgsbase, -mrdrnd and -mf16c.
2387         (pta_flags): Add PTA_FSGSBASE, PTA_RDRND and PTA_F16C.
2388         (override_options): Handle them.
2389         (ix86_valid_target_attribute_inner_p): Handle fsgsbase, rdrnd and f16c.
2390         (ix86_builtins): Add IX86_BUILTIN_RDFSBASE32,
2391         IX86_BUILTIN_RDFSBASE64, IX86_BUILTIN_RDGSBASE32,
2392         IX86_BUILTIN_RDGSBASE64, IX86_BUILTIN_WRFSBASE32,
2393         IX86_BUILTIN_WRFSBASE64, IX86_BUILTIN_WRGSBASE32,
2394         IX86_BUILTIN_WRGSBASE64, IX86_BUILTIN_RDRAND16,
2395         IX86_BUILTIN_RDRAND32, IX86_BUILTIN_RDRAND64,
2396         IX86_BUILTIN_CVTPH2PS, IX86_BUILTIN_CVTPH2PS256,
2397         IX86_BUILTIN_CVTPS2PH and IX86_BUILTIN_CVTPS2PH256.
2398         (bdesc_args): Likewise.
2399         (ix86_expand_args_builtin): Handle V8SF_FTYPE_V8HI,
2400         V4SF_FTYPE_V8HI, V8HI_FTYPE_V8SF_INT and V8HI_FTYPE_V4SF_INT.
2401         (ix86_expand_special_args_builtin): Handle VOID_FTYPE_UINT64,
2402         VOID_FTYPE_UNSIGNED, UNSIGNED_FTYPE_VOID and UINT16_FTYPE_VOID.
2403         Handle non-memory store.
2404
2405         * config/i386/i386.h (TARGET_FSGSBASE): New.
2406         (TARGET_RDRND): Likewise.
2407         (TARGET_F12C): Likewise.
2408
2409         * config/i386/i386.md (UNSPEC_VCVTPH2PS): New.
2410         (UNSPEC_VCVTPS2PH): Likewise.
2411         (UNSPECV_RDFSBASE): Likewise.
2412         (UNSPECV_RDGSBASE): Likewise.
2413         (UNSPECV_WRFSBASE): Likewise.
2414         (UNSPECV_WRGSBASE): Likewise.
2415         (UNSPECV_RDRAND): Likewise.
2416         (rdfsbase<mode>): Likewise.
2417         (rdgsbase<mode>): Likewise.
2418         (wrfsbase<mode>): Likewise.
2419         (wrgsbase<mode>): Likewise.
2420         (rdrand<mode>): Likewise.
2421
2422         * config/i386/i386.opt: Add -mfsgsbase, -mrdrnd and -mf16c.
2423
2424         * config/i386/immintrin.h (_rdrand_u16): New.
2425         (_rdrand_u32): Likewise.
2426         (_readfsbase_u32): Likewise.
2427         (_readfsbase_u64): Likewise.
2428         (_readgsbase_u32): Likewise.
2429         (_readgsbase_u64): Likewise.
2430         (_writefsbase_u32): Likewise.
2431         (_writefsbase_u64): Likewise.
2432         (_writegsbase_u32): Likewise.
2433         (_writegsbase_u64): Likewise.
2434         (_rdrand_u64): Likewise.
2435         (_cvtsh_ss): Likewise.
2436         (_mm_cvtph_ps): Likewise.
2437         (_mm256_cvtph_ps): Likewise.
2438         (_cvtss_sh): Likewise.
2439         (_mm_cvtps_ph): Likewise.
2440         (_mm256_cvtps_ph): Likewise.
2441
2442         * config/i386/sse.md (vcvtph2ps): New.
2443         (*vcvtph2ps_load): Likewise.
2444         (vcvtph2ps256): Likewise.
2445         (vcvtps2ph): Likewise.
2446         (*vcvtps2ph): Likewise.
2447         (*vcvtps2ph_store): Likewise.
2448         (vcvtps2ph256): Likewise.
2449
2450         * doc/extend.texi: Document FSGSBASE and RDRND built-in functions.
2451
2452         * doc/invoke.texi: Document -mfsgsbase, -mrdrnd and -mf16c.
2453
2454 2010-07-05  Joern Rennecke  <joern.rennecke@embecosm.com>
2455
2456         PR bootstrap/44512
2457         * genenums.c (main): Output include of insn-constants.h
2458         * Makefile.in (insn-enums.o): Depend on insn-constants.h.
2459
2460 2010-07-05  Uros Bizjak  <ubizjak@gmail.com>
2461
2462         * config/i386/i386.c (ix86_gen_allocate_stack_worker): New.
2463         (override_options): Initialize it.
2464         (ix86_expand_prologue): Use it.
2465
2466 2010-07-05  Jakub Jelinek  <jakub@redhat.com>
2467
2468         * tree-nrv.c (tree_nrv): Set DECL_VALUE_EXPR on found to result.
2469
2470 2010-07-05  Anatoly Sokolov  <aesok@post.ru>
2471
2472         * double-int.h (fit_double_type): Remove declaration.
2473         * double-int.c (fit_double_type): Remove function.
2474         * tree.h (int_fits_type_p): Adjust prototype.
2475         * tree.c (int_fits_type_p): Return bool. Use double_int_fits_to_tree_p
2476         instead of fit_double_type.
2477         (build_int_cst_type): Use double_int_to_tree and shwi_to_double_int
2478         instead of fit_double_type and build_int_cst_wide.
2479         * builtins.c (): Use double_int_fits_to_tree_p and double_int_to_tree
2480         instead of fit_double_type and build_int_cst_wide.
2481         (fold_builtin_object_size): Use double_int_fits_to_tree_p instead
2482         of fit_double_type.
2483
2484 2010-07-05  Jan Hubicka  <jh@suse.cz>
2485
2486         * cgraph.h (cgraph_node, cgraph_varpool_node): Update docmentation of
2487         in_other_partition.
2488         * lto-cgraph.c (referenced_from_other_partition_p,
2489         reachable_from_other_partition_p): Use in_other_partition flags.
2490         (output_node, output_varpool_node): COMDAT nodes always have private
2491         copies and thus are never used from other partition.
2492
2493 2010-07-05  Anatoly Sokolov  <aesok@post.ru>
2494
2495         * config/ia64/ia64.h (MEMORY_MOVE_COST): Remove macro.
2496         * config/ia64/t-ia64 (ia64.o): Depend on reload.h.
2497         * config/ia64/ia64.c Include reload.h.
2498         (ia64_memory_move_cost): New function.
2499         (TARGET_MEMORY_MOVE_COST): Define.
2500         (ia64_register_move_cost): Replace MEMORY_MOVE_COST with
2501         memory_move_cost.
2502
2503 2010-07-05  Sandra Loosemore  <sandra@codesourcery.com>
2504
2505         PR middle-end/42505
2506         * tree-ssa-loop-ivopts.c (determine_set_costs): Delete obsolete
2507         comments about cost model.
2508         (try_add_cand_for):  Add second strategy for choosing initial set
2509         based on original IVs, controlled by ORIGINALP argument.
2510         (get_initial_solution): Add ORIGINALP argument.
2511         (find_optimal_iv_set_1): New function, split from find_optimal_iv_set.
2512         (find_optimal_iv_set): Try two different strategies for choosing
2513         the IV set, and return the one with lower cost.
2514
2515 2010-07-05  Richard Guenther  <rguenther@suse.de>
2516
2517         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Copy alias info.
2518
2519 2010-07-05  Richard Guenther  <rguenther@suse.de>
2520
2521         * tree.c (reference_alias_ptr_type): New function.
2522         * tree.h (reference_alias_ptr_type): Declare.
2523         * tree-ssa-loop-ivopts.c (copy_ref_info): Restructure to
2524         allow non-TARGET_MEM_REF new refs.
2525         (rewrite_use_address): Pass old alias pointer type to create_mem_ref.
2526         * tree-ssa-address.c (create_mem_ref_raw): Get alias pointer type.
2527         Build a MEM_REF instead of a TARGET_MEM_REF if possible.
2528         (create_mem_ref): Get alias pointer type.  Adjust calls to
2529         create_mem_ref_raw.
2530         (maybe_fold_tmr): Likewise.
2531         * tree-flow.h (create_mem_ref): Adjust prototype.
2532
2533 2010-07-05  Jakub Jelinek  <jakub@redhat.com>
2534
2535         PR c++/44808
2536         * gimplify.c (gimplify_modify_expr): Only SET_DECL_DEBUG_EXPR if
2537         *from_p is VAR_DECL.
2538
2539 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
2540
2541         * tree.h (build_call_list): Remove.
2542         * tree.c (build_call_list): Remove.
2543
2544 2010-07-05  Richard Guenther  <rguenther@suse.de>
2545
2546         * double-int.h (double_int_sub): Declare.
2547         * double-int.c (double_int_sub): New function.
2548         * dwarf2out.c (field_byte_offset): Use it.
2549         * fixed-value.c (do_fixed_add): Likewise.
2550         (do_fixed_multiply): Likewise.
2551         (do_fixed_divide): Likewise.
2552         * tree-predcom.c (add_ref_to_chain): Likewise.
2553         (determine_roots_comp): Likewise.
2554         * tree-ssa-loop-niter.c (derive_constant_upper_bound_ops): Likewise.
2555
2556 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
2557
2558         * vec.h (VEC_splice, VEC_safe_splice): New macros.  Add function
2559         implementations.
2560
2561 2010-07-05  Bernd Schmidt  <bernds@codesourcery.com>
2562
2563         * config/arm/arm.c (get_arm_condition_code): Remove CC_NOTBmode case.
2564         * arm-modes.def (CC_NOTB): Don't define.
2565         * config/arm/arm.md (arm_adddi3): Generate canonical RTL.
2566         (adddi_sesidi_di, adddi_zesidi_di): Likewise.
2567         (LTUGEU): New code_iterator.
2568         (cnb, optab): New corresponding code_attrs.
2569         (addsi3_carryin_<optab>): Renamed from addsi3_carryin.  Change pattern
2570         to canonical form.  Operands 1 and 2 are commutative.  Parametrize
2571         using LTUGEU.
2572         (addsi3_carryin_shift_<optab>): Likewise.
2573         (addsi3_carryin_alt2_<optab>): Renamed from addsi3_carryin_alt2.
2574         Operands 1 and 2 are commutative.  Parametrize using LTUGEU.
2575         (addsi3_carryin_alt1, addsi3_carryin_alt3): Remove.
2576         (subsi3_compare): Renamed from subsi3_compare0_c.
2577         Change CC_NOTB to CC.
2578         (arm_subsi3_insn): Allow constants for operand 0.
2579         (compare_scc peephole for eq case): New.
2580         (compare_scc splitters): Change CC_NOTB to CC.
2581
2582 2010-07-05  Richard Guenther  <rguenther@suse.de>
2583
2584         * tree-ssa-loop-im.c (for_each_index): Do not handle
2585         ALIGN_INDIRECT_REF.
2586         (gen_lsm_tmp_name): Likewise.
2587         * tree-dump.c (dequeue_and_dump): Likewise.
2588         * tree-pretty-print.c (dump_generic_node): Likewise.
2589         (op_code_prio): Likewise.
2590         (op_symbol_code): Likewise.
2591         * tree.c (staticp): Likewise.
2592         (build1_stat): Likewise.
2593         * tree.h (INDIRECT_REF_P): Likewise.
2594         * fold-const.c (maybe_lvalue_p): Likewise.
2595         (operand_equal_p): Likewise.
2596         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
2597         (ao_ref_init_from_vn_reference): Likewise.
2598         * tree-ssa-loop-ivopts.c (idx_find_step): Likewise.
2599         (find_interesting_uses_address): Likewise.
2600         * dwarf2out.c (loc_list_from_tree): Likewise.
2601         * gimplify.c (gimplify_expr): Likewise.
2602         * tree-eh.c (tree_could_trap_p): Likewise.
2603         * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
2604         * cfgexpand.c (expand_debug_expr): Likewise.
2605         * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise.
2606         * tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise.
2607         * tree-cfg.c (verify_types_in_gimple_min_lval): Likewise.
2608         * config/rs6000/rs6000 (rs6000_check_sdmode): Likewise.
2609         * tree-ssa-operands.c (get_expr_operands): Likewise.
2610         * expr.c (safe_from_p): Likewise.
2611         (expand_expr_real_1): Likewise.  TER BIT_AND_EXPRs into MEM_REFs.
2612         * tree-vect-data-refs.c (vect_setup_realignment): Build
2613         BIT_AND_EXPR and MEM_REF instead of ALIGN_INDIRECT_REF.
2614         * tree-vect-stmts.c (vectorizable_load): Likewise.
2615         * tree.def (ALIGN_INDIRECT_REF): Remove.
2616
2617 2010-07-05  Richard Guenther  <rguenther@suse.de>
2618
2619         PR tree-optimization/44784
2620         * tree-ssa-pre.c (bitmap_find_leader): Fix dominance check
2621         for inserted stmts.
2622         (find_or_generate_expression): Fix SCCVN insertion check.
2623
2624 2010-07-05  Nathan Sidwell  <nathan@codesourcery.com>
2625
2626         * config/rs6000/e500crtsavg64gprctr.asm: Correct done label name.
2627         * config/rs6000/e500crtsav64gprctr.asm: Likewise.
2628         * config/rs6000/e500crtres64gprctr.asm: Likewise. Add FUNC_END
2629         directives.
2630
2631 2010-07-05  Ira Rosen  <irar@il.ibm.com>
2632
2633         * tree-vect-loop.c (vect_get_single_scalar_iteraion_cost): Skip
2634         statements that are not vectorized.
2635         * tree-vect-stmts.c (vect_get_load_cost): Update the value stored
2636         in INSIDE_COST.
2637
2638 2010-07-05  Mikael Pettersson  <mikpe@it.uu.se>
2639
2640         PR bootstrap/44820
2641         * config/arm/arm.c (arm_attr_length_move_neon): Delete regno.
2642
2643 2010-07-05  Richard Guenther  <rguenther@suse.de>
2644
2645         * tree-cfg.c (verify_gimple_return): Handle DECL_BY_REFERENCE
2646         RESULT_DECLs properly.
2647
2648 2010-07-04  H.J. Lu  <hongjiu.lu@intel.com>
2649
2650         PR rtl-optimization/44695
2651         * config/i386/i386.md (extract_code): Removed.
2652         (<u>divmodqi4): Likewise.
2653         (divmodqi4): New.
2654         (udivmodqi4): Likewise.
2655         (divmodhiqi3): Change div/mod to HImode and extend operand 2 to HImode.
2656         (udivmodhiqi3): Likewise.
2657
2658 2010-07-04  Jan Hubicka  <jh@suse.cz>
2659
2660         * lto-cgraph.c (input_edge): Do not care about resolution decisions.
2661
2662 2010-07-04  Jan Hubicka  <jh@suse.cz>
2663
2664         * cgraphunit.c (init_cgraph): Only initialize dump file if it
2665         is not already initialized.
2666
2667 2010-07-04  Richard Sandiford  <rdsandiford@googlemail.com>
2668
2669         * optabs.h (reload_in_optab, reload_out_optab, code_to_optab)
2670         (vcond_gen_code, vcondu_gen_code, movmem_optab, setmem_optab)
2671         (cmpstr_optab, cmpstrn_optab, cmpmem_optab, sync_add_optab)
2672         (sync_sub_optab, sync_ior_optab, sync_and_optab, sync_xor_optab)
2673         (sync_nand_optab, sync_old_add_optab, sync_old_sub_optab)
2674         (sync_old_ior_optab, sync_old_and_optab, sync_old_xor_optab)
2675         (sync_old_nand_optab, sync_new_add_optab, sync_new_sub_optab)
2676         (sync_new_ior_optab, sync_new_and_optab, sync_new_xor_optab)
2677         (sync_new_nand_optab): Redefine as macros.
2678         (sync_compare_and_swap, sync_lock_test_and_set, sync_lock_release):
2679         Delete.
2680         (direct_optab_index): New enum.
2681         (direct_optab_d): New structure.
2682         (direct_optab): New typedef.
2683         (direct_optab_table): Declare.
2684         (direct_optab_handler, set_direct_optab_handler): New functions.
2685         (sync_compare_and_swap_optab, sync_lock_test_and_set_optab)
2686         (sync_lock_release_optab): New macros.
2687         * optabs.c (direct_optab_table): New variable.
2688         (movcc_gen_code, vcond_gen_code, vcondu_gen_code): Delete.
2689         (prepare_cmp_insn): Use direct_optab_handler for cmpmem_optab,
2690         cmpstr_optab and cmpstrn_optab.
2691         (emit_conditional_move): Likewise for movcc_optab.
2692         (can_conditionally_move_p): Likewise for movcc_gen_code.
2693         (init_insn_codes): Clear direct_optab_table.
2694         (init_optabs): Don't initialize the new "direct optabs" here.
2695         (get_vcond_icode): Use direct_optab_handler for vcondu_gen_code and
2696         vcond_gen_code.
2697         (expand_val_compare_and_swap): Likewise sync_compare_and_swap_optab.
2698         (expand_bool_compare_and_swap): Likewise sync_compare_and_swap_optab.
2699         (expand_compare_and_swap_loop): Likewise sync_compare_and_swap_optab.
2700         (expand_sync_operation): Likewise other sync_*_optabs.
2701         (expand_sync_fetch_operation): Likewise.  Rename sync_compare_and_swap
2702         to sync_compare_and_swap_optab.
2703         (expand_sync_lock_test_and_set): Use direct_optab_handler for
2704         sync_lock_test_and_set and sync_compare_and_swap, adding "_optab"
2705         to the names of both.
2706         * builtins.c (expand_builtin_strcmp): Use direct_optab_handler for
2707         cmpstr_optab and cmpstrn_optab.
2708         (expand_builtin_lock_release): Likewise sync_lock_release.
2709         * expr.c (movmem_optab, setmem_optab, cmpstr_optab, cmpstrn_optab)
2710         (cmpmem_optab, sync_add_optab, sync_sub_optab, sync_ior_optab)
2711         (sync_and_optab, sync_xor_optab, sync_nand_optab, sync_old_add_optab)
2712         (sync_old_sub_optab, sync_old_ior_optab, sync_old_and_optab)
2713         (sync_old_xor_optab, sync_old_nand_optab, sync_new_add_optab)
2714         (sync_new_sub_optab, sync_new_ior_optab, sync_new_and_optab)
2715         (sync_new_xor_optab, sync_new_nand_optab, sync_compare_and_swap)
2716         (sync_lock_test_and_set, sync_lock_release): Delete.
2717         (emit_block_move_via_movmem): Use direct_optab_handler for movmem_optab.
2718         (emit_block_move_via_setmem): Use direct_optab_handler for setmem_optab.
2719         * genopinit.c (optabs): Use set_direct_optab_handler for the new
2720         macro optabs.
2721         * omp-low.c (expand_omp_atomic_fetch_op): Update the type of
2722         the "optab" local variable.  Use direct_optab_handler for optab and
2723         sync_compare_and_swap_optab.
2724         * reload1.c (reload_in_optab, reload_out_optab): Delete.
2725         * targhooks.c (default_secondary_reload): Use direct_optab_handler for
2726         reload_in_optab and reload_out_optab.
2727         * config/alpha/alpha.c (alpha_secondary_reload): Likewise.
2728         * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
2729         * config/pa/pa.c (pa_secondary_reload): Likewise.
2730         * java/builtins.c (compareAndSwapInt_builtin): Use direct_optab_handler
2731         for sync_compare_and_swap, renaming it to sync_compare_and_swap_optab.
2732         (compareAndSwapLong_builtin, compareAndSwapObject_builtin): Likewise.
2733         (VMSupportsCS8_builtin): Likewise.
2734
2735 2010-07-04  Richard Sandiford  <rdsandiford@googlemail.com>
2736
2737         * optabs.h (optab_handlers): Change type of insn_code to int.
2738         (optab_handler, set_optab_handler, convert_optab_handler)
2739         (set_convert_optab_handler): Treat the insn_code field as "insn_code -
2740         CODE_FOR_nothing".
2741         * optabs.c (optab_table, convert_optab_table): Always zero-initialize.
2742         (init_insn_codes): Zero both the above arrays.
2743         (init_optabs): Never call init_insn_codes first time around.
2744
2745 2010-07-04  Richard Sandiford  <rdsandiford@googlemail.com>
2746
2747         * optabs.h (optab_handler, convert_optab_handler): Turn into
2748         inline functions that return an insn code.
2749         (set_optab_handler, set_convert_optab_handler): New functions.
2750         * builtins.c: Replace optab_handler(X)->insn_code with
2751         optab_handler or set_optab_handler thoughout.  Likewise
2752         convert_optab_handler(X)->insn_code with convert_optab_handler
2753         and set_convert_optab_handler.
2754         * expmed.c, expr.c, genopinit.c, ifcvt.c, optabs.c, reload.c,
2755         reload1.c, stmt.c, targhooks.c, tree-ssa-loop-prefetch.c,
2756         tree-ssa-math-opts.c, tree-vect-data-refs.c, tree-vect-generic.c,
2757         tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c,
2758         tree-vect-stmts.c, config/m32c/m32c.c, config/rs6000/rs6000.c,
2759         config/spu/spu.c: Likewise.
2760
2761 2010-07-04  Kaz Kojima  <kkojima@gcc.gnu.org>
2762
2763         PR target/44531
2764         * config.gcc (sh*-*-*): Use regular expressions instead of
2765         the 'i' modifier for sed substitutions.
2766
2767 2010-07-04  Jeremie Salvucci  <jeremie.salvucci@free.fr>
2768
2769         * gimple.c (gimple_body): Comments added.
2770
2771 2010-07-04  Richard Guenther  <rguenther@suse.de>
2772
2773         PR middle-end/44809
2774         * gimplify.c (gimplify_expr): Properly build a MEM_REF instead
2775         of an INDIRECT_REF.
2776
2777 2010-07-04  Richard Guenther  <rguenther@suse.de>
2778
2779         PR tree-optimization/44479
2780         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Avoid
2781         extra SSA name copy statements which preserves points-to
2782         information.
2783         * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref):
2784         Copy points-to information for all pointers.  Properly handle
2785         MEM_REFs.
2786         (vect_create_data_ref_ptr): Likewise.  Avoid extra SSA name
2787         copy statements.
2788         * Makefile.in (tree-ssa-loop-ivopts.o): Add tree-ssa-propagate.h
2789         dependency.
2790
2791 2010-07-04  Richard Guenther  <rguenther@suse.de>
2792
2793         PR middle-end/44785
2794         * tree-inline.c (initialize_inlined_parameters): Do not
2795         re-use pointer-map slot over remap_type call.
2796
2797 2010-07-04  Richard Guenther  <rguenther@suse.de>
2798
2799         * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix last commit.
2800
2801 2010-07-04  Richard Guenther  <rguenther@suse.de>
2802
2803         PR tree-optimization/44656
2804         * tree-ssa-sccvn.c (vn_reference_lookup_3): Try disambiguation
2805         again after value-replacing in the defintions lhs.
2806
2807 2010-07-04  Ira Rosen  <irar@il.ibm.com>
2808             Revital Eres  <eres@il.ibm.com>
2809
2810         * doc/tm.texi.in (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST):
2811         Document new arguments.
2812         * doc/tm.texi: Regenerate.
2813         * targhooks.c (default_builtin_vectorization_cost): Add new arguments.
2814         Handle unaligned store.
2815         * targhooks.h (default_builtin_vectorization_cost): Add new arguments.
2816         * target.def (builtin_vectorization_cost): Add new arguments.
2817         * target.h (enum vect_cost_for_stmt): Add unaligned_store.
2818         * tree-vect-loop-manip.c (vect_gen_niters_for_prolog_loop): Take number
2819         of iterations of prolog loop directly from LOOP_PEELING_FOR_ALIGNMENT.
2820         (vect_vfa_segment_size): Fix indentation.
2821         * tree-vectorizer.h (struct _vect_peel_info): New.
2822         (struct _vect_peel_extended_info): New.
2823         (struct _loop_vec_info): Add new field for peeling hash table and a
2824         macro for its access.
2825         (VECT_MAX_COST): Define.
2826         (vect_get_load_cost): Declare.
2827         (vect_get_store_cost, vect_get_known_peeling_cost,
2828         vect_get_single_scalar_iteraion_cost): Likewise.
2829         (vect_supportable_dr_alignment): Add new argument.
2830         * tree-vect-loop.c (new_loop_vec_info): Initialize peeling hash table
2831         field.
2832         (destroy_loop_vec_info): Free peeling hash table.
2833         (vect_analyze_loop_form): Update call to builtin_vectorization_cost.
2834         (vect_analyze_loop): Move vect_enhance_data_refs_alignment before
2835         vect_analyze_slp. Fix indentation.
2836         (vect_get_single_scalar_iteraion_cost): New function.
2837         (vect_get_known_peeling_cost): Likewise.
2838         (vect_estimate_min_profitable_iters): Rename byte_misalign to npeel.
2839         Call vect_get_single_scalar_iteraion_cost instead of cost_for_stmt per
2840         statement. Move outside cost calculation inside unknown peeling case.
2841         Call vect_get_known_peeling_cost for known amount of peeling.
2842         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Add data
2843         reference to the print message of forced alignment.
2844         (vect_verify_datarefs_alignment): Update call to
2845         vect_supportable_dr_alignment.
2846         (vect_get_data_access_cost): New function.
2847         (vect_peeling_hash, vect_peeling_hash_eq, vect_peeling_hash_insert,
2848         vect_peeling_hash_get_most_frequent, vect_peeling_hash_get_lowest_cost,
2849         vect_peeling_hash_choose_best_peeling): Likewise.
2850         (vect_enhance_data_refs_alignment): Fix documentation. Use hash table
2851         to store all the accesses in the loop and find best possible access to
2852         align using peeling for known alignment case. For unknown alignment
2853         check if stores are preferred or if peeling is worthy.
2854         (vect_find_same_alignment_drs): Analyze pairs of loads too.
2855         (vect_supportable_dr_alignment): Add new argument and check aligned
2856         accesses according to it.
2857         * tree-vect-stmts.c (vect_get_stmt_cost): New function.
2858         (cost_for_stmt): Call vect_get_stmt_cost.
2859         (vect_model_simple_cost): Likewise.
2860         (vect_model_store_cost): Call vect_get_stmt_cost. Call
2861         vect_get_store_cost to calculate the cost of the statement.
2862         (vect_get_store_cost): New function.
2863         (vect_model_load_cost): Call vect_get_stmt_cost. Call
2864         vect_get_load_cost to calculate the cost of the statement.
2865         (vect_get_load_cost): New function.
2866         (vectorizable_store): Update call to vect_supportable_dr_alignment.
2867         (vectorizable_load): Likewise.
2868         * config/spu/spu.c (spu_builtin_vectorization_cost): Add new arguments.
2869         * config/i386/i386.c (ix86_builtin_vectorization_cost): Add new
2870         arguments. Handle unaligned store.
2871         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): New.
2872         (rs6000_builtin_support_vector_misalignment): Return true for word and
2873         double word alignments for VSX.
2874         * tree-vect-slp.c (vect_build_slp_tree): Update calls to
2875         vect_supportable_dr_alignment and builtin_vectorization_cost.
2876
2877 2010-07-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2878
2879         PR target/44597
2880         * config/pa/predicates.md (prefetch_cc_operand): Remove.
2881         (prefetch_nocc_operand): Likewise.
2882         * config/pa/pa.md (prefetch): Revise expander to use prefetch_20.
2883         (prefetch_20): New insn.
2884         (prefetch_cc): Remove.
2885         (prefetch_nocc): Likewise.
2886
2887 2010-07-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2888
2889         * expr.c (vector_mode_valid_p): Move to c-common.c.
2890         * expr.h (vector_mode_valid_p): Do not declare here.
2891         * system.h: Poison GCC_EXPR_H in front-ends.
2892         * Makefile.in: Update dependencies.
2893
2894 2010-07-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2895
2896         PR target/44705
2897         * config/pa/pa.h (GO_IF_LEGITIMATE_ADDRESS): Reject LABEL_REF.
2898
2899 2010-07-03  Jan Hubicka  <jh@suse.cz>
2900
2901         * timevar.def (TV_OUT_OF_SSA, TV_VAR_EXPAND, TV_POST_EXPAND,
2902         TV_VAR_TRACKING_DATAFLOW, TV_VAR_TRACKING_EMIT): New timevars.
2903         * cfgexpand.c (gimple_expand_cfg): Use new timevars.
2904         * var-tracking.c (vt_find_locations, variable_tracking_main_1):
2905         Likewise.
2906
2907         * lto-stramer-out.c (pass_ipa_lto_gimple_out, pass_ipa_lto_finish_out):
2908         Update timevars.V
2909         * timevar.def (TV_IPA_LTO_GIMPLE_IO, TV_IPA_LTO_DECL_IO): Remove.
2910         (TV_IPA_LTO_GIMPLE_IN, TV_IPA_LTO_GIMPLE_OUT, TV_IPA_LTO_DECL_IN,
2911         TV_IPA_LTO_DECL_OUT): New.
2912         * lto.c (read_cgraph_and_symbols, materialize_cgraph): Update timevars.
2913
2914 2010-07-03  Jan Hubicka  <jh@suse.cz>
2915
2916         * ipa-inline.c (update_edge_key): Break out from ...
2917         update_callers_keys): ... here;
2918         (update_callee_keys): Update only the edges from caller to callee.
2919         (update_all_calle_keys): Do what update_calle_keys did.
2920         (decide_inlining_of_small_functions): Avoid recomputing of all
2921         callees when badness increase.
2922
2923 2010-07-03  Jie Zhang  <jie@codesourcery.com>
2924
2925         * config/arm/arm.c (arm_attr_length_move_neon): New.
2926         * config/arm/arm-protos.h (arm_attr_length_move_neon): Declare.
2927         * config/arm/neon.md (define_mode_attr V_slen): Remove.
2928         (neon_mov<mode> for VSTRUCT): Use arm_attr_length_move_neon
2929         to compute length attribute.
2930
2931 2010-07-03  Jie Zhang  <jie@codesourcery.com>
2932
2933         * config/arm/vfp.md (*push_multi_vfp): Use vfp_register_operand
2934         as predicate for operand 1 and remove its constraint.
2935         * config/arm/predicates.md (vfp_register_operand): New.
2936         * config/arm/arm.md (*push_multi): Remove the constraint of operand 1.
2937         (*push_fp_multi): Likewise.
2938
2939 2010-07-03  Eric Botcazou  <ebotcazou@adacore.com>
2940
2941         * gimplify.c (mostly_copy_tree_r): Deal with BIND_EXPR.
2942
2943 2010-07-03  Jan Hubicka  <jh@suse.cz>
2944
2945         * config/i386/i386.c (override_options): Revert accidental commit.
2946
2947 2010-07-02  Le-Chun Wu  <lcwu@google.com>
2948
2949         PR c++/44128
2950         * doc/invoke.texi: Update documentation of -Wshadow.
2951
2952 2010-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
2953             Julian Brown  <julian@codesourcery.com>
2954             Sandra Loosemore <sandra@codesourcery.com>
2955
2956         * config/arm/arm.c (arm_canonicalize_comparison): Canonicalize DImode
2957         comparisons.  Adjust to take both operands.
2958         (arm_select_cc_mode): Handle DImode comparisons.
2959         (arm_gen_compare_reg): Generate a scratch register for DImode
2960         comparisons which require one.  Use xor for Thumb equality checks.
2961         (arm_const_double_by_immediates): New.
2962         (arm_print_operand): Allow 'Q' and 'R' for constants.
2963         (get_arm_condition_code): Handle new CC_CZmode and CC_NCVmode.
2964         * config/arm/arm.h (CANONICALIZE_COMPARISON): Always use
2965         arm_canonicalize_comparison.
2966         * config/arm/arm-modes.def: Add CC_CZmode and CC_NCVmode.
2967         * config/arm/arm-protos.h (arm_canonicalize_comparison): Update
2968         prototype.
2969         (arm_const_double_by_immediates): Declare.
2970         * config/arm/constraints.md (Di): New constraint.
2971         * config/arm/predicates.md (arm_immediate_di_operand)
2972         (arm_di_operand, cmpdi_operand): New.
2973         * config/arm/arm.md (cbranchdi4): Handle non-Cirrus also.
2974         (*arm_cmpdi_insn, *arm_cmpdi_unsigned)
2975         (*arm_cmpdi_zero, *thumb_cmpdi_zero): New insns.
2976         (cstoredi4): Handle non-Cirrus also.
2977
2978 2010-07-02  Julian Brown  <julian@codesourcery.com>
2979             Sandra Loosemore <sandra@codesourcery.com>
2980
2981         PR target/43703
2982         * config/arm/vec-common.md (add<mode>3, sub<mode>3, smin<mode>3)
2983         (smax<mode>3): Disable for NEON float modes when
2984         flag_unsafe_math_optimizations is false.
2985         * config/arm/neon.md (*add<mode>3_neon, *sub<mode>3_neon)
2986         (*mul<mode>3_neon)
2987         (mul<mode>3add<mode>_neon, mul<mode>3neg<mode>add<mode>_neon)
2988         (reduc_splus_<mode>, reduc_smin_<mode>, reduc_smax_<mode>): Disable
2989         for NEON float modes when flag_unsafe_math_optimizations is false.
2990         (quad_halves_<code>v4sf): Only enable if
2991         flag_unsafe_math_optimizations is true.
2992         * doc/invoke.texi (ARM Options): Add note about floating point
2993         vectorization requiring -funsafe-math-optimizations.
2994
2995 2010-07-02  Sandra Loosemore  <sandra@codesourcery.com>
2996             Julian Brown  <julian@codesourcery.com>
2997
2998         * config/arm/neon.md (UNSPEC_VABA): Delete.
2999         (UNSPEC_VABAL): Delete.
3000         (UNSPEC_VABS): Delete.
3001         (UNSPEC_VMUL_N): Delete.
3002         (adddi3_neon): New.
3003         (subdi3_neon): New.
3004         (mul<mode>3add<mode>_neon): Make the pattern named.
3005         (mul<mode>3neg<mode>add<mode>_neon): Likewise.
3006         (neon_vadd<mode>): Replace with define_expand, and move the remaining
3007         unspec parts...
3008         (neon_vadd<mode>_unspec): ...to this.
3009         (neon_vmla<mode>, neon_vmla<mode>_unspec): Likewise.
3010         (neon_vlms<mode>, neon_vmls<mode>_unspec): Likewise.
3011         (neon_vsub<mode>, neon_vsub<mode>_unspec): Likewise.
3012         (neon_vaba<mode>): Rewrite in terms of vabd.
3013         (neon_vabal<mode>): Rewrite in terms of vabdl.
3014         (neon_vabs<mode>): Rewrite without unspec.
3015         * config/arm/arm.md (*arm_adddi3): Disable for TARGET_NEON.
3016         (*arm_subdi3): Likewise.
3017         * config/arm/neon.ml (Vadd, Vsub): Split out 64-bit variants and add
3018         No_op attribute to disable assembly output checks.
3019         * config/arm/arm_neon.h: Regenerated.
3020         * doc/arm-neon-intrinsics.texi: Regenerated.
3021
3022 2010-07-02  Jan Hubicka  <jh@suse.cz>
3023
3024         * ipa-split.c (split_function): For aggregate values, set the return
3025         slot optimization bit.  When passing DECL_BY_REFERENCE, produce
3026         *<retval> = fncall.part ().
3027         (execute_split_functions): Do not care about DECL_BY_REFERENCE.
3028
3029 2010-07-02  Sandra Loosemore  <sandra@codesourcery.com>
3030
3031         * config/arm/neon.md (UNSPEC_VAND): Delete.
3032         (UNSPEC_VBIC): Delete.
3033         (UNSPEC_VCLZ): Delete.
3034         (UNSPEC_VCNT): Delete.
3035         (UNSPEC_VEOR): Delete.
3036         (UNSPEC_VORN): Delete.
3037         (UNSPEC_VORR): Delete.
3038         (iordi3_neon): Rewrite RTL without unspec.  Add alternatives to handle
3039         core registers too.
3040         (anddi3_neon): Likewise.
3041         (orndi3_neon): Likewise.
3042         (bicdi3_neon): Likewise.
3043         (xordi3_neon): Likewise.
3044         (neon_vclz<mode>): Rewrite as define_expand and clz<mode>2 to get
3045         rid of unspec and handle unused operand.
3046         (neon_vcnt<mode>): Similarly, with popcount<mode>2.
3047         * config/arm/predicates.md (imm_for_neon_logic_operand):
3048         Require TARGET_NEON.
3049         (imm_for_neon_inv_logic_operand): Likewise.
3050         * config/arm/arm.md (define_split for logical_binary_operator):
3051         Disable for NEON registers.
3052         (anddi3): Add new define_expand, and rename the insn.  Disable
3053         this insn for NEON, where anddi3_neon now applies.
3054         (*anddi_notdi_di): Disable for TARGET_NEON, where bicdi3_neon applies.
3055         (iordi3): As for anddi3.
3056         (xordi3): Likewise.
3057         * config/arm/neon.ml (Vand): Split DImode variants and mark them
3058         as No_op to disable testing for exact instruction match.
3059         (Vorr): Likewise.
3060         (Veor): Likewise.
3061         (Vbic): Likewise.
3062         (Vorn): Likewise.
3063         * config/arm/arm_neon.h: Regenerated.
3064         * doc/arm-neon-intrinsics.texi: Regenerated.
3065
3066 2010-07-02  Eric Botcazou  <ebotcazou@adacore.com>
3067
3068         * expr.h (emit_stack_probe): Declare.
3069         * explow.c (emit_stack_probe): Make global.
3070         (anti_adjust_stack_and_probe): Fix comments.
3071         * config/sparc/linux.h (STACK_CHECK_STATIC_BUILTIN): Define to 1.
3072         * config/sparc/linux64.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
3073         * config/sparc/sol2.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
3074         * config/sparc/sparc.c: Include except.h.
3075         (sparc_emit_probe_stack_range): New function.
3076         (output_probe_stack_range): Likewise.
3077         (sparc_expand_prologue): Invoke sparc_emit_probe_stack_range if static
3078         built-in stack checking is enabled.
3079         * config/sparc/sparc-protos.h (output_probe_stack_range): Declare.
3080         * config/sparc/sparc.md (UNSPECV_PROBE_STACK_RANGE): New constant.
3081         (probe_stack_range): New insn.
3082
3083 2010-07-02  Richard Guenther  <rguenther@suse.de>
3084
3085         PR target/43958
3086         * config/pa/pa.c (hppa_gimplify_va_arg_expr): Use pointer arithmetic
3087         for argument alignment.
3088
3089 2010-07-02  Jan Hubicka  <jh@suse.cz>
3090
3091         * ipa-split.c (verify_non_ssa_vars): Break out from ...; perform DFS
3092         walk backwards from entry_bb to check only those basic block of header
3093         that might lead to execution of split part.
3094         (consider_split) ... here.
3095         (find_return_bb): Allow assignment in return BB.
3096         (find_retval): New.
3097         (split_function): Fix name of cloned function; take care of updating
3098         return value in return_bb containing move.
3099
3100 2010-07-02  Andreas Schwab  <schwab@linux-m68k.org>
3101
3102         PR target/44771
3103         * config/m68k/m68k.c (m68k_expand_prologue): Remove set but not
3104         used variable insn.
3105
3106 2010-07-02  Eric Botcazou  <ebotcazou@adacore.com>
3107
3108         * implicit-zee.c (combine_reaching_defs): Fix long lines.
3109         (is_set_with_extension_DI): Delete.
3110         (struct zero_extend_info): New structure.
3111         (add_removable_zero_extend): New function.
3112         (find_removable_zero_extends): Use note_stores to find SETs.
3113         (find_and_remove_ze): Fix long line, remove superfluous parentheses.
3114
3115 2010-07-02  Changpeng Fang  <changpeng.fang@amd.com>
3116
3117         * tree-ssa-loop-prefetch.c (compute_miss_rate): Rename to
3118         is_miss_rate_acceptable. Pull total_positions computation
3119         out of the loops.  Early return if miss_positions exceeds
3120         the acceptable threshold.
3121         * tree-ssa-loop-prefetch.c (prune_ref_by_group_reuse): Call
3122         is_miss_rate_acceptable after renaming of compute_miss_rate.
3123
3124 2010-07-02  Changpeng Fang  <changpeng.fang@amd.com>
3125
3126         PR middle-end/44576
3127         * tree-ssa-loop-prefetch.c (compute_miss_rate): Return 1000 (out
3128         of 1000) for miss rate if the address diference is greater than or
3129         equal to the cache line size (the two reference will never hit the
3130         same cache line).
3131
3132 2010-07-02  Bernd Schmidt  <bernds@codesourcery.com>
3133
3134         PR target/42835
3135         * config/arm/arm-modes.def (CC_NOTB): New mode.
3136         * config/arm/arm.c (get_arm_condition_code): Handle it.
3137         * config/arm/thumb2.md (thumb2_compare_scc): Delete pattern.
3138         * config/arm/arm.md (subsi3_compare0_c): New pattern.
3139         (compare_scc): Now a define_and_split.  Add a number of extra
3140         splitters before it.
3141
3142         PR target/42172
3143         * config/arm/arm.c (thumb1_rtx_costs): Improve support for SIGN_EXTEND
3144         and ZERO_EXTEND.
3145         (arm_rtx_costs_1): Likewise.
3146         (arm_size_rtx_costs): Use arm_rtx_costs_1 for these codes.
3147         * config/arm/arm.md (is_arch6): New attribute.
3148         (zero_extendhisi2, zero_extendqisi2, extendhisi2,
3149         extendqisi2): Tighten the code somewhat, avoiding invalid
3150         RTL to occur in the expander patterns.
3151         (thumb1_zero_extendhisi2): Merge with thumb1_zero_extendhisi2_v6.
3152         (thumb1_zero_extendhisi2_v6): Delete.
3153         (thumb1_extendhisi2): Merge with thumb1_extendhisi2_v6.
3154         (thumb1_extendhisi2_v6): Delete.
3155         (thumb1_extendqisi2): Merge with thumb1_extendhisi2_v6.
3156         (thumb1_extendqisi2_v6): Delete.
3157         (zero_extendhisi2 for register input splitter): New.
3158         (zero_extendqisi2 for register input splitter): New.
3159         (thumb1_extendhisi2 for register input splitter): New.
3160         (extendhisi2 for register input splitter): New.
3161         (extendqisi2 for register input splitter): New.
3162         (TARGET_THUMB1 extendqisi2 for memory input splitter): New.
3163         (arm_zero_extendhisi2): Allow nonimmediate_operand for operand 1,
3164         and add support for a register alternative requiring a split.
3165         (thumb1_zero_extendqisi2): Likewise.
3166         (arm_zero_extendqisi2): Likewise.
3167         (arm_extendhisi2): Likewise.
3168         (arm_extendqisi2): Likewise.
3169
3170 2010-07-02  Sandra Loosemore  <sandra@codesourcery.com>
3171
3172         * config/arm/arm.c (neon_vdup_constant): Expand into canonical RTL
3173         instead of an unspec.
3174         (neon_expand_vector_init): Likewise.
3175         * config/arm/neon.md (UNSPEC_VCOMBINE): Delete.
3176         (UNSPEC_VDUP_LANE): Delete.
3177         (UNSPEC VDUP_N): Delete.
3178         (UNSPEC_VGET_HIGH): Delete.
3179         (UNSPEC_VGET_LANE): Delete.
3180         (UNSPEC_VGET_LOW): Delete.
3181         (UNSPEC_VMVN): Delete.
3182         (UNSPEC_VSET_LANE): Delete.
3183         (V_double_vector_mode): New.
3184         (vec_set<mode>_internal): Make code emitted match that for the
3185         corresponding intrinsics.
3186         (vec_setv2di_internal): Likewise.
3187         (neon_vget_lanedi): Rewrite to expand into emit_move_insn.
3188         (neon_vget_lanev2di): Rewrite to expand into vec_extractv2di.
3189         (neon_vset_lane<mode>): Combine double and quad patterns and
3190         expand into vec_set<mode>_internal instead of UNSPEC_VSET_LANE.
3191         (neon_vset_lanedi): Rewrite to expand into emit_move_insn.
3192         (neon_vdup_n<mode>): Rewrite RTL without unspec.
3193         (neon_vdup_ndi): Rewrite as define_expand and use emit_move_insn.
3194         (neon_vdup_nv2di): Rewrite RTL without unspec and merge with
3195         with neon_vdup_lanev2di, adjusting the pattern from the latter
3196         to be predicable for consistency.
3197         (neon_vdup_lane<mode>_internal): New.
3198         (neon_vdup_lane<mode>): Turn into a define_expand and rewrite
3199         to avoid using an unspec.
3200         (neon_vdup_lanedi): Rewrite RTL pattern to avoid unspec.
3201         (neon_vdup_lanev2di): Turn into a define_expand.
3202         (neon_vcombine): Rewrite pattern to eliminate UNPSEC_VCOMBINE.
3203         (neon_vget_high<mode>): Replace with....
3204         (neon_vget_highv16qi): New pattern using canonical RTL.
3205         (neon_vget_highv8hi): Likewise.
3206         (neon_vget_highv4si): Likewise.
3207         (neon_vget_highv4sf): Likewise.
3208         (neon_vget_highv2di): Likewise.
3209         (neon_vget_low<mode>): Replace with....
3210         (neon_vget_lowv16qi): New pattern using canonical RTL.
3211         (neon_vget_lowv8hi): Likewise.
3212         (neon_vget_lowv4si): Likewise.
3213         (neon_vget_lowv4sf): Likewise.
3214         (neon_vget_lowv2di): Likewise.
3215
3216         * config/arm/neon.ml (Vget_lane): Add No_op attribute to suppress
3217         test for this emitting vmov.
3218         (Vset_lane): Likewise.
3219         (Vdup_n): Likewise.
3220         (Vmov_n): Likewise.
3221
3222         * doc/arm-neon-intrinsics.texi: Regenerated.
3223
3224 2010-07-02  Sandra Loosemore  <sandra@codesourcery.com>
3225
3226         * config/arm/neon.md (vec_extractv2di): Correct error in register
3227         numbering to reconcile with neon_vget_lanev2di.
3228
3229 2010-07-02  Richard Guenther  <rguenther@suse.de>
3230
3231         * tree-ssa-structalias.c (pt_solution_set_var): New function.
3232         * tree-ssa-alias.h (pt_solution_set_var): Declare.
3233         * tree-ssa-loop-ivopts.c (copy_ref_info): Also copy or create
3234         points-to information.
3235
3236 2010-07-02  Christian Borntraeger  <borntraeger@de.ibm.com>
3237
3238         * config/s390/s390.c (override_options): Adopt prefetching
3239         at -O3 to handle flag_prefetch_loop_arrays as a tristate.
3240
3241 2010-07-02  Jan Hubicka  <jh@suse.cz>
3242
3243         * df-problems.c (df_kill_notes): Do not collect dead  notes.
3244         (df_set_note): Just call add_reg_note.
3245         (df_set_unused_notes_for_mw, df_set_dead_notes_for_mw,
3246         df_create_unused_note): Do not deal with lists of old notes.
3247         (df_note_bb_compute): Likewise.
3248
3249 2010-07-02  Richard Guenther  <rguenther@suse.de>
3250
3251         * tree-ssa-structalias.c (find_func_aliases): Handle
3252         pointer alignment via BIT_AND_EXPR.
3253         * tree-vrp.c (extract_range_from_binary_expr): Likewise.
3254
3255 2010-07-02  Richard Guenther  <rguenther@suse.de>
3256
3257         * tree-data-ref.c (initialize_data_dependence_relation): Handle
3258         mismatching number of dimensions properly.
3259
3260 2010-07-02  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
3261
3262         PR target/44707
3263         * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Recognize
3264         (lo_sum (high ...) ...) patterns generated by earlier passes.
3265
3266 2010-07-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3267
3268         * doc/install.texi (Prerequisites): Document Perl requirement on
3269         Solaris 2.
3270         (Specific, *-*-solaris2*): Document GNU c++filt requirement.
3271
3272 2010-07-02  Richard Guenther  <rguenther@suse.de>
3273
3274         PR middle-end/44777
3275         * tree-cfg.c (gimple_block_ends_with_call_p): Handle empty BBs.
3276
3277 2010-07-02  Jan Hubicka  <jh@suse.cz>
3278
3279         PR middle-end/44706
3280         * predict.c (predict_paths_for_bb): Handle case when control dependence
3281         BB has only abnormal edges.
3282
3283 2010-07-02  Richard Guenther  <rguenther@suse.de>
3284
3285         PR tree-optimization/44748
3286         * tree-ssa-ccp.c (fold_const_aggregate_ref): Properly handle
3287         the embedded conversion in MEM_REFs.
3288
3289 2010-07-01  López-Ibáñez  <manu@gcc.gnu.org>
3290
3291         * reload.c: Include toplev.h.
3292         * recog.c:  Likewise.
3293         * Makefile.in: Adjust dependencies.
3294
3295 2010-07-01  Jakub Jelinek  <jakub@redhat.com>
3296
3297         PR debug/44694
3298         * dwarf2out.c (reg_loc_descriptor): For eliminated arg_pointer_rtx
3299         or frame_pointer_rtx use DW_OP_fbreg offset DW_OP_stack_value.
3300
3301 2010-07-01  Richard Guenther  <rguenther@suse.de>
3302
3303         * emit-rtl.c (set_mem_attributes_minus_bitpos): Use unsigned
3304         types for offsets.
3305
3306 2010-07-01  Joern Rennecke  <joern.rennecke@embecosm.com>
3307
3308         PR target/44732
3309         * config/ia64/ia64.c (ia64_register_move_cost): Remove stray '{'.
3310         Fix argument types.
3311
3312 2010-07-01  Bernd Schmidt  <bernds@codesourcery.com>
3313
3314         PR target/44727
3315         * config/i386/i386.md (peephole2 for arithmetic ops with memory):
3316         Make sure operand 0 dies.
3317
3318 2010-07-01  Richard Guenther  <rguenther@suse.de>
3319
3320         PR middle-end/42834
3321         PR middle-end/44468
3322         * doc/gimple.texi (is_gimple_mem_ref_addr): Document.
3323         * doc/generic.texi (References to storage): Document MEM_REF.
3324         * tree-pretty-print.c (dump_generic_node): Handle MEM_REF.
3325         (print_call_name): Likewise.
3326         * tree.c (recompute_tree_invariant_for_addr_expr): Handle MEM_REF.
3327         (build_simple_mem_ref_loc): New function.
3328         (mem_ref_offset): Likewise.
3329         * tree.h (build_simple_mem_ref_loc): Declare.
3330         (build_simple_mem_ref): Define.
3331         (mem_ref_offset): Declare.
3332         * fold-const.c: Include tree-flow.h.
3333         (operand_equal_p): Handle MEM_REF.
3334         (build_fold_addr_expr_with_type_loc): Likewise.
3335         (fold_comparison): Likewise.
3336         (fold_unary_loc): Fold
3337         VIEW_CONVERT_EXPR <T1, MEM_REF <T2, ...>> to MEM_REF <T1, ...>.
3338         (fold_binary_loc): Fold MEM[&MEM[p, CST1], CST2] to MEM[p, CST1 + CST2],
3339         fold MEM[&a.b, CST2] to MEM[&a, offsetof (a, b) + CST2].
3340         * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle MEM_REF.
3341         (ptr_deref_may_alias_ref_p_1): Likewise.
3342         (ao_ref_base_alias_set): Properly differentiate base object for
3343         offset and TBAA.
3344         (ao_ref_init_from_ptr_and_size): Use MEM_REF.
3345         (indirect_ref_may_alias_decl_p): Handle MEM_REFs properly.
3346         (indirect_refs_may_alias_p): Likewise.
3347         (refs_may_alias_p_1): Likewise.  Remove pointer SSA name def
3348         chasing code.
3349         (ref_maybe_used_by_call_p_1): Handle MEM_REF.
3350         (call_may_clobber_ref_p_1): Likewise.
3351         * dwarf2out.c (loc_list_from_tree): Handle MEM_REF.
3352         * expr.c (expand_assignment): Handle MEM_REF.
3353         (store_expr): Handle MEM_REFs from STRING_CSTs.
3354         (store_field): If expanding a MEM_REF of a non-addressable
3355         decl use bitfield operations.
3356         (get_inner_reference): Handle MEM_REF.
3357         (expand_expr_addr_expr_1): Likewise.
3358         (expand_expr_real_1): Likewise.
3359         * tree-eh.c (tree_could_trap_p): Handle MEM_REF.
3360         * alias.c (ao_ref_from_mem): Handle MEM_REF.
3361         (get_alias_set): Likewise.  Properly handle VIEW_CONVERT_EXPRs.
3362         * tree-data-ref.c (dr_analyze_innermost): Handle MEM_REF.
3363         (dr_analyze_indices): Likewise.
3364         (dr_analyze_alias): Likewise.
3365         (object_address_invariant_in_loop_p): Likewise.
3366         * gimplify.c (mark_addressable): Handle MEM_REF.
3367         (gimplify_cond_expr): Build MEM_REFs.
3368         (gimplify_modify_expr_to_memcpy): Likewise.
3369         (gimplify_init_ctor_preeval_1): Handle MEM_REF.
3370         (gimple_fold_indirect_ref): Adjust.
3371         (gimplify_expr): Handle MEM_REF.  Gimplify INDIRECT_REF to MEM_REF.
3372         * tree.def (MEM_REF): New tree code.
3373         * tree-dfa.c: Include toplev.h.
3374         (get_ref_base_and_extent): Handle MEM_REF.
3375         (get_addr_base_and_unit_offset): New function.
3376         * emit-rtl.c (set_mem_attributes_minus_bitpos): Handle MEM_REF.
3377         * gimple-fold.c (may_propagate_address_into_dereference): Handle
3378         MEM_REF.
3379         (maybe_fold_offset_to_array_ref): Allow possibly out-of bounds
3380         accesses if the array has just one dimension.  Remove always true
3381         parameter.  Do not require type compatibility here.
3382         (maybe_fold_offset_to_component_ref): Remove.
3383         (maybe_fold_stmt_indirect): Remove.
3384         (maybe_fold_reference): Remove INDIRECT_REF handling.
3385         Fold back to non-MEM_REF.
3386         (maybe_fold_offset_to_address): Simplify.  Deal with type
3387         mismatches here.
3388         (maybe_fold_reference): Likewise.
3389         (maybe_fold_stmt_addition): Likewise.  Also handle
3390         &ARRAY + I in addition to &ARRAY[0] + I.
3391         (fold_gimple_assign): Handle ADDR_EXPR of MEM_REFs.
3392         (gimple_get_relevant_ref_binfo): Handle MEM_REF.
3393         * cfgexpand.c (expand_debug_expr): Handle MEM_REF.
3394         * tree-ssa.c (useless_type_conversion_p): Make most pointer
3395         conversions useless.
3396         (warn_uninitialized_var): Handle MEM_REF.
3397         (maybe_rewrite_mem_ref_base): New function.
3398         (execute_update_addresses_taken): Implement re-writing of MEM_REFs
3399         to SSA form.
3400         * tree-inline.c (remap_gimple_op_r): Handle MEM_REF, remove