1 2009-09-22 Richard Guenther <rguenther@suse.de>
4 * tree-dfa.c (get_ref_base_and_extent): Handle trailing
5 arrays really properly.
7 2009-09-22 Richard Henderson <rth@redhat.com>
10 * target.h (struct gcc_target): Add asm_out.trampoline_template,
11 calls.static_chain, calls.trampoline_init,
12 calls.trampoline_adjust_address.
13 * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
14 (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
15 (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
16 * builtins.c (expand_builtin_setjmp_receiver): Use
17 targetm.calls.static_chain; only clobber registers.
18 (expand_builtin_init_trampoline): Use targetm.calls.trampoline_init;
19 set up memory attributes properly for the trampoline block.
20 (expand_builtin_adjust_trampoline): Use
21 targetm.calls.trampoline_adjust_address.
22 * calls.c (prepare_call_address): Add fndecl argument. Use
23 targetm.calls.static_chain.
24 * df-scan.c (df_need_static_chain_reg): Remove.
25 (df_get_entry_block_def_set): Use targetm.calls.static_chain;
26 consolodate static chain handling.
27 * doc/tm.texi: Document new hooks.
28 * emit-rtl.c (static_chain_rtx, static_chain_incoming_rtx): Remove.
29 (init_emit_regs): Don't initialize them.
30 * expr.h (prepare_call_address): Update decl.
31 * final.c (profile_function): Use targetm.calls.static_chain.
32 * function.c (expand_function_start): Likewise.
33 * rtl.h (static_chain_rtx, static_chain_incoming_rtx): Remove.
34 * stmt.c (expand_nl_goto_receiver): Use targetm.calls.static_chain;
35 only clobber registers.
36 * targhooks.c (default_static_chain): New.
37 (default_asm_trampoline_template, default_trampoline_init): New.
38 (default_trampoline_adjust_address): New.
39 * targhooks.h: Declare them.
40 * varasm.c (assemble_trampoline_template): Use
41 targetm.asm_out.trampoline_template. Make the memory block const
44 * config/alpha/alpha.c (alpha_trampoline_init): Rename from
45 alpha_initialize_trampoline. Make static. Merge VMS parameter
46 differences into the TARGET_ABI_OPEN_VMS code block.
47 (TARGET_TRAMPOLINE_INIT): New.
48 * config/alpha/alpha.h (TRAMPOLINE_TEMPLATE): Remove.
49 (TRAMPOLINE_SECTION, INITIALIZE_TRAMPOLINE): Remove.
50 * config/alpha/vms.h (TRAMPOLINE_SIZE, TRAMPOLINE_ALIGNMENT): Remove.
51 (INITIALIZE_TRAMPOLINE): Remove.
53 * config/arc/arc.h (TRAMPOLINE_ALIGNMENT): New.
54 (TRAMPOLINE_TEMPLATE): Merge with ...
55 (INITIALIZE_TRAMPOLINE): ... this and move ...
56 * config/arc/arc.c (arc_trampoline_init): ... here.
57 (TARGET_TRAMPOLINE_INIT): New.
59 * config/arm/arm.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
60 (TARGET_TRAMPOLINE_INIT, TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
61 (arm_asm_trampoline_template): New.
62 (arm_trampoline_init, arm_trampoline_adjust_address): New.
63 * config/arm/arm.h (TRAMPOLINE_TEMPLATE, ARM_TRAMPOLINE_TEMPLATE,
64 THUMB2_TRAMPOLINE_TEMPLATE, THUMB1_TRAMPOLINE_TEMPLATE): Move all
65 code to arm_asm_trampoline_template.
66 (TRAMPOLINE_ADJUST_ADDRESS): Move code to
67 arm_trampoline_adjust_address.
68 (INITIALIZE_TRAMPOLINE): Move code to arm_trampoline_init;
69 adjust for target hook parameters.
71 * config/avr/avr.h (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE): Remove.
73 * config/bfin/bfin-protos.h (initialize_trampoline): Remove.
74 * config/bfin/bfin.c (bfin_asm_trampoline_template): New.
75 (bfin_trampoline_init): Rename from initialize_trampoline;
76 make static; update for target hook parameters.
77 (TARGET_ASM_TRAMPOLINE_TEMPLATE, TARGET_TRAMPOLINE_INIT): New.
78 * config/bfin/bfin.h (TRAMPOLINE_TEMPLATE): Move code to
79 bfin_asm_trampoline_template.
80 (INITIALIZE_TRAMPOLINE): Remove.
82 * config/cris/cris.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
83 TARGET_TRAMPOLINE_INIT, cris_asm_trampoline_template,
84 cris_trampoline_init): New.
85 * config/cris/cris.h (TRAMPOLINE_TEMPLATE): Move code to
86 cris_asm_trampoline_template.
87 (INITIALIZE_TRAMPOLINE): Move code to cris_trampoline_init;
88 adjust for target hook parameters.
90 * config/crx/crx.h (INITIALIZE_TRAMPOLINE): Remove.
92 * config/fr30/fr30.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
93 TARGET_TRAMPOLINE_INIT, fr30_asm_trampoline_template,
94 fr30_trampoline_init): New.
95 * config/fr30/fr30.h (TRAMPOLINE_TEMPLATE): Move code to
96 fr30_asm_trampoline_template.
97 (INITIALIZE_TRAMPOLINE): Move code to fr30_trampoline_init;
98 adjust for target hook parameters.
100 * config/frv/frv.c (TARGET_TRAMPOLINE_INIT): New.
101 (frv_trampoline_init): Rename from frv_initialize_trampoline;
102 make static, adjust arguments for TARGET_TRAMPOLINE_INIT hook.
103 * config/frv/frv.h (INITIALIZE_TRAMPOLINE): Remove.
104 * config/frv/frv-protos.h (frv_initialize_trampoline): Remove.
106 * config/h8300/h8300.c (h8300_trampoline_init): New.
107 (TARGET_TRAMPOLINE_INIT): New.
108 * config/h8300/h8300.h (INITIALIZE_TRAMPOLINE): Move code
109 to h8300_trampoline_init and adjust for hook parameters.
111 * config/ia64/ia64-protos.h (ia64_initialize_trampoline): Remove.
112 * config/ia64/ia64.c (TARGET_TRAMPOLINE_INIT): New.
113 (ia64_trampoline_init): Rename from ia64_initialize_trampoline;
114 make static; adjust for hook parameters.
115 * config/ia64/ia64.h (INITIALIZE_TRAMPOLINE): Remove.
117 * config/iq2000/iq2000.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
118 (TARGET_TRAMPOLINE_INIT): New.
119 (iq2000_asm_trampoline_template, iq2000_trampoline_init): New.
120 * config/iq2000/iq2000.h (TRAMPOLINE_TEMPLATE): Move code to
121 iq2000_asm_trampoline_template.
122 (INITIALIZE_TRAMPOLINE): Move code to iq2000_trampoline_init.
123 (TRAMPOLINE_CODE_SIZE): New.
124 (TRAMPOLINE_SIZE): Use it.
125 (TRAMPOLINE_ALIGNMENT): Follow Pmode.
127 * config/m32c/m32c-protos.h (m32c_initialize_trampoline): Remove.
128 * config/m32c/m32c.c (TARGET_TRAMPOLINE_INIT): New.
129 (m32c_trampoline_init): Rename from m32c_initialize_trampoline;
130 adjust for hook parameters.
131 * config/m32c/m32c.h (INITIALIZE_TRAMPOLINE): Remove.
133 * config/m32r/m32r.c (TARGET_TRAMPOLINE_INIT): New.
134 (m32r_trampoline_init): New.
135 * config/m32r/m32r.h (INITIALIZE_TRAMPOLINE): Move code to
136 m32r_trampoline_init.
138 * config/m68hc11/m68hc11.c (TARGET_TRAMPOLINE_INIT): New.
139 (m68hc11_trampoline_init): Rename from m68hc11_initialize_trampoline;
140 make static; update for hook parameters.
141 * config/m68hc11/m68hc11-protos.h: Update.
142 * config/m68hc11/m68hc11.h (INITIALIZE_TRAMPOLINE): Remove.
144 * config/mcore/mcore.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
145 (TARGET_TRAMPOLINE_INIT): New.
146 (mcore_function_value): Fix typo.
147 (mcore_asm_trampoline_template, mcore_trampoline_init): New.
148 * config/mcore/mcore.h (TRAMPOLINE_TEMPLATE): Move code
149 to mcore_asm_trampoline_template.
150 (INITIALIZE_TRAMPOLINE): Move code to mcore_trampoline_init.
152 * config/mep/mep.h (INITIALIZE_TRAMPOLINE): Remove.
153 * config/mep/mep.c (TARGET_TRAMPOLINE_INIT): New.
154 (mep_trampoline_init): Rename from mep_init_trampoline; make static;
155 update for hook parameters.
156 * config/mep/mep-protos.h (mep_init_trampoline): Remove.
158 * config/mips/mips.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
159 mips_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
160 mips_trampoline_init): New.
161 * config/mips/mips.h (TRAMPOLINE_TEMPLATE): Move code to
162 mips_asm_trampoline_template.
163 (INITIALIZE_TRAMPOLINE): Move code to mips_trampoline_init;
164 update for hook parameters.
166 * gcc/config/mmix/mmix.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
167 (TARGET_TRAMPOLINE_INIT): New.
168 (mmix_trampoline_size): Remove.
169 (mmix_asm_trampoline_template): Rename from mmix_trampoline_template;
170 make static. Remove out-of-date tetra vs octa comment.
171 (mmix_trampoline_init): Rename from mmix_initialize_trampoline;
172 make static; update for hook parameters.
173 * config/mmix/mmix.h (TRAMPOLINE_TEMPLATE): Remove.
174 (INITIALIZE_TRAMPOLINE): Remove.
175 (TRAMPOLINE_SIZE): Use a constant instead of mmix_trampoline_size.
176 (TRAMPOLINE_ALIGNMENT): New.
177 * gcc/config/mmix/mmix-protos.h: Update.
179 * config/mn10300/mn10300.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
180 mn10300_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
181 mn10300_trampoline_init): New.
182 * config/mn10300/mn10300.h (TRAMPOLINE_TEMPLATE): Move code to
183 mn10300_asm_trampoline_template.
184 (INITIALIZE_TRAMPOLINE): Move code to mn10300_trampoline_init.
186 * config/moxie/moxie.c (moxie_static_chain,
187 moxie_asm_trampoline_template, moxie_trampoline_init,
188 TARGET_STATIC_CHAIN, TARGET_ASM_TRAMPOLINE_TEMPLATE,
189 TARGET_TRAMPOLINE_INIT): New.
190 * config/moxie/moxie.h (INITIALIZE_TRAMPOLINE): Move code to
191 moxie_trampoline_init.
192 (TRAMPOLINE_TEMPLATE): Move code to moxie_asm_trampoline_template.
193 (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
195 * gcc/config/pa/pa.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
196 pa_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
197 pa_trampoline_init, TARGET_TRAMPOLINE_ADJUST_ADDRESS,
198 pa_trampoline_adjust_address): New.
199 * config/pa/pa.h (TRAMPOLINE_TEMPLATE): Move code to
200 pa_asm_trampoline_template.
201 (TRAMPOLINE_ALIGNMENT): New.
202 (TRAMPOLINE_CODE_SIZE): Move to pa.c.
203 (INITIALIZE_TRAMPOLINE): Move code to pa_trampoline_init;
204 adjust for hook parameters.
205 (TRAMPOLINE_ADJUST_ADDRESS): Move code to pa_trampoline_adjust_address.
207 * config/pdp11/pdp11.c (pdp11_trampoline_init): New.
208 (TARGET_TRAMPOLINE_INIT): New.
209 * config/pdp11/pdp11.h (TRAMPOLINE_TEMPLATE): Remove.
210 (INITIALIZE_TRAMPOLINE): Move code to pdp11_trampoline_init.
212 * config/picochip/picochip.h (INITIALIZE_TRAMPOLINE): Remove.
214 * config/rs6000/rs6000-protos.h (rs6000_initialize_trampoline): Remove.
215 * config/rs6000/rs6000.c (TARGET_TRAMPOLINE_INIT): New.
216 (rs6000_trampoline_init): Rename from rs6000_initialize_trampoline;
217 make static; adjust parameters for the hook.
218 * config/rs6000/rs6000.h (INITIALIZE_TRAMPOLINE): Remove.
220 * config/s390/s390.c (s390_asm_trampoline_template): Rename from
221 s390_trampoline_template; make static.
222 (s390_trampoline_init): Rename from s390_initialize_trampoline;
223 make static; adjust for target hook.
224 (TARGET_ASM_TRAMPOLINE_TEMPLATE, TARGET_TRAMPOLINE_INIT): New.
225 * config/s390/s390-protos.h: Remove trampoline decls.
226 * config/s390/s390.h (INITIALIZE_TRAMPOLINE): Remove.
227 (TRAMPOLINE_TEMPLATE): Remove.
228 (TRAMPOLINE_ALIGNMENT): New.
230 * config/score/score-protos.h (score_initialize_trampoline): Remove.
231 * config/score/score.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
232 (TARGET_TRAMPOLINE_INIT): New.
233 (score_asm_trampoline_template): New.
234 (score_trampoline_init): Rename from score_initialize_trampoline;
235 make static; adjust for hook parameters.
236 * config/score/score.h (TRAMPOLINE_TEMPLATE): Move code to
237 score[37]_asm_trampoline_template.
238 (INITIALIZE_TRAMPOLINE): Remove.
239 * config/score/score3.c (score3_asm_trampoline_template): New.
240 (score3_trampoline_init): Rename from score3_initialize_trampoline;
241 adjust for target hook.
242 * config/score/score7.c (score7_asm_trampoline_template): New.
243 (score7_trampoline_init): Rename from score7_initialize_trampoline;
244 adjust for target hook.
245 * config/score/score3.h, config/score/score7.h: Update.
247 * config/sh/sh-protos.h (sh_initialize_trampoline): Remove.
248 * config/sh/sh.c (TARGET_TRAMPOLINE_INIT): New.
249 (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
250 (sh_trampoline_init): Rename from sh_initialize_trampoline;
251 make static; adjust for target hook parameters.
252 (sh_trampoline_adjust_address): New.
253 * config/sh/sh.h (INITIALIZE_TRAMPOLINE): New.
254 (TRAMPOLINE_ADJUST_ADDRESS): Move code to sh_trampoline_adjust_address.
256 * config/sparc/sparc.c (TARGET_TRAMPOLINE_INIT): New.
257 (sparc32_initialize_trampoline): Rename from
258 sparc_initialize_trampoline; make static; replace tramp parameter
259 with m_tramp and update memory accesses.
260 (sparc64_initialize_trampoline): Similarly.
261 (sparc_trampoline_init): New.
262 * config/sparc/sparc-protos.h: Remove trampoline decls.
263 * config/sparc/sparc.h (INITIALIZE_TRAMPOLINE): Remove.
264 * config/sparc/sparc.md (nonlocal_goto): Don't use static_chain_rtx.
266 * config/spu/spu.c (TARGET_TRAMPOLINE_INIT): New.
267 (array_to_constant): Make ARR parameter const.
268 (spu_trampoline_init): Rename from spu_initialize_trampoline;
269 make static; update for hook parameters.
270 * config/spu/spu-protos.h: Update decls.
271 * config/spu/spu.h (INITIALIZE_TRAMPOLINE): Remove.
273 * config/stormy16/stormy16.c (xstormy16_trampoline_init): Rename
274 from xstormy16_initialize_trampoline; make static; update for
276 (TARGET_TRAMPOLINE_INIT): New.
277 * config/stormy16/stormy16.h (INITIALIZE_TRAMPOLINE): Remove.
279 * config/v850/v850.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
280 (TARGET_TRAMPOLINE_INIT): New.
281 (v850_can_eliminate): Make static.
282 (v850_asm_trampoline_template, v850_trampoline_init): New.
283 * config/v850/v850.h (TRAMPOLINE_TEMPLATE): Move code to
284 v850_asm_trampoline_template.
285 (INITIALIZE_TRAMPOLINE): Move code to v850_trampoline_init
286 and adjust for target hook parameters.
288 * config/vax/vax.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
289 (TARGET_TRAMPOLINE_INIT): New.
290 (vax_asm_trampoline_template, vax_trampoline_init): New.
291 * config/vax/vax.h (TRAMPOLINE_TEMPLATE): Move code to
292 vax_asm_trampoline_template.
293 (INITIALIZE_TRAMPOLINE): Move code to vax_trampoline_init.
295 * config/xtensa/xtensa.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
296 (TARGET_TRAMPOLINE_INIT): New.
297 (xtensa_asm_trampoline_template): Rename from
298 xtensa_trampoline_template; make static.
299 (xtensa_trampoline_init): Rename from xtensa_initialize_trampoline;
300 make static; update for hook parameters.
301 * config/xtensa/xtensa-protos.h: Remove trampoline decls.
302 * config/xtensa/xtensa.h (TRAMPOLINE_TEMPLATE): Remove.
303 (INITIALIZE_TRAMPOLINE): Remove.
305 * config/i386/i386.c (ix86_function_regparm): Do not issue an
306 error for nested functions with regparm=3.
307 (ix86_compute_frame_layout): Adjust frame pointer offset for
308 ix86_static_chain_on_stack.
309 (ix86_expand_prologue): Handle ix86_static_chain_on_stack.
310 (ix86_emit_restore_reg_using_pop): Increment ix86_cfa_state->offset,
311 don't reset to UNITS_PER_WORD.
312 (ix86_emit_leave): Adjust ix86_cfa_state.
313 (ix86_expand_epilogue): Handle ix86_static_chain_on_stack.
314 (ix86_static_chain): New.
315 (ix86_trampoline_init): Rename from x86_initialize_trampoline;
316 make static; update for target hook parameters; use ix86_static_chain.
317 (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
318 * config/i386/i386.h (STATIC_CHAIN_REGNUM): Remove.
319 (INITIALIZE_TRAMPOLINE): Remove.
320 (TRAMPOLINE_SIZE): Use 24 for 64-bit.
321 (struct machine_function): Use BOOL_BITFIELD; rearrange bitfields
322 to the end. Add static_chain_on_stack.
323 (ix86_static_chain_on_stack): New.
325 * config/m68k/m68k.c (TARGET_TRAMPOLINE_INIT): New.
326 (m68k_output_mi_thunk): Don't use static_chain_rtx.
327 (m68k_trampoline_init): New.
328 * config/m68k/m68k.h (INITIALIZE_TRAMPOLINE): Move code to
329 m68k_trampoline_init and adjust for hook parameters.
330 * config/m68k/netbsd-elf.h (TRAMPOLINE_TEMPLATE): Remove.
331 (TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE): Remove.
333 2009-09-22 Jakub Jelinek <jakub@redhat.com>
335 * config/rs6000/rs6000.c (bdesc_2arg): Fix CODE_FOR_vector_gt* codes
336 for __builtin_altivec_vcmpgt{sb,uh,sh,uw}.
338 * reload1.c (reload): Call wrap_constant when substituting
339 reg for equiv inside of DEBUG_INSNs.
342 * dwarf2out.c (base_type_die, record_type_tag, gen_subprogram_die,
343 add_call_src_coords_attributes, add_high_low_attributes,
344 gen_compile_unit_die, gen_type_die_with_usage force_decl_die,
345 gen_decl_die, dwarf2out_imported_module_or_decl_1, dwarf2out_finish,
346 dwarf2out_imported_module_or_decl): Avoid using DWARF3 additions
347 when -gdwarf-2 -gstrict-dwarf.
348 (loc_list_from_tree): Likewise. Avoid using DWARF4 additions when
349 -gdwarf-[23] -gstrict-dwarf.
350 (address_of_int_loc_descriptor, loc_descriptor,
351 loc_list_for_address_of_addr_expr_of_indirect_ref): Avoid using
352 DWARF4 additions when -gdwarf-[23] -gstrict-dwarf.
353 * common.opt (gno-strict-dwarf, gstrict-dwarf): New options.
355 2009-09-22 Richard Guenther <rguenther@suse.de>
357 PR tree-optimization/41428
358 * tree-ssa-ccp.c (ccp_fold_stmt): New function.
359 (ccp_finalize): Pass it to substitute_and_fold.
361 2009-09-22 Richard Guenther <rguenther@suse.de>
363 * tree-ssa-propagate.h (ssa_prop_fold_stmt_fn): Declare.
364 (substitute_and_fold): Adjust prototype.
365 * tree-vrp.c (vrp_evaluate_conditional): Make static.
366 (simplify_stmt_using_ranges): Likewise.
367 (fold_predicate_in): Move here from tree-ssa-propagate.c.
368 (vrp_fold_stmt): New function.
369 (vrp_finalize): Pass it to substitute_and_fold.
370 * tree-flow.h (vrp_evaluate_conditional): Remove.
371 (simplify_stmt_using_ranges): Likewise.
372 * tree-ssa-ccp.c (ccp_finalize): Adjust call to substitute_and_fold.
373 * tree-ssa-copy.c (fini_copy_prop): Likewise.
374 * tree-ssa-propagate.c (struct prop_stats_d): Rename num_pred_folded
376 (fold_predicate_in): Move to tree-vrp.c.
377 (substitute_and_fold): Use the callback instead of calling into
378 tree-vrp.c functions directly.
380 2009-09-22 Jakub Jelinek <jakub@redhat.com>
382 * dwarf2out.c (address_of_int_loc_descriptor): Avoid signed/unsigned
383 comparison warning on rs6000.
386 * tree-cfg.c (remove_useless_stmts_tc): Call gsi_next (gsi) even for
387 GIMPLE_EH_MUST_NOT_THROW cleanup.
388 (verify_types_in_gimple_stmt): Handle GIMPLE_EH_MUST_NOT_THROW.
390 2009-09-22 Jack Howarth <howarth@bromo.med.uc.edu>
393 * gcc/config.gcc: Use darwin9.h and darwin10.h on darwin10 and later.
394 * gcc/config/darwin10.h: Add file to pass -no_compact_unwind on
395 LIB_SPEC for darwin10 and later since it always uses the unwinder in
396 libSystem which is derived from the gcc 4.2.1 unwinder.
398 2009-09-22 Dave Korn <dave.korn.cygwin@gmail.com>
401 * varasm.c (default_encode_section_info): Copy TLS model into
402 sym_ref flags regardless of backend support for TLS, for all
403 model types except TLS_MODEL_EMULATED.
405 2009-09-22 Dave Korn <dave.korn.cygwin@gmail.com>
408 * dwarf2out.c (mem_loc_descriptor): Punt on CONST_STRING until
409 we can handle it correctly.
411 2009-09-21 Gerald Pfeifer <gerald@pfeifer.com>
413 * doc/install.texi (os2): Remove section.
415 2009-09-21 Gerald Pfeifer <gerald@pfeifer.com>
417 * doc/standards.texi (Objective-C): Adjust two URLs.
419 2009-09-21 Giuseppe Scrivano <gscrivano@gnu.org>
421 * tree-tailcall.c (process_assignment): Don't check if a multiplication
422 or an addition are already present.
423 (find_tail_calls): Combine multiple additions and multiplications.
424 (adjust_accumulator_values): Emit accumulators.
426 2009-09-21 Kai Tietz <kai.tietz@onevision.com>
428 * config/i386/i386.c (ix86_expand_epilogue): Adjust offset for
429 xmm register restore.
431 2009-09-21 Jan Hubicka <jh@suse.cz>
433 * dwarf2out.c (decl_loc_table_eq): Allow decl_loc_table to be NULL.
434 (dwarf2out_abstract_function): NULLify decl_loc_table at begginig and
437 2009-09-21 Eric Botcazou <ebotcazou@adacore.com>
439 * stor-layout.c (layout_type): Remove obsolete code.
441 2009-09-20 H.J. Lu <hongjiu.lu@intel.com>
444 * opts.c (decode_options): Don't turn on flag_ipa_sra for opt2.
446 2009-09-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
449 * builtins.c (do_mpc_arg2): Accept DO_NONFINITE parameter.
450 (do_mpc_ckconv): Accept FORCE_CONVERT parameter.
451 (fold_builtin_2, do_mpc_arg1): Update accordingly.
452 * fold-const.c (const_binop): Likewise.
453 * real.h (do_mpc_arg2): Update prototype.
455 2009-09-20 Jan Hubicka <jh@suse.cz>
457 * dwarf2out.c (add_const_value_attribute): Return true if successful.
458 (add_location_or_const_value_attribute): Rewrite using loc_list_from_tree.
459 (tree_add_const_value_attribute): Return true if successful.
460 (tree_add_const_value_attribute_for_decl): Likewise.
462 * dwarf2out.c (address_of_int_loc_descriptor): Break out from ...
463 (loc_descriptor): ... here;
464 (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
465 (cst_pool_loc_descr): Break out from ...; do not reffer constant
466 pool items that was not marked for output.
467 (loc_list_from_tree): ... here; handle special cases of ADDR_EXPR;
468 (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
469 (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
470 handle ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF, REALPART_EXPR,
471 IMAGPART_EXPR; handle address of INTEGER_CST; improve handling of
472 CONSTRUCTOR; handle REAL_CST, STRING_CST, COMPLEX_CST; use
473 DW_OP_stack_value to get address of items that are not available
475 (dw_loc_list): Handle single element lists correctly.
477 2009-09-20 Kai Tietz <kai.tietz@onevision.com>
478 Pascal Obry <obry@adacore.com>
480 * unwind-dw2-fde.c (classify_object_over_fdes):
481 Cast the constant 1 to _Unwind_Ptr.
482 (add_fdes): Likewise.
483 (linear_search_fdes): Likewise.
485 2009-09-20 Eric Botcazou <ebotcazou@adacore.com>
487 * stor-layout.c (set_sizetype): Avoid useless type copy.
489 2009-09-20 Richard Sandiford <rdsandiford@googlemail.com>
491 * configure.ac (gcc_cv_ld_mips_personality_relaxation): New
493 (HAVE_LD_PERSONALITY_RELAXATION): New macro definition.
494 * configure, config.in: Regenerate.
495 * dwarf2asm.c (eh_data_format_name): Handle DW_EH_PE_indirect |
497 * config/mips/mips.h (TARGET_WRITABLE_EH_FRAME): New macro.
498 (ASM_PREFERRED_EH_DATA_FORMAT): Define. Use MIPS_EH_INDIRECT
499 for global data if the output could be used in a shared library.
500 * config/mips/mips.c (mips_override_options): Set flag_dwarf2_cfi_asm
501 to 0 if TARGET_WRITABLE_EH_FRAME.
503 2009-09-20 Paolo Bonzini <bonzini@gnu.org>
505 PR rtl-optimization/39886
506 * combine.c (update_cfg_for_uncondjump): Set EDGE_FALLTHRU
507 just when insn is equal to BB_END (bb).
509 2009-09-19 Adam Nemet <anemet@caviumnetworks.com>
511 * config/mips/mips.opt (mrelax-pic-calls): New option.
512 * config/mips/mips.c (mips_strip_unspec_address): Move it up in
514 (mips_unspec_call): Change "unspec_call" expander into this.
515 (mips_strip_unspec_call): New function.
516 (mips_got_load): Call mips_unspec_call instead of
517 gen_unspec_call<mode>.
518 (mips16_build_call_stub): Fix comment for fp_code. Adjust call to
520 (mips_cfg_in_reorg): New function.
521 (mips16_lay_out_constants): Use it to decide whether to call
522 CFG-aware insn splitting.
523 (r10k_insert_cache_barriers): Move CFG set-up code from here to
524 mips_reorg. Move DF set-up code from here ...
525 (mips_df_reorg): ... to here. Call r10k_insert_cache_barriers
527 (mips_reorg): Call mips_df_reorg instead of
528 r10k_insert_cache_barriers. Move CFG set-up code here from
529 r10k_insert_cache_barriers.
530 (mips_call_expr_from_insn): New function.
531 (mips_pic_call_symbol_from_set): Likewise.
532 (mips_find_pic_call_symbol): Likewise.
533 (mips_annotate_pic_call_expr): Likewise.
534 (mips_get_pic_call_symbol): Likewise.
535 (mips_annotate_pic_calls): Likewise.
536 (mips_override_options): Disable -mrelax-pic-calls unless PIC
538 (mips_set_mips16_mode): Disable -mrelax-pic-calls for MIPS16.
539 * config/mips/mips-protos.h (mips_get_pic_call_symbol): Declare it.
540 * config/mips/mips.h (MIPS_CALL): Use it to print the .reloc
542 * config/mips/mips.md (UNSPEC_CALL_ATTR): New unspec.
543 (unspec_call<mode>): Remove it.
544 (sibcall_internal, sibcall_value_internal,
545 sibcall_value_multiple_internal, call_internal, call_split,
546 call_value_internal, call_value_split,
547 call_value_multiple_internal, call_value_multiple_split): Pass
548 SIZE_OPNO to MIPS_CALL.
549 (call_internal_direct, call_direct_split,
550 call_value_internal_direct, call_value_direct_split): Pass -1 as
551 SIZE_OPNO to MIPS_CALL.
552 * configure.ac <mips*-*-*>: Add test for .reloc R_MIPS_JALR.
553 * configure: Regenerate.
554 * doc/invoke.texi (Option Summary): Add -mrelax-pic-calls
555 and -mno-relax-pic-calls.
556 (MIPS Options): Document -mrelax-pic-calls
557 and -mno-relax-pic-calls.
559 2009-09-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
562 * Makefile.in (stmp-fixinc): Ensure `include-fixed' is created
563 in the directory this rule is called from, rather than the
564 toplevel 'gcc' directory, to fix in-tree build.
566 2009-09-19 Chris Demetriou <cgd@google.com>
568 PR preprocessor/28435:
569 * c-opts.c (c_common_handle_option): For -MD and -MMD, indicate
570 to cpplib that the preprocessor output is needed.
572 2009-09-19 Jakub Jelinek <jakub@redhat.com>
574 * config/rs6000/rs6000.md (*save_gpregs_<mode>, *save_fpregs_<mode>,
575 *restore_gpregs_<mode>, *return_and_restore_gpregs_<mode>,
576 *return_and_restore_fpregs_<mode>,
577 *return_and_restore_fpregs_aix_<mode>): Remove 'z' operand modifier.
580 * dwarf2out.c (mem_loc_descriptor) <case SUBREG>: Recurse
581 instead of assuming it has always a REG inside of it.
583 2009-09-18 Gerald Pfeifer <gerald@pfeifer.com>
585 * config/freebsd.h: Update comment on types.
588 2009-09-18 Jason Merrill <jason@redhat.com>
590 * c.opt: Add -fno-deduce-init-list.
592 2009-09-18 Neil Vachharajani <nvachhar@google.com>
594 * value-prof.c (interesting_stringop_to_profile_p): Added output
595 argument to indicate which parameter is the size parameter.
596 * value-prof.c (gimple_stringop_fixed_value): Use
597 INTERESTING_STRINGOP_TO_PROFILE_P to find size argument.
598 * value-prof.c (gimple_stringops_transform): Update call sites to
599 INTERESTING_STRINGOP_TO_PROFILE_P to reflect parameter change.
600 * testsuite/gcc.dg/tree-prof/val-prof-7.c: Added test case.
602 2009-09-18 Uros Bizjak <ubizjak@gmail.com>
605 From David Binderman <dcb314@hotmail.com>:
606 * gcc/config/i386/i386.c (ix86_function_regparm): Remove useless
607 local variable f. Remove stale comments.
608 (ix86_compute_frame_layout): Remove useless local variable total_size.
610 (legitimate_address_p): Remove useless local variables
611 reason_rtx and reason.
612 (ix86_split_copysign_const): Remove useless local variable op1.
613 (scale_counter): Remove useless local variable piece_size_mask.
615 2009-09-18 Jakub Jelinek <jakub@redhat.com>
617 * stmt.c (expand_asm_operands): Set REG_ATTRS on the temporary from
620 2009-09-17 Michael Haubenwallner <michael.haubenwallner@salomon.at>
623 * config/pa/t-hpux-shlib: Set soname in libgcc_s.sl.
625 2009-09-17 Jakub Jelinek <jakub@redhat.com>
627 * c-decl.c (finish_struct): Adjust DECL_SOURCE_LOCATION of
630 2009-09-17 Alexandre Oliva <aoliva@redhat.com>
632 * dwarf2out.c (loc_descriptor): Emit DW_OP_stack_value and
633 DW_OP_implicit_value even without dwarf_version 4.
635 2009-09-17 Jan Hubicka <jh@suse.cz>
637 * dwarf2out.c: Include tree-pass.h and gimple.h.
638 (loc_list_plus_const): New function.
639 (loc_descriptor_from_tree_1): Rename to ...
640 (loc_descriptor_from_tree): ... remove original.
641 (loc_list_from_tree): New function.
642 (add_AT_location_description): Accept location list.
643 (tls_mem_loc_descriptor): Update call of loc_descriptor_from_tree.
644 (concatn_mem_loc_descriptor): Remove.
645 (mem_loc_descriptor): Handle CONCAT/CONCATN and VAR_LOCATION by
647 (secname_for_decl): Move up.
648 (hidden_reference_p): New function; break out from ...
649 (loc_by_refernece): ... here; move up.
650 (dw_loc_list): New function.
651 (single_element_loc_list): New function.
652 (single_element_loc_list_p): New function.
653 (add_loc_descr_to_each): New function.
654 (add_loc_list): New function.
655 (loc_descr_from_tree): Make wraper of loc_list_from_tree.
656 (loc_list_from_tree): Reroganized from loc_descr_from_tree;
657 add diagnostics why expansion failed.
658 (add_location_or_const_value_attribute): Support location lists.
659 (add_bound_info): Likewise.
660 (descr_info_loc): Update call of loc_descriptor_from_tree.
661 (gen_variable_die): Work on location lists.
662 * final.c (pass_final): Add dump file.
663 * Makefile.in (dwarf2out.o): Add new dependencies.
665 2009-09-17 Janis Johnson <janis187@us.ibm.com>
668 * real.c decimal_from_integer, decimal_integer_string): New.
669 (real_from_integer): Use them as special case for decimal float.
670 * config/dfp-bit.c (_si_to_sd, _usi_to_sd): Use default rounding.
671 (_di_to_sd, _di_to_dd, _di_to_td, _udi_to_sd, _udi_to_dd, _udi_to_td):
672 Do not append zero after the decimal point in string to convert.
674 2009-09-17 Alexander Monakov <amonakov@ispras.ru>
676 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
677 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
679 2009-09-17 Martin Jambor <mjambor@suse.cz>
681 * common.opt (fipa-sra): New switch.
682 * opts.c (decode_options): Turn flag_ipa_sra on for opt2.
683 * timevar.def (TV_IPA_SRA): New timevar.
684 * params.def (ipa-sra-ptr-growth-factor): New parameter.
685 * doc/invoke.texi: Document -fipa-sra and ipa-sra-ptr-growth-factor.
686 * tree-sra.c: Include cgraph.c.
687 (enum sra_mode): Added SRA_MODE_EARLY_IPA.
688 (struct access): Added fields stmt, grp_maybe_modified, grp_scalar_ptr
689 and grp_not_necessarilly_dereferenced.
690 (func_param_count): New variable.
691 (encountered_apply_args): New variable.
692 (bb_dereferences): New variable.
693 (final_bbs): New variable.
694 (no_accesses_representant): New variable.
695 (no_accesses_p): New function.
696 (dump_access): Dump the new fields.
697 (sra_initialize): Set encountered_apply_args to false.
698 (get_ssa_base_param): New function.
699 (mark_parm_dereference): New function.
700 (create_access): Caring for INIDRECT_REFs and different handling of
701 varialble length accesses in early IPA SRA. Store the stmt - a new
702 parameter - to the new access.
703 (build_access_from_expr_1): New parameter stmt, passed to
704 create_access. Handle INDIRECT_REFs.
705 (build_access_from_expr): Pass the current statement to
706 build_access_from_expr_1.
707 (disqualify_ops_if_throwing_stmt): Trigger only in intraprocedural
709 (build_accesses_from_assign): Pass the current statement to
710 build_access_from_expr_1. Do not create assign links in IPA-SRA.
711 (scan_function): Call handle_ssa_defs on phi nodes. Set bits in
712 final_bbs when necessary. Check for calls to __builtin_apply_args.
713 Fixup EH info if anythng was changed.
714 (is_unused_scalar_param): New function.
715 (ptr_parm_has_direct_uses): New function.
716 (find_param_candidates): New function.
717 (mark_maybe_modified): New function.
718 (analyze_modified_params): New function.
719 (propagate_dereference_distances): New function.
720 (dump_dereferences_table): New function.
721 (analyze_caller_dereference_legality): New function.
722 (unmodified_by_ref_scalar_representative): New function.
723 (splice_param_accesses): New function.
724 (decide_one_param_reduction): New function.
725 (enum ipa_splicing_result): New type.
726 (splice_all_param_accesses): New function.
727 (get_param_index): New function.
728 (turn_representatives_into_adjustments): New function.
729 (analyze_all_param_acesses): New function.
730 (get_replaced_param_substitute): New function.
731 (get_adjustment_for_base): New function.
732 (replace_removed_params_ssa_names): New function.
733 (sra_ipa_reset_debug_stmts): New function.
734 (sra_ipa_modify_expr): New function.
735 (sra_ipa_modify_assign): New function.
736 (convert_callers): New function.
737 (modify_function): New function.
738 (ipa_sra_preliminary_function_checks): New function.
739 (ipa_early_sra): New function.
740 (ipa_early_sra_gate): New function.
741 (pass_early_ipa_sra): New variable.
742 * Makefile.in (tree-sra.o): Add cgraph.h to dependencies.
744 2009-09-17 Michael Matz <matz@suse.de>
747 * tree.c (build_type_attribute_qual_variant): Export.
748 * tree.h (build_type_attribute_qual_variant): Declare.
749 * tree-inline.c (remap_type_1): Use it to build variants with
750 the original qualifiers and attributes.
752 2009-09-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
754 * cfglayout.c (fixup_reorder_chain): Accept conditional jumps
755 without a fallthrough edge.
757 2009-09-16 DJ Delorie <dj@redhat.com>
759 * config/m32c/m32c.c (m32c_emit_epilogue): Check for R8C or M16C
760 chip and ignore the "fast_interrupt" attribute if so.
762 2009-09-16 Richard Henderson <rth@redhat.com>
765 * cfgbuild.c (find_bb_boundaries): Really re-instate 2009-09-02
768 2009-09-16 Richard Henderson <rth@redhat.com>
771 * tree-cfg.c (verify_gimple_call): Validate that gimple_call_chain
772 is set only if DECL_NO_STATIC_CHAIN is unset.
773 * tree-nested.c (iter_nestinfo_start, iter_nestinfo_next): New.
774 (FOR_EACH_NEST_INFO): New.
775 (walk_all_functions): Use it.
776 (finalize_nesting_tree): Likewise.
777 (unnest_nesting_tree): Likewise.
778 (free_nesting_tree): Use iter_nestinfo_start, iter_nestinfo_next.
779 (get_chain_decl, get_chain_field): Reset DECL_NO_STATIC_CHAIN.
780 (convert_gimple_call): Early out if gimple_call_chain already set.
781 (convert_all_function_calls): Iterate until no new functions
782 require a static chain.
783 (finalize_nesting_tree_1): Assert DECL_NO_STATIC_CHAIN is unset
784 when building a trampoline. Use dump_function_to_file instead
786 (lower_nested_functions): Open dump_file. Validate that decls
787 that have DECL_NO_STATIC_CHAIN from the front end don't have that
788 bit reset by this pass.
790 2009-09-16 Michael Matz <matz@suse.de>
793 * tree.h (struct tree_decl_common): Add decl_restricted_flag,
794 shorten decl_common_unused.
795 (DECL_RESTRICTED_P): New accessor.
796 * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Use it
797 to disambiguate marked decls and restrict pointers.
799 2009-09-16 Richard Henderson <rth@redhat.com>
802 * cfgbuild.c (find_bb_boundaries): Re-instate 2009-09-02 barrier fix.
804 2009-09-16 Jakub Jelinek <jakub@redhat.com>
806 * integrate.c (set_block_abstract_flags): Call
807 set_decl_abstract_flags also on BLOCK_NONLOCALIZED_VARs.
809 2009-09-16 Richard Guenther <rguenther@suse.de>
812 * tree-flow-inline.h (may_be_aliased): Compute readonly variables
815 2009-09-16 DJ Delorie <dj@redhat.com>
816 Kaz Kojima <kkojima@gcc.gnu.org>
818 * config/sh/sh.c (output_stack_adjust): Add new argument frame_p.
819 (sh_expand_prologue): Update calls to output_stack_adjust.
820 (sh_expand_epilogue): Likewise.
822 2009-09-15 Adam Nemet <anemet@caviumnetworks.com>
825 * reorg.c (redundant_insn): Don't count notes or DEBUG_INSNs when
826 trying to limit the extent of searches in the insn stream.
828 2009-09-15 Nathan Froyd <froydnj@codesourcery.com>
829 Jakub Jelinek <jakub@redhat.com>
833 * config/rs6000/rs6000.c (no_global_regs_above): Fix precedence
835 (SAVRES_NOINLINE_GPRS_SAVES_LR, SAVRES_NOINLINE_FPRS_SAVES_LR,
836 SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR): New strategy bits.
837 (rs6000_savres_strategy): Always save FP registers inline if the
838 target doesn't support hardware double-precision. Set the above
839 bits in return value when needed.
840 (rs6000_savres_routine_sym): Fix computation for cache selector.
841 Mark the generated symbol as a function. Rename exitp argument to
842 lr. Move code for determining the name of the symbol...
843 (rs6000_savres_routine_name): ...here. New function. Add cases for
844 getting the names right on AIX and 64-bit Linux.
845 (savres_routine_name): New variable.
846 (rs6000_make_savres_rtx): Rename exitp argument to lr. Don't assert
847 lr isn't set when savep. Use r12 resp. r1 instead of r11 depending
848 on what the target routine uses as a base register. If savep && lr
849 describe saving of r0 into memory slot.
850 (rs6000_emit_prologue): Correct use of call_used_regs. Fix out of
851 line calls for AIX ABI.
852 (rs6000_output_function_prologue): Use rs6000_savres_routine_name to
853 determine FP save/restore functions.
854 (rs6000_emit_stack_reset): Handle savres if sp_offset != 0 and
855 frame_reg_rtx != sp_reg_rtx. Use gen_add3_insn instead of
857 (rs6000_emit_epilogue): Adjust computation of restore_lr.
858 Duplicate restoration of LR and execute the appropriate one
859 depending on whether GPRs are being restored inline. Set r11 from
860 offsetted frame_reg_rtx instead of sp_reg_rtx; if frame_reg_rtx is
861 r11, adjust sp_offset. Use gen_add3_insn instead of gen_addsi3.
862 Fix out of line calls for AIX ABI.
863 * config/rs6000/rs6000.md (*return_and_restore_fpregs_aix_<mode>):
865 * config/rs6000/spe.md (*save_gpregs_spe): Use explicit match for
867 (*restore_gpregs_spe): Likewise.
868 (*return_and_restore_gpregs_spe): Likewise.
869 * config/rs6000/linux64.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
870 Define to empty string unconditionally.
871 * config/rs6000/sysv4.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
872 Define to empty string unconditionally.
873 (GP_SAVE_INLINE, FP_SAVE_INLINE): Handle TARGET_64BIT the same as
876 2009-09-15 Jan Hubicka <jh@suse.cz>
878 * doc/invoke.texi (inline-insns-auto): Drop from 60 to 50.
879 * params.def (inline-insns-auto): Likewise.
881 2009-09-15 Martin Jambor <mjambor@suse.cz>
883 * ipa-inline.c (estimate_function_body_sizes): Dump info about
884 individual statements only at TDF_DETAILS dump level. Format
885 source for 80 characters per line.
887 2009-09-15 Christian Bruel <christian.bruel@st.com>
889 * regrename.c (do_replace): Update REG_DEAD notes.
891 2009-09-15 Revital Eres <eres@il.ibm.com>
893 * doc/tm.texi (TARGET_SUPPORT_VECTOR_MISALIGNMENT): Document.
894 * targhooks.c (default_builtin_support_vector_misalignment):
895 New builtin function.
896 * targhooks.h (default_builtin_support_vector_misalignment):
898 * target.h (builtin_support_vector_misalignment):
899 New field in struct gcc_target.
900 * tree-vect-data-refs.c (vect_supportable_dr_alignment): Call
901 new builtin function.
902 * target-def.h (TARGET_SUPPORT_VECTOR_MISALIGNMENT):
904 * config/rs6000/rs6000.c
905 (rs6000_builtin_support_vector_misalignment): New function.
906 (TARGET_SUPPORT_VECTOR_MISALIGNMENT): Define.
908 2009-09-15 Jie Zhang <jie.zhang@analog.com>
910 * config/bfin/bfin.c (length_for_loop): Use NONDEBUG_INSN_P
912 (bfin_optimize_loop): Likewise.
913 (bfin_gen_bundles): Likewise.
914 (workaround_speculation): Likewise.
915 (find_load): Return NULL_RTX for debug_insn.
917 2009-09-15 Uros Bizjak <ubizjak@gmail.com>
919 * config/alpha/alpha.md (smaxsf3): Disable for IEEE mode.
922 2009-09-14 DJ Delorie <dj@redhat.com>
924 * config/mep/mep.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
925 * config/mep/mep.c (mep_emit_cbranch): Don't use BEQZ/BNEI in
928 2009-09-14 Richard Henderson <rth@redhat.com>
929 Jakub Jelinek <jakub@redhat.com>
931 * builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec.
932 * cfgbuild.c (make_edges): Handle asm goto.
933 * cfglayout.c (fixup_reorder_chain): Likewise.
934 * cfgrtl.c (patch_jump_insn): Likewise.
935 * gimple-pretty-print.c (dump_gimple_asm): Likewise.
936 * gimple.c (gimple_build_asm_1): Add and use nlabels parameter.
937 (gimple_build_asm_vec): Add and use labels parameter.
938 (gimple_build_asm): Remove.
939 (walk_gimple_asm): Walk labels too.
940 * gimple.def (GIMPLE_ASM): Update docs.
941 * gimple.h: Update decls.
942 (struct gimple_statement_asm): Change nc to use unsigned char;
944 (gimple_asm_nlabels): New.
945 (gimple_asm_label_op, gimple_asm_set_label_op): New.
946 * gimplify.c (gimplify_asm_expr): Copy labels from ASM_EXPR
947 into gimple_build_asm_vec.
948 * jump.c (mark_jump_label_asm): New.
949 (mark_jump_label): Use it.
950 (redirect_jump_1): Handle asm goto.
951 (invert_jump_1): Soft fail if X is null.
952 * recog.c (extract_asm_operands): New.
953 (asm_noperands): Use it; handle asm labels.
954 (decode_asm_operands): Use extract_asm_operands.
955 (asm_operand_ok): Properly handle empty string.
956 * reg-stack.c (get_asm_operands_in_out): Rename from
957 get_asm_operand_n_inputs; use extract_asm_operands; return both
958 inputs and outputs by reference; update all callers.
959 * rtl.def (ASM_OPERANDS): Add label vector as operand 6.
960 * rtl.h (ASM_OPERANDS_LABEL_VEC): New.
961 (ASM_OPERANDS_LABEL_LENGTH, ASM_OPERANDS_LABEL): New.
962 (ASM_OPERANDS_SOURCE_LOCATION): Renumber.
963 (extract_asm_operands): Declare.
964 * stmt.c (expand_asm_operands): Add and use labels parameter.
965 (check_unique_operand_names): Likewise.
966 (resolve_asm_operand_names, resolve_operand_name_1): Likewise.
967 (expand_asm_stmt): Handle asm labels.
968 * tree-cfg.c (make_gimple_asm_edges): New.
969 (make_edges): Use it.
970 (cleanup_dead_labels): Handle asm labels.
971 (is_ctrl_altering_stmt): Likewise.
972 (gimple_redirect_edge_and_branch): Likewise.
973 * tree.def (ASM_EXPR): Add 5th operand.
974 * tree.h (ASM_LABELS): New.
975 (resolve_asm_operand_names): Update decl.
977 * c-parser.c (c_parser_asm_statement): Parse asm goto.
978 (c_parser_asm_goto_operands): New.
979 * c-tree.h (build_asm_expr): Update decl.
980 * c-typeck.c (build_asm_expr): Add and use labels parameter.
981 * doc/extend.texi: Document asm goto.
983 2009-09-14 Richard Henderson <rth@redhat.com>
985 * except.h: Update declarations.
986 (struct pointer_map_t): Forward declare.
987 (ERT_UNKNOWN, ERT_THROW, ERT_CATCH): Remove.
988 (struct eh_landing_pad_d, eh_landing_pad): New.
989 (struct eh_catch_d, eh_catch): New.
990 (struct eh_region_d): Remove next_region_sharing_label, aka,
991 label, tree_label, landing_pad, post_landing_pad, resume,
992 may_contain_throw. Rename region_number to index. Remove
993 u.eh_catch, u.eh_throw. Rename u.eh_try.eh_catch to first_catch.
994 Add u.must_not_throw, landing_pads, exc_ptr_reg, filter_reg.
995 (VEC(eh_landing_pad,gc)): New.
996 (struct eh_status): Remove last_region_number. Add lp_array,
997 throw_stmt_table, ttype_data, ehspec_data.
998 (ehr_next, FOR_ALL_EH_REGION_AT): New.
999 (FOR_ALL_EH_REGION_FN, FOR_ALL_EH_REGION): New.
1000 * except.c (lang_protect_cleanup_actions): Return tree.
1001 (struct ehl_map_entry): Remove.
1002 (init_eh_for_function): Push zero entries for region and lp_array.
1003 (gen_eh_region): Add to region_array immediately.
1004 (gen_eh_region_catch): Operate on eh_catch objects.
1005 (gen_eh_landing_pad): New.
1006 (get_eh_region_may_contain_throw, get_eh_region_tree_label): Remove.
1007 (get_eh_region_no_tree_label, set_eh_region_tree_label): Remove.
1008 (get_eh_region_from_number, get_eh_region_from_number_fn): New.
1009 (get_eh_landing_pad_from_number_fn): New.
1010 (get_eh_landing_pad_from_number): New.
1011 (get_eh_region_from_lp_number_fn): New.
1012 (get_eh_region_from_lp_number): New.
1013 (expand_resx_stmt, note_eh_region_may_contain_throw): Remove.
1014 (get_exception_pointer, get_exception_filter): Remove.
1015 (collect_eh_region_array, can_be_reached_by_runtime): Remove.
1016 (current_function_has_exception_handlers): Simplify.
1017 (bring_to_root, eh_region_replaceable_by_p): Remove.
1018 (replace_region, hash_type_list, hash_eh_region): Remove.
1019 (eh_regions_equal_p, merge_peers, remove_unreachable_regions): Remove.
1020 (label_to_region_map, num_eh_regions): Remove.
1021 (get_next_region_sharing_label, must_not_throw_labels): Remove.
1022 (find_exception_handler_labels): Remove.
1023 (duplicate_eh_regions_0, find_prev_try): Remove.
1024 (struct duplicate_eh_regions_data): New.
1025 (duplicate_eh_regions_1): Rewrite.
1026 (duplicate_eh_regions): Return a pointer map instead of an
1028 (copy_eh_region_1, copy_eh_region, push_reachable_handler): Remove.
1029 (redirect_eh_edge_to_label): Remove.
1030 (eh_region_outermost): Rewrite using eh_region pointers
1031 instead of integers.
1032 (add_ttypes_entry): Update for ttype_data move to eh_status.
1033 (add_ehspec_entry): Rewrite with VEC instead of varray.
1034 (assign_filter_values): Likewise. Export.
1035 (build_post_landing_pads, connect_post_landing_pads): Remove.
1036 (dw2_build_landing_pads): Rewrite to use lp_array.
1037 (struct sjlj_lp_info, sjlj_find_directly_reachable_regions): Remove.
1038 (sjlj_assign_call_site_values): Rewrite to use lp_array.
1039 (sjlj_emit_dispatch_table, sjlj_build_landing_pads): Likewise.
1040 (sjlj_mark_call_sites): Update for landing pad numbers.
1041 (finish_eh_generation): Rewrite.
1042 (gate_handle_eh): Do nothing for no eh tree.
1043 (pass_rtl_eh): Move up near finish_eh_generation.
1044 (remove_eh_landing_pad): New.
1045 (remove_eh_handler): Export.
1046 (remove_eh_region, remove_eh_handler_and_replace): Remove.
1047 (for_each_eh_label): Rewrite to use lp_array.
1048 (make_reg_eh_region_note): New.
1049 (make_reg_eh_region_note_nothrow_nononlocal): New.
1050 (insn_could_throw_p): New.
1051 (copy_reg_eh_region_note_forward): New.
1052 (copy_reg_eh_region_note_backward): New.
1053 (check_handled, add_reachable_handler): Remove.
1054 (reachable_next_level, foreach_reachable_handler): Remove.
1055 (arh_to_landing_pad, arh_to_label, reachable_handlers): Remove.
1056 (get_eh_region_and_lp_from_rtx): New.
1057 (get_eh_region_from_rtx): New.
1058 (can_throw_internal_1, can_throw_external_1): Remove.
1059 (can_throw_internal): Use get_eh_region_from_rtx.
1060 (can_throw_external): Use get_eh_region_and_lp_from_rtx.
1061 (insn_nothrow_p, can_nonlocal_goto): New.
1062 (expand_builtin_eh_common, expand_builtin_eh_pointer): New.
1063 (expand_builtin_eh_filter, expand_builtin_eh_copy_values): New.
1064 (add_action_record): Use VEC not varray.
1065 (collect_one_action_chain): Update for eh_region changes.
1066 (convert_to_eh_region_ranges): Make static. Use VEC not varray.
1067 Use get_eh_region_and_lp_from_rtx.
1068 (gate_convert_to_eh_region_ranges): New.
1069 (pass_convert_to_eh_region_ranges): Use it.
1070 (push_uleb128, push_sleb128): Use VEC not varray.
1071 (output_one_function_exception_table): Likewise.
1072 (dump_eh_tree): Update for eh_region changes.
1073 (verify_eh_tree): Likewise.
1074 (verify_eh_region, default_init_unwind_resume_libfunc): Remove.
1075 * tree-eh.c: Include target.h.
1076 (add_stmt_to_eh_lp_fn): Rename from add_stmt_to_eh_region_fn.
1077 Don't disallow GIMPLE_RESX; adjust argument check.
1078 (add_stmt_to_eh_lp): Rename from add_stmt_to_eh_region.
1079 (record_stmt_eh_region): Update for landing pad numbers;
1080 generate a landing pad if necessary.
1081 (remove_stmt_from_eh_lp): Rename from remove_stmt_from_eh_region.
1082 (remove_stmt_from_eh_lp_fn): Similarly.
1083 (lookup_stmt_eh_lp_fn): Rename from lookup_stmt_eh_region_fn.
1084 Update for lp numbers; don't special case missing throw_stmt_table.
1085 (lookup_expr_eh_lp): Similarly.
1086 (lookup_stmt_eh_lp): Rename from lookup_stmt_eh_region.
1087 (eh_seq, eh_region_may_contain_throw): New.
1088 (struct leh_state): Add ehp_region.
1089 (struct leh_tf_state): Remove eh_label.
1090 (emit_post_landing_pad): New.
1091 (emit_resx, emit_eh_dispatch): New.
1092 (note_eh_region_may_contain_throw): New.
1093 (frob_into_branch_around): Take eh_region not eh label;
1094 emit eh code into eh_seq.
1095 (honor_protect_cleanup_actions): Early exit for no actions. Don't
1096 handle EXC_PTR_EXPR, FILTER_EXPR. Use gimple_build_eh_must_not_throw,
1097 lower_eh_must_not_throw. Emit code to eh_seq.
1098 (lower_try_finally_nofallthru): Emit eh code to eh_seq.
1099 (lower_try_finally_onedest): Likewise.
1100 (lower_try_finally_copy): Likewise.
1101 (lower_try_finally_switch): Likewise.
1102 (lower_try_finally): Initialize ehp_region.
1103 (lower_catch): Update for eh_catch objects.
1104 (lower_eh_filter): Don't handle must_not_throw.
1105 (lower_eh_must_not_throw): New.
1106 (lower_cleanup): Don't set eh_label.
1107 (lower_eh_constructs_2): Resolve eh builtins.
1108 Handle GIMPLE_EH_MUST_NOT_THROW.
1109 (lower_eh_constructs): Initialize eh_region_may_contain_throw.
1110 Add eh_seq to the end of the function body.
1111 (make_eh_dispatch_edges): New.
1112 (make_eh_edge): Remove.
1113 (make_eh_edges): Simplify for landing pads.
1114 (redirect_eh_edge_1): New.
1115 (redirect_eh_edge): Use it.
1116 (redirect_eh_dispatch_edge): New.
1117 (stmt_could_throw_p): Use a switch. Allow RESX.
1118 (stmt_can_throw_external): Use lookup_stmt_eh_lp.
1119 (stmt_can_throw_internal): Likewise.
1120 (maybe_clean_eh_stmt_fn, maybe_clean_eh_stmt): New.
1121 (maybe_clean_or_replace_eh_stmt): Update for landing pads.
1122 (maybe_duplicate_eh_stmt_fn, maybe_duplicate_eh_stmt): New.
1123 (gate_refactor_eh): New.
1124 (pass_refactor_eh): Use it.
1125 (lower_resx, execute_lower_resx, pass_lower_resx): New.
1126 (lower_eh_dispatch, execute_lower_eh_dispatch): New.
1127 (gate_lower_ehcontrol, pass_lower_eh_dispatch): New.
1128 (remove_unreachable_handlers): Rename from
1129 tree_remove_unreachable_handlers; rewrite for landing pads;
1130 call remove_eh_handler directly.
1131 (remove_unreachable_handlers_no_lp): New.
1132 (unsplit_eh, unsplit_all_eh): New.
1133 (tree_empty_eh_handler_p, all_phis_safe_to_merge): Remove.
1134 (cleanup_empty_eh_merge_phis, cleanup_empty_eh_move_lp): New.
1135 (cleanup_empty_eh_unsplit): New.
1136 (cleanup_empty_eh): Rewrite.
1137 (cleanup_all_empty_eh): New.
1138 (execute_cleanup_eh): Rename from cleanup_eh. Remove unreachable
1139 handlers first. Use unsplit_all_eh, cleanup_all_empty_eh.
1140 (gate_cleanup_eh): New.
1141 (pass_cleanup_eh): Use it.
1142 (verify_eh_edges): Move later in file. Expect one EH edge.
1143 (verify_eh_dispatch_edge): New.
1145 * Makefile.in (FUNCTION_H): Use vecprim.h, not varray.h.
1146 (gtype-desc.o): Add TARGET_H.
1147 (tree.o): Use EXCEPT_H, not except.h.
1148 (cfgbuild.o): Add EXPR_H.
1149 (GTFILES): Add vecprim.h.
1150 * builtins.c (expand_builtin): Handle BUILT_IN_EH_POINTER,
1151 BUILT_IN_EH_FILTER, BUILT_IN_EH_COPY_VALUES.
1152 * builtins.def (BUILT_IN_UNWIND_RESUME, BUILT_IN_EH_POINTER,
1153 BUILT_IN_EH_FILTER, BUILT_IN_EH_COPY_VALUES): New.
1154 * calls.c (emit_call_1): Use make_reg_eh_region_note.
1155 * cfgbuild.c (control_flow_insn_p): Use can_nonlocal_goto; tidy
1156 calls to can_throw_internal.
1157 (rtl_make_eh_edge): Use get_eh_landing_pad_from_rtx.
1158 (make_edges): Don't handle RESX; use can_nonlocal_goto.
1159 * cfgexpand.c (expand_gimple_stmt_1): Don't handle RESX.
1160 (expand_gimple_stmt): Use make_reg_eh_region_note.
1161 (expand_debug_expr): Don't handle EXC_PTR_EXPR and FILTER_EXPR.
1162 (gimple_expand_cfg): Don't call convert_from_eh_region_ranges,
1163 or find_exception_handler_labels.
1164 * cfgrtl.c (rtl_verify_flow_info_1): Don't handle RESX. Assert
1165 there is exacly one EH edge. Use can_nonlocal_goto and
1167 * cgraphunit.c (update_call_expr): Use maybe_clean_eh_stmt_fn.
1168 (cgraph_materialize_all_clones): Use maybe_clean_or_replace_eh_stmt.
1169 * combine.c (can_combine_p, try_combine): Use insn_nothrow_p.
1170 * cse.c (count_reg_usage, insn_live_p): Use insn_could_throw_p.
1171 * dce.c (deletable_insn_p_1): Don't test may_trap_p.
1172 (deletable_insn_p): Use insn_nothrow_p; reorder nonjump insn test.
1173 * dse.c (scan_insn): Use insn_could_throw_p.
1174 * emit-rtl.c (try_split): Use copy_reg_eh_region_note_backward.
1175 * expr.c (expand_expr_real): Use make_reg_eh_region_note.
1176 (expand_expr_real_1): Don't handle RESX, EXC_PTR, or FILTER_EXPR.
1177 * fold-const.c (tree_expr_nonnegative_warnv_p): Don't handle
1178 EXC_PTR_EXPR or FILTER_EXPR.
1179 (tree_expr_nonzero_warnv_p): Likewise.
1180 * function.h: Include vecprim.h, not varray.h
1181 (struct rtl_eh): Remove filter, exc_ptr, built_landing_pad members;
1182 move ttype_data and ehspec_data members to struct eh_status; change
1183 action_record_data member to a VEC.
1184 * gcse.c (hash_scan_set): Use can_throw_internal.
1185 * gengtype.c (open_base_files): Add target.h to gtype-desc.c.
1186 * gimple-iterator.c (gsi_replace): Use maybe_clean_or_replace_eh_stmt.
1187 * gimple-low.c (lower_stmt): Handle GIMPLE_EH_MUST_NOT_THROW.
1188 (block_may_fallthru): Don't handle RESX_EXPR.
1189 * gimple-pretty-print.c (dump_gimple_label): Dump EH_LANDING_PAD_NR.
1190 (dump_gimple_eh_must_not_throw, dump_gimple_eh_dispatch): New.
1191 (dump_gimple_stmt): Dump landing pad information with TDF_EH;
1192 handle GIMPLE_EH_MUST_NOT_THROW, GIMPLE_EH_DISPATCH.
1193 * gimple.c (gss_for_code): Handle GIMPLE_EH_MUST_NOT_THROW,
1194 GIMPLE_EH_DISPATCH, GIMPLE_RESX.
1195 (gimple_size): Likewise.
1196 (gimple_build_eh_dispatch, gimple_build_eh_must_not_throw): New.
1197 (gimple_build_resx): Use gimple_build_with_ops.
1198 (DEFTREECODE): Don't handle EXC_PTR_EXPR, FILTER_EXPR.
1199 (is_gimple_val): Likewise.
1200 (is_gimple_stmt): Remove RESX_EXPR.
1201 * gimple.def (GIMPLE_EH_MUST_NOT_THROW, GIMPLE_EH_DISPATCH): New.
1202 (GIMPLE_RESX): Reorder with other EH constructs.
1203 * gimple.h (struct gimple_statement_eh_mnt): New.
1204 (struct gimple_statement_eh_ctrl): Rename from gimple_statement_resx.
1205 (gimple_eh_filter_must_not_throw): Remove.
1206 (gimple_eh_filter_set_must_not_throw): Remove.
1207 (gimple_eh_must_not_throw_fndecl): New.
1208 (gimple_eh_dispatch_region, gimple_eh_dispatch_set_region): New.
1209 (is_gimple_resx): New.
1210 * gimplify.c (gimplify_expr): Don't handle EXC_PTR_EXPR, RESX_EXPR.
1211 Don't copy EH_FILTER_MUST_NOT_THROW.
1212 * gsstruct.def (GSS_EH_MNT, GSS_EHCONTROL): New.
1213 * ipa-inline.c (estimate_function_body_sizes): Don't try to
1214 handle must_not_throw_labels specially.
1215 * ipa-pure-const.c (check_call): Update debug statement for LP.
1216 * ipa-type-escape.c (check_operand): Don't handle EXC_PTR or FILTER.
1217 * ipa-utils.c (get_base_var): Likewise.
1218 * libfunc.h (LTI_unwind_resume, unwind_resume_libfunc): Remove.
1219 * lower-subreg.c (move_eh_region_note): Remove.
1220 (resolve_simple_move): Use copy_reg_eh_region_note_forward.
1221 * omp-low.c (new_omp_context): Update for eh_lp_nr.
1222 (create_task_copyfn): Likewise.
1223 (maybe_catch_exception): Use gimple_build_eh_filter.
1224 * optabs.c (emit_libcall_block): Update test for no-nonlocal-goto
1225 REG_EH_REGION. Use make_reg_eh_region_note_nothrow_nononlocal.
1226 * passes.c (init_optimization_passes): Add pass_lower_eh_dispatch
1227 and pass_lower_resx.
1228 * print-tree.c (print_node): Dump EH_LANDING_PAD_NR.
1229 * recog.c (peephole2_optimize): Use copy_reg_eh_region_note_backward,
1230 can_throw_internal, can_nonlocal_goto.
1231 * reload1.c (fixup_eh_region_note): Use insn_could_throw_p,
1232 copy_reg_eh_region_note_forward.
1233 (emit_input_reload_insns): Use copy_reg_eh_region_note_forward.
1234 (emit_output_reload_insns): Likewise.
1235 (copy_eh_notes): Remove.
1236 * rtl.def (RESX): Remove.
1237 * rtl.h: Update declarations.
1238 * sese.c (graphite_copy_stmts_from_block): Use maybe_duplicate_eh_stmt.
1239 * tree-cfg.c (make_edges): Handle GIMPLE_EH_DISPATCH.
1240 (update_eh_label): Remove.
1241 (cleanup_dead_labels_eh): New.
1242 (cleanup_deal_labels): Use it instead of update_eh_label.
1243 (gimple_merge_blocks): Update landing pad data structure when
1244 removing a landing pad label.
1245 (remove_useless_stmts_tc): Remove gimple_eh_filter_must_not_throw
1246 test; handle GIMPLE_EH_MUST_NOT_THROW.
1247 (is_ctrl_altering_stmt): Handle GIMPLE_EH_DISPATCH.
1248 (verify_gimple_assign_single): Don't handle EXC_PTR or FILTER_EXPR.
1249 (verify_types_in_gimple_stmt): Handle GIMPLE_EH_DISPATCH.
1250 (verify_stmt): Likewise. Verify landing pads.
1251 (gimple_redirect_edge_and_branch): Handle GIMPLE_EH_DISPATCH.
1252 (gimple_duplicate_bb): Use maybe_duplicate_eh_stmt.
1253 (struct move_stmt_d): Add eh_map.
1254 (move_stmt_eh_region_nr, move_stmt_eh_region_tree_nr): New.
1255 (move_stmt_r): Remap eh region numbers in builtin calls,
1256 resx and eh_dispatch.
1257 (move_block_to_fn): Remove eh_offset parameter. Use
1258 maybe_duplicate_eh_stmt_fn.
1259 (find_outermost_region_in_block): Operate on eh_region pointers
1260 instead of region numbers.
1261 (move_sese_region_to_fn): Expect eh_map instead of eh_offset from
1262 duplicate_eh_regions.
1263 * tree-cfgcleanup.c (tree_forwarder_block_p): Move entry block edge
1264 test earlier. Disallow EH landing pads.
1265 * tree-cfa.c (create_tree_common_ann): Don't set ann->rn.
1266 * tree-flow.h: Update declarations.
1267 (struct tree_ann_common_d): Replace rn with lp_nr.
1268 * tree-inline.c (copy_tree_body_r): Don't handle RESX_EXPR.
1269 (remap_eh_region_nr, remap_eh_region_tree_nr): New.
1270 (remap_gimple_stmt): Remap eh region numbers in builtin calls,
1271 resx and eh_dispatch.
1272 (copy_bb): Use maybe_duplicate_eh_stmt_fn.
1273 (copy_edges_for_bb): Use make_eh_dispatch_edges.
1274 (copy_cfg_body): Expect eh_map instead of eh_region_offset
1275 from duplicate_eh_regions.
1276 (estimate_num_insns): Don't handle EXC_PTR_EXPR or FILTER_EXPR;
1277 update RESX; handle EH_DISPATCH.
1278 (expand_call_inline): Set eh_lp_nr, not eh_region.
1279 (maybe_inline_call_in_expr): Likewise.
1280 * tree-inline.h (struct copy_body_data): Replace eh_region with
1281 eh_lp_nr, eh_region_offset with eh_map.
1282 * tree-optimize.c (execute_fixup_cfg): Use maybe_clean_eh_stmt.
1283 * tree-pass.h (pass_lower_eh_dispatch, pass_lower_resx): New.
1284 * tree-pretty-print.c (dump_generic_node): Don't handle
1285 EXC_PTR_EXPR, FILTER_EXPR, RESX_EXPR.
1286 * tree-sra.c (scan_function): Use maybe_clean_eh_stmt.
1287 * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Don't handle
1288 EXC_PTR_EXPR, FILTER_EXPR.
1289 * tree-ssa-operands.c (get_expr_operands): Likewise.
1290 * tree-ssa-propagate.c (valid_gimple_rhs_p): Likewise.
1291 * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
1292 (ao_ref_init_from_vn_reference): Likewise.
1293 * tree-ssa-sink.c (statement_sink_location): Likewise.
1294 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1295 (mark_virtual_phi_result_for_renaming): Export. Tidy.
1296 * tree-ssa-pre.c (get_or_alloc_expr_for): Don't handle
1297 EXC_PTR_EXPR, FILTER_EXPR.
1298 (is_exception_related): Remove.
1299 (compute_avail): Don't call it.
1300 * tree-ssa-structalias.c: Remove VEC definitions for int and unsigned.
1301 * tree.c (find_decls_types_in_eh_region): Update for eh_region changes.
1302 (find_decls_types_in_node): Use FOR_ALL_EH_REGION_FN.
1303 (build_common_builtin_nodes): Add enable_cxa_end_cleanup parameter.
1305 (build_resx): Remove.
1306 * tree.def (EXC_PTR_EXPR, FILTER_EXPR, RESX_EXPR): Remove.
1307 * tree.h: Update declarations.
1308 (EH_FILTER_MUST_NOT_THROW): Remove.
1309 (struct tree_label_decl): Add eh_landing_pad_nr.
1310 (EH_LANDING_PAD_NR): New.
1311 * value-prof.c (gimple_ic): Tidy variable names. Update for
1312 landing pad numbers.
1313 (gimple_stringop_fixed_value): Tidy variable names. Assert
1314 that neither call stmt can throw.
1315 * vecprim.h (uchar): New.
1316 (VEC(uchar,heap), VEC(uchar,gc)): New.
1318 * c-common.c (c_define_builtins): Update call to
1319 build_common_builtin_nodes.
1320 * c-parser.c (c_parse_file): Don't call
1321 default_init_unwind_resume_libfunc.
1323 2009-09-14 Richard Sandiford <rdsandiford@googlemail.com>
1325 * config/mips/mips-protos.h (mips_cfun_has_cprestore_slot_p): Declare.
1326 (mips_cprestore_address_p): Likewise.
1327 (mips_save_gp_to_cprestore_slot): Likewise.
1328 (mips_restore_gp): Rename to...
1329 (mips_restore_gp_from_cprestore_slot): ...this.
1330 (mips_must_initialize_gp_p): Declare.
1331 (mips_emit_save_slot_move): Likewise.
1332 (mips_output_load_label): Return nothing.
1333 (mips_eh_uses): Declare.
1334 * config/mips/mips.h (TARGET_SPLIT_CALLS): Require epilogue_completed.
1335 (TARGET_CPRESTORE_DIRECTIVE): New macro.
1336 (TARGET_ABSOLUTE_JUMPS): Likewise.
1337 (EH_USES): Likewise.
1338 (FIRST_PSEUDO_REGISTER): Update comment.
1339 (MIPS_ABSOLUTE_JUMP): New macro, extracted from...
1340 (MIPS_CALL): ...here.
1341 (REGISTER_NAMES): Add $cprestore.
1342 * config/mips/mips.c (machine_function): Remove has_gp_insn_p.
1343 Add load_label_length, has_inflexible_gp_insn_p,
1344 has_flexible_gp_insn_p, must_initialize_gp_p and
1345 must_restore_gp_when_clobbered_p.
1346 (mips_expand_call): Don't generate split instructions here.
1347 (mips_split_call): Update the call to mips_restore_gp after
1348 the above name change.
1349 (mips16_cfun_returns_in_fpr_p): Move earlier in file.
1350 (mips_find_gp_ref): New function.
1351 (mips_insn_has_inflexible_gp_ref_p): Likewise.
1352 (mips_cfun_has_inflexible_gp_ref_p): Likewise.
1353 (mips_insn_has_flexible_gp_ref_p): Likewise.
1354 (mips_cfun_has_flexible_gp_ref_p): Likewise.
1355 (mips_function_has_gp_insn): Delete.
1356 (mips_global_pointer): Drop the df_regs_ever_live_p check.
1357 Use the new functions above. Only return INVALID_REGNUM
1358 for TARGET_ABSOLUTE_JUMPS.
1359 (mips_must_initialize_gp_p): New function.
1360 (mips_get_cprestore_base_and_offset): New function, extracted from...
1361 (mips_cprestore_slot): ...here. Take a bool parameter.
1362 (mips_cfun_has_cprestore_slot_p): New function.
1363 (mips_cprestore_address_p): Likewise.
1364 (mips_save_gp_to_cprestore_slot): Likewise.
1365 (mips_restore_gp): Rename to...
1366 (mips_restore_gp_from_cprestore_slot): ...this. Assert
1367 epilogue_completed. Update the call to mips_cprestore_slot.
1368 Test cfun->machine->must_restore_gp_when_clobbered_p.
1369 (mips_direct_save_slot_move_p): New function.
1370 (mips_emit_save_slot_move): Likewise.
1371 (mips_output_cplocal): Test mips_must_initialize_gp_p () instead
1372 of cfun->machine->global_pointer.
1373 (mips_output_function_prologue): Check mips_must_initialize_gp_p ().
1374 (mips_save_reg): Use mips_emit_save_slot_move.
1375 (mips_expand_prologue): Set must_initialize_gp_p.
1376 Use mips_cfun_has_cprestore_slot_p. Use gen_potential_cprestore
1377 for all cprestore saves. Emit a use_cprestore instruction after
1378 setting up the cprestore slot.
1379 (mips_restore_reg): Use mips_emit_save_slot_move.
1380 (mips_process_load_label): New function.
1381 (mips_load_label_length): Likewise.
1382 (mips_output_load_label): Don't return asm: output it here instead.
1383 Use mips_process_load_label.
1384 (mips_adjust_insn_length): Adjust the length of branch instructions
1385 that have length MAX_PIC_BRANCH_LENGTH.
1386 (mips_output_conditional_branch): Update the call to
1387 mips_output_load_label. Assume the branch target is OPERANDS[0]
1388 rather than OPERANDS[1]. Use MIPS_ABSOLUTE_JUMP for absolute jumps.
1389 (mips_output_order_conditional_branch): Swap the meaning of
1390 OPERANDS[0] and OPERANDS[1].
1391 (mips_variable_issue): Don't count ghost instructions.
1392 (mips_expand_ghost_gp_insns): New function.
1393 (mips_reorg): Rerun mips_reorg_process_insns if it returns true.
1394 (mips_output_mi_thunk): Set must_initialize_gp_p.
1395 (mips_eh_uses): New function.
1396 * config/mips/predicates.md (cprestore_save_slot_operand)
1397 (cprestore_load_slot_operand): New predicates.
1398 * config/mips/mips.md (UNSPEC_POTENTIAL_CPRESTORE): New unspec.
1399 (UNSPEC_MOVE_GP): Likewise.
1400 (UNSPEC_CPRESTORE, UNSPEC_RESTORE_GP, UNSPEC_EH_RETURN)
1401 (UNSPEC_CONSTTABLE_INT, UNSPEC_CONSTTABLE_FLOAT): Bump to make room.
1402 (CPRESTORE_SLOT_REGNUM): New register.
1403 (MAX_PIC_BRANCH_LENGTH): New constant.
1404 (jal_macro): Use MIPS_ABSOLUTE_JUMPS.
1405 (length): Use MAX_PIC_BRANCH_LENGTH as a placeholder for PIC long
1406 branches. Fix commentary.
1407 (loadgp_newabi_<mode>): Change from unspec_volatile to unspec.
1408 Only split if mips_must_initialize_gp_p; expand to nothing otherwise.
1409 Change type to "ghost".
1410 (loadgp_absolute_<mode>): Likewise.
1411 (loadgp_rtp_<mode>): Likewise.
1412 (copygp_mips16): Likewise.
1413 (loadgp_blockage): Remove redundant mode attribute.
1414 (potential_cprestore): New instruction.
1415 (cprestore): Turn into an unspec set.
1416 (use_cprestore): New instruction.
1417 (*branch_fp): Swap operands 0 and 1. Remove redundant mode attribute.
1418 (*branch_fp_inverted): Likewise.
1419 (*branch_order<mode>): Likewise.
1420 (*branch_order<mode>_inverted): Likewise.
1421 (*branch_equality<mode>): Likewise.
1422 (*branch_equality<mode>_inverted): Likewise.
1423 (*branch_bit<bbv><mode>): Likewise.
1424 (*branch_bit<bbv><mode>_inverted): Likewise.
1425 (*branch_equality<mode>_mips16): Remove redundant mode.
1426 (jump): Turn into a define_expand.
1427 (*jump_absolute): New instruction.
1428 (*jump_pic): Likewise.
1429 (*jump_mips16): Rename previously-unnamed pattern. Remove
1430 redundant mode attribute.
1431 (restore_gp): Split on epilogue_completed rather than
1432 reload_completed. Change type to "ghost".
1433 (move_gp<mode>): New instruction.
1434 * config/mips/mips-dsp.md (mips_bposge): Swap operands 0 and 1.
1435 Remove redundant mode attribute.
1436 * config/mips/mips-ps-3d.md (bc1any4t): Likewise.
1437 (bc1any4f, bc1any2t, bc1any2f): Likewise.
1438 (*branch_upper_lower, *branch_upper_lower_inverted): Likewise.
1440 2009-09-14 Michael Meissner <meissner@linux.vnet.ibm.com>
1443 * config/rs6000/rs6000.c (rs6000_function_value): V2DF and V2DI
1444 are returned in the same register (vs34 or v2) that Altivec vector
1445 types are returned in.
1446 (rs6000_libcall_value): Ditto.
1449 * config/rs6000/rs6000.c (rs6000_emit_move): Use gen_add3_insn
1450 instead of explicit addsi3/adddi3 calls.
1451 (rs6000_split_multireg_move): Ditto.
1452 (rs6000_emit_allocate_stack): Ditto.
1453 (rs6000_emit_prologue): Ditto.
1454 (rs6000_output_mi_thunk): Ditto.
1456 * config/rs6000/rs6000.md (bswapdi*): Don't assume the pointer
1457 size is 64 bits if we can use 64-bit registers.
1459 2009-09-14 Bernd Schmidt <bernd.schmidt@analog.com>
1461 * config/bfin/bfin.c (bfin_longcall_p): Don't use short calls for weak
1464 From Jie Zhang <jie.zhang@analog.com>:
1465 * config/bfin/bfin.c (bfin_expand_prologue): Ask do_link to
1466 save FP and RETS with saveall attribute.
1467 (bfin_expand_epilogue): Ask do_unlink to restore FP and RETS
1468 with saveall attribute.
1470 * config/bfin/bfin.c (bfin_expand_builtin,
1471 case BFIN_BUILTIN_MULT_1X32X32): Force constants to registers for the
1474 From Jie Zhang <jie.zhang@analog.com>:
1475 * config/bfin/bfin.c (bfin_expand_builtin): Initialize icodes
1476 before use in two places.
1477 * config/bfin/bfin.md (AREG): Define mode iterator.
1478 (reload_in, reload_out): Use mode iterator AREG.
1480 2009-09-14 Richard Guenther <rguenther@suse.de>
1483 * dwarf2out.c (dwarf2out_begin_prologue): Adjust non-CFI asm
1484 EH personality path.
1486 2009-09-13 Richard Guenther <rguenther@suse.de>
1487 Rafael Avila de Espindola <espindola@google.com>
1489 * langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
1490 (LANG_HOOKS_EH_PERSONALITY): Likewise.
1491 (LANG_HOOKS_INITIALIZER): Adjust.
1492 (lhd_pass_through_t): Declare.
1493 * langhooks.h (struct lang_hooks): Add eh_runtime_type and
1495 * langhooks.c (lhd_pass_through_t): New function.
1496 * dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc,
1497 dwarf2out_begin_prologue): Use personality from current_function_decl.
1498 * expr.h (get_personality_function): Declare.
1499 * expr.c (get_personality_function): New function.
1500 (build_personality_function): Likewise.
1501 * libfuncs.h (libfunc_index): Remove LTI_eh_personality.
1502 (eh_personality_libfunc): Remove.
1503 * optabs.c (build_libfunc_function): New function split out from ...
1504 (init_one_libfunc): ... here.
1505 * tree.h (DECL_FUNCTION_PERSONALITY): New.
1506 (tree_function_decl): Add personality.
1507 (lhd_gcc_personality): Declare.
1508 (build_personality_function): Likewise.
1509 * tree.c (gcc_eh_personality_decl): New.
1510 (lhd_gcc_personality): New function.
1511 * except.h (lang_eh_runtime_type): Remove.
1512 (enum eh_personality_kind): New.
1513 (build_personality_function): Declare.
1514 (function_needs_eh_personality): Declare.
1515 * except.c (lang_eh_runtime_type): Remove.
1516 (function_needs_eh_personality): New function.
1517 (add_type_for_runtime): Call lang_hooks.type_for_runtime instead.
1518 (sjlj_emit_function_enter, output_function_exception_table):
1519 Use personality from current_function_decl.
1520 * tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY.
1521 * tree-inline.c (tree_can_inline_p): Do not inline across different
1523 (expand_call_inline): Likewise. Adjust the callers EH personality.
1524 (tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY.
1525 * cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY.
1526 * Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency.
1527 (c-parser.o): Likewise
1528 * c-tree.h (c_eh_initialized_p): Remove.
1529 (c_maybe_initialize_eh): Likewise.
1530 * c-decl.c (finish_decl): Don't call c_maybe_initialize_eh.
1531 (finish_decl): Don't call c_maybe_initialize_eh.
1532 (c_eh_initialized_p): Remove.
1533 (c_maybe_initialize_eh): Likewise.
1534 * c-parser.c (c_parser_omp_construct): Likewise.
1535 (c_parse_file): Initialize exception handling.
1537 2009-09-13 Kai Tietz <kai.tietz@onevision.com>
1539 * config.gcc (tm_file): Remove i386/biarch32.h
1540 for i?86-w64-mingw* case.
1541 (i?86-*-mingw* andx86_64-*-mingw*): Add multilib
1543 * config.host: Set for x64 mingw the option
1544 use_long_long_for_widest_fast_int to yes.
1546 2009-09-13 Eric Botcazou <ebotcazou@adacore.com>
1548 * tree.h (DECL_IGNORED_P): Document further effect for FUNCTION_DECL.
1549 * dbxout.c (dbxout_function_end): Do not test DECL_IGNORED_P.
1550 (dbxout_begin_function): Likewise.
1551 * final.c (dwarf2_debug_info_emitted_p): New predicate.
1552 (final_start_function): Do not emit debug info if DECL_IGNORED_P is
1553 set on the function.
1554 (final_end_function): Likewise.
1555 (final_scan_insn): Likewise.
1556 (rest_of_handle_final): Likewise.
1557 * varasm.c (assemble_start_function): Likewise.
1558 * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
1560 2009-09-12 Jason Merrill <jason@redhat.com>
1562 * dbgcnt.c (dbg_cnt_process_single_pair): constify.
1563 * opts.c (common_handle_option): constify.
1565 2009-09-12 Gerald Pfeifer <gerald@pfeifer.com>
1567 * doc/install.texi (avr): Remove obsolete reference site.
1569 2009-09-12 Gerald Pfeifer <gerald@pfeifer.com>
1571 * doc/install.texi (Binaries): Adjust AIX link.
1573 2009-09-12 Akim Demaille <demaille@gostai.com>
1575 * doc/invoke.texi (-fstrict-aliasing): Correct two examples.
1576 Use an imperative sentence.
1578 2009-09-11 Richard Henderson <rth@redhat.com>
1580 * gsstruct.def (DEFGSSTRUCT): Remove printable-name argument; add
1581 structure-name and has-tree-operands arguments; update all entries.
1582 * gimple.def (DEFGSCODE): Replace 3rd argument with GSS_symbol;
1584 * gimple.c (gimple_ops_offset_): Use HAS_TREE_OP argument.
1585 (gsstruct_code_size): New.
1586 (gss_for_code_): New.
1587 (gss_for_code): Remove.
1588 (gimple_size): Rewrite using gsstruct_code_size.
1589 (gimple_statement_structure): Move to gimple.h.
1590 * gimple.h (gimple_ops_offset_, gss_for_code_): Declare.
1591 (gss_for_code, gimple_statement_structure): New.
1592 (gimple_ops): Use new arrays; tidy.
1594 2009-09-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1596 * config/pa/predicates.md (symbolic_operand): Require a CONST symbolic
1597 operand to be a PLUS expression.
1598 * config/pa/pa.c (pa_secondary_reload): Likewise.
1600 2009-09-11 Jakub Jelinek <jakub@redhat.com>
1602 * combine.c (propagate_for_debug_subst): Call wrap_constant on top.
1604 * print-rtl.c (print_rtx): Use JUMP_LABEL (in_rtx) instead of
1607 2009-09-11 Bernd Schmidt <bernd.schmidt@analog.com>
1609 From Jie Zhang <jie.zhang@analog.com>:
1610 * doc/extend.texi (node Function Attributes): Document l2
1612 (node Blackfin Variable Attributes): Document l2 variable attributes.
1614 2009-09-11 Loren J. Rittle <ljrittle@acm.org>
1616 * config.gcc (*-*-freebsd*): Enable default_use_cxa_atexit
1617 to match the system compiler's configuration at inflection point.
1618 Add comment to remark a remaining difference with system compiler.
1620 * configure.ac (*-*-freebsd*): Enable check for __stack_chk_fail.
1621 * configure: Regenerate.
1623 2009-09-11 Bernd Schmidt <bernd.schmidt@analog.com>
1625 From Jie Zhang <jie.zhang@analog.com>:
1626 * config/bfin/bfin.c (bfin_expand_call): Handle L2 functions.
1627 (bfin_handle_l2_attribute): New.
1628 (bfin_attribute_table): Add l2 attribute.
1630 2009-09-11 Michael Matz <matz@suse.de>
1633 * tree-inline.c (remap_decls): Don't put DECL_EXTERNAL decls
1634 on the local_decls list.
1636 2009-09-11 Alexandre Oliva <aoliva@redhat.com>
1640 * cselib.c (cselib_expand_value_rtx_cb): Document callback
1642 (cselib_expand_value_rtx_1): Use callback for SUBREGs. Adjust
1643 for VALUEs, to implement the documented interface.
1644 * var-tracking.c (vt_expand_loc_callback): Handle SUBREGs.
1645 Adjust for VALUEs and anything else, to implement the
1646 documented interface.
1648 2009-09-10 Nathan Froyd <froydnj@codesourcery.com>
1650 * config/rs6000/rs6000.h (DATA_ALIGNMENT): Check that we are dealing
1651 with actual SPE/paired vector modes before using 64-bit alignment.
1652 Check that TYPE is a REAL_TYPE for TARGET_E500_DOUBLE.
1654 2009-09-10 DJ Delorie <dj@redhat.com>
1656 * config/mep/mep.md (eh_epilogue): Defer until after epilogue is
1659 * config/mep/mep.h (LEGITIMATE_CONSTANT_P): New.
1660 * config/mep/mep.c (mep_legitimate_constant_p): New.
1661 * config/mep/mep-protos.h: Prototype it.
1663 2009-09-10 Richard Henderson <rth@redhat.com>
1665 * print-rtl.c (print_rtx): Fix JUMP_LABEL index.
1667 2009-09-10 Jason Merrill <jason@redhat.com>
1669 * tree.c (chain_index): New fn.
1670 * tree.h: Declare it.
1672 2009-09-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1674 * config/sol2-c.c (cmn_err_length_specs): Initialize
1675 scalar_identity_flag.
1677 2009-09-10 Richard Henderson <rth@redhat.com>
1679 * tree.h (struct tree_decl_common): Move align member earlier;
1680 move label_decl_uid member ...
1681 (struct tree_label_decl): ... here.
1682 (LABEL_DECL_UID): Update to match.
1684 * tree-cfg.c (dump_function_to_file): Dump eh tree with TDF_EH,
1687 * tree-cfg.c (gimple_redirect_edge_and_branch): Do
1688 gimple_try_redirect_by_replacing_jump test after no-op and EH tests.
1690 * tree-cfg.c (split_edge_bb_loc): Don't disallow placement at
1691 dest_prev if the edge is complex.
1693 * tree-cfg.c (is_ctrl_stmt): Use a switch.
1695 * tree-cfg.c (gimple_can_merge_blocks_p): Move label and
1696 loop latch tests earlier.
1698 * gimple-iterator.c (gimple_find_edge_insert_loc): Insert
1699 before GIMPLE_RETURN, not after its predecessor; insert
1702 * gimple-iterator.c (gimple_find_edge_insert_loc): Use
1703 gimple_seq_empty_p to test for no PHI nodes.
1704 * tree-cfg.c (split_critical_edges): Likewise.
1706 * c-common.h (c_dialect_cxx, c_dialect_objc): Boolify.
1708 2009-09-10 Hariharan Sandanagobalane <hariharan@picochip.com>
1710 * final.c (shorten_branches) : Ignore DEBUG_INSN_P instructions
1711 introduced by the VTA branch merge.
1713 2009-09-10 Uros Bizjak <ubizjak@gmail.com>
1715 * ira-conflicts.c: Use fputs or putc instead of fprintf
1719 * tree-switch-conversion.c: Ditto.
1721 2009-09-10 Hariharan Sandanagobalane <hariharan@picochip.com>
1723 * config/picochip/picochip.c : Ignore DEBUG_INSN_P instructions
1724 introduced by the VTA branch merge.
1726 2009-09-10 Uros Bizjak <ubizjak@gmail.com>
1729 2009-09-09 Uros Bizjak <ubizjak@gmail.com>
1731 PR rtl-optimization/39779
1732 * expr.c (convert_modes): Return when mode == oldmode after
1733 CONST_INTs are processed.
1735 2009-09-10 Nick Clifton <nickc@redhat.com>
1737 * config/mep/mep.c (mep_encode_section_info): Copy weakness
1738 attribute and referring decl when creating renamed symbol.
1740 2009-09-10 Richard Guenther <rguenther@suse.de>
1743 * cgraphunit.c (cgraph_emit_thunks): Emit thunks only for
1745 (cgraph_finalize_compilation_unit): Compute reachability
1746 before emitting thunks. Properly process aliases before
1747 possibly removing unreachable nodes.
1749 2009-09-10 Richard Guenther <rguenther@suse.de>
1752 * tree.c (struct free_lang_data_d): Add worklist member.
1753 (find_decls_types_r): Push onto the worklist instead of recursing.
1754 Handle TREE_BINFOs properly.
1755 (find_decls_types): New function wrapped around find_decls_types_r
1756 to process the worklist.
1757 (find_decls_types_in_eh_region): Use it.
1758 (find_decls_types_in_node): Likewise.
1759 (find_decls_types_in_var): Likewise.
1760 (free_lang_data_in_cgraph): Likewise. Free the worklist.
1761 * tree.h (RECORD_OR_UNION_TYPE_P): New.
1762 (AGGREGATE_TYPE_P): Adjust.
1764 2009-09-09 Jason Merrill <jason@redhat.com>
1766 * configure.ac: Check glibc version even if we have an in-tree
1769 2009-09-09 Anthony Green <green@moxielogic.com>
1771 * config/moxie/moxie.md (*movsi, *movhi, *movqi): Use xor to load
1772 the constant 0 when appropriate.
1773 * config/moxie/constraints.md: Add constraint O.
1775 * config/moxie/moxie.c (moxie_setup_incoming_varargs): Adjust
1776 to pass up to 6 32-bit argument values in registers.
1777 (moxie_function_arg): Ditto.
1778 (moxie_arg_partial_bytes): Ditto.
1779 * config/moxie/moxie.h (FUNCTION_ARG_ADVANCE): Ditto.
1780 (REG_PARM_STACK_SPACE): Ditto.
1781 (FUNCTION_ARG_REGNO_P): Ditto.
1783 * config/moxie/moxie.c (moxie_expand_prologue): Use dec
1784 instruction to allocate stack space.
1786 2009-09-09 Segher Boessenkool <segher@kernel.crashing.org>
1788 * config/rs6000/rs6000.md (bswapdi2_64bit): Fix
1789 unnecessarily stringent constraints. Fix address
1790 calculation in the splitters.
1792 2009-09-09 Uros Bizjak <ubizjak@gmail.com>
1794 PR rtl-optimization/39779
1795 * expr.c (convert_modes): Return when mode == oldmode after
1796 CONST_INTs are processed.
1798 2009-09-09 Kai Tietz <kai.tietz@onevision.com>
1801 * config/i386.c (ix86_can_use_return_insn_p): Check for padding0, too.
1802 (ix86_expand_prologue): Take frame.padding0 into logic of
1804 (ix86_expand_epilogue): Likewise.
1806 2009-09-09 Jakub Jelinek <jakub@redhat.com>
1808 * config/t-slibgcc-elf-ver (SHLIB_MAKE_SOLINK, SHLIB_INSTALL_SOLINK):
1810 (SHLIB_LINK, SHLIB_INSTALL): Use them.
1811 * config/t-slibgcc-libgcc: New file.
1812 * config.gcc (powerpc*-*-linux*, powerpc*-*-gnu*): Use it.
1814 2009-09-09 Martin Jambor <mjambor@suse.cz>
1816 PR tree-optimization/41089
1817 * tree-sra.c (find_var_candidates): Do not consider va_lists in
1820 2009-09-09 Richard Henderson <rth@redhat.com>
1822 * gimple.h (CASE_GIMPLE_OMP): New.
1823 (is_gimple_omp): Use it.
1824 * tree-cfg.c (is_ctrl_altering_stmt): Likewise.
1825 (verify_gimple_debug): Likewise.
1827 2009-09-09 Richard Guenther <rguenther@suse.de>
1829 PR tree-optimization/41101
1830 * tree-ssa-pre.c (maximal_set): Remove.
1831 (compute_antic_aux): Treat the maximal set as implicitly all ones.
1832 Defer all blocks we didn't visit at least one successor.
1833 (add_to_exp_gen): Do not add to the maximal set.
1834 (make_values_for_phi): Likewise.
1835 (compute_avail): Likewise.
1836 (init_pre): Do not allocate the maximal set.
1837 (execute_pre): Do not dump it.
1839 2009-09-09 Martin Jambor <mjambor@suse.cz>
1841 * tree-cfg.c (verify_gimple_phi): Check that gimple_phi_result is
1842 an SSA_NAME rather than a is_gimple_variable.
1844 2009-09-09 Richard Guenther <rguenther@suse.de>
1847 * tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Remove
1848 code dealing with plain pointer bases.
1849 (maybe_fold_offset_to_reference): Likewise.
1850 (maybe_fold_stmt_addition): Adjust.
1852 2009-09-09 Richard Guenther <rguenther@suse.de>
1854 * tree.c (free_lang_data_in_type): Do not free the type variant
1856 (free_lang_data): Merge char_type_node with its properly signed
1858 (pass_ipa_free): Collect after freeing language specific data.
1860 2009-09-09 Michael Matz <matz@suse.de>
1863 * cfgexpand.c (expand_gimple_stmt_1): Use an int for storing
1864 SUBREG_PROMOTED_UNSIGNED_P, instead of a bool.
1865 * rtl.h (struct rtx, SUBREG_PROMOTED_UNSIGNED_P): Update comments
1868 2009-09-08 DJ Delorie <dj@redhat.com>
1870 * config/mep/mep.c (conversions[]): Add "ml" pattern.
1872 2009-09-04 Jason Merrill <jason@redhat.com>
1874 * tree.c (tree_find_value): Remove.
1875 * tree.h: Remove prototype.
1876 * varasm.c (assemble_external): Use value_member instead.
1878 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
1880 * toplev.c (process_options): Choose default debugging type when
1881 gtoggle enables debug info and type is unset.
1883 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
1887 * cselib.c (cselib_expand_value_rtx_1): Don't return copy of
1890 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
1892 * configure: Rebuilt with modified libtool.m4.
1894 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
1899 * tree-ssa.c (execute_update_addresses_taken): Update debug insns.
1901 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
1903 * tree-ssa-loop-ivopts.c (get_phi_with_result): Remove.
1904 (remove_statement): Likewise.
1905 (rewrite_use_nonlinear_expr): Adjust.
1906 (remove_unused_ivs): Collect SSA NAMEs to remove and call...
1907 * tree-ssa.c (release_defs_bitset): ... this. New.
1908 * tree-flow.h (release_defs_bitset): Declare.
1910 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
1913 * tree-ssa-phiopt.c (minmax_replacement): Skip debug stmts
1914 in the middle block.
1916 2009-09-08 Kai Tietz <kai.tietz@onevision.com>
1918 * tree-ssa-reassoc.c (find_operand_rank): Cast pointer
1919 via intptr_t to long type.
1920 (insert_operand_rank): Cast long type via intptr_t to
1922 * genattrtab.c (RTL_HASH): Use intptr_t to cast from
1924 * c-pretty-print.c (pp_c_tree_decl_identifier): Cast
1925 from pointer to unsigned via uintptr_t.
1927 * configure.ac (GCC_STDINT_TYPES): Initialize intptr_t,
1928 uintptr_t, HAVE_INTTYPES_H, HAVE_STDINT_H, HAVE_UINTPTR_T,
1930 * configure: Regenerated.
1931 * config.in: Regenerated
1932 * system.h (stdint.h): Add include.
1933 (inttypes.h): Likewise.
1934 * Makefile.in (aclocal): Add config/stdint.m4.
1935 * aclocal.m4: Regenerated.
1937 2009-09-08 Bernd Schmidt <bernd.schmidt@analog.com>
1939 * config/bfin/bfin.c (np_check_regno, np_after_branch): New static
1941 (note_np_check_stores): New function.
1942 (harmless_null_pointer_p): New function.
1943 (trapping_loads_p): New args NP_REG and AFTER_NP_BRANCH. Callers
1944 changed. Take into account whether we're in the shadow of a condjump
1945 that tested NP_REG for NULL.
1946 Lose all code that tested for SEQUENCEs.
1947 (workaround_speculation): Avoid inserting NOPs for loads that are
1948 either always executed or a NULL pointer.
1950 2009-09-08 Jan Hubicka <jh@suse.cz>
1952 * doc/invoke.texi (early-inlining-insns): Reduce from 12 to 8.
1953 * params.def (early-inlining-insns): Likewise.
1955 2009-09-08 Jakub Jelinek <jakub@redhat.com>
1957 PR rtl-optimization/41239
1958 * sched-int.h (struct deps): Add last_function_call_may_noreturn field.
1959 * sched-rgn.c (deps_join): Join also last_function_call_may_noreturn
1961 * sched-deps.c (sched_analyze_insn): Prevent moving trapping insns
1962 across calls, as the calls might not always return normally.
1963 (call_may_noreturn_p): New function.
1964 (deps_analyze_insn): Update last_function_call_may_noreturn list.
1965 (init_deps): Initialize it.
1966 (remove_from_deps): Also remove calls from
1967 last_function_call_may_noreturn list.
1969 2009-09-07 Richard Henderson <rth@redhat.com>
1971 * tree-ssa-sccvn.c (vn_reference_lookup_3): Don't assume there are
1972 more VR->OPERANDS than LHS operands. Free LHS before returning.
1974 2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com>
1976 * config/bfin/bfin.md (UNSPEC_VOLATILE_STALL): New constant.
1977 (attr "addrtype"): New member "spreg".
1978 Use it if mem_spfp_address_operand is true for the address.
1979 (attr "type"): New entry "stall".
1980 (cpu_unit "load"): New.
1981 (insn_reservations "load32", "loadp", "loadi"): Add reservation of
1983 (insn_reservation "loadsp"): New.
1984 (insn_reservation "load_stall1"): New.
1985 (insn_reservation "load_stall3"): New.
1987 * config/bfin/predicates.md (const1_operand, const3_operand): New.
1988 (mem_p_address_operand): Exclude stack and frame pointer based
1990 (mem_spfp_address_operand): New; match them here.
1991 * config/bfin/bfin.c (add_sched_insns_for_speculation): New function.
1992 (bfin_reorg): Call it if scheduling insns.
1993 (bfin_gen_bundles): Remove dummy insns created by
1994 add_sched_insns_for_speculation.
1996 From Jie Zhang <jie.zhang@analog.com>:
1997 * config/bfin/bfin-protos.h (enum bfin_cpu_type, bfin_cpu_type,
1998 bfin_si_revision, bfin_workarounds): Move these ...
1999 * config/bfin/bfin.h: ... here.
2001 From Mike Frysinger <michael.frysinger@analog.com>
2002 * config/bfin/bfin-protos.h (bfin_cpu_type): Add BFIN_CPU_BF542M,
2003 BFIN_CPU_BF544M, BFIN_CPU_BF547M, BFIN_CPU_BF548M, and BFIN_CPU_BF549M.
2004 * config/bfin/bfin.c (bfin_cpus[]): Add 0.3 for bf542m, bf544m,
2005 bf547m, bf548m, and bf549m.
2006 * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Define __ADSPBF542M__
2007 for BFIN_CPU_BF542M, __ADSPBF544M__ for BFIN_CPU_BF544M,
2008 __ADSPBF547M__ for BFIN_CPU_BF547M, __ADSPBF548M__ for
2009 BFIN_CPU_BF548M, and __ADSPBF549M__ for BFIN_CPU_BF549M.
2010 * config/bfin/t-bfin-elf (MULTILIB_MATCHES): Select bf532-none for
2011 bf542m-none, bf544m-none, bf547m-none, bf548m-none, and bf549m-none.
2012 * config/bfin/t-bfin-linux (MULTILIB_MATCHES): Likewise.
2013 * config/bfin/t-bfin-uclinux (MULTILIB_MATCHES): Likewise.
2014 * doc/invoke.texi (Blackfin Options): Document that -mcpu now accepts
2015 bf542m, bf544m, bf547m, bf548m, and bf549m.
2017 From Jie Zhang <jie.zhang@analog.com>:
2018 * config/bfin/predicates.md (p_register_operand): New predicate.
2019 (dp_register_operand): New predicate.
2020 * config/bfin/bfin-protos.h (WA_05000074): Define.
2021 (ENABLE_WA_05000074): Define.
2022 * config/bfin/bfin.c (bfin_cpus[]): Add WA_05000074 for all cpus.
2023 (bfin_gen_bundles): Put dsp32shiftimm instruction in slot[0].
2024 * config/bfin/bfin.md (define_attr type): Add dsp32shiftimm.
2025 (define_attr addrtype): Allow load/store register to be P register.
2026 (define_attr storereg): New.
2027 (define_cpu_unit anomaly_05000074): New.
2028 (define_insn_reservation dsp32shiftimm): New.
2029 (define_insn_reservation dsp32shiftimm_anomaly_05000074): New.
2030 (define_insn_reservation loadp): Cannot use slot2.
2031 (define_insn_reservation loadsp): Cannot use slot2.
2032 (define_insn_reservation storep): Cannot use slot2. Does not
2033 apply when working around 05000074.
2034 (define_insn_reservation storep_anomaly_05000074): New.
2035 (define_insn_reservation storei): Does not apply when working
2037 (define_insn_reservation storei_anomaly_05000074): New.
2038 (define_attr length): Add dsp32shiftimm case.
2039 (define_insn movsi_insn32, movsi_insv, ashlsi3_insn, ashrsi3,
2040 ror_one, rol_one, lshrsi3, lshrpdi3, ashrpdi3, movhiv2hi_low,
2041 movhiv2hi_high, composev2hi, packv2hi, movv2hi_hi,
2042 ssashiftv2hi3, ssashifthi3, ssashiftsi3, lshiftv2hi3, lshifthi3):
2043 Set type as dsp32shiftimm for dsp32shiftimm alternatives.
2045 2009-09-07 Martin Jambor <mjambor@suse.cz>
2048 * tree-sra.c (create_artificial_child_access): Return NULL if
2049 build_ref_for_offset fails.
2050 (propagate_subacesses_accross_link): Allow build_ref_for_offset
2051 and create_artificial_child_access to fail.
2053 2009-09-06 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2056 * unwind-dw2.c (uw_init_context_1): Mark noinline.
2057 * config/ia64/unwind-ia64.c (uw_init_context_1): Likewise.
2058 * config/xtensa/unwind-dw2-xtensa.c (uw_init_context_1): Likewise.
2060 2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com>
2062 * config/bfin/bfin.c (bfin_optimize_loop): When creating a new basic
2063 block, ensure it has an exit edge. Emit a barrier after a jump.
2065 2009-09-07 Nick Clifton <nickc@redhat.com>
2067 * gcc.c (this_is_linker_script): New variable. Like
2068 this_is_library_file but for the %T constructor.
2069 (end_going_arg): If this_is_linker_script is set then locate the
2070 script and insert a --script switch before it
2071 (do_spec_2): Initialise this_is_linker_script.
2072 (do_spec_1): Likewise. Handle %T construct.
2073 (eval_spec_function): Preserve this_is_linker_script.
2074 * doc/invoke.texi: Document %T construct in spec files.
2075 * config/m32c/m32c.h (LIB_SPEC): Use it.
2077 2009-09-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2079 * rtl.h (PREFETCH_SCHEDULE_BARRIER_P): New macro.
2080 * sched-deps.c (sched_analyze_2): Make prefetches a hard barrier
2081 when volatile flag is set.
2082 * doc/rtl.texi (PREFETCH_SCHEDULE_BARRIER_P): Add documentation pieces.
2084 2009-09-06 Eric Botcazou <ebotcazou@adacore.com>
2087 * combine-stack-adj.c (try_apply_stack_adjustment): Handle stores.
2088 (combine_stack_adjustments_for_block): Allow insns between stack
2089 adjustments and stores with corresponding pre-(dec|inc)rement or
2090 pre-modify operation.
2092 2009-09-06 Jakub Jelinek <jakub@redhat.com>
2095 * combine-stack-adj.c (struct csa_memlist): Rename to...
2096 (struct csa_reflist): ... this. Rename mem field to ref.
2097 (free_csa_memlist): Rename to...
2098 (free_csa_reflist): ... this.
2099 (record_one_stack_memref): Rename to...
2100 (record_one_stack_ref): ... this. Handle also REG_P.
2101 (try_apply_stack_adjustment): Handle also REG_P.
2102 (struct record_stack_memrefs_data): Rename to...
2103 (struct record_stack_refs_data): ... this. Rename memlist field to
2105 (record_stack_memrefs): Rename to...
2106 (record_stack_refs): ... this. For DEBUG_INSNs keep traversing
2107 subexpressions instead of failing when a MEM contains SP references.
2108 For SP itself in DEBUG_INSNs queue it also onto reflist chain.
2109 (combine_stack_adjustments_for_block): Adjust for mem to ref renaming.
2111 2009-09-06 Richard Guenther <rguenther@suse.de>
2114 * tree.c (build_array_type): Do not record types marked
2115 with structural equality in the canonical type hashtable.
2117 2009-09-06 Richard Guenther <rguenther@suse.de>
2120 * tree-ssa-alias.c (refs_may_alias_p_1): Bail out for function decls.
2122 2009-09-05 Richard Guenther <rguenther@suse.de>
2125 * tree-ssa-ccp.c (maybe_fold_stmt_addition): Use the correct type.
2127 2009-09-05 Richard Guenther <rguenther@suse.de>
2130 * tree-ssa-operands.c (get_tmr_operands): Pass through opf_no_vops.
2132 2009-09-05 Richard Guenther <rguenther@suse.de>
2135 * tree-ssa.c (useless_type_conversion_p): Drop qualifiers
2136 before comparing function argument types.
2138 2009-09-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2141 * config/i386/mingw-w64.h (ASM_SPEC): Pass -v instead of -V to
2144 2009-09-04 Uros Bizjak <ubizjak@gmail.com>
2147 2009-08-18 Uros Bizjak <ubizjak@gmail.com>
2149 * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Allocate insn
2150 locators before emit_insn is called.
2152 2009-09-04 Vladimir Makarov <vmakarov@redhat.com>
2155 * ira.c (update_equiv_reg): Revert my previous patch for the PR.
2156 * reginfo.c (resize_reg_info): Call allocate_reg_info if necessary.
2157 (reginfo_init): Don't call allocate_reg_info.
2159 2009-09-04 Uros Bizjak <ubizjak@gmail.com>
2162 * config/alpha/alpha.c (alpha_does_function_need_gp): Use
2163 NONDEBUG_INSN_P instead of INSN_P.
2165 2009-09-04 Alexandre Oliva <aoliva@redhat.com>
2168 * tree-vect-stmts.c (vect_stmt_relevant_p): Skip debug uses.
2170 2009-09-04 Alexandre Oliva <aoliva@redhat.com>
2173 * config/arm/vfp.md (*cmpdf_split_vfp): Fix src mode in the second
2174 pattern of the split.
2176 2009-09-04 Alexandre Oliva <aoliva@redhat.com>
2178 * toplev.c (process_options): Move setter of flag_var_tracking
2179 before other tests that depend on it. Move down setter of
2180 flag_rename_registers. Don't enable var-tracking-assignments
2181 by default if selective scheduling is enabled. Warn if both
2184 2009-09-04 Alexandre Oliva <aoliva@redhat.com>
2186 * var-tracking.c (dv_is_decl_p): Adjust NULL behavior to match
2187 comment. Use switch statement to catch overlaps between rtx
2188 and tree codes. Accept FUNCTION_DECLs in addition to those in...
2189 (IS_DECL_CODE): ... here. Remove.
2190 (check_value_is_not_decl): Remove.
2191 (dv_from_decl, dv_from_value): Check after conversion.
2193 2009-09-04 Richard Guenther <rguenther@suse.de>
2196 * (cgraph_finalize_compilation_unit): Move finalizing aliases
2197 after emitting tunks. Move emitting thunks and ctors from ...
2198 (cgraph_optimize): ... here. Remove redundant
2199 cgraph_analyze_functions.
2200 * varasm.c (find_decl_and_mark_needed): Remove no longer
2202 (finish_aliases_1): Adjust check for thunk aliases.
2204 2009-09-04 Daniel Gutson <dgutson@codesourcery.com>
2206 * config/arm/arm.md (ctzsi2): Added braces
2207 to avoid warning that broke booststrap.
2209 2009-09-04 Martin Jambor <mjambor@suse.cz>
2211 PR tree-optimization/41112
2212 * tree-sra.c (build_ref_for_offset_1): Signal that we cannot
2213 handle variable-bounded arrays.
2214 (expr_with_var_bounded_array_refs_p): New function.
2215 (analyze_access_subtree): Call expr_with_var_bounded_array_refs_p.
2217 2009-09-04 Wolfgang Gellerich <gellerich@de.ibm.com>
2219 * config/s390/2097.md: Removed two incorrect bypasses.
2220 (z10_fsimpdf): Fixed latency.
2221 (z10_fhex): New insn_reservation.
2222 (z10_floaddf): Fixed latency.
2223 (z10_floadsf): Fixed latency.
2224 (z10_ftrunctf): Fixed latency.
2225 (z10_ftruncdf): Fixed latency.
2226 * config/s390/s390.c (z10_cost): Fixed values.
2227 (s390_adjust_priority): Added z10 path.
2228 * config/s390/s390.md (type): Added fhex.
2229 (*mov<mode>_64dfp): Updated type attribute.
2230 (*mov<mode>_64): Updated type attribute.
2231 (*mov<mode>_31): Updated type attribute.
2232 (*mov<mode>"): Likewise.
2233 * config/s390/2084.md (x_fsimpdf): Updated condition.
2235 2009-09-04 Andreas Krebbel <krebbel1@de.ibm.com>
2237 * config/s390/s390.md ("*fmadd<mode>", "*fmsub<mode>"): Enable mem
2238 RTXs in the predicate for operand 1.
2240 2009-09-03 Daniel Gutson <dgutson@codesourcery.com>
2242 * config/arm/arm.md (UNSPEC_RBIT): New constant.
2243 (rbitsi2): New insn.
2244 (ctzsi2): New expand.
2245 * config/arm/arm.h (CTZ_DEFINED_VALUE_AT_ZERO): New macro.
2247 2009-09-03 Martin Jambor <mjambor@suse.cz>
2249 * tree-sra.c (duplicate_expr_for_different_base): Removed.
2250 (create_artificial_child_access): Use build_ref_for_offset instead
2251 of duplicate_expr_for_different_base.
2252 (propagate_subacesses_accross_link): Likewise.
2254 2009-09-03 Richard Sandiford <rdsandiford@googlemail.com>
2256 * config/mips/mips.c (USEFUL_INSN_P): Use NONDEBUG_INSN_P instead
2258 (mips16e_collect_argument_saves): Skip debug instructions.
2259 (mips_74k_agen_init): Use CALL_P || JUMP_P instead of !NONJUMP_INSN_P.
2260 (mips16_lay_out_constants): Use USEFUL_INSN_P instead of INSN_P.
2261 (r10k_insert_cache_barriers): Likewise.
2262 (mips_reorg_process_insns): Likewise.
2264 2009-09-03 Vladimir Makarov <vmakarov@redhat.com>
2267 * ira.c (update_equiv_reg): Remove check on class likely spill.
2269 2009-09-03 Jakub Jelinek <jakub@redhat.com>
2272 * dwarf2out.c (loc_descriptor): Don't use SUBREG_REG macro on
2273 SIGN_EXTEND or ZERO_EXTEND. Don't assume there is a REG inside of
2277 * function.c (assign_parm_find_stack_rtl): Don't set mem attributes on
2278 the stack slot if it is passed by invisible reference.
2279 * var-tracking.c (vt_add_function_parameters): Handle arguments passed
2280 by invisible reference.
2282 2009-09-03 Bernd Schmidt <bernd.schmidt@analog.com>
2284 * config/bfin/linux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
2285 * config/bfin/uclinux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
2286 * config/bfin/bfin.h (TARGET_SUPPORTS_SYNC_CALLS): Provide default of
2288 * config/bfin/sync.md: New file.
2289 * config/bfin/bfin.md: Include it.
2290 (UNSPEC_ATOMIC): New.
2291 (UNSPEC_ONES): Provide a unique number.
2293 From Jie Zhang <jie.zhang@analog.com>:
2294 * config/bfin/bfin.c (ret_regs): New.
2295 (must_save_fp_p): Don't return true because of frame_pointer_needed.
2296 (must_save_rets_p): New.
2297 (n_regs_saved_by_prologue): Use must_save_rets_p instead of
2298 current_function_is_leaf.
2299 (do_link): Likewise.
2300 (do_unlink): Likewise.
2301 (expand_interrupt_handler_prologue): Use ret_regs array.
2302 (expand_interrupt_handler_epilogue): Use ret_regs array and
2303 pass return register to gen_return_internal.
2304 (bfin_expand_epilogue): Pass return register to
2305 gen_return_internal.
2306 (bfin_expand_call): Explicitly clobber RETS.
2307 * config/bfin/bfin.h (FUNCTION_RETURN_REGISTERS): Define.
2308 * config/bfin/bfin.md (call_symbol_fdpic, call_value_symbol_fdpic,
2309 call_insn_fdpic, call_value_insn_fdpic, call_symbol,
2310 call_value_symbol, call_insn, call_value_insn): Explicitly clobber
2312 (return_internal): Take a reg rtx rather than the register number.
2314 2009-09-03 H.J. Lu <hongjiu.lu@intel.com>
2316 * tree-parloops.c (parallelize_loops): Cast to HOST_WIDE_INT
2317 when comparing against estimated_loop_iterations_int return.
2319 2009-09-03 Richard Guenther <rguenther@suse.de>
2321 * dwarf2out.c (dwarf2out_do_cfi_asm): Remove check of
2322 eh_personality_libfunc.
2324 2009-09-03 Razya Ladelsky <razya@il.ibm.com>
2326 * tree-parloops.c (separate_decls_in_region): Add space.
2328 2009-09-03 Razya Ladelsky <razya@il.ibm.com>
2330 * tree-parloops.c (separate_decls_in_region): Change the condition
2331 checking if there are reductions in the loop.
2333 2009-09-03 Razya Ladelsky <razya@il.ibm.com>
2335 PR tree-optimization/38275
2336 * tree-parloops.c (parallelize_loops): Replace profitability condition
2337 for expected number of iterations.
2339 2009-09-03 Alexandre Oliva <aoliva@redhat.com>
2341 * doc/invoke.texi (BUILD_CONFIG): Document --with-build-config.
2342 (bootstrap-debug): Explain conditions in which it becomes default.
2343 (bootstrap-debug-big): Rather than duplicate bootstrap-debug,
2346 2009-09-03 Namhyung Kim <namhyung@gmail.com>
2348 * doc/invoke.texi (Optimize Options): Move
2349 -finline-small-functions to the -O2 list.
2351 2009-09-03 Alexandre Oliva <aoliva@redhat.com>
2353 * toplev.c (process_options): Enable var-tracking-assignments
2354 by default if var-tracking is enabled.
2356 2009-09-02 David Daney <ddaney@caviumnetworks.com>
2358 * cfgbuild.c (find_bb_boundaries): Split blocks containing a
2360 * emit-rtl.c (prev_nonnote_insn_bb): New function.
2361 * rtl.h (prev_nonnote_insn_bb): Declare it.
2363 2009-09-03 Diego Novillo <dnovillo@google.com>
2365 * cgraph.c (cgraph_node_for_decl): New.
2366 * cgraph.h (cgraph_node_for_decl): Declare.
2367 * tree.c (host_integerp): Return 0 if T is NULL.
2369 2009-09-03 Diego Novillo <dnovillo@google.com>
2371 * tree.h (struct alias_pair): Move from varasm.c.
2372 (alias_pairs): Likewise.
2373 (TYPE_MAXVAL): Define.
2374 (TYPE_MINVAL): Define.
2375 (iterative_hash_host_wide_int): Declare.
2376 (remove_unreachable_alias_pairs): Declare.
2377 * tree-pass.h (pass_ipa_free_lang_data): Declare.
2378 * diagnostic.c (default_diagnostic_starter): Make extern.
2379 (default_diagnostic_finalizer): Make extern.
2380 * diagnostic.h (default_diagnostic_starter): Declare.
2381 (default_diagnostic_finalizer): Declare.
2382 (default_tree_printer): Declare.
2383 * toplev.c (default_tree_printer): Make extern.
2385 2009-09-03 Richard Guenther <rguenther@suse.de>
2386 Diego Novillo <dnovillo@google.com>
2388 * cgraph.c (cgraph_add_new_function): Remove gimplification.
2389 * cgraphunit.c (cgraph_expand_function): Do not emit
2390 associated thunks from here.
2391 (cgraph_emit_thunks): New.
2392 (cgraph_optimize): Call it.
2393 Return if any IPA pass finds an error.
2394 * varasm.c (finish_aliases_1): Ignore errorneous aliases used
2397 2009-09-03 Simon Baldwin <simonb@google.com>
2398 Rafael Espindola <espindola@google.com>
2399 Richard Guenther <rguenther@suse.de>
2400 Doug Kwan <dougkwan@google.com>
2401 Diego Novillo <dnovillo@google.com>
2403 * tree.c: Include tree-pass.h, langhooks-def.h,
2404 diagnostic.h, cgraph.h, timevar.h, except.h and debug.h.
2405 (free_lang_data_in_type): New.
2406 (need_assembler_name_p): New.
2407 (free_lang_data_in_block): New.
2408 (free_lang_data_in_decl): New.
2409 (struct free_lang_data_d): New.
2410 (add_tree_to_fld_list): New.
2411 (find_decls_types_r): New.
2412 (get_eh_types_for_runtime): New.
2413 (find_decls_types_in_eh_region): New.
2414 (find_decls_types_in_node): New.
2415 (find_decls_types_in_var): New.
2416 (free_lang_data_in_cgraph): New.
2417 (free_lang_data): New.
2418 (gate_free_lang_data): New.
2419 (pass_ipa_free_lang_data): New.
2421 2009-09-03 Diego Novillo <dnovillo@google.com>
2423 * timevar.def (TV_IPA_FREE_LANG_DATA): Define.
2424 * langhooks.h (struct lang_hooks): Add field free_lang_data.
2425 (lang_hooks): Remove const qualifier.
2426 * ipa.c (cgraph_remove_unreachable_nodes): Call
2427 remove_unreachable_alias_pairs.
2428 * except.c (add_type_for_runtime): Check if TYPE has
2429 already been converted.
2430 (lookup_type_for_runtime): Likewise.
2431 (check_handled): Handle converted types.
2432 * varasm.c (remove_unreachable_alias_pairs): New.
2433 * gimple.c: Include demangle.h.
2434 (gimple_decl_printable_name): New.
2435 (gimple_fold_obj_type_ref): New.
2436 * gimple.h (gimple_decl_printable_name): Declare.
2437 (gimple_fold_obj_type_ref): Declare.
2438 * passes.c (init_optimization_passes): Add pass
2439 pass_ipa_free_lang_data.
2440 * langhooks-def.h (LANG_HOOKS_FREE_LANG_DATA): Define.
2441 (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_FREE_LANG_DATA.
2443 2009-09-03 Diego Novillo <dnovillo@google.com>
2445 * c-lang.c (lang_hooks): Remove const qualifier.
2447 2009-09-02 Loren James Rittle <ljrittle@acm.org>
2449 * doc/install.texi (*-*-freebsd*): Update target information.
2451 2009-09-02 Anatoly Sokolov <aesok@post.ru>
2453 * hard-reg-set.h (call_fixed_regs): Remove.
2454 * reginfo.c (call_fixed_regs): Remove.
2455 (init_reg_sets_1): Remove initialization of call_fixed_regs.
2456 (globalize_reg): Don't use call_fixed_regs.
2457 * caller-save.c (init_caller_save): Use call_fixed_reg_set instead of
2460 2009-09-01 Michael Matz <matz@suse.de>
2462 * expr.h (emit_storent_insn, expand_expr_real_1,
2463 expand_expr_real_2): Declare.
2464 * expr.c (emit_storent_insn, expand_expr_real_1,
2465 expand_expr_real_2): Export.
2466 (store_expr): Setting and evaluating dont_return_target is useless.
2467 (expand_expr_real_1, <case GOTO_EXPR, RETURN_EXPR, SWITCH_EXPR,
2468 LABEL_EXPR and ASM_EXPR>): Move to gcc_unreachable.
2469 * except.c (expand_resx_expr): Rename to ...
2470 (expand_resx_stmt): ... this. Rewrite to take gimple statement.
2471 * except.h (expand_resx_stmt): Declare.
2472 * stmt.c: Add include gimple.h
2473 (expand_asm_expr): Rename to ...
2474 (expand_asm_stmt): ... this. Rewrite to take gimple statement.
2475 (expand_case): Rewrite to take gimple statement.
2476 * tree.h (expand_asm_stmt): Declare.
2477 (expand_case): Change prototype.
2478 * Makefile.in (stmt.o): Depend on gimple.h.
2479 * builtins.c (expand_builtin_synchronize): Build gimple asm
2480 statement, not an ASM_EXPR.
2481 * cfgexpand.c (gimple_cond_pred_to_tree, set_expr_location_r,
2482 gimple_to_tree, release_stmt_tree): Remove.
2483 (expand_gimple_cond): Don't call gimple_cond_pred_to_tree or
2484 ggc_free, but hold comparison code and operands separately.
2485 Call jumpif_1 and jumpifnot_1 instead of jumpif and jumpifnot.
2486 (expand_call_stmt, expand_gimple_stmt_1,
2487 expand_gimple_stmt): New helpers.
2488 (expand_gimple_tailcall): Don't call gimple_to_tree, expand_expr_stmt,
2489 release_stmt_tree. Call expand_gimple_stmt instead.
2490 (expand_gimple_basic_block): Ditto.
2492 * calls.c (emit_call_1): Don't look at EH regions here, make
2493 fntree parameter useless.
2494 (expand_call): New local rettype for TREE_TYPE(exp), use it
2495 throughout. Remove local p, use addr instead.
2496 Don't look at EH regions here.
2498 2009-09-02 Vladimir Makarov <vmakarov@redhat.com>
2500 * doc/invoke.texi (-fsched-pressure): Document it.
2501 (-fsched-reg-pressure-heuristic): Remove it.
2503 * reload.c (ira.h): Include.
2504 (find_reloads): Add choosing reload on number of small spilled
2507 * haifa-sched.c (ira.h): Include.
2508 (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure,
2509 saved_reg_pressure, curr_reg_live, saved_reg_live,
2510 region_ref_regs): New variables.
2511 (sched_init_region_reg_pressure_info, mark_regno_birth_or_death,
2512 initiate_reg_pressure_info, setup_ref_regs,
2513 initiate_bb_reg_pressure_info, save_reg_pressure,
2514 restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New
2516 (setup_insn_reg_pressure_info): New function.
2517 (rank_for_schedule): Add pressure checking and insn issue time.
2518 Remove comparison of insn reg weights.
2519 (ready_sort): Set insn reg pressure info.
2520 (update_register_pressure, setup_insn_max_reg_pressure,
2521 update_reg_and_insn_max_reg_pressure,
2522 sched_setup_bb_reg_pressure_info): New functions.
2523 (schedule_insn): Add code for printing and updating reg pressure info.
2524 (find_set_reg_weight, find_insn_reg_weight): Remove.
2525 (ok_for_early_queue_removal): Do nothing if pressure_only_p.
2526 (debug_ready_list): Print reg pressure info.
2527 (schedule_block): Ditto. Check insn issue time.
2528 (sched_init): Set up sched_pressure_p. Allocate and set up some
2529 reg pressure related info.
2530 (sched_finish): Free some reg pressure related info.
2531 (fix_tick_ready): Make insn always ready if pressure_p.
2532 (init_h_i_d): Don't call find_insn_reg_weight.
2533 (haifa_finish_h_i_d): Free insn reg pressure info.
2535 * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
2536 ira_memory_move_cost, ira_class_hard_regs,
2537 ira_class_hard_regs_num, ira_no_alloc_regs,
2538 ira_available_class_regs, ira_reg_class_cover_size,
2539 ira_reg_class_cover, ira_class_translate): Move to ira.h.
2541 * ira-lives.c (single_reg_class): Check mode to find how many
2542 registers are necessary for operand.
2543 (ira_implicitly_set_insn_hard_regs): New.
2545 * common.opt (fsched-pressure): New options.
2546 (fsched-reg-pressure-heuristic): Remove.
2548 * ira.c (setup_eliminable_regset): Rename to
2549 ira_setup_eliminable_regset. Make it external.
2550 (expand_reg_info): Pass cover class to setup_reg_classes.
2551 (ira): Call resize_reg_info instead of allocate_reg_info.
2553 * sched-deps.c: Include ira.h.
2554 (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New.
2555 (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses,
2556 reg_pressure_info, insn_use_p, mark_insn_pseudo_birth,
2557 mark_insn_hard_regno_birth, mark_insn_reg_birth,
2558 mark_pseudo_death, mark_hard_regno_death, mark_reg_death,
2559 mark_insn_reg_store, mark_insn_reg_clobber,
2560 setup_insn_reg_pressure_info): New.
2561 (sched_analyze_1): Update implicit_reg_pending_uses.
2562 (sched_analyze_insn): Find implicit sets, uses, clobbers of regs.
2563 Use them to create dependencies. Set insn reg uses and pressure
2564 info. Process reg_pending_uses in one place.
2565 (free_deps): Free implicit sets.
2566 (remove_from_deps): Remove implicit sets if necessary. Check
2567 implicit sets when clearing reg_last_in_use.
2568 (init_deps_global): Clear implicit_reg_pending_clobbers and
2569 implicit_reg_pending_uses.
2571 * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
2572 ira_memory_move_cost, ira_class_hard_regs,
2573 ira_class_hard_regs_num, ira_no_alloc_regs,
2574 ira_available_class_regs, ira_reg_class_cover_size,
2575 ira_reg_class_cover, ira_class_translate): Move from ira-int.h.
2576 (ira_setup_eliminable_regset, ira_set_pseudo_classes,
2577 ira_implicitly_set_insn_hard_regs): New prototypes.
2579 * ira-costs.c (pseudo_classes_defined_p, allocno_p,
2580 cost_elements_num): New variables.
2581 (allocno_costs, total_costs): Rename to costs and
2582 total_allocno_costs.
2583 (COSTS_OF_ALLOCNO): Rename to COSTS.
2584 (allocno_pref): Rename to pref.
2585 (allocno_pref_buffer): Rename to pref_buffer.
2586 (common_classes): Rename to regno_cover_class.
2588 (record_reg_classes): Set allocno attributes only if allocno_p.
2589 (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM.
2590 (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM
2591 and COSTS_OF_ALLOCNO.
2592 (print_costs): Rename to print_allocno_costs.
2593 (print_pseudo_costs): New.
2594 (process_bb_node_for_costs): Split into 2 functions with new
2595 function process_bb_for_costs. Pass BB to process_bb_for_costs.
2596 (find_allocno_class_costs): Rename to find_costs_and_classes. Add
2597 new parameter dump_file. Use cost_elements_num instead of
2598 ira_allocnos_num. Make one iteration if preferred classes were
2599 already calculated for scheduler. Make 2 versions of code
2600 depending on allocno_p.
2601 (setup_allocno_cover_class_and_costs): Check allocno_p. Use
2602 regno_cover_class and COSTS instead of common_classes and
2604 (init_costs, finish_costs): New.
2605 (ira_costs): Set up allocno_p and cost_elements_num. Call
2606 init_costs and finish_costs.
2607 (ira_set_pseudo_classes): New.
2609 * rtl.h (allocate_reg_info): Remove.
2610 (resize_reg_info): Change return type.
2611 (reg_cover_class): New.
2612 (setup_reg_classes): Add new parameter.
2614 * sched-int.h (struct deps_reg): New member implicit_sets.
2615 (sched_pressure_p, sched_regno_cover_class): New external definitions.
2616 (INCREASE_BITS): New macro.
2617 (struct reg_pressure_data, struct reg_use_data): New.
2618 (struct _haifa_insn_data): Remove reg_weight. Add members
2619 reg_pressure, reg_use_list, reg_set_list, and
2620 reg_pressure_excess_cost_change.
2621 (struct deps): New member implicit_sets.
2622 (pressure_p): New variable.
2623 (COVER_CLASS_BITS, INCREASE_BITS): New macros.
2624 (struct reg_pressure_data, struct reg_use_data): New.
2625 (INSN_REG_WEIGHT): Remove.
2626 (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST,
2627 INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros.
2628 (sched_init_region_reg_pressure_info,
2629 sched_setup_bb_reg_pressure_info): New prototypes.
2631 * reginfo.c (struct reg_pref): New member coverclass.
2632 (reg_cover_class): New function.
2633 (reginfo_init, pass_reginfo_init): Move after free_reg_info.
2634 (reg_info_size): New variable.
2635 (allocate_reg_info): Make static. Setup reg_info_size.
2636 (resize_reg_info): Use reg_info_size. Return flag of resizing.
2637 (setup_reg_classes): Add a new parameter. Setup cover class too.
2639 * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to
2642 * sched-rgn.c (deps_join): Set up implicit_sets.
2643 (schedule_region): Set up region and basic blocks pressure
2646 * passes.c (init_optimization_passes): Move
2647 pass_subregs_of_mode_init before pass_sched.
2649 2009-09-02 Martin Jambor <mjambor@suse.cz>
2651 * tree-sra.c (struct access): New field grp_hint.
2652 (dump_access): Dump grp_hint.
2653 (sort_and_splice_var_accesses): Set grp_hint if a group is read
2655 (analyze_access_subtree): Only scalarize accesses with grp_hint set or
2656 those which have been specifically read and somehow written to.
2657 (propagate_subacesses_accross_link): Set grp_hint of right child and
2658 also possibly of the left child.
2660 2009-09-02 Jakub Jelinek <jakub@redhat.com>
2662 * tree-object-size.c (addr_object_size): Always use object_size_type
2663 0 or 2 when determining the pointer pointed object size.
2665 2009-09-02 Richard Guenther <rguenther@suse.de>
2668 2009-08-31 Richard Guenther <rguenther@suse.de>
2670 * builtins.c (fold_builtin_memory_op): Use the alias oracle
2671 to query if the memory regions for memmove overlap.
2672 * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Relax the
2673 asserts on pointers, instead deal with odd trees.
2674 (ptr_derefs_may_alias_p): Likewise.
2675 (refs_may_alias_p_1): Constructor bases also never alias.
2677 2009-08-01 Christian Bruel <christian.bruel@st.com>
2680 2009-07-31 Christian Bruel <christian.bruel@st.com>
2681 * gcc/config.gcc (sh*-*-elf): test with_libgloss.
2683 2009-09-01 Alexandre Oliva <aoliva@redhat.com>
2685 * doc/invoke.texi (-fvar-tracking-assignments): New.
2686 (-fvar-tracking-assignments-toggle): New.
2687 (-fdump-final-insns=file): Mark filename as optional.
2688 (--param min-nondebug-insn-uid): New.
2689 (-gdwarf-@{version}): Mention version 4.
2690 * opts.c (common_handle_option): Accept it.
2691 * tree-vrp.c (find_assert_locations_1): Skip debug stmts.
2692 * regrename.c (regrename_optimize): Drop last. Don't count debug
2693 insns as uses. Don't reject change because of debug insn.
2694 (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno
2695 from the chain starter, and check for inexact matches in DEBUG_INSNS.
2696 (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs.
2697 (build_def_use): Simplify and fix the marking of DEBUG_INSNs.
2698 * sched-ebb.c (schedule_ebbs): Skip boundary debug insns.
2699 * fwprop.c (forward_propagate_and_simplify): ...into debug insns.
2700 * doc/gimple.texi (is_gimple_debug): New.
2701 (gimple_debug_bind_p): New.
2702 (is_gimple_call, gimple_assign_cast_p): End sentence with period.
2703 * doc/install.texi (bootstrap-debug): More details.
2704 (bootstrap-debug-big, bootstrap-debug-lean): Document.
2705 (bootstrap-debug-lib): More details.
2706 (bootstrap-debug-ckovw): Update.
2707 (bootstrap-time): New.
2708 * tree-into-ssa.c (mark_def_sites): Skip debug stmts.
2709 (insert_phi_nodes_for): Insert debug stmts.
2710 (rewrite_stmt): Take iterator. Insert debug stmts.
2711 (rewrite_enter_block): Adjust.
2712 (maybe_replace_use_in_debug_stmt): New.
2713 (rewrite_update_stmt): Use it.
2714 (mark_use_interesting): Return early for debug stmts.
2715 * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug
2716 stmts before replacing stmt.
2717 (move_computations_stmt): Likewise.
2718 * ira-conflicts.c (add_copies): Skip debug insns.
2719 * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns.
2720 (regstat_bb_compute_ri): Skip debug insns.
2721 * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts.
2722 * tree-ssa-loop-manip.c (find_uses_to_rename_stmt,
2723 check_loop_closed_ssa_stmt): Skip debug stmts.
2724 * tree-tailcall.c (find_tail_calls): Likewise.
2725 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise.
2726 * tree.h (MAY_HAVE_DEBUG_STMTS): New.
2727 (build_var_debug_value_stat): Declare.
2728 (build_var_debug_value): Define.
2729 (target_for_debug_bind): Declare.
2730 * reload.c (find_equiv_reg): Skip debug insns.
2731 * rtlanal.c (reg_used_between_p): Skip debug insns.
2732 (side_effects_p): Likewise.
2733 (canonicalize_condition): Likewise.
2734 * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug
2735 insns never depend on debug insns.
2736 (create_ddg_dep_no_link): Likewise.
2737 (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns.
2738 Don't add inter-loop dependencies for debug insns.
2739 (build_intra_loop_deps): Likewise.
2740 (create_ddg): Count debug insns.
2741 * ddg.h (struct ddg::num_debug): New.
2742 (num_backargs): Pair up with previous int field.
2743 * diagnostic.c (diagnostic_report_diagnostic): Skip notes on
2744 -fcompare-debug-second.
2745 * final.c (get_attr_length_1): Skip debug insns.
2746 (rest_of_clean-state): Don't dump CFA_RESTORE_STATE.
2747 * gcc.c (invoke_as): Call compare-debug-dump-opt.
2748 (driver_self_specs): Map -fdump-final-insns to
2749 -fdump-final-insns=..
2750 (get_local_tick): New.
2751 (compare_debug_dump_opt_spec_function): Test for . argument and
2752 compute output name. Compute temp output spec without flag name.
2753 Compute -frandom-seed.
2754 (OPT): Undef after use.
2755 * cfgloopanal.c (num_loop_insns): Skip debug insns.
2756 (average_num_loop_insns): Likewise.
2757 * params.h (MIN_NONDEBUG_INSN_UID): New.
2758 * gimple.def (GIMPLE_DEBUG): New.
2759 * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts.
2760 * auto-inc-dec.c (merge_in_block): Skip debug insns.
2761 (merge_in_block): Fix whitespace.
2762 * toplev.c (flag_var_tracking): Update comment.
2763 (flag_var_tracking_assignments): New.
2764 (flag_var_tracking_assignments_toggle): New.
2765 (process_options): Don't open final insns dump file if we're not
2766 going to write to it. Compute defaults for var_tracking.
2767 * df-scan.c (df_insn_rescan_debug_internal): New.
2768 (df_uses_record): Handle debug insns.
2769 * haifa-sched.c (ready): Initialize n_debug.
2770 (contributes_to_priority): Skip debug insns.
2771 (dep_list_size): New.
2773 (rank_for_schedule): Likewise. Schedule debug insns as soon as
2774 they're ready. Disregard previous debug insns to make decisions.
2775 (queue_insn): Never queue debug insns.
2776 (ready_add, ready_remove_first, ready_remove): Count debug insns.
2777 (schedule_insn): Don't reject debug insns because of issue rate.
2778 (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns.
2779 (queue_to_ready): Skip and discount debug insns.
2780 (choose_ready): Let debug insns through.
2781 (schedule_block): Check boundary debug insns. Discount debug
2782 insns, schedule them early. Adjust whitespace.
2783 (set_priorities): Check for boundary debug insns.
2784 (add_jump_dependencies): Use dep_list_size.
2785 (prev_non_location_insn): New.
2786 (check_cfg): Use it.
2787 * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug
2789 (remove_unused_ivs): Reset debug stmts.
2790 * modulo-sched.c (const_iteration_count): Skip debug insns.
2791 (res_MII): Discount debug insns.
2792 (loop_single_full_bb_p): Skip debug insns.
2793 (sms_schedule): Likewise.
2794 (sms_schedule_by_order): Likewise.
2795 (ps_has_conflicts): Likewise.
2796 * caller-save.c (refmarker_fn): New.
2797 (save_call_clobbered_regs): Replace regs with saved mem in
2799 (mark_referenced_regs): Take pointer, mark and arg. Adjust.
2800 Call refmarker_fn mark for hardregnos.
2801 (mark_reg_as_referenced): New.
2802 (replace_reg_with_saved_mem): New.
2803 * ipa-pure-const.c (check_stmt): Skip debug stmts.
2804 * cse.c (cse_insn): Canonicalize debug insns. Skip them when
2806 (cse_extended_basic_block): Skip debug insns.
2807 (count_reg_usage): Likewise.
2808 (is_dead_reg): New, split out of...
2809 (set_live_p): ... here.
2810 (insn_live_p): Use it for debug insns.
2811 * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts.
2812 (execute_optimize_stdarg): Likewise.
2813 * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise.
2814 * tree-ssa-propagate.c (substitute_and_fold): Don't regard
2815 changes in debug stmts as changes.
2816 * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New.
2817 (moveup_expr): Don't move across debug insns. Don't move
2818 debug insn if it would create a bookkeeping block.
2819 (moveup_expr_cached): Don't use cache for debug insns that
2820 are heads of blocks.
2821 (compute_av_set_inside_bb): Skip debug insns.
2822 (sel_rank_for_schedule): Schedule debug insns first. Remove
2824 (block_valid_for_bookkeeping_p); Support lax searches.
2825 (create_block_for_bookkeeping): Adjust block numbers when
2826 encountering debug-only blocks.
2827 (find_place_for_bookkeeping): Deal with debug-only blocks.
2828 (generate_bookkeeping_insn): Accept no place to insert.
2829 (remove_temp_moveop_nops): New argument full_tidying.
2830 (prepare_place_to_insert): Deal with debug insns.
2831 (advance_state_on_fence): Debug insns don't start cycles.
2832 (update_boundaries): Take fence as argument. Deal with
2834 (schedule_expr_on_boundary): No full_tidying on debug insns.
2835 (fill_insns): Deal with debug insns.
2836 (track_scheduled_insns_and_blocks): Don't count debug insns.
2837 (need_nop_to_preserve_insn_bb): New, split out of...
2838 (remove_insn_from_stream): ... this.
2839 (fur_orig_expr_not_found): Skip debug insns.
2840 * rtl.def (VALUE): Move up.
2842 * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts.
2843 (nearest_common_dominator_of_uses): Take debug_stmts argument.
2844 Set it if debug stmts are found.
2845 (statement_sink_location): Skip debug stmts. Propagate
2846 moving defs into debug stmts.
2847 * ifcvt.c (first_active_insn): Skip debug insns.
2848 (last_active_insns): Likewise.
2849 (cond_exec_process_insns): Likewise.
2850 (noce_process_if_block): Likewise.
2851 (check_cond_move_block): Likewise.
2852 (cond_move_convert_if_block): Likewise.
2853 (block_jumps_and_fallthru_p): Likewise.
2854 (dead_or_predicable): Likewise.
2855 * dwarf2out.c (debug_str_hash_forced): New.
2856 (find_AT_string): Add comment.
2857 (gen_label_for_indirect_string): New.
2858 (get_debug_string_label): New.
2859 (AT_string_form): Use it.
2860 (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV,
2861 MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but
2862 discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and
2863 several operations that cannot be represented with DWARF opcodes.
2864 (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require
2865 dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value.
2866 (dwarf2out_var_location): Take during-call mark into account.
2867 (output_indirect_string): Update comment. Output if there are
2868 label and references.
2869 (prune_indirect_string): New.
2870 (prune_unused_types): Call it if debug_str_hash_forced.
2871 More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>:
2872 (dw_long_long_const): Remove.
2873 (struct dw_val_struct): Change val_long_long type to rtx.
2874 (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for
2875 val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair.
2876 (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each
2877 component instead of HOST_BITS_PER_LONG.
2878 (output_loc_operands): Likewise. For const8* assert
2879 HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64.
2880 (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT
2881 rather than HOST_BITS_PER_LONG is >= 64.
2882 (add_AT_long_long): Remove val_hi and val_lo arguments, add
2884 (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of
2885 HOST_BITS_PER_LONG for dw_val_class_long_long.
2886 (add_const_value_attribute): Adjust add_AT_long_long caller. Don't
2887 handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse.
2888 (dwarf_stack_op_name): Handle DW_OP_implicit_value and
2890 (size_of_loc_descr, output_loc_operands, output_loc_operands_raw):
2891 Handle DW_OP_implicit_value.
2892 (extract_int): Move prototype earlier.
2893 (mem_loc_descriptor): For SUBREG punt if inner
2894 mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND
2895 and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle
2896 EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN,
2897 UMAX, SIGN_EXTRACT, ZERO_EXTRACT.
2898 (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE
2899 instead of Pmode size.
2900 (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE,
2901 CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode,
2902 attempt to handle other expressions. Don't handle TLS SYMBOL_REFs.
2903 (concat_loc_descriptor, concatn_loc_descriptor,
2904 loc_descriptor_from_tree_1): Adjust loc_descriptor callers.
2905 (add_location_or_const_value_attribute): Likewise. For single
2906 location loc_lists attempt to use add_const_value_attribute
2907 for constant decls. Add DW_AT_const_value even if
2908 NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING
2910 * cfgbuild.c (inside_basic_block_p): Handle debug insns.
2911 (control_flow_insn_p): Likewise.
2912 * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt.
2913 (separate_decls_in_region_debug_bind): New.
2914 (separate_decls_in_region): Process debug bind stmts afterwards.
2915 * recog.c (verify_changes): Handle debug insns.
2916 (extract_insn): Likewise.
2917 (peephole2_optimize): Skip debug insns.
2918 * dse.c (scan_insn): Skip debug insns.
2919 * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument.
2921 (setup_id_for_insn): Handle debug insns.
2922 (maybe_tidy_empty_bb): Adjust whitespace.
2923 (tidy_control_flow): Skip debug insns.
2924 (sel_remove_insn): Adjust for debug insns.
2925 (sel_estimate_number_of_insns): Skip debug insns.
2926 (create_insn_rtx_from_pattern): Handle debug insns.
2927 (create_copy_of_insn_rtx): Likewise.
2928 * sel-sched-.h (sel_bb_end): Declare.
2929 (sel_bb_empty_or_nop_p): New.
2930 (get_all_loop_exits): Use it.
2931 (_eligible_successor_edge_p): Likewise.
2932 (return_nop_to_pool): Adjust.
2933 * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts.
2934 * ira-lives.c (process_bb_node_lives): Skip debug insns.
2935 * gimple-pretty-print.c (dump_gimple_debug): New.
2936 (dump_gimple_stmt): Use it.
2937 (dump_bb_header): Skip gimple debug stmts.
2938 * regmove.c (optimize_reg_copy_1): Discount debug insns.
2939 (fixup_match_2): Likewise.
2940 (regmove_backward_pass): Likewise. Simplify combined
2941 replacement. Handle debug insns.
2942 * function.c (instantiate_virtual_regs): Handle debug insns.
2943 * function.h (struct emit_status): Add x_cur_debug_insn_uid.
2944 * print-rtl.h: Include cselib.h.
2945 (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs.
2946 * df.h (df_inns_rescan_debug_internal): Declare.
2947 * gcse.c (alloc_hash_table): Estimate n_insns.
2948 (cprop_insn): Don't regard debug insns as changes.
2949 (bypass_conditional_jumps): Skip debug insns.
2950 (one_pre_gcse_pass): Adjust.
2951 (one_code_hoisting_pass): Likewise.
2952 (compute_ld_motion_mems): Skip debug insns.
2953 (one_cprop_pass): Adjust.
2954 * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts.
2955 (if_convertible_stmt_p): Handle debug stmts.
2956 * init-regs.c (initialize_uninitialized_regs): Skip debug insns.
2957 * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts.
2958 * ira-build.c (create_bb_allocnos): Skip debug insns.
2959 * tree-flow-inline.h (has_zero_uses): Discount debug stmts.
2960 (has_single_use): Likewise.
2961 (single_imm_use): Likewise.
2962 (num_imm_uses): Likewise.
2963 * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts.
2964 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts.
2965 (create_outofssa_var_map): Likewise.
2966 * lower-subreg.c (adjust_decomposed_uses): New.
2967 (resolve_debug): New.
2968 (decompose_multiword_subregs): Use it.
2969 * tree-dfa.c (find_referenced_vars): Skip debug stmts.
2970 * emit-rtl.c: Include params.h.
2971 (cur_debug_insn_uid): Define.
2972 (set_new_first_and_last_insn): Set cur_debug_insn_uid too.
2973 (copy_rtx_if_shared_1): Handle debug insns.
2974 (reset_used_flags): Likewise.
2975 (set_used_flags): LIkewise.
2976 (get_max_insn_count): New.
2977 (next_nondebug_insn): New.
2978 (prev_nondebug_insn): New.
2979 (make_debug_insn_raw): New.
2980 (emit_insn_before_noloc): Handle debug insns.
2981 (emit_jump_insn_before_noloc): Likewise.
2982 (emit_call_insn_before_noloc): Likewise.
2983 (emit_debug_insn_before_noloc): New.
2984 (emit_insn_after_noloc): Handle debug insns.
2985 (emit_jump_insn_after_noloc): Likewise.
2986 (emit_call_insn_after_noloc): Likewise.
2987 (emit_debug_insn_after_noloc): Likewise.
2988 (emit_insn_after): Take loc from earlier non-debug insn.
2989 (emit_jump_insn_after): Likewise.
2990 (emit_call_insn_after): Likewise.
2991 (emit_debug_insn_after_setloc): New.
2992 (emit_debug_insn_after): New.
2993 (emit_insn_before): Take loc from later non-debug insn.
2994 (emit_jump_insn_before): Likewise.
2995 (emit_call_insn_before): Likewise.
2996 (emit_debug_insn_before_setloc): New.
2997 (emit_debug_insn_before): New.
2998 (emit_insn): Handle debug insns.
2999 (emit_debug_insn): New.
3000 (emit_jump_insn): Handle debug insns.
3001 (emit_call_insn): Likewise.
3003 (init_emit): Take min-nondebug-insn-uid into account.
3004 Initialize cur_debug_insn_uid.
3005 (emit_copy_of_insn_after): Handle debug insns.
3006 * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite
3007 location of single rhs in place.
3008 (maybe_dump_rtl_for_gimple_stmt): Dump lineno.
3009 (floor_sdiv_adjust): New.
3010 (cell_sdiv_adjust): New.
3011 (cell_udiv_adjust): New.
3012 (round_sdiv_adjust): New.
3013 (round_udiv_adjust): New.
3014 (wrap_constant): Moved from cselib.
3015 (unwrap_constant): New.
3016 (expand_debug_expr): New.
3017 (expand_debug_locations): New.
3018 (expand_gimple_basic_block): Drop hiding redeclaration. Expand
3020 (gimple_expand_cfg): Expand debug locations.
3021 * cselib.c: Include tree-pass.h.
3022 (struct expand_value_data): New.
3023 (cselib_record_sets_hook): New.
3024 (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New.
3025 (cselib_clear_table): Move, and implemnet in terms of...
3026 (cselib_reset_table_with_next_value): ... this.
3027 (cselib_get_next_unknown_value): New.
3028 (discard_useless_locs): Don't discard preserved values.
3029 (cselib_preserve_value): New.
3030 (cselib_preserved_value_p): New.
3031 (cselib_preserve_definitely): New.
3032 (cselib_clear_preserve): New.
3033 (cselib_preserve_only_values): New.
3034 (new_cselib_val): Take rtx argument. Dump it in details.
3035 (cselib_lookup_mem): Adjust.
3036 (expand_loc): Take regs_active in struct. Adjust. Silence
3037 dumps unless details are requested.
3038 (cselib_expand_value_rtx_cb): New.
3039 (cselib_expand_value_rtx): Rename and reimplment in terms of...
3040 (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps
3041 without details. Copy more subregs. Try to resolve values
3042 using a callback. Wrap constants.
3043 (cselib_subst_to_values): Adjust.
3044 (cselib_log_lookup): New.
3045 (cselib_lookup): Call it.
3046 (cselib_invalidate_regno): Don't count preserved values as useless.
3047 (cselib_invalidate_mem): Likewise.
3048 (cselib_record_set): Likewise.
3049 (struct set): Renamed to cselib_set, moved to cselib.h.
3050 (cselib_record_sets): Adjust. Call hook.
3051 (cselib_process_insn): Reset table when it would be cleared.
3052 (dump_cselib_val): New.
3053 (dump_cselib_table): New.
3054 * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts.
3055 (remove_forwarder_block): Support moving debug stmts.
3056 * cselib.h (cselib_record_sets_hook): Declare.
3057 (cselib_expand_callback): New type.
3058 (cselib_expand_value_rtx_cb): Declare.
3059 (cselib_reset_table_with_next_value): Declare.
3060 (cselib_get_next_unknown_value): Declare.
3061 (cselib_preserve_value): Declare.
3062 (cselib_preserved_value_p): Declare.
3063 (cselib_preserve_only_values): Declare.
3064 (dump_cselib_table): Declare.
3065 * cfgcleanup.c (flow_find_cross_jump): Skip debug insns.
3066 (try_crossjump_to_edge): Likewise.
3067 (delete_unreachable_blocks): Remove dominant GIMPLE blocks after
3068 dominated blocks when debug stmts are present.
3069 * simplify-rtx.c (delegitimize_mem_from_attrs): New.
3070 * tree-ssa-live.c (remove_unused_locals): Skip debug stmts.
3071 (set_var_live_on_entry): Likewise.
3072 * loop-invariant.c (find_invariants_bb): Skip debug insns.
3073 * cfglayout.c (curr_location, last_location): Make static.
3074 (set_curr_insn_source_location): Don't avoid bouncing.
3075 (get_curr_insn_source_location): New.
3076 (get_curr_insn_block): New.
3077 (duplicate_insn_chain): Handle debug insns.
3078 * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate
3080 * common.opt (fcompare-debug): Move to sort order.
3081 (fdump-unnumbered-links): Likewise.
3082 (fvar-tracking-assignments): New.
3083 (fvar-tracking-assignments-toggle): New.
3084 * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks
3085 because of debug stmts.
3086 (mark_stmt_if_obviously_necessary): Mark debug stmts.
3087 (eliminate_unnecessary_stmts): Walk dominated blocks before
3089 * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts.
3090 * ira.c (memref_used_between_p): Skip debug insns.
3091 (update_equiv_regs): Likewise.
3092 * sched-deps.c (sd_lists_size): Accept empty list.
3093 (sd_init_insn): Mark debug insns.
3094 (sd_finish_insn): Unmark them.
3095 (sd_add_dep): Reject non-debug deps on debug insns.
3096 (fixup_sched_groups): Give debug insns group treatment.
3098 (sched_analyze_reg): Don't mark debug insns for sched before call.
3099 (sched_analyze_2): Handle debug insns.
3100 (sched_analyze_insn): Compute next non-debug insn. Handle debug
3102 (deps_analyze_insn): Handle debug insns.
3103 (deps_start_bb): Skip debug insns.
3104 (init_deps): Initialize last_debug_insn.
3105 * tree-ssa.c (target_for_debug_bind): New.
3106 (find_released_ssa_name): New.
3107 (propagate_var_def_into_debug_stmts): New.
3108 (propagate_defs_into_debug_stmts): New.
3109 (verify_ssa): Skip debug bind stmts without values.
3110 (warn_uninialized_vars): Skip debug stmts.
3111 * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default.
3112 * rtl.c (rtx_equal_p_cb): Handle VALUEs.
3113 (rtx_equal_p): Likewise.
3114 * ira-costs.c (scan_one_insn): Skip debug insns.
3115 (process_bb_node_for_hard_reg_moves): Likewise.
3116 * rtl.h (DEBUG_INSN_P): New.
3117 (NONDEBUG_INSN_P): New.
3118 (MAY_HAVE_DEBUG_INSNS): New.
3119 (INSN_P): Accept debug insns.
3120 (RTX_FRAME_RELATED_P): Likewise.
3121 (INSN_DELETED_P): Likewise
3122 (PAT_VAR_LOCATION_DECL): New.
3123 (PAT_VAR_LOCATION_LOC): New.
3124 (PAT_VAR_OCATION_STATUS): New.
3125 (NOTE_VAR_LOCATION_DECL): Reimplement.
3126 (NOTE_VAR_LOCATION_LOC): Likewise.
3127 (NOTE_VAR_LOCATION_STATUS): Likewise.
3128 (INSN_VAR_LOCATION): New.
3129 (INSN_VAR_LOCATION_DECL): New.
3130 (INSN_VAR_LOCATION_LOC): New.
3131 (INSN_VAR_LOCATION_STATUS): New.
3132 (gen_rtx_UNKNOWN_VAR_LOC): New.
3133 (VAR_LOC_UNKNOWN_P): New.
3134 (NOTE_DURING_CALL_P): New.
3135 (SCHED_GROUP_P): Accept debug insns.
3136 (emit_debug_insn_before): Declare.
3137 (emit_debug_insn_before_noloc): Declare.
3138 (emit_debug_insn_beore_setloc): Declare.
3139 (emit_debug_insn_after): Declare.
3140 (emit_debug_insn_after_noloc): Declare.
3141 (emit_debug_insn_after_setloc): Declare.
3142 (emit_debug_insn): Declare.
3143 (make_debug_insn_raw): Declare.
3144 (prev_nondebug_insn): Declare.
3145 (next_nondebug_insn): Declare.
3146 (delegitimize_mem_from_attrs): Declare.
3147 (get_max_insn_count): Declare.
3148 (wrap_constant): Declare.
3149 (unwrap_constant): Declare.
3150 (get_curr_insn_source_location): Declare.
3151 (get_curr_insn_block): Declare.
3152 * tree-inline.c (insert_debug_decl_map): New.
3153 (processing_debug_stmt): New.
3154 (remap_decl): Don't create new mappings in debug stmts.
3155 (remap_gimple_op_r): Don't add references in debug stmts.
3156 (copy_tree_body_r): Likewise.
3157 (remap_gimple_stmt): Handle debug bind stmts.
3158 (copy_bb): Skip debug stmts.
3159 (copy_edges_for_bb): Likewise.
3160 (copy_debug_stmt): New.
3161 (copy_debug_stmts): New.
3162 (copy_body): Copy debug stmts at the end.
3163 (insert_init_debug_bind): New.
3164 (insert_init_stmt): Take id. Skip and emit debug stmts.
3165 (setup_one_parameter): Remap variable earlier, register debug mapping.
3166 (estimate_num_insns): Skip debug stmts.
3167 (expand_call_inline): Preserve debug_map.
3168 (optimize_inline_calls): Check for no debug_stmts left-overs.
3169 (unsave_expr_now): Preserve debug_map.
3170 (copy_gimple_seq_and_replace_locals): Likewise.
3171 (tree_function_versioning): Check for no debug_stmts left-overs.
3172 Init and destroy debug_map as needed. Split edges unconditionally.
3173 (build_duplicate_type): Init and destroy debug_map as needed.
3174 * tree-inline.h: Include gimple.h instead of pointer-set.h.
3175 (struct copy_body_data): Add debug_stmts and debug_map.
3176 * sched-int.h (struct ready_list): Add n_debug.
3177 (struct deps): Add last_debug_insn.
3178 (DEBUG_INSN_SCHED_P): New.
3179 (BOUNDARY_DEBUG_INSN_P): New.
3180 (SCHEDULE_DEBUG_INSN_P): New.
3181 (sd_iterator_cond): Accept empty list.
3182 * combine.c (create_log_links): Skip debug insns.
3183 (combine_instructions): Likewise.
3184 (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the
3185 return value is always unshared.
3186 (struct rtx_subst_pair): New.
3187 (auto_adjust_pair): New.
3188 (propagate_for_debug_subst): New.
3189 (propagate_for_debug): New.
3190 (try_combine): Skip debug insns. Propagate removed defs into
3192 (next_nonnote_nondebug_insn): New.
3193 (distribute_notes): Use it. Skip debug insns.
3194 (distribute_links): Skip debug insns.
3195 * tree-outof-ssa.c (set_location_for_edge): Likewise.
3196 * resource.c (mark_target_live_regs): Likewise.
3197 * var-tracking.c: Include cselib.h and target.h.
3198 (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and
3200 (micro_operation_type_name): New.
3201 (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN.
3202 (struct micro_operation_def): Update comments.
3203 (decl_or_value): New type. Use instead of decls.
3204 (struct emit_note_data_def): Add vars.
3205 (struct attrs_def): Use decl_or_value.
3206 (struct variable_tracking_info_def): Add permp, flooded.
3207 (struct location_chain_def): Update comment.
3208 (struct variable_part_def): Use decl_or_value.
3209 (struct variable_def): Make var_part a variable length array.
3211 (scratch_regs): New.
3212 (cselib_hook_called): New.
3213 (dv_is_decl_p): New.
3214 (dv_is_value_p): New.
3217 (dv_as_opaque): New.
3218 (dv_onepart_p): New.
3220 (IS_DECL_CODE): New.
3221 (check_value_is_not_decl): New.
3222 (dv_from_decl): New.
3223 (dv_from_value): New.
3224 (dv_htab_hash): New.
3225 (variable_htab_hash): Use it.
3226 (variable_htab_eq): Support values.
3227 (variable_htab_free): Free from the right pool.
3228 (attrs_list_member, attrs_list_insert): Use decl_or_value.
3229 (attrs_list_union): Adjust.
3230 (attrs_list_mpdv_union): New.
3231 (tie_break_pointers): New.
3232 (canon_value_cmp): New.
3233 (unshare_variable): Return possibly-modified slot.
3234 (vars_copy_1): Adjust.
3235 (var_reg_decl_set): Adjust. Split out of...
3236 (var_reg_set): ... this.
3237 (get_init_value): Adjust.
3238 (var_reg_delete_and_set): Adjust.
3239 (var_reg_delete): Adjust.
3240 (var_regno_delete): Adjust.
3241 (var_mem_decl_set): Split out of...
3242 (var_mem_set): ... this.
3243 (var_mem_delete_and_set): Adjust.
3244 (var_mem_delete): Adjust.
3248 (variable_union): Adjust. Speed up merge of 1-part vars.
3249 (variable_canonicalize): Use unshared slot.
3250 (VALUED_RECURSED_INTO): New.
3251 (find_loc_in_1pdv): New.
3252 (struct dfset_merge): New.
3253 (insert_into_intersection): New.
3254 (intersect_loc_chains): New.
3256 (canonicalize_loc_order_check): New.
3257 (canonicalize_values_mark): New.
3258 (canonicalize_values_star): New.
3259 (variable_merge_over_cur): New.
3260 (variable_merge_over_src): New.
3261 (dataflow_set_merge): New.
3262 (dataflow_set_equiv_regs): New.
3263 (remove_duplicate_values): New.
3264 (struct dfset_post_merge): New.
3265 (variable_post_merge_new_vals): New.
3266 (variable_post_merge_perm_vals): New.
3267 (dataflow_post_merge_adjust): New.
3268 (find_mem_expr_in_1pdv): New.
3269 (dataflow_set_preserve_mem_locs): New.
3270 (dataflow_set_remove_mem_locs): New.
3271 (dataflow_set_clear_at_call): New.
3272 (onepart_variable_different_p): New.
3273 (variable_different_p): Use it.
3274 (dataflow_set_different_1): Adjust. Make detailed dump more verbose.
3275 (track_expr_p): Add need_rtl parameter. Don't generate rtl
3277 (track_loc_p): Pass it true.
3278 (struct count_use_info): New.
3279 (find_use_val): New.
3280 (replace_expr_with_values): New.
3282 (use_type): New, partially split out of...
3283 (count_uses): ... this. Count new micro-ops.
3284 (count_uses_1): Adjust.
3285 (count_stores): Adjust.
3286 (count_with_sets): New.
3287 (VAL_NEEDS_RESOLUTION): New.
3288 (VAL_HOLDS_TRACK_EXPR): New.
3289 (VAL_EXPR_IS_COPIED): New.
3290 (VAL_EXPR_IS_CLOBBERED): New.
3291 (add_uses): Adjust. Generate new micro-ops.
3292 (add_uses_1): Adjust.
3293 (add_stores): Generate new micro-ops.
3294 (add_with_sets): New.
3295 (find_src_status): Adjust.
3296 (find_src_set_src): Adjust.
3297 (compute_bb_dataflow): Use dataflow_set_clear_at_call.
3298 Handle new micro-ops. Canonicalize value equivalances.
3299 (vt_find_locations): Compute total size of hash tables for
3300 dumping. Perform merge for var-tracking-assignments. Don't
3301 disregard single-block loops.
3302 (dump_attrs_list): Handle decl_or_value.
3303 (dump_variable): Take variable. Deal with decl_or_value.
3304 (dump_variable_slot): New.
3305 (dump_vars): Use it.
3306 (dump_dataflow_sets): Adjust.
3307 (set_slot_part): New, extended to support one-part variables
3308 after splitting out of...
3309 (set_variable_part): ... this.
3310 (clobber_slot_part): New, split out of...
3311 (clobber_variable_part): ... this.
3312 (delete_slot_part): New, split out of...
3313 (delete_variable_part): .... this.
3314 (check_wrap_constant): New.
3315 (vt_expand_loc_callback): New.
3316 (vt_expand_loc): New.
3317 (emit_note_insn_var_location): Adjust. Handle values. Handle
3318 EMIT_NOTE_AFTER_CALL_INSN.
3319 (emit_notes_for_differences_1): Adjust. Handle values.
3320 (emit_notes_for_differences_2): Likewise.
3321 (emit_notes_for_differences): Adjust.
3322 (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes.
3323 Adjust. Handle new micro-ops.
3324 (vt_add_function_parameters): Adjust. Create and bind values.
3325 (vt_initialize): Adjust. Initialize scratch_regs and
3326 valvar_pool, flooded and perm.. Initialize and use cselib. Log
3327 operations. Move some code to count_with_sets and add_with_sets.
3328 (delete_debug_insns): New.
3329 (vt_debug_insns_local): New.
3330 (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish
3332 (var_tracking_main): If var-tracking-assignments is enabled
3333 but var-tracking isn't, delete debug insns and leave. Likewise
3334 if we exceed limits or fail the stack adjustments tests, and
3335 after all var-tracking processing.
3336 More in var-tracking, from Jakub Jelinek <jakub@redhat.com>:
3337 (dataflow_set): Add traversed_vars.
3338 (value_chain, const_value_chain): New typedefs.
3339 (value_chain_pool, value_chains): New variables.
3340 (value_chain_htab_hash, value_chain_htab_eq, add_value_chain,
3341 add_value_chains, add_cselib_value_chains, remove_value_chain,
3342 remove_value_chains, remove_cselib_value_chains): New functions.
3343 (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1,
3344 shared_hash_find_slot_noinsert_1, shared_hash_find_1): New