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