1 2009-09-22 Janis Johnson <janis187@us.ibm.com>
3 * config/i386/i386.c (ix86_scalar_mode_supported_p): Don't return
4 unconditional true for decimal float modes.
5 * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Ditto.
6 * config/s390/s390.c (s390_scalar_mode_supported_p): Ditto.
8 2009-09-22 Loren J. Rittle <ljrittle@acm.org>
10 * unwind-dw2-fde-glibc.c: Define and use USE_PT_GNU_EH_FRAME.
11 Enable a new case for __FreeBSD__ >= 7.
12 * crtstuff.c: Define USE_PT_GNU_EH_FRAME for __FreeBSD__ >= 7.
13 * config/t-freebsd: Define LIB2ADDEH and LIB2ADDEHDEP.
14 * config/freebsd-spec.h: Conditionally define LINK_EH_SPEC
17 * doc/install.texi (*-*-freebsd*): Update target information.
19 2009-09-22 Richard Guenther <rguenther@suse.de>
22 * tree-dfa.c (get_ref_base_and_extent): Handle trailing
23 arrays really properly.
25 2009-09-22 Richard Henderson <rth@redhat.com>
28 * target.h (struct gcc_target): Add asm_out.trampoline_template,
29 calls.static_chain, calls.trampoline_init,
30 calls.trampoline_adjust_address.
31 * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
32 (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
33 (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
34 * builtins.c (expand_builtin_setjmp_receiver): Use
35 targetm.calls.static_chain; only clobber registers.
36 (expand_builtin_init_trampoline): Use targetm.calls.trampoline_init;
37 set up memory attributes properly for the trampoline block.
38 (expand_builtin_adjust_trampoline): Use
39 targetm.calls.trampoline_adjust_address.
40 * calls.c (prepare_call_address): Add fndecl argument. Use
41 targetm.calls.static_chain.
42 * df-scan.c (df_need_static_chain_reg): Remove.
43 (df_get_entry_block_def_set): Use targetm.calls.static_chain;
44 consolodate static chain handling.
45 * doc/tm.texi: Document new hooks.
46 * emit-rtl.c (static_chain_rtx, static_chain_incoming_rtx): Remove.
47 (init_emit_regs): Don't initialize them.
48 * expr.h (prepare_call_address): Update decl.
49 * final.c (profile_function): Use targetm.calls.static_chain.
50 * function.c (expand_function_start): Likewise.
51 * rtl.h (static_chain_rtx, static_chain_incoming_rtx): Remove.
52 * stmt.c (expand_nl_goto_receiver): Use targetm.calls.static_chain;
53 only clobber registers.
54 * targhooks.c (default_static_chain): New.
55 (default_asm_trampoline_template, default_trampoline_init): New.
56 (default_trampoline_adjust_address): New.
57 * targhooks.h: Declare them.
58 * varasm.c (assemble_trampoline_template): Use
59 targetm.asm_out.trampoline_template. Make the memory block const
62 * config/alpha/alpha.c (alpha_trampoline_init): Rename from
63 alpha_initialize_trampoline. Make static. Merge VMS parameter
64 differences into the TARGET_ABI_OPEN_VMS code block.
65 (TARGET_TRAMPOLINE_INIT): New.
66 * config/alpha/alpha.h (TRAMPOLINE_TEMPLATE): Remove.
67 (TRAMPOLINE_SECTION, INITIALIZE_TRAMPOLINE): Remove.
68 * config/alpha/vms.h (TRAMPOLINE_SIZE, TRAMPOLINE_ALIGNMENT): Remove.
69 (INITIALIZE_TRAMPOLINE): Remove.
71 * config/arc/arc.h (TRAMPOLINE_ALIGNMENT): New.
72 (TRAMPOLINE_TEMPLATE): Merge with ...
73 (INITIALIZE_TRAMPOLINE): ... this and move ...
74 * config/arc/arc.c (arc_trampoline_init): ... here.
75 (TARGET_TRAMPOLINE_INIT): New.
77 * config/arm/arm.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
78 (TARGET_TRAMPOLINE_INIT, TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
79 (arm_asm_trampoline_template): New.
80 (arm_trampoline_init, arm_trampoline_adjust_address): New.
81 * config/arm/arm.h (TRAMPOLINE_TEMPLATE, ARM_TRAMPOLINE_TEMPLATE,
82 THUMB2_TRAMPOLINE_TEMPLATE, THUMB1_TRAMPOLINE_TEMPLATE): Move all
83 code to arm_asm_trampoline_template.
84 (TRAMPOLINE_ADJUST_ADDRESS): Move code to
85 arm_trampoline_adjust_address.
86 (INITIALIZE_TRAMPOLINE): Move code to arm_trampoline_init;
87 adjust for target hook parameters.
89 * config/avr/avr.h (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE): Remove.
91 * config/bfin/bfin-protos.h (initialize_trampoline): Remove.
92 * config/bfin/bfin.c (bfin_asm_trampoline_template): New.
93 (bfin_trampoline_init): Rename from initialize_trampoline;
94 make static; update for target hook parameters.
95 (TARGET_ASM_TRAMPOLINE_TEMPLATE, TARGET_TRAMPOLINE_INIT): New.
96 * config/bfin/bfin.h (TRAMPOLINE_TEMPLATE): Move code to
97 bfin_asm_trampoline_template.
98 (INITIALIZE_TRAMPOLINE): Remove.
100 * config/cris/cris.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
101 TARGET_TRAMPOLINE_INIT, cris_asm_trampoline_template,
102 cris_trampoline_init): New.
103 * config/cris/cris.h (TRAMPOLINE_TEMPLATE): Move code to
104 cris_asm_trampoline_template.
105 (INITIALIZE_TRAMPOLINE): Move code to cris_trampoline_init;
106 adjust for target hook parameters.
108 * config/crx/crx.h (INITIALIZE_TRAMPOLINE): Remove.
110 * config/fr30/fr30.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
111 TARGET_TRAMPOLINE_INIT, fr30_asm_trampoline_template,
112 fr30_trampoline_init): New.
113 * config/fr30/fr30.h (TRAMPOLINE_TEMPLATE): Move code to
114 fr30_asm_trampoline_template.
115 (INITIALIZE_TRAMPOLINE): Move code to fr30_trampoline_init;
116 adjust for target hook parameters.
118 * config/frv/frv.c (TARGET_TRAMPOLINE_INIT): New.
119 (frv_trampoline_init): Rename from frv_initialize_trampoline;
120 make static, adjust arguments for TARGET_TRAMPOLINE_INIT hook.
121 * config/frv/frv.h (INITIALIZE_TRAMPOLINE): Remove.
122 * config/frv/frv-protos.h (frv_initialize_trampoline): Remove.
124 * config/h8300/h8300.c (h8300_trampoline_init): New.
125 (TARGET_TRAMPOLINE_INIT): New.
126 * config/h8300/h8300.h (INITIALIZE_TRAMPOLINE): Move code
127 to h8300_trampoline_init and adjust for hook parameters.
129 * config/ia64/ia64-protos.h (ia64_initialize_trampoline): Remove.
130 * config/ia64/ia64.c (TARGET_TRAMPOLINE_INIT): New.
131 (ia64_trampoline_init): Rename from ia64_initialize_trampoline;
132 make static; adjust for hook parameters.
133 * config/ia64/ia64.h (INITIALIZE_TRAMPOLINE): Remove.
135 * config/iq2000/iq2000.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
136 (TARGET_TRAMPOLINE_INIT): New.
137 (iq2000_asm_trampoline_template, iq2000_trampoline_init): New.
138 * config/iq2000/iq2000.h (TRAMPOLINE_TEMPLATE): Move code to
139 iq2000_asm_trampoline_template.
140 (INITIALIZE_TRAMPOLINE): Move code to iq2000_trampoline_init.
141 (TRAMPOLINE_CODE_SIZE): New.
142 (TRAMPOLINE_SIZE): Use it.
143 (TRAMPOLINE_ALIGNMENT): Follow Pmode.
145 * config/m32c/m32c-protos.h (m32c_initialize_trampoline): Remove.
146 * config/m32c/m32c.c (TARGET_TRAMPOLINE_INIT): New.
147 (m32c_trampoline_init): Rename from m32c_initialize_trampoline;
148 adjust for hook parameters.
149 * config/m32c/m32c.h (INITIALIZE_TRAMPOLINE): Remove.
151 * config/m32r/m32r.c (TARGET_TRAMPOLINE_INIT): New.
152 (m32r_trampoline_init): New.
153 * config/m32r/m32r.h (INITIALIZE_TRAMPOLINE): Move code to
154 m32r_trampoline_init.
156 * config/m68hc11/m68hc11.c (TARGET_TRAMPOLINE_INIT): New.
157 (m68hc11_trampoline_init): Rename from m68hc11_initialize_trampoline;
158 make static; update for hook parameters.
159 * config/m68hc11/m68hc11-protos.h: Update.
160 * config/m68hc11/m68hc11.h (INITIALIZE_TRAMPOLINE): Remove.
162 * config/mcore/mcore.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
163 (TARGET_TRAMPOLINE_INIT): New.
164 (mcore_function_value): Fix typo.
165 (mcore_asm_trampoline_template, mcore_trampoline_init): New.
166 * config/mcore/mcore.h (TRAMPOLINE_TEMPLATE): Move code
167 to mcore_asm_trampoline_template.
168 (INITIALIZE_TRAMPOLINE): Move code to mcore_trampoline_init.
170 * config/mep/mep.h (INITIALIZE_TRAMPOLINE): Remove.
171 * config/mep/mep.c (TARGET_TRAMPOLINE_INIT): New.
172 (mep_trampoline_init): Rename from mep_init_trampoline; make static;
173 update for hook parameters.
174 * config/mep/mep-protos.h (mep_init_trampoline): Remove.
176 * config/mips/mips.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
177 mips_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
178 mips_trampoline_init): New.
179 * config/mips/mips.h (TRAMPOLINE_TEMPLATE): Move code to
180 mips_asm_trampoline_template.
181 (INITIALIZE_TRAMPOLINE): Move code to mips_trampoline_init;
182 update for hook parameters.
184 * gcc/config/mmix/mmix.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
185 (TARGET_TRAMPOLINE_INIT): New.
186 (mmix_trampoline_size): Remove.
187 (mmix_asm_trampoline_template): Rename from mmix_trampoline_template;
188 make static. Remove out-of-date tetra vs octa comment.
189 (mmix_trampoline_init): Rename from mmix_initialize_trampoline;
190 make static; update for hook parameters.
191 * config/mmix/mmix.h (TRAMPOLINE_TEMPLATE): Remove.
192 (INITIALIZE_TRAMPOLINE): Remove.
193 (TRAMPOLINE_SIZE): Use a constant instead of mmix_trampoline_size.
194 (TRAMPOLINE_ALIGNMENT): New.
195 * gcc/config/mmix/mmix-protos.h: Update.
197 * config/mn10300/mn10300.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
198 mn10300_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
199 mn10300_trampoline_init): New.
200 * config/mn10300/mn10300.h (TRAMPOLINE_TEMPLATE): Move code to
201 mn10300_asm_trampoline_template.
202 (INITIALIZE_TRAMPOLINE): Move code to mn10300_trampoline_init.
204 * config/moxie/moxie.c (moxie_static_chain,
205 moxie_asm_trampoline_template, moxie_trampoline_init,
206 TARGET_STATIC_CHAIN, TARGET_ASM_TRAMPOLINE_TEMPLATE,
207 TARGET_TRAMPOLINE_INIT): New.
208 * config/moxie/moxie.h (INITIALIZE_TRAMPOLINE): Move code to
209 moxie_trampoline_init.
210 (TRAMPOLINE_TEMPLATE): Move code to moxie_asm_trampoline_template.
211 (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
213 * gcc/config/pa/pa.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
214 pa_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
215 pa_trampoline_init, TARGET_TRAMPOLINE_ADJUST_ADDRESS,
216 pa_trampoline_adjust_address): New.
217 * config/pa/pa.h (TRAMPOLINE_TEMPLATE): Move code to
218 pa_asm_trampoline_template.
219 (TRAMPOLINE_ALIGNMENT): New.
220 (TRAMPOLINE_CODE_SIZE): Move to pa.c.
221 (INITIALIZE_TRAMPOLINE): Move code to pa_trampoline_init;
222 adjust for hook parameters.
223 (TRAMPOLINE_ADJUST_ADDRESS): Move code to pa_trampoline_adjust_address.
225 * config/pdp11/pdp11.c (pdp11_trampoline_init): New.
226 (TARGET_TRAMPOLINE_INIT): New.
227 * config/pdp11/pdp11.h (TRAMPOLINE_TEMPLATE): Remove.
228 (INITIALIZE_TRAMPOLINE): Move code to pdp11_trampoline_init.
230 * config/picochip/picochip.h (INITIALIZE_TRAMPOLINE): Remove.
232 * config/rs6000/rs6000-protos.h (rs6000_initialize_trampoline): Remove.
233 * config/rs6000/rs6000.c (TARGET_TRAMPOLINE_INIT): New.
234 (rs6000_trampoline_init): Rename from rs6000_initialize_trampoline;
235 make static; adjust parameters for the hook.
236 * config/rs6000/rs6000.h (INITIALIZE_TRAMPOLINE): Remove.
238 * config/s390/s390.c (s390_asm_trampoline_template): Rename from
239 s390_trampoline_template; make static.
240 (s390_trampoline_init): Rename from s390_initialize_trampoline;
241 make static; adjust for target hook.
242 (TARGET_ASM_TRAMPOLINE_TEMPLATE, TARGET_TRAMPOLINE_INIT): New.
243 * config/s390/s390-protos.h: Remove trampoline decls.
244 * config/s390/s390.h (INITIALIZE_TRAMPOLINE): Remove.
245 (TRAMPOLINE_TEMPLATE): Remove.
246 (TRAMPOLINE_ALIGNMENT): New.
248 * config/score/score-protos.h (score_initialize_trampoline): Remove.
249 * config/score/score.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
250 (TARGET_TRAMPOLINE_INIT): New.
251 (score_asm_trampoline_template): New.
252 (score_trampoline_init): Rename from score_initialize_trampoline;
253 make static; adjust for hook parameters.
254 * config/score/score.h (TRAMPOLINE_TEMPLATE): Move code to
255 score[37]_asm_trampoline_template.
256 (INITIALIZE_TRAMPOLINE): Remove.
257 * config/score/score3.c (score3_asm_trampoline_template): New.
258 (score3_trampoline_init): Rename from score3_initialize_trampoline;
259 adjust for target hook.
260 * config/score/score7.c (score7_asm_trampoline_template): New.
261 (score7_trampoline_init): Rename from score7_initialize_trampoline;
262 adjust for target hook.
263 * config/score/score3.h, config/score/score7.h: Update.
265 * config/sh/sh-protos.h (sh_initialize_trampoline): Remove.
266 * config/sh/sh.c (TARGET_TRAMPOLINE_INIT): New.
267 (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
268 (sh_trampoline_init): Rename from sh_initialize_trampoline;
269 make static; adjust for target hook parameters.
270 (sh_trampoline_adjust_address): New.
271 * config/sh/sh.h (INITIALIZE_TRAMPOLINE): New.
272 (TRAMPOLINE_ADJUST_ADDRESS): Move code to sh_trampoline_adjust_address.
274 * config/sparc/sparc.c (TARGET_TRAMPOLINE_INIT): New.
275 (sparc32_initialize_trampoline): Rename from
276 sparc_initialize_trampoline; make static; replace tramp parameter
277 with m_tramp and update memory accesses.
278 (sparc64_initialize_trampoline): Similarly.
279 (sparc_trampoline_init): New.
280 * config/sparc/sparc-protos.h: Remove trampoline decls.
281 * config/sparc/sparc.h (INITIALIZE_TRAMPOLINE): Remove.
282 * config/sparc/sparc.md (nonlocal_goto): Don't use static_chain_rtx.
284 * config/spu/spu.c (TARGET_TRAMPOLINE_INIT): New.
285 (array_to_constant): Make ARR parameter const.
286 (spu_trampoline_init): Rename from spu_initialize_trampoline;
287 make static; update for hook parameters.
288 * config/spu/spu-protos.h: Update decls.
289 * config/spu/spu.h (INITIALIZE_TRAMPOLINE): Remove.
291 * config/stormy16/stormy16.c (xstormy16_trampoline_init): Rename
292 from xstormy16_initialize_trampoline; make static; update for
294 (TARGET_TRAMPOLINE_INIT): New.
295 * config/stormy16/stormy16.h (INITIALIZE_TRAMPOLINE): Remove.
297 * config/v850/v850.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
298 (TARGET_TRAMPOLINE_INIT): New.
299 (v850_can_eliminate): Make static.
300 (v850_asm_trampoline_template, v850_trampoline_init): New.
301 * config/v850/v850.h (TRAMPOLINE_TEMPLATE): Move code to
302 v850_asm_trampoline_template.
303 (INITIALIZE_TRAMPOLINE): Move code to v850_trampoline_init
304 and adjust for target hook parameters.
306 * config/vax/vax.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
307 (TARGET_TRAMPOLINE_INIT): New.
308 (vax_asm_trampoline_template, vax_trampoline_init): New.
309 * config/vax/vax.h (TRAMPOLINE_TEMPLATE): Move code to
310 vax_asm_trampoline_template.
311 (INITIALIZE_TRAMPOLINE): Move code to vax_trampoline_init.
313 * config/xtensa/xtensa.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
314 (TARGET_TRAMPOLINE_INIT): New.
315 (xtensa_asm_trampoline_template): Rename from
316 xtensa_trampoline_template; make static.
317 (xtensa_trampoline_init): Rename from xtensa_initialize_trampoline;
318 make static; update for hook parameters.
319 * config/xtensa/xtensa-protos.h: Remove trampoline decls.
320 * config/xtensa/xtensa.h (TRAMPOLINE_TEMPLATE): Remove.
321 (INITIALIZE_TRAMPOLINE): Remove.
323 * config/i386/i386.c (ix86_function_regparm): Do not issue an
324 error for nested functions with regparm=3.
325 (ix86_compute_frame_layout): Adjust frame pointer offset for
326 ix86_static_chain_on_stack.
327 (ix86_expand_prologue): Handle ix86_static_chain_on_stack.
328 (ix86_emit_restore_reg_using_pop): Increment ix86_cfa_state->offset,
329 don't reset to UNITS_PER_WORD.
330 (ix86_emit_leave): Adjust ix86_cfa_state.
331 (ix86_expand_epilogue): Handle ix86_static_chain_on_stack.
332 (ix86_static_chain): New.
333 (ix86_trampoline_init): Rename from x86_initialize_trampoline;
334 make static; update for target hook parameters; use ix86_static_chain.
335 (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
336 * config/i386/i386.h (STATIC_CHAIN_REGNUM): Remove.
337 (INITIALIZE_TRAMPOLINE): Remove.
338 (TRAMPOLINE_SIZE): Use 24 for 64-bit.
339 (struct machine_function): Use BOOL_BITFIELD; rearrange bitfields
340 to the end. Add static_chain_on_stack.
341 (ix86_static_chain_on_stack): New.
343 * config/m68k/m68k.c (TARGET_TRAMPOLINE_INIT): New.
344 (m68k_output_mi_thunk): Don't use static_chain_rtx.
345 (m68k_trampoline_init): New.
346 * config/m68k/m68k.h (INITIALIZE_TRAMPOLINE): Move code to
347 m68k_trampoline_init and adjust for hook parameters.
348 * config/m68k/netbsd-elf.h (TRAMPOLINE_TEMPLATE): Remove.
349 (TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE): Remove.
351 2009-09-22 Jakub Jelinek <jakub@redhat.com>
353 * config/rs6000/rs6000.c (bdesc_2arg): Fix CODE_FOR_vector_gt* codes
354 for __builtin_altivec_vcmpgt{sb,uh,sh,uw}.
356 * reload1.c (reload): Call wrap_constant when substituting
357 reg for equiv inside of DEBUG_INSNs.
360 * dwarf2out.c (base_type_die, record_type_tag, gen_subprogram_die,
361 add_call_src_coords_attributes, add_high_low_attributes,
362 gen_compile_unit_die, gen_type_die_with_usage force_decl_die,
363 gen_decl_die, dwarf2out_imported_module_or_decl_1, dwarf2out_finish,
364 dwarf2out_imported_module_or_decl): Avoid using DWARF3 additions
365 when -gdwarf-2 -gstrict-dwarf.
366 (loc_list_from_tree): Likewise. Avoid using DWARF4 additions when
367 -gdwarf-[23] -gstrict-dwarf.
368 (address_of_int_loc_descriptor, loc_descriptor,
369 loc_list_for_address_of_addr_expr_of_indirect_ref): Avoid using
370 DWARF4 additions when -gdwarf-[23] -gstrict-dwarf.
371 * common.opt (gno-strict-dwarf, gstrict-dwarf): New options.
373 2009-09-22 Richard Guenther <rguenther@suse.de>
375 PR tree-optimization/41428
376 * tree-ssa-ccp.c (ccp_fold_stmt): New function.
377 (ccp_finalize): Pass it to substitute_and_fold.
379 2009-09-22 Richard Guenther <rguenther@suse.de>
381 * tree-ssa-propagate.h (ssa_prop_fold_stmt_fn): Declare.
382 (substitute_and_fold): Adjust prototype.
383 * tree-vrp.c (vrp_evaluate_conditional): Make static.
384 (simplify_stmt_using_ranges): Likewise.
385 (fold_predicate_in): Move here from tree-ssa-propagate.c.
386 (vrp_fold_stmt): New function.
387 (vrp_finalize): Pass it to substitute_and_fold.
388 * tree-flow.h (vrp_evaluate_conditional): Remove.
389 (simplify_stmt_using_ranges): Likewise.
390 * tree-ssa-ccp.c (ccp_finalize): Adjust call to substitute_and_fold.
391 * tree-ssa-copy.c (fini_copy_prop): Likewise.
392 * tree-ssa-propagate.c (struct prop_stats_d): Rename num_pred_folded
394 (fold_predicate_in): Move to tree-vrp.c.
395 (substitute_and_fold): Use the callback instead of calling into
396 tree-vrp.c functions directly.
398 2009-09-22 Jakub Jelinek <jakub@redhat.com>
400 * dwarf2out.c (address_of_int_loc_descriptor): Avoid signed/unsigned
401 comparison warning on rs6000.
404 * tree-cfg.c (remove_useless_stmts_tc): Call gsi_next (gsi) even for
405 GIMPLE_EH_MUST_NOT_THROW cleanup.
406 (verify_types_in_gimple_stmt): Handle GIMPLE_EH_MUST_NOT_THROW.
408 2009-09-22 Jack Howarth <howarth@bromo.med.uc.edu>
411 * gcc/config.gcc: Use darwin9.h and darwin10.h on darwin10 and later.
412 * gcc/config/darwin10.h: Add file to pass -no_compact_unwind on
413 LIB_SPEC for darwin10 and later since it always uses the unwinder in
414 libSystem which is derived from the gcc 4.2.1 unwinder.
416 2009-09-22 Dave Korn <dave.korn.cygwin@gmail.com>
419 * varasm.c (default_encode_section_info): Copy TLS model into
420 sym_ref flags regardless of backend support for TLS, for all
421 model types except TLS_MODEL_EMULATED.
423 2009-09-22 Dave Korn <dave.korn.cygwin@gmail.com>
426 * dwarf2out.c (mem_loc_descriptor): Punt on CONST_STRING until
427 we can handle it correctly.
429 2009-09-21 Gerald Pfeifer <gerald@pfeifer.com>
431 * doc/install.texi (os2): Remove section.
433 2009-09-21 Gerald Pfeifer <gerald@pfeifer.com>
435 * doc/standards.texi (Objective-C): Adjust two URLs.
437 2009-09-21 Giuseppe Scrivano <gscrivano@gnu.org>
439 * tree-tailcall.c (process_assignment): Don't check if a multiplication
440 or an addition are already present.
441 (find_tail_calls): Combine multiple additions and multiplications.
442 (adjust_accumulator_values): Emit accumulators.
444 2009-09-21 Kai Tietz <kai.tietz@onevision.com>
446 * config/i386/i386.c (ix86_expand_epilogue): Adjust offset for
447 xmm register restore.
449 2009-09-21 Jan Hubicka <jh@suse.cz>
451 * dwarf2out.c (decl_loc_table_eq): Allow decl_loc_table to be NULL.
452 (dwarf2out_abstract_function): NULLify decl_loc_table at begginig and
455 2009-09-21 Eric Botcazou <ebotcazou@adacore.com>
457 * stor-layout.c (layout_type): Remove obsolete code.
459 2009-09-20 H.J. Lu <hongjiu.lu@intel.com>
462 * opts.c (decode_options): Don't turn on flag_ipa_sra for opt2.
464 2009-09-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
467 * builtins.c (do_mpc_arg2): Accept DO_NONFINITE parameter.
468 (do_mpc_ckconv): Accept FORCE_CONVERT parameter.
469 (fold_builtin_2, do_mpc_arg1): Update accordingly.
470 * fold-const.c (const_binop): Likewise.
471 * real.h (do_mpc_arg2): Update prototype.
473 2009-09-20 Jan Hubicka <jh@suse.cz>
475 * dwarf2out.c (add_const_value_attribute): Return true if successful.
476 (add_location_or_const_value_attribute): Rewrite using loc_list_from_tree.
477 (tree_add_const_value_attribute): Return true if successful.
478 (tree_add_const_value_attribute_for_decl): Likewise.
480 * dwarf2out.c (address_of_int_loc_descriptor): Break out from ...
481 (loc_descriptor): ... here;
482 (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
483 (cst_pool_loc_descr): Break out from ...; do not reffer constant
484 pool items that was not marked for output.
485 (loc_list_from_tree): ... here; handle special cases of ADDR_EXPR;
486 (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
487 (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
488 handle ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF, REALPART_EXPR,
489 IMAGPART_EXPR; handle address of INTEGER_CST; improve handling of
490 CONSTRUCTOR; handle REAL_CST, STRING_CST, COMPLEX_CST; use
491 DW_OP_stack_value to get address of items that are not available
493 (dw_loc_list): Handle single element lists correctly.
495 2009-09-20 Kai Tietz <kai.tietz@onevision.com>
496 Pascal Obry <obry@adacore.com>
498 * unwind-dw2-fde.c (classify_object_over_fdes):
499 Cast the constant 1 to _Unwind_Ptr.
500 (add_fdes): Likewise.
501 (linear_search_fdes): Likewise.
503 2009-09-20 Eric Botcazou <ebotcazou@adacore.com>
505 * stor-layout.c (set_sizetype): Avoid useless type copy.
507 2009-09-20 Richard Sandiford <rdsandiford@googlemail.com>
509 * configure.ac (gcc_cv_ld_mips_personality_relaxation): New
511 (HAVE_LD_PERSONALITY_RELAXATION): New macro definition.
512 * configure, config.in: Regenerate.
513 * dwarf2asm.c (eh_data_format_name): Handle DW_EH_PE_indirect |
515 * config/mips/mips.h (TARGET_WRITABLE_EH_FRAME): New macro.
516 (ASM_PREFERRED_EH_DATA_FORMAT): Define. Use MIPS_EH_INDIRECT
517 for global data if the output could be used in a shared library.
518 * config/mips/mips.c (mips_override_options): Set flag_dwarf2_cfi_asm
519 to 0 if TARGET_WRITABLE_EH_FRAME.
521 2009-09-20 Paolo Bonzini <bonzini@gnu.org>
523 PR rtl-optimization/39886
524 * combine.c (update_cfg_for_uncondjump): Set EDGE_FALLTHRU
525 just when insn is equal to BB_END (bb).
527 2009-09-19 Adam Nemet <anemet@caviumnetworks.com>
529 * config/mips/mips.opt (mrelax-pic-calls): New option.
530 * config/mips/mips.c (mips_strip_unspec_address): Move it up in
532 (mips_unspec_call): Change "unspec_call" expander into this.
533 (mips_strip_unspec_call): New function.
534 (mips_got_load): Call mips_unspec_call instead of
535 gen_unspec_call<mode>.
536 (mips16_build_call_stub): Fix comment for fp_code. Adjust call to
538 (mips_cfg_in_reorg): New function.
539 (mips16_lay_out_constants): Use it to decide whether to call
540 CFG-aware insn splitting.
541 (r10k_insert_cache_barriers): Move CFG set-up code from here to
542 mips_reorg. Move DF set-up code from here ...
543 (mips_df_reorg): ... to here. Call r10k_insert_cache_barriers
545 (mips_reorg): Call mips_df_reorg instead of
546 r10k_insert_cache_barriers. Move CFG set-up code here from
547 r10k_insert_cache_barriers.
548 (mips_call_expr_from_insn): New function.
549 (mips_pic_call_symbol_from_set): Likewise.
550 (mips_find_pic_call_symbol): Likewise.
551 (mips_annotate_pic_call_expr): Likewise.
552 (mips_get_pic_call_symbol): Likewise.
553 (mips_annotate_pic_calls): Likewise.
554 (mips_override_options): Disable -mrelax-pic-calls unless PIC
556 (mips_set_mips16_mode): Disable -mrelax-pic-calls for MIPS16.
557 * config/mips/mips-protos.h (mips_get_pic_call_symbol): Declare it.
558 * config/mips/mips.h (MIPS_CALL): Use it to print the .reloc
560 * config/mips/mips.md (UNSPEC_CALL_ATTR): New unspec.
561 (unspec_call<mode>): Remove it.
562 (sibcall_internal, sibcall_value_internal,
563 sibcall_value_multiple_internal, call_internal, call_split,
564 call_value_internal, call_value_split,
565 call_value_multiple_internal, call_value_multiple_split): Pass
566 SIZE_OPNO to MIPS_CALL.
567 (call_internal_direct, call_direct_split,
568 call_value_internal_direct, call_value_direct_split): Pass -1 as
569 SIZE_OPNO to MIPS_CALL.
570 * configure.ac <mips*-*-*>: Add test for .reloc R_MIPS_JALR.
571 * configure: Regenerate.
572 * doc/invoke.texi (Option Summary): Add -mrelax-pic-calls
573 and -mno-relax-pic-calls.
574 (MIPS Options): Document -mrelax-pic-calls
575 and -mno-relax-pic-calls.
577 2009-09-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
580 * Makefile.in (stmp-fixinc): Ensure `include-fixed' is created
581 in the directory this rule is called from, rather than the
582 toplevel 'gcc' directory, to fix in-tree build.
584 2009-09-19 Chris Demetriou <cgd@google.com>
586 PR preprocessor/28435:
587 * c-opts.c (c_common_handle_option): For -MD and -MMD, indicate
588 to cpplib that the preprocessor output is needed.
590 2009-09-19 Jakub Jelinek <jakub@redhat.com>
592 * config/rs6000/rs6000.md (*save_gpregs_<mode>, *save_fpregs_<mode>,
593 *restore_gpregs_<mode>, *return_and_restore_gpregs_<mode>,
594 *return_and_restore_fpregs_<mode>,
595 *return_and_restore_fpregs_aix_<mode>): Remove 'z' operand modifier.
598 * dwarf2out.c (mem_loc_descriptor) <case SUBREG>: Recurse
599 instead of assuming it has always a REG inside of it.
601 2009-09-18 Gerald Pfeifer <gerald@pfeifer.com>
603 * config/freebsd.h: Update comment on types.
606 2009-09-18 Jason Merrill <jason@redhat.com>
608 * c.opt: Add -fno-deduce-init-list.
610 2009-09-18 Neil Vachharajani <nvachhar@google.com>
612 * value-prof.c (interesting_stringop_to_profile_p): Added output
613 argument to indicate which parameter is the size parameter.
614 * value-prof.c (gimple_stringop_fixed_value): Use
615 INTERESTING_STRINGOP_TO_PROFILE_P to find size argument.
616 * value-prof.c (gimple_stringops_transform): Update call sites to
617 INTERESTING_STRINGOP_TO_PROFILE_P to reflect parameter change.
618 * testsuite/gcc.dg/tree-prof/val-prof-7.c: Added test case.
620 2009-09-18 Uros Bizjak <ubizjak@gmail.com>
623 From David Binderman <dcb314@hotmail.com>:
624 * gcc/config/i386/i386.c (ix86_function_regparm): Remove useless
625 local variable f. Remove stale comments.
626 (ix86_compute_frame_layout): Remove useless local variable total_size.
628 (legitimate_address_p): Remove useless local variables
629 reason_rtx and reason.
630 (ix86_split_copysign_const): Remove useless local variable op1.
631 (scale_counter): Remove useless local variable piece_size_mask.
633 2009-09-18 Jakub Jelinek <jakub@redhat.com>
635 * stmt.c (expand_asm_operands): Set REG_ATTRS on the temporary from
638 2009-09-17 Michael Haubenwallner <michael.haubenwallner@salomon.at>
641 * config/pa/t-hpux-shlib: Set soname in libgcc_s.sl.
643 2009-09-17 Jakub Jelinek <jakub@redhat.com>
645 * c-decl.c (finish_struct): Adjust DECL_SOURCE_LOCATION of
648 2009-09-17 Alexandre Oliva <aoliva@redhat.com>
650 * dwarf2out.c (loc_descriptor): Emit DW_OP_stack_value and
651 DW_OP_implicit_value even without dwarf_version 4.
653 2009-09-17 Jan Hubicka <jh@suse.cz>
655 * dwarf2out.c: Include tree-pass.h and gimple.h.
656 (loc_list_plus_const): New function.
657 (loc_descriptor_from_tree_1): Rename to ...
658 (loc_descriptor_from_tree): ... remove original.
659 (loc_list_from_tree): New function.
660 (add_AT_location_description): Accept location list.
661 (tls_mem_loc_descriptor): Update call of loc_descriptor_from_tree.
662 (concatn_mem_loc_descriptor): Remove.
663 (mem_loc_descriptor): Handle CONCAT/CONCATN and VAR_LOCATION by
665 (secname_for_decl): Move up.
666 (hidden_reference_p): New function; break out from ...
667 (loc_by_refernece): ... here; move up.
668 (dw_loc_list): New function.
669 (single_element_loc_list): New function.
670 (single_element_loc_list_p): New function.
671 (add_loc_descr_to_each): New function.
672 (add_loc_list): New function.
673 (loc_descr_from_tree): Make wraper of loc_list_from_tree.
674 (loc_list_from_tree): Reroganized from loc_descr_from_tree;
675 add diagnostics why expansion failed.
676 (add_location_or_const_value_attribute): Support location lists.
677 (add_bound_info): Likewise.
678 (descr_info_loc): Update call of loc_descriptor_from_tree.
679 (gen_variable_die): Work on location lists.
680 * final.c (pass_final): Add dump file.
681 * Makefile.in (dwarf2out.o): Add new dependencies.
683 2009-09-17 Janis Johnson <janis187@us.ibm.com>
686 * real.c decimal_from_integer, decimal_integer_string): New.
687 (real_from_integer): Use them as special case for decimal float.
688 * config/dfp-bit.c (_si_to_sd, _usi_to_sd): Use default rounding.
689 (_di_to_sd, _di_to_dd, _di_to_td, _udi_to_sd, _udi_to_dd, _udi_to_td):
690 Do not append zero after the decimal point in string to convert.
692 2009-09-17 Alexander Monakov <amonakov@ispras.ru>
694 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
695 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
697 2009-09-17 Martin Jambor <mjambor@suse.cz>
699 * common.opt (fipa-sra): New switch.
700 * opts.c (decode_options): Turn flag_ipa_sra on for opt2.
701 * timevar.def (TV_IPA_SRA): New timevar.
702 * params.def (ipa-sra-ptr-growth-factor): New parameter.
703 * doc/invoke.texi: Document -fipa-sra and ipa-sra-ptr-growth-factor.
704 * tree-sra.c: Include cgraph.c.
705 (enum sra_mode): Added SRA_MODE_EARLY_IPA.
706 (struct access): Added fields stmt, grp_maybe_modified, grp_scalar_ptr
707 and grp_not_necessarilly_dereferenced.
708 (func_param_count): New variable.
709 (encountered_apply_args): New variable.
710 (bb_dereferences): New variable.
711 (final_bbs): New variable.
712 (no_accesses_representant): New variable.
713 (no_accesses_p): New function.
714 (dump_access): Dump the new fields.
715 (sra_initialize): Set encountered_apply_args to false.
716 (get_ssa_base_param): New function.
717 (mark_parm_dereference): New function.
718 (create_access): Caring for INIDRECT_REFs and different handling of
719 varialble length accesses in early IPA SRA. Store the stmt - a new
720 parameter - to the new access.
721 (build_access_from_expr_1): New parameter stmt, passed to
722 create_access. Handle INDIRECT_REFs.
723 (build_access_from_expr): Pass the current statement to
724 build_access_from_expr_1.
725 (disqualify_ops_if_throwing_stmt): Trigger only in intraprocedural
727 (build_accesses_from_assign): Pass the current statement to
728 build_access_from_expr_1. Do not create assign links in IPA-SRA.
729 (scan_function): Call handle_ssa_defs on phi nodes. Set bits in
730 final_bbs when necessary. Check for calls to __builtin_apply_args.
731 Fixup EH info if anythng was changed.
732 (is_unused_scalar_param): New function.
733 (ptr_parm_has_direct_uses): New function.
734 (find_param_candidates): New function.
735 (mark_maybe_modified): New function.
736 (analyze_modified_params): New function.
737 (propagate_dereference_distances): New function.
738 (dump_dereferences_table): New function.
739 (analyze_caller_dereference_legality): New function.
740 (unmodified_by_ref_scalar_representative): New function.
741 (splice_param_accesses): New function.
742 (decide_one_param_reduction): New function.
743 (enum ipa_splicing_result): New type.
744 (splice_all_param_accesses): New function.
745 (get_param_index): New function.
746 (turn_representatives_into_adjustments): New function.
747 (analyze_all_param_acesses): New function.
748 (get_replaced_param_substitute): New function.
749 (get_adjustment_for_base): New function.
750 (replace_removed_params_ssa_names): New function.
751 (sra_ipa_reset_debug_stmts): New function.
752 (sra_ipa_modify_expr): New function.
753 (sra_ipa_modify_assign): New function.
754 (convert_callers): New function.
755 (modify_function): New function.
756 (ipa_sra_preliminary_function_checks): New function.
757 (ipa_early_sra): New function.
758 (ipa_early_sra_gate): New function.
759 (pass_early_ipa_sra): New variable.
760 * Makefile.in (tree-sra.o): Add cgraph.h to dependencies.
762 2009-09-17 Michael Matz <matz@suse.de>
765 * tree.c (build_type_attribute_qual_variant): Export.
766 * tree.h (build_type_attribute_qual_variant): Declare.
767 * tree-inline.c (remap_type_1): Use it to build variants with
768 the original qualifiers and attributes.
770 2009-09-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
772 * cfglayout.c (fixup_reorder_chain): Accept conditional jumps
773 without a fallthrough edge.
775 2009-09-16 DJ Delorie <dj@redhat.com>
777 * config/m32c/m32c.c (m32c_emit_epilogue): Check for R8C or M16C
778 chip and ignore the "fast_interrupt" attribute if so.
780 2009-09-16 Richard Henderson <rth@redhat.com>
783 * cfgbuild.c (find_bb_boundaries): Really re-instate 2009-09-02
786 2009-09-16 Richard Henderson <rth@redhat.com>
789 * tree-cfg.c (verify_gimple_call): Validate that gimple_call_chain
790 is set only if DECL_NO_STATIC_CHAIN is unset.
791 * tree-nested.c (iter_nestinfo_start, iter_nestinfo_next): New.
792 (FOR_EACH_NEST_INFO): New.
793 (walk_all_functions): Use it.
794 (finalize_nesting_tree): Likewise.
795 (unnest_nesting_tree): Likewise.
796 (free_nesting_tree): Use iter_nestinfo_start, iter_nestinfo_next.
797 (get_chain_decl, get_chain_field): Reset DECL_NO_STATIC_CHAIN.
798 (convert_gimple_call): Early out if gimple_call_chain already set.
799 (convert_all_function_calls): Iterate until no new functions
800 require a static chain.
801 (finalize_nesting_tree_1): Assert DECL_NO_STATIC_CHAIN is unset
802 when building a trampoline. Use dump_function_to_file instead
804 (lower_nested_functions): Open dump_file. Validate that decls
805 that have DECL_NO_STATIC_CHAIN from the front end don't have that
806 bit reset by this pass.
808 2009-09-16 Michael Matz <matz@suse.de>
811 * tree.h (struct tree_decl_common): Add decl_restricted_flag,
812 shorten decl_common_unused.
813 (DECL_RESTRICTED_P): New accessor.
814 * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Use it
815 to disambiguate marked decls and restrict pointers.
817 2009-09-16 Richard Henderson <rth@redhat.com>
820 * cfgbuild.c (find_bb_boundaries): Re-instate 2009-09-02 barrier fix.
822 2009-09-16 Jakub Jelinek <jakub@redhat.com>
824 * integrate.c (set_block_abstract_flags): Call
825 set_decl_abstract_flags also on BLOCK_NONLOCALIZED_VARs.
827 2009-09-16 Richard Guenther <rguenther@suse.de>
830 * tree-flow-inline.h (may_be_aliased): Compute readonly variables
833 2009-09-16 DJ Delorie <dj@redhat.com>
834 Kaz Kojima <kkojima@gcc.gnu.org>
836 * config/sh/sh.c (output_stack_adjust): Add new argument frame_p.
837 (sh_expand_prologue): Update calls to output_stack_adjust.
838 (sh_expand_epilogue): Likewise.
840 2009-09-15 Adam Nemet <anemet@caviumnetworks.com>
843 * reorg.c (redundant_insn): Don't count notes or DEBUG_INSNs when
844 trying to limit the extent of searches in the insn stream.
846 2009-09-15 Nathan Froyd <froydnj@codesourcery.com>
847 Jakub Jelinek <jakub@redhat.com>
851 * config/rs6000/rs6000.c (no_global_regs_above): Fix precedence
853 (SAVRES_NOINLINE_GPRS_SAVES_LR, SAVRES_NOINLINE_FPRS_SAVES_LR,
854 SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR): New strategy bits.
855 (rs6000_savres_strategy): Always save FP registers inline if the
856 target doesn't support hardware double-precision. Set the above
857 bits in return value when needed.
858 (rs6000_savres_routine_sym): Fix computation for cache selector.
859 Mark the generated symbol as a function. Rename exitp argument to
860 lr. Move code for determining the name of the symbol...
861 (rs6000_savres_routine_name): ...here. New function. Add cases for
862 getting the names right on AIX and 64-bit Linux.
863 (savres_routine_name): New variable.
864 (rs6000_make_savres_rtx): Rename exitp argument to lr. Don't assert
865 lr isn't set when savep. Use r12 resp. r1 instead of r11 depending
866 on what the target routine uses as a base register. If savep && lr
867 describe saving of r0 into memory slot.
868 (rs6000_emit_prologue): Correct use of call_used_regs. Fix out of
869 line calls for AIX ABI.
870 (rs6000_output_function_prologue): Use rs6000_savres_routine_name to
871 determine FP save/restore functions.
872 (rs6000_emit_stack_reset): Handle savres if sp_offset != 0 and
873 frame_reg_rtx != sp_reg_rtx. Use gen_add3_insn instead of
875 (rs6000_emit_epilogue): Adjust computation of restore_lr.
876 Duplicate restoration of LR and execute the appropriate one
877 depending on whether GPRs are being restored inline. Set r11 from
878 offsetted frame_reg_rtx instead of sp_reg_rtx; if frame_reg_rtx is
879 r11, adjust sp_offset. Use gen_add3_insn instead of gen_addsi3.
880 Fix out of line calls for AIX ABI.
881 * config/rs6000/rs6000.md (*return_and_restore_fpregs_aix_<mode>):
883 * config/rs6000/spe.md (*save_gpregs_spe): Use explicit match for
885 (*restore_gpregs_spe): Likewise.
886 (*return_and_restore_gpregs_spe): Likewise.
887 * config/rs6000/linux64.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
888 Define to empty string unconditionally.
889 * config/rs6000/sysv4.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
890 Define to empty string unconditionally.
891 (GP_SAVE_INLINE, FP_SAVE_INLINE): Handle TARGET_64BIT the same as
894 2009-09-15 Jan Hubicka <jh@suse.cz>
896 * doc/invoke.texi (inline-insns-auto): Drop from 60 to 50.
897 * params.def (inline-insns-auto): Likewise.
899 2009-09-15 Martin Jambor <mjambor@suse.cz>
901 * ipa-inline.c (estimate_function_body_sizes): Dump info about
902 individual statements only at TDF_DETAILS dump level. Format
903 source for 80 characters per line.
905 2009-09-15 Christian Bruel <christian.bruel@st.com>
907 * regrename.c (do_replace): Update REG_DEAD notes.
909 2009-09-15 Revital Eres <eres@il.ibm.com>
911 * doc/tm.texi (TARGET_SUPPORT_VECTOR_MISALIGNMENT): Document.
912 * targhooks.c (default_builtin_support_vector_misalignment):
913 New builtin function.
914 * targhooks.h (default_builtin_support_vector_misalignment):
916 * target.h (builtin_support_vector_misalignment):
917 New field in struct gcc_target.
918 * tree-vect-data-refs.c (vect_supportable_dr_alignment): Call
919 new builtin function.
920 * target-def.h (TARGET_SUPPORT_VECTOR_MISALIGNMENT):
922 * config/rs6000/rs6000.c
923 (rs6000_builtin_support_vector_misalignment): New function.
924 (TARGET_SUPPORT_VECTOR_MISALIGNMENT): Define.
926 2009-09-15 Jie Zhang <jie.zhang@analog.com>
928 * config/bfin/bfin.c (length_for_loop): Use NONDEBUG_INSN_P
930 (bfin_optimize_loop): Likewise.
931 (bfin_gen_bundles): Likewise.
932 (workaround_speculation): Likewise.
933 (find_load): Return NULL_RTX for debug_insn.
935 2009-09-15 Uros Bizjak <ubizjak@gmail.com>
937 * config/alpha/alpha.md (smaxsf3): Disable for IEEE mode.
940 2009-09-14 DJ Delorie <dj@redhat.com>
942 * config/mep/mep.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
943 * config/mep/mep.c (mep_emit_cbranch): Don't use BEQZ/BNEI in
946 2009-09-14 Richard Henderson <rth@redhat.com>
947 Jakub Jelinek <jakub@redhat.com>
949 * builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec.
950 * cfgbuild.c (make_edges): Handle asm goto.
951 * cfglayout.c (fixup_reorder_chain): Likewise.
952 * cfgrtl.c (patch_jump_insn): Likewise.
953 * gimple-pretty-print.c (dump_gimple_asm): Likewise.
954 * gimple.c (gimple_build_asm_1): Add and use nlabels parameter.
955 (gimple_build_asm_vec): Add and use labels parameter.
956 (gimple_build_asm): Remove.
957 (walk_gimple_asm): Walk labels too.
958 * gimple.def (GIMPLE_ASM): Update docs.
959 * gimple.h: Update decls.
960 (struct gimple_statement_asm): Change nc to use unsigned char;
962 (gimple_asm_nlabels): New.
963 (gimple_asm_label_op, gimple_asm_set_label_op): New.
964 * gimplify.c (gimplify_asm_expr): Copy labels from ASM_EXPR
965 into gimple_build_asm_vec.
966 * jump.c (mark_jump_label_asm): New.
967 (mark_jump_label): Use it.
968 (redirect_jump_1): Handle asm goto.
969 (invert_jump_1): Soft fail if X is null.
970 * recog.c (extract_asm_operands): New.
971 (asm_noperands): Use it; handle asm labels.
972 (decode_asm_operands): Use extract_asm_operands.
973 (asm_operand_ok): Properly handle empty string.
974 * reg-stack.c (get_asm_operands_in_out): Rename from
975 get_asm_operand_n_inputs; use extract_asm_operands; return both
976 inputs and outputs by reference; update all callers.
977 * rtl.def (ASM_OPERANDS): Add label vector as operand 6.
978 * rtl.h (ASM_OPERANDS_LABEL_VEC): New.
979 (ASM_OPERANDS_LABEL_LENGTH, ASM_OPERANDS_LABEL): New.
980 (ASM_OPERANDS_SOURCE_LOCATION): Renumber.
981 (extract_asm_operands): Declare.
982 * stmt.c (expand_asm_operands): Add and use labels parameter.
983 (check_unique_operand_names): Likewise.
984 (resolve_asm_operand_names, resolve_operand_name_1): Likewise.
985 (expand_asm_stmt): Handle asm labels.
986 * tree-cfg.c (make_gimple_asm_edges): New.
987 (make_edges): Use it.
988 (cleanup_dead_labels): Handle asm labels.
989 (is_ctrl_altering_stmt): Likewise.
990 (gimple_redirect_edge_and_branch): Likewise.
991 * tree.def (ASM_EXPR): Add 5th operand.
992 * tree.h (ASM_LABELS): New.
993 (resolve_asm_operand_names): Update decl.
995 * c-parser.c (c_parser_asm_statement): Parse asm goto.
996 (c_parser_asm_goto_operands): New.
997 * c-tree.h (build_asm_expr): Update decl.
998 * c-typeck.c (build_asm_expr): Add and use labels parameter.
999 * doc/extend.texi: Document asm goto.
1001 2009-09-14 Richard Henderson <rth@redhat.com>
1003 * except.h: Update declarations.
1004 (struct pointer_map_t): Forward declare.
1005 (ERT_UNKNOWN, ERT_THROW, ERT_CATCH): Remove.
1006 (struct eh_landing_pad_d, eh_landing_pad): New.
1007 (struct eh_catch_d, eh_catch): New.
1008 (struct eh_region_d): Remove next_region_sharing_label, aka,
1009 label, tree_label, landing_pad, post_landing_pad, resume,
1010 may_contain_throw. Rename region_number to index. Remove
1011 u.eh_catch, u.eh_throw. Rename u.eh_try.eh_catch to first_catch.
1012 Add u.must_not_throw, landing_pads, exc_ptr_reg, filter_reg.
1013 (VEC(eh_landing_pad,gc)): New.
1014 (struct eh_status): Remove last_region_number. Add lp_array,
1015 throw_stmt_table, ttype_data, ehspec_data.
1016 (ehr_next, FOR_ALL_EH_REGION_AT): New.
1017 (FOR_ALL_EH_REGION_FN, FOR_ALL_EH_REGION): New.
1018 * except.c (lang_protect_cleanup_actions): Return tree.
1019 (struct ehl_map_entry): Remove.
1020 (init_eh_for_function): Push zero entries for region and lp_array.
1021 (gen_eh_region): Add to region_array immediately.
1022 (gen_eh_region_catch): Operate on eh_catch objects.
1023 (gen_eh_landing_pad): New.
1024 (get_eh_region_may_contain_throw, get_eh_region_tree_label): Remove.
1025 (get_eh_region_no_tree_label, set_eh_region_tree_label): Remove.
1026 (get_eh_region_from_number, get_eh_region_from_number_fn): New.
1027 (get_eh_landing_pad_from_number_fn): New.
1028 (get_eh_landing_pad_from_number): New.
1029 (get_eh_region_from_lp_number_fn): New.
1030 (get_eh_region_from_lp_number): New.
1031 (expand_resx_stmt, note_eh_region_may_contain_throw): Remove.
1032 (get_exception_pointer, get_exception_filter): Remove.
1033 (collect_eh_region_array, can_be_reached_by_runtime): Remove.
1034 (current_function_has_exception_handlers): Simplify.
1035 (bring_to_root, eh_region_replaceable_by_p): Remove.
1036 (replace_region, hash_type_list, hash_eh_region): Remove.
1037 (eh_regions_equal_p, merge_peers, remove_unreachable_regions): Remove.
1038 (label_to_region_map, num_eh_regions): Remove.
1039 (get_next_region_sharing_label, must_not_throw_labels): Remove.
1040 (find_exception_handler_labels): Remove.
1041 (duplicate_eh_regions_0, find_prev_try): Remove.
1042 (struct duplicate_eh_regions_data): New.
1043 (duplicate_eh_regions_1): Rewrite.
1044 (duplicate_eh_regions): Return a pointer map instead of an
1046 (copy_eh_region_1, copy_eh_region, push_reachable_handler): Remove.
1047 (redirect_eh_edge_to_label): Remove.
1048 (eh_region_outermost): Rewrite using eh_region pointers
1049 instead of integers.
1050 (add_ttypes_entry): Update for ttype_data move to eh_status.
1051 (add_ehspec_entry): Rewrite with VEC instead of varray.
1052 (assign_filter_values): Likewise. Export.
1053 (build_post_landing_pads, connect_post_landing_pads): Remove.
1054 (dw2_build_landing_pads): Rewrite to use lp_array.
1055 (struct sjlj_lp_info, sjlj_find_directly_reachable_regions): Remove.
1056 (sjlj_assign_call_site_values): Rewrite to use lp_array.
1057 (sjlj_emit_dispatch_table, sjlj_build_landing_pads): Likewise.
1058 (sjlj_mark_call_sites): Update for landing pad numbers.
1059 (finish_eh_generation): Rewrite.
1060 (gate_handle_eh): Do nothing for no eh tree.
1061 (pass_rtl_eh): Move up near finish_eh_generation.
1062 (remove_eh_landing_pad): New.
1063 (remove_eh_handler): Export.
1064 (remove_eh_region, remove_eh_handler_and_replace): Remove.
1065 (for_each_eh_label): Rewrite to use lp_array.
1066 (make_reg_eh_region_note): New.
1067 (make_reg_eh_region_note_nothrow_nononlocal): New.
1068 (insn_could_throw_p): New.
1069 (copy_reg_eh_region_note_forward): New.
1070 (copy_reg_eh_region_note_backward): New.
1071 (check_handled, add_reachable_handler): Remove.
1072 (reachable_next_level, foreach_reachable_handler): Remove.
1073 (arh_to_landing_pad, arh_to_label, reachable_handlers): Remove.
1074 (get_eh_region_and_lp_from_rtx): New.
1075 (get_eh_region_from_rtx): New.
1076 (can_throw_internal_1, can_throw_external_1): Remove.
1077 (can_throw_internal): Use get_eh_region_from_rtx.
1078 (can_throw_external): Use get_eh_region_and_lp_from_rtx.
1079 (insn_nothrow_p, can_nonlocal_goto): New.
1080 (expand_builtin_eh_common, expand_builtin_eh_pointer): New.
1081 (expand_builtin_eh_filter, expand_builtin_eh_copy_values): New.
1082 (add_action_record): Use VEC not varray.
1083 (collect_one_action_chain): Update for eh_region changes.
1084 (convert_to_eh_region_ranges): Make static. Use VEC not varray.
1085 Use get_eh_region_and_lp_from_rtx.
1086 (gate_convert_to_eh_region_ranges): New.
1087 (pass_convert_to_eh_region_ranges): Use it.
1088 (push_uleb128, push_sleb128): Use VEC not varray.
1089 (output_one_function_exception_table): Likewise.
1090 (dump_eh_tree): Update for eh_region changes.
1091 (verify_eh_tree): Likewise.
1092 (verify_eh_region, default_init_unwind_resume_libfunc): Remove.
1093 * tree-eh.c: Include target.h.
1094 (add_stmt_to_eh_lp_fn): Rename from add_stmt_to_eh_region_fn.
1095 Don't disallow GIMPLE_RESX; adjust argument check.
1096 (add_stmt_to_eh_lp): Rename from add_stmt_to_eh_region.
1097 (record_stmt_eh_region): Update for landing pad numbers;
1098 generate a landing pad if necessary.
1099 (remove_stmt_from_eh_lp): Rename from remove_stmt_from_eh_region.
1100 (remove_stmt_from_eh_lp_fn): Similarly.
1101 (lookup_stmt_eh_lp_fn): Rename from lookup_stmt_eh_region_fn.
1102 Update for lp numbers; don't special case missing throw_stmt_table.
1103 (lookup_expr_eh_lp): Similarly.
1104 (lookup_stmt_eh_lp): Rename from lookup_stmt_eh_region.
1105 (eh_seq, eh_region_may_contain_throw): New.
1106 (struct leh_state): Add ehp_region.
1107 (struct leh_tf_state): Remove eh_label.
1108 (emit_post_landing_pad): New.
1109 (emit_resx, emit_eh_dispatch): New.
1110 (note_eh_region_may_contain_throw): New.
1111 (frob_into_branch_around): Take eh_region not eh label;
1112 emit eh code into eh_seq.
1113 (honor_protect_cleanup_actions): Early exit for no actions. Don't
1114 handle EXC_PTR_EXPR, FILTER_EXPR. Use gimple_build_eh_must_not_throw,
1115 lower_eh_must_not_throw. Emit code to eh_seq.
1116 (lower_try_finally_nofallthru): Emit eh code to eh_seq.
1117 (lower_try_finally_onedest): Likewise.
1118 (lower_try_finally_copy): Likewise.
1119 (lower_try_finally_switch): Likewise.
1120 (lower_try_finally): Initialize ehp_region.
1121 (lower_catch): Update for eh_catch objects.
1122 (lower_eh_filter): Don't handle must_not_throw.
1123 (lower_eh_must_not_throw): New.
1124 (lower_cleanup): Don't set eh_label.
1125 (lower_eh_constructs_2): Resolve eh builtins.
1126 Handle GIMPLE_EH_MUST_NOT_THROW.
1127 (lower_eh_constructs): Initialize eh_region_may_contain_throw.
1128 Add eh_seq to the end of the function body.
1129 (make_eh_dispatch_edges): New.
1130 (make_eh_edge): Remove.
1131 (make_eh_edges): Simplify for landing pads.
1132 (redirect_eh_edge_1): New.
1133 (redirect_eh_edge): Use it.
1134 (redirect_eh_dispatch_edge): New.
1135 (stmt_could_throw_p): Use a switch. Allow RESX.
1136 (stmt_can_throw_external): Use lookup_stmt_eh_lp.
1137 (stmt_can_throw_internal): Likewise.
1138 (maybe_clean_eh_stmt_fn, maybe_clean_eh_stmt): New.
1139 (maybe_clean_or_replace_eh_stmt): Update for landing pads.
1140 (maybe_duplicate_eh_stmt_fn, maybe_duplicate_eh_stmt): New.
1141 (gate_refactor_eh): New.
1142 (pass_refactor_eh): Use it.
1143 (lower_resx, execute_lower_resx, pass_lower_resx): New.
1144 (lower_eh_dispatch, execute_lower_eh_dispatch): New.
1145 (gate_lower_ehcontrol, pass_lower_eh_dispatch): New.
1146 (remove_unreachable_handlers): Rename from
1147 tree_remove_unreachable_handlers; rewrite for landing pads;
1148 call remove_eh_handler directly.
1149 (remove_unreachable_handlers_no_lp): New.
1150 (unsplit_eh, unsplit_all_eh): New.
1151 (tree_empty_eh_handler_p, all_phis_safe_to_merge): Remove.
1152 (cleanup_empty_eh_merge_phis, cleanup_empty_eh_move_lp): New.
1153 (cleanup_empty_eh_unsplit): New.
1154 (cleanup_empty_eh): Rewrite.
1155 (cleanup_all_empty_eh): New.
1156 (execute_cleanup_eh): Rename from cleanup_eh. Remove unreachable
1157 handlers first. Use unsplit_all_eh, cleanup_all_empty_eh.
1158 (gate_cleanup_eh): New.
1159 (pass_cleanup_eh): Use it.
1160 (verify_eh_edges): Move later in file. Expect one EH edge.
1161 (verify_eh_dispatch_edge): New.
1163 * Makefile.in (FUNCTION_H): Use vecprim.h, not varray.h.
1164 (gtype-desc.o): Add TARGET_H.
1165 (tree.o): Use EXCEPT_H, not except.h.
1166 (cfgbuild.o): Add EXPR_H.
1167 (GTFILES): Add vecprim.h.
1168 * builtins.c (expand_builtin): Handle BUILT_IN_EH_POINTER,
1169 BUILT_IN_EH_FILTER, BUILT_IN_EH_COPY_VALUES.
1170 * builtins.def (BUILT_IN_UNWIND_RESUME, BUILT_IN_EH_POINTER,
1171 BUILT_IN_EH_FILTER, BUILT_IN_EH_COPY_VALUES): New.
1172 * calls.c (emit_call_1): Use make_reg_eh_region_note.
1173 * cfgbuild.c (control_flow_insn_p): Use can_nonlocal_goto; tidy
1174 calls to can_throw_internal.
1175 (rtl_make_eh_edge): Use get_eh_landing_pad_from_rtx.
1176 (make_edges): Don't handle RESX; use can_nonlocal_goto.
1177 * cfgexpand.c (expand_gimple_stmt_1): Don't handle RESX.
1178 (expand_gimple_stmt): Use make_reg_eh_region_note.
1179 (expand_debug_expr): Don't handle EXC_PTR_EXPR and FILTER_EXPR.
1180 (gimple_expand_cfg): Don't call convert_from_eh_region_ranges,
1181 or find_exception_handler_labels.
1182 * cfgrtl.c (rtl_verify_flow_info_1): Don't handle RESX. Assert
1183 there is exacly one EH edge. Use can_nonlocal_goto and
1185 * cgraphunit.c (update_call_expr): Use maybe_clean_eh_stmt_fn.
1186 (cgraph_materialize_all_clones): Use maybe_clean_or_replace_eh_stmt.
1187 * combine.c (can_combine_p, try_combine): Use insn_nothrow_p.
1188 * cse.c (count_reg_usage, insn_live_p): Use insn_could_throw_p.
1189 * dce.c (deletable_insn_p_1): Don't test may_trap_p.
1190 (deletable_insn_p): Use insn_nothrow_p; reorder nonjump insn test.
1191 * dse.c (scan_insn): Use insn_could_throw_p.
1192 * emit-rtl.c (try_split): Use copy_reg_eh_region_note_backward.
1193 * expr.c (expand_expr_real): Use make_reg_eh_region_note.
1194 (expand_expr_real_1): Don't handle RESX, EXC_PTR, or FILTER_EXPR.
1195 * fold-const.c (tree_expr_nonnegative_warnv_p): Don't handle
1196 EXC_PTR_EXPR or FILTER_EXPR.
1197 (tree_expr_nonzero_warnv_p): Likewise.
1198 * function.h: Include vecprim.h, not varray.h
1199 (struct rtl_eh): Remove filter, exc_ptr, built_landing_pad members;
1200 move ttype_data and ehspec_data members to struct eh_status; change
1201 action_record_data member to a VEC.
1202 * gcse.c (hash_scan_set): Use can_throw_internal.
1203 * gengtype.c (open_base_files): Add target.h to gtype-desc.c.
1204 * gimple-iterator.c (gsi_replace): Use maybe_clean_or_replace_eh_stmt.
1205 * gimple-low.c (lower_stmt): Handle GIMPLE_EH_MUST_NOT_THROW.
1206 (block_may_fallthru): Don't handle RESX_EXPR.
1207 * gimple-pretty-print.c (dump_gimple_label): Dump EH_LANDING_PAD_NR.
1208 (dump_gimple_eh_must_not_throw, dump_gimple_eh_dispatch): New.
1209 (dump_gimple_stmt): Dump landing pad information with TDF_EH;
1210 handle GIMPLE_EH_MUST_NOT_THROW, GIMPLE_EH_DISPATCH.
1211 * gimple.c (gss_for_code): Handle GIMPLE_EH_MUST_NOT_THROW,
1212 GIMPLE_EH_DISPATCH, GIMPLE_RESX.
1213 (gimple_size): Likewise.
1214 (gimple_build_eh_dispatch, gimple_build_eh_must_not_throw): New.
1215 (gimple_build_resx): Use gimple_build_with_ops.
1216 (DEFTREECODE): Don't handle EXC_PTR_EXPR, FILTER_EXPR.
1217 (is_gimple_val): Likewise.
1218 (is_gimple_stmt): Remove RESX_EXPR.
1219 * gimple.def (GIMPLE_EH_MUST_NOT_THROW, GIMPLE_EH_DISPATCH): New.
1220 (GIMPLE_RESX): Reorder with other EH constructs.
1221 * gimple.h (struct gimple_statement_eh_mnt): New.
1222 (struct gimple_statement_eh_ctrl): Rename from gimple_statement_resx.
1223 (gimple_eh_filter_must_not_throw): Remove.
1224 (gimple_eh_filter_set_must_not_throw): Remove.
1225 (gimple_eh_must_not_throw_fndecl): New.
1226 (gimple_eh_dispatch_region, gimple_eh_dispatch_set_region): New.
1227 (is_gimple_resx): New.
1228 * gimplify.c (gimplify_expr): Don't handle EXC_PTR_EXPR, RESX_EXPR.
1229 Don't copy EH_FILTER_MUST_NOT_THROW.
1230 * gsstruct.def (GSS_EH_MNT, GSS_EHCONTROL): New.
1231 * ipa-inline.c (estimate_function_body_sizes): Don't try to
1232 handle must_not_throw_labels specially.
1233 * ipa-pure-const.c (check_call): Update debug statement for LP.
1234 * ipa-type-escape.c (check_operand): Don't handle EXC_PTR or FILTER.
1235 * ipa-utils.c (get_base_var): Likewise.
1236 * libfunc.h (LTI_unwind_resume, unwind_resume_libfunc): Remove.
1237 * lower-subreg.c (move_eh_region_note): Remove.
1238 (resolve_simple_move): Use copy_reg_eh_region_note_forward.
1239 * omp-low.c (new_omp_context): Update for eh_lp_nr.
1240 (create_task_copyfn): Likewise.
1241 (maybe_catch_exception): Use gimple_build_eh_filter.
1242 * optabs.c (emit_libcall_block): Update test for no-nonlocal-goto
1243 REG_EH_REGION. Use make_reg_eh_region_note_nothrow_nononlocal.
1244 * passes.c (init_optimization_passes): Add pass_lower_eh_dispatch
1245 and pass_lower_resx.
1246 * print-tree.c (print_node): Dump EH_LANDING_PAD_NR.
1247 * recog.c (peephole2_optimize): Use copy_reg_eh_region_note_backward,
1248 can_throw_internal, can_nonlocal_goto.
1249 * reload1.c (fixup_eh_region_note): Use insn_could_throw_p,
1250 copy_reg_eh_region_note_forward.
1251 (emit_input_reload_insns): Use copy_reg_eh_region_note_forward.
1252 (emit_output_reload_insns): Likewise.
1253 (copy_eh_notes): Remove.
1254 * rtl.def (RESX): Remove.
1255 * rtl.h: Update declarations.
1256 * sese.c (graphite_copy_stmts_from_block): Use maybe_duplicate_eh_stmt.
1257 * tree-cfg.c (make_edges): Handle GIMPLE_EH_DISPATCH.
1258 (update_eh_label): Remove.
1259 (cleanup_dead_labels_eh): New.
1260 (cleanup_deal_labels): Use it instead of update_eh_label.
1261 (gimple_merge_blocks): Update landing pad data structure when
1262 removing a landing pad label.
1263 (remove_useless_stmts_tc): Remove gimple_eh_filter_must_not_throw
1264 test; handle GIMPLE_EH_MUST_NOT_THROW.
1265 (is_ctrl_altering_stmt): Handle GIMPLE_EH_DISPATCH.
1266 (verify_gimple_assign_single): Don't handle EXC_PTR or FILTER_EXPR.
1267 (verify_types_in_gimple_stmt): Handle GIMPLE_EH_DISPATCH.
1268 (verify_stmt): Likewise. Verify landing pads.
1269 (gimple_redirect_edge_and_branch): Handle GIMPLE_EH_DISPATCH.
1270 (gimple_duplicate_bb): Use maybe_duplicate_eh_stmt.
1271 (struct move_stmt_d): Add eh_map.
1272 (move_stmt_eh_region_nr, move_stmt_eh_region_tree_nr): New.
1273 (move_stmt_r): Remap eh region numbers in builtin calls,
1274 resx and eh_dispatch.
1275 (move_block_to_fn): Remove eh_offset parameter. Use
1276 maybe_duplicate_eh_stmt_fn.
1277 (find_outermost_region_in_block): Operate on eh_region pointers
1278 instead of region numbers.
1279 (move_sese_region_to_fn): Expect eh_map instead of eh_offset from
1280 duplicate_eh_regions.
1281 * tree-cfgcleanup.c (tree_forwarder_block_p): Move entry block edge
1282 test earlier. Disallow EH landing pads.
1283 * tree-cfa.c (create_tree_common_ann): Don't set ann->rn.
1284 * tree-flow.h: Update declarations.
1285 (struct tree_ann_common_d): Replace rn with lp_nr.
1286 * tree-inline.c (copy_tree_body_r): Don't handle RESX_EXPR.
1287 (remap_eh_region_nr, remap_eh_region_tree_nr): New.
1288 (remap_gimple_stmt): Remap eh region numbers in builtin calls,
1289 resx and eh_dispatch.
1290 (copy_bb): Use maybe_duplicate_eh_stmt_fn.
1291 (copy_edges_for_bb): Use make_eh_dispatch_edges.
1292 (copy_cfg_body): Expect eh_map instead of eh_region_offset
1293 from duplicate_eh_regions.
1294 (estimate_num_insns): Don't handle EXC_PTR_EXPR or FILTER_EXPR;
1295 update RESX; handle EH_DISPATCH.
1296 (expand_call_inline): Set eh_lp_nr, not eh_region.
1297 (maybe_inline_call_in_expr): Likewise.
1298 * tree-inline.h (struct copy_body_data): Replace eh_region with
1299 eh_lp_nr, eh_region_offset with eh_map.
1300 * tree-optimize.c (execute_fixup_cfg): Use maybe_clean_eh_stmt.
1301 * tree-pass.h (pass_lower_eh_dispatch, pass_lower_resx): New.
1302 * tree-pretty-print.c (dump_generic_node): Don't handle
1303 EXC_PTR_EXPR, FILTER_EXPR, RESX_EXPR.
1304 * tree-sra.c (scan_function): Use maybe_clean_eh_stmt.
1305 * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Don't handle
1306 EXC_PTR_EXPR, FILTER_EXPR.
1307 * tree-ssa-operands.c (get_expr_operands): Likewise.
1308 * tree-ssa-propagate.c (valid_gimple_rhs_p): Likewise.
1309 * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
1310 (ao_ref_init_from_vn_reference): Likewise.
1311 * tree-ssa-sink.c (statement_sink_location): Likewise.
1312 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1313 (mark_virtual_phi_result_for_renaming): Export. Tidy.
1314 * tree-ssa-pre.c (get_or_alloc_expr_for): Don't handle
1315 EXC_PTR_EXPR, FILTER_EXPR.
1316 (is_exception_related): Remove.
1317 (compute_avail): Don't call it.
1318 * tree-ssa-structalias.c: Remove VEC definitions for int and unsigned.
1319 * tree.c (find_decls_types_in_eh_region): Update for eh_region changes.
1320 (find_decls_types_in_node): Use FOR_ALL_EH_REGION_FN.
1321 (build_common_builtin_nodes): Add enable_cxa_end_cleanup parameter.
1323 (build_resx): Remove.
1324 * tree.def (EXC_PTR_EXPR, FILTER_EXPR, RESX_EXPR): Remove.
1325 * tree.h: Update declarations.
1326 (EH_FILTER_MUST_NOT_THROW): Remove.
1327 (struct tree_label_decl): Add eh_landing_pad_nr.
1328 (EH_LANDING_PAD_NR): New.
1329 * value-prof.c (gimple_ic): Tidy variable names. Update for
1330 landing pad numbers.
1331 (gimple_stringop_fixed_value): Tidy variable names. Assert
1332 that neither call stmt can throw.
1333 * vecprim.h (uchar): New.
1334 (VEC(uchar,heap), VEC(uchar,gc)): New.
1336 * c-common.c (c_define_builtins): Update call to
1337 build_common_builtin_nodes.
1338 * c-parser.c (c_parse_file): Don't call
1339 default_init_unwind_resume_libfunc.
1341 2009-09-14 Richard Sandiford <rdsandiford@googlemail.com>
1343 * config/mips/mips-protos.h (mips_cfun_has_cprestore_slot_p): Declare.
1344 (mips_cprestore_address_p): Likewise.
1345 (mips_save_gp_to_cprestore_slot): Likewise.
1346 (mips_restore_gp): Rename to...
1347 (mips_restore_gp_from_cprestore_slot): ...this.
1348 (mips_must_initialize_gp_p): Declare.
1349 (mips_emit_save_slot_move): Likewise.
1350 (mips_output_load_label): Return nothing.
1351 (mips_eh_uses): Declare.
1352 * config/mips/mips.h (TARGET_SPLIT_CALLS): Require epilogue_completed.
1353 (TARGET_CPRESTORE_DIRECTIVE): New macro.
1354 (TARGET_ABSOLUTE_JUMPS): Likewise.
1355 (EH_USES): Likewise.
1356 (FIRST_PSEUDO_REGISTER): Update comment.
1357 (MIPS_ABSOLUTE_JUMP): New macro, extracted from...
1358 (MIPS_CALL): ...here.
1359 (REGISTER_NAMES): Add $cprestore.
1360 * config/mips/mips.c (machine_function): Remove has_gp_insn_p.
1361 Add load_label_length, has_inflexible_gp_insn_p,
1362 has_flexible_gp_insn_p, must_initialize_gp_p and
1363 must_restore_gp_when_clobbered_p.
1364 (mips_expand_call): Don't generate split instructions here.
1365 (mips_split_call): Update the call to mips_restore_gp after
1366 the above name change.
1367 (mips16_cfun_returns_in_fpr_p): Move earlier in file.
1368 (mips_find_gp_ref): New function.
1369 (mips_insn_has_inflexible_gp_ref_p): Likewise.
1370 (mips_cfun_has_inflexible_gp_ref_p): Likewise.
1371 (mips_insn_has_flexible_gp_ref_p): Likewise.
1372 (mips_cfun_has_flexible_gp_ref_p): Likewise.
1373 (mips_function_has_gp_insn): Delete.
1374 (mips_global_pointer): Drop the df_regs_ever_live_p check.
1375 Use the new functions above. Only return INVALID_REGNUM
1376 for TARGET_ABSOLUTE_JUMPS.
1377 (mips_must_initialize_gp_p): New function.
1378 (mips_get_cprestore_base_and_offset): New function, extracted from...
1379 (mips_cprestore_slot): ...here. Take a bool parameter.
1380 (mips_cfun_has_cprestore_slot_p): New function.
1381 (mips_cprestore_address_p): Likewise.
1382 (mips_save_gp_to_cprestore_slot): Likewise.
1383 (mips_restore_gp): Rename to...
1384 (mips_restore_gp_from_cprestore_slot): ...this. Assert
1385 epilogue_completed. Update the call to mips_cprestore_slot.
1386 Test cfun->machine->must_restore_gp_when_clobbered_p.
1387 (mips_direct_save_slot_move_p): New function.
1388 (mips_emit_save_slot_move): Likewise.
1389 (mips_output_cplocal): Test mips_must_initialize_gp_p () instead
1390 of cfun->machine->global_pointer.
1391 (mips_output_function_prologue): Check mips_must_initialize_gp_p ().
1392 (mips_save_reg): Use mips_emit_save_slot_move.
1393 (mips_expand_prologue): Set must_initialize_gp_p.
1394 Use mips_cfun_has_cprestore_slot_p. Use gen_potential_cprestore
1395 for all cprestore saves. Emit a use_cprestore instruction after
1396 setting up the cprestore slot.
1397 (mips_restore_reg): Use mips_emit_save_slot_move.
1398 (mips_process_load_label): New function.
1399 (mips_load_label_length): Likewise.
1400 (mips_output_load_label): Don't return asm: output it here instead.
1401 Use mips_process_load_label.
1402 (mips_adjust_insn_length): Adjust the length of branch instructions
1403 that have length MAX_PIC_BRANCH_LENGTH.
1404 (mips_output_conditional_branch): Update the call to
1405 mips_output_load_label. Assume the branch target is OPERANDS[0]
1406 rather than OPERANDS[1]. Use MIPS_ABSOLUTE_JUMP for absolute jumps.
1407 (mips_output_order_conditional_branch): Swap the meaning of
1408 OPERANDS[0] and OPERANDS[1].
1409 (mips_variable_issue): Don't count ghost instructions.
1410 (mips_expand_ghost_gp_insns): New function.
1411 (mips_reorg): Rerun mips_reorg_process_insns if it returns true.
1412 (mips_output_mi_thunk): Set must_initialize_gp_p.
1413 (mips_eh_uses): New function.
1414 * config/mips/predicates.md (cprestore_save_slot_operand)
1415 (cprestore_load_slot_operand): New predicates.
1416 * config/mips/mips.md (UNSPEC_POTENTIAL_CPRESTORE): New unspec.
1417 (UNSPEC_MOVE_GP): Likewise.
1418 (UNSPEC_CPRESTORE, UNSPEC_RESTORE_GP, UNSPEC_EH_RETURN)
1419 (UNSPEC_CONSTTABLE_INT, UNSPEC_CONSTTABLE_FLOAT): Bump to make room.
1420 (CPRESTORE_SLOT_REGNUM): New register.
1421 (MAX_PIC_BRANCH_LENGTH): New constant.
1422 (jal_macro): Use MIPS_ABSOLUTE_JUMPS.
1423 (length): Use MAX_PIC_BRANCH_LENGTH as a placeholder for PIC long
1424 branches. Fix commentary.
1425 (loadgp_newabi_<mode>): Change from unspec_volatile to unspec.
1426 Only split if mips_must_initialize_gp_p; expand to nothing otherwise.
1427 Change type to "ghost".
1428 (loadgp_absolute_<mode>): Likewise.
1429 (loadgp_rtp_<mode>): Likewise.
1430 (copygp_mips16): Likewise.
1431 (loadgp_blockage): Remove redundant mode attribute.
1432 (potential_cprestore): New instruction.
1433 (cprestore): Turn into an unspec set.
1434 (use_cprestore): New instruction.
1435 (*branch_fp): Swap operands 0 and 1. Remove redundant mode attribute.
1436 (*branch_fp_inverted): Likewise.
1437 (*branch_order<mode>): Likewise.
1438 (*branch_order<mode>_inverted): Likewise.
1439 (*branch_equality<mode>): Likewise.
1440 (*branch_equality<mode>_inverted): Likewise.
1441 (*branch_bit<bbv><mode>): Likewise.
1442 (*branch_bit<bbv><mode>_inverted): Likewise.
1443 (*branch_equality<mode>_mips16): Remove redundant mode.
1444 (jump): Turn into a define_expand.
1445 (*jump_absolute): New instruction.
1446 (*jump_pic): Likewise.
1447 (*jump_mips16): Rename previously-unnamed pattern. Remove
1448 redundant mode attribute.
1449 (restore_gp): Split on epilogue_completed rather than
1450 reload_completed. Change type to "ghost".
1451 (move_gp<mode>): New instruction.
1452 * config/mips/mips-dsp.md (mips_bposge): Swap operands 0 and 1.
1453 Remove redundant mode attribute.
1454 * config/mips/mips-ps-3d.md (bc1any4t): Likewise.
1455 (bc1any4f, bc1any2t, bc1any2f): Likewise.
1456 (*branch_upper_lower, *branch_upper_lower_inverted): Likewise.
1458 2009-09-14 Michael Meissner <meissner@linux.vnet.ibm.com>
1461 * config/rs6000/rs6000.c (rs6000_function_value): V2DF and V2DI
1462 are returned in the same register (vs34 or v2) that Altivec vector
1463 types are returned in.
1464 (rs6000_libcall_value): Ditto.
1467 * config/rs6000/rs6000.c (rs6000_emit_move): Use gen_add3_insn
1468 instead of explicit addsi3/adddi3 calls.
1469 (rs6000_split_multireg_move): Ditto.
1470 (rs6000_emit_allocate_stack): Ditto.
1471 (rs6000_emit_prologue): Ditto.
1472 (rs6000_output_mi_thunk): Ditto.
1474 * config/rs6000/rs6000.md (bswapdi*): Don't assume the pointer
1475 size is 64 bits if we can use 64-bit registers.
1477 2009-09-14 Bernd Schmidt <bernd.schmidt@analog.com>
1479 * config/bfin/bfin.c (bfin_longcall_p): Don't use short calls for weak
1482 From Jie Zhang <jie.zhang@analog.com>:
1483 * config/bfin/bfin.c (bfin_expand_prologue): Ask do_link to
1484 save FP and RETS with saveall attribute.
1485 (bfin_expand_epilogue): Ask do_unlink to restore FP and RETS
1486 with saveall attribute.
1488 * config/bfin/bfin.c (bfin_expand_builtin,
1489 case BFIN_BUILTIN_MULT_1X32X32): Force constants to registers for the
1492 From Jie Zhang <jie.zhang@analog.com>:
1493 * config/bfin/bfin.c (bfin_expand_builtin): Initialize icodes
1494 before use in two places.
1495 * config/bfin/bfin.md (AREG): Define mode iterator.
1496 (reload_in, reload_out): Use mode iterator AREG.
1498 2009-09-14 Richard Guenther <rguenther@suse.de>
1501 * dwarf2out.c (dwarf2out_begin_prologue): Adjust non-CFI asm
1502 EH personality path.
1504 2009-09-13 Richard Guenther <rguenther@suse.de>
1505 Rafael Avila de Espindola <espindola@google.com>
1507 * langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
1508 (LANG_HOOKS_EH_PERSONALITY): Likewise.
1509 (LANG_HOOKS_INITIALIZER): Adjust.
1510 (lhd_pass_through_t): Declare.
1511 * langhooks.h (struct lang_hooks): Add eh_runtime_type and
1513 * langhooks.c (lhd_pass_through_t): New function.
1514 * dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc,
1515 dwarf2out_begin_prologue): Use personality from current_function_decl.
1516 * expr.h (get_personality_function): Declare.
1517 * expr.c (get_personality_function): New function.
1518 (build_personality_function): Likewise.
1519 * libfuncs.h (libfunc_index): Remove LTI_eh_personality.
1520 (eh_personality_libfunc): Remove.
1521 * optabs.c (build_libfunc_function): New function split out from ...
1522 (init_one_libfunc): ... here.
1523 * tree.h (DECL_FUNCTION_PERSONALITY): New.
1524 (tree_function_decl): Add personality.
1525 (lhd_gcc_personality): Declare.
1526 (build_personality_function): Likewise.
1527 * tree.c (gcc_eh_personality_decl): New.
1528 (lhd_gcc_personality): New function.
1529 * except.h (lang_eh_runtime_type): Remove.
1530 (enum eh_personality_kind): New.
1531 (build_personality_function): Declare.
1532 (function_needs_eh_personality): Declare.
1533 * except.c (lang_eh_runtime_type): Remove.
1534 (function_needs_eh_personality): New function.
1535 (add_type_for_runtime): Call lang_hooks.type_for_runtime instead.
1536 (sjlj_emit_function_enter, output_function_exception_table):
1537 Use personality from current_function_decl.
1538 * tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY.
1539 * tree-inline.c (tree_can_inline_p): Do not inline across different
1541 (expand_call_inline): Likewise. Adjust the callers EH personality.
1542 (tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY.
1543 * cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY.
1544 * Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency.
1545 (c-parser.o): Likewise
1546 * c-tree.h (c_eh_initialized_p): Remove.
1547 (c_maybe_initialize_eh): Likewise.
1548 * c-decl.c (finish_decl): Don't call c_maybe_initialize_eh.
1549 (finish_decl): Don't call c_maybe_initialize_eh.
1550 (c_eh_initialized_p): Remove.
1551 (c_maybe_initialize_eh): Likewise.
1552 * c-parser.c (c_parser_omp_construct): Likewise.
1553 (c_parse_file): Initialize exception handling.
1555 2009-09-13 Kai Tietz <kai.tietz@onevision.com>
1557 * config.gcc (tm_file): Remove i386/biarch32.h
1558 for i?86-w64-mingw* case.
1559 (i?86-*-mingw* andx86_64-*-mingw*): Add multilib
1561 * config.host: Set for x64 mingw the option
1562 use_long_long_for_widest_fast_int to yes.
1564 2009-09-13 Eric Botcazou <ebotcazou@adacore.com>
1566 * tree.h (DECL_IGNORED_P): Document further effect for FUNCTION_DECL.
1567 * dbxout.c (dbxout_function_end): Do not test DECL_IGNORED_P.
1568 (dbxout_begin_function): Likewise.
1569 * final.c (dwarf2_debug_info_emitted_p): New predicate.
1570 (final_start_function): Do not emit debug info if DECL_IGNORED_P is
1571 set on the function.
1572 (final_end_function): Likewise.
1573 (final_scan_insn): Likewise.
1574 (rest_of_handle_final): Likewise.
1575 * varasm.c (assemble_start_function): Likewise.
1576 * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
1578 2009-09-12 Jason Merrill <jason@redhat.com>
1580 * dbgcnt.c (dbg_cnt_process_single_pair): constify.
1581 * opts.c (common_handle_option): constify.
1583 2009-09-12 Gerald Pfeifer <gerald@pfeifer.com>
1585 * doc/install.texi (avr): Remove obsolete reference site.
1587 2009-09-12 Gerald Pfeifer <gerald@pfeifer.com>
1589 * doc/install.texi (Binaries): Adjust AIX link.
1591 2009-09-12 Akim Demaille <demaille@gostai.com>
1593 * doc/invoke.texi (-fstrict-aliasing): Correct two examples.
1594 Use an imperative sentence.
1596 2009-09-11 Richard Henderson <rth@redhat.com>
1598 * gsstruct.def (DEFGSSTRUCT): Remove printable-name argument; add
1599 structure-name and has-tree-operands arguments; update all entries.
1600 * gimple.def (DEFGSCODE): Replace 3rd argument with GSS_symbol;
1602 * gimple.c (gimple_ops_offset_): Use HAS_TREE_OP argument.
1603 (gsstruct_code_size): New.
1604 (gss_for_code_): New.
1605 (gss_for_code): Remove.
1606 (gimple_size): Rewrite using gsstruct_code_size.
1607 (gimple_statement_structure): Move to gimple.h.
1608 * gimple.h (gimple_ops_offset_, gss_for_code_): Declare.
1609 (gss_for_code, gimple_statement_structure): New.
1610 (gimple_ops): Use new arrays; tidy.
1612 2009-09-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1614 * config/pa/predicates.md (symbolic_operand): Require a CONST symbolic
1615 operand to be a PLUS expression.
1616 * config/pa/pa.c (pa_secondary_reload): Likewise.
1618 2009-09-11 Jakub Jelinek <jakub@redhat.com>
1620 * combine.c (propagate_for_debug_subst): Call wrap_constant on top.
1622 * print-rtl.c (print_rtx): Use JUMP_LABEL (in_rtx) instead of
1625 2009-09-11 Bernd Schmidt <bernd.schmidt@analog.com>
1627 From Jie Zhang <jie.zhang@analog.com>:
1628 * doc/extend.texi (node Function Attributes): Document l2
1630 (node Blackfin Variable Attributes): Document l2 variable attributes.
1632 2009-09-11 Loren J. Rittle <ljrittle@acm.org>
1634 * config.gcc (*-*-freebsd*): Enable default_use_cxa_atexit
1635 to match the system compiler's configuration at inflection point.
1636 Add comment to remark a remaining difference with system compiler.
1638 * configure.ac (*-*-freebsd*): Enable check for __stack_chk_fail.
1639 * configure: Regenerate.
1641 2009-09-11 Bernd Schmidt <bernd.schmidt@analog.com>
1643 From Jie Zhang <jie.zhang@analog.com>:
1644 * config/bfin/bfin.c (bfin_expand_call): Handle L2 functions.
1645 (bfin_handle_l2_attribute): New.
1646 (bfin_attribute_table): Add l2 attribute.
1648 2009-09-11 Michael Matz <matz@suse.de>
1651 * tree-inline.c (remap_decls): Don't put DECL_EXTERNAL decls
1652 on the local_decls list.
1654 2009-09-11 Alexandre Oliva <aoliva@redhat.com>
1658 * cselib.c (cselib_expand_value_rtx_cb): Document callback
1660 (cselib_expand_value_rtx_1): Use callback for SUBREGs. Adjust
1661 for VALUEs, to implement the documented interface.
1662 * var-tracking.c (vt_expand_loc_callback): Handle SUBREGs.
1663 Adjust for VALUEs and anything else, to implement the
1664 documented interface.
1666 2009-09-10 Nathan Froyd <froydnj@codesourcery.com>
1668 * config/rs6000/rs6000.h (DATA_ALIGNMENT): Check that we are dealing
1669 with actual SPE/paired vector modes before using 64-bit alignment.
1670 Check that TYPE is a REAL_TYPE for TARGET_E500_DOUBLE.
1672 2009-09-10 DJ Delorie <dj@redhat.com>
1674 * config/mep/mep.md (eh_epilogue): Defer until after epilogue is
1677 * config/mep/mep.h (LEGITIMATE_CONSTANT_P): New.
1678 * config/mep/mep.c (mep_legitimate_constant_p): New.
1679 * config/mep/mep-protos.h: Prototype it.
1681 2009-09-10 Richard Henderson <rth@redhat.com>
1683 * print-rtl.c (print_rtx): Fix JUMP_LABEL index.
1685 2009-09-10 Jason Merrill <jason@redhat.com>
1687 * tree.c (chain_index): New fn.
1688 * tree.h: Declare it.
1690 2009-09-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1692 * config/sol2-c.c (cmn_err_length_specs): Initialize
1693 scalar_identity_flag.
1695 2009-09-10 Richard Henderson <rth@redhat.com>
1697 * tree.h (struct tree_decl_common): Move align member earlier;
1698 move label_decl_uid member ...
1699 (struct tree_label_decl): ... here.
1700 (LABEL_DECL_UID): Update to match.
1702 * tree-cfg.c (dump_function_to_file): Dump eh tree with TDF_EH,
1705 * tree-cfg.c (gimple_redirect_edge_and_branch): Do
1706 gimple_try_redirect_by_replacing_jump test after no-op and EH tests.
1708 * tree-cfg.c (split_edge_bb_loc): Don't disallow placement at
1709 dest_prev if the edge is complex.
1711 * tree-cfg.c (is_ctrl_stmt): Use a switch.
1713 * tree-cfg.c (gimple_can_merge_blocks_p): Move label and
1714 loop latch tests earlier.
1716 * gimple-iterator.c (gimple_find_edge_insert_loc): Insert
1717 before GIMPLE_RETURN, not after its predecessor; insert
1720 * gimple-iterator.c (gimple_find_edge_insert_loc): Use
1721 gimple_seq_empty_p to test for no PHI nodes.
1722 * tree-cfg.c (split_critical_edges): Likewise.
1724 * c-common.h (c_dialect_cxx, c_dialect_objc): Boolify.
1726 2009-09-10 Hariharan Sandanagobalane <hariharan@picochip.com>
1728 * final.c (shorten_branches) : Ignore DEBUG_INSN_P instructions
1729 introduced by the VTA branch merge.
1731 2009-09-10 Uros Bizjak <ubizjak@gmail.com>
1733 * ira-conflicts.c: Use fputs or putc instead of fprintf
1737 * tree-switch-conversion.c: Ditto.
1739 2009-09-10 Hariharan Sandanagobalane <hariharan@picochip.com>
1741 * config/picochip/picochip.c : Ignore DEBUG_INSN_P instructions
1742 introduced by the VTA branch merge.
1744 2009-09-10 Uros Bizjak <ubizjak@gmail.com>
1747 2009-09-09 Uros Bizjak <ubizjak@gmail.com>
1749 PR rtl-optimization/39779
1750 * expr.c (convert_modes): Return when mode == oldmode after
1751 CONST_INTs are processed.
1753 2009-09-10 Nick Clifton <nickc@redhat.com>
1755 * config/mep/mep.c (mep_encode_section_info): Copy weakness
1756 attribute and referring decl when creating renamed symbol.
1758 2009-09-10 Richard Guenther <rguenther@suse.de>
1761 * cgraphunit.c (cgraph_emit_thunks): Emit thunks only for
1763 (cgraph_finalize_compilation_unit): Compute reachability
1764 before emitting thunks. Properly process aliases before
1765 possibly removing unreachable nodes.
1767 2009-09-10 Richard Guenther <rguenther@suse.de>
1770 * tree.c (struct free_lang_data_d): Add worklist member.
1771 (find_decls_types_r): Push onto the worklist instead of recursing.
1772 Handle TREE_BINFOs properly.
1773 (find_decls_types): New function wrapped around find_decls_types_r
1774 to process the worklist.
1775 (find_decls_types_in_eh_region): Use it.
1776 (find_decls_types_in_node): Likewise.
1777 (find_decls_types_in_var): Likewise.
1778 (free_lang_data_in_cgraph): Likewise. Free the worklist.
1779 * tree.h (RECORD_OR_UNION_TYPE_P): New.
1780 (AGGREGATE_TYPE_P): Adjust.
1782 2009-09-09 Jason Merrill <jason@redhat.com>
1784 * configure.ac: Check glibc version even if we have an in-tree
1787 2009-09-09 Anthony Green <green@moxielogic.com>
1789 * config/moxie/moxie.md (*movsi, *movhi, *movqi): Use xor to load
1790 the constant 0 when appropriate.
1791 * config/moxie/constraints.md: Add constraint O.
1793 * config/moxie/moxie.c (moxie_setup_incoming_varargs): Adjust
1794 to pass up to 6 32-bit argument values in registers.
1795 (moxie_function_arg): Ditto.
1796 (moxie_arg_partial_bytes): Ditto.
1797 * config/moxie/moxie.h (FUNCTION_ARG_ADVANCE): Ditto.
1798 (REG_PARM_STACK_SPACE): Ditto.
1799 (FUNCTION_ARG_REGNO_P): Ditto.
1801 * config/moxie/moxie.c (moxie_expand_prologue): Use dec
1802 instruction to allocate stack space.
1804 2009-09-09 Segher Boessenkool <segher@kernel.crashing.org>
1806 * config/rs6000/rs6000.md (bswapdi2_64bit): Fix
1807 unnecessarily stringent constraints. Fix address
1808 calculation in the splitters.
1810 2009-09-09 Uros Bizjak <ubizjak@gmail.com>
1812 PR rtl-optimization/39779
1813 * expr.c (convert_modes): Return when mode == oldmode after
1814 CONST_INTs are processed.
1816 2009-09-09 Kai Tietz <kai.tietz@onevision.com>
1819 * config/i386.c (ix86_can_use_return_insn_p): Check for padding0, too.
1820 (ix86_expand_prologue): Take frame.padding0 into logic of
1822 (ix86_expand_epilogue): Likewise.
1824 2009-09-09 Jakub Jelinek <jakub@redhat.com>
1826 * config/t-slibgcc-elf-ver (SHLIB_MAKE_SOLINK, SHLIB_INSTALL_SOLINK):
1828 (SHLIB_LINK, SHLIB_INSTALL): Use them.
1829 * config/t-slibgcc-libgcc: New file.
1830 * config.gcc (powerpc*-*-linux*, powerpc*-*-gnu*): Use it.
1832 2009-09-09 Martin Jambor <mjambor@suse.cz>
1834 PR tree-optimization/41089
1835 * tree-sra.c (find_var_candidates): Do not consider va_lists in
1838 2009-09-09 Richard Henderson <rth@redhat.com>
1840 * gimple.h (CASE_GIMPLE_OMP): New.
1841 (is_gimple_omp): Use it.
1842 * tree-cfg.c (is_ctrl_altering_stmt): Likewise.
1843 (verify_gimple_debug): Likewise.
1845 2009-09-09 Richard Guenther <rguenther@suse.de>
1847 PR tree-optimization/41101
1848 * tree-ssa-pre.c (maximal_set): Remove.
1849 (compute_antic_aux): Treat the maximal set as implicitly all ones.
1850 Defer all blocks we didn't visit at least one successor.
1851 (add_to_exp_gen): Do not add to the maximal set.
1852 (make_values_for_phi): Likewise.
1853 (compute_avail): Likewise.
1854 (init_pre): Do not allocate the maximal set.
1855 (execute_pre): Do not dump it.
1857 2009-09-09 Martin Jambor <mjambor@suse.cz>
1859 * tree-cfg.c (verify_gimple_phi): Check that gimple_phi_result is
1860 an SSA_NAME rather than a is_gimple_variable.
1862 2009-09-09 Richard Guenther <rguenther@suse.de>
1865 * tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Remove
1866 code dealing with plain pointer bases.
1867 (maybe_fold_offset_to_reference): Likewise.
1868 (maybe_fold_stmt_addition): Adjust.
1870 2009-09-09 Richard Guenther <rguenther@suse.de>
1872 * tree.c (free_lang_data_in_type): Do not free the type variant
1874 (free_lang_data): Merge char_type_node with its properly signed
1876 (pass_ipa_free): Collect after freeing language specific data.
1878 2009-09-09 Michael Matz <matz@suse.de>
1881 * cfgexpand.c (expand_gimple_stmt_1): Use an int for storing
1882 SUBREG_PROMOTED_UNSIGNED_P, instead of a bool.
1883 * rtl.h (struct rtx, SUBREG_PROMOTED_UNSIGNED_P): Update comments
1886 2009-09-08 DJ Delorie <dj@redhat.com>
1888 * config/mep/mep.c (conversions[]): Add "ml" pattern.
1890 2009-09-04 Jason Merrill <jason@redhat.com>
1892 * tree.c (tree_find_value): Remove.
1893 * tree.h: Remove prototype.
1894 * varasm.c (assemble_external): Use value_member instead.
1896 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
1898 * toplev.c (process_options): Choose default debugging type when
1899 gtoggle enables debug info and type is unset.
1901 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
1905 * cselib.c (cselib_expand_value_rtx_1): Don't return copy of
1908 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
1910 * configure: Rebuilt with modified libtool.m4.
1912 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
1917 * tree-ssa.c (execute_update_addresses_taken): Update debug insns.
1919 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
1921 * tree-ssa-loop-ivopts.c (get_phi_with_result): Remove.
1922 (remove_statement): Likewise.
1923 (rewrite_use_nonlinear_expr): Adjust.
1924 (remove_unused_ivs): Collect SSA NAMEs to remove and call...
1925 * tree-ssa.c (release_defs_bitset): ... this. New.
1926 * tree-flow.h (release_defs_bitset): Declare.
1928 2009-09-08 Alexandre Oliva <aoliva@redhat.com>
1931 * tree-ssa-phiopt.c (minmax_replacement): Skip debug stmts
1932 in the middle block.
1934 2009-09-08 Kai Tietz <kai.tietz@onevision.com>
1936 * tree-ssa-reassoc.c (find_operand_rank): Cast pointer
1937 via intptr_t to long type.
1938 (insert_operand_rank): Cast long type via intptr_t to
1940 * genattrtab.c (RTL_HASH): Use intptr_t to cast from
1942 * c-pretty-print.c (pp_c_tree_decl_identifier): Cast
1943 from pointer to unsigned via uintptr_t.
1945 * configure.ac (GCC_STDINT_TYPES): Initialize intptr_t,
1946 uintptr_t, HAVE_INTTYPES_H, HAVE_STDINT_H, HAVE_UINTPTR_T,
1948 * configure: Regenerated.
1949 * config.in: Regenerated
1950 * system.h (stdint.h): Add include.
1951 (inttypes.h): Likewise.
1952 * Makefile.in (aclocal): Add config/stdint.m4.
1953 * aclocal.m4: Regenerated.
1955 2009-09-08 Bernd Schmidt <bernd.schmidt@analog.com>
1957 * config/bfin/bfin.c (np_check_regno, np_after_branch): New static
1959 (note_np_check_stores): New function.
1960 (harmless_null_pointer_p): New function.
1961 (trapping_loads_p): New args NP_REG and AFTER_NP_BRANCH. Callers
1962 changed. Take into account whether we're in the shadow of a condjump
1963 that tested NP_REG for NULL.
1964 Lose all code that tested for SEQUENCEs.
1965 (workaround_speculation): Avoid inserting NOPs for loads that are
1966 either always executed or a NULL pointer.
1968 2009-09-08 Jan Hubicka <jh@suse.cz>
1970 * doc/invoke.texi (early-inlining-insns): Reduce from 12 to 8.
1971 * params.def (early-inlining-insns): Likewise.
1973 2009-09-08 Jakub Jelinek <jakub@redhat.com>
1975 PR rtl-optimization/41239
1976 * sched-int.h (struct deps): Add last_function_call_may_noreturn field.
1977 * sched-rgn.c (deps_join): Join also last_function_call_may_noreturn
1979 * sched-deps.c (sched_analyze_insn): Prevent moving trapping insns
1980 across calls, as the calls might not always return normally.
1981 (call_may_noreturn_p): New function.
1982 (deps_analyze_insn): Update last_function_call_may_noreturn list.
1983 (init_deps): Initialize it.
1984 (remove_from_deps): Also remove calls from
1985 last_function_call_may_noreturn list.
1987 2009-09-07 Richard Henderson <rth@redhat.com>
1989 * tree-ssa-sccvn.c (vn_reference_lookup_3): Don't assume there are
1990 more VR->OPERANDS than LHS operands. Free LHS before returning.
1992 2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com>
1994 * config/bfin/bfin.md (UNSPEC_VOLATILE_STALL): New constant.
1995 (attr "addrtype"): New member "spreg".
1996 Use it if mem_spfp_address_operand is true for the address.
1997 (attr "type"): New entry "stall".
1998 (cpu_unit "load"): New.
1999 (insn_reservations "load32", "loadp", "loadi"): Add reservation of
2001 (insn_reservation "loadsp"): New.
2002 (insn_reservation "load_stall1"): New.
2003 (insn_reservation "load_stall3"): New.
2005 * config/bfin/predicates.md (const1_operand, const3_operand): New.
2006 (mem_p_address_operand): Exclude stack and frame pointer based
2008 (mem_spfp_address_operand): New; match them here.
2009 * config/bfin/bfin.c (add_sched_insns_for_speculation): New function.
2010 (bfin_reorg): Call it if scheduling insns.
2011 (bfin_gen_bundles): Remove dummy insns created by
2012 add_sched_insns_for_speculation.
2014 From Jie Zhang <jie.zhang@analog.com>:
2015 * config/bfin/bfin-protos.h (enum bfin_cpu_type, bfin_cpu_type,
2016 bfin_si_revision, bfin_workarounds): Move these ...
2017 * config/bfin/bfin.h: ... here.
2019 From Mike Frysinger <michael.frysinger@analog.com>
2020 * config/bfin/bfin-protos.h (bfin_cpu_type): Add BFIN_CPU_BF542M,
2021 BFIN_CPU_BF544M, BFIN_CPU_BF547M, BFIN_CPU_BF548M, and BFIN_CPU_BF549M.
2022 * config/bfin/bfin.c (bfin_cpus[]): Add 0.3 for bf542m, bf544m,
2023 bf547m, bf548m, and bf549m.
2024 * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Define __ADSPBF542M__
2025 for BFIN_CPU_BF542M, __ADSPBF544M__ for BFIN_CPU_BF544M,
2026 __ADSPBF547M__ for BFIN_CPU_BF547M, __ADSPBF548M__ for
2027 BFIN_CPU_BF548M, and __ADSPBF549M__ for BFIN_CPU_BF549M.
2028 * config/bfin/t-bfin-elf (MULTILIB_MATCHES): Select bf532-none for
2029 bf542m-none, bf544m-none, bf547m-none, bf548m-none, and bf549m-none.
2030 * config/bfin/t-bfin-linux (MULTILIB_MATCHES): Likewise.
2031 * config/bfin/t-bfin-uclinux (MULTILIB_MATCHES): Likewise.
2032 * doc/invoke.texi (Blackfin Options): Document that -mcpu now accepts
2033 bf542m, bf544m, bf547m, bf548m, and bf549m.
2035 From Jie Zhang <jie.zhang@analog.com>:
2036 * config/bfin/predicates.md (p_register_operand): New predicate.
2037 (dp_register_operand): New predicate.
2038 * config/bfin/bfin-protos.h (WA_05000074): Define.
2039 (ENABLE_WA_05000074): Define.
2040 * config/bfin/bfin.c (bfin_cpus[]): Add WA_05000074 for all cpus.
2041 (bfin_gen_bundles): Put dsp32shiftimm instruction in slot[0].
2042 * config/bfin/bfin.md (define_attr type): Add dsp32shiftimm.
2043 (define_attr addrtype): Allow load/store register to be P register.
2044 (define_attr storereg): New.
2045 (define_cpu_unit anomaly_05000074): New.
2046 (define_insn_reservation dsp32shiftimm): New.
2047 (define_insn_reservation dsp32shiftimm_anomaly_05000074): New.
2048 (define_insn_reservation loadp): Cannot use slot2.
2049 (define_insn_reservation loadsp): Cannot use slot2.
2050 (define_insn_reservation storep): Cannot use slot2. Does not
2051 apply when working around 05000074.
2052 (define_insn_reservation storep_anomaly_05000074): New.
2053 (define_insn_reservation storei): Does not apply when working
2055 (define_insn_reservation storei_anomaly_05000074): New.
2056 (define_attr length): Add dsp32shiftimm case.
2057 (define_insn movsi_insn32, movsi_insv, ashlsi3_insn, ashrsi3,
2058 ror_one, rol_one, lshrsi3, lshrpdi3, ashrpdi3, movhiv2hi_low,
2059 movhiv2hi_high, composev2hi, packv2hi, movv2hi_hi,
2060 ssashiftv2hi3, ssashifthi3, ssashiftsi3, lshiftv2hi3, lshifthi3):
2061 Set type as dsp32shiftimm for dsp32shiftimm alternatives.
2063 2009-09-07 Martin Jambor <mjambor@suse.cz>
2066 * tree-sra.c (create_artificial_child_access): Return NULL if
2067 build_ref_for_offset fails.
2068 (propagate_subacesses_accross_link): Allow build_ref_for_offset
2069 and create_artificial_child_access to fail.
2071 2009-09-06 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2074 * unwind-dw2.c (uw_init_context_1): Mark noinline.
2075 * config/ia64/unwind-ia64.c (uw_init_context_1): Likewise.
2076 * config/xtensa/unwind-dw2-xtensa.c (uw_init_context_1): Likewise.
2078 2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com>
2080 * config/bfin/bfin.c (bfin_optimize_loop): When creating a new basic
2081 block, ensure it has an exit edge. Emit a barrier after a jump.
2083 2009-09-07 Nick Clifton <nickc@redhat.com>
2085 * gcc.c (this_is_linker_script): New variable. Like
2086 this_is_library_file but for the %T constructor.
2087 (end_going_arg): If this_is_linker_script is set then locate the
2088 script and insert a --script switch before it
2089 (do_spec_2): Initialise this_is_linker_script.
2090 (do_spec_1): Likewise. Handle %T construct.
2091 (eval_spec_function): Preserve this_is_linker_script.
2092 * doc/invoke.texi: Document %T construct in spec files.
2093 * config/m32c/m32c.h (LIB_SPEC): Use it.
2095 2009-09-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2097 * rtl.h (PREFETCH_SCHEDULE_BARRIER_P): New macro.
2098 * sched-deps.c (sched_analyze_2): Make prefetches a hard barrier
2099 when volatile flag is set.
2100 * doc/rtl.texi (PREFETCH_SCHEDULE_BARRIER_P): Add documentation pieces.
2102 2009-09-06 Eric Botcazou <ebotcazou@adacore.com>
2105 * combine-stack-adj.c (try_apply_stack_adjustment): Handle stores.
2106 (combine_stack_adjustments_for_block): Allow insns between stack
2107 adjustments and stores with corresponding pre-(dec|inc)rement or
2108 pre-modify operation.
2110 2009-09-06 Jakub Jelinek <jakub@redhat.com>
2113 * combine-stack-adj.c (struct csa_memlist): Rename to...
2114 (struct csa_reflist): ... this. Rename mem field to ref.
2115 (free_csa_memlist): Rename to...
2116 (free_csa_reflist): ... this.
2117 (record_one_stack_memref): Rename to...
2118 (record_one_stack_ref): ... this. Handle also REG_P.
2119 (try_apply_stack_adjustment): Handle also REG_P.
2120 (struct record_stack_memrefs_data): Rename to...
2121 (struct record_stack_refs_data): ... this. Rename memlist field to
2123 (record_stack_memrefs): Rename to...
2124 (record_stack_refs): ... this. For DEBUG_INSNs keep traversing
2125 subexpressions instead of failing when a MEM contains SP references.
2126 For SP itself in DEBUG_INSNs queue it also onto reflist chain.
2127 (combine_stack_adjustments_for_block): Adjust for mem to ref renaming.
2129 2009-09-06 Richard Guenther <rguenther@suse.de>
2132 * tree.c (build_array_type): Do not record types marked
2133 with structural equality in the canonical type hashtable.
2135 2009-09-06 Richard Guenther <rguenther@suse.de>
2138 * tree-ssa-alias.c (refs_may_alias_p_1): Bail out for function decls.
2140 2009-09-05 Richard Guenther <rguenther@suse.de>
2143 * tree-ssa-ccp.c (maybe_fold_stmt_addition): Use the correct type.
2145 2009-09-05 Richard Guenther <rguenther@suse.de>
2148 * tree-ssa-operands.c (get_tmr_operands): Pass through opf_no_vops.
2150 2009-09-05 Richard Guenther <rguenther@suse.de>
2153 * tree-ssa.c (useless_type_conversion_p): Drop qualifiers
2154 before comparing function argument types.
2156 2009-09-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2159 * config/i386/mingw-w64.h (ASM_SPEC): Pass -v instead of -V to
2162 2009-09-04 Uros Bizjak <ubizjak@gmail.com>
2165 2009-08-18 Uros Bizjak <ubizjak@gmail.com>
2167 * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Allocate insn
2168 locators before emit_insn is called.
2170 2009-09-04 Vladimir Makarov <vmakarov@redhat.com>
2173 * ira.c (update_equiv_reg): Revert my previous patch for the PR.
2174 * reginfo.c (resize_reg_info): Call allocate_reg_info if necessary.
2175 (reginfo_init): Don't call allocate_reg_info.
2177 2009-09-04 Uros Bizjak <ubizjak@gmail.com>
2180 * config/alpha/alpha.c (alpha_does_function_need_gp): Use
2181 NONDEBUG_INSN_P instead of INSN_P.
2183 2009-09-04 Alexandre Oliva <aoliva@redhat.com>
2186 * tree-vect-stmts.c (vect_stmt_relevant_p): Skip debug uses.
2188 2009-09-04 Alexandre Oliva <aoliva@redhat.com>
2191 * config/arm/vfp.md (*cmpdf_split_vfp): Fix src mode in the second
2192 pattern of the split.
2194 2009-09-04 Alexandre Oliva <aoliva@redhat.com>
2196 * toplev.c (process_options): Move setter of flag_var_tracking
2197 before other tests that depend on it. Move down setter of
2198 flag_rename_registers. Don't enable var-tracking-assignments
2199 by default if selective scheduling is enabled. Warn if both
2202 2009-09-04 Alexandre Oliva <aoliva@redhat.com>
2204 * var-tracking.c (dv_is_decl_p): Adjust NULL behavior to match
2205 comment. Use switch statement to catch overlaps between rtx
2206 and tree codes. Accept FUNCTION_DECLs in addition to those in...
2207 (IS_DECL_CODE): ... here. Remove.
2208 (check_value_is_not_decl): Remove.
2209 (dv_from_decl, dv_from_value): Check after conversion.
2211 2009-09-04 Richard Guenther <rguenther@suse.de>
2214 * (cgraph_finalize_compilation_unit): Move finalizing aliases
2215 after emitting tunks. Move emitting thunks and ctors from ...
2216 (cgraph_optimize): ... here. Remove redundant
2217 cgraph_analyze_functions.
2218 * varasm.c (find_decl_and_mark_needed): Remove no longer
2220 (finish_aliases_1): Adjust check for thunk aliases.
2222 2009-09-04 Daniel Gutson <dgutson@codesourcery.com>
2224 * config/arm/arm.md (ctzsi2): Added braces
2225 to avoid warning that broke booststrap.
2227 2009-09-04 Martin Jambor <mjambor@suse.cz>
2229 PR tree-optimization/41112
2230 * tree-sra.c (build_ref_for_offset_1): Signal that we cannot
2231 handle variable-bounded arrays.
2232 (expr_with_var_bounded_array_refs_p): New function.
2233 (analyze_access_subtree): Call expr_with_var_bounded_array_refs_p.
2235 2009-09-04 Wolfgang Gellerich <gellerich@de.ibm.com>
2237 * config/s390/2097.md: Removed two incorrect bypasses.
2238 (z10_fsimpdf): Fixed latency.
2239 (z10_fhex): New insn_reservation.
2240 (z10_floaddf): Fixed latency.
2241 (z10_floadsf): Fixed latency.
2242 (z10_ftrunctf): Fixed latency.
2243 (z10_ftruncdf): Fixed latency.
2244 * config/s390/s390.c (z10_cost): Fixed values.
2245 (s390_adjust_priority): Added z10 path.
2246 * config/s390/s390.md (type): Added fhex.
2247 (*mov<mode>_64dfp): Updated type attribute.
2248 (*mov<mode>_64): Updated type attribute.
2249 (*mov<mode>_31): Updated type attribute.
2250 (*mov<mode>"): Likewise.
2251 * config/s390/2084.md (x_fsimpdf): Updated condition.
2253 2009-09-04 Andreas Krebbel <krebbel1@de.ibm.com>
2255 * config/s390/s390.md ("*fmadd<mode>", "*fmsub<mode>"): Enable mem
2256 RTXs in the predicate for operand 1.
2258 2009-09-03 Daniel Gutson <dgutson@codesourcery.com>
2260 * config/arm/arm.md (UNSPEC_RBIT): New constant.
2261 (rbitsi2): New insn.
2262 (ctzsi2): New expand.
2263 * config/arm/arm.h (CTZ_DEFINED_VALUE_AT_ZERO): New macro.
2265 2009-09-03 Martin Jambor <mjambor@suse.cz>
2267 * tree-sra.c (duplicate_expr_for_different_base): Removed.
2268 (create_artificial_child_access): Use build_ref_for_offset instead
2269 of duplicate_expr_for_different_base.
2270 (propagate_subacesses_accross_link): Likewise.
2272 2009-09-03 Richard Sandiford <rdsandiford@googlemail.com>
2274 * config/mips/mips.c (USEFUL_INSN_P): Use NONDEBUG_INSN_P instead
2276 (mips16e_collect_argument_saves): Skip debug instructions.
2277 (mips_74k_agen_init): Use CALL_P || JUMP_P instead of !NONJUMP_INSN_P.
2278 (mips16_lay_out_constants): Use USEFUL_INSN_P instead of INSN_P.
2279 (r10k_insert_cache_barriers): Likewise.
2280 (mips_reorg_process_insns): Likewise.
2282 2009-09-03 Vladimir Makarov <vmakarov@redhat.com>
2285 * ira.c (update_equiv_reg): Remove check on class likely spill.
2287 2009-09-03 Jakub Jelinek <jakub@redhat.com>
2290 * dwarf2out.c (loc_descriptor): Don't use SUBREG_REG macro on
2291 SIGN_EXTEND or ZERO_EXTEND. Don't assume there is a REG inside of
2295 * function.c (assign_parm_find_stack_rtl): Don't set mem attributes on
2296 the stack slot if it is passed by invisible reference.
2297 * var-tracking.c (vt_add_function_parameters): Handle arguments passed
2298 by invisible reference.
2300 2009-09-03 Bernd Schmidt <bernd.schmidt@analog.com>
2302 * config/bfin/linux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
2303 * config/bfin/uclinux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
2304 * config/bfin/bfin.h (TARGET_SUPPORTS_SYNC_CALLS): Provide default of
2306 * config/bfin/sync.md: New file.
2307 * config/bfin/bfin.md: Include it.
2308 (UNSPEC_ATOMIC): New.
2309 (UNSPEC_ONES): Provide a unique number.
2311 From Jie Zhang <jie.zhang@analog.com>:
2312 * config/bfin/bfin.c (ret_regs): New.
2313 (must_save_fp_p): Don't return true because of frame_pointer_needed.
2314 (must_save_rets_p): New.
2315 (n_regs_saved_by_prologue): Use must_save_rets_p instead of
2316 current_function_is_leaf.
2317 (do_link): Likewise.
2318 (do_unlink): Likewise.
2319 (expand_interrupt_handler_prologue): Use ret_regs array.
2320 (expand_interrupt_handler_epilogue): Use ret_regs array and
2321 pass return register to gen_return_internal.
2322 (bfin_expand_epilogue): Pass return register to
2323 gen_return_internal.
2324 (bfin_expand_call): Explicitly clobber RETS.
2325 * config/bfin/bfin.h (FUNCTION_RETURN_REGISTERS): Define.
2326 * config/bfin/bfin.md (call_symbol_fdpic, call_value_symbol_fdpic,
2327 call_insn_fdpic, call_value_insn_fdpic, call_symbol,
2328 call_value_symbol, call_insn, call_value_insn): Explicitly clobber
2330 (return_internal): Take a reg rtx rather than the register number.
2332 2009-09-03 H.J. Lu <hongjiu.lu@intel.com>
2334 * tree-parloops.c (parallelize_loops): Cast to HOST_WIDE_INT
2335 when comparing against estimated_loop_iterations_int return.
2337 2009-09-03 Richard Guenther <rguenther@suse.de>
2339 * dwarf2out.c (dwarf2out_do_cfi_asm): Remove check of
2340 eh_personality_libfunc.
2342 2009-09-03 Razya Ladelsky <razya@il.ibm.com>
2344 * tree-parloops.c (separate_decls_in_region): Add space.
2346 2009-09-03 Razya Ladelsky <razya@il.ibm.com>
2348 * tree-parloops.c (separate_decls_in_region): Change the condition
2349 checking if there are reductions in the loop.
2351 2009-09-03 Razya Ladelsky <razya@il.ibm.com>
2353 PR tree-optimization/38275
2354 * tree-parloops.c (parallelize_loops): Replace profitability condition
2355 for expected number of iterations.
2357 2009-09-03 Alexandre Oliva <aoliva@redhat.com>
2359 * doc/invoke.texi (BUILD_CONFIG): Document --with-build-config.
2360 (bootstrap-debug): Explain conditions in which it becomes default.
2361 (bootstrap-debug-big): Rather than duplicate bootstrap-debug,
2364 2009-09-03 Namhyung Kim <namhyung@gmail.com>
2366 * doc/invoke.texi (Optimize Options): Move
2367 -finline-small-functions to the -O2 list.
2369 2009-09-03 Alexandre Oliva <aoliva@redhat.com>
2371 * toplev.c (process_options): Enable var-tracking-assignments
2372 by default if var-tracking is enabled.
2374 2009-09-02 David Daney <ddaney@caviumnetworks.com>
2376 * cfgbuild.c (find_bb_boundaries): Split blocks containing a
2378 * emit-rtl.c (prev_nonnote_insn_bb): New function.
2379 * rtl.h (prev_nonnote_insn_bb): Declare it.
2381 2009-09-03 Diego Novillo <dnovillo@google.com>
2383 * cgraph.c (cgraph_node_for_decl): New.
2384 * cgraph.h (cgraph_node_for_decl): Declare.
2385 * tree.c (host_integerp): Return 0 if T is NULL.
2387 2009-09-03 Diego Novillo <dnovillo@google.com>
2389 * tree.h (struct alias_pair): Move from varasm.c.
2390 (alias_pairs): Likewise.
2391 (TYPE_MAXVAL): Define.
2392 (TYPE_MINVAL): Define.
2393 (iterative_hash_host_wide_int): Declare.
2394 (remove_unreachable_alias_pairs): Declare.
2395 * tree-pass.h (pass_ipa_free_lang_data): Declare.
2396 * diagnostic.c (default_diagnostic_starter): Make extern.
2397 (default_diagnostic_finalizer): Make extern.
2398 * diagnostic.h (default_diagnostic_starter): Declare.
2399 (default_diagnostic_finalizer): Declare.
2400 (default_tree_printer): Declare.
2401 * toplev.c (default_tree_printer): Make extern.
2403 2009-09-03 Richard Guenther <rguenther@suse.de>
2404 Diego Novillo <dnovillo@google.com>
2406 * cgraph.c (cgraph_add_new_function): Remove gimplification.
2407 * cgraphunit.c (cgraph_expand_function): Do not emit
2408 associated thunks from here.
2409 (cgraph_emit_thunks): New.
2410 (cgraph_optimize): Call it.
2411 Return if any IPA pass finds an error.
2412 * varasm.c (finish_aliases_1): Ignore errorneous aliases used
2415 2009-09-03 Simon Baldwin <simonb@google.com>
2416 Rafael Espindola <espindola@google.com>
2417 Richard Guenther <rguenther@suse.de>
2418 Doug Kwan <dougkwan@google.com>
2419 Diego Novillo <dnovillo@google.com>
2421 * tree.c: Include tree-pass.h, langhooks-def.h,
2422 diagnostic.h, cgraph.h, timevar.h, except.h and debug.h.
2423 (free_lang_data_in_type): New.
2424 (need_assembler_name_p): New.
2425 (free_lang_data_in_block): New.
2426 (free_lang_data_in_decl): New.
2427 (struct free_lang_data_d): New.
2428 (add_tree_to_fld_list): New.
2429 (find_decls_types_r): New.
2430 (get_eh_types_for_runtime): New.
2431 (find_decls_types_in_eh_region): New.
2432 (find_decls_types_in_node): New.
2433 (find_decls_types_in_var): New.
2434 (free_lang_data_in_cgraph): New.
2435 (free_lang_data): New.
2436 (gate_free_lang_data): New.
2437 (pass_ipa_free_lang_data): New.
2439 2009-09-03 Diego Novillo <dnovillo@google.com>
2441 * timevar.def (TV_IPA_FREE_LANG_DATA): Define.
2442 * langhooks.h (struct lang_hooks): Add field free_lang_data.
2443 (lang_hooks): Remove const qualifier.
2444 * ipa.c (cgraph_remove_unreachable_nodes): Call
2445 remove_unreachable_alias_pairs.
2446 * except.c (add_type_for_runtime): Check if TYPE has
2447 already been converted.
2448 (lookup_type_for_runtime): Likewise.
2449 (check_handled): Handle converted types.
2450 * varasm.c (remove_unreachable_alias_pairs): New.
2451 * gimple.c: Include demangle.h.
2452 (gimple_decl_printable_name): New.
2453 (gimple_fold_obj_type_ref): New.
2454 * gimple.h (gimple_decl_printable_name): Declare.
2455 (gimple_fold_obj_type_ref): Declare.
2456 * passes.c (init_optimization_passes): Add pass
2457 pass_ipa_free_lang_data.
2458 * langhooks-def.h (LANG_HOOKS_FREE_LANG_DATA): Define.
2459 (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_FREE_LANG_DATA.
2461 2009-09-03 Diego Novillo <dnovillo@google.com>
2463 * c-lang.c (lang_hooks): Remove const qualifier.
2465 2009-09-02 Loren James Rittle <ljrittle@acm.org>
2467 * doc/install.texi (*-*-freebsd*): Update target information.
2469 2009-09-02 Anatoly Sokolov <aesok@post.ru>
2471 * hard-reg-set.h (call_fixed_regs): Remove.
2472 * reginfo.c (call_fixed_regs): Remove.
2473 (init_reg_sets_1): Remove initialization of call_fixed_regs.
2474 (globalize_reg): Don't use call_fixed_regs.
2475 * caller-save.c (init_caller_save): Use call_fixed_reg_set instead of
2478 2009-09-01 Michael Matz <matz@suse.de>
2480 * expr.h (emit_storent_insn, expand_expr_real_1,
2481 expand_expr_real_2): Declare.
2482 * expr.c (emit_storent_insn, expand_expr_real_1,
2483 expand_expr_real_2): Export.
2484 (store_expr): Setting and evaluating dont_return_target is useless.
2485 (expand_expr_real_1, <case GOTO_EXPR, RETURN_EXPR, SWITCH_EXPR,
2486 LABEL_EXPR and ASM_EXPR>): Move to gcc_unreachable.
2487 * except.c (expand_resx_expr): Rename to ...
2488 (expand_resx_stmt): ... this. Rewrite to take gimple statement.
2489 * except.h (expand_resx_stmt): Declare.
2490 * stmt.c: Add include gimple.h
2491 (expand_asm_expr): Rename to ...
2492 (expand_asm_stmt): ... this. Rewrite to take gimple statement.
2493 (expand_case): Rewrite to take gimple statement.
2494 * tree.h (expand_asm_stmt): Declare.
2495 (expand_case): Change prototype.
2496 * Makefile.in (stmt.o): Depend on gimple.h.
2497 * builtins.c (expand_builtin_synchronize): Build gimple asm
2498 statement, not an ASM_EXPR.
2499 * cfgexpand.c (gimple_cond_pred_to_tree, set_expr_location_r,
2500 gimple_to_tree, release_stmt_tree): Remove.
2501 (expand_gimple_cond): Don't call gimple_cond_pred_to_tree or
2502 ggc_free, but hold comparison code and operands separately.
2503 Call jumpif_1 and jumpifnot_1 instead of jumpif and jumpifnot.
2504 (expand_call_stmt, expand_gimple_stmt_1,
2505 expand_gimple_stmt): New helpers.
2506 (expand_gimple_tailcall): Don't call gimple_to_tree, expand_expr_stmt,
2507 release_stmt_tree. Call expand_gimple_stmt instead.
2508 (expand_gimple_basic_block): Ditto.
2510 * calls.c (emit_call_1): Don't look at EH regions here, make
2511 fntree parameter useless.
2512 (expand_call): New local rettype for TREE_TYPE(exp), use it
2513 throughout. Remove local p, use addr instead.
2514 Don't look at EH regions here.
2516 2009-09-02 Vladimir Makarov <vmakarov@redhat.com>
2518 * doc/invoke.texi (-fsched-pressure): Document it.
2519 (-fsched-reg-pressure-heuristic): Remove it.
2521 * reload.c (ira.h): Include.
2522 (find_reloads): Add choosing reload on number of small spilled
2525 * haifa-sched.c (ira.h): Include.
2526 (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure,
2527 saved_reg_pressure, curr_reg_live, saved_reg_live,
2528 region_ref_regs): New variables.
2529 (sched_init_region_reg_pressure_info, mark_regno_birth_or_death,
2530 initiate_reg_pressure_info, setup_ref_regs,
2531 initiate_bb_reg_pressure_info, save_reg_pressure,
2532 restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New
2534 (setup_insn_reg_pressure_info): New function.
2535 (rank_for_schedule): Add pressure checking and insn issue time.
2536 Remove comparison of insn reg weights.
2537 (ready_sort): Set insn reg pressure info.
2538 (update_register_pressure, setup_insn_max_reg_pressure,
2539 update_reg_and_insn_max_reg_pressure,
2540 sched_setup_bb_reg_pressure_info): New functions.
2541 (schedule_insn): Add code for printing and updating reg pressure info.
2542 (find_set_reg_weight, find_insn_reg_weight): Remove.
2543 (ok_for_early_queue_removal): Do nothing if pressure_only_p.
2544 (debug_ready_list): Print reg pressure info.
2545 (schedule_block): Ditto. Check insn issue time.
2546 (sched_init): Set up sched_pressure_p. Allocate and set up some
2547 reg pressure related info.
2548 (sched_finish): Free some reg pressure related info.
2549 (fix_tick_ready): Make insn always ready if pressure_p.
2550 (init_h_i_d): Don't call find_insn_reg_weight.
2551 (haifa_finish_h_i_d): Free insn reg pressure info.
2553 * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
2554 ira_memory_move_cost, ira_class_hard_regs,
2555 ira_class_hard_regs_num, ira_no_alloc_regs,
2556 ira_available_class_regs, ira_reg_class_cover_size,
2557 ira_reg_class_cover, ira_class_translate): Move to ira.h.
2559 * ira-lives.c (single_reg_class): Check mode to find how many
2560 registers are necessary for operand.
2561 (ira_implicitly_set_insn_hard_regs): New.
2563 * common.opt (fsched-pressure): New options.
2564 (fsched-reg-pressure-heuristic): Remove.
2566 * ira.c (setup_eliminable_regset): Rename to
2567 ira_setup_eliminable_regset. Make it external.
2568 (expand_reg_info): Pass cover class to setup_reg_classes.
2569 (ira): Call resize_reg_info instead of allocate_reg_info.
2571 * sched-deps.c: Include ira.h.
2572 (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New.
2573 (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses,
2574 reg_pressure_info, insn_use_p, mark_insn_pseudo_birth,
2575 mark_insn_hard_regno_birth, mark_insn_reg_birth,
2576 mark_pseudo_death, mark_hard_regno_death, mark_reg_death,
2577 mark_insn_reg_store, mark_insn_reg_clobber,
2578 setup_insn_reg_pressure_info): New.
2579 (sched_analyze_1): Update implicit_reg_pending_uses.
2580 (sched_analyze_insn): Find implicit sets, uses, clobbers of regs.
2581 Use them to create dependencies. Set insn reg uses and pressure
2582 info. Process reg_pending_uses in one place.
2583 (free_deps): Free implicit sets.
2584 (remove_from_deps): Remove implicit sets if necessary. Check
2585 implicit sets when clearing reg_last_in_use.
2586 (init_deps_global): Clear implicit_reg_pending_clobbers and
2587 implicit_reg_pending_uses.
2589 * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
2590 ira_memory_move_cost, ira_class_hard_regs,
2591 ira_class_hard_regs_num, ira_no_alloc_regs,
2592 ira_available_class_regs, ira_reg_class_cover_size,
2593 ira_reg_class_cover, ira_class_translate): Move from ira-int.h.
2594 (ira_setup_eliminable_regset, ira_set_pseudo_classes,
2595 ira_implicitly_set_insn_hard_regs): New prototypes.
2597 * ira-costs.c (pseudo_classes_defined_p, allocno_p,
2598 cost_elements_num): New variables.
2599 (allocno_costs, total_costs): Rename to costs and
2600 total_allocno_costs.
2601 (COSTS_OF_ALLOCNO): Rename to COSTS.
2602 (allocno_pref): Rename to pref.
2603 (allocno_pref_buffer): Rename to pref_buffer.
2604 (common_classes): Rename to regno_cover_class.
2606 (record_reg_classes): Set allocno attributes only if allocno_p.
2607 (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM.
2608 (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM
2609 and COSTS_OF_ALLOCNO.
2610 (print_costs): Rename to print_allocno_costs.
2611 (print_pseudo_costs): New.
2612 (process_bb_node_for_costs): Split into 2 functions with new
2613 function process_bb_for_costs. Pass BB to process_bb_for_costs.
2614 (find_allocno_class_costs): Rename to find_costs_and_classes. Add
2615 new parameter dump_file. Use cost_elements_num instead of
2616 ira_allocnos_num. Make one iteration if preferred classes were
2617 already calculated for scheduler. Make 2 versions of code
2618 depending on allocno_p.
2619 (setup_allocno_cover_class_and_costs): Check allocno_p. Use
2620 regno_cover_class and COSTS instead of common_classes and
2622 (init_costs, finish_costs): New.
2623 (ira_costs): Set up allocno_p and cost_elements_num. Call
2624 init_costs and finish_costs.
2625 (ira_set_pseudo_classes): New.
2627 * rtl.h (allocate_reg_info): Remove.
2628 (resize_reg_info): Change return type.
2629 (reg_cover_class): New.
2630 (setup_reg_classes): Add new parameter.
2632 * sched-int.h (struct deps_reg): New member implicit_sets.
2633 (sched_pressure_p, sched_regno_cover_class): New external definitions.
2634 (INCREASE_BITS): New macro.
2635 (struct reg_pressure_data, struct reg_use_data): New.
2636 (struct _haifa_insn_data): Remove reg_weight. Add members
2637 reg_pressure, reg_use_list, reg_set_list, and
2638 reg_pressure_excess_cost_change.
2639 (struct deps): New member implicit_sets.
2640 (pressure_p): New variable.
2641 (COVER_CLASS_BITS, INCREASE_BITS): New macros.
2642 (struct reg_pressure_data, struct reg_use_data): New.
2643 (INSN_REG_WEIGHT): Remove.
2644 (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST,
2645 INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros.
2646 (sched_init_region_reg_pressure_info,
2647 sched_setup_bb_reg_pressure_info): New prototypes.
2649 * reginfo.c (struct reg_pref): New member coverclass.
2650 (reg_cover_class): New function.
2651 (reginfo_init, pass_reginfo_init): Move after free_reg_info.
2652 (reg_info_size): New variable.
2653 (allocate_reg_info): Make static. Setup reg_info_size.
2654 (resize_reg_info): Use reg_info_size. Return flag of resizing.
2655 (setup_reg_classes): Add a new parameter. Setup cover class too.
2657 * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to
2660 * sched-rgn.c (deps_join): Set up implicit_sets.
2661 (schedule_region): Set up region and basic blocks pressure
2664 * passes.c (init_optimization_passes): Move
2665 pass_subregs_of_mode_init before pass_sched.
2667 2009-09-02 Martin Jambor <mjambor@suse.cz>
2669 * tree-sra.c (struct access): New field grp_hint.
2670 (dump_access): Dump grp_hint.
2671 (sort_and_splice_var_accesses): Set grp_hint if a group is read
2673 (analyze_access_subtree): Only scalarize accesses with grp_hint set or
2674 those which have been specifically read and somehow written to.
2675 (propagate_subacesses_accross_link): Set grp_hint of right child and
2676 also possibly of the left child.
2678 2009-09-02 Jakub Jelinek <jakub@redhat.com>
2680 * tree-object-size.c (addr_object_size): Always use object_size_type
2681 0 or 2 when determining the pointer pointed object size.
2683 2009-09-02 Richard Guenther <rguenther@suse.de>
2686 2009-08-31 Richard Guenther <rguenther@suse.de>
2688 * builtins.c (fold_builtin_memory_op): Use the alias oracle
2689 to query if the memory regions for memmove overlap.
2690 * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Relax the
2691 asserts on pointers, instead deal with odd trees.
2692 (ptr_derefs_may_alias_p): Likewise.
2693 (refs_may_alias_p_1): Constructor bases also never alias.
2695 2009-08-01 Christian Bruel <christian.bruel@st.com>
2698 2009-07-31 Christian Bruel <christian.bruel@st.com>
2699 * gcc/config.gcc (sh*-*-elf): test with_libgloss.
2701 2009-09-01 Alexandre Oliva <aoliva@redhat.com>
2703 * doc/invoke.texi (-fvar-tracking-assignments): New.
2704 (-fvar-tracking-assignments-toggle): New.
2705 (-fdump-final-insns=file): Mark filename as optional.
2706 (--param min-nondebug-insn-uid): New.
2707 (-gdwarf-@{version}): Mention version 4.
2708 * opts.c (common_handle_option): Accept it.
2709 * tree-vrp.c (find_assert_locations_1): Skip debug stmts.
2710 * regrename.c (regrename_optimize): Drop last. Don't count debug
2711 insns as uses. Don't reject change because of debug insn.
2712 (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno
2713 from the chain starter, and check for inexact matches in DEBUG_INSNS.
2714 (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs.
2715 (build_def_use): Simplify and fix the marking of DEBUG_INSNs.
2716 * sched-ebb.c (schedule_ebbs): Skip boundary debug insns.
2717 * fwprop.c (forward_propagate_and_simplify): ...into debug insns.
2718 * doc/gimple.texi (is_gimple_debug): New.
2719 (gimple_debug_bind_p): New.
2720 (is_gimple_call, gimple_assign_cast_p): End sentence with period.
2721 * doc/install.texi (bootstrap-debug): More details.
2722 (bootstrap-debug-big, bootstrap-debug-lean): Document.
2723 (bootstrap-debug-lib): More details.
2724 (bootstrap-debug-ckovw): Update.
2725 (bootstrap-time): New.
2726 * tree-into-ssa.c (mark_def_sites): Skip debug stmts.
2727 (insert_phi_nodes_for): Insert debug stmts.
2728 (rewrite_stmt): Take iterator. Insert debug stmts.
2729 (rewrite_enter_block): Adjust.
2730 (maybe_replace_use_in_debug_stmt): New.
2731 (rewrite_update_stmt): Use it.
2732 (mark_use_interesting): Return early for debug stmts.
2733 * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug
2734 stmts before replacing stmt.
2735 (move_computations_stmt): Likewise.
2736 * ira-conflicts.c (add_copies): Skip debug insns.
2737 * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns.
2738 (regstat_bb_compute_ri): Skip debug insns.
2739 * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts.
2740 * tree-ssa-loop-manip.c (find_uses_to_rename_stmt,
2741 check_loop_closed_ssa_stmt): Skip debug stmts.
2742 * tree-tailcall.c (find_tail_calls): Likewise.
2743 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise.
2744 * tree.h (MAY_HAVE_DEBUG_STMTS): New.
2745 (build_var_debug_value_stat): Declare.
2746 (build_var_debug_value): Define.
2747 (target_for_debug_bind): Declare.
2748 * reload.c (find_equiv_reg): Skip debug insns.
2749 * rtlanal.c (reg_used_between_p): Skip debug insns.
2750 (side_effects_p): Likewise.
2751 (canonicalize_condition): Likewise.
2752 * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug
2753 insns never depend on debug insns.
2754 (create_ddg_dep_no_link): Likewise.
2755 (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns.
2756 Don't add inter-loop dependencies for debug insns.
2757 (build_intra_loop_deps): Likewise.
2758 (create_ddg): Count debug insns.
2759 * ddg.h (struct ddg::num_debug): New.
2760 (num_backargs): Pair up with previous int field.
2761 * diagnostic.c (diagnostic_report_diagnostic): Skip notes on
2762 -fcompare-debug-second.
2763 * final.c (get_attr_length_1): Skip debug insns.
2764 (rest_of_clean-state): Don't dump CFA_RESTORE_STATE.
2765 * gcc.c (invoke_as): Call compare-debug-dump-opt.
2766 (driver_self_specs): Map -fdump-final-insns to
2767 -fdump-final-insns=..
2768 (get_local_tick): New.
2769 (compare_debug_dump_opt_spec_function): Test for . argument and
2770 compute output name. Compute temp output spec without flag name.
2771 Compute -frandom-seed.
2772 (OPT): Undef after use.
2773 * cfgloopanal.c (num_loop_insns): Skip debug insns.
2774 (average_num_loop_insns): Likewise.
2775 * params.h (MIN_NONDEBUG_INSN_UID): New.
2776 * gimple.def (GIMPLE_DEBUG): New.
2777 * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts.
2778 * auto-inc-dec.c (merge_in_block): Skip debug insns.
2779 (merge_in_block): Fix whitespace.
2780 * toplev.c (flag_var_tracking): Update comment.
2781 (flag_var_tracking_assignments): New.
2782 (flag_var_tracking_assignments_toggle): New.
2783 (process_options): Don't open final insns dump file if we're not
2784 going to write to it. Compute defaults for var_tracking.
2785 * df-scan.c (df_insn_rescan_debug_internal): New.
2786 (df_uses_record): Handle debug insns.
2787 * haifa-sched.c (ready): Initialize n_debug.
2788 (contributes_to_priority): Skip debug insns.
2789 (dep_list_size): New.
2791 (rank_for_schedule): Likewise. Schedule debug insns as soon as
2792 they're ready. Disregard previous debug insns to make decisions.
2793 (queue_insn): Never queue debug insns.
2794 (ready_add, ready_remove_first, ready_remove): Count debug insns.
2795 (schedule_insn): Don't reject debug insns because of issue rate.
2796 (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns.
2797 (queue_to_ready): Skip and discount debug insns.
2798 (choose_ready): Let debug insns through.
2799 (schedule_block): Check boundary debug insns. Discount debug
2800 insns, schedule them early. Adjust whitespace.
2801 (set_priorities): Check for boundary debug insns.
2802 (add_jump_dependencies): Use dep_list_size.
2803 (prev_non_location_insn): New.
2804 (check_cfg): Use it.
2805 * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug
2807 (remove_unused_ivs): Reset debug stmts.
2808 * modulo-sched.c (const_iteration_count): Skip debug insns.
2809 (res_MII): Discount debug insns.
2810 (loop_single_full_bb_p): Skip debug insns.
2811 (sms_schedule): Likewise.
2812 (sms_schedule_by_order): Likewise.
2813 (ps_has_conflicts): Likewise.
2814 * caller-save.c (refmarker_fn): New.
2815 (save_call_clobbered_regs): Replace regs with saved mem in
2817 (mark_referenced_regs): Take pointer, mark and arg. Adjust.
2818 Call refmarker_fn mark for hardregnos.
2819 (mark_reg_as_referenced): New.
2820 (replace_reg_with_saved_mem): New.
2821 * ipa-pure-const.c (check_stmt): Skip debug stmts.
2822 * cse.c (cse_insn): Canonicalize debug insns. Skip them when
2824 (cse_extended_basic_block): Skip debug insns.
2825 (count_reg_usage): Likewise.
2826 (is_dead_reg): New, split out of...
2827 (set_live_p): ... here.
2828 (insn_live_p): Use it for debug insns.
2829 * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts.
2830 (execute_optimize_stdarg): Likewise.
2831 * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise.
2832 * tree-ssa-propagate.c (substitute_and_fold): Don't regard
2833 changes in debug stmts as changes.
2834 * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New.
2835 (moveup_expr): Don't move across debug insns. Don't move
2836 debug insn if it would create a bookkeeping block.
2837 (moveup_expr_cached): Don't use cache for debug insns that
2838 are heads of blocks.
2839 (compute_av_set_inside_bb): Skip debug insns.
2840 (sel_rank_for_schedule): Schedule debug insns first. Remove
2842 (block_valid_for_bookkeeping_p); Support lax searches.
2843 (create_block_for_bookkeeping): Adjust block numbers when
2844 encountering debug-only blocks.
2845 (find_place_for_bookkeeping): Deal with debug-only blocks.
2846 (generate_bookkeeping_insn): Accept no place to insert.
2847 (remove_temp_moveop_nops): New argument full_tidying.
2848 (prepare_place_to_insert): Deal with debug insns.
2849 (advance_state_on_fence): Debug insns don't start cycles.
2850 (update_boundaries): Take fence as argument. Deal with
2852 (schedule_expr_on_boundary): No full_tidying on debug insns.
2853 (fill_insns): Deal with debug insns.
2854 (track_scheduled_insns_and_blocks): Don't count debug insns.
2855 (need_nop_to_preserve_insn_bb): New, split out of...
2856 (remove_insn_from_stream): ... this.
2857 (fur_orig_expr_not_found): Skip debug insns.
2858 * rtl.def (VALUE): Move up.
2860 * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts.
2861 (nearest_common_dominator_of_uses): Take debug_stmts argument.
2862 Set it if debug stmts are found.
2863 (statement_sink_location): Skip debug stmts. Propagate
2864 moving defs into debug stmts.
2865 * ifcvt.c (first_active_insn): Skip debug insns.
2866 (last_active_insns): Likewise.
2867 (cond_exec_process_insns): Likewise.
2868 (noce_process_if_block): Likewise.
2869 (check_cond_move_block): Likewise.
2870 (cond_move_convert_if_block): Likewise.
2871 (block_jumps_and_fallthru_p): Likewise.
2872 (dead_or_predicable): Likewise.
2873 * dwarf2out.c (debug_str_hash_forced): New.
2874 (find_AT_string): Add comment.
2875 (gen_label_for_indirect_string): New.
2876 (get_debug_string_label): New.
2877 (AT_string_form): Use it.
2878 (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV,
2879 MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but
2880 discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and
2881 several operations that cannot be represented with DWARF opcodes.
2882 (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require
2883 dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value.
2884 (dwarf2out_var_location): Take during-call mark into account.
2885 (output_indirect_string): Update comment. Output if there are
2886 label and references.
2887 (prune_indirect_string): New.
2888 (prune_unused_types): Call it if debug_str_hash_forced.
2889 More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>:
2890 (dw_long_long_const): Remove.
2891 (struct dw_val_struct): Change val_long_long type to rtx.
2892 (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for
2893 val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair.
2894 (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each
2895 component instead of HOST_BITS_PER_LONG.
2896 (output_loc_operands): Likewise. For const8* assert
2897 HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64.
2898 (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT
2899 rather than HOST_BITS_PER_LONG is >= 64.
2900 (add_AT_long_long): Remove val_hi and val_lo arguments, add
2902 (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of
2903 HOST_BITS_PER_LONG for dw_val_class_long_long.
2904 (add_const_value_attribute): Adjust add_AT_long_long caller. Don't
2905 handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse.
2906 (dwarf_stack_op_name): Handle DW_OP_implicit_value and
2908 (size_of_loc_descr, output_loc_operands, output_loc_operands_raw):
2909 Handle DW_OP_implicit_value.
2910 (extract_int): Move prototype earlier.
2911 (mem_loc_descriptor): For SUBREG punt if inner
2912 mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND
2913 and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle
2914 EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN,
2915 UMAX, SIGN_EXTRACT, ZERO_EXTRACT.
2916 (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE
2917 instead of Pmode size.
2918 (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE,
2919 CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode,
2920 attempt to handle other expressions. Don't handle TLS SYMBOL_REFs.
2921 (concat_loc_descriptor, concatn_loc_descriptor,
2922 loc_descriptor_from_tree_1): Adjust loc_descriptor callers.
2923 (add_location_or_const_value_attribute): Likewise. For single
2924 location loc_lists attempt to use add_const_value_attribute
2925 for constant decls. Add DW_AT_const_value even if
2926 NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING
2928 * cfgbuild.c (inside_basic_block_p): Handle debug insns.
2929 (control_flow_insn_p): Likewise.
2930 * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt.
2931 (separate_decls_in_region_debug_bind): New.
2932 (separate_decls_in_region): Process debug bind stmts afterwards.
2933 * recog.c (verify_changes): Handle debug insns.
2934 (extract_insn): Likewise.
2935 (peephole2_optimize): Skip debug insns.
2936 * dse.c (scan_insn): Skip debug insns.
2937 * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument.
2939 (setup_id_for_insn): Handle debug insns.
2940 (maybe_tidy_empty_bb): Adjust whitespace.
2941 (tidy_control_flow): Skip debug insns.
2942 (sel_remove_insn): Adjust for debug insns.
2943 (sel_estimate_number_of_insns): Skip debug insns.
2944 (create_insn_rtx_from_pattern): Handle debug insns.
2945 (create_copy_of_insn_rtx): Likewise.
2946 * sel-sched-.h (sel_bb_end): Declare.
2947 (sel_bb_empty_or_nop_p): New.
2948 (get_all_loop_exits): Use it.
2949 (_eligible_successor_edge_p): Likewise.
2950 (return_nop_to_pool): Adjust.
2951 * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts.
2952 * ira-lives.c (process_bb_node_lives): Skip debug insns.
2953 * gimple-pretty-print.c (dump_gimple_debug): New.
2954 (dump_gimple_stmt): Use it.
2955 (dump_bb_header): Skip gimple debug stmts.
2956 * regmove.c (optimize_reg_copy_1): Discount debug insns.
2957 (fixup_match_2): Likewise.
2958 (regmove_backward_pass): Likewise. Simplify combined
2959 replacement. Handle debug insns.
2960 * function.c (instantiate_virtual_regs): Handle debug insns.
2961 * function.h (struct emit_status): Add x_cur_debug_insn_uid.
2962 * print-rtl.h: Include cselib.h.
2963 (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs.
2964 * df.h (df_inns_rescan_debug_internal): Declare.
2965 * gcse.c (alloc_hash_table): Estimate n_insns.
2966 (cprop_insn): Don't regard debug insns as changes.
2967 (bypass_conditional_jumps): Skip debug insns.
2968 (one_pre_gcse_pass): Adjust.
2969 (one_code_hoisting_pass): Likewise.
2970 (compute_ld_motion_mems): Skip debug insns.
2971 (one_cprop_pass): Adjust.
2972 * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts.
2973 (if_convertible_stmt_p): Handle debug stmts.
2974 * init-regs.c (initialize_uninitialized_regs): Skip debug insns.
2975 * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts.
2976 * ira-build.c (create_bb_allocnos): Skip debug insns.
2977 * tree-flow-inline.h (has_zero_uses): Discount debug stmts.
2978 (has_single_use): Likewise.
2979 (single_imm_use): Likewise.
2980 (num_imm_uses): Likewise.
2981 * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts.
2982 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts.
2983 (create_outofssa_var_map): Likewise.
2984 * lower-subreg.c (adjust_decomposed_uses): New.
2985 (resolve_debug): New.
2986 (decompose_multiword_subregs): Use it.
2987 * tree-dfa.c (find_referenced_vars): Skip debug stmts.
2988 * emit-rtl.c: Include params.h.
2989 (cur_debug_insn_uid): Define.
2990 (set_new_first_and_last_insn): Set cur_debug_insn_uid too.
2991 (copy_rtx_if_shared_1): Handle debug insns.
2992 (reset_used_flags): Likewise.
2993 (set_used_flags): LIkewise.
2994 (get_max_insn_count): New.
2995 (next_nondebug_insn): New.
2996 (prev_nondebug_insn): New.
2997 (make_debug_insn_raw): New.
2998 (emit_insn_before_noloc): Handle debug insns.
2999 (emit_jump_insn_before_noloc): Likewise.
3000 (emit_call_insn_before_noloc): Likewise.
3001 (emit_debug_insn_before_noloc): New.
3002 (emit_insn_after_noloc): Handle debug insns.
3003 (emit_jump_insn_after_noloc): Likewise.
3004 (emit_call_insn_after_noloc): Likewise.
3005 (emit_debug_insn_after_noloc): Likewise.
3006 (emit_insn_after): Take loc from earlier non-debug insn.
3007 (emit_jump_insn_after): Likewise.
3008 (emit_call_insn_after): Likewise.
3009 (emit_debug_insn_after_setloc): New.
3010 (emit_debug_insn_after): New.
3011 (emit_insn_before): Take loc from later non-debug insn.
3012 (emit_jump_insn_before): Likewise.
3013 (emit_call_insn_before): Likewise.
3014 (emit_debug_insn_before_setloc): New.
3015 (emit_debug_insn_before): New.
3016 (emit_insn): Handle debug insns.
3017 (emit_debug_insn): New.
3018 (emit_jump_insn): Handle debug insns.
3019 (emit_call_insn): Likewise.
3021 (init_emit): Take min-nondebug-insn-uid into account.
3022 Initialize cur_debug_insn_uid.
3023 (emit_copy_of_insn_after): Handle debug insns.
3024 * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite
3025 location of single rhs in place.
3026 (maybe_dump_rtl_for_gimple_stmt): Dump lineno.
3027 (floor_sdiv_adjust): New.
3028 (cell_sdiv_adjust): New.
3029 (cell_udiv_adjust): New.
3030 (round_sdiv_adjust): New.
3031 (round_udiv_adjust): New.
3032 (wrap_constant): Moved from cselib.
3033 (unwrap_constant): New.
3034 (expand_debug_expr): New.
3035 (expand_debug_locations): New.
3036 (expand_gimple_basic_block): Drop hiding redeclaration. Expand
3038 (gimple_expand_cfg): Expand debug locations.
3039 * cselib.c: Include tree-pass.h.
3040 (struct expand_value_data): New.
3041 (cselib_record_sets_hook): New.
3042 (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New.
3043 (cselib_clear_table): Move, and implemnet in terms of...
3044 (cselib_reset_table_with_next_value): ... this.
3045 (cselib_get_next_unknown_value): New.
3046 (discard_useless_locs): Don't discard preserved values.
3047 (cselib_preserve_value): New.
3048 (cselib_preserved_value_p): New.
3049 (cselib_preserve_definitely): New.
3050 (cselib_clear_preserve): New.
3051 (cselib_preserve_only_values): New.
3052 (new_cselib_val): Take rtx argument. Dump it in details.
3053 (cselib_lookup_mem): Adjust.
3054 (expand_loc): Take regs_active in struct. Adjust. Silence
3055 dumps unless details are requested.
3056 (cselib_expand_value_rtx_cb): New.
3057 (cselib_expand_value_rtx): Rename and reimplment in terms of...
3058 (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps
3059 without details. Copy more subregs. Try to resolve values
3060 using a callback. Wrap constants.
3061 (cselib_subst_to_values): Adjust.
3062 (cselib_log_lookup): New.
3063 (cselib_lookup): Call it.
3064 (cselib_invalidate_regno): Don't count preserved values as useless.
3065 (cselib_invalidate_mem): Likewise.
3066 (cselib_record_set): Likewise.
3067 (struct set): Renamed to cselib_set, moved to cselib.h.
3068 (cselib_record_sets): Adjust. Call hook.
3069 (cselib_process_insn): Reset table when it would be cleared.
3070 (dump_cselib_val): New.
3071 (dump_cselib_table): New.
3072 * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts.
3073 (remove_forwarder_block): Support moving debug stmts.
3074 * cselib.h (cselib_record_sets_hook): Declare.
3075 (cselib_expand_callback): New type.
3076 (cselib_expand_value_rtx_cb): Declare.
3077 (cselib_reset_table_with_next_value): Declare.
3078 (cselib_get_next_unknown_value): Declare.
3079 (cselib_preserve_value): Declare.
3080 (cselib_preserved_value_p): Declare.
3081 (cselib_preserve_only_values): Declare.
3082 (dump_cselib_table): Declare.
3083 * cfgcleanup.c (flow_find_cross_jump): Skip debug insns.
3084 (try_crossjump_to_edge): Likewise.
3085 (delete_unreachable_blocks): Remove dominant GIMPLE blocks after
3086 dominated blocks when debug stmts are present.
3087 * simplify-rtx.c (delegitimize_mem_from_attrs): New.
3088 * tree-ssa-live.c (remove_unused_locals): Skip debug stmts.
3089 (set_var_live_on_entry): Likewise.
3090 * loop-invariant.c (find_invariants_bb): Skip debug insns.
3091 * cfglayout.c (curr_location, last_location): Make static.
3092 (set_curr_insn_source_location): Don't avoid bouncing.
3093 (get_curr_insn_source_location): New.
3094 (get_curr_insn_block): New.
3095 (duplicate_insn_chain): Handle debug insns.
3096 * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate
3098 * common.opt (fcompare-debug): Move to sort order.
3099 (fdump-unnumbered-links): Likewise.
3100 (fvar-tracking-assignments): New.
3101 (fvar-tracking-assignments-toggle): New.
3102 * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks
3103 because of debug stmts.
3104 (mark_stmt_if_obviously_necessary): Mark debug stmts.
3105 (eliminate_unnecessary_stmts): Walk dominated blocks before
3107 * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts.
3108 * ira.c (memref_used_between_p): Skip debug insns.
3109 (update_equiv_regs): Likewise.
3110 * sched-deps.c (sd_lists_size): Accept empty list.
3111 (sd_init_insn): Mark debug insns.
3112 (sd_finish_insn): Unmark them.
3113 (sd_add_dep): Reject non-debug deps on debug insns.
3114 (fixup_sched_groups): Give debug insns group treatment.
3116 (sched_analyze_reg): Don't mark debug insns for sched before call.
3117 (sched_analyze_2): Handle debug insns.
3118 (sched_analyze_insn): Compute next non-debug insn. Handle debug
3120 (deps_analyze_insn): Handle debug insns.
3121 (deps_start_bb): Skip debug insns.
3122 (init_deps): Initialize last_debug_insn.
3123 * tree-ssa.c (target_for_debug_bind): New.
3124 (find_released_ssa_name): New.
3125 (propagate_var_def_into_debug_stmts): New.
3126 (propagate_defs_into_debug_stmts): New.
3127 (verify_ssa): Skip debug bind stmts without values.
3128 (warn_uninialized_vars): Skip debug stmts.
3129 * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default.
3130 * rtl.c (rtx_equal_p_cb): Handle VALUEs.
3131 (rtx_equal_p): Likewise.
3132 * ira-costs.c (scan_one_insn): Skip debug insns.
3133 (process_bb_node_for_hard_reg_moves): Likewise.
3134 * rtl.h (DEBUG_INSN_P): New.
3135 (NONDEBUG_INSN_P): New.
3136 (MAY_HAVE_DEBUG_INSNS): New.
3137 (INSN_P): Accept debug insns.
3138 (RTX_FRAME_RELATED_P): Likewise.
3139 (INSN_DELETED_P): Likewise
3140 (PAT_VAR_LOCATION_DECL): New.
3141 (PAT_VAR_LOCATION_LOC): New.
3142 (PAT_VAR_OCATION_STATUS): New.
3143 (NOTE_VAR_LOCATION_DECL): Reimplement.
3144 (NOTE_VAR_LOCATION_LOC): Likewise.
3145 (NOTE_VAR_LOCATION_STATUS): Likewise.
3146 (INSN_VAR_LOCATION): New.
3147 (INSN_VAR_LOCATION_DECL): New.
3148 (INSN_VAR_LOCATION_LOC): New.
3149 (INSN_VAR_LOCATION_STATUS): New.
3150 (gen_rtx_UNKNOWN_VAR_LOC): New.
3151 (VAR_LOC_UNKNOWN_P): New.
3152 (NOTE_DURING_CALL_P): New.
3153 (SCHED_GROUP_P): Accept debug insns.
3154 (emit_debug_insn_before): Declare.
3155 (emit_debug_insn_before_noloc): Declare.
3156 (emit_debug_insn_beore_setloc): Declare.
3157 (emit_debug_insn_after): Declare.
3158 (emit_debug_insn_after_noloc): Declare.
3159 (emit_debug_insn_after_setloc): Declare.
3160 (emit_debug_insn): Declare.
3161 (make_debug_insn_raw): Declare.
3162 (prev_nondebug_insn): Declare.
3163 (next_nondebug_insn): Declare.
3164 (delegitimize_mem_from_attrs): Declare.
3165 (get_max_insn_count): Declare.
3166 (wrap_constant): Declare.
3167 (unwrap_constant): Declare.
3168 (get_curr_insn_source_location): Declare.
3169 (get_curr_insn_block): Declare.
3170 * tree-inline.c (insert_debug_decl_map): New.
3171 (processing_debug_stmt): New.
3172 (remap_decl): Don't create new mappings in debug stmts.
3173 (remap_gimple_op_r): Don't add references in debug stmts.
3174 (copy_tree_body_r): Likewise.
3175 (remap_gimple_stmt): Handle debug bind stmts.
3176 (copy_bb): Skip debug stmts.
3177 (copy_edges_for_bb): Likewise.
3178 (copy_debug_stmt): New.
3179 (copy_debug_stmts): New.
3180 (copy_body): Copy debug stmts at the end.
3181 (insert_init_debug_bind): New.
3182 (insert_init_stmt): Take id. Skip and emit debug stmts.
3183 (setup_one_parameter): Remap variable earlier, register debug mapping.
3184 (estimate_num_insns): Skip debug stmts.
3185 (expand_call_inline): Preserve debug_map.
3186 (optimize_inline_calls): Check for no debug_stmts left-overs.
3187 (unsave_expr_now): Preserve debug_map.
3188 (copy_gimple_seq_and_replace_locals): Likewise.
3189 (tree_function_versioning): Check for no debug_stmts left-overs.
3190 Init and destroy debug_map as needed. Split edges unconditionally.
3191 (build_duplicate_type): Init and destroy debug_map as needed.
3192 * tree-inline.h: Include gimple.h instead of pointer-set.h.
3193 (struct copy_body_data): Add debug_stmts and debug_map.
3194 * sched-int.h (struct ready_list): Add n_debug.
3195 (struct deps): Add last_debug_insn.
3196 (DEBUG_INSN_SCHED_P): New.
3197 (BOUNDARY_DEBUG_INSN_P): New.
3198 (SCHEDULE_DEBUG_INSN_P): New.
3199 (sd_iterator_cond): Accept empty list.
3200 * combine.c (create_log_links): Skip debug insns.
3201 (combine_instructions): Likewise.
3202 (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the
3203 return value is always unshared.
3204 (struct rtx_subst_pair): New.
3205 (auto_adjust_pair): New.
3206 (propagate_for_debug_subst): New.
3207 (propagate_for_debug): New.
3208 (try_combine): Skip debug insns. Propagate removed defs into
3210 (next_nonnote_nondebug_insn): New.
3211 (distribute_notes): Use it. Skip debug insns.
3212 (distribute_links): Skip debug insns.
3213 * tree-outof-ssa.c (set_location_for_edge): Likewise.
3214 * resource.c (mark_target_live_regs): Likewise.
3215 * var-tracking.c: Include cselib.h and target.h.
3216 (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and
3218 (micro_operation_type_name): New.
3219 (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN.
3220 (struct micro_operation_def): Update comments.
3221 (decl_or_value): New type. Use instead of decls.
3222 (struct emit_note_data_def): Add vars.
3223 (struct attrs_def): Use decl_or_value.
3224 (struct variable_tracking_info_def): Add permp, flooded.
3225 (struct location_chain_def): Update comment.
3226 (struct variable_part_def): Use decl_or_value.
3227 (struct variable_def): Make var_part a variable length array.
3229 (scratch_regs): New.
3230 (cselib_hook_called): New.
3231 (dv_is_decl_p): New.
3232 (dv_is_value_p): New.
3235 (dv_as_opaque): New.
3236 (dv_onepart_p): New.
3238 (IS_DECL_CODE): New.
3239 (check_value_is_not_decl): New.
3240 (dv_from_decl): New.
3241 (dv_from_value): New.
3242 (dv_htab_hash): New.
3243 (variable_htab_hash): Use it.
3244 (variable_htab_eq): Support values.
3245 (variable_htab_free): Free from the right pool.
3246 (attrs_list_member, attrs_list_insert): Use decl_or_value.
3247 (attrs_list_union): Adjust.
3248 (attrs_list_mpdv_union): New.
3249 (tie_break_pointers): New.
3250 (canon_value_cmp): New.
3251 (unshare_variable): Return possibly-modified slot.
3252 (vars_copy_1): Adjust.
3253 (var_reg_decl_set): Adjust. Split out of...
3254 (var_reg_set): ... this.
3255 (get_init_value): Adjust.
3256 (var_reg_delete_and_set): Adjust.
3257 (var_reg_delete): Adjust.
3258 (var_regno_delete): Adjust.
3259 (var_mem_decl_set): Split out of...
3260 (var_mem_set): ... this.
3261 (var_mem_delete_and_set): Adjust.
3262 (var_mem_delete): Adjust.
3266 (variable_union): Adjust. Speed up merge of 1-part vars.
3267 (variable_canonicalize): Use unshared slot.
3268 (VALUED_RECURSED_INTO): New.
3269 (find_loc_in_1pdv): New.
3270 (struct dfset_merge): New.
3271 (insert_into_intersection): New.
3272 (intersect_loc_chains): New.
3274 (canonicalize_loc_order_check): New.
3275 (canonicalize_values_mark): New.
3276 (canonicalize_values_star): New.
3277 (variable_merge_over_cur): New.
3278 (variable_merge_over_src): New.
3279 (dataflow_set_merge): New.
3280 (dataflow_set_equiv_regs): New.
3281 (remove_duplicate_values): New.
3282 (struct dfset_post_merge): New.
3283 (variable_post_merge_new_vals): New.
3284 (variable_post_merge_perm_vals): New.
3285 (dataflow_post_merge_adjust): New.
3286 (find_mem_expr_in_1pdv): New.
3287 (dataflow_set_preserve_mem_locs): New.
3288 (dataflow_set_remove_mem_locs): New.
3289 (dataflow_set_clear_at_call): New.
3290 (onepart_variable_different_p): New.
3291 (variable_different_p): Use it.
3292 (dataflow_set_different_1): Adjust. Make detailed dump more verbose.
3293 (track_expr_p): Add need_rtl parameter. Don't generate rtl
3295 (track_loc_p): Pass it true.
3296 (struct count_use_info): New.
3297 (find_use_val): New.
3298 (replace_expr_with_values): New.
3300 (use_type): New, partially split out of...
3301 (count_uses): ... this. Count new micro-ops.
3302 (count_uses_1): Adjust.
3303 (count_stores): Adjust.
3304 (count_with_sets): New.
3305 (VAL_NEEDS_RESOLUTION): New.
3306 (VAL_HOLDS_TRACK_EXPR): New.
3307 (VAL_EXPR_IS_COPIED): New.
3308 (VAL_EXPR_IS_CLOBBERED): New.
3309 (add_uses): Adjust. Generate new micro-ops.
3310 (add_uses_1): Adjust.
3311 (add_stores): Generate new micro-ops.
3312 (add_with_sets): New.
3313 (find_src_status): Adjust.
3314 (find_src_set_src): Adjust.
3315 (compute_bb_dataflow): Use dataflow_set_clear_at_call.
3316 Handle new micro-ops. Canonicalize value equivalances.
3317 (vt_find_locations): Compute total size of hash tables for
3318 dumping. Perform merge for var-tracking-assignments. Don't
3319 disregard single-block loops.
3320 (dump_attrs_list): Handle decl_or_value.
3321 (dump_variable): Take variable. Deal with decl_or_value.
3322 (dump_variable_slot): New.
3323 (dump_vars): Use it.
3324 (dump_dataflow_sets): Adjust.
3325 (set_slot_part): New, extended to support one-part variables
3326 after splitting out of...
3327 (set_variable_part): ... this.
3328 (clobber_slot_part): New, split out of...
3329 (clobber_variable_part): ... this.
3330 (delete_slot_part): New, split out of...
3331 (delete_variable_part): .... this.
3332 (check_wrap_constant): New.
3333 (vt_expand_loc_callback): New.
3334 (vt_expand_loc): New.
3335 (emit_note_insn_var_location): Adjust. Handle values. Handle
3336 EMIT_NOTE_AFTER_CALL_INSN.
3337 (emit_notes_for_differences_1): Adjust. Handle values.
3338 (emit_notes_for_differences_2): Likewise.
3339 (emit_notes_for_differences): Adjust.
3340 (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes.
3341 Adjust. Handle new micro-ops.
3342 (vt_add_function_parameters): Adjust. Create and bind values.
3343 (vt_initialize): Adjust. Initialize scratch_regs and
3344 valvar_pool, flooded and perm.. Initialize and use cselib. Log
3345 operations. Move some code to count_with_sets and add_with_sets.
3346 (delete_debug_insns): New.
3347 (vt_debug_insns_local): New.
3348 (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish
3350 (var_tracking_main): If var-tracking-assignments is enabled
3351 but var-tracking isn't, delete debug insns and leave. Likewise
3352 if we exceed limits or fail the stack adjustments tests, and
3353 after all var-tracking processing.
3354 More in var-tracking, from Jakub Jelinek <jakub@redhat.com>:
3355 (dataflow_set): Add traversed_vars.
3356 (value_chain, const_value_chain): New typedefs.
3357 (value_chain_pool, value_chains): New variables.
3358 (value_chain_htab_hash, value_chain_htab_eq, add_value_chain,
3359 add_value_chains, add_cselib_value_chains, remove_value_chain,
3360 remove_value_chains, remove_cselib_value_chains): New functions.
3361 (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1,
3362 shared_hash_find_slot_noinsert_1, shared_hash_find_1): New
3364 (shared_hash_find_slot_unshare, shared_hash_find_slot,
3365 shared_hash_find_slot_noinsert, shared_hash_find): Update.
3366 (dst_can_be_shared): New variable.
3367 (unshare_variable): Unshare set->vars if shared, use shared_hash_*.
3368 Clear dst_can_be_shared. If set->traversed_vars is non-NULL and
3369 different from set->vars, look up slot again instead of using the
3371 (dataflow_set_init): Initialize traversed_vars.
3372 (variable_union): Use shared_hash_*. Use initially NO_INSERT
3373 lookup if set->vars is shared. Don't keep slot cleared before
3374 calling unshare_variable. Unshare set->vars if needed. Adjust
3375 unshare_variable callers. Clear dst_can_be_shared if needed.
3376 Even ->refcount == 1 vars must be unshared if set->vars is shared
3377 and var needs to be modified.
3378 (dataflow_set_union): Set traversed_vars during canonicalization.
3379 (VALUE_CHANGED, DECL_CHANGED): Define.
3380 (set_dv_changed, dv_changed_p): New static inlines.
3381 (track_expr_p): Clear DECL_CHANGED.
3382 (dump_dataflow_sets): Set it.
3383 (variable_was_changed): Call set_dv_changed.
3384 (emit_note_insn_var_location): Likewise.
3385 (changed_variables_stack): New variable.
3386 (check_changed_vars_1, check_changed_vars_2): New functions.
3387 (emit_notes_for_changes): Do nothing if changed_variables is
3388 empty. Traverse changed_variables with check_changed_vars_1,
3389 call check_changed_vars_2 on each changed_variables_stack entry.
3390 (emit_notes_in_bb): Add SET argument. Just clear it at the
3391 beginning, use it instead of local &set, don't destroy it at the end.
3392 (vt_emit_notes): Call dataflow_set_clear early on all
3393 VTI(bb)->out sets, never use them, instead use emit_notes_in_bb
3394 computed set, dataflow_set_clear also VTI(bb)->in when we are
3395 done with the basic block. Initialize changed_variables_stack,
3396 free it afterwards. If ENABLE_CHECKING verify that after noting
3397 differences to an empty set value_chains hash table is empty.
3398 (vt_initialize): Initialize value_chains and value_chain_pool.
3399 (vt_finalize): Delete value_chains htab, free value_chain_pool.
3400 (variable_tracking_main): Call dump_dataflow_sets before calling
3401 vt_emit_notes, not after it.
3402 * tree-flow.h (propagate_defs_into_debug_stmts): Declare.
3403 (propagate_var_def_into_debug_stmts): Declare.
3404 * df-problems.c (df_lr_bb_local_compute): Skip debug insns.
3405 (df_set_note): Reject debug insns.
3406 (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't
3407 add notes to debug insns.
3408 (df_note_bb_compute): Adjust. Likewise.
3409 (df_simulate_uses): Skip debug insns.
3410 (df_simulate_initialize_backwards): Likewise.
3411 * reg-stack.c (subst_stack_regs_in_debug_insn): New.
3412 (subst_stack_regs_pat): Reject debug insns.
3413 (convert_regs_1): Handle debug insns.
3414 * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H.
3415 (print-rtl.o): Depend on cselib.h.
3416 (cselib.o): Depend on TREE_PASS_H.
3417 (var-tracking.o): Depend on cselib.h and TARGET_H.
3418 * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns.
3419 (init_ready_list): Skip boundary debug insns.
3420 (add_branch_dependences): Skip debug insns.
3421 (free_block_dependencies): Check for blocks with only debug insns.
3422 (compute_priorities): Likewise.
3423 * gimple.c (gss_for_code): Handle GIMPLE_DEBUG.
3424 (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust
3426 (gimple_build_debug_bind_stat): New.
3427 (empty_body_p): Skip debug stmts.
3428 (gimple_has_side_effects): Likewise.
3429 (gimple_rhs_has_side_effects): Likewise.
3430 * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New.
3431 (gimple_build_debug_bind_stat): Declare.
3432 (gimple_build_debug_bind): Define.
3433 (is_gimple_debug): New.
3434 (gimple_debug_bind_p): New.
3435 (gimple_debug_bind_get_var): New.
3436 (gimple_debug_bind_get_value): New.
3437 (gimple_debug_bind_get_value_ptr): New.
3438 (gimple_debug_bind_set_var): New.
3439 (gimple_debug_bind_set_value): New.
3440 (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro.
3441 (gimple_debug_bind_reset_value): New.
3442 (gimple_debug_bind_has_value_p): New.
3443 (gsi_next_nondebug): New.
3444 (gsi_prev_nondebug): New.
3445 (gsi_start_nondebug_bb): New.
3446 (gsi_last_nondebug_bb): New.
3447 * sched-vis.c (print_pattern): Handle VAR_LOCATION.
3448 (print_insn): Handle DEBUG_INSN.
3449 * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc
3450 of first insn prevail.
3451 (first_stmt): Skip debug stmts.
3452 (first_non_label_stmt): Likewise.
3453 (last_stmt): Likewise.
3454 (has_zero_uses_1): New.
3455 (single_imm_use_1): New.
3456 (verify_gimple_debug): New.
3457 (verify_types_in_gimple_stmt): Handle debug stmts.
3458 (verify_stmt): Likewise.
3459 (debug_loop_num): Skip debug stmts.
3460 (remove_edge_and_dominated_blocks): Remove dominators last.
3461 * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts.
3462 (linearize_expr): Likewise.
3463 * config/i386/i386.c (ix86_delegitimize_address): Call
3464 default implementation.
3465 * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns.
3466 (group_barrier_needed): Skip debug insns.
3467 (emit_insn_group_barriers): Likewise.
3468 (emit_all_insn_group_barriers): Likewise.
3469 (ia64_variable_issue): Handle debug insns.
3470 (ia64_dfa_new_cycle): Likewise.
3471 (final_emit_insn_group_barriers): Skip debug insns.
3472 (ia64_dwarf2out_def_steady_cfa): Take frame argument. Don't
3473 def cfa without frame.
3474 (process_set): Likewise.
3475 (process_for_unwind_directive): Pass frame on.
3476 * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define.
3477 (rs6000_delegitimize_address): New.
3478 (rs6000_debug_adjust_cost): Handle debug insns.
3479 (is_microcoded_insn): Likewise.
3480 (is_cracked_insn): Likewise.
3481 (is_nonpipeline_insn): Likewise.
3482 (insn_must_be_first_in_group): Likewise.
3483 (insn_must_be_last_in_group): Likewise.
3484 (force_new_group): Likewise.
3485 * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block
3486 contains only debug insns.
3487 (rtl_merge_blocks): Skip debug insns.
3488 (purge_dead_edges): Likewise.
3489 (rtl_block_ends_with_call_p): Skip debug insns.
3490 * dce.c (deletable_insn_p): Handle VAR_LOCATION.
3491 (mark_reg_dependencies): Skip debug insns.
3492 * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New.
3493 * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts.
3494 * tree-ssa-threadedge.c
3495 (record_temporary_equivalences_from_stmts): Skip debug stmts.
3496 * regcprop.c (replace_oldest_value_addr): Skip debug insns.
3497 (replace_oldest_value_mem): Use ALL_REGS for debug insns.
3498 (copyprop_hardreg_forward_1): Handle debug insns.
3499 * reload1.c (reload): Skip debug insns. Replace unassigned
3500 pseudos in debug insns with their equivalences.
3501 (eliminate_regs_in_insn): Skip debug insns.
3502 (emit_input_reload_insns): Skip debug insns at first, adjust
3504 * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts.
3505 (get_indirect_ref_operands): Pass opf_no_vops on.
3506 (get_expr_operands): Likewise. Skip debug stmts.
3507 (parse_ssa_operands): Scan debug insns with opf_no_vops.
3509 2009-09-01 Richard Henderson <rth@redhat.com>
3511 * tree-ssa-ccp.c (ccp_initialize): Make sure to simulate
3512 stmt_ends_pp_p statements at least once.
3513 * tree-vrp.c (vrp_initialize): Likewise.
3514 (vrp_visit_stmt): Be prepared for non-interesting stmts.
3516 2009-09-01 Dodji Seketeli <dodji@redhat.com>
3519 Fix AIX bootstrap after PR debug/30161
3520 * dwarf2out.c (make_ith_pack_parameter_name): Don't used strnlen
3521 that is a GNU extension.
3522 (tmpl_value_parm_die_table): Move the definition of this global
3523 outside #ifdef DWARF2_DEBUGGING_INFO region.
3525 2009-09-01 Richard Guenther <rguenther@suse.de>
3527 * tree.c (tree_expr_size): New function.
3528 * tree.h (tree_expr_size): Declare.
3529 * rtlanal.c (rtx_addr_can_trap_p_1): Adjust comment.
3530 * builtins.c (fold_builtin_memory_op): Use tree_expr_size.
3531 * langhooks.c (lhd_expr_size): Remove.
3532 * langhooks.h (struct lang_hooks): Remove expr_size.
3533 * explow.c (expr_size): Use tree_expr_size.
3534 (int_expr_size): Likewise.
3535 * langhooks-def.h (lhd_expr_size): Remove.
3536 (LANG_HOOKS_EXPR_SIZE): Likewise.
3537 (LANG_HOOKS_INITIALIZER): Adjust.
3539 2009-09-01 Richard Guenther <rguenther@suse.de>
3541 * tree-flow.h (mark_addressable): Move declaration ...
3542 * tree.h (mark_addressable): ... here.
3543 * stmt.c (expand_asm_operands): Use mark_addressable, not
3544 lang_hooks.mark_addressable.
3545 * langhooks-def.h (LANG_HOOKS_INITIALIZER): Remove
3546 LANG_HOOKS_MARK_ADDRESSABLE.
3547 * langhooks.h (struct lang_hooks): Remove mark_addressable langhook.
3548 * c-objc-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
3550 2009-08-31 Chris Demetriou <cgd@google.com>
3552 * config/i386/i386.c (ix86_vectorize_builtin_conversion): Never
3553 vectorize if not TARGET_SSE2.
3555 2009-08-31 DJ Delorie <dj@redhat.com>
3557 * config/mep/mep.h (FUNCTION_ARG_REGNO_P): Exclude coprocessor
3558 registers if no coprocessor is enabled.
3560 2009-08-31 Dodji Seketeli <dodji@redhat.com>
3563 * cgraph.h (cgraph_get_node): Declare ...
3564 * cgraph.c (cgraph_get_node): ... new function.
3565 * dwarf2out.c (gen_generic_params_dies,
3566 generic_parameter_die, tree_add_const_value_attribute_for_decl,
3567 make_ith_pack_parameter_name,
3568 append_entry_to_tmpl_value_parm_die_table,
3569 gen_remaining_tmpl_value_param_die_attribute): New functions.
3570 (gen_subprogram_die): Generate debug info for template parameters
3571 if debug info level is higher than DINFO_LEVEL_TERSE.
3572 Use tree_add_const_value_attribute_for_decl instead of
3573 tree_add_const_value_attribute.
3574 (gen_const_die): Use tree_add_const_value_attribute_for_decl
3575 instead of tree_add_const_value_attribute.
3576 (gen_struct_or_union_type_die): Generate debug
3577 info for template parameters if debug info level is higher than
3579 (tree_add_const_value_attribute): Handle integral and pointer
3580 constants. Update comment.
3581 (dwarf_tag_name): Support DW_TAG_GNU_template_template_param.
3582 (dwarf_attr_name): Support DW_AT_GNU_template_name.
3583 (reference_to_unused): Fix thinko. Remove redundant predicates from
3585 (tree_add_const_value_attribute): Make this work for constant
3587 tree_add_const_value_attribute_for_decl is to be used for variable
3589 (add_location_or_const_value_attribute): Use
3590 tree_add_const_value_attribute_for_decl now.
3591 (dwarf2out_finish): Emit the DW_AT_const_value attribute of
3592 DW_TAG_template_value_param DIEs after function DIEs have been
3594 * langhooks.h (lang_hooks_for_types): Add
3595 get_argument_pack_elems.
3596 (lang_hooks_for_decls): Add generic_generic_parameter_decl_p.
3597 (lang_hooks): Added get_innermost_generic_parms,
3598 get_innermost_generic_args.
3599 * langhooks-def.h (LANG_HOOKS_GET_INNERMOST_GENERIC_PARMS,
3600 LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS,
3601 LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS,
3602 LANG_HOOKS_GENERIC_GENERIC_PARAMETER_DECL_P): New language hooks.
3604 2009-08-31 DJ Delorie <dj@redhat.com>
3606 * config/mep/mep.c (machine_function): Add frame_locked flag. Set
3607 it once we start generating the prologue or epilogue.
3608 (mep_call_saves_register): If the frame is locked, re-use
3610 (mep_assign_save_slots): New, broken out from mep_expand_prologue.
3611 (mep_expand_prologue): Call it.
3612 (mep_expand_epilogue): Likewise.
3613 (mep_start_function): Use the same logic as mep_expand_prologue.
3614 (mep_pass_by_reference): Make logic more readable.
3615 (mep_return_in_memory): Zero-sized objects are passed in memory.
3616 (mep_reorg_noframe): Make sure we have accurate REG_DEAD notes.
3618 2009-08-31 Richard Guenther <rguenther@suse.de>
3620 * builtins.c (fold_builtin_memory_op): Use the alias oracle
3621 to query if the memory regions for memmove overlap.
3622 * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Relax the
3623 asserts on pointers, instead deal with odd trees.
3624 (ptr_derefs_may_alias_p): Likewise.
3625 (refs_may_alias_p_1): Constructor bases also never alias.
3627 2009-08-31 Gerald Pfeifer <gerald@pfeifer.com>
3629 * doc/install.texi (Final install): Adjust reference on where to
3630 order printed manuals.
3632 2009-08-30 Olivier Hainque <hainque@adacore.com>
3634 * dwarf2out.c (switch_to_frame_table_section): Move
3635 definition prior to first use.
3637 2009-08-30 Richard Guenther <rguenther@suse.de>
3639 PR tree-optimization/41186
3640 * tree-ssa-alias.c (ptr_deref_may_alias_ref_p): Remove.
3641 (ao_ref_init_from_ptr_and_size): New function.
3642 (ref_maybe_used_by_call_p_1): Be more precise tracking
3643 used ranges for builtin functions.
3644 (ref_maybe_used_by_call_p): Adjust.
3645 (call_may_clobber_ref_p_1): Be more precise tracking clobbered
3646 ranges for builtin functions.
3647 * tree-ssa-alias.h (ao_ref_init_from_ptr_and_size): Declare.
3649 2009-08-30 Alan Modra <amodra@bigpond.net.au>
3652 * fwprop.c (get_reg_use_in): Delete.
3653 (free_load_extend): New function.
3654 (forward_propagate_subreg): Use it.
3656 2009-08-29 Kaz Kojima <kkojima@gcc.gnu.org>
3658 * config.gcc (sh*-*-elf): Add superh stuff only for sh*-superh-elf.
3660 2009-08-29 Kai Tietz<kai.tietz@onevision.com>
3663 * config/i386.c (ix86_expand_epilogue): Correct stack adjustment for
3666 2009-08-29 Douglas B Rupp <rupp@gnat.com>
3668 * crtstuff.c (__do_global_dtors_aux): Use atexit if no
3669 fini or fini_array section.
3671 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3673 * graphite-dependences.c (graphite_legal_transform_bb): Call
3674 pbb_remove_duplicate_pdrs.
3675 * graphite-poly.c (can_collapse_pdr): Removed.
3676 (pdr_find_duplicate): Removed.
3677 (can_collapse_pdrs): New.
3678 (pbb_remove_duplicate_pdrs): New.
3679 (new_poly_dr): Do not look for duplicates.
3680 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
3681 (PBB_PDR_DUPLICATES_REMOVED): New.
3682 (pbb_remove_duplicate_pdrs): Declared.
3684 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3686 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3687 the strides by multiplying by PDR_NB_REFS.
3688 * graphite-poly.c (can_collapse_pdr): New.
3689 (pdr_find_duplicate): New.
3690 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
3691 Initialize PDR_NB_REFS.
3692 * graphite-poly.h (struct poly_dr): Add field nb_refs.
3694 (new_poly_dr): Number of subscripts is a graphite_dim_t.
3696 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3699 * graphite-poly.c (apply_poly_transforms): Remove legality test before
3702 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3704 * graphite-dependences.c (pddr_original_scattering): Return NULL
3705 for read-read dependence relations.
3706 * graphite-poly.h (enum poly_dr_type): Fix comment.
3709 (pdr_may_write_p): New.
3711 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3713 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3714 (struct poly_dr): Same.
3715 (new_poly_dr): Same.
3716 * graphite-poly.c (new_poly_dr): Same.
3717 * graphite-dependences.c (dot_deps): Disable call to system.
3719 2009-08-28 Cary Coutant <ccoutant@google.com>
3722 * dwarf2out.c (gen_type_die_with_usage): Use proper context for
3723 struct/union/enum types local to a function.
3725 2009-08-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3726 Sebastian Pop <sebastian.pop@amd.com>
3728 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3729 pbb_strip_mine_time_depth. Changed the implementation so that
3730 transformation is expressed as a transformation on
3731 time (scatttering) dimensions. Also, ensures that the 2d+1
3732 scheduling format is preserved.
3733 (pbb_strip_mine_profitable_p): Profitability is based on the
3734 iteration number of a given time (scattering) dimension,
3735 and not on a original loop depth dimension.
3736 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3737 (pbb_do_strip_mine): Call psct_dynamic_dim.
3738 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3739 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3740 (pbb_nb_dynamic_scattering_transform): New.
3741 (psct_dynamic_dim): New.
3743 2009-08-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3745 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3746 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3747 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3748 * graphite-interchange.c (build_linearized_memory_access): Same.
3749 (memory_stride_in_loop): Same.
3751 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3753 * graphite-dependences.c (pddr_original_scattering): New.
3754 (graphite_legal_transform_dr): Call pddr_original_scattering.
3757 * graphite-dependences.h (dot_deps): Declared.
3758 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3759 (print_pdr): Print PDR_ID.
3760 * graphite-poly.h (struct poly_dr): Add field id.
3763 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3765 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3767 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3768 not delete the original dependence relation.
3770 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3772 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3773 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3774 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3775 (free_poly_ddr): New.
3776 (pddr_is_empty): New.
3777 (dependence_polyhedron_1): Now returns a poly_ddr_p.
3778 (dependence_polyhedron): Same. Remove useless gcc_assert.
3780 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3781 (graphite_carried_dependence_level_k): Call pddr_is_empty.
3782 * graphite-dependences.h (enum poly_dependence_kind): New.
3783 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
3784 (PDRP_SOURCE): Renamed PDDR_SOURCE.
3785 (PDRP_SINK): Renamed PDDR_SINK.
3786 (PDRP_DDP): Renamed PDDR_DDP.
3788 (free_poly_ddr): Declared.
3789 * graphite-poly.c (new_scop): Use the new hash function names.
3790 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3791 into original_pddrs.
3792 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3794 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3796 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3797 bounds with LT_EXPR to make niter analysis more precise on code
3798 generated by Graphite.
3800 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3802 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3803 (graphite_legal_transform_bb): Same.
3804 (poly_drs_may_alias_p): Same.
3806 2009-08-28 Richard Guenther <rguenther@suse.de>
3808 * tree.def: Remove note about obsolete TYPE_NONCOPIED_PARTS.
3810 2009-08-28 Jan Beulich <jbeulich@novell.com>
3812 * config/i386/netware.c: Include langhooks.h.
3813 (i386_nlm_encode_section_info): Simplify.
3814 (netware_override_options): Delete.
3815 * config/i386/netware.h (netware_override_options): Delete
3817 (OVERRIDE_OPTIONS): Delete definition.
3818 (SUBTARGET_OVERRIDE_OPTIONS): Define.
3819 (ASM_COMMENT_START): Define.
3820 * config/i386/nwld.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Define.
3822 2009-08-28 Jan Beulich <jbeulich@novell.com>
3824 * configure.ac: For in-tree ld, do a plain version check to
3825 determine whether comdat groups are supported.
3826 * configure: Regenerate.
3828 2009-08-28 Olivier Hainque <hainque@adacore.com>
3830 * collect2.c (DO_COLLECT_EXPORT_LIST): New internal macro,
3831 always defined. Reflect definition or absence of such for
3832 COLLECT_EXPORT_LIST. Readability helper.
3833 (scanfilter): New enum, to help control what symbols
3834 are to be considered or ignored by scan_prog_file.
3835 (enum pass): Rename as "scanpass", moved together with scanfilter
3836 prior to scan_prog_file's prototype.
3837 (scan_prog_file): Accept and honor scanpass and scanfilter arguments.
3838 Group prototype with the scanpass/scanfilter definitions, factorize
3839 head comments for the several implementations at the prototype.
3840 (main): Reorganize the first pass link control to let AIX
3841 drag only the needed frame tables in executables. Prevent
3842 frame tables collection during the scan aimed at static ctors.
3843 Pre-link and scan for frame tables later to compensate.
3844 * doc/tm.texi (ASM_OUTPUT_DWARF_TABLE_REF): New macro.
3845 A C statement to issue assembly directives that create a reference
3846 to the given DWARF table identifier label from the current function
3848 * dwarf2out.c (switch_to_eh_frame_section): Add a BACK argument
3849 to differentiate first time section entry. Only emit a .data
3850 tables start identifier label the first time around.
3851 (switch_to_frame_table_section): New function. Helper for
3852 output_call_frame_info to switch possibly BACK into the eh_frame
3853 or the debug_frame section depending on FOR_EH.
3854 (output_call_frame_info): Use helper to first enter the proper
3856 (output_fde): Use ASM_OUTPUT_DWARF_TABLE_REF when defined to
3857 emit a link to the frame table start label from each function
3859 * config/rs6000/rs6000.c (rs6000_aix_asm_output_dwarf_table_ref):
3860 New function. Implementation of ASM_OUTPUT_DWARF_TABLE_REF.
3861 * config/rs6000/rs6000-protos.h: Declare it.
3862 * config/rs6000/aix.h (ASM_OUTPUT_DWARF_TABLE_REF): Define.
3864 2009-08-27 Kaz Kojima <kkojima@gcc.gnu.org>
3866 * config/sh/sh.c (split_branches): Check the result of
3869 2009-08-27 Steve Ellcey <sje@cup.hp.com>
3871 * config/ia64/hpux.h (LIB_SPEC): Add -lrt for when
3872 using -pthread -fopenmp
3874 2009-08-27 Gerald Pfeifer <gerald@pfeifer.com>
3876 * doc/service.texi (service directory): Update URL.
3878 2009-08-27 Uros Bizjak <ubizjak@gmail.com>
3880 PR rtl-optimization/40861
3881 * simplify-rtx.c (simplify_subreg): Do not call simplify_gen_subreg to
3882 extract word from a multi-word subreg for negative byte positions.
3884 2009-08-27 Tristan Gingold <gingold@adacore.com>
3885 Douglas B Rupp <rupp@gnat.com>
3887 * config/ia64/ia64.c (ia64_attribute_table): Add "common_object" entry.
3888 (SECTION_VMS_OVERLAY): Define.
3889 (ia64_vms_common_object_attribute): Added. Handle the "common_object"
3891 (ia64_vms_elf_asm_named_section): Added. Generate .section pseudo-op
3893 (ia64_vms_output_aligned_decl_common): Added. Generate pseudo-op for
3894 common_object declarations.
3895 (ia64_section_type_flags): Set section flag for common_object.
3896 * config/ia64/ia64-protos.h
3897 (ia64_vms_output_aligned_decl_common): Declare.
3898 (ia64_vms_elf_asm_named_section): Declare.