1 2009-09-27 Basile Starynkevitch <basile@starynkevitch.net>
2 Rafael Avila de Espindola <espindola@google.com>
4 * gengtype.c (write_root, write_roots): Add a emit_pch argument.
5 Don't print pch related info if it is false.
6 (main): Don't print pch info in plugin mode.
8 2009-09-27 Eric Botcazou <ebotcazou@adacore.com>
10 * dwarf2out.c (enum dw_val_class): Replace dw_val_class_long_long
11 with dw_val_class_const_double.
12 (struct dw_val_struct): Replace val_long_long with val_double and
13 adjust for above change.
14 (output_loc_operands): Likewise.
15 (add_AT_long_long): Rename into...
16 (add_AT_double): ...this.
17 (print_die): Replace dw_val_class_long_long with
18 dw_val_class_const_double and adjust.
19 (attr_checksum): Likewise.
20 (same_dw_val_p): Likewise.
21 (size_of_die): Likewise.
22 (value_format): Likewise.
23 (output_die): Likewise.
24 (loc_descriptor) <CONST_DOUBLE>: Likewise.
25 (add_const_value_attribute) <CONST_DOUBLE>: Call add_AT_double
26 instead of add_AT_long_long.
27 (add_bound_info) <INTEGER_CST>: Generate the bound as an unsigned
28 value with the precision of its type.
30 2009-09-27 Andreas Schwab <schwab@linux-m68k.org>
33 * c-typeck.c (build_conditional_expr): Use the readonly and
34 volatile flags of the operand types, not of the operands itself.
36 2009-09-27 Peter O'Gorman <pogma@thewrittenword.com>
38 collect2.c (main): Look for -brtl before adding libraries.
40 2009-09-27 Jonathan Gray <jsg@openbsd.org>
42 * config.gcc: Update OpenBSD targets.
43 * config/openbsd-stdint.h: New file.
44 * config/openbsd-libpthread.h: New file.
45 * config/openbsd.h: Update and break out LIB_SPEC definition.
46 * config/alpha/openbsd.h: Overhaul to reflect ELF migration.
47 * config/i386/openbsdelf.h: Correct types.
48 * config/m68k/openbsd.h: Likewise.
49 * config/mips/openbsd.h: Likewise.
50 * config/vax/openbsd.h: Likewise.
52 2009-09-27 Eric Botcazou <ebotcazou@adacore.com>
54 * fold-const.c (maybe_lvalue_p): Return false for M(IN|AX)_EXPR.
55 (extract_muldiv_1) <MINUS_EXPR>: Swap operands if necessary.
56 * stor-layout.c (layout_type) <ARRAY_TYPE>: Do not take the maximum
57 of the length and zero.
59 2009-09-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
61 * Makefile.in (TOPLEV_H): Use $(INPUT_H) not input.h.
62 (FLAGS_H): Add options.h $(REAL_H).
63 (SEL_SCHED_IR_H): Add $(BITMAP_H) vecprim.h $(CFGLOOP_H).
64 (TREE_VECTORIZER_H): New.
65 (EBITMAP_H): Renamed from EBIMAP_H.
66 (c-decl.o, c-objc-common.o, c-pretty-print.o, attribs.o, c-omp.o)
67 (gtype-desc.o, ggc-common.o, ggc-page.o, ggc-zone.o, langhooks.o)
68 (tree.o, tree-ssa-structalias.o, tree-ssa-ter.o, tree-ssanames.o)
69 (tree-phinodes.o, tree-ssa-loop.o, tree-ssa-math-opts.o)
70 (gimple-low.o, omp-low.o, sese.o, graphite-blocking.o)
71 (graphite-clast-to-gimple.o, graphite-dependences.o)
72 (graphite-interchange.o, graphite-poly.o, graphite-scop-detection.o)
73 (graphite-sese-to-poly.o, tree-vect-loop.o, tree-vect-loop-manip.o)
74 (tree-vect-patterns.o, tree-vect-slp.o, tree-vect-stmts.o)
75 (tree-vect-data-refs.o, tree-vectorizer.o, gimple.o, tree-mudflap.o)
76 (targhooks.o, stmt.o, emit-rtl.o, ipa.o, matrix-reorg.o, ipa-inline.o)
77 (gcse.o, tree-ssa-ccp.o, df-byte-scan.o, vec.o, caller-save.o)
78 (ira-build.o, ira-costs.o, ira-color.o, ira-emit.o, ira.o)
79 (haifa-sched.o, sched-rgn.o, sel-sched.o, sel-sched-dump.o)
80 (sel-sched-ir.o, final.o, $(out_object_file)): Dependencies
81 updated and fixed as per above changes and per
82 check_makefile_deps.sh output.
85 * configure.ac: Use $LIBS for '-ldl', not $LDFLAGS.
86 * configure: Regenerate.
88 2009-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
90 * doc/install.texi: Update minimum MPC version to 0.7.
92 2009-09-26 Gerald Pfeifer <gerald@pfeifer.com>
94 * doc/install.texi (Binaries): Remove reference to the binary
95 distribution CD-ROM from the FSF.
97 2009-09-26 Michael Matz <matz@suse.de>
101 * tree-ssa-coalesce.c (coalesce_ssa_name): Add only SSA names
102 that are mentioned in the body.
104 2009-09-26 Michael Matz <matz@suse.de>
106 PR tree-optimization/41454
107 * tree-ssa-dom (stmts_to_rescan): Remove variable.
108 (tree_ssa_dominator_optimize): Don't allocate and free it.
109 (dom_opt_leave_block): Don't iterate over it.
110 (eliminate_redundant_computations): Don't return a value.
111 (cprop_operand, cprop_into_stmt): Ditto.
112 (optimize_stmt): Don't defer updating stmts.
114 2009-09-25 Dodji Seketeli <dodji@redhat.com>
116 * dwarf2out.c (dwarf_tag_name, gen_generic_params_dies,
117 generic_parameter_die, template_parameter_pack_die,
118 gen_formal_parameter_die, gen_subprogram_die): Adjust after renaming
119 DW_TAG_formal_parameter_pack and DW_TAG_template_parameter_pack into
120 DW_TAG_GNU_formal_parameter_pack and DW_TAG_GNU_template_parameter_pack.
122 2009-09-25 Anatoly Sokolov <aesok@post.ru>
124 * config/v850/v850.h (FUNCTION_VALUE): Remove.
125 * config/v850/v850.c (v850_function_value): New function.
126 (TARGET_FUNCTION_VALUE): Define.
128 2009-09-25 Jakub Jelinek <jakub@redhat.com>
130 * tree-vect-stmts.c (vectorizable_call): Call
131 mark_symbols_for_renaming after vect_finish_stmt_generation.
133 * dwarf2out.c (tls_mem_loc_descriptor): Pass 1 instead of 2
134 to loc_descriptor_from_tree.
135 (add_location_or_const_value_attribute): Pass 0 instead of 2
136 for decl_by_reference_p decls.
138 2009-09-25 Richard Guenther <rguenther@suse.de>
141 * tree-dfa.c (get_ref_base_and_extent): Fix issue with trailing
144 2009-09-25 Ben Elliston <bje@au.ibm.com>
146 * doc/invoke.texi (RS/6000 and PowerPC Options): Add missing comma
149 2009-09-25 Alan Modra <amodra@bigpond.net.au>
151 * config/rs6000/rs6000.md (load_toc_v4_PIC_3c): Correct POWER
154 2009-09-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
157 * fold-const.c (const_binop): Handle complex int division.
158 * tree-complex.c (expand_complex_div_straight,
159 expand_complex_div_wide): Update comments.
161 2009-09-24 DJ Delorie <dj@redhat.com>
164 * config/m32c/m32c.h (REG_CLASS_CONTENTS): Add R13.
165 (reg_class): Likewise.
166 (REG_CLASS_NAMES): Likewise.
167 * config/m32c/m32c.c (m32c_reg_class_from_constraint): Likewise.
169 * config/m32c/m32c.c (m32c_override_options): Disable -fivopts for
172 2009-09-24 Michael Meissner <meissner@linux.vnet.ibm.com>
174 * config/rs6000/predicates.md (indexed_or_indirect_operand):
175 Delete VSX load/store with update support.
176 * config/rs6000/rs6000.c (rs6000_legitimate_address_p): Ditto.
177 * config/rs6000/vsx.md (vsx_mov<mode>): Ditto.
181 (VStype_load_update): Ditto.
182 (VStype_store_update): Ditto.
183 (vsx_load<VSX_U:mode>_update_<P:mptrsize>): Ditto.
184 (vsx_store<VSX_U:mode>_update_<P:mptrsize>): Ditto.
186 * config/rs6000/rs6000.h (enum rs6000_builtins): Delete VSX
187 load/store with update builtins.
189 2009-09-24 Kai Tietz <kai.tietz@onevision.com>
191 * libgcc2.c (L_trampoline): Prototype for getpagesize
192 and mprotect in WINNT case.
194 2009-09-24 Anatoly Sokolov <aesok@post.ru>
196 * config/rs6000/rs6000.h (FUNCTION_VALUE): Remove macro.
197 * config/rs6000/rs6000-protos.h (rs6000_function_value): Remove.
198 * config/rs6000/rs6000.c (rs6000_function_value): Make static, add
200 (TARGET_FUNCTION_VALUE): Define.
202 2009-09-24 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
204 * config/darwin.h (DWARF2_DEBUGGING_INFO): Define as 1.
206 2009-09-24 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
209 * common.opt: Initialize dwarf_strict to -1.
210 * toplev.c (process_options): Catch unset dwarf_strict
211 and set to 0 for all targets not overriding.
212 * config/darwin.c (darwin_override_options): Catch unset
213 dwarf_strict and override to 1.
215 2009-09-24 Jeff Law <law@redhat.com>
217 * tree-into-ssa.c (rewrite_into_ssa): Free interesting_blocks.
219 2009-09-24 Richard Guenther <rguenther@suse.de>
221 PR tree-optimization/36143
222 PR tree-optimization/38747
223 * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Only
224 create VIEW_CONVERT_EXPRs for TBAA compatible accesses.
226 2009-09-24 Jakub Jelinek <jakub@redhat.com>
229 * dwarf2out.c (add_const_value_attribute): For HIGH and CONST_FIXED,
230 return false instead of gcc_unreachable (). For CONST return the
231 value returned by recursive call instead of always returning true.
232 (tree_add_const_value_attribute): Return the value returned by
233 add_const_value_attribute instead of always returning true if rtl
236 2009-09-23 Justin Seyster <jrseys@gmail.com>
238 * Makefile.in (PLUGIN_HEADERS): Include real.h.
240 2009-09-24 Jakub Jelinek <jakub@redhat.com>
242 * cgraphunit.c (cgraph_lower_function): Revert last change.
243 * targhooks.c (default_static_chain): Use !DECL_STATIC_CHAIN
244 instead of DECL_NO_STATIC_CHAIN.
245 * tree-cfg.c (verify_gimple_call): Likewise.
246 * tree-nested.c (get_chain_decl, get_chain_field,
247 convert_tramp_reference_op, convert_gimple_call): Likewise.
248 (convert_all_function_calls): Likewise. Always set or clear
249 DECL_STATIC_CHAIN initially, for !n->outer clear it.
250 (lower_nested_functions): Remove DECL_NO_STATIC_CHAIN checking code.
251 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_STATIC_CHAIN
253 * print-tree.c (print_node): Handle DECL_STATIC_CHAIN instead of
254 DECL_NO_STATIC_CHAIN.
255 * config/i386/i386.c (ix86_static_chain): Use !DECL_STATIC_CHAIN
256 instead of DECL_NO_STATIC_CHAIN.
257 (ix86_function_regparm, find_drap_reg): Likewise. Don't test
258 decl_function_context.
259 * varasm.c (initializer_constant_valid_p): Likewise.
260 * tree.h (DECL_NO_STATIC_CHAIN): Renamed to ...
261 (DECL_STATIC_CHAIN): ... this.
262 * config/moxie/moxie.c (moxie_static_chain): Use !DECL_STATIC_CHAIN
263 instead of DECL_NO_STATIC_CHAIN.
265 2009-09-23 Basile Starynkevitch <basile@starynkevitch.net>
266 Rafael Avila de Espindola <espindola@google.com>
268 * gengtype.c (nb_plugin_files): Make it unsigned to match
269 num_gt_files. Adjust other variables to avoid warnings.
270 (main): Allocate an all zero lang_bitmap before each plugin file name
271 to match regular file names.
273 2009-09-23 Richard Henderson <rth@redhat.com>
275 * doc/tm.texi (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
276 (TARGET_STATIC_CHAIN): Mention that this hook must be used for
277 static chain passed in memory.
278 * system.h (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Poison.
279 * targhooks.c (default_static_chain): Don't handle STATIC_CHAIN,
280 STATIC_CHAIN_INCOMING. Issue a sorry if there's no
281 STATIC_CHAIN_REGNUM defined.
283 * config/picochip/picochip-protos.h: s/class/klass/.
284 * config/picochip/picochip.c (TARGET_STATIC_CHAIN): New.
285 (picochip_static_chain): New.
286 * config/picochip/picochip.h (STATIC_CHAIN): Remove.
287 (STATIC_CHAIN_INCOMING): Remove.
289 * config/xtensa/xtensa.c (TARGET_STATIC_CHAIN): New.
290 (xtensa_static_chain): New.
291 * config/xtensa/xtensa.h (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
293 2009-09-23 Anatoly Sokolov <aesok@post.ru>
295 * config/pa/pa.h (FUNCTION_VALUE): Remove macro.
296 * config/pa/pa-protos.h (function_value): Remove.
297 * config/pa/pa.c (pa_function_value): Rename from function_value.
298 Make static, add 'outgoing' argument.
299 (TARGET_FUNCTION_VALUE): Define.
301 2009-09-23 Anatoly Sokolov <aesok@post.ru>
303 * config/avr/avr.c (avr_regs_to_save): Use current_function_is_leaf
304 instead of cfun->machine->is_leaf.
305 * config/avr/avr.h (machine_function): Remove is_leaf field.
307 2009-09-23 Jakub Jelinek <jakub@redhat.com>
310 * dwarf2out.c (address_of_int_loc_descriptor): Don't emit
311 DW_OP_piece after DW_OP_stack_value, adjust size calculations
312 for it, when DW_OP_stack_value and DW_OP_implicit_value has
313 the same size, prefer DW_OP_stack_value.
314 (loc_descriptor, loc_list_for_address_of_addr_expr_of_indirect_ref,
315 loc_list_from_tree): Don't emit DW_OP_piece after DW_OP_stack_value.
317 2009-09-23 Alexandre Oliva <aoliva@redhat.com>
320 * var-tracking.c (add_with_sets): Sort MO_VAL_LOC last among uses.
322 2009-09-23 Alexandre Oliva <aoliva@redhat.com>
325 * cfgexpand.c (convert_debug_memory_address): New.
326 (expand_debug_expr): Convert base address and offset to the same
327 mode. Use it to convert addresses to other modes. Accept
330 2009-09-23 Richard Guenther <rguenther@suse.de>
332 * alias.c (ao_ref_from_mem): Correct for negative MEM_OFFSET
333 produced for bigendian targets with promoted subregs.
335 2009-09-23 Richard Guenther <rguenther@suse.de>
337 * value-prof.c (gimple_ic): Purge old EH edges only after building
340 2009-09-23 Nick Clifton <nickc@redhat.com>
342 * config/arc/arc.c (arc_trampoline_init): Fix typo.
344 2009-09-23 Jakub Jelinek <jakub@redhat.com>
347 * doc/invoke.texi: Document -gstrict-dwarf and -gno-strict-dwarf.
350 * cgraphunit.c (cgraph_lower_function): Set DECL_NO_STATIC_CHAIN
351 on non-nested functions.
353 2009-09-23 Jakub Jelinek <jakub@redhat.com>
354 Jan Hubicka <jh@suse.cz>
356 * dwarf2out.c (loc_list_plus_const): Only define if
357 DWARF2_DEBUGGING_INFO.
358 (address_of_int_loc_descriptor): Likewise.
361 * dwarf2out.c (mem_loc_descriptor): Handle HIGH.
363 2009-09-23 Uros Bizjak <ubizjak@gmail.com>
366 * c-typeck.c (build_binary_op) <short_shift>: Check that integer
367 constant is more than zero.
369 2009-09-23 Alan Modra <amodra@bigpond.net.au>
372 * config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't
373 call final to emit non-scheduled prologue, instead insert at entry.
375 2009-09-22 Loren J. Rittle <ljrittle@acm.org>
376 Joseph S. Myers <joseph@codesourcery.com>
378 * doc/install.texi (*-*-freebsd*): Add proper format codes.
380 2009-09-22 Basile Starynkevitch <basile@starynkevitch.net>
381 Rafael Avila de Espindola <espindola@google.com>
383 * gengtype.c (is_file_equal): New function.
384 (close_output_files): Use is_file_equal. Free of->buf.
386 2009-09-22 Basile Starynkevitch <basile@starynkevitch.net>
387 Rafael Avila de Espindola <espindola@google.com>
389 * gengtype.c (write_types, write_local): Add the output_header
390 argument. Update all callers.
392 2009-09-22 Dodji Seketeli <dodji@redhat.com>
394 * dwarf2out.c (template_parameter_pack_die,
395 gen_formal_parameter_pack_die ): New functions.
396 (make_ith_pack_parameter_name): Remove this function.
397 (dwarf_tag_name): Support printing DW_TAG_template_parameter_pack and
398 DW_TAG_formal_parameter_pack.
399 (gen_generic_params_dies): Represent each template parameter pack
400 by a DW_TAG_template_parameter_pack DIE. Argument pack elements are
401 represented by usual DW_TAG_template_*_parameter DIEs that are
402 children of the DW_TAG_template_parameter_pack element DIE.
403 (generic_parameter_die): This doesn't deal with parameter pack
404 names anymore. Don't generate DW_AT_name for some DIEs, e.g. children
405 of parameter pack DIEs.
406 (gen_formal_parameter_die): Add a flag to not emit DW_AT_name
407 in certain cases, e.g. for pack elements.
408 (gen_formal_types_die, gen_decl_die): Adjust usage of
409 gen_formal_parameter_die.
410 (gen_subprogram_die): Represent each function parameter pack by a
411 DW_TAG_formal_parameter_pack DIE. Arguments of of the pack are
412 represented by usual DW_TAG_formal_parameter DIEs that are children
413 of the DW_TAG_formal_parameter_pack DIE. Remove references to
414 ____builtin_va_alist decls as no part of the compiler uses those
416 * langhooks.h (struct lang_hooks_for_decls): Add
417 function_parm_expanded_from_pack_p, get_generic_function_decl
418 and function_parameter_pack_p hooks. Fix comment for
419 get_innermost_generic_parms hook.
420 * langhooks-def.h (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P,
421 LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P ): Declare new hook
422 macros and use them to initialize lang_hook.
424 2009-09-22 Richard Henderson <rth@redhat.com>
426 * system.h (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE): Poison.
427 (TRAMPOLINE_ADJUST_ADDRESS): Poison.
428 * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): Don't conditionalize
429 on TRAMPOLINE_TEMPLATE.
430 (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Don't conditionalize on
431 TRAMPOLINE_ADJUST_ADDRESS.
432 * targhooks.c (default_asm_trampoline_template): Remove.
433 (default_trampoline_adjust_address): Remove.
434 (default_trampoline_init): Don't handle INITIALIZE_TRAMPOLINE.
435 * targhooks.h: Update decls.
437 2009-09-22 Dave Korn <dave.korn.cygwin@gmail.com>
439 * config/i386/cygming.h (TARGET_USE_JCR_SECTION): Enable.
440 * config/i386/cygwin.h (LIBGCJ_SONAME): Define.
441 * config/i386/mingw32.h (LIBGCJ_SONAME): Likewise.
443 2009-09-22 Alexandre Oliva <aoliva@redhat.com>
446 * reload1.c (reload): Reset debug insns with pseudos without
449 2009-09-22 Janis Johnson <janis187@us.ibm.com>
451 * config/i386/i386.c (ix86_scalar_mode_supported_p): Don't return
452 unconditional true for decimal float modes.
453 * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Ditto.
454 * config/s390/s390.c (s390_scalar_mode_supported_p): Ditto.
456 2009-09-22 Loren J. Rittle <ljrittle@acm.org>
458 * unwind-dw2-fde-glibc.c: Define and use USE_PT_GNU_EH_FRAME.
459 Enable a new case for __FreeBSD__ >= 7.
460 * crtstuff.c: Define USE_PT_GNU_EH_FRAME for __FreeBSD__ >= 7.
461 * config/t-freebsd: Define LIB2ADDEH and LIB2ADDEHDEP.
462 * config/freebsd-spec.h: Conditionally define LINK_EH_SPEC
463 and USE_LD_AS_NEEDED.
465 * doc/install.texi (*-*-freebsd*): Update target information.
467 2009-09-22 Richard Guenther <rguenther@suse.de>
470 * tree-dfa.c (get_ref_base_and_extent): Handle trailing
471 arrays really properly.
473 2009-09-22 Richard Henderson <rth@redhat.com>
476 * target.h (struct gcc_target): Add asm_out.trampoline_template,
477 calls.static_chain, calls.trampoline_init,
478 calls.trampoline_adjust_address.
479 * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
480 (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
481 (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
482 * builtins.c (expand_builtin_setjmp_receiver): Use
483 targetm.calls.static_chain; only clobber registers.
484 (expand_builtin_init_trampoline): Use targetm.calls.trampoline_init;
485 set up memory attributes properly for the trampoline block.
486 (expand_builtin_adjust_trampoline): Use
487 targetm.calls.trampoline_adjust_address.
488 * calls.c (prepare_call_address): Add fndecl argument. Use
489 targetm.calls.static_chain.
490 * df-scan.c (df_need_static_chain_reg): Remove.
491 (df_get_entry_block_def_set): Use targetm.calls.static_chain;
492 consolodate static chain handling.
493 * doc/tm.texi: Document new hooks.
494 * emit-rtl.c (static_chain_rtx, static_chain_incoming_rtx): Remove.
495 (init_emit_regs): Don't initialize them.
496 * expr.h (prepare_call_address): Update decl.
497 * final.c (profile_function): Use targetm.calls.static_chain.
498 * function.c (expand_function_start): Likewise.
499 * rtl.h (static_chain_rtx, static_chain_incoming_rtx): Remove.
500 * stmt.c (expand_nl_goto_receiver): Use targetm.calls.static_chain;
501 only clobber registers.
502 * targhooks.c (default_static_chain): New.
503 (default_asm_trampoline_template, default_trampoline_init): New.
504 (default_trampoline_adjust_address): New.
505 * targhooks.h: Declare them.
506 * varasm.c (assemble_trampoline_template): Use
507 targetm.asm_out.trampoline_template. Make the memory block const
510 * config/alpha/alpha.c (alpha_trampoline_init): Rename from
511 alpha_initialize_trampoline. Make static. Merge VMS parameter
512 differences into the TARGET_ABI_OPEN_VMS code block.
513 (TARGET_TRAMPOLINE_INIT): New.
514 * config/alpha/alpha.h (TRAMPOLINE_TEMPLATE): Remove.
515 (TRAMPOLINE_SECTION, INITIALIZE_TRAMPOLINE): Remove.
516 * config/alpha/vms.h (TRAMPOLINE_SIZE, TRAMPOLINE_ALIGNMENT): Remove.
517 (INITIALIZE_TRAMPOLINE): Remove.
519 * config/arc/arc.h (TRAMPOLINE_ALIGNMENT): New.
520 (TRAMPOLINE_TEMPLATE): Merge with ...
521 (INITIALIZE_TRAMPOLINE): ... this and move ...
522 * config/arc/arc.c (arc_trampoline_init): ... here.
523 (TARGET_TRAMPOLINE_INIT): New.
525 * config/arm/arm.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
526 (TARGET_TRAMPOLINE_INIT, TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
527 (arm_asm_trampoline_template): New.
528 (arm_trampoline_init, arm_trampoline_adjust_address): New.
529 * config/arm/arm.h (TRAMPOLINE_TEMPLATE, ARM_TRAMPOLINE_TEMPLATE,
530 THUMB2_TRAMPOLINE_TEMPLATE, THUMB1_TRAMPOLINE_TEMPLATE): Move all
531 code to arm_asm_trampoline_template.
532 (TRAMPOLINE_ADJUST_ADDRESS): Move code to
533 arm_trampoline_adjust_address.
534 (INITIALIZE_TRAMPOLINE): Move code to arm_trampoline_init;
535 adjust for target hook parameters.
537 * config/avr/avr.h (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE):
540 * config/bfin/bfin-protos.h (initialize_trampoline): Remove.
541 * config/bfin/bfin.c (bfin_asm_trampoline_template): New.
542 (bfin_trampoline_init): Rename from initialize_trampoline;
543 make static; update for target hook parameters.
544 (TARGET_ASM_TRAMPOLINE_TEMPLATE, TARGET_TRAMPOLINE_INIT): New.
545 * config/bfin/bfin.h (TRAMPOLINE_TEMPLATE): Move code to
546 bfin_asm_trampoline_template.
547 (INITIALIZE_TRAMPOLINE): Remove.
549 * config/cris/cris.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
550 TARGET_TRAMPOLINE_INIT, cris_asm_trampoline_template,
551 cris_trampoline_init): New.
552 * config/cris/cris.h (TRAMPOLINE_TEMPLATE): Move code to
553 cris_asm_trampoline_template.
554 (INITIALIZE_TRAMPOLINE): Move code to cris_trampoline_init;
555 adjust for target hook parameters.
557 * config/crx/crx.h (INITIALIZE_TRAMPOLINE): Remove.
559 * config/fr30/fr30.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
560 TARGET_TRAMPOLINE_INIT, fr30_asm_trampoline_template,
561 fr30_trampoline_init): New.
562 * config/fr30/fr30.h (TRAMPOLINE_TEMPLATE): Move code to
563 fr30_asm_trampoline_template.
564 (INITIALIZE_TRAMPOLINE): Move code to fr30_trampoline_init;
565 adjust for target hook parameters.
567 * config/frv/frv.c (TARGET_TRAMPOLINE_INIT): New.
568 (frv_trampoline_init): Rename from frv_initialize_trampoline;
569 make static, adjust arguments for TARGET_TRAMPOLINE_INIT hook.
570 * config/frv/frv.h (INITIALIZE_TRAMPOLINE): Remove.
571 * config/frv/frv-protos.h (frv_initialize_trampoline): Remove.
573 * config/h8300/h8300.c (h8300_trampoline_init): New.
574 (TARGET_TRAMPOLINE_INIT): New.
575 * config/h8300/h8300.h (INITIALIZE_TRAMPOLINE): Move code
576 to h8300_trampoline_init and adjust for hook parameters.
578 * config/ia64/ia64-protos.h (ia64_initialize_trampoline): Remove.
579 * config/ia64/ia64.c (TARGET_TRAMPOLINE_INIT): New.
580 (ia64_trampoline_init): Rename from ia64_initialize_trampoline;
581 make static; adjust for hook parameters.
582 * config/ia64/ia64.h (INITIALIZE_TRAMPOLINE): Remove.
584 * config/iq2000/iq2000.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
585 (TARGET_TRAMPOLINE_INIT): New.
586 (iq2000_asm_trampoline_template, iq2000_trampoline_init): New.
587 * config/iq2000/iq2000.h (TRAMPOLINE_TEMPLATE): Move code to
588 iq2000_asm_trampoline_template.
589 (INITIALIZE_TRAMPOLINE): Move code to iq2000_trampoline_init.
590 (TRAMPOLINE_CODE_SIZE): New.
591 (TRAMPOLINE_SIZE): Use it.
592 (TRAMPOLINE_ALIGNMENT): Follow Pmode.
594 * config/m32c/m32c-protos.h (m32c_initialize_trampoline): Remove.
595 * config/m32c/m32c.c (TARGET_TRAMPOLINE_INIT): New.
596 (m32c_trampoline_init): Rename from m32c_initialize_trampoline;
597 adjust for hook parameters.
598 * config/m32c/m32c.h (INITIALIZE_TRAMPOLINE): Remove.
600 * config/m32r/m32r.c (TARGET_TRAMPOLINE_INIT): New.
601 (m32r_trampoline_init): New.
602 * config/m32r/m32r.h (INITIALIZE_TRAMPOLINE): Move code to
603 m32r_trampoline_init.
605 * config/m68hc11/m68hc11.c (TARGET_TRAMPOLINE_INIT): New.
606 (m68hc11_trampoline_init): Rename from m68hc11_initialize_trampoline;
607 make static; update for hook parameters.
608 * config/m68hc11/m68hc11-protos.h: Update.
609 * config/m68hc11/m68hc11.h (INITIALIZE_TRAMPOLINE): Remove.
611 * config/mcore/mcore.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
612 (TARGET_TRAMPOLINE_INIT): New.
613 (mcore_function_value): Fix typo.
614 (mcore_asm_trampoline_template, mcore_trampoline_init): New.
615 * config/mcore/mcore.h (TRAMPOLINE_TEMPLATE): Move code
616 to mcore_asm_trampoline_template.
617 (INITIALIZE_TRAMPOLINE): Move code to mcore_trampoline_init.
619 * config/mep/mep.h (INITIALIZE_TRAMPOLINE): Remove.
620 * config/mep/mep.c (TARGET_TRAMPOLINE_INIT): New.
621 (mep_trampoline_init): Rename from mep_init_trampoline; make static;
622 update for hook parameters.
623 * config/mep/mep-protos.h (mep_init_trampoline): Remove.
625 * config/mips/mips.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
626 mips_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
627 mips_trampoline_init): New.
628 * config/mips/mips.h (TRAMPOLINE_TEMPLATE): Move code to
629 mips_asm_trampoline_template.
630 (INITIALIZE_TRAMPOLINE): Move code to mips_trampoline_init;
631 update for hook parameters.
633 * gcc/config/mmix/mmix.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
634 (TARGET_TRAMPOLINE_INIT): New.
635 (mmix_trampoline_size): Remove.
636 (mmix_asm_trampoline_template): Rename from mmix_trampoline_template;
637 make static. Remove out-of-date tetra vs octa comment.
638 (mmix_trampoline_init): Rename from mmix_initialize_trampoline;
639 make static; update for hook parameters.
640 * config/mmix/mmix.h (TRAMPOLINE_TEMPLATE): Remove.
641 (INITIALIZE_TRAMPOLINE): Remove.
642 (TRAMPOLINE_SIZE): Use a constant instead of mmix_trampoline_size.
643 (TRAMPOLINE_ALIGNMENT): New.
644 * gcc/config/mmix/mmix-protos.h: Update.
646 * config/mn10300/mn10300.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
647 mn10300_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
648 mn10300_trampoline_init): New.
649 * config/mn10300/mn10300.h (TRAMPOLINE_TEMPLATE): Move code to
650 mn10300_asm_trampoline_template.
651 (INITIALIZE_TRAMPOLINE): Move code to mn10300_trampoline_init.
653 * config/moxie/moxie.c (moxie_static_chain,
654 moxie_asm_trampoline_template, moxie_trampoline_init,
655 TARGET_STATIC_CHAIN, TARGET_ASM_TRAMPOLINE_TEMPLATE,
656 TARGET_TRAMPOLINE_INIT): New.
657 * config/moxie/moxie.h (INITIALIZE_TRAMPOLINE): Move code to
658 moxie_trampoline_init.
659 (TRAMPOLINE_TEMPLATE): Move code to moxie_asm_trampoline_template.
660 (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
662 * gcc/config/pa/pa.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
663 pa_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
664 pa_trampoline_init, TARGET_TRAMPOLINE_ADJUST_ADDRESS,
665 pa_trampoline_adjust_address): New.
666 * config/pa/pa.h (TRAMPOLINE_TEMPLATE): Move code to
667 pa_asm_trampoline_template.
668 (TRAMPOLINE_ALIGNMENT): New.
669 (TRAMPOLINE_CODE_SIZE): Move to pa.c.
670 (INITIALIZE_TRAMPOLINE): Move code to pa_trampoline_init;
671 adjust for hook parameters.
672 (TRAMPOLINE_ADJUST_ADDRESS): Move code to pa_trampoline_adjust_address.
674 * config/pdp11/pdp11.c (pdp11_trampoline_init): New.
675 (TARGET_TRAMPOLINE_INIT): New.
676 * config/pdp11/pdp11.h (TRAMPOLINE_TEMPLATE): Remove.
677 (INITIALIZE_TRAMPOLINE): Move code to pdp11_trampoline_init.
679 * config/picochip/picochip.h (INITIALIZE_TRAMPOLINE): Remove.
681 * config/rs6000/rs6000-protos.h (rs6000_initialize_trampoline): Remove.
682 * config/rs6000/rs6000.c (TARGET_TRAMPOLINE_INIT): New.
683 (rs6000_trampoline_init): Rename from rs6000_initialize_trampoline;
684 make static; adjust parameters for the hook.
685 * config/rs6000/rs6000.h (INITIALIZE_TRAMPOLINE): Remove.
687 * config/s390/s390.c (s390_asm_trampoline_template): Rename from
688 s390_trampoline_template; make static.
689 (s390_trampoline_init): Rename from s390_initialize_trampoline;
690 make static; adjust for target hook.
691 (TARGET_ASM_TRAMPOLINE_TEMPLATE, TARGET_TRAMPOLINE_INIT): New.
692 * config/s390/s390-protos.h: Remove trampoline decls.
693 * config/s390/s390.h (INITIALIZE_TRAMPOLINE): Remove.
694 (TRAMPOLINE_TEMPLATE): Remove.
695 (TRAMPOLINE_ALIGNMENT): New.
697 * config/score/score-protos.h (score_initialize_trampoline): Remove.
698 * config/score/score.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
699 (TARGET_TRAMPOLINE_INIT): New.
700 (score_asm_trampoline_template): New.
701 (score_trampoline_init): Rename from score_initialize_trampoline;
702 make static; adjust for hook parameters.
703 * config/score/score.h (TRAMPOLINE_TEMPLATE): Move code to
704 score[37]_asm_trampoline_template.
705 (INITIALIZE_TRAMPOLINE): Remove.
706 * config/score/score3.c (score3_asm_trampoline_template): New.
707 (score3_trampoline_init): Rename from score3_initialize_trampoline;
708 adjust for target hook.
709 * config/score/score7.c (score7_asm_trampoline_template): New.
710 (score7_trampoline_init): Rename from score7_initialize_trampoline;
711 adjust for target hook.
712 * config/score/score3.h, config/score/score7.h: Update.
714 * config/sh/sh-protos.h (sh_initialize_trampoline): Remove.
715 * config/sh/sh.c (TARGET_TRAMPOLINE_INIT): New.
716 (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
717 (sh_trampoline_init): Rename from sh_initialize_trampoline;
718 make static; adjust for target hook parameters.
719 (sh_trampoline_adjust_address): New.
720 * config/sh/sh.h (INITIALIZE_TRAMPOLINE): New.
721 (TRAMPOLINE_ADJUST_ADDRESS): Move code to sh_trampoline_adjust_address.
723 * config/sparc/sparc.c (TARGET_TRAMPOLINE_INIT): New.
724 (sparc32_initialize_trampoline): Rename from
725 sparc_initialize_trampoline; make static; replace tramp parameter
726 with m_tramp and update memory accesses.
727 (sparc64_initialize_trampoline): Similarly.
728 (sparc_trampoline_init): New.
729 * config/sparc/sparc-protos.h: Remove trampoline decls.
730 * config/sparc/sparc.h (INITIALIZE_TRAMPOLINE): Remove.
731 * config/sparc/sparc.md (nonlocal_goto): Don't use static_chain_rtx.
733 * config/spu/spu.c (TARGET_TRAMPOLINE_INIT): New.
734 (array_to_constant): Make ARR parameter const.
735 (spu_trampoline_init): Rename from spu_initialize_trampoline;
736 make static; update for hook parameters.
737 * config/spu/spu-protos.h: Update decls.
738 * config/spu/spu.h (INITIALIZE_TRAMPOLINE): Remove.
740 * config/stormy16/stormy16.c (xstormy16_trampoline_init): Rename
741 from xstormy16_initialize_trampoline; make static; update for
743 (TARGET_TRAMPOLINE_INIT): New.
744 * config/stormy16/stormy16.h (INITIALIZE_TRAMPOLINE): Remove.
746 * config/v850/v850.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
747 (TARGET_TRAMPOLINE_INIT): New.
748 (v850_can_eliminate): Make static.
749 (v850_asm_trampoline_template, v850_trampoline_init): New.
750 * config/v850/v850.h (TRAMPOLINE_TEMPLATE): Move code to
751 v850_asm_trampoline_template.
752 (INITIALIZE_TRAMPOLINE): Move code to v850_trampoline_init
753 and adjust for target hook parameters.
755 * config/vax/vax.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
756 (TARGET_TRAMPOLINE_INIT): New.
757 (vax_asm_trampoline_template, vax_trampoline_init): New.
758 * config/vax/vax.h (TRAMPOLINE_TEMPLATE): Move code to
759 vax_asm_trampoline_template.
760 (INITIALIZE_TRAMPOLINE): Move code to vax_trampoline_init.
762 * config/xtensa/xtensa.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
763 (TARGET_TRAMPOLINE_INIT): New.
764 (xtensa_asm_trampoline_template): Rename from
765 xtensa_trampoline_template; make static.
766 (xtensa_trampoline_init): Rename from xtensa_initialize_trampoline;
767 make static; update for hook parameters.
768 * config/xtensa/xtensa-protos.h: Remove trampoline decls.
769 * config/xtensa/xtensa.h (TRAMPOLINE_TEMPLATE): Remove.
770 (INITIALIZE_TRAMPOLINE): Remove.
772 * config/i386/i386.c (ix86_function_regparm): Do not issue an
773 error for nested functions with regparm=3.
774 (ix86_compute_frame_layout): Adjust frame pointer offset for
775 ix86_static_chain_on_stack.
776 (ix86_expand_prologue): Handle ix86_static_chain_on_stack.
777 (ix86_emit_restore_reg_using_pop): Increment ix86_cfa_state->offset,
778 don't reset to UNITS_PER_WORD.
779 (ix86_emit_leave): Adjust ix86_cfa_state.
780 (ix86_expand_epilogue): Handle ix86_static_chain_on_stack.
781 (ix86_static_chain): New.
782 (ix86_trampoline_init): Rename from x86_initialize_trampoline;
783 make static; update for target hook parameters; use ix86_static_chain.
784 (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
785 * config/i386/i386.h (STATIC_CHAIN_REGNUM): Remove.
786 (INITIALIZE_TRAMPOLINE): Remove.
787 (TRAMPOLINE_SIZE): Use 24 for 64-bit.
788 (struct machine_function): Use BOOL_BITFIELD; rearrange bitfields
789 to the end. Add static_chain_on_stack.
790 (ix86_static_chain_on_stack): New.
792 * config/m68k/m68k.c (TARGET_TRAMPOLINE_INIT): New.
793 (m68k_output_mi_thunk): Don't use static_chain_rtx.
794 (m68k_trampoline_init): New.
795 * config/m68k/m68k.h (INITIALIZE_TRAMPOLINE): Move code to
796 m68k_trampoline_init and adjust for hook parameters.
797 * config/m68k/netbsd-elf.h (TRAMPOLINE_TEMPLATE): Remove.
798 (TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE): Remove.
800 2009-09-22 Jakub Jelinek <jakub@redhat.com>
802 * config/rs6000/rs6000.c (bdesc_2arg): Fix CODE_FOR_vector_gt* codes
803 for __builtin_altivec_vcmpgt{sb,uh,sh,uw}.
805 * reload1.c (reload): Call wrap_constant when substituting
806 reg for equiv inside of DEBUG_INSNs.
809 * dwarf2out.c (base_type_die, record_type_tag, gen_subprogram_die,
810 add_call_src_coords_attributes, add_high_low_attributes,
811 gen_compile_unit_die, gen_type_die_with_usage force_decl_die,
812 gen_decl_die, dwarf2out_imported_module_or_decl_1, dwarf2out_finish,
813 dwarf2out_imported_module_or_decl): Avoid using DWARF3 additions
814 when -gdwarf-2 -gstrict-dwarf.
815 (loc_list_from_tree): Likewise. Avoid using DWARF4 additions when
816 -gdwarf-[23] -gstrict-dwarf.
817 (address_of_int_loc_descriptor, loc_descriptor,
818 loc_list_for_address_of_addr_expr_of_indirect_ref): Avoid using
819 DWARF4 additions when -gdwarf-[23] -gstrict-dwarf.
820 * common.opt (gno-strict-dwarf, gstrict-dwarf): New options.
822 2009-09-22 Richard Guenther <rguenther@suse.de>
824 PR tree-optimization/41428
825 * tree-ssa-ccp.c (ccp_fold_stmt): New function.
826 (ccp_finalize): Pass it to substitute_and_fold.
828 2009-09-22 Richard Guenther <rguenther@suse.de>
830 * tree-ssa-propagate.h (ssa_prop_fold_stmt_fn): Declare.
831 (substitute_and_fold): Adjust prototype.
832 * tree-vrp.c (vrp_evaluate_conditional): Make static.
833 (simplify_stmt_using_ranges): Likewise.
834 (fold_predicate_in): Move here from tree-ssa-propagate.c.
835 (vrp_fold_stmt): New function.
836 (vrp_finalize): Pass it to substitute_and_fold.
837 * tree-flow.h (vrp_evaluate_conditional): Remove.
838 (simplify_stmt_using_ranges): Likewise.
839 * tree-ssa-ccp.c (ccp_finalize): Adjust call to substitute_and_fold.
840 * tree-ssa-copy.c (fini_copy_prop): Likewise.
841 * tree-ssa-propagate.c (struct prop_stats_d): Rename num_pred_folded
843 (fold_predicate_in): Move to tree-vrp.c.
844 (substitute_and_fold): Use the callback instead of calling into
845 tree-vrp.c functions directly.
847 2009-09-22 Jakub Jelinek <jakub@redhat.com>
849 * dwarf2out.c (address_of_int_loc_descriptor): Avoid signed/unsigned
850 comparison warning on rs6000.
853 * tree-cfg.c (remove_useless_stmts_tc): Call gsi_next (gsi) even for
854 GIMPLE_EH_MUST_NOT_THROW cleanup.
855 (verify_types_in_gimple_stmt): Handle GIMPLE_EH_MUST_NOT_THROW.
857 2009-09-22 Jack Howarth <howarth@bromo.med.uc.edu>
860 * gcc/config.gcc: Use darwin9.h and darwin10.h on darwin10 and later.
861 * gcc/config/darwin10.h: Add file to pass -no_compact_unwind on
862 LIB_SPEC for darwin10 and later since it always uses the unwinder in
863 libSystem which is derived from the gcc 4.2.1 unwinder.
865 2009-09-22 Dave Korn <dave.korn.cygwin@gmail.com>
868 * varasm.c (default_encode_section_info): Copy TLS model into
869 sym_ref flags regardless of backend support for TLS, for all
870 model types except TLS_MODEL_EMULATED.
872 2009-09-22 Dave Korn <dave.korn.cygwin@gmail.com>
875 * dwarf2out.c (mem_loc_descriptor): Punt on CONST_STRING until
876 we can handle it correctly.
878 2009-09-21 Gerald Pfeifer <gerald@pfeifer.com>
880 * doc/install.texi (os2): Remove section.
882 2009-09-21 Gerald Pfeifer <gerald@pfeifer.com>
884 * doc/standards.texi (Objective-C): Adjust two URLs.
886 2009-09-21 Giuseppe Scrivano <gscrivano@gnu.org>
888 * tree-tailcall.c (process_assignment): Don't check if a
889 multiplication or an addition are already present.
890 (find_tail_calls): Combine multiple additions and multiplications.
891 (adjust_accumulator_values): Emit accumulators.
893 2009-09-21 Kai Tietz <kai.tietz@onevision.com>
895 * config/i386/i386.c (ix86_expand_epilogue): Adjust offset for
896 xmm register restore.
898 2009-09-21 Jan Hubicka <jh@suse.cz>
900 * dwarf2out.c (decl_loc_table_eq): Allow decl_loc_table to be NULL.
901 (dwarf2out_abstract_function): NULLify decl_loc_table at begginig and
904 2009-09-21 Eric Botcazou <ebotcazou@adacore.com>
906 * stor-layout.c (layout_type): Remove obsolete code.
908 2009-09-20 H.J. Lu <hongjiu.lu@intel.com>
911 * opts.c (decode_options): Don't turn on flag_ipa_sra for opt2.
913 2009-09-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
916 * builtins.c (do_mpc_arg2): Accept DO_NONFINITE parameter.
917 (do_mpc_ckconv): Accept FORCE_CONVERT parameter.
918 (fold_builtin_2, do_mpc_arg1): Update accordingly.
919 * fold-const.c (const_binop): Likewise.
920 * real.h (do_mpc_arg2): Update prototype.
922 2009-09-20 Jan Hubicka <jh@suse.cz>
924 * dwarf2out.c (add_const_value_attribute): Return true if successful.
925 (add_location_or_const_value_attribute): Rewrite using
927 (tree_add_const_value_attribute): Return true if successful.
928 (tree_add_const_value_attribute_for_decl): Likewise.
930 * dwarf2out.c (address_of_int_loc_descriptor): Break out from ...
931 (loc_descriptor): ... here;
932 (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
933 (cst_pool_loc_descr): Break out from ...; do not reffer constant
934 pool items that was not marked for output.
935 (loc_list_from_tree): ... here; handle special cases of ADDR_EXPR;
936 (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
937 (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
938 handle ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF, REALPART_EXPR,
939 IMAGPART_EXPR; handle address of INTEGER_CST; improve handling of
940 CONSTRUCTOR; handle REAL_CST, STRING_CST, COMPLEX_CST; use
941 DW_OP_stack_value to get address of items that are not available
943 (dw_loc_list): Handle single element lists correctly.
945 2009-09-20 Kai Tietz <kai.tietz@onevision.com>
946 Pascal Obry <obry@adacore.com>
948 * unwind-dw2-fde.c (classify_object_over_fdes):
949 Cast the constant 1 to _Unwind_Ptr.
950 (add_fdes): Likewise.
951 (linear_search_fdes): Likewise.
953 2009-09-20 Eric Botcazou <ebotcazou@adacore.com>
955 * stor-layout.c (set_sizetype): Avoid useless type copy.
957 2009-09-20 Richard Sandiford <rdsandiford@googlemail.com>
959 * configure.ac (gcc_cv_ld_mips_personality_relaxation): New
961 (HAVE_LD_PERSONALITY_RELAXATION): New macro definition.
962 * configure, config.in: Regenerate.
963 * dwarf2asm.c (eh_data_format_name): Handle DW_EH_PE_indirect |
965 * config/mips/mips.h (TARGET_WRITABLE_EH_FRAME): New macro.
966 (ASM_PREFERRED_EH_DATA_FORMAT): Define. Use MIPS_EH_INDIRECT
967 for global data if the output could be used in a shared library.
968 * config/mips/mips.c (mips_override_options): Set flag_dwarf2_cfi_asm
969 to 0 if TARGET_WRITABLE_EH_FRAME.
971 2009-09-20 Paolo Bonzini <bonzini@gnu.org>
973 PR rtl-optimization/39886
974 * combine.c (update_cfg_for_uncondjump): Set EDGE_FALLTHRU
975 just when insn is equal to BB_END (bb).
977 2009-09-19 Adam Nemet <anemet@caviumnetworks.com>
979 * config/mips/mips.opt (mrelax-pic-calls): New option.
980 * config/mips/mips.c (mips_strip_unspec_address): Move it up in
982 (mips_unspec_call): Change "unspec_call" expander into this.
983 (mips_strip_unspec_call): New function.
984 (mips_got_load): Call mips_unspec_call instead of
985 gen_unspec_call<mode>.
986 (mips16_build_call_stub): Fix comment for fp_code. Adjust call to
988 (mips_cfg_in_reorg): New function.
989 (mips16_lay_out_constants): Use it to decide whether to call
990 CFG-aware insn splitting.
991 (r10k_insert_cache_barriers): Move CFG set-up code from here to
992 mips_reorg. Move DF set-up code from here ...
993 (mips_df_reorg): ... to here. Call r10k_insert_cache_barriers
995 (mips_reorg): Call mips_df_reorg instead of
996 r10k_insert_cache_barriers. Move CFG set-up code here from
997 r10k_insert_cache_barriers.
998 (mips_call_expr_from_insn): New function.
999 (mips_pic_call_symbol_from_set): Likewise.
1000 (mips_find_pic_call_symbol): Likewise.
1001 (mips_annotate_pic_call_expr): Likewise.
1002 (mips_get_pic_call_symbol): Likewise.
1003 (mips_annotate_pic_calls): Likewise.
1004 (mips_override_options): Disable -mrelax-pic-calls unless PIC
1006 (mips_set_mips16_mode): Disable -mrelax-pic-calls for MIPS16.
1007 * config/mips/mips-protos.h (mips_get_pic_call_symbol): Declare it.
1008 * config/mips/mips.h (MIPS_CALL): Use it to print the .reloc
1010 * config/mips/mips.md (UNSPEC_CALL_ATTR): New unspec.
1011 (unspec_call<mode>): Remove it.
1012 (sibcall_internal, sibcall_value_internal,
1013 sibcall_value_multiple_internal, call_internal, call_split,
1014 call_value_internal, call_value_split,
1015 call_value_multiple_internal, call_value_multiple_split): Pass
1016 SIZE_OPNO to MIPS_CALL.
1017 (call_internal_direct, call_direct_split,
1018 call_value_internal_direct, call_value_direct_split): Pass -1 as
1019 SIZE_OPNO to MIPS_CALL.
1020 * configure.ac <mips*-*-*>: Add test for .reloc R_MIPS_JALR.
1021 * configure: Regenerate.
1022 * doc/invoke.texi (Option Summary): Add -mrelax-pic-calls
1023 and -mno-relax-pic-calls.
1024 (MIPS Options): Document -mrelax-pic-calls and -mno-relax-pic-calls.
1026 2009-09-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1029 * Makefile.in (stmp-fixinc): Ensure `include-fixed' is created
1030 in the directory this rule is called from, rather than the
1031 toplevel 'gcc' directory, to fix in-tree build.
1033 2009-09-19 Chris Demetriou <cgd@google.com>
1035 PR preprocessor/28435:
1036 * c-opts.c (c_common_handle_option): For -MD and -MMD, indicate
1037 to cpplib that the preprocessor output is needed.
1039 2009-09-19 Jakub Jelinek <jakub@redhat.com>
1041 * config/rs6000/rs6000.md (*save_gpregs_<mode>, *save_fpregs_<mode>,
1042 *restore_gpregs_<mode>, *return_and_restore_gpregs_<mode>,
1043 *return_and_restore_fpregs_<mode>,
1044 *return_and_restore_fpregs_aix_<mode>): Remove 'z' operand modifier.
1047 * dwarf2out.c (mem_loc_descriptor) <case SUBREG>: Recurse
1048 instead of assuming it has always a REG inside of it.
1050 2009-09-18 Gerald Pfeifer <gerald@pfeifer.com>
1052 * config/freebsd.h: Update comment on types.
1053 (WINT_TYPE): Define.
1055 2009-09-18 Jason Merrill <jason@redhat.com>
1057 * c.opt: Add -fno-deduce-init-list.
1059 2009-09-18 Neil Vachharajani <nvachhar@google.com>
1061 * value-prof.c (interesting_stringop_to_profile_p): Added output
1062 argument to indicate which parameter is the size parameter.
1063 * value-prof.c (gimple_stringop_fixed_value): Use
1064 INTERESTING_STRINGOP_TO_PROFILE_P to find size argument.
1065 * value-prof.c (gimple_stringops_transform): Update call sites to
1066 INTERESTING_STRINGOP_TO_PROFILE_P to reflect parameter change.
1068 2009-09-18 Uros Bizjak <ubizjak@gmail.com>
1071 From David Binderman <dcb314@hotmail.com>:
1072 * gcc/config/i386/i386.c (ix86_function_regparm): Remove useless
1073 local variable f. Remove stale comments.
1074 (ix86_compute_frame_layout): Remove useless local variable total_size.
1075 Remove #if 0'd code.
1076 (legitimate_address_p): Remove useless local variables
1077 reason_rtx and reason.
1078 (ix86_split_copysign_const): Remove useless local variable op1.
1079 (scale_counter): Remove useless local variable piece_size_mask.
1081 2009-09-18 Jakub Jelinek <jakub@redhat.com>
1083 * stmt.c (expand_asm_operands): Set REG_ATTRS on the temporary from
1086 2009-09-17 Michael Haubenwallner <michael.haubenwallner@salomon.at>
1089 * config/pa/t-hpux-shlib: Set soname in libgcc_s.sl.
1091 2009-09-17 Jakub Jelinek <jakub@redhat.com>
1093 * c-decl.c (finish_struct): Adjust DECL_SOURCE_LOCATION of
1096 2009-09-17 Alexandre Oliva <aoliva@redhat.com>
1098 * dwarf2out.c (loc_descriptor): Emit DW_OP_stack_value and
1099 DW_OP_implicit_value even without dwarf_version 4.
1101 2009-09-17 Jan Hubicka <jh@suse.cz>
1103 * dwarf2out.c: Include tree-pass.h and gimple.h.
1104 (loc_list_plus_const): New function.
1105 (loc_descriptor_from_tree_1): Rename to ...
1106 (loc_descriptor_from_tree): ... remove original.
1107 (loc_list_from_tree): New function.
1108 (add_AT_location_description): Accept location list.
1109 (tls_mem_loc_descriptor): Update call of loc_descriptor_from_tree.
1110 (concatn_mem_loc_descriptor): Remove.
1111 (mem_loc_descriptor): Handle CONCAT/CONCATN and VAR_LOCATION by
1113 (secname_for_decl): Move up.
1114 (hidden_reference_p): New function; break out from ...
1115 (loc_by_refernece): ... here; move up.
1116 (dw_loc_list): New function.
1117 (single_element_loc_list): New function.
1118 (single_element_loc_list_p): New function.
1119 (add_loc_descr_to_each): New function.
1120 (add_loc_list): New function.
1121 (loc_descr_from_tree): Make wraper of loc_list_from_tree.
1122 (loc_list_from_tree): Reroganized from loc_descr_from_tree;
1123 add diagnostics why expansion failed.
1124 (add_location_or_const_value_attribute): Support location lists.
1125 (add_bound_info): Likewise.
1126 (descr_info_loc): Update call of loc_descriptor_from_tree.
1127 (gen_variable_die): Work on location lists.
1128 * final.c (pass_final): Add dump file.
1129 * Makefile.in (dwarf2out.o): Add new dependencies.
1131 2009-09-17 Janis Johnson <janis187@us.ibm.com>
1134 * real.c decimal_from_integer, decimal_integer_string): New.
1135 (real_from_integer): Use them as special case for decimal float.
1136 * config/dfp-bit.c (_si_to_sd, _usi_to_sd): Use default rounding.
1137 (_di_to_sd, _di_to_dd, _di_to_td, _udi_to_sd, _udi_to_dd, _udi_to_td):
1138 Do not append zero after the decimal point in string to convert.
1140 2009-09-17 Alexander Monakov <amonakov@ispras.ru>
1142 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1143 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
1145 2009-09-17 Martin Jambor <mjambor@suse.cz>
1147 * common.opt (fipa-sra): New switch.
1148 * opts.c (decode_options): Turn flag_ipa_sra on for opt2.
1149 * timevar.def (TV_IPA_SRA): New timevar.
1150 * params.def (ipa-sra-ptr-growth-factor): New parameter.
1151 * doc/invoke.texi: Document -fipa-sra and ipa-sra-ptr-growth-factor.
1152 * tree-sra.c: Include cgraph.c.
1153 (enum sra_mode): Added SRA_MODE_EARLY_IPA.
1154 (struct access): Added fields stmt, grp_maybe_modified, grp_scalar_ptr
1155 and grp_not_necessarilly_dereferenced.
1156 (func_param_count): New variable.
1157 (encountered_apply_args): New variable.
1158 (bb_dereferences): New variable.
1159 (final_bbs): New variable.
1160 (no_accesses_representant): New variable.
1161 (no_accesses_p): New function.
1162 (dump_access): Dump the new fields.
1163 (sra_initialize): Set encountered_apply_args to false.
1164 (get_ssa_base_param): New function.
1165 (mark_parm_dereference): New function.
1166 (create_access): Caring for INIDRECT_REFs and different handling of
1167 varialble length accesses in early IPA SRA. Store the stmt - a new
1168 parameter - to the new access.
1169 (build_access_from_expr_1): New parameter stmt, passed to
1170 create_access. Handle INDIRECT_REFs.
1171 (build_access_from_expr): Pass the current statement to
1172 build_access_from_expr_1.
1173 (disqualify_ops_if_throwing_stmt): Trigger only in intraprocedural
1175 (build_accesses_from_assign): Pass the current statement to
1176 build_access_from_expr_1. Do not create assign links in IPA-SRA.
1177 (scan_function): Call handle_ssa_defs on phi nodes. Set bits in
1178 final_bbs when necessary. Check for calls to __builtin_apply_args.
1179 Fixup EH info if anythng was changed.
1180 (is_unused_scalar_param): New function.
1181 (ptr_parm_has_direct_uses): New function.
1182 (find_param_candidates): New function.
1183 (mark_maybe_modified): New function.
1184 (analyze_modified_params): New function.
1185 (propagate_dereference_distances): New function.
1186 (dump_dereferences_table): New function.
1187 (analyze_caller_dereference_legality): New function.
1188 (unmodified_by_ref_scalar_representative): New function.
1189 (splice_param_accesses): New function.
1190 (decide_one_param_reduction): New function.
1191 (enum ipa_splicing_result): New type.
1192 (splice_all_param_accesses): New function.
1193 (get_param_index): New function.
1194 (turn_representatives_into_adjustments): New function.
1195 (analyze_all_param_acesses): New function.
1196 (get_replaced_param_substitute): New function.
1197 (get_adjustment_for_base): New function.
1198 (replace_removed_params_ssa_names): New function.
1199 (sra_ipa_reset_debug_stmts): New function.
1200 (sra_ipa_modify_expr): New function.
1201 (sra_ipa_modify_assign): New function.
1202 (convert_callers): New function.
1203 (modify_function): New function.
1204 (ipa_sra_preliminary_function_checks): New function.
1205 (ipa_early_sra): New function.
1206 (ipa_early_sra_gate): New function.
1207 (pass_early_ipa_sra): New variable.
1208 * Makefile.in (tree-sra.o): Add cgraph.h to dependencies.
1210 2009-09-17 Michael Matz <matz@suse.de>
1213 * tree.c (build_type_attribute_qual_variant): Export.
1214 * tree.h (build_type_attribute_qual_variant): Declare.
1215 * tree-inline.c (remap_type_1): Use it to build variants with
1216 the original qualifiers and attributes.
1218 2009-09-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1220 * cfglayout.c (fixup_reorder_chain): Accept conditional jumps
1221 without a fallthrough edge.
1223 2009-09-16 DJ Delorie <dj@redhat.com>
1225 * config/m32c/m32c.c (m32c_emit_epilogue): Check for R8C or M16C
1226 chip and ignore the "fast_interrupt" attribute if so.
1228 2009-09-16 Richard Henderson <rth@redhat.com>
1231 * cfgbuild.c (find_bb_boundaries): Really re-instate 2009-09-02
1234 2009-09-16 Richard Henderson <rth@redhat.com>
1237 * tree-cfg.c (verify_gimple_call): Validate that gimple_call_chain
1238 is set only if DECL_NO_STATIC_CHAIN is unset.
1239 * tree-nested.c (iter_nestinfo_start, iter_nestinfo_next): New.
1240 (FOR_EACH_NEST_INFO): New.
1241 (walk_all_functions): Use it.
1242 (finalize_nesting_tree): Likewise.
1243 (unnest_nesting_tree): Likewise.
1244 (free_nesting_tree): Use iter_nestinfo_start, iter_nestinfo_next.
1245 (get_chain_decl, get_chain_field): Reset DECL_NO_STATIC_CHAIN.
1246 (convert_gimple_call): Early out if gimple_call_chain already set.
1247 (convert_all_function_calls): Iterate until no new functions
1248 require a static chain.
1249 (finalize_nesting_tree_1): Assert DECL_NO_STATIC_CHAIN is unset
1250 when building a trampoline. Use dump_function_to_file instead
1252 (lower_nested_functions): Open dump_file. Validate that decls
1253 that have DECL_NO_STATIC_CHAIN from the front end don't have that
1254 bit reset by this pass.
1256 2009-09-16 Michael Matz <matz@suse.de>
1259 * tree.h (struct tree_decl_common): Add decl_restricted_flag,
1260 shorten decl_common_unused.
1261 (DECL_RESTRICTED_P): New accessor.
1262 * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Use it
1263 to disambiguate marked decls and restrict pointers.
1265 2009-09-16 Richard Henderson <rth@redhat.com>
1268 * cfgbuild.c (find_bb_boundaries): Re-instate 2009-09-02 barrier fix.
1270 2009-09-16 Jakub Jelinek <jakub@redhat.com>
1272 * integrate.c (set_block_abstract_flags): Call
1273 set_decl_abstract_flags also on BLOCK_NONLOCALIZED_VARs.
1275 2009-09-16 Richard Guenther <rguenther@suse.de>
1278 * tree-flow-inline.h (may_be_aliased): Compute readonly variables
1281 2009-09-16 DJ Delorie <dj@redhat.com>
1282 Kaz Kojima <kkojima@gcc.gnu.org>
1284 * config/sh/sh.c (output_stack_adjust): Add new argument frame_p.
1285 (sh_expand_prologue): Update calls to output_stack_adjust.
1286 (sh_expand_epilogue): Likewise.
1288 2009-09-15 Adam Nemet <anemet@caviumnetworks.com>
1291 * reorg.c (redundant_insn): Don't count notes or DEBUG_INSNs when
1292 trying to limit the extent of searches in the insn stream.
1294 2009-09-15 Nathan Froyd <froydnj@codesourcery.com>
1295 Jakub Jelinek <jakub@redhat.com>
1299 * config/rs6000/rs6000.c (no_global_regs_above): Fix precedence
1301 (SAVRES_NOINLINE_GPRS_SAVES_LR, SAVRES_NOINLINE_FPRS_SAVES_LR,
1302 SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR): New strategy bits.
1303 (rs6000_savres_strategy): Always save FP registers inline if the
1304 target doesn't support hardware double-precision. Set the above
1305 bits in return value when needed.
1306 (rs6000_savres_routine_sym): Fix computation for cache selector.
1307 Mark the generated symbol as a function. Rename exitp argument to
1308 lr. Move code for determining the name of the symbol...
1309 (rs6000_savres_routine_name): ...here. New function. Add cases for
1310 getting the names right on AIX and 64-bit Linux.
1311 (savres_routine_name): New variable.
1312 (rs6000_make_savres_rtx): Rename exitp argument to lr. Don't assert
1313 lr isn't set when savep. Use r12 resp. r1 instead of r11 depending
1314 on what the target routine uses as a base register. If savep && lr
1315 describe saving of r0 into memory slot.
1316 (rs6000_emit_prologue): Correct use of call_used_regs. Fix out of
1317 line calls for AIX ABI.
1318 (rs6000_output_function_prologue): Use rs6000_savres_routine_name to
1319 determine FP save/restore functions.
1320 (rs6000_emit_stack_reset): Handle savres if sp_offset != 0 and
1321 frame_reg_rtx != sp_reg_rtx. Use gen_add3_insn instead of
1323 (rs6000_emit_epilogue): Adjust computation of restore_lr.
1324 Duplicate restoration of LR and execute the appropriate one
1325 depending on whether GPRs are being restored inline. Set r11 from
1326 offsetted frame_reg_rtx instead of sp_reg_rtx; if frame_reg_rtx is
1327 r11, adjust sp_offset. Use gen_add3_insn instead of gen_addsi3.
1328 Fix out of line calls for AIX ABI.
1329 * config/rs6000/rs6000.md (*return_and_restore_fpregs_aix_<mode>):
1331 * config/rs6000/spe.md (*save_gpregs_spe): Use explicit match for
1333 (*restore_gpregs_spe): Likewise.
1334 (*return_and_restore_gpregs_spe): Likewise.
1335 * config/rs6000/linux64.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
1336 Define to empty string unconditionally.
1337 * config/rs6000/sysv4.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
1338 Define to empty string unconditionally.
1339 (GP_SAVE_INLINE, FP_SAVE_INLINE): Handle TARGET_64BIT the same as
1342 2009-09-15 Jan Hubicka <jh@suse.cz>
1344 * doc/invoke.texi (inline-insns-auto): Drop from 60 to 50.
1345 * params.def (inline-insns-auto): Likewise.
1347 2009-09-15 Martin Jambor <mjambor@suse.cz>
1349 * ipa-inline.c (estimate_function_body_sizes): Dump info about
1350 individual statements only at TDF_DETAILS dump level. Format
1351 source for 80 characters per line.
1353 2009-09-15 Christian Bruel <christian.bruel@st.com>
1355 * regrename.c (do_replace): Update REG_DEAD notes.
1357 2009-09-15 Revital Eres <eres@il.ibm.com>
1359 * doc/tm.texi (TARGET_SUPPORT_VECTOR_MISALIGNMENT): Document.
1360 * targhooks.c (default_builtin_support_vector_misalignment):
1361 New builtin function.
1362 * targhooks.h (default_builtin_support_vector_misalignment):
1364 * target.h (builtin_support_vector_misalignment):
1365 New field in struct gcc_target.
1366 * tree-vect-data-refs.c (vect_supportable_dr_alignment): Call
1367 new builtin function.
1368 * target-def.h (TARGET_SUPPORT_VECTOR_MISALIGNMENT):
1370 * config/rs6000/rs6000.c
1371 (rs6000_builtin_support_vector_misalignment): New function.
1372 (TARGET_SUPPORT_VECTOR_MISALIGNMENT): Define.
1374 2009-09-15 Jie Zhang <jie.zhang@analog.com>
1376 * config/bfin/bfin.c (length_for_loop): Use NONDEBUG_INSN_P
1378 (bfin_optimize_loop): Likewise.
1379 (bfin_gen_bundles): Likewise.
1380 (workaround_speculation): Likewise.
1381 (find_load): Return NULL_RTX for debug_insn.
1383 2009-09-15 Uros Bizjak <ubizjak@gmail.com>
1385 * config/alpha/alpha.md (smaxsf3): Disable for IEEE mode.
1388 2009-09-14 DJ Delorie <dj@redhat.com>
1390 * config/mep/mep.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1391 * config/mep/mep.c (mep_emit_cbranch): Don't use BEQZ/BNEI in
1394 2009-09-14 Richard Henderson <rth@redhat.com>
1395 Jakub Jelinek <jakub@redhat.com>
1397 * builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec.
1398 * cfgbuild.c (make_edges): Handle asm goto.
1399 * cfglayout.c (fixup_reorder_chain): Likewise.
1400 * cfgrtl.c (patch_jump_insn): Likewise.
1401 * gimple-pretty-print.c (dump_gimple_asm): Likewise.
1402 * gimple.c (gimple_build_asm_1): Add and use nlabels parameter.
1403 (gimple_build_asm_vec): Add and use labels parameter.
1404 (gimple_build_asm): Remove.
1405 (walk_gimple_asm): Walk labels too.
1406 * gimple.def (GIMPLE_ASM): Update docs.
1407 * gimple.h: Update decls.
1408 (struct gimple_statement_asm): Change nc to use unsigned char;
1410 (gimple_asm_nlabels): New.
1411 (gimple_asm_label_op, gimple_asm_set_label_op): New.
1412 * gimplify.c (gimplify_asm_expr): Copy labels from ASM_EXPR
1413 into gimple_build_asm_vec.
1414 * jump.c (mark_jump_label_asm): New.
1415 (mark_jump_label): Use it.
1416 (redirect_jump_1): Handle asm goto.
1417 (invert_jump_1): Soft fail if X is null.
1418 * recog.c (extract_asm_operands): New.
1419 (asm_noperands): Use it; handle asm labels.
1420 (decode_asm_operands): Use extract_asm_operands.
1421 (asm_operand_ok): Properly handle empty string.
1422 * reg-stack.c (get_asm_operands_in_out): Rename from
1423 get_asm_operand_n_inputs; use extract_asm_operands; return both
1424 inputs and outputs by reference; update all callers.
1425 * rtl.def (ASM_OPERANDS): Add label vector as operand 6.
1426 * rtl.h (ASM_OPERANDS_LABEL_VEC): New.
1427 (ASM_OPERANDS_LABEL_LENGTH, ASM_OPERANDS_LABEL): New.
1428 (ASM_OPERANDS_SOURCE_LOCATION): Renumber.
1429 (extract_asm_operands): Declare.
1430 * stmt.c (expand_asm_operands): Add and use labels parameter.
1431 (check_unique_operand_names): Likewise.
1432 (resolve_asm_operand_names, resolve_operand_name_1): Likewise.
1433 (expand_asm_stmt): Handle asm labels.
1434 * tree-cfg.c (make_gimple_asm_edges): New.
1435 (make_edges): Use it.
1436 (cleanup_dead_labels): Handle asm labels.
1437 (is_ctrl_altering_stmt): Likewise.
1438 (gimple_redirect_edge_and_branch): Likewise.
1439 * tree.def (ASM_EXPR): Add 5th operand.
1440 * tree.h (ASM_LABELS): New.
1441 (resolve_asm_operand_names): Update decl.
1443 * c-parser.c (c_parser_asm_statement): Parse asm goto.
1444 (c_parser_asm_goto_operands): New.
1445 * c-tree.h (build_asm_expr): Update decl.
1446 * c-typeck.c (build_asm_expr): Add and use labels parameter.
1447 * doc/extend.texi: Document asm goto.
1449 2009-09-14 Richard Henderson <rth@redhat.com>
1451 * except.h: Update declarations.
1452 (struct pointer_map_t): Forward declare.
1453 (ERT_UNKNOWN, ERT_THROW, ERT_CATCH): Remove.
1454 (struct eh_landing_pad_d, eh_landing_pad): New.
1455 (struct eh_catch_d, eh_catch): New.
1456 (struct eh_region_d): Remove next_region_sharing_label, aka,
1457 label, tree_label, landing_pad, post_landing_pad, resume,
1458 may_contain_throw. Rename region_number to index. Remove
1459 u.eh_catch, u.eh_throw. Rename u.eh_try.eh_catch to first_catch.
1460 Add u.must_not_throw, landing_pads, exc_ptr_reg, filter_reg.
1461 (VEC(eh_landing_pad,gc)): New.
1462 (struct eh_status): Remove last_region_number. Add lp_array,
1463 throw_stmt_table, ttype_data, ehspec_data.
1464 (ehr_next, FOR_ALL_EH_REGION_AT): New.
1465 (FOR_ALL_EH_REGION_FN, FOR_ALL_EH_REGION): New.
1466 * except.c (lang_protect_cleanup_actions): Return tree.
1467 (struct ehl_map_entry): Remove.
1468 (init_eh_for_function): Push zero entries for region and lp_array.
1469 (gen_eh_region): Add to region_array immediately.
1470 (gen_eh_region_catch): Operate on eh_catch objects.
1471 (gen_eh_landing_pad): New.
1472 (get_eh_region_may_contain_throw, get_eh_region_tree_label): Remove.
1473 (get_eh_region_no_tree_label, set_eh_region_tree_label): Remove.
1474 (get_eh_region_from_number, get_eh_region_from_number_fn): New.
1475 (get_eh_landing_pad_from_number_fn): New.
1476 (get_eh_landing_pad_from_number): New.
1477 (get_eh_region_from_lp_number_fn): New.
1478 (get_eh_region_from_lp_number): New.
1479 (expand_resx_stmt, note_eh_region_may_contain_throw): Remove.
1480 (get_exception_pointer, get_exception_filter): Remove.
1481 (collect_eh_region_array, can_be_reached_by_runtime): Remove.
1482 (current_function_has_exception_handlers): Simplify.
1483 (bring_to_root, eh_region_replaceable_by_p): Remove.
1484 (replace_region, hash_type_list, hash_eh_region): Remove.
1485 (eh_regions_equal_p, merge_peers, remove_unreachable_regions): Remove.
1486 (label_to_region_map, num_eh_regions): Remove.
1487 (get_next_region_sharing_label, must_not_throw_labels): Remove.
1488 (find_exception_handler_labels): Remove.
1489 (duplicate_eh_regions_0, find_prev_try): Remove.
1490 (struct duplicate_eh_regions_data): New.
1491 (duplicate_eh_regions_1): Rewrite.
1492 (duplicate_eh_regions): Return a pointer map instead of an
1494 (copy_eh_region_1, copy_eh_region, push_reachable_handler): Remove.
1495 (redirect_eh_edge_to_label): Remove.
1496 (eh_region_outermost): Rewrite using eh_region pointers
1497 instead of integers.
1498 (add_ttypes_entry): Update for ttype_data move to eh_status.
1499 (add_ehspec_entry): Rewrite with VEC instead of varray.
1500 (assign_filter_values): Likewise. Export.
1501 (build_post_landing_pads, connect_post_landing_pads): Remove.
1502 (dw2_build_landing_pads): Rewrite to use lp_array.
1503 (struct sjlj_lp_info, sjlj_find_directly_reachable_regions): Remove.
1504 (sjlj_assign_call_site_values): Rewrite to use lp_array.
1505 (sjlj_emit_dispatch_table, sjlj_build_landing_pads): Likewise.
1506 (sjlj_mark_call_sites): Update for landing pad numbers.
1507 (finish_eh_generation): Rewrite.
1508 (gate_handle_eh): Do nothing for no eh tree.
1509 (pass_rtl_eh): Move up near finish_eh_generation.
1510 (remove_eh_landing_pad): New.
1511 (remove_eh_handler): Export.
1512 (remove_eh_region, remove_eh_handler_and_replace): Remove.
1513 (for_each_eh_label): Rewrite to use lp_array.
1514 (make_reg_eh_region_note): New.
1515 (make_reg_eh_region_note_nothrow_nononlocal): New.
1516 (insn_could_throw_p): New.
1517 (copy_reg_eh_region_note_forward): New.
1518 (copy_reg_eh_region_note_backward): New.
1519 (check_handled, add_reachable_handler): Remove.
1520 (reachable_next_level, foreach_reachable_handler): Remove.
1521 (arh_to_landing_pad, arh_to_label, reachable_handlers): Remove.
1522 (get_eh_region_and_lp_from_rtx): New.
1523 (get_eh_region_from_rtx): New.
1524 (can_throw_internal_1, can_throw_external_1): Remove.
1525 (can_throw_internal): Use get_eh_region_from_rtx.
1526 (can_throw_external): Use get_eh_region_and_lp_from_rtx.
1527 (insn_nothrow_p, can_nonlocal_goto): New.
1528 (expand_builtin_eh_common, expand_builtin_eh_pointer): New.
1529 (expand_builtin_eh_filter, expand_builtin_eh_copy_values): New.
1530 (add_action_record): Use VEC not varray.
1531 (collect_one_action_chain): Update for eh_region changes.
1532 (convert_to_eh_region_ranges): Make static. Use VEC not varray.
1533 Use get_eh_region_and_lp_from_rtx.
1534 (gate_convert_to_eh_region_ranges): New.
1535 (pass_convert_to_eh_region_ranges): Use it.
1536 (push_uleb128, push_sleb128): Use VEC not varray.
1537 (output_one_function_exception_table): Likewise.
1538 (dump_eh_tree): Update for eh_region changes.
1539 (verify_eh_tree): Likewise.
1540 (verify_eh_region, default_init_unwind_resume_libfunc): Remove.
1541 * tree-eh.c: Include target.h.
1542 (add_stmt_to_eh_lp_fn): Rename from add_stmt_to_eh_region_fn.
1543 Don't disallow GIMPLE_RESX; adjust argument check.
1544 (add_stmt_to_eh_lp): Rename from add_stmt_to_eh_region.
1545 (record_stmt_eh_region): Update for landing pad numbers;
1546 generate a landing pad if necessary.
1547 (remove_stmt_from_eh_lp): Rename from remove_stmt_from_eh_region.
1548 (remove_stmt_from_eh_lp_fn): Similarly.
1549 (lookup_stmt_eh_lp_fn): Rename from lookup_stmt_eh_region_fn.
1550 Update for lp numbers; don't special case missing throw_stmt_table.
1551 (lookup_expr_eh_lp): Similarly.
1552 (lookup_stmt_eh_lp): Rename from lookup_stmt_eh_region.
1553 (eh_seq, eh_region_may_contain_throw): New.
1554 (struct leh_state): Add ehp_region.
1555 (struct leh_tf_state): Remove eh_label.
1556 (emit_post_landing_pad): New.
1557 (emit_resx, emit_eh_dispatch): New.
1558 (note_eh_region_may_contain_throw): New.
1559 (frob_into_branch_around): Take eh_region not eh label;
1560 emit eh code into eh_seq.
1561 (honor_protect_cleanup_actions): Early exit for no actions. Don't
1562 handle EXC_PTR_EXPR, FILTER_EXPR. Use gimple_build_eh_must_not_throw,
1563 lower_eh_must_not_throw. Emit code to eh_seq.
1564 (lower_try_finally_nofallthru): Emit eh code to eh_seq.
1565 (lower_try_finally_onedest): Likewise.
1566 (lower_try_finally_copy): Likewise.
1567 (lower_try_finally_switch): Likewise.
1568 (lower_try_finally): Initialize ehp_region.
1569 (lower_catch): Update for eh_catch objects.
1570 (lower_eh_filter): Don't handle must_not_throw.
1571 (lower_eh_must_not_throw): New.
1572 (lower_cleanup): Don't set eh_label.
1573 (lower_eh_constructs_2): Resolve eh builtins.
1574 Handle GIMPLE_EH_MUST_NOT_THROW.
1575 (lower_eh_constructs): Initialize eh_region_may_contain_throw.
1576 Add eh_seq to the end of the function body.
1577 (make_eh_dispatch_edges): New.
1578 (make_eh_edge): Remove.
1579 (make_eh_edges): Simplify for landing pads.
1580 (redirect_eh_edge_1): New.
1581 (redirect_eh_edge): Use it.
1582 (redirect_eh_dispatch_edge): New.
1583 (stmt_could_throw_p): Use a switch. Allow RESX.
1584 (stmt_can_throw_external): Use lookup_stmt_eh_lp.
1585 (stmt_can_throw_internal): Likewise.
1586 (maybe_clean_eh_stmt_fn, maybe_clean_eh_stmt): New.
1587 (maybe_clean_or_replace_eh_stmt): Update for landing pads.
1588 (maybe_duplicate_eh_stmt_fn, maybe_duplicate_eh_stmt): New.
1589 (gate_refactor_eh): New.
1590 (pass_refactor_eh): Use it.
1591 (lower_resx, execute_lower_resx, pass_lower_resx): New.
1592 (lower_eh_dispatch, execute_lower_eh_dispatch): New.
1593 (gate_lower_ehcontrol, pass_lower_eh_dispatch): New.
1594 (remove_unreachable_handlers): Rename from
1595 tree_remove_unreachable_handlers; rewrite for landing pads;
1596 call remove_eh_handler directly.
1597 (remove_unreachable_handlers_no_lp): New.
1598 (unsplit_eh, unsplit_all_eh): New.
1599 (tree_empty_eh_handler_p, all_phis_safe_to_merge): Remove.
1600 (cleanup_empty_eh_merge_phis, cleanup_empty_eh_move_lp): New.
1601 (cleanup_empty_eh_unsplit): New.
1602 (cleanup_empty_eh): Rewrite.
1603 (cleanup_all_empty_eh): New.
1604 (execute_cleanup_eh): Rename from cleanup_eh. Remove unreachable
1605 handlers first. Use unsplit_all_eh, cleanup_all_empty_eh.
1606 (gate_cleanup_eh): New.
1607 (pass_cleanup_eh): Use it.
1608 (verify_eh_edges): Move later in file. Expect one EH edge.
1609 (verify_eh_dispatch_edge): New.
1611 * Makefile.in (FUNCTION_H): Use vecprim.h, not varray.h.
1612 (gtype-desc.o): Add TARGET_H.
1613 (tree.o): Use EXCEPT_H, not except.h.
1614 (cfgbuild.o): Add EXPR_H.
1615 (GTFILES): Add vecprim.h.
1616 * builtins.c (expand_builtin): Handle BUILT_IN_EH_POINTER,
1617 BUILT_IN_EH_FILTER, BUILT_IN_EH_COPY_VALUES.
1618 * builtins.def (BUILT_IN_UNWIND_RESUME, BUILT_IN_EH_POINTER,
1619 BUILT_IN_EH_FILTER, BUILT_IN_EH_COPY_VALUES): New.
1620 * calls.c (emit_call_1): Use make_reg_eh_region_note.
1621 * cfgbuild.c (control_flow_insn_p): Use can_nonlocal_goto; tidy
1622 calls to can_throw_internal.
1623 (rtl_make_eh_edge): Use get_eh_landing_pad_from_rtx.
1624 (make_edges): Don't handle RESX; use can_nonlocal_goto.
1625 * cfgexpand.c (expand_gimple_stmt_1): Don't handle RESX.
1626 (expand_gimple_stmt): Use make_reg_eh_region_note.
1627 (expand_debug_expr): Don't handle EXC_PTR_EXPR and FILTER_EXPR.
1628 (gimple_expand_cfg): Don't call convert_from_eh_region_ranges,
1629 or find_exception_handler_labels.
1630 * cfgrtl.c (rtl_verify_flow_info_1): Don't handle RESX. Assert
1631 there is exacly one EH edge. Use can_nonlocal_goto and
1633 * cgraphunit.c (update_call_expr): Use maybe_clean_eh_stmt_fn.
1634 (cgraph_materialize_all_clones): Use maybe_clean_or_replace_eh_stmt.
1635 * combine.c (can_combine_p, try_combine): Use insn_nothrow_p.
1636 * cse.c (count_reg_usage, insn_live_p): Use insn_could_throw_p.
1637 * dce.c (deletable_insn_p_1): Don't test may_trap_p.
1638 (deletable_insn_p): Use insn_nothrow_p; reorder nonjump insn test.
1639 * dse.c (scan_insn): Use insn_could_throw_p.
1640 * emit-rtl.c (try_split): Use copy_reg_eh_region_note_backward.
1641 * expr.c (expand_expr_real): Use make_reg_eh_region_note.
1642 (expand_expr_real_1): Don't handle RESX, EXC_PTR, or FILTER_EXPR.
1643 * fold-const.c (tree_expr_nonnegative_warnv_p): Don't handle
1644 EXC_PTR_EXPR or FILTER_EXPR.
1645 (tree_expr_nonzero_warnv_p): Likewise.
1646 * function.h: Include vecprim.h, not varray.h
1647 (struct rtl_eh): Remove filter, exc_ptr, built_landing_pad members;
1648 move ttype_data and ehspec_data members to struct eh_status; change
1649 action_record_data member to a VEC.
1650 * gcse.c (hash_scan_set): Use can_throw_internal.
1651 * gengtype.c (open_base_files): Add target.h to gtype-desc.c.
1652 * gimple-iterator.c (gsi_replace): Use maybe_clean_or_replace_eh_stmt.
1653 * gimple-low.c (lower_stmt): Handle GIMPLE_EH_MUST_NOT_THROW.
1654 (block_may_fallthru): Don't handle RESX_EXPR.
1655 * gimple-pretty-print.c (dump_gimple_label): Dump EH_LANDING_PAD_NR.
1656 (dump_gimple_eh_must_not_throw, dump_gimple_eh_dispatch): New.
1657 (dump_gimple_stmt): Dump landing pad information with TDF_EH;
1658 handle GIMPLE_EH_MUST_NOT_THROW, GIMPLE_EH_DISPATCH.
1659 * gimple.c (gss_for_code): Handle GIMPLE_EH_MUST_NOT_THROW,
1660 GIMPLE_EH_DISPATCH, GIMPLE_RESX.
1661 (gimple_size): Likewise.
1662 (gimple_build_eh_dispatch, gimple_build_eh_must_not_throw): New.
1663 (gimple_build_resx): Use gimple_build_with_ops.
1664 (DEFTREECODE): Don't handle EXC_PTR_EXPR, FILTER_EXPR.
1665 (is_gimple_val): Likewise.
1666 (is_gimple_stmt): Remove RESX_EXPR.
1667 * gimple.def (GIMPLE_EH_MUST_NOT_THROW, GIMPLE_EH_DISPATCH): New.
1668 (GIMPLE_RESX): Reorder with other EH constructs.
1669 * gimple.h (struct gimple_statement_eh_mnt): New.
1670 (struct gimple_statement_eh_ctrl): Rename from gimple_statement_resx.
1671 (gimple_eh_filter_must_not_throw): Remove.
1672 (gimple_eh_filter_set_must_not_throw): Remove.
1673 (gimple_eh_must_not_throw_fndecl): New.
1674 (gimple_eh_dispatch_region, gimple_eh_dispatch_set_region): New.
1675 (is_gimple_resx): New.
1676 * gimplify.c (gimplify_expr): Don't handle EXC_PTR_EXPR, RESX_EXPR.
1677 Don't copy EH_FILTER_MUST_NOT_THROW.
1678 * gsstruct.def (GSS_EH_MNT, GSS_EHCONTROL): New.
1679 * ipa-inline.c (estimate_function_body_sizes): Don't try to
1680 handle must_not_throw_labels specially.
1681 * ipa-pure-const.c (check_call): Update debug statement for LP.
1682 * ipa-type-escape.c (check_operand): Don't handle EXC_PTR or FILTER.
1683 * ipa-utils.c (get_base_var): Likewise.
1684 * libfunc.h (LTI_unwind_resume, unwind_resume_libfunc): Remove.
1685 * lower-subreg.c (move_eh_region_note): Remove.
1686 (resolve_simple_move): Use copy_reg_eh_region_note_forward.
1687 * omp-low.c (new_omp_context): Update for eh_lp_nr.
1688 (create_task_copyfn): Likewise.
1689 (maybe_catch_exception): Use gimple_build_eh_filter.
1690 * optabs.c (emit_libcall_block): Update test for no-nonlocal-goto
1691 REG_EH_REGION. Use make_reg_eh_region_note_nothrow_nononlocal.
1692 * passes.c (init_optimization_passes): Add pass_lower_eh_dispatch
1693 and pass_lower_resx.
1694 * print-tree.c (print_node): Dump EH_LANDING_PAD_NR.
1695 * recog.c (peephole2_optimize): Use copy_reg_eh_region_note_backward,
1696 can_throw_internal, can_nonlocal_goto.
1697 * reload1.c (fixup_eh_region_note): Use insn_could_throw_p,
1698 copy_reg_eh_region_note_forward.
1699 (emit_input_reload_insns): Use copy_reg_eh_region_note_forward.
1700 (emit_output_reload_insns): Likewise.
1701 (copy_eh_notes): Remove.
1702 * rtl.def (RESX): Remove.
1703 * rtl.h: Update declarations.
1704 * sese.c (graphite_copy_stmts_from_block): Use maybe_duplicate_eh_stmt.
1705 * tree-cfg.c (make_edges): Handle GIMPLE_EH_DISPATCH.
1706 (update_eh_label): Remove.
1707 (cleanup_dead_labels_eh): New.
1708 (cleanup_deal_labels): Use it instead of update_eh_label.
1709 (gimple_merge_blocks): Update landing pad data structure when
1710 removing a landing pad label.
1711 (remove_useless_stmts_tc): Remove gimple_eh_filter_must_not_throw
1712 test; handle GIMPLE_EH_MUST_NOT_THROW.
1713 (is_ctrl_altering_stmt): Handle GIMPLE_EH_DISPATCH.
1714 (verify_gimple_assign_single): Don't handle EXC_PTR or FILTER_EXPR.
1715 (verify_types_in_gimple_stmt): Handle GIMPLE_EH_DISPATCH.
1716 (verify_stmt): Likewise. Verify landing pads.
1717 (gimple_redirect_edge_and_branch): Handle GIMPLE_EH_DISPATCH.
1718 (gimple_duplicate_bb): Use maybe_duplicate_eh_stmt.
1719 (struct move_stmt_d): Add eh_map.
1720 (move_stmt_eh_region_nr, move_stmt_eh_region_tree_nr): New.
1721 (move_stmt_r): Remap eh region numbers in builtin calls,
1722 resx and eh_dispatch.
1723 (move_block_to_fn): Remove eh_offset parameter. Use
1724 maybe_duplicate_eh_stmt_fn.
1725 (find_outermost_region_in_block): Operate on eh_region pointers
1726 instead of region numbers.
1727 (move_sese_region_to_fn): Expect eh_map instead of eh_offset from
1728 duplicate_eh_regions.
1729 * tree-cfgcleanup.c (tree_forwarder_block_p): Move entry block edge
1730 test earlier. Disallow EH landing pads.
1731 * tree-cfa.c (create_tree_common_ann): Don't set ann->rn.
1732 * tree-flow.h: Update declarations.
1733 (struct tree_ann_common_d): Replace rn with lp_nr.
1734 * tree-inline.c (copy_tree_body_r): Don't handle RESX_EXPR.
1735 (remap_eh_region_nr, remap_eh_region_tree_nr): New.
1736 (remap_gimple_stmt): Remap eh region numbers in builtin calls,
1737 resx and eh_dispatch.
1738 (copy_bb): Use maybe_duplicate_eh_stmt_fn.
1739 (copy_edges_for_bb): Use make_eh_dispatch_edges.
1740 (copy_cfg_body): Expect eh_map instead of eh_region_offset
1741 from duplicate_eh_regions.
1742 (estimate_num_insns): Don't handle EXC_PTR_EXPR or FILTER_EXPR;
1743 update RESX; handle EH_DISPATCH.
1744 (expand_call_inline): Set eh_lp_nr, not eh_region.
1745 (maybe_inline_call_in_expr): Likewise.
1746 * tree-inline.h (struct copy_body_data): Replace eh_region with
1747 eh_lp_nr, eh_region_offset with eh_map.
1748 * tree-optimize.c (execute_fixup_cfg): Use maybe_clean_eh_stmt.
1749 * tree-pass.h (pass_lower_eh_dispatch, pass_lower_resx): New.
1750 * tree-pretty-print.c (dump_generic_node): Don't handle
1751 EXC_PTR_EXPR, FILTER_EXPR, RESX_EXPR.
1752 * tree-sra.c (scan_function): Use maybe_clean_eh_stmt.
1753 * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Don't handle
1754 EXC_PTR_EXPR, FILTER_EXPR.
1755 * tree-ssa-operands.c (get_expr_operands): Likewise.
1756 * tree-ssa-propagate.c (valid_gimple_rhs_p): Likewise.
1757 * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
1758 (ao_ref_init_from_vn_reference): Likewise.
1759 * tree-ssa-sink.c (statement_sink_location): Likewise.
1760 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1761 (mark_virtual_phi_result_for_renaming): Export. Tidy.
1762 * tree-ssa-pre.c (get_or_alloc_expr_for): Don't handle
1763 EXC_PTR_EXPR, FILTER_EXPR.
1764 (is_exception_related): Remove.
1765 (compute_avail): Don't call it.
1766 * tree-ssa-structalias.c: Remove VEC definitions for int and unsigned.
1767 * tree.c (find_decls_types_in_eh_region): Update for eh_region changes.
1768 (find_decls_types_in_node): Use FOR_ALL_EH_REGION_FN.
1769 (build_common_builtin_nodes): Add enable_cxa_end_cleanup parameter.
1771 (build_resx): Remove.
1772 * tree.def (EXC_PTR_EXPR, FILTER_EXPR, RESX_EXPR): Remove.
1773 * tree.h: Update declarations.
1774 (EH_FILTER_MUST_NOT_THROW): Remove.
1775 (struct tree_label_decl): Add eh_landing_pad_nr.
1776 (EH_LANDING_PAD_NR): New.
1777 * value-prof.c (gimple_ic): Tidy variable names. Update for
1778 landing pad numbers.
1779 (gimple_stringop_fixed_value): Tidy variable names. Assert
1780 that neither call stmt can throw.
1781 * vecprim.h (uchar): New.
1782 (VEC(uchar,heap), VEC(uchar,gc)): New.
1784 * c-common.c (c_define_builtins): Update call to
1785 build_common_builtin_nodes.
1786 * c-parser.c (c_parse_file): Don't call
1787 default_init_unwind_resume_libfunc.
1789 2009-09-14 Richard Sandiford <rdsandiford@googlemail.com>
1791 * config/mips/mips-protos.h (mips_cfun_has_cprestore_slot_p): Declare.
1792 (mips_cprestore_address_p): Likewise.
1793 (mips_save_gp_to_cprestore_slot): Likewise.
1794 (mips_restore_gp): Rename to...
1795 (mips_restore_gp_from_cprestore_slot): ...this.
1796 (mips_must_initialize_gp_p): Declare.
1797 (mips_emit_save_slot_move): Likewise.
1798 (mips_output_load_label): Return nothing.
1799 (mips_eh_uses): Declare.
1800 * config/mips/mips.h (TARGET_SPLIT_CALLS): Require epilogue_completed.
1801 (TARGET_CPRESTORE_DIRECTIVE): New macro.
1802 (TARGET_ABSOLUTE_JUMPS): Likewise.
1803 (EH_USES): Likewise.
1804 (FIRST_PSEUDO_REGISTER): Update comment.
1805 (MIPS_ABSOLUTE_JUMP): New macro, extracted from...
1806 (MIPS_CALL): ...here.
1807 (REGISTER_NAMES): Add $cprestore.
1808 * config/mips/mips.c (machine_function): Remove has_gp_insn_p.
1809 Add load_label_length, has_inflexible_gp_insn_p,
1810 has_flexible_gp_insn_p, must_initialize_gp_p and
1811 must_restore_gp_when_clobbered_p.
1812 (mips_expand_call): Don't generate split instructions here.
1813 (mips_split_call): Update the call to mips_restore_gp after
1814 the above name change.
1815 (mips16_cfun_returns_in_fpr_p): Move earlier in file.
1816 (mips_find_gp_ref): New function.
1817 (mips_insn_has_inflexible_gp_ref_p): Likewise.
1818 (mips_cfun_has_inflexible_gp_ref_p): Likewise.
1819 (mips_insn_has_flexible_gp_ref_p): Likewise.
1820 (mips_cfun_has_flexible_gp_ref_p): Likewise.
1821 (mips_function_has_gp_insn): Delete.
1822 (mips_global_pointer): Drop the df_regs_ever_live_p check.
1823 Use the new functions above. Only return INVALID_REGNUM
1824 for TARGET_ABSOLUTE_JUMPS.
1825 (mips_must_initialize_gp_p): New function.
1826 (mips_get_cprestore_base_and_offset): New function, extracted from...
1827 (mips_cprestore_slot): ...here. Take a bool parameter.
1828 (mips_cfun_has_cprestore_slot_p): New function.
1829 (mips_cprestore_address_p): Likewise.
1830 (mips_save_gp_to_cprestore_slot): Likewise.
1831 (mips_restore_gp): Rename to...
1832 (mips_restore_gp_from_cprestore_slot): ...this. Assert
1833 epilogue_completed. Update the call to mips_cprestore_slot.
1834 Test cfun->machine->must_restore_gp_when_clobbered_p.
1835 (mips_direct_save_slot_move_p): New function.
1836 (mips_emit_save_slot_move): Likewise.
1837 (mips_output_cplocal): Test mips_must_initialize_gp_p () instead
1838 of cfun->machine->global_pointer.
1839 (mips_output_function_prologue): Check mips_must_initialize_gp_p ().
1840 (mips_save_reg): Use mips_emit_save_slot_move.
1841 (mips_expand_prologue): Set must_initialize_gp_p.
1842 Use mips_cfun_has_cprestore_slot_p. Use gen_potential_cprestore
1843 for all cprestore saves. Emit a use_cprestore instruction after
1844 setting up the cprestore slot.
1845 (mips_restore_reg): Use mips_emit_save_slot_move.
1846 (mips_process_load_label): New function.
1847 (mips_load_label_length): Likewise.
1848 (mips_output_load_label): Don't return asm: output it here instead.
1849 Use mips_process_load_label.
1850 (mips_adjust_insn_length): Adjust the length of branch instructions
1851 that have length MAX_PIC_BRANCH_LENGTH.
1852 (mips_output_conditional_branch): Update the call to
1853 mips_output_load_label. Assume the branch target is OPERANDS[0]
1854 rather than OPERANDS[1]. Use MIPS_ABSOLUTE_JUMP for absolute jumps.
1855 (mips_output_order_conditional_branch): Swap the meaning of
1856 OPERANDS[0] and OPERANDS[1].
1857 (mips_variable_issue): Don't count ghost instructions.
1858 (mips_expand_ghost_gp_insns): New function.
1859 (mips_reorg): Rerun mips_reorg_process_insns if it returns true.
1860 (mips_output_mi_thunk): Set must_initialize_gp_p.
1861 (mips_eh_uses): New function.
1862 * config/mips/predicates.md (cprestore_save_slot_operand)
1863 (cprestore_load_slot_operand): New predicates.
1864 * config/mips/mips.md (UNSPEC_POTENTIAL_CPRESTORE): New unspec.
1865 (UNSPEC_MOVE_GP): Likewise.
1866 (UNSPEC_CPRESTORE, UNSPEC_RESTORE_GP, UNSPEC_EH_RETURN)
1867 (UNSPEC_CONSTTABLE_INT, UNSPEC_CONSTTABLE_FLOAT): Bump to make room.
1868 (CPRESTORE_SLOT_REGNUM): New register.
1869 (MAX_PIC_BRANCH_LENGTH): New constant.
1870 (jal_macro): Use MIPS_ABSOLUTE_JUMPS.
1871 (length): Use MAX_PIC_BRANCH_LENGTH as a placeholder for PIC long
1872 branches. Fix commentary.
1873 (loadgp_newabi_<mode>): Change from unspec_volatile to unspec.
1874 Only split if mips_must_initialize_gp_p; expand to nothing otherwise.
1875 Change type to "ghost".
1876 (loadgp_absolute_<mode>): Likewise.
1877 (loadgp_rtp_<mode>): Likewise.
1878 (copygp_mips16): Likewise.
1879 (loadgp_blockage): Remove redundant mode attribute.
1880 (potential_cprestore): New instruction.
1881 (cprestore): Turn into an unspec set.
1882 (use_cprestore): New instruction.
1883 (*branch_fp): Swap operands 0 and 1. Remove redundant mode attribute.
1884 (*branch_fp_inverted): Likewise.
1885 (*branch_order<mode>): Likewise.
1886 (*branch_order<mode>_inverted): Likewise.
1887 (*branch_equality<mode>): Likewise.
1888 (*branch_equality<mode>_inverted): Likewise.
1889 (*branch_bit<bbv><mode>): Likewise.
1890 (*branch_bit<bbv><mode>_inverted): Likewise.
1891 (*branch_equality<mode>_mips16): Remove redundant mode.
1892 (jump): Turn into a define_expand.
1893 (*jump_absolute): New instruction.
1894 (*jump_pic): Likewise.
1895 (*jump_mips16): Rename previously-unnamed pattern. Remove
1896 redundant mode attribute.
1897 (restore_gp): Split on epilogue_completed rather than
1898 reload_completed. Change type to "ghost".
1899 (move_gp<mode>): New instruction.
1900 * config/mips/mips-dsp.md (mips_bposge): Swap operands 0 and 1.
1901 Remove redundant mode attribute.
1902 * config/mips/mips-ps-3d.md (bc1any4t): Likewise.
1903 (bc1any4f, bc1any2t, bc1any2f): Likewise.
1904 (*branch_upper_lower, *branch_upper_lower_inverted): Likewise.
1906 2009-09-14 Michael Meissner <meissner@linux.vnet.ibm.com>
1909 * config/rs6000/rs6000.c (rs6000_function_value): V2DF and V2DI
1910 are returned in the same register (vs34 or v2) that Altivec vector
1911 types are returned in.
1912 (rs6000_libcall_value): Ditto.
1915 * config/rs6000/rs6000.c (rs6000_emit_move): Use gen_add3_insn
1916 instead of explicit addsi3/adddi3 calls.
1917 (rs6000_split_multireg_move): Ditto.
1918 (rs6000_emit_allocate_stack): Ditto.
1919 (rs6000_emit_prologue): Ditto.
1920 (rs6000_output_mi_thunk): Ditto.
1922 * config/rs6000/rs6000.md (bswapdi*): Don't assume the pointer
1923 size is 64 bits if we can use 64-bit registers.
1925 2009-09-14 Bernd Schmidt <bernd.schmidt@analog.com>
1927 * config/bfin/bfin.c (bfin_longcall_p): Don't use short calls for weak
1930 From Jie Zhang <jie.zhang@analog.com>:
1931 * config/bfin/bfin.c (bfin_expand_prologue): Ask do_link to
1932 save FP and RETS with saveall attribute.
1933 (bfin_expand_epilogue): Ask do_unlink to restore FP and RETS
1934 with saveall attribute.
1936 * config/bfin/bfin.c (bfin_expand_builtin,
1937 case BFIN_BUILTIN_MULT_1X32X32): Force constants to registers for the
1940 From Jie Zhang <jie.zhang@analog.com>:
1941 * config/bfin/bfin.c (bfin_expand_builtin): Initialize icodes
1942 before use in two places.
1943 * config/bfin/bfin.md (AREG): Define mode iterator.
1944 (reload_in, reload_out): Use mode iterator AREG.
1946 2009-09-14 Richard Guenther <rguenther@suse.de>
1949 * dwarf2out.c (dwarf2out_begin_prologue): Adjust non-CFI asm
1950 EH personality path.
1952 2009-09-13 Richard Guenther <rguenther@suse.de>
1953 Rafael Avila de Espindola <espindola@google.com>
1955 * langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
1956 (LANG_HOOKS_EH_PERSONALITY): Likewise.
1957 (LANG_HOOKS_INITIALIZER): Adjust.
1958 (lhd_pass_through_t): Declare.
1959 * langhooks.h (struct lang_hooks): Add eh_runtime_type and
1961 * langhooks.c (lhd_pass_through_t): New function.
1962 * dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc,
1963 dwarf2out_begin_prologue): Use personality from current_function_decl.
1964 * expr.h (get_personality_function): Declare.
1965 * expr.c (get_personality_function): New function.
1966 (build_personality_function): Likewise.
1967 * libfuncs.h (libfunc_index): Remove LTI_eh_personality.
1968 (eh_personality_libfunc): Remove.
1969 * optabs.c (build_libfunc_function): New function split out from ...
1970 (init_one_libfunc): ... here.
1971 * tree.h (DECL_FUNCTION_PERSONALITY): New.
1972 (tree_function_decl): Add personality.
1973 (lhd_gcc_personality): Declare.
1974 (build_personality_function): Likewise.
1975 * tree.c (gcc_eh_personality_decl): New.
1976 (lhd_gcc_personality): New function.
1977 * except.h (lang_eh_runtime_type): Remove.
1978 (enum eh_personality_kind): New.
1979 (build_personality_function): Declare.
1980 (function_needs_eh_personality): Declare.
1981 * except.c (lang_eh_runtime_type): Remove.
1982 (function_needs_eh_personality): New function.
1983 (add_type_for_runtime): Call lang_hooks.type_for_runtime instead.
1984 (sjlj_emit_function_enter, output_function_exception_table):
1985 Use personality from current_function_decl.
1986 * tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY.
1987 * tree-inline.c (tree_can_inline_p): Do not inline across different
1989 (expand_call_inline): Likewise. Adjust the callers EH personality.
1990 (tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY.
1991 * cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY.
1992 * Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency.
1993 (c-parser.o): Likewise
1994 * c-tree.h (c_eh_initialized_p): Remove.
1995 (c_maybe_initialize_eh): Likewise.
1996 * c-decl.c (finish_decl): Don't call c_maybe_initialize_eh.
1997 (finish_decl): Don't call c_maybe_initialize_eh.
1998 (c_eh_initialized_p): Remove.
1999 (c_maybe_initialize_eh): Likewise.
2000 * c-parser.c (c_parser_omp_construct): Likewise.
2001 (c_parse_file): Initialize exception handling.
2003 2009-09-13 Kai Tietz <kai.tietz@onevision.com>
2005 * config.gcc (tm_file): Remove i386/biarch32.h
2006 for i?86-w64-mingw* case.
2007 (i?86-*-mingw* andx86_64-*-mingw*): Add multilib
2009 * config.host: Set for x64 mingw the option
2010 use_long_long_for_widest_fast_int to yes.
2012 2009-09-13 Eric Botcazou <ebotcazou@adacore.com>
2014 * tree.h (DECL_IGNORED_P): Document further effect for FUNCTION_DECL.
2015 * dbxout.c (dbxout_function_end): Do not test DECL_IGNORED_P.
2016 (dbxout_begin_function): Likewise.
2017 * final.c (dwarf2_debug_info_emitted_p): New predicate.
2018 (final_start_function): Do not emit debug info if DECL_IGNORED_P is
2019 set on the function.
2020 (final_end_function): Likewise.
2021 (final_scan_insn): Likewise.
2022 (rest_of_handle_final): Likewise.
2023 * varasm.c (assemble_start_function): Likewise.
2024 * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
2026 2009-09-12 Jason Merrill <jason@redhat.com>
2028 * dbgcnt.c (dbg_cnt_process_single_pair): constify.
2029 * opts.c (common_handle_option): constify.
2031 2009-09-12 Gerald Pfeifer <gerald@pfeifer.com>
2033 * doc/install.texi (avr): Remove obsolete reference site.
2035 2009-09-12 Gerald Pfeifer <gerald@pfeifer.com>
2037 * doc/install.texi (Binaries): Adjust AIX link.
2039 2009-09-12 Akim Demaille <demaille@gostai.com>
2041 * doc/invoke.texi (-fstrict-aliasing): Correct two examples.
2042 Use an imperative sentence.
2044 2009-09-11 Richard Henderson <rth@redhat.com>
2046 * gsstruct.def (DEFGSSTRUCT): Remove printable-name argument; add
2047 structure-name and has-tree-operands arguments; update all entries.
2048 * gimple.def (DEFGSCODE): Replace 3rd argument with GSS_symbol;
2050 * gimple.c (gimple_ops_offset_): Use HAS_TREE_OP argument.
2051 (gsstruct_code_size): New.
2052 (gss_for_code_): New.
2053 (gss_for_code): Remove.
2054 (gimple_size): Rewrite using gsstruct_code_size.
2055 (gimple_statement_structure): Move to gimple.h.
2056 * gimple.h (gimple_ops_offset_, gss_for_code_): Declare.
2057 (gss_for_code, gimple_statement_structure): New.
2058 (gimple_ops): Use new arrays; tidy.
2060 2009-09-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2062 * config/pa/predicates.md (symbolic_operand): Require a CONST symbolic
2063 operand to be a PLUS expression.
2064 * config/pa/pa.c (pa_secondary_reload): Likewise.
2066 2009-09-11 Jakub Jelinek <jakub@redhat.com>
2068 * combine.c (propagate_for_debug_subst): Call wrap_constant on top.
2070 * print-rtl.c (print_rtx): Use JUMP_LABEL (in_rtx) instead of
2073 2009-09-11 Bernd Schmidt <bernd.schmidt@analog.com>
2075 From Jie Zhang <jie.zhang@analog.com>:
2076 * doc/extend.texi (node Function Attributes): Document l2
2078 (node Blackfin Variable Attributes): Document l2 variable attributes.
2080 2009-09-11 Loren J. Rittle <ljrittle@acm.org>
2082 * config.gcc (*-*-freebsd*): Enable default_use_cxa_atexit
2083 to match the system compiler's configuration at inflection point.
2084 Add comment to remark a remaining difference with system compiler.
2086 * configure.ac (*-*-freebsd*): Enable check for __stack_chk_fail.
2087 * configure: Regenerate.
2089 2009-09-11 Bernd Schmidt <bernd.schmidt@analog.com>
2091 From Jie Zhang <jie.zhang@analog.com>:
2092 * config/bfin/bfin.c (bfin_expand_call): Handle L2 functions.
2093 (bfin_handle_l2_attribute): New.
2094 (bfin_attribute_table): Add l2 attribute.
2096 2009-09-11 Michael Matz <matz@suse.de>
2099 * tree-inline.c (remap_decls): Don't put DECL_EXTERNAL decls
2100 on the local_decls list.
2102 2009-09-11 Alexandre Oliva <aoliva@redhat.com>
2106 * cselib.c (cselib_expand_value_rtx_cb): Document callback
2108 (cselib_expand_value_rtx_1): Use callback for SUBREGs. Adjust
2109 for VALUEs, to implement the documented interface.
2110 * var-tracking.c (vt_expand_loc_callback): Handle SUBREGs.
2111 Adjust for VALUEs and anything else, to implement the
2112 documented interface.
2114 2009-09-10 Nathan Froyd <froydnj@codesourcery.com>
2116 * config/rs6000/rs6000.h (DATA_ALIGNMENT): Check that we are dealing
2117 with actual SPE/paired vector modes before using 64-bit alignment.
2118 Check that TYPE is a REAL_TYPE for TARGET_E500_DOUBLE.
2120 2009-09-10 DJ Delorie <dj@redhat.com>
2122 * config/mep/mep.md (eh_epilogue): Defer until after epilogue is
2125 * config/mep/mep.h (LEGITIMATE_CONSTANT_P): New.
2126 * config/mep/mep.c (mep_legitimate_constant_p): New.
2127 * config/mep/mep-protos.h: Prototype it.
2129 2009-09-10 Richard Henderson <rth@redhat.com>
2131 * print-rtl.c (print_rtx): Fix JUMP_LABEL index.
2133 2009-09-10 Jason Merrill <jason@redhat.com>
2135 * tree.c (chain_index): New fn.
2136 * tree.h: Declare it.
2138 2009-09-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2140 * config/sol2-c.c (cmn_err_length_specs): Initialize
2141 scalar_identity_flag.
2143 2009-09-10 Richard Henderson <rth@redhat.com>
2145 * tree.h (struct tree_decl_common): Move align member earlier;
2146 move label_decl_uid member ...
2147 (struct tree_label_decl): ... here.
2148 (LABEL_DECL_UID): Update to match.
2150 * tree-cfg.c (dump_function_to_file): Dump eh tree with TDF_EH,
2153 * tree-cfg.c (gimple_redirect_edge_and_branch): Do
2154 gimple_try_redirect_by_replacing_jump test after no-op and EH tests.
2156 * tree-cfg.c (split_edge_bb_loc): Don't disallow placement at
2157 dest_prev if the edge is complex.
2159 * tree-cfg.c (is_ctrl_stmt): Use a switch.
2161 * tree-cfg.c (gimple_can_merge_blocks_p): Move label and
2162 loop latch tests earlier.
2164 * gimple-iterator.c (gimple_find_edge_insert_loc): Insert
2165 before GIMPLE_RETURN, not after its predecessor; insert
2168 * gimple-iterator.c (gimple_find_edge_insert_loc): Use
2169 gimple_seq_empty_p to test for no PHI nodes.
2170 * tree-cfg.c (split_critical_edges): Likewise.
2172 * c-common.h (c_dialect_cxx, c_dialect_objc): Boolify.
2174 2009-09-10 Hariharan Sandanagobalane <hariharan@picochip.com>
2176 * final.c (shorten_branches) : Ignore DEBUG_INSN_P instructions
2177 introduced by the VTA branch merge.
2179 2009-09-10 Uros Bizjak <ubizjak@gmail.com>
2181 * ira-conflicts.c: Use fputs or putc instead of fprintf
2185 * tree-switch-conversion.c: Ditto.
2187 2009-09-10 Hariharan Sandanagobalane <hariharan@picochip.com>
2189 * config/picochip/picochip.c : Ignore DEBUG_INSN_P instructions
2190 introduced by the VTA branch merge.
2192 2009-09-10 Uros Bizjak <ubizjak@gmail.com>
2195 2009-09-09 Uros Bizjak <ubizjak@gmail.com>
2197 PR rtl-optimization/39779
2198 * expr.c (convert_modes): Return when mode == oldmode after
2199 CONST_INTs are processed.
2201 2009-09-10 Nick Clifton <nickc@redhat.com>
2203 * config/mep/mep.c (mep_encode_section_info): Copy weakness
2204 attribute and referring decl when creating renamed symbol.
2206 2009-09-10 Richard Guenther <rguenther@suse.de>
2209 * cgraphunit.c (cgraph_emit_thunks): Emit thunks only for
2211 (cgraph_finalize_compilation_unit): Compute reachability
2212 before emitting thunks. Properly process aliases before
2213 possibly removing unreachable nodes.
2215 2009-09-10 Richard Guenther <rguenther@suse.de>
2218 * tree.c (struct free_lang_data_d): Add worklist member.
2219 (find_decls_types_r): Push onto the worklist instead of recursing.
2220 Handle TREE_BINFOs properly.
2221 (find_decls_types): New function wrapped around find_decls_types_r
2222 to process the worklist.
2223 (find_decls_types_in_eh_region): Use it.
2224 (find_decls_types_in_node): Likewise.
2225 (find_decls_types_in_var): Likewise.
2226 (free_lang_data_in_cgraph): Likewise. Free the worklist.
2227 * tree.h (RECORD_OR_UNION_TYPE_P): New.
2228 (AGGREGATE_TYPE_P): Adjust.
2230 2009-09-09 Jason Merrill <jason@redhat.com>
2232 * configure.ac: Check glibc version even if we have an in-tree
2235 2009-09-09 Anthony Green <green@moxielogic.com>
2237 * config/moxie/moxie.md (*movsi, *movhi, *movqi): Use xor to load
2238 the constant 0 when appropriate.
2239 * config/moxie/constraints.md: Add constraint O.
2241 * config/moxie/moxie.c (moxie_setup_incoming_varargs): Adjust
2242 to pass up to 6 32-bit argument values in registers.
2243 (moxie_function_arg): Ditto.
2244 (moxie_arg_partial_bytes): Ditto.
2245 * config/moxie/moxie.h (FUNCTION_ARG_ADVANCE): Ditto.
2246 (REG_PARM_STACK_SPACE): Ditto.
2247 (FUNCTION_ARG_REGNO_P): Ditto.
2249 * config/moxie/moxie.c (moxie_expand_prologue): Use dec
2250 instruction to allocate stack space.
2252 2009-09-09 Segher Boessenkool <segher@kernel.crashing.org>
2254 * config/rs6000/rs6000.md (bswapdi2_64bit): Fix
2255 unnecessarily stringent constraints. Fix address
2256 calculation in the splitters.
2258 2009-09-09 Uros Bizjak <ubizjak@gmail.com>
2260 PR rtl-optimization/39779
2261 * expr.c (convert_modes): Return when mode == oldmode after
2262 CONST_INTs are processed.
2264 2009-09-09 Kai Tietz <kai.tietz@onevision.com>
2267 * config/i386.c (ix86_can_use_return_insn_p): Check for padding0, too.
2268 (ix86_expand_prologue): Take frame.padding0 into logic of
2270 (ix86_expand_epilogue): Likewise.
2272 2009-09-09 Jakub Jelinek <jakub@redhat.com>
2274 * config/t-slibgcc-elf-ver (SHLIB_MAKE_SOLINK, SHLIB_INSTALL_SOLINK):
2276 (SHLIB_LINK, SHLIB_INSTALL): Use them.
2277 * config/t-slibgcc-libgcc: New file.
2278 * config.gcc (powerpc*-*-linux*, powerpc*-*-gnu*): Use it.
2280 2009-09-09 Martin Jambor <mjambor@suse.cz>
2282 PR tree-optimization/41089
2283 * tree-sra.c (find_var_candidates): Do not consider va_lists in
2286 2009-09-09 Richard Henderson <rth@redhat.com>
2288 * gimple.h (CASE_GIMPLE_OMP): New.
2289 (is_gimple_omp): Use it.
2290 * tree-cfg.c (is_ctrl_altering_stmt): Likewise.
2291 (verify_gimple_debug): Likewise.
2293 2009-09-09 Richard Guenther <rguenther@suse.de>
2295 PR tree-optimization/41101
2296 * tree-ssa-pre.c (maximal_set): Remove.
2297 (compute_antic_aux): Treat the maximal set as implicitly all ones.
2298 Defer all blocks we didn't visit at least one successor.
2299 (add_to_exp_gen): Do not add to the maximal set.
2300 (make_values_for_phi): Likewise.
2301 (compute_avail): Likewise.
2302 (init_pre): Do not allocate the maximal set.
2303 (execute_pre): Do not dump it.
2305 2009-09-09 Martin Jambor <mjambor@suse.cz>
2307 * tree-cfg.c (verify_gimple_phi): Check that gimple_phi_result is
2308 an SSA_NAME rather than a is_gimple_variable.
2310 2009-09-09 Richard Guenther <rguenther@suse.de>
2313 * tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Remove
2314 code dealing with plain pointer bases.
2315 (maybe_fold_offset_to_reference): Likewise.
2316 (maybe_fold_stmt_addition): Adjust.
2318 2009-09-09 Richard Guenther <rguenther@suse.de>
2320 * tree.c (free_lang_data_in_type): Do not free the type variant
2322 (free_lang_data): Merge char_type_node with its properly signed
2324 (pass_ipa_free): Collect after freeing language specific data.
2326 2009-09-09 Michael Matz <matz@suse.de>
2329 * cfgexpand.c (expand_gimple_stmt_1): Use an int for storing
2330 SUBREG_PROMOTED_UNSIGNED_P, instead of a bool.
2331 * rtl.h (struct rtx, SUBREG_PROMOTED_UNSIGNED_P): Update comments
2334 2009-09-08 DJ Delorie <dj@redhat.com>
2336 * config/mep/mep.c (conversions[]): Add "ml" pattern.
2338 2009-09-04 Jason Merrill <jason@redhat.com>
2340 * tree.c (tree_find_value): Remove.
2341 * tree.h: Remove prototype.
2342 * varasm.c (assemble_external): Use value_member instead.
2344 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
2346 * toplev.c (process_options): Choose default debugging type when
2347 gtoggle enables debug info and type is unset.
2349 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
2353 * cselib.c (cselib_expand_value_rtx_1): Don't return copy of
2356 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
2358 * configure: Rebuilt with modified libtool.m4.
2360 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
2365 * tree-ssa.c (execute_update_addresses_taken): Update debug insns.
2367 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
2369 * tree-ssa-loop-ivopts.c (get_phi_with_result): Remove.
2370 (remove_statement): Likewise.
2371 (rewrite_use_nonlinear_expr): Adjust.
2372 (remove_unused_ivs): Collect SSA NAMEs to remove and call...
2373 * tree-ssa.c (release_defs_bitset): ... this. New.
2374 * tree-flow.h (release_defs_bitset): Declare.
2376 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
2379 * tree-ssa-phiopt.c (minmax_replacement): Skip debug stmts
2380 in the middle block.
2382 2009-09-08 Kai Tietz <kai.tietz@onevision.com>
2384 * tree-ssa-reassoc.c (find_operand_rank): Cast pointer
2385 via intptr_t to long type.
2386 (insert_operand_rank): Cast long type via intptr_t to
2388 * genattrtab.c (RTL_HASH): Use intptr_t to cast from
2390 * c-pretty-print.c (pp_c_tree_decl_identifier): Cast
2391 from pointer to unsigned via uintptr_t.
2393 * configure.ac (GCC_STDINT_TYPES): Initialize intptr_t,
2394 uintptr_t, HAVE_INTTYPES_H, HAVE_STDINT_H, HAVE_UINTPTR_T,
2396 * configure: Regenerated.
2397 * config.in: Regenerated
2398 * system.h (stdint.h): Add include.
2399 (inttypes.h): Likewise.
2400 * Makefile.in (aclocal): Add config/stdint.m4.
2401 * aclocal.m4: Regenerated.
2403 2009-09-08 Bernd Schmidt <bernd.schmidt@analog.com>
2405 * config/bfin/bfin.c (np_check_regno, np_after_branch): New static
2407 (note_np_check_stores): New function.
2408 (harmless_null_pointer_p): New function.
2409 (trapping_loads_p): New args NP_REG and AFTER_NP_BRANCH. Callers
2410 changed. Take into account whether we're in the shadow of a condjump
2411 that tested NP_REG for NULL.
2412 Lose all code that tested for SEQUENCEs.
2413 (workaround_speculation): Avoid inserting NOPs for loads that are
2414 either always executed or a NULL pointer.
2416 2009-09-08 Jan Hubicka <jh@suse.cz>
2418 * doc/invoke.texi (early-inlining-insns): Reduce from 12 to 8.
2419 * params.def (early-inlining-insns): Likewise.
2421 2009-09-08 Jakub Jelinek <jakub@redhat.com>
2423 PR rtl-optimization/41239
2424 * sched-int.h (struct deps): Add last_function_call_may_noreturn field.
2425 * sched-rgn.c (deps_join): Join also last_function_call_may_noreturn
2427 * sched-deps.c (sched_analyze_insn): Prevent moving trapping insns
2428 across calls, as the calls might not always return normally.
2429 (call_may_noreturn_p): New function.
2430 (deps_analyze_insn): Update last_function_call_may_noreturn list.
2431 (init_deps): Initialize it.
2432 (remove_from_deps): Also remove calls from
2433 last_function_call_may_noreturn list.
2435 2009-09-07 Richard Henderson <rth@redhat.com>
2437 * tree-ssa-sccvn.c (vn_reference_lookup_3): Don't assume there are
2438 more VR->OPERANDS than LHS operands. Free LHS before returning.
2440 2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com>
2442 * config/bfin/bfin.md (UNSPEC_VOLATILE_STALL): New constant.
2443 (attr "addrtype"): New member "spreg".
2444 Use it if mem_spfp_address_operand is true for the address.
2445 (attr "type"): New entry "stall".
2446 (cpu_unit "load"): New.
2447 (insn_reservations "load32", "loadp", "loadi"): Add reservation of
2449 (insn_reservation "loadsp"): New.
2450 (insn_reservation "load_stall1"): New.
2451 (insn_reservation "load_stall3"): New.
2453 * config/bfin/predicates.md (const1_operand, const3_operand): New.
2454 (mem_p_address_operand): Exclude stack and frame pointer based
2456 (mem_spfp_address_operand): New; match them here.
2457 * config/bfin/bfin.c (add_sched_insns_for_speculation): New function.
2458 (bfin_reorg): Call it if scheduling insns.
2459 (bfin_gen_bundles): Remove dummy insns created by
2460 add_sched_insns_for_speculation.
2462 From Jie Zhang <jie.zhang@analog.com>:
2463 * config/bfin/bfin-protos.h (enum bfin_cpu_type, bfin_cpu_type,
2464 bfin_si_revision, bfin_workarounds): Move these ...
2465 * config/bfin/bfin.h: ... here.
2467 From Mike Frysinger <michael.frysinger@analog.com>
2468 * config/bfin/bfin-protos.h (bfin_cpu_type): Add BFIN_CPU_BF542M,
2469 BFIN_CPU_BF544M, BFIN_CPU_BF547M, BFIN_CPU_BF548M, and BFIN_CPU_BF549M.
2470 * config/bfin/bfin.c (bfin_cpus[]): Add 0.3 for bf542m, bf544m,
2471 bf547m, bf548m, and bf549m.
2472 * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Define __ADSPBF542M__
2473 for BFIN_CPU_BF542M, __ADSPBF544M__ for BFIN_CPU_BF544M,
2474 __ADSPBF547M__ for BFIN_CPU_BF547M, __ADSPBF548M__ for
2475 BFIN_CPU_BF548M, and __ADSPBF549M__ for BFIN_CPU_BF549M.
2476 * config/bfin/t-bfin-elf (MULTILIB_MATCHES): Select bf532-none for
2477 bf542m-none, bf544m-none, bf547m-none, bf548m-none, and bf549m-none.
2478 * config/bfin/t-bfin-linux (MULTILIB_MATCHES): Likewise.
2479 * config/bfin/t-bfin-uclinux (MULTILIB_MATCHES): Likewise.
2480 * doc/invoke.texi (Blackfin Options): Document that -mcpu now accepts
2481 bf542m, bf544m, bf547m, bf548m, and bf549m.
2483 From Jie Zhang <jie.zhang@analog.com>:
2484 * config/bfin/predicates.md (p_register_operand): New predicate.
2485 (dp_register_operand): New predicate.
2486 * config/bfin/bfin-protos.h (WA_05000074): Define.
2487 (ENABLE_WA_05000074): Define.
2488 * config/bfin/bfin.c (bfin_cpus[]): Add WA_05000074 for all cpus.
2489 (bfin_gen_bundles): Put dsp32shiftimm instruction in slot[0].
2490 * config/bfin/bfin.md (define_attr type): Add dsp32shiftimm.
2491 (define_attr addrtype): Allow load/store register to be P register.
2492 (define_attr storereg): New.
2493 (define_cpu_unit anomaly_05000074): New.
2494 (define_insn_reservation dsp32shiftimm): New.
2495 (define_insn_reservation dsp32shiftimm_anomaly_05000074): New.
2496 (define_insn_reservation loadp): Cannot use slot2.
2497 (define_insn_reservation loadsp): Cannot use slot2.
2498 (define_insn_reservation storep): Cannot use slot2. Does not
2499 apply when working around 05000074.
2500 (define_insn_reservation storep_anomaly_05000074): New.
2501 (define_insn_reservation storei): Does not apply when working
2503 (define_insn_reservation storei_anomaly_05000074): New.
2504 (define_attr length): Add dsp32shiftimm case.
2505 (define_insn movsi_insn32, movsi_insv, ashlsi3_insn, ashrsi3,
2506 ror_one, rol_one, lshrsi3, lshrpdi3, ashrpdi3, movhiv2hi_low,
2507 movhiv2hi_high, composev2hi, packv2hi, movv2hi_hi,
2508 ssashiftv2hi3, ssashifthi3, ssashiftsi3, lshiftv2hi3, lshifthi3):
2509 Set type as dsp32shiftimm for dsp32shiftimm alternatives.
2511 2009-09-07 Martin Jambor <mjambor@suse.cz>
2514 * tree-sra.c (create_artificial_child_access): Return NULL if
2515 build_ref_for_offset fails.
2516 (propagate_subacesses_accross_link): Allow build_ref_for_offset
2517 and create_artificial_child_access to fail.
2519 2009-09-06 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2522 * unwind-dw2.c (uw_init_context_1): Mark noinline.
2523 * config/ia64/unwind-ia64.c (uw_init_context_1): Likewise.
2524 * config/xtensa/unwind-dw2-xtensa.c (uw_init_context_1): Likewise.
2526 2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com>
2528 * config/bfin/bfin.c (bfin_optimize_loop): When creating a new basic
2529 block, ensure it has an exit edge. Emit a barrier after a jump.
2531 2009-09-07 Nick Clifton <nickc@redhat.com>
2533 * gcc.c (this_is_linker_script): New variable. Like
2534 this_is_library_file but for the %T constructor.
2535 (end_going_arg): If this_is_linker_script is set then locate the
2536 script and insert a --script switch before it
2537 (do_spec_2): Initialise this_is_linker_script.
2538 (do_spec_1): Likewise. Handle %T construct.
2539 (eval_spec_function): Preserve this_is_linker_script.
2540 * doc/invoke.texi: Document %T construct in spec files.
2541 * config/m32c/m32c.h (LIB_SPEC): Use it.
2543 2009-09-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2545 * rtl.h (PREFETCH_SCHEDULE_BARRIER_P): New macro.
2546 * sched-deps.c (sched_analyze_2): Make prefetches a hard barrier
2547 when volatile flag is set.
2548 * doc/rtl.texi (PREFETCH_SCHEDULE_BARRIER_P): Add documentation pieces.
2550 2009-09-06 Eric Botcazou <ebotcazou@adacore.com>
2553 * combine-stack-adj.c (try_apply_stack_adjustment): Handle stores.
2554 (combine_stack_adjustments_for_block): Allow insns between stack
2555 adjustments and stores with corresponding pre-(dec|inc)rement or
2556 pre-modify operation.
2558 2009-09-06 Jakub Jelinek <jakub@redhat.com>
2561 * combine-stack-adj.c (struct csa_memlist): Rename to...
2562 (struct csa_reflist): ... this. Rename mem field to ref.
2563 (free_csa_memlist): Rename to...
2564 (free_csa_reflist): ... this.
2565 (record_one_stack_memref): Rename to...
2566 (record_one_stack_ref): ... this. Handle also REG_P.
2567 (try_apply_stack_adjustment): Handle also REG_P.
2568 (struct record_stack_memrefs_data): Rename to...
2569 (struct record_stack_refs_data): ... this. Rename memlist field to
2571 (record_stack_memrefs): Rename to...
2572 (record_stack_refs): ... this. For DEBUG_INSNs keep traversing
2573 subexpressions instead of failing when a MEM contains SP references.
2574 For SP itself in DEBUG_INSNs queue it also onto reflist chain.
2575 (combine_stack_adjustments_for_block): Adjust for mem to ref renaming.
2577 2009-09-06 Richard Guenther <rguenther@suse.de>
2580 * tree.c (build_array_type): Do not record types marked
2581 with structural equality in the canonical type hashtable.
2583 2009-09-06 Richard Guenther <rguenther@suse.de>
2586 * tree-ssa-alias.c (refs_may_alias_p_1): Bail out for function decls.
2588 2009-09-05 Richard Guenther <rguenther@suse.de>
2591 * tree-ssa-ccp.c (maybe_fold_stmt_addition): Use the correct type.
2593 2009-09-05 Richard Guenther <rguenther@suse.de>
2596 * tree-ssa-operands.c (get_tmr_operands): Pass through opf_no_vops.
2598 2009-09-05 Richard Guenther <rguenther@suse.de>
2601 * tree-ssa.c (useless_type_conversion_p): Drop qualifiers
2602 before comparing function argument types.
2604 2009-09-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2607 * config/i386/mingw-w64.h (ASM_SPEC): Pass -v instead of -V to
2610 2009-09-04 Uros Bizjak <ubizjak@gmail.com>
2613 2009-08-18 Uros Bizjak <ubizjak@gmail.com>
2615 * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Allocate insn
2616 locators before emit_insn is called.
2618 2009-09-04 Vladimir Makarov <vmakarov@redhat.com>
2621 * ira.c (update_equiv_reg): Revert my previous patch for the PR.
2622 * reginfo.c (resize_reg_info): Call allocate_reg_info if necessary.
2623 (reginfo_init): Don't call allocate_reg_info.
2625 2009-09-04 Uros Bizjak <ubizjak@gmail.com>
2628 * config/alpha/alpha.c (alpha_does_function_need_gp): Use
2629 NONDEBUG_INSN_P instead of INSN_P.
2631 2009-09-04 Alexandre Oliva <aoliva@redhat.com>
2634 * tree-vect-stmts.c (vect_stmt_relevant_p): Skip debug uses.
2636 2009-09-04 Alexandre Oliva <aoliva@redhat.com>
2639 * config/arm/vfp.md (*cmpdf_split_vfp): Fix src mode in the second
2640 pattern of the split.
2642 2009-09-04 Alexandre Oliva <aoliva@redhat.com>
2644 * toplev.c (process_options): Move setter of flag_var_tracking
2645 before other tests that depend on it. Move down setter of
2646 flag_rename_registers. Don't enable var-tracking-assignments
2647 by default if selective scheduling is enabled. Warn if both
2650 2009-09-04 Alexandre Oliva <aoliva@redhat.com>
2652 * var-tracking.c (dv_is_decl_p): Adjust NULL behavior to match
2653 comment. Use switch statement to catch overlaps between rtx
2654 and tree codes. Accept FUNCTION_DECLs in addition to those in...
2655 (IS_DECL_CODE): ... here. Remove.
2656 (check_value_is_not_decl): Remove.
2657 (dv_from_decl, dv_from_value): Check after conversion.
2659 2009-09-04 Richard Guenther <rguenther@suse.de>
2662 * (cgraph_finalize_compilation_unit): Move finalizing aliases
2663 after emitting tunks. Move emitting thunks and ctors from ...
2664 (cgraph_optimize): ... here. Remove redundant
2665 cgraph_analyze_functions.
2666 * varasm.c (find_decl_and_mark_needed): Remove no longer
2668 (finish_aliases_1): Adjust check for thunk aliases.
2670 2009-09-04 Daniel Gutson <dgutson@codesourcery.com>
2672 * config/arm/arm.md (ctzsi2): Added braces
2673 to avoid warning that broke booststrap.
2675 2009-09-04 Martin Jambor <mjambor@suse.cz>
2677 PR tree-optimization/41112
2678 * tree-sra.c (build_ref_for_offset_1): Signal that we cannot
2679 handle variable-bounded arrays.
2680 (expr_with_var_bounded_array_refs_p): New function.
2681 (analyze_access_subtree): Call expr_with_var_bounded_array_refs_p.
2683 2009-09-04 Wolfgang Gellerich <gellerich@de.ibm.com>
2685 * config/s390/2097.md: Removed two incorrect bypasses.
2686 (z10_fsimpdf): Fixed latency.
2687 (z10_fhex): New insn_reservation.
2688 (z10_floaddf): Fixed latency.
2689 (z10_floadsf): Fixed latency.
2690 (z10_ftrunctf): Fixed latency.
2691 (z10_ftruncdf): Fixed latency.
2692 * config/s390/s390.c (z10_cost): Fixed values.
2693 (s390_adjust_priority): Added z10 path.
2694 * config/s390/s390.md (type): Added fhex.
2695 (*mov<mode>_64dfp): Updated type attribute.
2696 (*mov<mode>_64): Updated type attribute.
2697 (*mov<mode>_31): Updated type attribute.
2698 (*mov<mode>"): Likewise.
2699 * config/s390/2084.md (x_fsimpdf): Updated condition.
2701 2009-09-04 Andreas Krebbel <krebbel1@de.ibm.com>
2703 * config/s390/s390.md ("*fmadd<mode>", "*fmsub<mode>"): Enable mem
2704 RTXs in the predicate for operand 1.
2706 2009-09-03 Daniel Gutson <dgutson@codesourcery.com>
2708 * config/arm/arm.md (UNSPEC_RBIT): New constant.
2709 (rbitsi2): New insn.
2710 (ctzsi2): New expand.
2711 * config/arm/arm.h (CTZ_DEFINED_VALUE_AT_ZERO): New macro.
2713 2009-09-03 Martin Jambor <mjambor@suse.cz>
2715 * tree-sra.c (duplicate_expr_for_different_base): Removed.
2716 (create_artificial_child_access): Use build_ref_for_offset instead
2717 of duplicate_expr_for_different_base.
2718 (propagate_subacesses_accross_link): Likewise.
2720 2009-09-03 Richard Sandiford <rdsandiford@googlemail.com>
2722 * config/mips/mips.c (USEFUL_INSN_P): Use NONDEBUG_INSN_P instead
2724 (mips16e_collect_argument_saves): Skip debug instructions.
2725 (mips_74k_agen_init): Use CALL_P || JUMP_P instead of !NONJUMP_INSN_P.
2726 (mips16_lay_out_constants): Use USEFUL_INSN_P instead of INSN_P.
2727 (r10k_insert_cache_barriers): Likewise.
2728 (mips_reorg_process_insns): Likewise.
2730 2009-09-03 Vladimir Makarov <vmakarov@redhat.com>
2733 * ira.c (update_equiv_reg): Remove check on class likely spill.
2735 2009-09-03 Jakub Jelinek <jakub@redhat.com>
2738 * dwarf2out.c (loc_descriptor): Don't use SUBREG_REG macro on
2739 SIGN_EXTEND or ZERO_EXTEND. Don't assume there is a REG inside of
2743 * function.c (assign_parm_find_stack_rtl): Don't set mem attributes on
2744 the stack slot if it is passed by invisible reference.
2745 * var-tracking.c (vt_add_function_parameters): Handle arguments passed
2746 by invisible reference.
2748 2009-09-03 Bernd Schmidt <bernd.schmidt@analog.com>
2750 * config/bfin/linux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
2751 * config/bfin/uclinux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
2752 * config/bfin/bfin.h (TARGET_SUPPORTS_SYNC_CALLS): Provide default of
2754 * config/bfin/sync.md: New file.
2755 * config/bfin/bfin.md: Include it.
2756 (UNSPEC_ATOMIC): New.
2757 (UNSPEC_ONES): Provide a unique number.
2759 From Jie Zhang <jie.zhang@analog.com>:
2760 * config/bfin/bfin.c (ret_regs): New.
2761 (must_save_fp_p): Don't return true because of frame_pointer_needed.
2762 (must_save_rets_p): New.
2763 (n_regs_saved_by_prologue): Use must_save_rets_p instead of
2764 current_function_is_leaf.
2765 (do_link): Likewise.
2766 (do_unlink): Likewise.
2767 (expand_interrupt_handler_prologue): Use ret_regs array.
2768 (expand_interrupt_handler_epilogue): Use ret_regs array and
2769 pass return register to gen_return_internal.
2770 (bfin_expand_epilogue): Pass return register to
2771 gen_return_internal.
2772 (bfin_expand_call): Explicitly clobber RETS.
2773 * config/bfin/bfin.h (FUNCTION_RETURN_REGISTERS): Define.
2774 * config/bfin/bfin.md (call_symbol_fdpic, call_value_symbol_fdpic,
2775 call_insn_fdpic, call_value_insn_fdpic, call_symbol,
2776 call_value_symbol, call_insn, call_value_insn): Explicitly clobber
2778 (return_internal): Take a reg rtx rather than the register number.
2780 2009-09-03 H.J. Lu <hongjiu.lu@intel.com>
2782 * tree-parloops.c (parallelize_loops): Cast to HOST_WIDE_INT
2783 when comparing against estimated_loop_iterations_int return.
2785 2009-09-03 Richard Guenther <rguenther@suse.de>
2787 * dwarf2out.c (dwarf2out_do_cfi_asm): Remove check of
2788 eh_personality_libfunc.
2790 2009-09-03 Razya Ladelsky <razya@il.ibm.com>
2792 * tree-parloops.c (separate_decls_in_region): Add space.
2794 2009-09-03 Razya Ladelsky <razya@il.ibm.com>
2796 * tree-parloops.c (separate_decls_in_region): Change the condition
2797 checking if there are reductions in the loop.
2799 2009-09-03 Razya Ladelsky <razya@il.ibm.com>
2801 PR tree-optimization/38275
2802 * tree-parloops.c (parallelize_loops): Replace profitability condition
2803 for expected number of iterations.
2805 2009-09-03 Alexandre Oliva <aoliva@redhat.com>
2807 * doc/invoke.texi (BUILD_CONFIG): Document --with-build-config.
2808 (bootstrap-debug): Explain conditions in which it becomes default.
2809 (bootstrap-debug-big): Rather than duplicate bootstrap-debug,
2812 2009-09-03 Namhyung Kim <namhyung@gmail.com>
2814 * doc/invoke.texi (Optimize Options): Move
2815 -finline-small-functions to the -O2 list.
2817 2009-09-03 Alexandre Oliva <aoliva@redhat.com>
2819 * toplev.c (process_options): Enable var-tracking-assignments
2820 by default if var-tracking is enabled.
2822 2009-09-02 David Daney <ddaney@caviumnetworks.com>
2824 * cfgbuild.c (find_bb_boundaries): Split blocks containing a
2826 * emit-rtl.c (prev_nonnote_insn_bb): New function.
2827 * rtl.h (prev_nonnote_insn_bb): Declare it.
2829 2009-09-03 Diego Novillo <dnovillo@google.com>
2831 * cgraph.c (cgraph_node_for_decl): New.
2832 * cgraph.h (cgraph_node_for_decl): Declare.
2833 * tree.c (host_integerp): Return 0 if T is NULL.
2835 2009-09-03 Diego Novillo <dnovillo@google.com>
2837 * tree.h (struct alias_pair): Move from varasm.c.
2838 (alias_pairs): Likewise.
2839 (TYPE_MAXVAL): Define.
2840 (TYPE_MINVAL): Define.
2841 (iterative_hash_host_wide_int): Declare.
2842 (remove_unreachable_alias_pairs): Declare.
2843 * tree-pass.h (pass_ipa_free_lang_data): Declare.
2844 * diagnostic.c (default_diagnostic_starter): Make extern.
2845 (default_diagnostic_finalizer): Make extern.
2846 * diagnostic.h (default_diagnostic_starter): Declare.
2847 (default_diagnostic_finalizer): Declare.
2848 (default_tree_printer): Declare.
2849 * toplev.c (default_tree_printer): Make extern.
2851 2009-09-03 Richard Guenther <rguenther@suse.de>
2852 Diego Novillo <dnovillo@google.com>
2854 * cgraph.c (cgraph_add_new_function): Remove gimplification.
2855 * cgraphunit.c (cgraph_expand_function): Do not emit
2856 associated thunks from here.
2857 (cgraph_emit_thunks): New.
2858 (cgraph_optimize): Call it.
2859 Return if any IPA pass finds an error.
2860 * varasm.c (finish_aliases_1): Ignore errorneous aliases used
2863 2009-09-03 Simon Baldwin <simonb@google.com>
2864 Rafael Espindola <espindola@google.com>
2865 Richard Guenther <rguenther@suse.de>
2866 Doug Kwan <dougkwan@google.com>
2867 Diego Novillo <dnovillo@google.com>
2869 * tree.c: Include tree-pass.h, langhooks-def.h,
2870 diagnostic.h, cgraph.h, timevar.h, except.h and debug.h.
2871 (free_lang_data_in_type): New.
2872 (need_assembler_name_p): New.
2873 (free_lang_data_in_block): New.
2874 (free_lang_data_in_decl): New.
2875 (struct free_lang_data_d): New.
2876 (add_tree_to_fld_list): New.
2877 (find_decls_types_r): New.
2878 (get_eh_types_for_runtime): New.
2879 (find_decls_types_in_eh_region): New.
2880 (find_decls_types_in_node): New.
2881 (find_decls_types_in_var): New.
2882 (free_lang_data_in_cgraph): New.
2883 (free_lang_data): New.
2884 (gate_free_lang_data): New.
2885 (pass_ipa_free_lang_data): New.
2887 2009-09-03 Diego Novillo <dnovillo@google.com>
2889 * timevar.def (TV_IPA_FREE_LANG_DATA): Define.
2890 * langhooks.h (struct lang_hooks): Add field free_lang_data.
2891 (lang_hooks): Remove const qualifier.
2892 * ipa.c (cgraph_remove_unreachable_nodes): Call
2893 remove_unreachable_alias_pairs.
2894 * except.c (add_type_for_runtime): Check if TYPE has
2895 already been converted.
2896 (lookup_type_for_runtime): Likewise.
2897 (check_handled): Handle converted types.
2898 * varasm.c (remove_unreachable_alias_pairs): New.
2899 * gimple.c: Include demangle.h.
2900 (gimple_decl_printable_name): New.
2901 (gimple_fold_obj_type_ref): New.
2902 * gimple.h (gimple_decl_printable_name): Declare.
2903 (gimple_fold_obj_type_ref): Declare.
2904 * passes.c (init_optimization_passes): Add pass
2905 pass_ipa_free_lang_data.
2906 * langhooks-def.h (LANG_HOOKS_FREE_LANG_DATA): Define.
2907 (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_FREE_LANG_DATA.
2909 2009-09-03 Diego Novillo <dnovillo@google.com>
2911 * c-lang.c (lang_hooks): Remove const qualifier.
2913 2009-09-02 Loren James Rittle <ljrittle@acm.org>
2915 * doc/install.texi (*-*-freebsd*): Update target information.
2917 2009-09-02 Anatoly Sokolov <aesok@post.ru>
2919 * hard-reg-set.h (call_fixed_regs): Remove.
2920 * reginfo.c (call_fixed_regs): Remove.
2921 (init_reg_sets_1): Remove initialization of call_fixed_regs.
2922 (globalize_reg): Don't use call_fixed_regs.
2923 * caller-save.c (init_caller_save): Use call_fixed_reg_set instead of
2926 2009-09-01 Michael Matz <matz@suse.de>
2928 * expr.h (emit_storent_insn, expand_expr_real_1,
2929 expand_expr_real_2): Declare.
2930 * expr.c (emit_storent_insn, expand_expr_real_1,
2931 expand_expr_real_2): Export.
2932 (store_expr): Setting and evaluating dont_return_target is useless.
2933 (expand_expr_real_1, <case GOTO_EXPR, RETURN_EXPR, SWITCH_EXPR,
2934 LABEL_EXPR and ASM_EXPR>): Move to gcc_unreachable.
2935 * except.c (expand_resx_expr): Rename to ...
2936 (expand_resx_stmt): ... this. Rewrite to take gimple statement.
2937 * except.h (expand_resx_stmt): Declare.
2938 * stmt.c: Add include gimple.h
2939 (expand_asm_expr): Rename to ...
2940 (expand_asm_stmt): ... this. Rewrite to take gimple statement.
2941 (expand_case): Rewrite to take gimple statement.
2942 * tree.h (expand_asm_stmt): Declare.
2943 (expand_case): Change prototype.
2944 * Makefile.in (stmt.o): Depend on gimple.h.
2945 * builtins.c (expand_builtin_synchronize): Build gimple asm
2946 statement, not an ASM_EXPR.
2947 * cfgexpand.c (gimple_cond_pred_to_tree, set_expr_location_r,
2948 gimple_to_tree, release_stmt_tree): Remove.
2949 (expand_gimple_cond): Don't call gimple_cond_pred_to_tree or
2950 ggc_free, but hold comparison code and operands separately.
2951 Call jumpif_1 and jumpifnot_1 instead of jumpif and jumpifnot.
2952 (expand_call_stmt, expand_gimple_stmt_1,
2953 expand_gimple_stmt): New helpers.
2954 (expand_gimple_tailcall): Don't call gimple_to_tree, expand_expr_stmt,
2955 release_stmt_tree. Call expand_gimple_stmt instead.
2956 (expand_gimple_basic_block): Ditto.
2958 * calls.c (emit_call_1): Don't look at EH regions here, make
2959 fntree parameter useless.
2960 (expand_call): New local rettype for TREE_TYPE(exp), use it
2961 throughout. Remove local p, use addr instead.
2962 Don't look at EH regions here.
2964 2009-09-02 Vladimir Makarov <vmakarov@redhat.com>
2966 * doc/invoke.texi (-fsched-pressure): Document it.
2967 (-fsched-reg-pressure-heuristic): Remove it.
2969 * reload.c (ira.h): Include.
2970 (find_reloads): Add choosing reload on number of small spilled
2973 * haifa-sched.c (ira.h): Include.
2974 (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure,
2975 saved_reg_pressure, curr_reg_live, saved_reg_live,
2976 region_ref_regs): New variables.
2977 (sched_init_region_reg_pressure_info, mark_regno_birth_or_death,
2978 initiate_reg_pressure_info, setup_ref_regs,
2979 initiate_bb_reg_pressure_info, save_reg_pressure,
2980 restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New
2982 (setup_insn_reg_pressure_info): New function.
2983 (rank_for_schedule): Add pressure checking and insn issue time.
2984 Remove comparison of insn reg weights.
2985 (ready_sort): Set insn reg pressure info.
2986 (update_register_pressure, setup_insn_max_reg_pressure,
2987 update_reg_and_insn_max_reg_pressure,
2988 sched_setup_bb_reg_pressure_info): New functions.
2989 (schedule_insn): Add code for printing and updating reg pressure info.
2990 (find_set_reg_weight, find_insn_reg_weight): Remove.
2991 (ok_for_early_queue_removal): Do nothing if pressure_only_p.
2992 (debug_ready_list): Print reg pressure info.
2993 (schedule_block): Ditto. Check insn issue time.
2994 (sched_init): Set up sched_pressure_p. Allocate and set up some
2995 reg pressure related info.
2996 (sched_finish): Free some reg pressure related info.
2997 (fix_tick_ready): Make insn always ready if pressure_p.
2998 (init_h_i_d): Don't call find_insn_reg_weight.
2999 (haifa_finish_h_i_d): Free insn reg pressure info.
3001 * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
3002 ira_memory_move_cost, ira_class_hard_regs,
3003 ira_class_hard_regs_num, ira_no_alloc_regs,
3004 ira_available_class_regs, ira_reg_class_cover_size,
3005 ira_reg_class_cover, ira_class_translate): Move to ira.h.
3007 * ira-lives.c (single_reg_class): Check mode to find how many
3008 registers are necessary for operand.
3009 (ira_implicitly_set_insn_hard_regs): New.
3011 * common.opt (fsched-pressure): New options.
3012 (fsched-reg-pressure-heuristic): Remove.
3014 * ira.c (setup_eliminable_regset): Rename to
3015 ira_setup_eliminable_regset. Make it external.
3016 (expand_reg_info): Pass cover class to setup_reg_classes.
3017 (ira): Call resize_reg_info instead of allocate_reg_info.
3019 * sched-deps.c: Include ira.h.
3020 (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New.
3021 (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses,
3022 reg_pressure_info, insn_use_p, mark_insn_pseudo_birth,
3023 mark_insn_hard_regno_birth, mark_insn_reg_birth,
3024 mark_pseudo_death, mark_hard_regno_death, mark_reg_death,
3025 mark_insn_reg_store, mark_insn_reg_clobber,
3026 setup_insn_reg_pressure_info): New.
3027 (sched_analyze_1): Update implicit_reg_pending_uses.
3028 (sched_analyze_insn): Find implicit sets, uses, clobbers of regs.
3029 Use them to create dependencies. Set insn reg uses and pressure
3030 info. Process reg_pending_uses in one place.
3031 (free_deps): Free implicit sets.
3032 (remove_from_deps): Remove implicit sets if necessary. Check
3033 implicit sets when clearing reg_last_in_use.
3034 (init_deps_global): Clear implicit_reg_pending_clobbers and
3035 implicit_reg_pending_uses.
3037 * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
3038 ira_memory_move_cost, ira_class_hard_regs,
3039 ira_class_hard_regs_num, ira_no_alloc_regs,
3040 ira_available_class_regs, ira_reg_class_cover_size,
3041 ira_reg_class_cover, ira_class_translate): Move from ira-int.h.
3042 (ira_setup_eliminable_regset, ira_set_pseudo_classes,
3043 ira_implicitly_set_insn_hard_regs): New prototypes.
3045 * ira-costs.c (pseudo_classes_defined_p, allocno_p,
3046 cost_elements_num): New variables.
3047 (allocno_costs, total_costs): Rename to costs and
3048 total_allocno_costs.
3049 (COSTS_OF_ALLOCNO): Rename to COSTS.
3050 (allocno_pref): Rename to pref.
3051 (allocno_pref_buffer): Rename to pref_buffer.
3052 (common_classes): Rename to regno_cover_class.
3054 (record_reg_classes): Set allocno attributes only if allocno_p.
3055 (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM.
3056 (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM
3057 and COSTS_OF_ALLOCNO.
3058 (print_costs): Rename to print_allocno_costs.
3059 (print_pseudo_costs): New.
3060 (process_bb_node_for_costs): Split into 2 functions with new
3061 function process_bb_for_costs. Pass BB to process_bb_for_costs.
3062 (find_allocno_class_costs): Rename to find_costs_and_classes. Add
3063 new parameter dump_file. Use cost_elements_num instead of
3064 ira_allocnos_num. Make one iteration if preferred classes were
3065 already calculated for scheduler. Make 2 versions of code
3066 depending on allocno_p.
3067 (setup_allocno_cover_class_and_costs): Check allocno_p. Use
3068 regno_cover_class and COSTS instead of common_classes and
3070 (init_costs, finish_costs): New.
3071 (ira_costs): Set up allocno_p and cost_elements_num. Call
3072 init_costs and finish_costs.
3073 (ira_set_pseudo_classes): New.
3075 * rtl.h (allocate_reg_info): Remove.
3076 (resize_reg_info): Change return type.
3077 (reg_cover_class): New.
3078 (setup_reg_classes): Add new parameter.
3080 * sched-int.h (struct deps_reg): New member implicit_sets.
3081 (sched_pressure_p, sched_regno_cover_class): New external definitions.
3082 (INCREASE_BITS): New macro.
3083 (struct reg_pressure_data, struct reg_use_data): New.
3084 (struct _haifa_insn_data): Remove reg_weight. Add members
3085 reg_pressure, reg_use_list, reg_set_list, and
3086 reg_pressure_excess_cost_change.
3087 (struct deps): New member implicit_sets.
3088 (pressure_p): New variable.
3089 (COVER_CLASS_BITS, INCREASE_BITS): New macros.
3090 (struct reg_pressure_data, struct reg_use_data): New.
3091 (INSN_REG_WEIGHT): Remove.
3092 (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST,
3093 INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros.
3094 (sched_init_region_reg_pressure_info,
3095 sched_setup_bb_reg_pressure_info): New prototypes.
3097 * reginfo.c (struct reg_pref): New member coverclass.
3098 (reg_cover_class): New function.
3099 (reginfo_init, pass_reginfo_init): Move after free_reg_info.
3100 (reg_info_size): New variable.
3101 (allocate_reg_info): Make static. Setup reg_info_size.
3102 (resize_reg_info): Use reg_info_size. Return flag of resizing.
3103 (setup_reg_classes): Add a new parameter. Setup cover class too.
3105 * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to
3108 * sched-rgn.c (deps_join): Set up implicit_sets.
3109 (schedule_region): Set up region and basic blocks pressure
3112 * passes.c (init_optimization_passes): Move
3113 pass_subregs_of_mode_init before pass_sched.
3115 2009-09-02 Martin Jambor <mjambor@suse.cz>
3117 * tree-sra.c (struct access): New field grp_hint.
3118 (dump_access): Dump grp_hint.
3119 (sort_and_splice_var_accesses): Set grp_hint if a group is read
3121 (analyze_access_subtree): Only scalarize accesses with grp_hint set or
3122 those which have been specifically read and somehow written to.
3123 (propagate_subacesses_accross_link): Set grp_hint of right child and
3124 also possibly of the left child.
3126 2009-09-02 Jakub Jelinek <jakub@redhat.com>
3128 * tree-object-size.c (addr_object_size): Always use object_size_type
3129 0 or 2 when determining the pointer pointed object size.
3131 2009-09-02 Richard Guenther <rguenther@suse.de>
3134 2009-08-31 Richard Guenther <rguenther@suse.de>
3136 * builtins.c (fold_builtin_memory_op): Use the alias oracle
3137 to query if the memory regions for memmove overlap.
3138 * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Relax the
3139 asserts on pointers, instead deal with odd trees.
3140 (ptr_derefs_may_alias_p): Likewise.
3141 (refs_may_alias_p_1): Constructor bases also never alias.
3143 2009-08-01 Christian Bruel <christian.bruel@st.com>
3146 2009-07-31 Christian Bruel <christian.bruel@st.com>
3147 * gcc/config.gcc (sh*-*-elf): test with_libgloss.
3149 2009-09-01 Alexandre Oliva <aoliva@redhat.com>
3151 * doc/invoke.texi (-fvar-tracking-assignments): New.
3152 (-fvar-tracking-assignments-toggle): New.
3153 (-fdump-final-insns=file): Mark filename as optional.
3154 (--param min-nondebug-insn-uid): New.
3155 (-gdwarf-@{version}): Mention version 4.
3156 * opts.c (common_handle_option): Accept it.
3157 * tree-vrp.c (find_assert_locations_1): Skip debug stmts.
3158 * regrename.c (regrename_optimize): Drop last. Don't count debug
3159 insns as uses. Don't reject change because of debug insn.
3160 (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno
3161 from the chain starter, and check for inexact matches in DEBUG_INSNS.
3162 (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs.
3163 (build_def_use): Simplify and fix the marking of DEBUG_INSNs.
3164 * sched-ebb.c (schedule_ebbs): Skip boundary debug insns.
3165 * fwprop.c (forward_propagate_and_simplify): ...into debug insns.
3166 * doc/gimple.texi (is_gimple_debug): New.
3167 (gimple_debug_bind_p): New.
3168 (is_gimple_call, gimple_assign_cast_p): End sentence with period.
3169 * doc/install.texi (bootstrap-debug): More details.
3170 (bootstrap-debug-big, bootstrap-debug-lean): Document.
3171 (bootstrap-debug-lib): More details.
3172 (bootstrap-debug-ckovw): Update.
3173 (bootstrap-time): New.
3174 * tree-into-ssa.c (mark_def_sites): Skip debug stmts.
3175 (insert_phi_nodes_for): Insert debug stmts.
3176 (rewrite_stmt): Take iterator. Insert debug stmts.
3177 (rewrite_enter_block): Adjust.
3178 (maybe_replace_use_in_debug_stmt): New.
3179 (rewrite_update_stmt): Use it.
3180 (mark_use_interesting): Return early for debug stmts.
3181 * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug
3182 stmts before replacing stmt.
3183 (move_computations_stmt): Likewise.
3184 * ira-conflicts.c (add_copies): Skip debug insns.
3185 * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns.
3186 (regstat_bb_compute_ri): Skip debug insns.
3187 * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts.
3188 * tree-ssa-loop-manip.c (find_uses_to_rename_stmt,
3189 check_loop_closed_ssa_stmt): Skip debug stmts.
3190 * tree-tailcall.c (find_tail_calls): Likewise.
3191 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise.
3192 * tree.h (MAY_HAVE_DEBUG_STMTS): New.
3193 (build_var_debug_value_stat): Declare.
3194 (build_var_debug_value): Define.
3195 (target_for_debug_bind): Declare.
3196 * reload.c (find_equiv_reg): Skip debug insns.
3197 * rtlanal.c (reg_used_between_p): Skip debug insns.
3198 (side_effects_p): Likewise.
3199 (canonicalize_condition): Likewise.
3200 * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug
3201 insns never depend on debug insns.
3202 (create_ddg_dep_no_link): Likewise.
3203 (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns.
3204 Don't add inter-loop dependencies for debug insns.
3205 (build_intra_loop_deps): Likewise.
3206 (create_ddg): Count debug insns.
3207 * ddg.h (struct ddg::num_debug): New.
3208 (num_backargs): Pair up with previous int field.
3209 * diagnostic.c (diagnostic_report_diagnostic): Skip notes on
3210 -fcompare-debug-second.
3211 * final.c (get_attr_length_1): Skip debug insns.
3212 (rest_of_clean-state): Don't dump CFA_RESTORE_STATE.
3213 * gcc.c (invoke_as): Call compare-debug-dump-opt.
3214 (driver_self_specs): Map -fdump-final-insns to
3215 -fdump-final-insns=..
3216 (get_local_tick): New.
3217 (compare_debug_dump_opt_spec_function): Test for . argument and
3218 compute output name. Compute temp output spec without flag name.
3219 Compute -frandom-seed.
3220 (OPT): Undef after use.
3221 * cfgloopanal.c (num_loop_insns): Skip debug insns.
3222 (average_num_loop_insns): Likewise.
3223 * params.h (MIN_NONDEBUG_INSN_UID): New.
3224 * gimple.def (GIMPLE_DEBUG): New.
3225 * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts.
3226 * auto-inc-dec.c (merge_in_block): Skip debug insns.
3227 (merge_in_block): Fix whitespace.
3228 * toplev.c (flag_var_tracking): Update comment.
3229 (flag_var_tracking_assignments): New.
3230 (flag_var_tracking_assignments_toggle): New.
3231 (process_options): Don't open final insns dump file if we're not
3232 going to write to it. Compute defaults for var_tracking.
3233 * df-scan.c (df_insn_rescan_debug_internal): New.
3234 (df_uses_record): Handle debug insns.
3235 * haifa-sched.c (ready): Initialize n_debug.
3236 (contributes_to_priority): Skip debug insns.
3237 (dep_list_size): New.
3239 (rank_for_schedule): Likewise. Schedule debug insns as soon as
3240 they're ready. Disregard previous debug insns to make decisions.
3241 (queue_insn): Never queue debug insns.
3242 (ready_add, ready_remove_first, ready_remove): Count debug insns.
3243 (schedule_insn): Don't reject debug insns because of issue rate.
3244 (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns.
3245 (queue_to_ready): Skip and discount debug insns.
3246 (choose_ready): Let debug insns through.
3247 (schedule_block): Check boundary debug insns. Discount debug
3248 insns, schedule them early. Adjust whitespace.
3249 (set_priorities): Check for boundary debug insns.
3250 (add_jump_dependencies): Use dep_list_size.
3251 (prev_non_location_insn): New.
3252 (check_cfg): Use it.
3253 * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug
3255 (remove_unused_ivs): Reset debug stmts.
3256 * modulo-sched.c (const_iteration_count): Skip debug insns.
3257 (res_MII): Discount debug insns.
3258 (loop_single_full_bb_p): Skip debug insns.
3259 (sms_schedule): Likewise.
3260 (sms_schedule_by_order): Likewise.
3261 (ps_has_conflicts): Likewise.
3262 * caller-save.c (refmarker_fn): New.
3263 (save_call_clobbered_regs): Replace regs with saved mem in
3265 (mark_referenced_regs): Take pointer, mark and arg. Adjust.
3266 Call refmarker_fn mark for hardregnos.
3267 (mark_reg_as_referenced): New.
3268 (replace_reg_with_saved_mem): New.
3269 * ipa-pure-const.c (check_stmt): Skip debug stmts.
3270 * cse.c (cse_insn): Canonicalize debug insns. Skip them when
3272 (cse_extended_basic_block): Skip debug insns.
3273 (count_reg_usage): Likewise.
3274 (is_dead_reg): New, split out of...
3275 (set_live_p): ... here.
3276 (insn_live_p): Use it for debug insns.
3277 * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts.
3278 (execute_optimize_stdarg): Likewise.
3279 * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise.
3280 * tree-ssa-propagate.c (substitute_and_fold): Don't regard
3281 changes in debug stmts as changes.
3282 * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New.
3283 (moveup_expr): Don't move across debug insns. Don't move
3284 debug insn if it would create a bookkeeping block.
3285 (moveup_expr_cached): Don't use cache for debug insns that
3286 are heads of blocks.
3287 (compute_av_set_inside_bb): Skip debug insns.
3288 (sel_rank_for_schedule): Schedule debug insns first. Remove
3290 (block_valid_for_bookkeeping_p); Support lax searches.
3291 (create_block_for_bookkeeping): Adjust block numbers when
3292 encountering debug-only blocks.
3293 (find_place_for_bookkeeping): Deal with debug-only blocks.
3294 (generate_bookkeeping_insn): Accept no place to insert.
3295 (remove_temp_moveop_nops): New argument full_tidying.
3296 (prepare_place_to_insert): Deal with debug insns.
3297 (advance_state_on_fence): Debug insns don't start cycles.
3298 (update_boundaries): Take fence as argument. Deal with
3300 (schedule_expr_on_boundary): No full_tidying on debug insns.
3301 (fill_insns): Deal with debug insns.
3302 (track_scheduled_insns_and_blocks): Don't count debug insns.
3303 (need_nop_to_preserve_insn_bb): New, split out of...
3304 (remove_insn_from_stream): ... this.
3305 (fur_orig_expr_not_found): Skip debug insns.
3306 * rtl.def (VALUE): Move up.
3308 * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts.
3309 (nearest_common_dominator_of_uses): Take debug_stmts argument.
3310 Set it if debug stmts are found.
3311 (statement_sink_location): Skip debug stmts. Propagate
3312 moving defs into debug stmts.
3313 * ifcvt.c (first_active_insn): Skip debug insns.
3314 (last_active_insns): Likewise.
3315 (cond_exec_process_insns): Likewise.
3316 (noce_process_if_block): Likewise.
3317 (check_cond_move_block): Likewise.
3318 (cond_move_convert_if_block): Likewise.
3319 (block_jumps_and_fallthru_p): Likewise.
3320 (dead_or_predicable): Likewise.
3321 * dwarf2out.c (debug_str_hash_forced): New.
3322 (find_AT_string): Add comment.
3323 (gen_label_for_indirect_string): New.
3324 (get_debug_string_label): New.
3325 (AT_string_form): Use it.
3326 (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV,
3327 MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but
3328 discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and
3329 several operations that cannot be represented with DWARF opcodes.
3330 (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require
3331 dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value.
3332 (dwarf2out_var_location): Take during-call mark into account.
3333 (output_indirect_string): Update comment. Output if there are
3334 label and references.
3335 (prune_indirect_string): New.
3336 (prune_unused_types): Call it if debug_str_hash_forced.
3337 More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>:
3338 (dw_long_long_const): Remove.
3339 (struct dw_val_struct): Change val_long_long type to rtx.
3340 (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for
3341 val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair.
3342 (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each
3343 component instead of HOST_BITS_PER_LONG.
3344 (output_loc_operands): Likewise. For const8* assert
3345 HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64.
3346 (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT
3347 rather than HOST_BITS_PER_LONG is >= 64.
3348 (add_AT_long_long): Remove val_hi and val_lo arguments, add
3350 (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of
3351 HOST_BITS_PER_LONG for dw_val_class_long_long.
3352 (add_const_value_attribute): Adjust add_AT_long_long caller. Don't
3353 handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse.
3354 (dwarf_stack_op_name): Handle DW_OP_implicit_value and
3356 (size_of_loc_descr, output_loc_operands, output_loc_operands_raw):
3357 Handle DW_OP_implicit_value.
3358 (extract_int): Move prototype earlier.
3359 (mem_loc_descriptor): For SUBREG punt if inner
3360 mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND
3361 and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle
3362 EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN,
3363 UMAX, SIGN_EXTRACT, ZERO_EXTRACT.
3364 (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE
3365 instead of Pmode size.
3366 (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE,
3367 CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode,
3368 attempt to handle other expressions. Don't handle TLS SYMBOL_REFs.
3369 (concat_loc_descriptor, concatn_loc_descriptor,
3370 loc_descriptor_from_tree_1): Adjust loc_descriptor callers.
3371 (add_location_or_const_value_attribute): Likewise. For single
3372 location loc_lists attempt to use add_const_value_attribute
3373 for constant decls. Add DW_AT_const_value even if
3374 NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING
3376 * cfgbuild.c (inside_basic_block_p): Handle debug insns.
3377 (control_flow_insn_p): Likewise.
3378 * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt.
3379 (separate_decls_in_region_debug_bind): New.
3380 (separate_decls_in_region): Process debug bind stmts afterwards.
3381 * recog.c (verify_changes): Handle debug insns.
3382 (extract_insn): Likewise.
3383 (peephole2_optimize): Skip debug insns.
3384 * dse.c (scan_insn): Skip debug insns.
3385 * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument.
3387 (setup_id_for_insn): Handle debug insns.
3388 (maybe_tidy_empty_bb): Adjust whitespace.
3389 (tidy_control_flow): Skip debug insns.
3390 (sel_remove_insn): Adjust for debug insns.
3391 (sel_estimate_number_of_insns): Skip debug insns.
3392 (create_insn_rtx_from_pattern): Handle debug insns.
3393 (create_copy_of_insn_rtx): Likewise.
3394 * sel-sched-.h (sel_bb_end): Declare.
3395 (sel_bb_empty_or_nop_p): New.
3396 (get_all_loop_exits): Use it.
3397 (_eligible_successor_edge_p): Likewise.
3398 (return_nop_to_pool): Adjust.
3399 * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts.
3400 * ira-lives.c (process_bb_node_lives): Skip debug insns.
3401 * gimple-pretty-print.c (dump_gimple_debug): New.
3402 (dump_gimple_stmt): Use it.
3403 (dump_bb_header): Skip gimple debug stmts.
3404 * regmove.c (optimize_reg_copy_1): Discount debug insns.
3405 (fixup_match_2): Likewise.
3406 (regmove_backward_pass): Likewise. Simplify combined
3407 replacement. Handle debug insns.
3408 * function.c (instantiate_virtual_regs): Handle debug insns.
3409 * function.h (struct emit_status): Add x_cur_debug_insn_uid.
3410 * print-rtl.h: Include cselib.h.
3411 (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs.
3412 * df.h (df_inns_rescan_debug_internal): Declare.
3413 * gcse.c (alloc_hash_table): Estimate n_insns.
3414 (cprop_insn): Don't regard debug insns as changes.
3415 (bypass_conditional_jumps): Skip debug insns.
3416 (one_pre_gcse_pass): Adjust.
3417 (one_code_hoisting_pass): Likewise.
3418 (compute_ld_motion_mems): Skip debug insns.
3419 (one_cprop_pass): Adjust.
3420 * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts.
3421 (if_convertible_stmt_p): Handle debug stmts.
3422 * init-regs.c (initialize_uninitialized_regs): Skip debug insns.
3423 * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts.
3424 * ira-build.c (create_bb_allocnos): Skip debug insns.
3425 * tree-flow-inline.h (has_zero_uses): Discount debug stmts.
3426 (has_single_use): Likewise.
3427 (single_imm_use): Likewise.
3428 (num_imm_uses): Likewise.
3429 * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts.
3430 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts.
3431 (create_outofssa_var_map): Likewise.
3432 * lower-subreg.c (adjust_decomposed_uses): New.
3433 (resolve_debug): New.
3434 (decompose_multiword_subregs): Use it.
3435 * tree-dfa.c (find_referenced_vars): Skip debug stmts.
3436 * emit-rtl.c: Include params.h.
3437 (cur_debug_insn_uid): Define.
3438 (set_new_first_and_last_insn): Set cur_debug_insn_uid too.
3439 (copy_rtx_if_shared_1): Handle debug insns.
3440 (reset_used_flags): Likewise.
3441 (set_used_flags): LIkewise.
3442 (get_max_insn_count): New.
3443 (next_nondebug_insn): New.
3444 (prev_nondebug_insn): New.
3445 (make_debug_insn_raw): New.
3446 (emit_insn_before_noloc): Handle debug insns.
3447 (emit_jump_insn_before_noloc): Likewise.
3448 (emit_call_insn_before_noloc): Likewise.
3449 (emit_debug_insn_before_noloc): New.
3450 (emit_insn_after_noloc): Handle debug insns.
3451 (emit_jump_insn_after_noloc): Likewise.
3452 (emit_call_insn_after_noloc): Likewise.
3453 (emit_debug_insn_after_noloc): Likewise.
3454 (emit_insn_after): Take loc from earlier non-debug insn.
3455 (emit_jump_insn_after): Likewise.
3456 (emit_call_insn_after): Likewise.
3457 (emit_debug_insn_after_setloc): New.
3458 (emit_debug_insn_after): New.
3459 (emit_insn_before): Take loc from later non-debug insn.
3460 (emit_jump_insn_before): Likewise.
3461 (emit_call_insn_before): Likewise.
3462 (emit_debug_insn_before_setloc): New.
3463 (emit_debug_insn_before): New.
3464 (emit_insn): Handle debug insns.
3465 (emit_debug_insn): New.
3466 (emit_jump_insn): Handle debug insns.
3467 (emit_call_insn): Likewise.
3469 (init_emit): Take min-nondebug-insn-uid into account.
3470 Initialize cur_debug_insn_uid.
3471 (emit_copy_of_insn_after): Handle debug insns.
3472 * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite
3473 location of single rhs in place.
3474 (maybe_dump_rtl_for_gimple_stmt): Dump lineno.
3475 (floor_sdiv_adjust): New.
3476 (cell_sdiv_adjust): New.
3477 (cell_udiv_adjust): New.
3478 (round_sdiv_adjust): New.
3479 (round_udiv_adjust): New.
3480 (wrap_constant): Moved from cselib.
3481 (unwrap_constant): New.
3482 (expand_debug_expr): New.
3483 (expand_debug_locations): New.
3484 (expand_gimple_basic_block): Drop hiding redeclaration. Expand
3486 (gimple_expand_cfg): Expand debug locations.
3487 * cselib.c: Include tree-pass.h.
3488 (struct expand_value_data): New.
3489 (cselib_record_sets_hook): New.
3490 (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New.
3491 (cselib_clear_table): Move, and implemnet in terms of...
3492 (cselib_reset_table_with_next_value): ... this.
3493 (cselib_get_next_unknown_value): New.
3494 (discard_useless_locs): Don't discard preserved values.
3495 (cselib_preserve_value): New.
3496 (cselib_preserved_value_p): New.
3497 (cselib_preserve_definitely): New.
3498 (cselib_clear_preserve): New.
3499 (cselib_preserve_only_values): New.
3500 (new_cselib_val): Take rtx argument. Dump it in details.
3501 (cselib_lookup_mem): Adjust.
3502 (expand_loc): Take regs_active in struct. Adjust. Silence
3503 dumps unless details are requested.
3504 (cselib_expand_value_rtx_cb): New.
3505 (cselib_expand_value_rtx): Rename and reimplment in terms of...
3506 (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps
3507 without details. Copy more subregs. Try to resolve values
3508 using a callback. Wrap constants.
3509 (cselib_subst_to_values): Adjust.
3510 (cselib_log_lookup): New.
3511 (cselib_lookup): Call it.
3512 (cselib_invalidate_regno): Don't count preserved values as useless.
3513 (cselib_invalidate_mem): Likewise.
3514 (cselib_record_set): Likewise.
3515 (struct set): Renamed to cselib_set, moved to cselib.h.
3516 (cselib_record_sets): Adjust. Call hook.
3517 (cselib_process_insn): Reset table when it would be cleared.
3518 (dump_cselib_val): New.
3519 (dump_cselib_table): New.
3520 * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts.
3521 (remove_forwarder_block): Support moving debug stmts.
3522 * cselib.h (cselib_record_sets_hook): Declare.
3523 (cselib_expand_callback): New type.
3524 (cselib_expand_value_rtx_cb): Declare.
3525 (cselib_reset_table_with_next_value): Declare.
3526 (cselib_get_next_unknown_value): Declare.
3527 (cselib_preserve_value): Declare.
3528 (cselib_preserved_value_p): Declare.
3529 (cselib_preserve_only_values): Declare.
3530 (dump_cselib_table): Declare.
3531 * cfgcleanup.c (flow_find_cross_jump): Skip debug insns.
3532 (try_crossjump_to_edge): Likewise.
3533 (delete_unreachable_blocks): Remove dominant GIMPLE blocks after
3534 dominated blocks when debug stmts are present.
3535 * simplify-rtx.c (delegitimize_mem_from_attrs): New.
3536 * tree-ssa-live.c (remove_unused_locals): Skip debug stmts.
3537 (set_var_live_on_entry): Likewise.
3538 * loop-invariant.c (find_invariants_bb): Skip debug insns.
3539 * cfglayout.c (curr_location, last_location): Make static.
3540 (set_curr_insn_source_location): Don't avoid bouncing.
3541 (get_curr_insn_source_location): New.
3542 (get_curr_insn_block): New.
3543 (duplicate_insn_chain): Handle debug insns.
3544 * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate
3546 * common.opt (fcompare-debug): Move to sort order.
3547 (fdump-unnumbered-links): Likewise.
3548 (fvar-tracking-assignments): New.
3549 (fvar-tracking-assignments-toggle): New.
3550 * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks
3551 because of debug stmts.
3552 (mark_stmt_if_obviously_necessary): Mark debug stmts.
3553 (eliminate_unnecessary_stmts): Walk dominated blocks before
3555 * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts.
3556 * ira.c (memref_used_between_p): Skip debug insns.
3557 (update_equiv_regs): Likewise.
3558 * sched-deps.c (sd_lists_size): Accept empty list.
3559 (sd_init_insn): Mark debug insns.
3560 (sd_finish_insn): Unmark them.
3561 (sd_add_dep): Reject non-debug deps on debug insns.
3562 (fixup_sched_groups): Give debug insns group treatment.
3564 (sched_analyze_reg): Don't mark debug insns for sched before call.
3565 (sched_analyze_2): Handle debug insns.
3566 (sched_analyze_insn): Compute next non-debug insn. Handle debug
3568 (deps_analyze_insn): Handle debug insns.
3569 (deps_start_bb): Skip debug insns.
3570 (init_deps): Initialize last_debug_insn.
3571 * tree-ssa.c (target_for_debug_bind): New.
3572 (find_released_ssa_name): New.
3573 (propagate_var_def_into_debug_stmts): New.
3574 (propagate_defs_into_debug_stmts): New.
3575 (verify_ssa): Skip debug bind stmts without values.
3576 (warn_uninialized_vars): Skip debug stmts.
3577 * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default.
3578 * rtl.c (rtx_equal_p_cb): Handle VALUEs.
3579 (rtx_equal_p): Likewise.
3580 * ira-costs.c (scan_one_insn): Skip debug insns.
3581 (process_bb_node_for_hard_reg_moves): Likewise.
3582 * rtl.h (DEBUG_INSN_P): New.
3583 (NONDEBUG_INSN_P): New.
3584 (MAY_HAVE_DEBUG_INSNS): New.
3585 (INSN_P): Accept debug insns.
3586 (RTX_FRAME_RELATED_P): Likewise.
3587 (INSN_DELETED_P): Likewise
3588 (PAT_VAR_LOCATION_DECL): New.
3589 (PAT_VAR_LOCATION_LOC): New.
3590 (PAT_VAR_OCATION_STATUS): New.
3591 (NOTE_VAR_LOCATION_DECL): Reimplement.
3592 (NOTE_VAR_LOCATION_LOC): Likewise.
3593 (NOTE_VAR_LOCATION_STATUS): Likewise.
3594 (INSN_VAR_LOCATION): New.
3595 (INSN_VAR_LOCATION_DECL): New.
3596 (INSN_VAR_LOCATION_LOC): New.
3597 (INSN_VAR_LOCATION_STATUS): New.
3598 (gen_rtx_UNKNOWN_VAR_LOC): New.
3599 (VAR_LOC_UNKNOWN_P): New.
3600 (NOTE_DURING_CALL_P): New.
3601 (SCHED_GROUP_P): Accept debug insns.
3602 (emit_debug_insn_before): Declare.
3603 (emit_debug_insn_before_noloc): Declare.
3604 (emit_debug_insn_beore_setloc): Declare.
3605 (emit_debug_insn_after): Declare.
3606 (emit_debug_insn_after_noloc): Declare.
3607 (emit_debug_insn_after_setloc): Declare.
3608 (emit_debug_insn): Declare.
3609 (make_debug_insn_raw): Declare.
3610 (prev_nondebug_insn): Declare.
3611 (next_nondebug_insn): Declare.
3612 (delegitimize_mem_from_attrs): Declare.
3613 (get_max_insn_count): Declare.
3614 (wrap_constant): Declare.
3615 (unwrap_constant): Declare.
3616 (get_curr_insn_source_location): Declare.
3617 (get_curr_insn_block): Declare.
3618 * tree-inline.c (insert_debug_decl_map): New.
3619 (processing_debug_stmt): New.
3620 (remap_decl): Don't create new mappings in debug stmts.
3621 (remap_gimple_op_r): Don't add references in debug stmts.
3622 (copy_tree_body_r): Likewise.
3623 (remap_gimple_stmt): Handle debug bind stmts.
3624 (copy_bb): Skip debug stmts.
3625 (copy_edges_for_bb): Likewise.
3626 (copy_debug_stmt): New.
3627 (copy_debug_stmts): New.
3628 (copy_body): Copy debug stmts at the end.
3629 (insert_init_debug_bind): New.
3630 (insert_init_stmt): Take id. Skip and emit debug stmts.
3631 (setup_one_parameter): Remap variable earlier, register debug mapping.
3632 (estimate_num_insns): Skip debug stmts.
3633 (expand_call_inline): Preserve debug_map.
3634 (optimize_inline_calls): Check for no debug_stmts left-overs.
3635 (unsave_expr_now): Preserve debug_map.
3636 (copy_gimple_seq_and_replace_locals): Likewise.
3637 (tree_function_versioning): Check for no debug_stmts left-overs.
3638 Init and destroy debug_map as needed. Split edges unconditionally.
3639 (build_duplicate_type): Init and destroy debug_map as needed.
3640 * tree-inline.h: Include gimple.h instead of pointer-set.h.
3641 (struct copy_body_data): Add debug_stmts and debug_map.
3642 * sched-int.h (struct ready_list): Add n_debug.
3643 (struct deps): Add last_debug_insn.
3644 (DEBUG_INSN_SCHED_P): New.
3645 (BOUNDARY_DEBUG_INSN_P): New.
3646 (SCHEDULE_DEBUG_INSN_P): New.
3647 (sd_iterator_cond): Accept empty list.
3648 * combine.c (create_log_links): Skip debug insns.
3649 (combine_instructions): Likewise.
3650 (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the
3651 return value is always unshared.
3652 (struct rtx_subst_pair): New.
3653 (auto_adjust_pair): New.
3654 (propagate_for_debug_subst): New.
3655 (propagate_for_debug): New.
3656 (try_combine): Skip debug insns. Propagate removed defs into
3658 (next_nonnote_nondebug_insn): New.
3659 (distribute_notes): Use it. Skip debug insns.
3660 (distribute_links): Skip debug insns.
3661 * tree-outof-ssa.c (set_location_for_edge): Likewise.
3662 * resource.c (mark_target_live_regs): Likewise.
3663 * var-tracking.c: Include cselib.h and target.h.
3664 (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and
3666 (micro_operation_type_name): New.
3667 (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN.
3668 (struct micro_operation_def): Update comments.
3669 (decl_or_value): New type. Use instead of decls.
3670 (struct emit_note_data_def): Add vars.
3671 (struct attrs_def): Use decl_or_value.
3672 (struct variable_tracking_info_def): Add permp, flooded.
3673 (struct location_chain_def): Update comment.
3674 (struct variable_part_def): Use decl_or_value.
3675 (struct variable_def): Make var_part a variable length array.
3677 (scratch_regs): New.
3678 (cselib_hook_called): New.
3679 (dv_is_decl_p): New.
3680 (dv_is_value_p): New.
3683 (dv_as_opaque): New.
3684 (dv_onepart_p): New.
3686 (IS_DECL_CODE): New.
3687 (check_value_is_not_decl): New.
3688 (dv_from_decl): New.
3689 (dv_from_value): New.
3690 (dv_htab_hash): New.
3691 (variable_htab_hash): Use it.
3692 (variable_htab_eq): Support values.
3693 (variable_htab_free): Free from the right pool.
3694 (attrs_list_member, attrs_list_insert): Use decl_or_value.
3695 (attrs_list_union): Adjust.
3696 (attrs_list_mpdv_union): New.
3697 (tie_break_pointers): New.
3698 (canon_value_cmp): New.
3699 (unshare_variable): Return possibly-modified slot.
3700 (vars_copy_1): Adjust.
3701 (var_reg_decl_set): Adjust. Split out of...
3702 (var_reg_set): ... this.
3703 (get_init_value): Adjust.
3704 (var_reg_delete_and_set): Adjust.
3705 (var_reg_delete): Adjust.
3706 (var_regno_delete): Adjust.
3707 (var_mem_decl_set): Split out of...
3708 (var_mem_set): ... this.
3709 (var_mem_delete_and_set): Adjust.
3710 (var_mem_delete): Adjust.
3714 (variable_union): Adjust. Speed up merge of 1-part vars.
3715 (variable_canonicalize): Use unshared slot.
3716 (VALUED_RECURSED_INTO): New.
3717 (find_loc_in_1pdv): New.
3718 (struct dfset_merge): New.
3719 (insert_into_intersection): New.
3720 (intersect_loc_chains): New.
3722 (canonicalize_loc_order_check): New.
3723 (canonicalize_values_mark): New.
3724 (canonicalize_values_star): New.
3725 (variable_merge_over_cur): New.
3726 (variable_merge_over_src): New.
3727 (dataflow_set_merge): New.
3728 (dataflow_set_equiv_regs): New.
3729 (remove_duplicate_values): New.
3730 (struct dfset_post_merge): New.
3731 (variable_post_merge_new_vals): New.
3732 (variable_post_merge_perm_vals): New.
3733 (dataflow_post_merge_adjust): New.
3734 (find_mem_expr_in_1pdv): New.
3735 (dataflow_set_preserve_mem_locs): New.
3736 (dataflow_set_remove_mem_locs): New.
3737 (dataflow_set_clear_at_call): New.
3738 (onepart_variable_different_p): New.
3739 (variable_different_p): Use it.
3740 (dataflow_set_different_1): Adjust. Make detailed dump more verbose.
3741 (track_expr_p): Add need_rtl parameter. Don't generate rtl
3743 (track_loc_p): Pass it true.
3744 (struct count_use_info): New.
3745 (find_use_val): New.
3746 (replace_expr_with_values): New.
3748 (use_type): New, partially split out of...
3749 (count_uses): ... this. Count new micro-ops.
3750 (count_uses_1): Adjust.
3751 (count_stores): Adjust.
3752 (count_with_sets): New.
3753 (VAL_NEEDS_RESOLUTION): New.
3754 (VAL_HOLDS_TRACK_EXPR): New.
3755 (VAL_EXPR_IS_COPIED): New.
3756 (VAL_EXPR_IS_CLOBBERED): New.
3757 (add_uses): Adjust. Generate new micro-ops.
3758 (add_uses_1): Adjust.
3759 (add_stores): Generate new micro-ops.
3760 (add_with_sets): New.
3761 (find_src_status): Adjust.
3762 (find_src_set_src): Adjust.
3763 (compute_bb_dataflow): Use dataflow_set_clear_at_call.
3764 Handle new micro-ops. Canonicalize value equivalances.
3765 (vt_find_locations): Compute total size of hash tables for
3766 dumping. Perform merge for var-tracking-assignments. Don't
3767 disregard single-block loops.
3768 (dump_attrs_list): Handle decl_or_value.
3769 (dump_variable): Take variable. Deal with decl_or_value.
3770 (dump_variable_slot): New.
3771 (dump_vars): Use it.
3772 (dump_dataflow_sets): Adjust.
3773 (set_slot_part): New, extended to support one-part variables
3774 after splitting out of...
3775 (set_variable_part): ... this.
3776 (clobber_slot_part): New, split out of...
3777 (clobber_variable_part): ... this.
3778 (delete_slot_part): New, split out of...
3779 (delete_variable_part): .... this.
3780 (check_wrap_constant): New.
3781 (vt_expand_loc_callback): New.
3782 (vt_expand_loc): New.
3783 (emit_note_insn_var_location): Adjust. Handle values. Handle
3784 EMIT_NOTE_AFTER_CALL_INSN.
3785 (emit_notes_for_differences_1): Adjust. Handle values.
3786 (emit_notes_for_differences_2): Likewise.
3787 (emit_notes_for_differences): Adjust.
3788 (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes.
3789 Adjust. Handle new micro-ops.
3790 (vt_add_function_parameters): Adjust. Create and bind values.
3791 (vt_initialize): Adjust. Initialize scratch_regs and
3792 valvar_pool, flooded and perm.. Initialize and use cselib. Log
3793 operations. Move some code to count_with_sets and add_with_sets.
3794 (delete_debug_insns): New.
3795 (vt_debug_insns_local): New.
3796 (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish
3798 (var_tracking_main): If var-tracking-assignments is enabled
3799 but var-tracking isn't, delete debug insns and leave. Likewise
3800 if we exceed limits or fail the stack adjustments tests, and
3801 after all var-tracking processing.
3802 More in var-tracking, from Jakub Jelinek <jakub@redhat.com>:
3803 (dataflow_set): Add traversed_vars.
3804 (value_chain, const_value_chain): New typedefs.
3805 (value_chain_pool, value_chains): New variables.
3806 (value_chain_htab_hash, value_chain_htab_eq, add_value_chain,
3807 add_value_chains, add_cselib_value_chains, remove_value_chain,
3808 remove_value_chains, remove_cselib_value_chains): New functions.
3809 (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1,
3810 shared_hash_find_slot_noinsert_1, shared_hash_find_1): New
3812 (shared_hash_find_slot_unshare, shared_hash_find_slot,
3813 shared_hash_find_slot_noinsert, shared_hash_find): Update.
3814 (dst_can_be_shared): New variable.
3815 (unshare_variable): Unshare set->vars if shared, use shared_hash_*.
3816 Clear dst_can_be_shared. If set->traversed_vars is non-NULL and
3817 different from set->vars, look up slot again instead of using the
3819 (dataflow_set_init): Initialize traversed_vars.
3820 (variable_union): Use shared_hash_*. Use initially NO_INSERT
3821 lookup if set->vars is shared. Don't keep slot cleared before
3822 calling unshare_variable. Unshare set->vars if needed. Adjust
3823 unshare_variable callers. Clear dst_can_be_shared if needed.
3824 Even ->refcount == 1 vars must be unshared if set->vars is shared
3825 and var needs to be modified.
3826 (dataflow_set_union): Set traversed_vars during canonicalization.
3827 (VALUE_CHANGED, DECL_CHANGED): Define.
3828 (set_dv_changed, dv_changed_p): New static inlines.
3829 (track_expr_p): Clear DECL_CHANGED.
3830 (dump_dataflow_sets): Set it.
3831 (variable_was_changed): Call set_dv_changed.
3832 (emit_note_insn_var_location): Likewise.
3833 (changed_variables_stack): New variable.
3834 (check_changed_vars_1, check_changed_vars_2): New functions.
3835 (emit_notes_for_changes): Do nothing if changed_variables is
3836 empty. Traverse changed_variables with check_changed_vars_1,
3837 call check_changed_vars_2 on each changed_variables_stack entry.
3838 (emit_notes_in_bb): Add SET argument. Just clear it at the
3839 beginning, use it instead of local &set, don't destroy it at the end.
3840 (vt_emit_notes): Call dataflow_set_clear early on all
3841 VTI(bb)->out sets, never use them, instead use emit_notes_in_bb
3842 computed set, dataflow_set_clear also VTI(bb)->in when we are
3843 done with the basic block. Initialize changed_variables_stack,
3844 free it afterwards. If ENABLE_CHECKING verify that after noting
3845 differences to an empty set value_chains hash table is empty.
3846 (vt_initialize): Initialize value_chains and value_chain_pool.
3847 (vt_finalize): Delete value_chains htab, free value_chain_pool.
3848 (variable_tracking_main): Call dump_dataflow_sets before calling
3849 vt_emit_notes, not after it.
3850 * tree-flow.h (propagate_defs_into_debug_stmts): Declare.
3851 (propagate_var_def_into_debug_stmts): Declare.
3852 * df-problems.c (df_lr_bb_local_compute): Skip debug insns.
3853 (df_set_note): Reject debug insns.
3854 (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't
3855 add notes to debug insns.
3856 (df_note_bb_compute): Adjust. Likewise.
3857 (df_simulate_uses): Skip debug insns.
3858 (df_simulate_initialize_backwards): Likewise.
3859 * reg-stack.c (subst_stack_regs_in_debug_insn): New.
3860 (subst_stack_regs_pat): Reject debug insns.
3861 (convert_regs_1): Handle debug insns.
3862 * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H.
3863 (print-rtl.o): Depend on cselib.h.
3864 (cselib.o): Depend on TREE_PASS_H.
3865 (var-tracking.o): Depend on cselib.h and TARGET_H.
3866 * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns.
3867 (init_ready_list): Skip boundary debug insns.
3868 (add_branch_dependences): Skip debug insns.
3869 (free_block_dependencies): Check for blocks with only debug insns.
3870 (compute_priorities): Likewise.
3871 * gimple.c (gss_for_code): Handle GIMPLE_DEBUG.
3872 (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust
3874 (gimple_build_debug_bind_stat): New.
3875 (empty_body_p): Skip debug stmts.
3876 (gimple_has_side_effects): Likewise.
3877 (gimple_rhs_has_side_effects): Likewise.
3878 * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New.
3879 (gimple_build_debug_bind_stat): Declare.
3880 (gimple_build_debug_bind): Define.
3881 (is_gimple_debug): New.
3882 (gimple_debug_bind_p): New.
3883 (gimple_debug_bind_get_var): New.
3884 (gimple_debug_bind_get_value): New.
3885 (gimple_debug_bind_get_value_ptr): New.
3886 (gimple_debug_bind_set_var): New.
3887 (gimple_debug_bind_set_value): New.
3888 (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro.
3889 (gimple_debug_bind_reset_value): New.
3890 (gimple_debug_bind_has_value_p): New.
3891 (gsi_next_nondebug): New.
3892 (gsi_prev_nondebug): New.
3893 (gsi_start_nondebug_bb): New.
3894 (gsi_last_nondebug_bb): New.
3895 * sched-vis.c (print_pattern): Handle VAR_LOCATION.
3896 (print_insn): Handle DEBUG_INSN.
3897 * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc
3898 of first insn prevail.
3899 (first_stmt): Skip debug stmts.
3900 (first_non_label_stmt): Likewise.
3901 (last_stmt): Likewise.
3902 (has_zero_uses_1): New.
3903 (single_imm_use_1): New.
3904 (verify_gimple_debug): New.
3905 (verify_types_in_gimple_stmt): Handle debug stmts.
3906 (verify_stmt): Likewise.
3907 (debug_loop_num): Skip debug stmts.
3908 (remove_edge_and_dominated_blocks): Remove dominators last.
3909 * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts.
3910 (linearize_expr): Likewise.