OSDN Git Service

* pa/linux-unwind.h: Guard with inhibit_libc.
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2007-09-11  Steve Kenton  <skenton@ou.edu
2
3         * pa/linux-unwind.h: Guard with inhibit_libc.
4         * pa/hpux-unwind.h: Likewise.
5
6 2007-09-11  David Daney  <ddaney@avtrex.com>
7
8         * doc/invoke.texi: Document new MIPS -mllsc and -mno-llsc options.
9         * doc/install.texi: Document new --with-llsc and --without-llsc
10         options.
11         * config.gcc: Handle --with-llsc and --without-llsc configure options.
12         * config/mips/mips.md (sync, memory_barrier): Wrap sync instrunction
13         in %| and %- operand codes.  Depend on GENERATE_SYNC instead of
14         ISA_HAS_SYNC.
15         (sync_compare_and_swap<mode>, sync_add<mode>, sync_sub<mode>,
16         sync_old_add<mode>, sync_old_sub<mode>, sync_new_add<mode>,
17         sync_new_sub<mode>, sync_<optab><mode>, sync_old_<optab><mode>,
18         sync_new_<optab><mode>, sync_nand<mode>, sync_old_nand<mode>,
19         sync_new_nand<mode>, sync_lock_test_and_set<mode>): Depend on
20         GENERATE_LL_SC instead of ISA_HAS_LL_SC.
21         * config/mips/mips.opt (mllsc): New option.
22         * config/mips/mips.c (mips_llsc): Define variable.
23         (mips_handle_option): Handle mllsc option.
24         (override_options): Set mips_print_operand_punct for '|' and '-'.
25         (print_operand): Add new %| and %- operand codes.
26         * config/mips/mips.h (mips_llsc_setting): New enum type.
27         (mips_llsc): Declare.
28         (OPTION_DEFAULT_SPECS): Add llsc handling.
29         (GENERATE_SYNC): New macro.
30         (GENERATE_LL_SC): New macro.
31         (MIPS_COMPARE_AND_SWAP, MIPS_SYNC_OP, MIPS_SYNC_OLD_OP,
32         MIPS_SYNC_NEW_OP, MIPS_SYNC_NAND, MIPS_SYNC_OLD_NAND,
33         MIPS_SYNC_NEW_NAND, MIPS_SYNC_EXCHANGE): Wrap instructions
34         in %| and %- operand codes.
35
36 2007-09-11  Eric Botcazou  <ebotcazou@adacore.com>
37
38         * tree-ssa-structalias.c (push_fields_onto_fieldstack): Deal with
39         TYPE_NONALIASED_COMPONENT like with DECL_NONADDRESSABLE_P.
40
41 2007-09-11  Jason Merrill  <jason@redhat.com>
42
43         PR middle-end/27945
44         * stor-layout.c (layout_decl): Do pack variable size fields.    
45
46 2007-09-11  Maxim Kuvyrkov  <maxim@codesourcery.com>
47
48         * config/m68k/predicates.md (movsi_const0_operand,
49         non_symbolic_call_operand): New predicates.
50
51         * config/m68k/constraints.md: (Cs, Ci, C0, Cj, CQ, CW, CZ, CS, Ap, Ac):
52         New constraints.
53         * doc/md.texi (Constraints for Particular Machines: Motorola 680x0):
54         Document constraints N, O, P, R, S, T, Q, U, W, Cs, Ci, C0, Cj, CQ,
55         CW, CZ, CS, Ap and Ac.
56
57         * config/m68k/m68k.md (UNSPEC_IB): New constant.
58         (constraints.md): New include.
59         (cpu, type, type1, opx, opy, opx_type, opy_type, size, opx_access,
60         opx_mem, opy_mem, op_mem, guess, split): New attributes.
61         (movdf_internal): Name pattern.  Fix to use alternatives.  Add split.
62         Specify attributes.
63         (pushdi): Add split.
64         (tstsi_internal): Name pattern.  Fix to use alternatives.  Specify
65         attributes.  Split tstsi_internal_68020_cf from it.
66         (tstsi_internal_68020_cf): New pattern.
67         (tsthi_internal, tstqi_internal): Name pattern.  Specify attributes.
68         (tst<mode>_cf): Specify attributea.
69         (cmpsi_cf): Name pattern.  Specify attributes.
70         (cmp<mode>_68881, cmp<mode>_cf): Specify type attribute.
71         (pushexthisi_const): Fix to use alternatives.  Specify
72         attributes.
73         (movsi_const0): Split movsi_const0_68000_10 and movsi_const0_68040_60
74         from it.  Fix to use alternatives.  Specify attributes.
75         (movsi_const0_68040_10, movsi_const0_68040_60): New patterns.
76         (movsi_cf, movstrictqi_cf): Fix to use alternatives.  Specify
77         attributes.
78         (movsf_cf_soft): Specify attributes.
79         (movdf_cf_soft): Add split.
80         (pushasi, zero_extendhisi2_cf, zero_extendqisi2_cfv4,
81         cfv4_extendhisi2, 68k_extendhisi2, extendqihi2, cfv4_extendqisi2,
82         68k_extendqisi2, truncdfsf2_cf): Specify attributes.
83         (truncdfsf2_68881): Name pattern.  Specify attributes.
84         (floatsi<mode>2_cf, floathi<mode>2_68881, floathi<mode>2_cf,
85         floatqi<mode>2_68881, floatqi<mode>2_cf, ftrunc<mode>2_cf,
86         fix<mode>qi2_cf, fix<mode>hi2_cf, fix<mode>si2_cf, adddi_dishl32):
87         Specify attributes.
88         (addsi3_5200): Fix to use alternatives.  Specify attributes.
89         Add splits.
90         (add<mode>3_cf, subdi_dishl32): Specify attributes.
91         (subsi3): Add alternative for subq.l.  Specify attributes.
92         (sub<mode>3_cf, mulhi3, mulhisi3): Specify attributes.
93         (mulhisisi3_s, mulsi3_68020, mulsi3_cf): Name pattern.  Specify
94         attributes.
95         (umulhisi3): Specify attributes.
96         (mulhisisi3_z): Name pattern.  Specify attributes.
97         (fmul<mode>3_cf, div<mode>3_cf, negsi2_internal, negsi2_5200,
98         sqrt<mode>2_68881, clzsi2, one_cmplsi2_5200, subreghi1ashrdi_const32,
99         subregsi1ashrdi_const32, ashrsi3, subreg1lshrdi_const32, lshrsi3,
100         bsetmemqi): Specify attributes.
101         (bsetmemqi_ext): Name pattern.  Specify attributes.
102         (bclrmemqi): Specify attributes.
103         (bclrmemqi_ext, scc, sls): Name pattern.  Specify attributes.
104         (beq, bne, bgt, bgtu, blt, bltu, bge, bgeu, ble, bleu): Specify
105         attributes.
106         (beq2, bne2, bgt2, bgtu2, blt2, bltu2, bge2, bgeu2, ble2, bleu2): Name
107         pattern.  Specify attributes.
108         (jump): Specify attributes.
109         (tablejump_internal): Name pattern.  Specify attributes.
110         (call_value): Split into non_symbolic_call_value,
111         symbolic_call_value_jsr, symbolic_call_value_bsr.  Fix to use
112         alternatives.  Specify attributes.
113         (non_symbolic_call_value, symbolic_call_value_jsr,
114         symbolic_call_value_bsr): New patterns.
115         (nop, return, unlink, indirect_jump): Specify attributes.
116         (trap): Fix condition.  Specify attributes.
117         (ib): New pattern.
118
119         * config/m68k/m68k.c (m68k_symbolic_call_var): New variable.
120         (override_options): Initialize it.  Initialize m68k_sched_cpu.
121         (CONST_METHOD): Rename to M68K_CONST_METHOD, move to m68k.h.
122         (const_method): Make global, rename to m68k_const_method.
123         (const_int_cost, output_move_const_into_data_reg): Update.
124         (output_move_double): Parametrize to emit rtl code, rename to
125         handle_move_double.
126         (output_reg_adjust, emit_reg_adjust, output_compadr, output_movsi,
127         emit_movsi): New static functions.
128         (output_move_double): New function with semantics of old
129         output_move_double.
130         (m68k_emit_move_double): New function.
131         (m68k_sched_cpu): New variable.
132         (attr_op_type): New enum.
133         (sched_guess_p): New variable.
134         (sched_address_type, sched_operand_type, sched_attr_op_type):
135         New static functions.
136         (m68k_sched_attr_opx_type, m68k_sched_attr_opy_type,
137         m68k_sched_attr_size, m68k_sched_attr_op_mem): New functions.
138         (sched_branch_type): New static variable.
139         (m68k_sched_branch_type): New function.
140         * config/m68k/m68k.h (M68K_SYMBOLIC_CALL): New enum.
141         (m68k_symbolic_call_var): Declare.
142         (M68K_CONST_METHOD): Rename from CONST_METHOD.  Move here from m68k.c.
143         (m68k_const_method, m68k_emit_move_double, m68k_sched_cpu,
144         m68k_sched_attr_opx_type, m68k_sched_attr_opy_type,
145         m68k_sched_attr_size, m68k_sched_attr_op_mem, m68k_sched_branch_type):
146         Declare.
147
148 2007-09-11  Jakub Jelinek  <jakub@redhat.com>
149
150         * builtins.def (BUILT_IN_VA_ARG_PACK_LEN): New builtin.
151         * builtins.c (expand_builtin) <case BUILT_IN_VA_ARG_PACK_LEN>: Issue
152         error if __builtin_va_arg_pack_len () wasn't optimized out during
153         inlining.
154         * tree-inline.c (copy_bb): Replace __builtin_va_arg_pack_len ()
155         with the number of inline's anonymous arguments.
156         * doc/extend.texi: Document __builtin_va_arg_pack_len ().
157
158 2007-09-11  Zdenek Dvorak  <ook@ucw.cz>
159
160         * fold-const.c (extract_muldiv_1): Do not simplify
161         var * c * c to var.
162
163 2007-09-11  Jan Hubicka <jh@suse.cz>
164
165         * i386.h (ix86_tune_indices): Add X86_TUNE_INTER_UNIT_CONVERSIONS.
166         (TARGET_INTER_UNIT_CONVERSIONS): New.
167         * i386.md (floatsi expanders): Remove redundant check for SImode
168         source; offload to memory when asked for.
169         (floatsisf2_mixed, floatsisf2_sse, floatsidf2_mixed, floatsidf2_sse
170         floatdisf2_mixed, floatsisf2_sse, floatsidf2_mixed, floatsidf2_sse):
171         Update conditions;
172         (floatsisf2_mixed_memory, floatsisf2_sse_memory,
173         floatsidf2_mixed_memory, floatsidf2_sse_memory
174         floatdisf2_mixed_memory, floatsisf2_sse_memory,
175         floatsidf2_mixed_memory, floatsidf2_sse_memory): New.
176
177 2007-09-11  Jan Hubicka <jh@suse.cz>
178
179         * toplev.c (process_options): all frontends now do unit-at-a-time.
180         * cgraphunit.c: update comments.
181         (cgraph_expand_function): call passmanager dirrectly; emit thunks.
182         * c-decl.c (finish_function): use cgraph_add_new_function.
183         * function.c (expand_function_end): We are always unit-at-a-time.
184
185 2007-09-11  Richard Sandiford  <richard@codesourcery.com>
186
187         * config/mips/mips.c (mips_set_mips16_mode): Use separate anchor
188         settings for MIPS16.
189         (mips_use_anchors_for_symbol_p): Use default_use_anchors_for_symbol_p.
190
191 2007-09-11  Richard Sandiford  <richard@codesourcery.com>
192
193         * config/mips/mips.c (mips_symbol_insns_1): Allow LEAs of
194         SYMBOL_FORCE_TO_MEM constants.
195         (mips_rtx_costs): Give a cost of 1 to force_to_mem_operands.
196         (mips16_rewrite_pool_refs_info): New structure.
197         (mips16_rewrite_pool_constant): New function, split out from...
198         (mips16_rewrite_pool_refs): ...here.  Take a pointer to a
199         mips16_rewrite_pool_refs_info structure rather than a pointer
200         to a constant pool.  Force force_to_mem_operands into memory.
201         (mips16_lay_out_constants): Update call to mips16_rewrite_pool_refs.
202         * config/mips/predicates.md (force_to_mem_operand): New predicate.
203         * config/mips/constraints.md (kf): New constraint.
204         * config/mips/mips.md (*movdi_64bit_mips16): Add a d <- kf alternative.
205         (*movsi_mips16): Likewise.
206
207 2007-09-11  Richard Sandiford  <richard@codesourcery.com>
208             Nigel Stephens  <nigel@mips.com>
209             David Ung  <davidu@mips.com>
210
211         * config/mips/mips.h (CONSTANT_POOL_COST): Move to...
212         * config/mips/mips.c: ...here and set to 4 for TARGET_MIPS16.
213         (mips16_constant_cost, mips_immediate_operand_p, mips_binary_cost)
214         (mips_fp_mult_cost, mips_fp_div_cost, mips_sign_extend_cost)
215         (mips_zero_extend_cost): New functions.
216         (mips_rtx_costs): Treat COMPARE constants as having zero cost.
217         Use the new functions.  Tweak many cost estimates, both here
218         and in the new subroutines.  Return false when the cost of the
219         operands has not been calculated.  Check for *clear_upper32.
220         Check for floating-point multiply-add, reciprocal and rsqrt
221         patterns.  Handle comparison and rotation codes.
222
223 2007-09-11  Danny Smith  <dannysmith@users.sourceforge.net>
224
225         * config/i386/cygming.h (TARGET_STRIP_NAME_ENCODING): Don't
226         override default.
227         * config/i386/i386.c (get_dllimport_decl): Don't strip
228         FASTCALL_PREFIX.
229
230 2007-09-10  Janis Johnson  <janis187@us.ibm.com>
231
232         PR c/30013
233         * config/dfp-bit.c: Don't skip TFmode conversions; move strto*
234         declarations to top.
235         (DFP_TO_BFP): Use for either XFmode or TFmode.
236         (BFP_TO_DFP): Use for either XFmode or TFmode; always use cast
237         of BFP_VIA_TYPE.
238         * config/dfp-bit.h: Include float.h.
239         (LONG_DOUBLE_HAS_XF_MODE, LONG_DOUBLE_HAS_TF_MODE): Define if long
240         double is one of these modes, rather than using LIBGCC_HAS_*F_MODE
241         which doesn't mean the same thing.
242         (BFP_KIND): Use 4 to mean TFmode.
243         (BFP_FMT): Specify the number of decimal digits based on the
244         number of mantissa digits.
245         (BFP_VIA_TYPE): Binary float type to use as cast for sprintf.
246         (BFP_TO_DFP, DFP_TO_BFP): Define names for TFmode variants.
247         (STR_TO_BFP): Use strtold for XFmode or TFmode.
248         (TFtype): Define if TFmode is supported.
249         * doc/libgcc.texi (Decimal float library routines): Document
250         TF conversion functions.
251
252 2007-09-10  Chao-ying Fu  <fu@mips.com>
253
254         * config/mips/mips.c (mips_scalar_mode_supported_p): Declare.
255         (TARGET_SCALAR_MODE_SUPPORTED_P): Define.
256         (mips_emit_compare): Process fixed-point modes.
257         (mips_pad_arg_upward): Support fixed-point types.
258         (override_options): Allow fixed-point modes in accumulators.
259         (mips_pass_by_reference): Pass DQ, UDQ, DA, and UDA modes in registers.
260         (mips_vector_mode_supported_p): Support V2HQmode, V2UHQmode, V2HAmode,
261         V2UHAmode, V4QQmode, and V4UQQmode when TARGET_DSP.
262         (mips_scalar_mode_supported_p): New function to accept fixed-point
263         modes if the width is not greater than two BITS_PER_WORD.
264         * config/mips/mips.h (SHORT_FRACT_TYPE_SIZE, FRACT_TYPE_SIZE,
265         LONG_FRACT_TYPE_SIZE, LONG_LONG_FRACT_TYPE_SIZE,
266         SHORT_ACCUM_TYPE_SIZE, ACCUM_TYPE_SIZE, LONG_ACCUM_TYPE_SIZE,
267         LONG_LONG_ACCUM_TYPE_SIZE): Define.
268         * config/mips/mips.md ("d"): Update mode attribute for fixed-point
269         modes.
270         ("IMODE"): New mode attribute.
271         (mips-fixed.md): Include.
272         * config/mips/mips-modes.def: Create VECTOR_MODES for FRACT, UFRACT,
273         ACCUM, UACCUM.
274         * config/mips/mips-fixed.md: New file.
275
276 2007-09-11  Ben Elliston  <bje@au.ibm.com>
277
278         * config/spu/spu.md: Formatting fixes.
279
280 2007-09-10  Janis Johnson  <janis187@us.ibm.com>
281
282         * config/dfp-bit.c (dfp_unary_func): Delete.
283         (dfp_unary_op): Delete.
284         (dfp_binary_op): Use decFloat functions instead of decNumber
285         functions for binary operations.
286         (d32_binary_op): Convert 32-bit operands to 64 bits for evaluation.
287         (dnn_binary_op): Call dfp_binary_op with decFloat rather than
288         DFP_C_TYPE.
289         (dfp_compare_op): Use decFloat functions insteadof decNumber
290         functions for comparisons.
291         (d32_compare_op): Convert 32-bit operands to 64 bits for evaluation.
292         (dnn_binary_op): Call dfp_compare_op with decFloat rather than
293         DFP_C_TYPE.
294         (DFP_ADD, DFP_SUB, DFP_MULTIPLE, DFP_DIVIDE): Use macros for
295         call to dxx_binary_op and decFloat function.
296         (DFP_EQ, DFP_NE, DFP_LT, DFP_GT, DFP_LE, DFP_GE): Use macros for
297         calls to dxx_binary_op and decFloat function.
298         * config/dfp-bit.h: Include decFloat header files.
299         (decFloat, DFP_BINARY_OP, DFP_COMPARE_OP, DEC_FLOAT_ADD,
300         DEC_FLOAT_SUBTRACT, DEC_FLOAT_MULTIPLY, DEC_FLOAT_DIVIDE,
301         DEC_FLOAT_COMPARE, DEC_FLOAT_IS_ZERO, DEC_FLOAT_IS_NAN,
302         DEC_FLOAT_IS_SIGNED: Define for each of 3 operand widths.
303
304 2007-09-10  Harsha Jagasia <harsha.jagasia@amd.com>
305             Jan Sjodin <jan.sjodin@amd.com>
306         
307         * tree-vect-analyze.c (vect_analyze_operations): Change
308         comparison of loop iterations with threshold to less than
309         or equal to instead of less than. Reduce
310         min_scalar_loop_bound by one.
311         * tree-vect-transform.c (vect_estimate_min_profitable_iters): 
312         Change prologue and epilogue iterations estimate to vf/2,
313         when unknown at compile-time. Change versioning guard
314         cost to taken_branch_cost. If peeling for alignment is
315         unknown at compile-time, change peel guard costs to one
316         taken branch and one not-taken branch per peeled loop.
317         If peeling for alignment is known but number of scalar loop
318         iterations is unknown at compile-time, change peel guard
319         costs to one taken branch per peeled loop. Change the cost
320         model equation to consider vector iterations as the loop
321         iterations less the prologue and epilogue iterations.
322         Change outside vector cost check to less than or equal to
323         zero instead of equal to zero.
324         (vect_do_peeling_for_loop_bound): Reduce
325         min_scalar_loop_bound by one.
326         * tree-vectorizer.h: Add TARG_COND_TAKEN_BRANCH_COST and
327         TARG_COND_NOT_TAKEN_BRANCH_COST.        
328         * config/i386/i386.h (processor_costs): Add
329         scalar_stmt_cost, scalar_load_cost, scalar_store_cost,
330         vec_stmt_cost, vec_to_scalar_cost, scalar_to_vec_cost,
331         vec_align_load_cost, vect_unalign_load_cost,
332         vec_store_cost, cond_taken_branch_cost,
333         cond_not_taken_branch_cost.
334         Define macros for x86 costs.
335         * config/i386/i386.c:
336         (size_cost): Set scalar_stmt_cost, scalar_load_cost,
337         scalar_store_cost, vec_stmt_cost, vec_to_scalar_cost,
338         scalar_to_vec_cost, vec_align_load_cost, 
339         vect_unalign_load_cost, vec_store_cost,
340         cond_taken_branch_cost, cond_not_taken_branch_cost to one. 
341         (i386_cost, i486_cost, pentium_cost, pentiumpro_cost,
342         geode_cost, k6_cost, athlon_cost, pentium4_cost, nocona_cost, 
343         core2_cost, generic64_cost, generic32_cost): Set to default
344         untuned costs.
345         (k8_cost, amdfam10_cost): Costs for vectorization tuned.
346         (x86_builtin_vectorization_cost): New.
347
348 2007-09-10  Janis Johnson  <janis187@us.ibm.com>
349             Ben Elliston  <bje@au.ibm.com>
350
351         * dfp.c: Include decimal128Local.h; 
352         (dfp_byte_swap): Remove.
353         (encode_decimal32, decode_decimal32): Don't handle endianness.
354         (encode_decimal64, decode_decimal64): Ditto.
355         (encode_decimal128, decode_decimal128): Ditto.
356         * config/dfp-bit.c (host_to_ieee32, ieee_to_host_32): Ditto.
357         (__swap64): Remove.
358         (host_to_ieee_64, ieee_to_host_64): Don't handle endianness.
359          (__swap128): Remove
360         (host_to_ieee_128, ieee_to_host_128): Don't handle endianness.
361         * Makefile.in (DECNUM_H): Add decimal128Local.h.
362
363 2007-09-10  David Daney  <ddaney@avtrex.com>
364
365         * config/mips/mips.md (UNSPEC_MEMORY_BARRIER): New entry in
366         define_constants.
367         (memory_barrier): Rewrote as an insn that clobbers memory.
368
369 2007-09-10  Richard Sandiford  <richard@codesourcery.com>
370
371         * config/mips/mips.c (mips_global_pointer): Check
372         call_really_used_regs instead of call_used_regs.
373         (mips_save_reg_p): Likewise.  Save all call-saved registers
374         if current_function_saves_all_registers.  Fix indentation.
375         No longer treat $18 as a special case.
376         (compute_frame_size): Guard FPR loop with TARGET_HARD_FLOAT.
377
378 2007-09-10  Richard Sandiford  <richard@codesourcery.com>
379
380         * config/mips/mips.h (MIPS_ARCH_FLOAT_SPEC): New macro.
381         * config/mips/mips.c (mips_cpu_info_table): Mention it in the
382         the introductory comment.
383         (MIPS_MARCH_CONTROLS_SOFT_FLOAT): Delete.
384         (override_options): Don't test for it.
385         * config/mips/sde.h (MIPS_MARCH_CONTROLS_SOFT_FLOAT): Delete.
386         (DRIVER_SELF_SPECS): Add MIPS_ARCH_FLOAT_SPEC.
387         * config/mips/vr.h: As for config/mips/sde.h.
388
389 2007-09-10  Trevor Smigiel  <trevor_smigiel@playstation.sony.com>
390             Revital Eres  <eres@il.ibm.com>
391
392         * target.h (struct gcc_target.sched): New field: sms_res_mii.
393         (struct ddg): Define.
394         * target-def.h (TARGET_SCHED_SMS_RES_MII): Define.
395         (TARGET_SCHED): Add TARGET_SCHED_SMS_RES_MII.
396         * config/spu/spu.c: Include ddg.h.
397         (TARGET_SCHED_SMS_RES_MII): Define.
398         (spu_sms_res_mii): New function to calculate mii.
399         * modulo-sched (res_MII): Use it.
400         * doc/tm.texi: Document TARGET_SCHED_SMS_RES_MII.
401
402 2007-09-10  Andreas Krebbel  <krebbel1@de.ibm.com>
403
404         * config/s390/s390.c (s390_dump_pool): Create copy of constant
405         pool entries since they might hold values that must not be shared.
406
407 2007-09-10  Uros Bizjak  <ubizjak@gmail.com>
408
409         PR target/33369
410         * gcc/config/i386/sse.md (ashr<mode>3): Change op2 mode to SImode.
411         Use 'N' operand constraint for op2.
412         (lshr<mode>3): Ditto.
413         (ashl<mode>3): Ditto.
414         (vec_shl_<mode>): Use const_0_to_255_mul_8_operand predicate for op2.
415         (vec_shr_<mode>): Use const_0_to_255_mul_8_operand predicate for op2.
416
417         * gcc/config/i386/i386.c (ix86_expand_builtin) [IX86_BUILTIN_PSLL?128,
418         IX86_BUILTIN_PSRA*?128, IX86_BUILTIN_PSRL?128]: Convert op1 to SImode.
419
420 2007-09-10  Andreas Krebbel  <krebbel1@de.ibm.com>
421
422         * config/s390/s390.md ("fixuns_trunc<BFP:mode><GPR:mode>2"):
423         Change mode macro in the last real_2expN parameter to uppercase.
424
425 2007-09-10  Michael Matz  <matz@suse.de>
426
427         * tree-pass.h (pass_cselim): Declare new pass.
428         * passes.c (init_optimization_passes): Link in pass_cselim.
429         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Renamed from
430         tree_ssa_phiopt; add do_store_elim parameter, handle it by calling
431         cond_store_replacement.
432         (condstoretemp): New static variable.
433         (cond_store_replacement): New function.
434         (tree_ssa_phiopt, tree_ssa_cs_elim): New wrappers around
435         tree_ssa_phiopt_worker.
436         (struct name_to_bb): New.
437         (get_non_trapping, name_to_bb_hash, name_to_bb_eq, add_or_mark_expr,
438         nt_init_block, nt_fini_block): New static functions.
439         (seen_ssa_names, nontrap_set): New static variables.
440         (gate_cselim, pass_cselim): Define new pass.
441         * common.opt (ftree-cselim): New flag.
442         * toplev.c (process_options): Set flag_tree_cselim if required.
443
444 2007-09-10  Hans-Peter Nilsson  <hp@axis.com>
445
446         * simplify-rtx.c (simplify_relational_operation_1): For recent
447         canonicalization, don't recurse if op1 equals both PLUS arguments.
448
449 2007-09-09  David Daney  <ddaney@avtrex.com>
450
451         * optabs.c (expand_sync_operation):  Use plus insn if minus
452         CONST_INT_P(val).
453         (expand_sync_fetch_operation):  Ditto.
454
455 2007-09-09  H.J. Lu  <hongjiu.lu@intel.com>
456
457         * i386.md (*floatsisf2_mixed_vector): Use cvtdq2ps instead
458         of cvtpq2ps.
459         (*floatsisf2_sse_vector): Likewise.
460
461 2007-09-09  Krister Walfridsson  <cato@df.lth.se>
462
463         * config/netbsd.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define to 1.
464
465 2007-09-09  H.J. Lu  <hongjiu.lu@intel.com>
466
467         * config/i386/i386.h (ix86_tune_indices): Rename
468         X86_USE_VECTOR_CONVERTS to X86_TUNE_USE_VECTOR_CONVERTS.
469         (TARGET_USE_VECTOR_CONVERTS): Updated.
470         * config/i386/i386.c: Likewise.
471
472 2007-09-09  Sandra Loosemore  <sandra@codesourcery.com>
473             Nigel Stephens <nigel@mips.com>
474
475         * doc/invoke.texi (Overall Options):  Add .sx file extension
476         as a synonym for .S.
477         * cppspec.c (known_suffixes): Likewise.
478         * gcc.c (default_compilers): Likewise.
479
480 2007-09-09  Rask Ingemann Lambertsen  <rask@sygehus.dk>
481
482         PR target/30315
483         * config/i386/i386.h (CANONICALIZE_COMPARISON): Delete.
484         * simplify-rtx.c (simplify_relational_operation_1): Add the
485         canonicalization from i386.h.
486         * doc/md.texi (Canonicalization of Instructions): Document it.
487
488 2007-09-09  Jan Hubicka  <jh@suse.cz>
489             Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
490
491         * i386.h (ix86_tune_indices): Add X86_USE_VECTOR_CONVERTS.
492         (TARGET_USE_VECTOR_CONVERTS): New.
493         * i386.md: New post-reload splitters for converting SF to DF and DF to
494         SF.
495         (floatsi* expander): Special case vector conversions.
496         (floatsisf2_mixed_vector, floatsisf2_sse_vector_nointernunit,
497         floatsisf2_sse_vector_internunit, floatsisf2_sse_vector,
498         floatsidf2_mixed_vector, floatsidf2_sse_vector): New.
499         (floatsisf2_mixed, floatsisf2_sse, floatsidf2_mixed, floatsidf2_sse):
500         Disable when doing vector converts.
501         (floatsi<mode>2_i387): Disable when
502         * sse.md (vec_dupv2df): Export.
503         * i386.c (ix86_tune_features): Enable SSE conversions.
504
505 2007-09-09  Richard Guenther  <rguenther@suse.de>
506
507         * tree-ssa-operands.c (add_virtual_operand): Only mark
508         stores as has_volatile_ops if alias information is not available.
509
510 2007-09-09  Revital Eres  <eres@il.ibm.com>
511
512         * doc/contrib.texi: Add myself.
513
514 2007-09-09  Ira Rosen  <irar@il.ibm.com>
515
516         * tree-vectorizer.h (stmt_vinfo_set_inside_of_loop_cost,
517         stmt_vinfo_set_outside_of_loop_cost): New functions.
518         * tree-vect-transform.c (vect_get_cost_fields): Remove.
519         (vect_model_simple_cost): Call
520         stmt_vinfo_set_inside/outside_of_loop_cost to set the relevant cost
521         field instead of calling vect_get_cost_fields.
522         (vect_model_store_cost, vect_model_load_cost): Likewise.
523
524 2007-09-09  Revital Eres  <eres@il.ibm.com>
525
526         * config/rs6000/rs6000.c (paired_init_builtins): Add const
527         declaration to bdesc_paired_preds variable.
528         (paired_expand_builtin): Likewise.
529
530 2007-09-09  Revital Eres  <eres@il.ibm.com>
531
532         * dbgcnt.def (sms_sched_loop): New counter.
533         * modulo-sched.c: Use sms_sched_loop instead of
534         MAX_SMS_LOOP_NUMBER to determine the maximum number of loops to
535         perform swing modulo scheduling on.  Include dbgcnt.h.
536         * Makefile.in: Add DBGCNT_H to modulo-sched.o.
537         * params.def: Remove PARAM_MAX_SMS_LOOP_NUMBER.
538
539 2007-09-09  Uros Bizjak  <ubizjak@gmail.com>
540
541         * config/i386/i386.md (X87MODEF12, SSEMODEF): Remove mode iterators.
542         Substitute all uses with ...
543         (MODEF): New mode iterator.
544
545         (fix_trunc<mode>_fisttp_i387_1): Remove operand constraints
546         from pre-regalloc define_insn_and_split splitter pattern.
547         (*fix_trunc<mode>_i387_1): Ditto.
548         (*fistdi2_1): Ditto.
549         (*fist<mode>2_1): Ditto.
550         (frndintxf2_floor): Ditto.
551         (*fist<mode>2_floor_1): Ditto.
552         (frndintxf2_ceil): Ditto.
553         (*fist<mode>2_ceil_1): Ditto.
554         (frndintxf2_trunc): Ditto.
555         (frndintxf2_mask_pm): Ditto.
556
557         (prologue): Use (const_int 0) as never generated filler insn.
558         (epilogue): Ditto.
559         (sibcall_epilogue): Ditto.
560         (eh_return_si): Ditto.
561         (eh_return_di): Ditto.
562
563         (add<mode>3): Rename from adddf3 and addsf3.  Macroize expander
564         using MODEF mode iterator.
565         (sub<mode>3): Rename from subdf3 and subsf3.  Macroize expander
566         using MODEF mode iterator.
567         (mul<mode>3): Rename from muldf3 and mulsf3.  Macroize expander
568         using MODEF mode iterator.
569         (nearbyint<mode>2): Rename from nearbyintdf2 and nearbyintsf2.
570         Macroize expander using MODEF mode iterator.
571
572         (zero_extendsidi2): Remove operand constraints from expander.
573         (smuldi3_highpart): Ditto.
574         (indirect_jump): Ditto.
575         (tablejump): Ditto.
576         (rsqrtsf2): Ditto.
577         * config/i386/sse.md (storentv4sf): Ditto.
578         (storentv2df): Ditto.
579         (storentv2di): Ditto.
580         (storentsi): Ditto.
581         (sse2_cvtpd2ps): Ditto.
582         (vec_interleave_highv16qi): Ditto.
583         (vec_interleave_lowv16qi): Ditto.
584         (vec_interleave_highv8hi): Ditto.
585         (vec_interleave_lowv8hi): Ditto.
586         (vec_interleave_highv4si): Ditto.
587         (vec_interleave_lowv4si): Ditto.
588         (vec_interleave_highv2di): Ditto.
589         (vec_interleave_lowv2di): Ditto.
590         (sse2_maskmovdqu): Ditto.
591         * config/i386/mmx.md (mmx_maskmovq): Ditto.
592
593 2007-09-09  Ira Rosen  <irar@il.ibm.com>
594
595         * tree-vectorizer.h (enum vect_def_type): Start enumeration from 1.
596         (struct _slp_tree, struct _slp_instance): Define new data structures
597         along macros for their access.
598         (struct _loop_vec_info): Define new fields: strided_stores,
599         slp_instances, and slp_unrolling_factor along macros for their access.
600         (enum slp_vect_type): New.
601         (struct _stmt_vec_info): Define new field, slp_type, and macros for its
602         access.
603         (STMT_VINFO_STRIDED_ACCESS): New macro.
604         (vect_free_slp_tree): Declare.
605         (vectorizable_load): Add an argument of type slp_tree.
606         (vectorizable_store, vectorizable_operation, vectorizable_conversion,
607         vectorizable_assignment): Likewise.
608         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
609         Declare (make extern).
610         * tree-vectorizer.c (new_stmt_vec_info): Initialize the new field.
611         (new_loop_vec_info): Likewise.
612         (destroy_loop_vec_info): Free memory allocated for SLP structures.
613         * tree-vect-analyze.c: Include recog.h.
614         (vect_update_slp_costs_according_to_vf): New.
615         (vect_analyze_operations): Add argument for calls to vectorizable_ ()
616         functions. For not pure SLP stmts with strided access check that the
617         group size is power of 2. Update the vectorization factor according to
618         SLP. Call vect_update_slp_costs_according_to_vf.
619         (vect_analyze_group_access): New.
620         (vect_analyze_data_ref_access): Call vect_analyze_group_access.
621         (vect_free_slp_tree): New functions.
622         (vect_get_and_check_slp_defs, vect_build_slp_tree, vect_print_slp_tree,
623         vect_mark_slp_stmts, vect_analyze_slp_instance, vect_analyze_slp,
624         vect_make_slp_decision, vect_detect_hybrid_slp_stmts,
625         vect_detect_hybrid_slp): Likewise.
626         (vect_analyze_loop): Call vect_analyze_slp, vect_make_slp_decision
627         and vect_detect_hybrid_slp.
628         * tree-vect-transform.c (vect_estimate_min_profitable_iters): Take
629         SLP costs into account.
630         (vect_get_cost_fields): New function.
631         (vect_model_simple_cost): Make extern, add SLP parameter and handle
632         SLP.
633         (vect_model_store_cost, vect_model_load_cost): Likewise.
634         (vect_get_constant_vectors): New function.
635         (vect_get_slp_vect_defs, vect_get_slp_defs,
636         vect_get_vec_defs_for_stmt_copy, vect_get_vec_defs_for_stmt_copy,
637         vect_get_vec_defs): Likewise.
638         (vectorizable_reduction): Don't handle SLP for now.
639         (vectorizable_call): Don't handle SLP for now. Add argument to
640         vect_model_simple_cost.
641         (vectorizable_conversion): Handle SLP (call vect_get_vec_defs to
642         get SLPed and vectorized defs). Fix indentation and spacing.
643         (vectorizable_assignment): Handle SLP.
644         (vectorizable_induction): Don't handle SLP for now.
645         (vectorizable_operation): Likewise.
646         (vectorizable_type_demotion): Add argument to
647         vect_model_simple_cost.
648         (vectorizable_type_promotion): Likewise.
649         (vectorizable_store, vectorizable_load): Handle SLP.
650         (vectorizable_condition): Don't handle SLP for now.
651         (vect_transform_stmt): Add a new argument for SLP. Check that there is
652         no SLP transformation required for unsupported cases. Add SLP
653         argument for supported cases.
654         (vect_remove_stores): New function.
655         (vect_schedule_slp_instance, vect_schedule_slp): Likewise.
656         (vect_transform_loop): Schedule SLP instances.
657         * Makefile.in: (tree-vect-analyze.o): Depend on recog.h.
658
659 2007-09-09  Andrew Haley  <aph@redhat.com>
660
661         * optabs.c (sign_expand_binop): Set libcall_gen = NULL in the
662         fake signed optab.
663
664 2007-09-09  Hans-Peter Nilsson  <hp@axis.com>
665
666         Divide REG_LABEL notes into REG_LABEL_OPERAND and REG_LABEL_TARGET.
667         * doc/rtl.texi (Insns): Specify when a label_ref makes a jump_insn.
668         Similar for what label_refs can go in the JUMP_TARGET field.  Split
669         REG_LABEL documentation into REG_LABEL_TARGET and REG_LABEL_OPERAND.
670         * reload.c (find_reloads): Generate REG_LABEL_OPERAND, not
671         REG_LABEL when replacing an operand with a LABEL_REF for a
672         non-jump insn.
673         (subst_reloads): When replacing a LABEL_REG with a register,
674         instead of generating a REG_LABEL note, assert that there already
675         is one or that the label is a known target for the insn.
676         * rtlanal.c (computed_jump_p): Instead of looking for a REG_LABEL
677         note, check the JUMP_LABEL field.  Remove "else" after return.
678         * reorg.c (emit_delay_sequence): Replace case for REG_LABEL with
679         cases for REG_LABEL_OPERAND and REG_LABEL_TARGET.
680         (fill_slots_from_thread): Handle both REG_LABEL_OPERAND and
681         REG_LABEL_TARGET notes, including the JUMP_TARGET field on JUMP_P
682         insns.  Iterate over all notes; don't assume there's only one.
683         * cse.c (recorded_label_ref): Adjust comment to refer to
684         REG_LABEL_OPERAND.
685         (cse_extended_basic_block): Do LABEL_REF check for all INSN_P
686         insns, not just NONJUMP_INSN_P.
687         (check_for_label_ref): For JUMP_P insns, check that the LABEL_REF
688         isn't a jump target.
689         * jump.c (rebuild_jump_labels): Adjust head comment.
690         (init_label_info): Ditto.  Remove REG_LABEL_OPERAND notes only;
691         don't reset REG_LABEL_TARGET notes, including the JUMP_LABEL field.
692         (mark_all_labels): For JUMP_P insns without a target, check if the
693         the target is noted on the previous nonjump insn.
694         (mark_jump_label_1): New function, guts from mark_jump_label.
695         <case IF_THEN_ELSE>: Handle first operand as a non-target when
696         marking jump target labels.
697         <case LABEL_REF>: Adjust for whether to generate a
698         REG_LABEL_TARGET or a REG_LABEL_OPERAND note.
699         For 'E' format rtl, iterate in descending element order.
700         (delete_related_insns): Handle both REG_LABEL_TARGET and
701         REG_LABEL_OPERAND notes.  For JUMP_P insns with labels with zero
702         reference count, delete and fallthrough.  Move finding-next-
703         non-deleted insn last in the function.  Look at all INSN_P insns
704         for REG_LABEL_OPERAND notes.
705         (redirect_jump_2): Assert that OLABEL equals the old JUMP_LABEL of
706         JUMP.
707         * print-rtl.c (print_rtx): For JUMP_P insns and a non-NULL
708         JUMP_LABEL, output the INSN_UID of it.
709         * gcse.c: Adjust comments as appropriate to say REG_LABEL_OPERAND
710         and/or REG_LABEL_TARGET.
711         (add_label_notes): Only add REG_LABEL_OPERAND notes.  Put in line
712         with jump.c copy by only adding notes for labels actually
713         referenced in the insn.
714         * emit-rtl.c (try_split): Don't assume only NONJUMP_INSN_P need
715         usage count increment; handle all INSN_P trial insns.
716         (emit_copy_of_insn_after): Change to not copy REG_LABEL_OPERAND
717         notes.
718         * rtl.h (struct rtx_def) <volatil>: Adjust to mention
719         REG_LABEL_TARGET and REG_LABEL_OPERAND.
720         (LABEL_REF_NONLOCAL_P): Allow REG_LABEL_TARGET and
721         REG_LABEL_OPERAND.
722         * combine.c (distribute_notes): Adjust for REG_LABEL_TARGET on
723         JUMP_P insns and REG_LABEL_OPERAND everywhere.
724         * sched-rgn.c (is_cfg_nonregular): Check for REG_LABEL_OPERANDS
725         on all INSN_P insns.
726         * reg-notes.def (LABEL_TARGET, LABEL_OPERAND): Split from LABEL.
727         * cfgrtl.c (delete_insn): Adjust to handle REG_LABEL_TARGET and
728         REG_LABEL_OPERAND notes.
729         * reload1.c (calculate_needs_all_insns): Adjust comments.
730         (set_label_offsets): Adjust to look for REG_LABEL_OPERAND notes.
731         * config/alpha/alpha.md (split for load of an address into a
732         four-insn sequence on Unicos/Mk): Adjust to use
733         REG_LABEL_OPERAND.
734         * config/sh/sh.md (sh_reorg, final_prescan_insn): Ditto.
735
736 2007-09-09  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
737
738         Revert:
739         2007-09-05  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
740         * regrename.c (copyprop_hardreg_forward_1): New variable next. Use
741         FOR_BB_INSNS_SAFE instead of for loop.
742         * cse.c (cse_extended_basic_block): Likewise.
743         * postreload.c (reload_cse_regs_1): New variable next. Make sure
744         that the for loop does not invoke NEXT_INSN on a deleted insn.
745         * function.c (instantiate_virtual_regs): Likewise.
746         * lower-subreg.c (remove_retval_note): Likewise.
747         (decompose_multiword_subregs): Use FOR_BB_INSNS_SAFE instead of
748         FOR_BB_INSNS.
749         * emit-rtl.c (remove_insn): Set NEXT_INSN and PREV_INSN to NULL on
750         a deleted insn.
751         * cfgrtl.c (delete_insn): Set JUMP_LABEL to NULL on a deleted
752         insn, if it's a jump.
753         (try_redirect_by_replacing_jump): New variable jump_p. Call
754         tablejump_p before delete_insn_chain.
755         * reload1.c (reload): New variable next. Make sure that the for
756         loop does not invoke NEXT_INSN on a deleted insn.
757         (fixup_eh_region_note): Make the loop terminate if i becomes NULL.
758         (delete_output_reload): New variable prev. Make sure the the for
759         loops do not invoke PREV_INSN on a deleted insn.
760
761 2007-09-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
762
763         * pa/constraints.md: Remove 'X' from unused letters comment.
764
765 2007-09-08  Richard Guenther  <rguenther@suse.de>
766
767         * tree-tailcall.c (find_tail_calls): If we don't have aliases
768         computed check stmt_ann->references_memory instead of counting
769         virtual operands.
770  
771 2007-09-08  Segher Boessenkool  <segher@kernel.crashing.org>
772
773         * cse.c (fold_rtx): Use validate_unshare_change() instead of
774         validate_change() in one more case.
775
776 2007-09-08  Zdenek Dvorak  <ook@ucw.cz>
777
778         PR tree-optimization/32283
779         * tree-ssa-loop-ivopts.c (may_eliminate_iv): Use
780         estimated_loop_iterations.
781         (determine_use_iv_cost_condition): Decrease cost of expressions
782         used in iv elimination.
783
784 2007-09-08  Richard Guenther  <rguenther@suse.de>
785
786         * tree-cfg.c (verify_gimple_expr): Avoid building new
787         pointer types, use TYPE_POINTER_TO if available instead.
788
789 2007-09-08  Uros Bizjak  <ubizjak@gmail.com>
790
791         PR target/33329
792         PR rtl-optimization/26449
793         * config/i386/sse.md (mulv4si3): Do not expand sse2 sequence.
794         (*sse2_mulv4si3): New define_insn_and_split pattern. Split insn in
795         split1 pass.
796         (mulv16qi3): Implement as define_insn_and_split pattern instead of
797         define_expand.  Split insn in split1 pass.
798         (mulv2di3): Ditto.
799
800 2007-09-08  Dorit Nuzman  <dorit@il.ibm.com>
801
802         PR tree-optimization/33301
803         * tree-vect-analyze (analyze_operations): Look at the type of the rhs
804         when relevant.
805
806 2007-09-07  Zdenek Dvorak  <ook@ucw.cz>
807
808         PR tree-optimization/32183
809         * Makefile.in (tree-ssa-reassoc.o): Also depend on $(CFGLOOP_H).
810
811         * tree-ssa-reassoc.c: Include cfgloop.h.
812         (is_reassociable_op): Add a loop argument and return true only
813         for inside loop.
814         (linearize_expr): Updated.
815         (should_break_up_subtract): Likewise.
816         (linearize_expr_tree): Likewise.
817         (init_reassoc): Call loop_optimizer_init with
818         AVOID_CFG_MODIFICATIONS.  Remove calculate_dominance_info call
819         with CDI_DOMINATORS.
820         (fini_reassoc): Call loop_optimizer_finalize.
821
822 2007-09-07  Sterling Augustine  <sterling@tensilica.com>
823
824         * config/xtensa/lib2funcs.S (__xtensa_sync_caches): Use an ISYNC even
825         if there is no i-cache.
826
827 2007-09-07  Richard Guenther  <rguenther@suse.de>
828
829         Reapply
830         2007-09-06  Richard Guenther  <rguenther@suse.de>
831
832         PR tree-optimization/32586
833         * tree-ssa-sccvn.c (simplify_binary_expression): Avoid
834         folding if nothing changed.
835         (simplify_unary_expression): New function.  Do tree combining
836         on conversion like codes.
837         (try_to_simplify): Call it.
838
839 2007-09-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
840
841         PR target/33286
842         * gthr-posix.h (__gthread_active_p): Add implementation for hppa-hpux.
843         (__gthread_active,__gthread_start, __gthread_active_init): New.
844         * gthr-posix95.h: Likewise.
845
846 2007-09-07  Roman Zippel <zippel@linux-m68k.org>
847
848         * function.h (struct function): Rename calls_unwind_init
849         to saves_all_registers.
850         (current_function_saves_all_registers): Renamed from
851         current_function_calls_unwind_init.
852         * reload1.c (reload): Set current_function_saves_all_registers.
853         * except.c (expand_builtin_unwind_init): Likewise.
854         * config/m68k/m68k.c (m68k_save_reg): Use
855         current_function_saves_all_registers to save pic register.
856
857 2007-09-07  Janis Johnson  <janis187@us.ibm.com>
858
859         config/m68k/m68k.c (floating_exact_log2): Update call to real_2expN.
860         config/s390/s390.md (fixuns_trunc<BFP:mode><GPR:mode>2): Ditto.
861
862         Reapply reverted changes:
863
864         2007-09-06  Jan Hubicka  <jh@suse.cz>
865  
866         * config/i386.c (ix86_expand_lround, ix86_expand_round): Update call of
867         real_2expN.
868
869         2007-09-06  Richard Sandiford  <richard@codesourcery.com>
870
871         * config/mips/mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2)
872         (fixuns_truncsfsi2, fixuns_truncsfdi2): Update calls to real_2expN.
873
874         2007-09-05  Janis Johnson  <janis187@us.ibm.com>
875
876         * optabs.c (expand_float): Convert unsigned integer as signed only
877         if it provides sufficient accuracy; add mode argument to real_2expN.
878         (expand_fix): Fix comment typos; extend binary float into mode
879         wider than destination for converion to unsigned integer; add mode
880         argument to real_2expN.
881         * real.c (real_2expN): Add mode argument to special-case decimal
882         float values.
883         * real.h (real_2expN): Ditto.
884         * fixed-value.c (check_real_for_fixed_mode): Add mode argument to
885         real_2expN.
886         (fixed_from_string): Ditto.
887         (fixed_to_decimal): Ditto.
888         (fixed_convert_from_real): Ditto.
889         (real_convert_from_fixed): Ditto.
890         * config/rs6000/rs6000.md (FP): Include DD and TD modes.
891         * config/rs6000/dfp.md (extendddtd2, adddd3, addtd3, subdd3, subtd3,
892         muldd3, multd3, divdd3, divtd3, cmpdd_internal1, cmptd_internal1,
893         floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixddi2): New.
894
895 2007-09-07  Diego Novillo  <dnovillo@google.com>
896
897         * tree-flow.h (const_block_stmt_iterator): Remove.
898         Update all users to use block_stmt_iterator.
899         * tree-iterator.h (const_tree_stmt_iterator): Remove.
900         Update all users to use tree_stmt_iterator.
901
902 2007-09-07  Sandra Loosemore  <sandra@codesourcery.com>
903
904         * config/mips/mips.c (mips_set_current_function): Temporarily
905         make this a no-op to fix bootstrap errors, pending rewrite.
906
907 2007-09-07  Jan Hubicka  <jh@suse.cz>
908
909         * reorg.c (dbr_schedule): Move code removing placeholder USEs later
910         in the pass.
911
912 2007-09-07  Dorit Nuzman  <dorit@il.ibm.com>
913
914         PR tree-optimization/33299
915         * tree-vect-transform.c (vect_create_epilog_for_reduction): Update
916         uses for all relevant loop-exit phis, not just the first.
917
918 2007-09-07  Richard Guenther  <rguenther@suse.de>
919
920         PR middle-end/33330
921         * tree-ssa-operands.c (access_can_touch_variable): An access
922         of the form (*p)[0] can touch a variable of same size.
923
924 2007-09-07  Jan Hubicka  <jh@suse.cz>
925
926         * passes.c (init_optimization_passes): Add simple dce and addressable
927         passes.
928         * tree-ssa.c (execute_update_addresses_taken): New function.
929         (pass_update_address_taken): New.
930         * tree-ssa-dse.c (execute_simple_dse): New function.
931         (pass_simple_dse): New.
932         * tree-pass.h (pass_simple_dse, pass_update_address_taken): Declare.
933
934 2007-09-07  Tobias Burnus  <burnus@net-b.de>
935
936         PR middle-end/33321
937         * doc/invoke.texi: Fix -Wstrict-overflow= table.
938
939 2007-09-07  Richard Guenther  <rguenther@suse.de>
940
941         Revert
942         2007-09-06  Richard Guenther  <rguenther@suse.de>
943
944         PR tree-optimization/32586
945         * tree-ssa-sccvn.c (simplify_binary_expression): Avoid
946         folding if nothing changed.
947         (simplify_unary_expression): New function.  Do tree combining
948         on conversion like codes.
949         (try_to_simplify): Call it.
950
951 2007-09-07  Richard Guenther  <rguenther@suse.de>
952             Uros Bizjak  <ubizjak@gmail.com>
953
954         PR tree-optimization/32821
955         * tree_if_conv.c (combine_blocks): Use alloc_stmt_list instead of
956         NULL in the call to set_bb_stmt_list.
957
958 2007-09-07  Richard Sandiford  <richard@codesourcery.com>
959
960         * config/mips/mips.c (build_mips16_call_stub): Emit all direct
961         float calls here, rather than leaving some to the caller.
962         Use call_internal_direct and call_value_internal_direct.
963         * config/mips/mips.md (call_internal_direct): New pattern.
964         (call_value_internal_direct): Likewise.
965
966 2007-09-07  Richard Sandiford  <richard@codesourcery.com>
967
968         * config/mips/mips.c (mips_base_move_loop_invariants): New variable.
969         (mips_set_mips16_mode): Restore flag_move_loop_invariants, then set
970         to 0 for MIPS16.
971         (override_options): Set mips_base_move_loop_invariants.
972
973 2007-09-07  Richard Sandiford  <richard@codesourcery.com>
974
975         * config/mips/mips.opt (mcode-readable=): Move to keep list
976         alphabetical.
977
978 2007-09-07  Richard Sandiford  <richard@codesourcery.com>
979
980         * doc/invoke.texi: Document the MIPS -mlocal-sdata, -mextern-sdata
981         and -mgpopt options.  Adjust the -G documentation to match.
982         * config/mips/mips.opt (mextern-data, mgpopt, mlocal-data): New.
983         * config/mips/mips.c (mips_rtx_constant_in_small_data_p): New
984         function, split out from mips_classify_symbol.  Return false for
985         !TARGET_LOCAL_SDATA.
986         (mips_classify_symbol): Call mips_rtx_constant_in_small_data_p.
987         Only use GP-relative accesses for non-pool symbols if TARGET_GPOPT.
988         (override_options): Check whether the -mgpopt setting is consistent
989         with the other flags.
990         (symbolic_expression_p): Delete.
991         (mips_select_rtx_section): Use mips_rtx_constant_in_small_data_p
992         and default_elf_select_rtx_section.
993         (mips_in_small_data_p): Honor section attributes for MIPS16 too.
994         Return false for local data unless TARGET_LOCAL_SDATA.  Likewise
995         external data and TARGET_EXTERN_SDATA.
996
997 2007-09-07  Tobias Burnus  <burnus@net-b.de>
998
999         PR fortran/33303
1000         * doc/cpp.texi (Common Predefined Macros): Add __GFORTRAN__.
1001
1002 2007-09-05  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1003
1004         * regrename.c (copyprop_hardreg_forward_1): New variable next. Use
1005         FOR_BB_INSNS_SAFE instead of for loop.
1006         * cse.c (cse_extended_basic_block): Likewise.
1007         * postreload.c (reload_cse_regs_1): New variable next. Make sure
1008         that the for loop does not invoke NEXT_INSN on a deleted insn.
1009         * function.c (instantiate_virtual_regs): Likewise.
1010         * lower-subreg.c (remove_retval_note): Likewise.
1011         (decompose_multiword_subregs): Use FOR_BB_INSNS_SAFE instead of
1012         FOR_BB_INSNS.
1013         * emit-rtl.c (remove_insn): Set NEXT_INSN and PREV_INSN to NULL on
1014         a deleted insn.
1015         * cfgrtl.c (delete_insn): Set JUMP_LABEL to NULL on a deleted
1016         insn, if it's a jump.
1017         (try_redirect_by_replacing_jump): New variable jump_p. Call
1018         tablejump_p before delete_insn_chain.
1019         * reload1.c (reload): New variable next. Make sure that the for
1020         loop does not invoke NEXT_INSN on a deleted insn.
1021         (fixup_eh_region_note): Make the loop terminate if i becomes NULL.
1022         (delete_output_reload): New variable prev. Make sure the the for
1023         loops do not invoke PREV_INSN on a deleted insn.
1024
1025 2007-09-06  Zdenek Dvorak  <ook@ucw.cz>
1026
1027         * cgraphbuild.c (rebuild_cgraph_edges): Export.
1028         * cgraph.h (rebuild_cgraph_edges): Declare.
1029         * tree-pass.h (pass_expand_omp_ssa): New.
1030         * omp-low.c (find_omp_clause): Export.
1031         (copy_var_decl): Split from omp_copy_decl_2.
1032         (build_omp_barrier): Return the call to emit instead of emitting
1033         it directly.
1034         (lower_rec_input_clauses, expand_omp_single): Gimplify the result of
1035         build_omp_barrier.
1036         (extract_omp_for_data, expand_parallel_call, expand_omp_parallel,
1037         expand_omp_for_generic, expand_omp_for_static_nochunk,
1038         expand_omp_for_static_chunk, expand_omp_for, expand_omp_sections):
1039         Adapted to work on SSA form.
1040         (execute_expand_omp): Do not invalidate dominance information.
1041         (gate_expand_omp): Do not run with -fopenmp-ssa flag.
1042         (gate_expand_omp_ssa, pass_expand_omp_ssa): New.
1043         * gimplify.c (gimplify_omp_for): Ensure that the control variable is
1044         a gimple_reg.
1045         (force_gimple_operand): Allow gimplifying code expressions without
1046         value.
1047         * tree-predcom.c (mark_virtual_ops_for_renaming): Handle phi nodes.
1048         * common.opt (fopenmp-ssa): New.
1049         * tree-flow.h (find_omp_clause, copy_var_decl): Declare.
1050         * Makefile.in (tree-cfg.o): Add TREE_INLINE_H dependency.
1051         * tree-cfg.c: Include tree-inline.h.
1052         (struct move_stmt_d): Replace vars_to_remove by vars_map field.
1053         (replace_by_duplicate_decl, replace_ssa_name,
1054         mark_virtual_ops_in_region): New functions.
1055         (move_stmt_r, move_block_to_fn, move_sese_region_to_fn): Adapted
1056         to work on SSA form.
1057         * passes.c (init_optimization_passes): Add pass_expand_omp_ssa pass.
1058         * tree-ssa-operands.c (get_expr_operands): Handle operands of OMP
1059         constructs.
1060
1061 2007-09-06  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1062
1063         * tree-loop-linear.c: Include obstack.h.
1064         (linear_transform_loops): New obstack lambda_obstack.
1065         Initialize it, pass it to gcc_loopnest_to_lambda_loopnest,
1066         lambda_loopnest_transform, lambda_loopnest_to_gcc_loopnest calls
1067         and free afterwards.
1068         * lambda.h (struct obstack): New forward declaration.
1069         (lambda_linear_expression_new): New parameter of type struct
1070         obstack *.
1071         (lambda_loopnest_new): Likewise.
1072         (lambda_loopnest_transform): Likewise.
1073         (lambda_body_vector_new): Likewise.
1074         (lambda_body_vector_compute_new): Likewise.
1075         (gcc_loopnest_to_lambda_loopnest): Likewise.
1076         (lambda_loopnest_to_gcc_loopnest): Likewise.
1077         * lambda-code.c: Include obstack.h.
1078         (lambda_lattice_new): New parameter lambda_obstack.  Use it for
1079         allocation of ret.
1080         (lambda_body_vector_new): Likewise.
1081         (lambda_linear_expression_new): Likewise.
1082         (lambda_lattice_new): Likewise.
1083         (lambda_loopnest_new): Likewise.  Additionally use obstack to
1084         allocate LN_LOOPS(ret).
1085         (lambda_lattice_compute_base): New parameter lambda_obstack.  Pass
1086         it to lambda_lattice_new.
1087         (lambda_body_vector_compute_new): New parameter lambda_obstack.
1088         Pass it to lambda_body_vector_new.
1089         (lambda_lattice_compute_base): New paramater lambda_obstack.  Pass
1090         it to lambda_lattice_new.
1091         (compute_nest_using_fourier_motzkin): New parameter lambda_obstack.
1092         Pass it to lambda_loopnest_new, lambda_linear_expression_new.
1093         (lambda_compute_target_space): Likewise.
1094         (lambda_compute_auxillary_space): New parameter lambda_obstack.
1095         Pass it to lambda_lattice_compute_base and
1096         compute_nest_using_fourieer_motzkin.
1097         (lambda_loopnest_transform): New parameter lambda_obstack.  Pass
1098         it to lambda_lattice_compute_base, lambda_lattice_auxillary_space
1099         and lambda_lattice_compute_target_space.
1100         (gcc_tree_to_linear_expression): Nex parameter lambda_obstack.
1101         Pass it to lambda_linear_expression_new.
1102         (gcc_loop_to_lambda_loop): New parameter lambda_obstack.  Pass it
1103         to gcc_tree_to_linear_expression.
1104         (gcc_loopnest_to_lambda_loopnest): New parameter lambda_obstack.
1105         Pass it to gcc_loop_to_lambda_loop and lambda_loopnest_new.
1106         (lambda_loopnest_to_gcc_loopnest): New parameter lambda_obstack.
1107         Pass it to lambda_body_vector_new and
1108         lambda_body_vector_compute_new.
1109         * Makefile.in (tree-loop-linear.o): Add $(OBSTACK_H) dependency.
1110         (lambda-code.o): Likewise.
1111
1112 2007-09-06  Chao-ying Fu  <fu@mips.com>
1113
1114         * ginclude/stdfix.h: New file.
1115         * Makefile.in (USER_H): Add $(srcdir)/ginclude/stdfix.h.
1116         (convert.o): Add dependence on fixed-value.h.
1117         * c-convert.c (convert): Support FIXED_POINT_TYPE.
1118         * c-cppbuiltin.c (builtin_define_fixed_point_constants): New function
1119         to define fixed-point constants.
1120         (c_cpp_builtins): Define fixed-point constants.
1121         * convert.c (fixed-value.h): New include.
1122         (convert_to_real): Update comment to include fixed-point.
1123         Support FIXED_POINT_TYPE.
1124         (convert_to_integer): Update comment to include fixed-point.
1125         Support FIXED_POINT_TYPE.
1126         (convert_to_complex): Support FIXED_POINT_TYPE.
1127         (convert_to_fixed): New function.
1128         * convert.h (convert_to_fixed): Declare.
1129         * genopinit.c: Add comment about $Q for only fixed-point modes.
1130         (optabs): Add fract_optab, fractuns_optab, satfract_optab,
1131         satfractuns_optab, add_optab, ssadd_optab, usadd_optab, sub_optab,
1132         sssub_optab, ussub_optab, smul_optab, ssmul_optab, usmul_optab,
1133         ssmadd_widen_optab, usmadd_widen_optab, ssdiv_optab, udiv_optab,
1134         usdiv_optab, ssashl_optab, usashl_optab, neg_optab, ssneg_optab,
1135         usneg_optab for fixed-point modes.
1136         (gen_insn): Add force_fixed to track the $Q format for all fixed-point
1137         modes.
1138         * optabs.c (optab_for_tree_code): For *DIV_EXPR, LSHIFT_EXPR,
1139         PLUS_EXPR, MINUS_EXPR, MULT_EXPR, NEGATE_EXPR, return signed or
1140         unsigned saturation optabs, when type is saturating.
1141         (shift_optab_p): Return true for SS_ASHIFT or US_ASHIFT.
1142         (expand_fixed_convert): New function.
1143         (gen_fixed_libfunc, gen_signed_fixed_libfunc,
1144         gen_unsigned_fixed_libfunc, gen_int_fp_fixed_libfunc,
1145         gen_int_fp_signed_fixed_libfunc, gen_int_fixed_libfunc,
1146         gen_int_signed_fixed_libfunc, gen_int_unsigned_fixed_libfunc,
1147         gen_fract_conv_libfunc, gen_fractuns_conv_libfunc,
1148         gen_satfract_conv_libfunc, gen_satfractuns_conv_libfunc): New
1149         functions.
1150         (init_optabs): Initialize ssadd_optab, usadd_optab, sssub_optab,
1151         ussub_optab, ssmul_optab, usmul_optab, ssmadd_widen_optab,
1152         usmadd_widen_optab, ssmsub_widen_optab, usmsub_widen_optab,
1153         ssdiv_optab, usdiv_optab, ssashl_optab, usashl_optab, ssneg_optab,
1154         usneg_optab, fract_optab, fractuns_optab, satfract_optab,
1155         satfractuns_optab.
1156         Initialize fixed-point libraries, including add, ssadd, usadd, sub,
1157         sssub, ussub, mul, ssmul, usmul, div, ssdiv, udiv, usdiv, ashl,
1158         ssashl, usashl, ashr, lshr, neg, ssneg, usneg, cmp, fract, satfract,
1159         fractuns, satfractuns.
1160         * optabs.h (enum optab_index): Add OTI_ssadd, OTI_usadd, OTI_sssub,
1161         OTI_ussub, OTI_ssmul, OTI_usmul, OTI_ssdiv, OTI_usdiv, OTI_ssneg,
1162         OTI_usneg, OTI_ssashl, OTI_usashl, OTI_ssmadd_widen, OTI_usmadd_widen,
1163         OTI_ssmsub_widen,  OTI_usmsub_widen.
1164         (ssadd_optab, usadd_optab, sssub_optab, ussub_optab, ssmul_optab,
1165         usmul_optab, ssdiv_optab, usdiv_optab, ssneg_optab, usneg_optab,
1166         ssashl_optab, usashl_optab, ssmadd_widen_optab, usmadd_widen_optab,
1167         umsub_widen_optab, usmsub_widen_optab): Define.
1168         (enum convert_optab_index): Add COI_fract, COI_fractuns, COI_satfract,
1169         COI_satfractuns.
1170         (fract_optab, fractuns_optab, satfract_optab, satfractuns_optab):
1171         Define.
1172         (expand_fixed_convert): Declare.
1173         * expr.c (convert_move): Support the move of fixed-point modes.
1174         (emit_move_insn_1): Handle fixed-point mode to move via integer.
1175         (categorize_ctor_elements_1): Handle FIXED_CST.
1176         (count_type_elements): Handle FIXED_POINT_TYPE.
1177         (expand_expr_real_1): For VECTOR_CST, check MODE_VECTOR_FRACT,
1178         MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
1179         Support FIXED_CST.
1180         For PLUS_EXPR and MINUS_EXPR, support saturating and non-saturating
1181         multiply and add/subtract for fixed-point types.
1182         For MULT_EXPR, *DIV_EXPR, *SHIFT_EXPR, if the mode if a fixed-point
1183         mode, we jump to binop directly.
1184         Support FIXED_CONVERT_EXPR.
1185         (do_store_flag): Check FIXED_CST to put a constant second.
1186         (vector_mode_valid_p): Handle MODE_VECTOR_FRACT,
1187         MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
1188         (const_vector_from_tree): Support FIXED_CST.
1189         * doc/extend.texi (Fixed-Point): New node.
1190         * doc/md.texi (ssadd, usadd, sssub, ussub, ssmul, usmul, ssdiv, usdiv,
1191         ssmadd, usmadd, ssmsub, usmsub, ssashl, usashl, ssneg, usneg, fract,
1192         satfract, fractuns, satfractuns): Document them.
1193
1194 2007-09-07  Bernd Schmidt  <bernd.schmidt@analog.com>
1195
1196         * config/bfin/bfin.h (PREFERRED_RELOAD_CLASS): Don't reload autoinc
1197         addresses into I registers.
1198
1199 2007-09-06  Jan Hubicka  <jh@suse.cz>
1200             Andreas Tobler  <a.tobler@schweiz.org>
1201
1202         * config/darwin.c (machopic_indirect_data_reference): Avoid invalid
1203         sharing.
1204         (machopic_legitimize_pic_address): Likewise.
1205
1206 2007-09-06  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1207             Jan Hubicka  <jh@suse.cz>
1208
1209         * config/spu/spu.md (floatsidf2): Use convert_optab_libfunc
1210         instead of ufloat_optab->handlers directly.
1211         (floatdidf2): Likewise.
1212
1213 2007-09-06  Sandra Loosemore  <sandra@codesourcery.com>
1214
1215         * config/mips/mips.c:  Include diagnostic.h.
1216         (mips_set_current_function): Check errorcount and sorrycount 
1217         before generating RTL.
1218
1219 2007-09-06  Richard Sandiford  <richard@codesourcery.com>
1220
1221         PR target/33256
1222         * config/mips/mips.c (mips_classify_symbolic_expression): New function.
1223         (mips_classify_address): Use it instead of mips_symbolic_constant_p.
1224         (print_operand_reloc): Likewise.
1225
1226 2007-09-06  Janis Johnson  <janis187@us.ibm.com>
1227
1228         Revert:
1229
1230         2007-09-06  Jan Hubicka  <jh@suse.cz>
1231  
1232         * i386.c (ix86_expand_lround, ix86_expand_round): Update call of
1233         real_2expN.
1234
1235         2007-09-06  Richard Sandiford  <richard@codesourcery.com>
1236
1237         * config/mips/mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2)
1238         (fixuns_truncsfsi2, fixuns_truncsfdi2): Update calls to real_2expN.
1239
1240         2007-09-05  Janis Johnson  <janis187@us.ibm.com>
1241
1242         * optabs.c (expand_float): Convert unsigned integer as signed only
1243         if it provides sufficient accuracy; add mode argument to real_2expN.
1244         (expand_fix): Fix comment typos; extend binary float into mode
1245         wider than destination for converion to unsigned integer; add mode
1246         argument to real_2expN.
1247         * real.c (real_2expN): Add mode argument to special-case decimal
1248         float values.
1249         * real.h (real_2expN): Ditto.
1250         * fixed-value.c (check_real_for_fixed_mode): Add mode argument to
1251         real_2expN.
1252         (fixed_from_string): Ditto.
1253         (fixed_to_decimal): Ditto.
1254         (fixed_convert_from_real): Ditto.
1255         (real_convert_from_fixed): Ditto.
1256         * config/rs6000/rs6000.md (FP): Include DD and TD modes.
1257         * config/rs6000/dfp.md (extendddtd2, adddd3, addtd3, subdd3, subtd3,
1258         muldd3, multd3, divdd3, divtd3, cmpdd_internal1, cmptd_internal1,
1259         floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixddi2): New.
1260
1261 2007-09-06  Tom Tromey  <tromey@redhat.com>
1262
1263         * tree-cfg.c (remove_bb): Only warn if line is non-zero.
1264         * c-pch.c (c_common_read_pch): Restore current location after
1265         reading PCH file.
1266         * tree.c (expand_location): Update.
1267         (expr_filename): Changed return type.  Unified the two cases.
1268         (expr_lineno): Likewise.
1269         (annotate_with_file_line): Don't use EXPR_LINENO and EXPR_FILENAME
1270         as lvalues.
1271         * toplev.c (line_table): Changed type.
1272         (general_init): Update.
1273         (realloc_for_line_map): New function.
1274         (general_init): Allocate line_table using GC.
1275         * fix-header.c (line_table): Changed type.
1276         (read_scan_file): Update.
1277         (read_scan_file): Update.
1278         * c-ppoutput.c (maybe_print_line): Update.
1279         (print_line): Update.
1280         (cb_line_change): Update.
1281         (cb_define): Update.
1282         (pp_file_change): Update.
1283         * c-opts.c (c_common_init_options): Update.
1284         (finish_options): Update.
1285         (push_command_line_include): Update.
1286         * c-lex.c (cb_line_change): Update.
1287         (cb_def_pragma): Update.
1288         (cb_define): Update.
1289         (cb_undef): Update.
1290         (c_lex_with_flags): Use cpp_get_token_with_location.
1291         * input.h (line_table): Changed type.
1292         (location_from_locus): New macro.
1293         * tree.h (EXPR_FILENAME): No longer an lvalue.
1294         (EXPR_LINENO): Likewise.
1295         (expr_locus, set_expr_locus): Declare separately for
1296         USE_MAPPED_LOCATION.
1297         (expr_filename, expr_lineno): Changed return type.
1298         * gimplify.c (tree_to_gimple_tuple): Use SET_EXPR_LOCUS.
1299         * cfgexpand.c (expand_gimple_cond_expr): Use location_from_locus.
1300         (expand_gimple_basic_block): Likewise.
1301         * final.c (final_scan_insn): Use expanded_location.
1302
1303 2007-09-06  Richard Guenther  <rguenther@suse.de>
1304
1305         PR tree-optimization/32586
1306         * tree-ssa-sccvn.c (simplify_binary_expression): Avoid
1307         folding if nothing changed.
1308         (simplify_unary_expression): New function.  Do tree combining
1309         on conversion like codes.
1310         (try_to_simplify): Call it.
1311         * builtins.c (fold_builtin_cexp): Fold the built expressions.
1312         * fold-const.c (fold_unary): Test result of get_callee_fndecl().
1313
1314 2007-09-06  Jan Hubicka  <jh@suse.cz>
1315
1316         PR target/33318
1317         * cse.c (fold_rtx): Avoid invalid sharing.
1318
1319 2007-09-06  Richard Sandiford  <richard@codesourcery.com>
1320
1321         * config/mips/mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2)
1322         (fixuns_truncsfsi2, fixuns_truncsfdi2): Update calls to real_2expN.
1323
1324 2007-09-06  Revital Eres  <eres@il.ibm.com>
1325
1326         * config/rs6000/rs6000.c (rs6000_legitimate_offset_address_p):
1327         Fix offsettable memory reference for 750CL.
1328
1329 2007-09-06  Pat Haugen  <pthaugen@us.ibm.com>
1330
1331         * reload.c (find_reloads_address_1): Try to preserve original
1332         base/index regclass of operands.
1333         * regrename.c (scan_rtx_address): Likewise.
1334         (replace_oldest_value_addr): Likewise.
1335
1336 2007-09-06  Richard Guenther  <rguenther@suse.de>
1337
1338         PR tree-optimization/33302
1339         * domwalk.c (walk_dominator_tree): The exit block is
1340         interesting even if it is not reachable.
1341
1342 2007-09-06  Richard Sandiford  <richard@codesourcery.com>
1343
1344         PR middle-end/33306
1345         * optabs.c (avoid_expensive_constant): Do nothing if MODE is VOIDmode.
1346
1347 2007-09-06  Basile Starynkevitch  <basile@starynkevitch.net>
1348
1349         * cfg.c (dump_bb_info, dump_edge_info): Added cfun test for 
1350         robustness.
1351
1352 2007-09-05  Ian Lance Taylor  <iant@google.com>
1353
1354         * tree-pretty-print.c (dump_decl_name): Cast LABEL_DECL_UID to int
1355         when printing.
1356         (dump_generic_node): Likewise.
1357         * print-rtl.c (print_decl_name): Likewise.
1358         * print-tree.c (print_node_brief): Likewise.
1359         (print_node): Likewise.
1360         * Makefile.in (RTL_BASE_H): Add alias.h.
1361         (TREE_H): Likewise.
1362
1363 2007-09-06  Jesper Nilsson  <jesper.nilsson@axis.com>
1364
1365         * longlong.h [__CRIS_arch_version >= 8] (count_trailing_zeros):
1366         Defined.
1367         * config/cris/cris.md (ctzsi2, cris_swap_bits): Implemented.
1368         * config/cris/cris.h (CTZ_DEFINED_VALUE_AT_ZERO): Defined.
1369
1370 2007-09-06  Jie Zhang  <jie.zhang@analog.com>
1371
1372         * config.gcc (tm_file): Add linux.h for bfin*-uclinux*.
1373         (tm_defines): Define UCLIBC_DEFAULT to 1.
1374         (extra_options): Add linux.opt.
1375         * config/bfin/linux.h (CPLUSPLUS_CPP_SPEC): Don't define.
1376         (CRT_CALL_STATIC_FUNCTION): Likewise.
1377         (NO_IMPLICIT_EXTERN_C): Likewise.
1378         (TARGET_OS_CPP_BUILTINS): Define as LINUX_TARGET_OS_CPP_BUILTINS.
1379         * config/bfin/elf.h (OBJECT_FORMAT_ELF): Don't define.
1380         * config/bfin/uclinux.h (CPLUSPLUS_CPP_SPEC): Don't define.
1381         (ENDFILE_SPEC): Don't define.
1382         (LIB_SPEC): Likewise.
1383         (CRT_CALL_STATIC_FUNCTION): Likewise.
1384         (NO_IMPLICIT_EXTERN_C): Likewise.
1385         (LINUX_TARGET_OS_CPP_BUILTINS): Likewise.
1386         (TARGET_OS_CPP_BUILTINS): Define as LINUX_TARGET_OS_CPP_BUILTINS.
1387
1388 2007-09-06  Jan Hubicka  <jh@suse.cz>
1389
1390         * i386.c (ix86_expand_lround, ix86_expand_round): Update call of
1391         real_2expN.
1392
1393 2007-09-06  Jan Hubicka  <jh@suse.cz>
1394
1395         * opts.c (common_handle_option): Enable inlining functions for
1396         -fprofile-generate.
1397
1398 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
1399
1400         * builtin-attrs.def (ATTR_NONNULL_3): New.
1401         (DEF_FORMAT_ATTRIBUTE): Use just ATTR_NONNULL_##FA instead of
1402         ATTR_NOTHROW_NONNULL_##FA.
1403         (DEF_FORMAT_ATTRIBUTE_NOTHROW, DEF_FORMAT_ATTRIBUTE_BOTH): New macros.
1404         (ATTR_FORMAT_PRINTF_NOTHROW_2_0, ATTR_PRINTF_NOTHROW_2_3,
1405         ATTR_FORMAT_PRINTF_NOTHROW_3_0, ATTR_FORMAT_PRINTF_NOTHROW_3_4,
1406         ATTR_FORMAT_PRINTF_NOTHROW_4_0, ATTR_PRINTF_NOTHROW_4_5,
1407         ATTR_FORMAT_PRINTF_NOTHROW_5_0, ATTR_FORMAT_PRINTF_NOTHROW_5_6,
1408         ATTR_FORMAT_SCANF_NOTHROW_2_0, ATTR_FORMAT_SCANF_NOTHROW_2_3,
1409         ATTR_FORMAT_STRFTIME_NOTHROW_3_0, ATTR_FORMAT_STRFMON_NOTHROW_3_4):
1410         New.
1411         (ATTR_FORMAT_PRINTF_4_0, ATTR_PRINTF_4_5, ATTR_FORMAT_PRINTF_5_0,
1412         ATTR_FORMAT_PRINTF_5_6, ATTR_FORMAT_STRFTIME_3_0,
1413         ATTR_FORMAT_NOTHROW_3_4): Remove.
1414         * builtins.def (snprintf, sprintf, sscanf, vsnprintf, vsprintf,
1415         vsscanf, strfmon, strftime, __snprintf_chk, __sprintf_chk,
1416         __vsnprintf_chk, __vsprintf_chk): Use ATTR_FORMAT_*_NOTHROW_*
1417         instead of ATTR_FORMAT_*_*.
1418
1419 2007-09-06  Hans-Peter Nilsson  <hp@axis.com>
1420
1421         * config/cris/cris.c (cris_emit_movem_store): Call copy_rtx on
1422         parts re-used for REG_FRAME_RELATED_EXPR.
1423
1424 2007-09-05  Janis Johnson  <janis187@us.ibm.com>
1425
1426         * optabs.c (expand_float): Convert unsigned integer as signed only
1427         if it provides sufficient accuracy; add mode argument to real_2expN.
1428         (expand_fix): Fix comment typos; extend binary float into mode
1429         wider than destination for converion to unsigned integer; add mode
1430         argument to real_2expN.
1431         * real.c (real_2expN): Add mode argument to special-case decimal
1432         float values.
1433         * real.h (real_2expN): Ditto.
1434         * fixed-value.c (check_real_for_fixed_mode): Add mode argument to
1435         real_2expN.
1436         (fixed_from_string): Ditto.
1437         (fixed_to_decimal): Ditto.
1438         (fixed_convert_from_real): Ditto.
1439         (real_convert_from_fixed): Ditto.
1440         * config/rs6000/rs6000.md (FP): Include DD and TD modes.
1441         * config/rs6000/dfp.md (extendddtd2, adddd3, addtd3, subdd3, subtd3,
1442         muldd3, multd3, divdd3, divtd3, cmpdd_internal1, cmptd_internal1,
1443         floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixddi2): New.
1444
1445 2007-09-05  Ian Lance Taylor  <iant@google.com>
1446
1447         * init-regs.c (initialize_uninitialized_regs): Call
1448         emit_insn_before rather than add_insn_before.
1449
1450 2007-09-05  Jakub Jelinek  <jakub@redhat.com>
1451
1452         * builtins.def (BUILT_IN_VA_ARG_PACK): New built-in.
1453         * tree.h (CALL_EXPR_VA_ARG_PACK): Define.
1454         * tree-inline.h (copy_body_data): Add call_expr field.
1455         * tree-inline.c (expand_call_inline): Initialize call_expr.
1456         (copy_bb): Append anonymous inline fn arguments to arguments
1457         when inlining a CALL_EXPR_VA_ARG_PACK call.
1458         * builtins.c (expand_builtin): Issue an error if
1459         BUILT_IN_VA_ARG_PACK is seen during expand.
1460         (fold_call_expr, fold_builtin_call_array): Don't fold
1461         CALL_EXPR_VA_ARG_PACK CALL_EXPRs or calls with
1462         __builtin_va_arg_pack () call as last argument.
1463         * gimplify.c (gimplify_call_expr): If last argument to a vararg
1464         function is __builtin_va_arg_pack (), decrease number of call
1465         arguments and instead set CALL_EXPR_VA_ARG_PACK on the CALL_EXPR.
1466         * expr.c (expand_expr_real_1): Issue an error if
1467         CALL_EXPR_VA_ARG_PACK CALL_EXPR is seen during expand.
1468         * tree-pretty-print.c (dump_generic_node): Handle printing
1469         CALL_EXPR_VA_ARG_PACK bit on CALL_EXPRs.
1470         * doc/extend.texi (__builtin_va_arg_pack): Document.
1471
1472 2007-09-05  Adam Nemet  <anemet@caviumnetworks.com>
1473
1474         PR tree-optimization/21513
1475         * builtins.c (build_builtin_expect_predicate): New function.
1476         (fold_builtin_expect): Add argument for expected value.
1477         Distribute __builtin_expect over short-circuiting operations.
1478         Fold nested builtin_expects.
1479         (fold_builtin_2): Adjust call to fold_builtin_expect.
1480
1481 2007-09-05  Rask Ingemann Lambertsen  <rask@sygehus.dk>
1482
1483         PR web/32965
1484         PR tree-optimization/13756
1485         * doc/invoke.texi (Options That Control Optimization): Document
1486         -ftree-dse.
1487
1488 2007-09-05  Uros Bizjak  <ubizjak@gmail.com>
1489
1490         * gcc/config/i386/cpuid.h: New file.
1491         * gcc/config/i386/driver-i386.c: Include cpuid.h.
1492         (describe_cache): Shrink size and line strings to 100 bytes.
1493         (detect_caches_amd): Return "" for unsupported max_ext_level.
1494         Use __cpuid function.
1495         (detect_caches_intel): Return "" for unsupported max_level.
1496         Use __cpuid function.
1497         (host_detect_local_cpu): Change feature flag variables to
1498         unsigned int.  Initialize only extended feature flag variables.
1499         Use __get_cpuid_max to determine max supported cpuid level.
1500         Use __cpuid function to determine supported features.  Fix
1501         calculation of family id.  Remove is_amd and check signature
1502         directly.  Check for Geode signature.  Handle family 4 id.
1503         [PROCESSOR_GENERIC32]: New default for unknown family id.  Move
1504         cpu discovery code to lower part of the function.
1505         [PROCESSOR_PENTIUM, PROCESSOR_K6, PROCESSOR_ATHLON]: Do not tune
1506         for sub-architecture.
1507         [PROCESSOR_PENTIUMPRO]: Simplify cpu discovery code.
1508         [PROCESSOR_K8]: Add k8-sse3 architecture.
1509         [PROCESSOR_NOCONA]: Remove.
1510         [PROCESSOR_GENERIC64]: Ditto.
1511         * gcc/config/i386/x-i386 (driver-i386.o): Depend on cpuid.h.
1512         * gcc/config/i386/crtfastmath.c: Include cpuid.h.  Use __get_cpuid
1513         to check for SSE and FXSAVE support.
1514         * gcc/config/i386/t-crtfm (crtfastmath.o): Depend on cpuid.h.
1515         Add -minline-all-stringops.
1516         * gcc/config.gcc (i[34567]86-*-*): Add cpuid.h to extra_headers.
1517         (x86_64-*-*): Ditto.
1518
1519 2007-09-05  Jie Zhang  <jie.zhang@analog.com>
1520
1521         * config/bfin/linux-unwind.h: New file.
1522         * config/bfin/linux.h (MD_UNWIND_SUPPORT): Define.
1523         * config/bfin/uclinux.h (MD_UNWIND_SUPPORT): Define.
1524
1525 2007-09-05  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1526
1527         * Makefile.in (stmt.o): Add alloc-pool.h dependency.
1528         * stmt.c: Include alloc-pool.h.
1529         (struct case_node): Remove GTY marker.
1530         (add_case_node): New parameter case_node_pool.  Use it for
1531         allocation of r.
1532         (expand_case): New allocation pool case_node_pool.  Initialize it,
1533         pass to add_case_node and free it.
1534
1535 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
1536             David Ung  <davidu@mips.com>
1537             Nigel Stephens <nigel@mips.com>
1538
1539         Add mips16/nomips16 function attributes and -mflip-mips16 option
1540         for testing mixed-mode compilation.
1541
1542         * config/mips/mips.opt (mflip-mips16): New.
1543
1544         * config/mips/mips.h (SYMBOL_FLAG_MIPS16_FUNC): Define.
1545         (SYMBOL_FLAG_MIPS16_FUNC_P): Define.
1546
1547         * config/mips/mips.c (mips_base_target_flags): New.
1548         (mips_base_mips16): New.
1549         (mips_base_schedule_insns): New.
1550         (mips_base_reorder_blocks_and_partition): New.
1551         (mips_base_align_loops): New.
1552         (mips_base_align_jumps): New.
1553         (mips_base_align_functions): New.
1554         (mips16_flipper): New.
1555         (mips_attribute_table): Add "mips16" and "nomips16" entries.
1556         (TARGET_SET_CURRENT_FUNCTION): Define.
1557         (mips_mips16_type_p, mips_nomips16_type_p): New.
1558         (mips_comp_type_attributes): Check mips16/nomips16 attributes.
1559         (mips_function_ok_for_sibcall): Make it deal with functions with
1560         mips16 attributes.
1561         (mips_init_split_addresses): New, split out from override_options.
1562         (mips_init_relocs): New, split out from override_options.
1563         (was_mips16_p): New.
1564         (mips_set_mips16_mode): New, split out from override_options.
1565         (mips_set_current_function): New.
1566         (override_options): Add sorry for unsupported mips16/pic
1567         combination.  Remove error for mips16/dsp combination.  Save
1568         base option settings.  
1569         (mips_file_start): Move mips16 mode setting output from here....
1570         (mips_output_function_prologue): ....to here.
1571         (mips_output_mi_thunk): Check for mips16 function.
1572         (build_mips16_function_stub): Don't set .mips16 here.
1573         (build_mips16_call_stub): Likewise.
1574         (mips_expand_builtin): Error in mips16 mode.
1575         (mips_use_mips16_mode_p): New.
1576         (mips_encode_section_info): Check for mips16 function, and set
1577         SYMBOL_REF_FLAGS accordingly.
1578
1579         * doc/extend.texi (Function Attributes): Document new
1580         mips16/nomips16 attributes.
1581         * doc/invoke.texi (Option Summary): Add -mflip-mips16.
1582         (MIPS Options): Document -mflip-mips16.
1583
1584 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
1585
1586         * config/mips/mips.c (mips_legitimize_tls_address): Call sorry
1587         if we encounter TLS address in MIPS16 mode.
1588         (mips_legitimize_const_move): Check cannot_force_const_mem for
1589         the (const (plus symbol offset)) case; this forces invalid TLS
1590         address in MIPS16 mode to be caught by the above call to sorry.
1591         (override_options): Don't reset targetm.have_tls in MIPS16 mode,
1592         because that now enables emutls, which is not ABI compatible
1593         with native TLS in non-MIPS16 mode.
1594
1595 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
1596
1597         Add target hook invoked when cfun changes.
1598
1599         * doc/tm.texi (TARGET_SET_CURRENT_FUNCTION): Document.
1600         * target.h (struct gcc_target): Add set_current_function.
1601         * target-def.h (TARGET_SET_CURRENT_FUNCTION): Define.
1602         (TARGET_INITIALIZER): Add initializer for set_current_function.
1603         * tree.h (push_struct_function): New.
1604         * tree-inline.h (push_cfun, pop_cfun): Move declarations to...
1605         * function.h: Here.
1606         (set_cfun): Declare.
1607         * tree-inline.c (cfun_stack, push_cfun, pop_cfun): Moved to...
1608         * function.c: Here.
1609         (push_function_context_to): Use allocate_struct_function
1610         to create null context, not init_dummy_function_start.  Use set_cfun.
1611         (pop_function_context_from): Use set_cfun.
1612         (in_dummy_function): New.
1613         (invoke_set_current_function_hook): New.
1614         (set_cfun): New.
1615         (push_cfun, pop_cfun): Use set_cfun.
1616         (push_struct_function): New.
1617         (allocate_struct_function): Call invoke_set_current_function_hook
1618         before returning.
1619         (prepare_function_start): Don't set cfun here.  Remove unused
1620         argument; fix all callers.
1621         (init_dummy_function_start): Fiddle with in_dummy_function.  Call
1622         push_struct_function.
1623         (init_function_start): Set cfun here.
1624         (expand_dummy_function_end): Fiddle with in_dummy_function.  Pop cfun.
1625         * omp-low.c (create_omp_child_function): Use push_struct_function
1626         and pop_cfun to save/restore state.
1627         (expand_omp_parallel): Remove unused saved_cfun variable.
1628         * cgraphunit.c (ipa_passes): Use set_cfun.
1629         * gimple-low.c (record_vars_into): Use push_cfun/pop_cfun here.
1630         * dwarf2out.c (dwarf2out_abstract_function): Likewise.
1631         * matrix-reorg.c (transform_allocation_sites): Likewise.
1632         (matrix_reorg): Use set_cfun.
1633         * gimplify.c (gimplify_function_tree): Use push_cfun/pop_cfun here.
1634         * tree-optimize.c (tree_rest_of_compilation): Remove one redundant
1635         assignment to cfun; use set_cfun for the other.
1636         * tree-cfg.c (move_sese_region_to_fn): Use set_cfun.
1637         (dump_function_to_file): Use push_cfun/pop_cfun here.
1638         * c-decl.c (finish_function): Use set_cfun.
1639
1640 2007-09-05  Kenneth Zadeck <zadeck@naturalbridge.com>
1641
1642         * regrename.c (rerename_optimize): Use deferred rescanning and
1643         insert explicit calls to rescan insns when changed.
1644         
1645 2007-09-05  Jan Hubicka  <jh@suse.cz>
1646
1647         * optabs.c (libfunc_entry): Change optab to integer.
1648         (hash_libfunc, convert_optab_libfunc, optab_libfunc,
1649         set_optab_libfunc, set_conv_libfunc): Use optable indexes instead
1650         of pointers for hashing.
1651
1652 2007-09-05  Jan Hubicka  <jh@suse.cz>
1653
1654         * regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharing
1655         verifier.
1656         * fwprop.c (pass_rtl_fwprop, pass_rtl_fwprop_add): Likewise.
1657         * see.c (pass_see): Likewise.
1658         * tracer.c (pass_tracer): Likewise.
1659         * postreload-gcse.c (pass_gcse2): Likewise.
1660         * postreload.c (pass_postreload_cse): Likewise.
1661         * mode-switching.c (pass_mode_switching): Likewise.
1662         * modulo-sched.c (pass_sms): Likewise.
1663         * cse.c (cse_insn): Likewise.
1664         * web.c (pass_web): Likweise.
1665         * combine-stack-adj.c (pass_stack_adjustments): Likewise.
1666         * dce.c (pass_ud_rtl_dce, pass_fast_rtl_dce): Likewise.
1667         * loop-init.c (pass_rtl_loop_init): Likewise.
1668         (pass_rtl_loop_done, pass_rtl_move_loop_, pass_rtl_unswitch,
1669         pass_rtl_unroll_and, pass_rtl_doloop): Likewise.
1670         * global.c (pass_global_alloc): Likewise.
1671         * ifcvt.c (pass_rtl_ifcvt, pass_if_after_combine,
1672         pass_if_after_reload): Likewise.
1673         * reload.c (pass_peephole2, pass_split_for_shoren_branches): Likewise.
1674         * dse.c (pass_rtl_dse1, pass_rtl_dse2): Likewise.
1675         * regmove.c (pass_regmove): Likewise.
1676         * function.c (pass_thread_prologugues_epilogues): Likewise.
1677         * gcse.c (pass_gcse): Likewise.
1678         * rtl-factoring.c (pass_rtl_seqabstr): Likewise.
1679         * lower-subreg.c (pass_lower_subreg2): Likewise.
1680         * bt-load.c (pass_branch_target_load): Likewise.
1681         * emit-rtl.c (pass_unshare_all_rtl): Likewise.
1682         * cfgcleanup.c (pass_jump, pass_jump2): Likewise.
1683         * combine.c (pass_combine): Likewise.
1684         * bb-reorder.c (pass_duplicate_comp, pass_reorder_blocks): Likewise.
1685         (pass_partition_blocks): Likewise.
1686         * var-tracking.c (pass_variable_track): Likewise.
1687         * reg-stack.c (pass_stack_regs_run): Likewise.
1688         * sched-rgn.c (pass_sched, pass_sched2): Likewise.
1689         * passes.c (pass_postreload): Likewise.
1690         (execute_function_todo): Add TODO_verify_rtl_sharing handling code.
1691         * tree-pass.h (TODO_verify_rtl_sharing): New.
1692         (TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi,
1693         TODO_update_ssa_only_virtuals, TODO_remove_unused_locals,
1694         TODO_set_props, TODO_df_finish, TODO_df_verify,
1695         TODO_mark_first_instance, TODO_rebuild_alias): Renumber.
1696
1697 2007-09-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1698
1699         * fold-const.c (all_ones_mask_p, sign_bit_p, simple_operand_p,
1700         fold_real_zero_addition_p, reorder_operands_p,
1701         div_if_zero_remainder, fold_undefer_overflow_warnings,
1702         int_binop_types_match_p, fold_convert_const_int_from_int,
1703         fold_convert_const_int_from_real,
1704         fold_convert_const_int_from_fixed,
1705         fold_convert_const_real_from_real,
1706         fold_convert_const_real_from_fixed,
1707         fold_convert_const_fixed_from_fixed,
1708         fold_convert_const_fixed_from_int,
1709         fold_convert_const_fixed_from_real, maybe_lvalue_p,
1710         fold_checksum_tree, fold_check_failed, print_fold_checksum,
1711         debug_fold_checksum, multiple_of_p): Constify.
1712         * tree-flow-inline.h (get_lineno): Likewise.
1713         * tree-flow.h (get_lineno): Likewise.
1714         * tree-object-size.c (compute_object_offset, addr_object_size,
1715         alloc_object_size, pass_through_call): Likewise.
1716         * tree-pretty-print.c (op_symbol, print_call_name,
1717         print_struct_decl, do_niy): Likewise.
1718         * tree.h (fold_undefer_overflow_warnings, multiple_of_p,
1719         debug_fold_checksum): Likewise.
1720
1721 2007-09-04  Steven Bosscher  <steven@gcc.gnu.org>
1722
1723         PR middle-end/33029
1724         * lower-subreg.c (resolve_clobber): If we remove a REG_LIBCALL
1725         note, remove the associated REG_RETVAL note.
1726
1727 2007-09-04  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1728
1729         * config.gcc (powerpc*-*-*): Install
1730         spu2vmx.h, vec_types.h, and si2vmx.h headers.
1731         * config/rs6000/spu2vmx.h: New header.
1732         * config/rs6000/si2vmx.h: New header.
1733         * config/rs6000/vec_types.h: New header.
1734
1735 2007-09-05  Ben Elliston  <bje@au.ibm.com>
1736
1737         * varasm.c (initializer_constant_valid_p): Fix comment typo.
1738
1739 2007-09-05  Ben Elliston  <bje@au.ibm.com>
1740
1741         * config/rs6000/ppu_intrinsics.h (__ldarx): Use `Z' constraint,
1742         not `m' for *ptrp.
1743         (__stdcx): Make asm volatile.
1744         (__stwcx, __stdcx): Return only 0 or 1.
1745
1746 2007-09-05  Jan Hubicka  <jh@suse.cz>
1747
1748         Revert:
1749
1750         2007-09-04  Jan Hubicka  <jh@suse.cz>
1751         * tree-tailcall.c (eliminate_tail_call): Expect unrenamed return value.
1752
1753         2007-09-04  Richard Guenther  <rguenther@suse.de>
1754         * tree-ssa-operands.c (add_virtual_operand): Only mark
1755         stores as has_volatile_ops if alias information is not available.
1756
1757 2007-09-05  Jakub Jelinek  <jakub@redhat.com>
1758
1759         * config/rs6000/tramp.asm: Include config.h.
1760         Check __PIC__ or __pic__ macro instead of SHARED.
1761
1762         PR rtl-optimization/32300
1763         * see.c (see_copy_insn): New function.
1764         (see_def_extension_not_merged, see_merge_one_use_extension,
1765         see_merge_one_def_extension): Use it.  Avoid changing
1766         PREV_INSN/NEXT_INSN chains directly, insted emit insns
1767         into sequences.  Call df_insn_delete on temporary insns
1768         that won't be emitted into the insn stream.
1769         (rest_of_handle_see): Turn off DF_DEFER_INSN_RESCAN
1770         and run df_process_deferred_rescans () before run_fast_dce.
1771
1772         PR tree-optimization/33017
1773         * tree-data-ref.c (split_constant_offset) <case SSA_NAME>: Don't
1774         recurse for pure or const function calls.
1775
1776 2007-09-04  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1777
1778         * c-format.c: Include alloc-pool.h.
1779         (check_format_info_main): New argument fwt_alloc.  Use allocation
1780         pool instead of GC.  Remove GC deallocation code.
1781         (check_format_arg): Create allocation pool, pass it to
1782         check_format_info_main and free it afterwards.
1783         * Makefile.in (c-format.o): Add alloc-pool.h dependency.
1784
1785 2007-09-05  Ben Elliston  <bje@au.ibm.com>
1786
1787         * config/rs6000/ppu_intrinsics.h (__protected_stream_count):
1788         Rename count macro arugment for clarity.
1789         (__protected_unlimited_stream_set): Pass UG=1 to __dcbt_TH1000.
1790         (__protected_stream_set): Likewise, pass 0.
1791
1792 2007-09-04  Jan Hubicka  <jh@suse.cz>
1793
1794         * tree-tailcall.c (eliminate_tail_call): Expect unrenamed return value.
1795
1796 2007-09-04  Jan Hubicka  <jh@suse.cz>
1797
1798         * invoke.texi (-finline-small-functions): Document.
1799         * ipa-inline.c (cgraph_default_inline_p): Do not use DECL_INLINE
1800         when deciding what is inlinable.
1801         (cgraph_decide_recursive_inlining): Handle flag_inline_functions.
1802         (cgraph_decide_inlining_of_small_function): Handle new flags.
1803         (cgraph_decide_inlining_incrementally): Likewise.
1804         * opts.c (decode_options): Enable flag_inline_small_functions at -O2
1805         * common.opt (finline-small-functions): New.
1806         * Makefile.in (build/gengtype.o-warn): Work around PR29478
1807
1808 2007-09-04  Richard Guenther  <rguenther@suse.de>
1809
1810         * tree-ssa-operands.c (add_virtual_operand): Only mark
1811         stores as has_volatile_ops if alias information is not available.
1812
1813 2007-09-04  Andrew Haley  <aph@redhat.com>
1814
1815         * config/arm/libgcc-bpabi.ver: Add _Unwind_Backtrace as GCC_4.3.0.
1816
1817 2007-09-04  Andrew Haley  <aph@redhat.com>
1818
1819         * config/arm/libunwind.S (UNWIND_WRAPPER _Unwind_Backtrace): New.
1820         * config/arm/unwind-arm.h (__gnu_Unwind_Backtrace): New.
1821         * config/arm/unwind-arm.c (__gnu_Unwind_Backtrace): New.
1822
1823 2007-09-04  Emmanuel Thome  <Emmanuel.Thome@inria.fr>
1824
1825         PR c++/14178
1826         * common.opt: Mention ABI version 2 in comment.
1827
1828 2007-09-04  Jan Hubicka  <jh@suse.cz>
1829
1830         * optabs.c (debug_optab_libfunc): Update; make available to gdb.
1831         (libfunc_entry): New structure.
1832         (libfunc_hash): New hashtable.
1833         (hash_libfunc): New function.
1834         (eq_libfunc): New function.
1835         (convert_optab_libfunc): New function.
1836         (optab_libfunc): New function.
1837         (expand_binop, sign_expand_binop, expand_twoval_binop_libfunc,
1838         expand_unop, prepare_cmp_insn, prepare_float_insn, gen_add2_insn,
1839         expand_float, expand_fix, new_optab, new_convert_optab):
1840          Update for new libfunc API.
1841         (init_libfunc, init_integral_libfuncs,
1842         init_floating_libfuncs, init_interclass_conv_libfuncs
1843         init_intraclass_conv_libfuncs): Remove; reorganize all logic to:
1844         (gen_libfunc, gen_int_libfunc, gen_fp_libfunc, gen_int_fp_libfunc,
1845         gen_intv_fp_libfunc, gen_interclass_conv_libfunc,
1846         gen_int_to_fp_conv_libfunc, gen_ufloat_conv_libfunc,
1847         gen_int_to_fp_nondecimal_conv_libfunc, gen_fp_to_int_conv_libfunc,
1848         gen_intraclass_conv_libfunc, gen_trunc_conv_libfunc,
1849         gen_extend_conv_libfunc): New.
1850         (init_one_libfunc): Revamp for hashtables.
1851         (set_conv_libfunc): Likewise.
1852         (init_optabs): Initialize hashtable; use lazy initialization where
1853         possible.
1854         * optabs.h (optab_handlers): Move out of GGC.
1855         (optab, convert_optab): Move out of GGC; add lazy gen info.
1856         (code_to_optab, convert_optab_table, optab_table): Move out of GGC.
1857         (optab_libfunc, convert_optab_libfunc): New.
1858         * builtins.c (expand_builtin_powi): Update for new API.
1859         * expr.c (convert_move): Likewise.
1860         * expmed.c (expand_divmod): Likewise.
1861
1862 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
1863
1864         * config/rs6000/rs6000.c (rs6000_stack_info): Allocate space for the
1865         GOT pointer only if there is a constant pool.  Use the allocated space
1866         for SPE also.
1867
1868 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
1869
1870         * config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Correct
1871         typo for AltiVec.
1872
1873 2007-09-04  Revital Eres  <eres@il.ibm.com>
1874             Richard Guenther  <rguenther@suse.de>
1875             R. Clint Whaley  <whaley@cs.utsa.edu>
1876
1877         * doc/invoke.texi (-fassociative-math, -freciprocal-math):
1878         Document new flags.
1879         * tree-tailcall.c (process_assignment): Use -fassociative-math
1880         when reodering operands of floating-point type.
1881         * fold-const.c (fold_comparison, fold_binary): Use
1882         -fassociative-math and -freciprocal-math instead of
1883         -funsafe-math-optimization flag.
1884         * toplev.h (set_unsafe_math_optimizations_flags): Declare function.
1885         * tree-ssa-math-opts.c (gate_cse_reciprocals): Use
1886         -freciprocal-math instead of -funsafe-math-optimizations.
1887         * opts.c (set_fast_math_flags): Set -freciprocal-math and
1888         -fassociative-math when -ffast-math is set.
1889         (set_unsafe_math_optimizations_flags): New Function
1890         to set -freciprocal-math and -fassociative-math when
1891         -funsafe-math-optimizations is set.
1892         (common_handle_option): Call it.
1893         * tree-vectorizer.c (vect_is_simple_reduction): Use
1894         -fassociative-math when doing reduction on floats.
1895         * loop-unroll.c (analyze_insn_to_expand_var): Use
1896         -fassociative-math when expanding an accumulator of type float.
1897         * simplify-rtx.c (simplify_binary_operation_1): Use
1898         -fassociative-math and -freciprocal-math when reordeing operands
1899         of floating-point type.
1900         * combine.c (combine_simplify_rtx): Likewise.
1901         * tree-ssa-reassoc.c (break_up_subtract_bb, reassociate_bb):
1902         Likewise.
1903         * common.opt (-fassociative-math, -freciprocal-math): New flags.
1904
1905 2007-09-04  Paolo Carlini  <pcarlini@suse.de>
1906
1907         PR c++/18608
1908         * doc/install.texi (--enable-__cxa_atexit): Fix typo.
1909
1910 2007-09-04  Jan Hubicka  <jh@suse.cz>
1911
1912         * regrename.c(copyprop_hardreg_forward_1): Unshare when doing copyprop.
1913
1914 2007-09-04  Jan Hubicka  <jh@suse.cz>
1915
1916         * regrename.c (build_def_use): Don't share RTL between MATCH_OPERATOR
1917         and corresponding MATCH_DUP.
1918
1919 2007-09-04  Uros Bizjak  <ubizjak@gmail.com>
1920
1921         PR middle-end/33187
1922         * combine.c (subst): Do not try to simplify X if it represents load
1923         of FP constant from the constant pool via float extension.
1924
1925 2007-09-04  Ben Elliston  <bje@au.ibm.com>
1926
1927         * c-opts.c: Include "tm_p.h".
1928         * Makefile.in (c-opts.o): Add $(TM_P_H) as a dependency.
1929
1930 2007-09-04  Richard Guenther  <rguenther@suse.de>
1931
1932         PR tree-optimization/33291
1933         * tree-pretty-print.c (dump_generic_node): Dump all
1934         qualifiers for pointer types, not only first.  Dump
1935         qualifiers for aggregate types as well.
1936         * tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Always
1937         use the canonical type for building ARRAY_REFs.
1938         * gimplify.c (canonicalize_addr_expr): Clean up.  The
1939         correct validness check is compatibility of the pointer
1940         types.  Always use the canonical type for building
1941         ARRAY_REFs and ADDR_EXPRs.
1942         * tree-ssa-forwprop.c (forward_propagate_addr_expr): Revert
1943         change that disabled propagation of ADDR_EXPRs into statements
1944         with volatile ops.
1945
1946 2007-09-03  Zack Weinberg  <zack@codesourcery.com>
1947
1948         * config/arm/arm.md (mulsidi3, umulsidi3, mulsi3_highpart)
1949         (umulsi3_highpart): Make into expanders; existing insns are
1950         now named *[insn]_nov6.  Add stars to existing [insn]_v6
1951         counterparts' names.
1952
1953 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
1954
1955         * Makefile.in (DRIVER_DEFINES, gcc.o, gccspec.o, protoize.o)
1956         (unprotoize.o): Remove SHLIB_MULTILIB.
1957
1958 2007-09-03  Eric Weddington  <eweddington@cso.atmel.com>
1959
1960         * doc/extend.texi: Document progmem attribute for AVR.
1961
1962 2007-09-03  Anatoly Sokolov <aesok@post.ru>
1963
1964         PR target/28902
1965         * config/avr/avr.h (TARGET_VTABLE_ENTRY_ALIGN): Define.
1966
1967 2007-09-03  Zack Weinberg  <zack@codesourcery.com>
1968
1969         * optabs.c (expand_ffs): Initialize val and defined_at_zero
1970         to avoid warnings.
1971
1972         * optabs.c: Remove unnecessary forward declarations.
1973         (expand_unop_direct): New, broken out of expand_unop.
1974         (expand_doubleword_clz): New.
1975         (expand_ctz): Move above expand_ffs.  Use
1976         start_sequence, end_sequence, add_equal_note, and
1977         expand_unop_direct.  Add more commentary.
1978         (expand_ffs): Try both ctz optab and expand_ctz.
1979         Generate a test and branch if the hardware doesn't give us
1980         a useful value for input zero.  Style improvements similar to
1981         expand_ctz.
1982
1983         * config/arm/arm.md (ffssi2, ctzsi2): Delete.
1984
1985 2007-09-03  Zack Weinberg  <zack@codesourcery.com>
1986
1987         * config.gcc: Delete stanza for arm-semi-aof and
1988         armel-semi-aof targets.
1989         * config/arm/arm-protos.h
1990         * config/arm/arm.c
1991         * config/arm/arm.h: Delete all #ifdef AOF_ASSEMBLER blocks;
1992         make all #ifndef AOF_ASSEMBLER blocks unconditional.  Also
1993         delete aof_pic_label and remove mention of AOF in comments.
1994         * config/arm/arm.md: Delete patterns used only for AOF assembly.
1995         * config/arm/aof.h
1996         * config/arm/semiaof.h
1997         * config/arm/t-semi: Delete file.
1998
1999 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2000
2001         * system.h (CONST_CAST2, CONST_CAST_TREE, CONST_CAST_RTX,
2002         CONST_CAST_BB): New macros for type-specific casts.
2003         (CONST_CAST): Add a TYPE parameter and define it in terms of
2004         CONST_CAST2.
2005
2006         * c-decl.c (c_make_fname_decl): Supply a TYPE for CONST_CAST.
2007         * c-lex.c (cb_ident, lex_string): Likewise,
2008         * c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise,
2009         * config/i386/i386.c (ix86_function_regparm,
2010         ix86_function_sseregparm): Use CONST_CAST_TREE.
2011         * config/mmix/mmix.c (mmix_encode_section_info): Supply a TYPE for
2012         CONST_CAST.
2013         * gcc.c (set_spec, read_specs, for_each_path, execute, do_spec_1,
2014         give_switch, set_multilib_dir): Likewise,
2015         * gengtype-parse.c (string_seq, typedef_name): Likewise,
2016         * gimple-low.c (block_may_fallthru): Use CONST_CAST_TREE.
2017         * jump.c (reversed_comparison_code_parts): Use CONST_CAST_RTX.
2018         * passes.c (execute_one_pass): Supply a TYPE for CONST_CAST.
2019         * prefix.c (update_path): Likewise,
2020         * pretty-print.c (pp_base_destroy_prefix): Likewise,
2021         * rtlanal.c (keep_with_call_p): Use CONST_CAST_RTX.
2022         * tree-cfg.c (tree_can_merge_blocks_p,
2023         tree_block_ends_with_condjump_p): Use CONST_CAST_BB.
2024         * tree-eh.c (lookup_stmt_eh_region_fn): USe CONST_CAST_TREE.
2025         * tree.c (build_string): Supply a TYPE for CONST_CAST.
2026         (attribute_list_contained): Use CONST_CAST_TREE.
2027
2028 2007-09-03  Krister Walfridsson  <cato@df.lth.se>
2029
2030         * config/netbsd-elf.h (USE_LD_AS_NEEDED): Define.
2031
2032 2007-09-03  Richard Sandiford  <richard@codesourcery.com>
2033
2034         PR middle-end/33290
2035         * optabs.c (avoid_expensive_constant): Canonicalize CONST_INTs
2036         before forcing them into a register.
2037
2038 2007-09-03  Richard Sandiford  <richard@codesourcery.com>
2039
2040         * config/mips/mips.md (fetchop_bit): Use define_code_iterator
2041         rather than define_code_macro.
2042
2043 2007-09-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2044
2045         * gcc.c (xputenv): New function.
2046         (putenv_from_prefixes): Use xputenv instead of putenv.
2047         (process_command): Use xputenv instead of putenv.
2048         (set_collect_gcc_options): Use xputenv instead of putenv.
2049         (main): Use xputenv instead of putenv.
2050
2051 2007-09-03  Jesper Nilsson  <jesper.nilsson@axis.com>
2052
2053         * config/cris/cris.h (TARGET_HAS_SWAP): Defined to describe
2054         availability of swap instruction.
2055         * config/cris/cris.md (bswapsi2): Implement using swap instruction.
2056
2057 2007-09-03  Revital Eres  <eres@il.ibm.com>
2058
2059         * doc/invoke.texi (-fmodulo-sched-allow-regmoves): Update
2060         Documentation.
2061
2062 2007-09-03  Vladimir Yanovsky  <yanov@il.ibm.com>
2063             Ayal Zaks  <zaks@il.ibm.com>
2064             Revital Eres  <eres@il.ibm.com>
2065
2066         * modulo-sched.c (ps_insert_empty_row, verify_partial_schedule,
2067         compute_split_row): New functions.
2068         (ps_unschedule_node): Remove.
2069         (normalize_sched_times): Iterate over the already scheduled
2070         insns instead of the number of nodes.
2071         (MAX_SPLIT_NUM): New definition.
2072         (sms_schedule_by_order): Change the scheduling heuristic to
2073         avoid useless increases of initiation interval ii.
2074         (get_sched_window): Add dump printouts.
2075
2076 2007-09-02  David Daney  <ddaney@avtrex.com>
2077
2078         * config/mips/mips.md (UNSPEC_COMPARE_AND_SWAP, UNSPEC_SYNC_OLD_OP,
2079         UNSPEC_SYNC_NEW_OP, UNSPEC_SYNC_EXCHANGE): New define_constants.
2080         (optab, insn): Add more attributes.
2081         (fetchop_bit): New code macro.
2082         (immediate_insn): New code macro attribute.
2083         (sync): Change condition to ISA_HAS_SYNC.
2084         (rdhwr): Change predicate for operand 0 to register_operand.
2085         (memory_barrier): New expand.
2086         (sync_compare_and_swap<mode>, sync_add<mode>, sync_sub<mode>,
2087         sync_old_add<mode>, sync_old_sub<mode>, sync_new_add<mode>,
2088         sync_new_sub<mode>, sync_<optab><mode>, sync_old_<optab><mode>,
2089         sync_new_<optab><mode>, sync_nand<mode>, sync_old_nand<mode>,
2090         sync_new_nand<mode>, sync_lock_test_and_set<mode>): New insns.
2091         * config/mips/mips.h (ISA_HAS_SYNC, ISA_HAS_LL_SC): New ISA predicates.
2092         (MIPS_COMPARE_AND_SWAP, MIPS_SYNC_OP, MIPS_SYNC_OLD_OP,
2093         MIPS_SYNC_NEW_OP, MIPS_SYNC_NAND, MIPS_SYNC_OLD_NAND,
2094         MIPS_SYNC_NEW_NAND, MIPS_SYNC_EXCHANGE): New Macros.
2095         
2096 2007-09-03  Jesper Nilsson  <jesper.nilsson@axis.com>
2097             Hans-Peter Nilsson  <hp@axis.com>
2098
2099         * config/cris/cris.h (TARGET_HAS_LZ, CLZ_DEFINED_VALUE_AT_ZERO):
2100         Defined to describe availability and behavior of CLZ.
2101         * config/cris/cris.md (clzsi2): Implement using lz instruction.
2102         * config/cris/cris.opt: Tweak comment for "-metrax4".
2103         * config/cris/arit.c (LZ): When defined, define as __builtin_clz.
2104         * longlong.h [__CRIS__ && __CRIS_arch_version >= 3]
2105         (count_leading_zeros): Define.
2106
2107 2007-09-01  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
2108
2109         * ggc-page.c (ggc_pch_read): Call validate_free_objects.
2110
2111 2007-09-02  Joseph Myers  <joseph@codesourcery.com>
2112
2113         PR middle-end/33272
2114         * c-decl.c (grokdeclarator): Apply qualifiers to type of parameter
2115         decayed from array.
2116
2117 2007-09-01  Kazu Hirata  <kazu@codesourcery.com>
2118
2119         * config/arm/arm.c, config/rs6000/ppu_intrinsics.h,
2120         config/spu/spu.c, df-scan.c, fixed-value.c, fold-const.c,
2121         ginclude/tgmath.h, haifa-sched.c, optabs.c, recog.c,
2122         sched-deps.c, sched-int.h, system.h, target.h,
2123         tree-ssa-live.c, tree-vect-transform.c, tree-vectorizer.c,
2124         tree.def: Fix comment typos.
2125
2126 2007-09-01  Kazu Hirata  <kazu@codesourcery.com>
2127
2128         * config/m68k/m68k.c (TARGET_DEFAULT_TARGET_FLAGS): Remove.
2129         (override_options): Turn on -mstrict-align on non-ColdFire
2130         targets.
2131         * config/m68k/m68k.h (BIGGEST_ALIGNMENT): Update a comment.
2132
2133 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2134
2135         * c-common.c (const_strip_array_types): Delete.
2136         * c-common.h (const_strip_array_types): Likewise.
2137         * emit-rtl.c (const_next_insn, const_previous_insn,
2138         const_next_nonnote_insn, const_prev_nonnote_insn,
2139         const_next_real_insn, const_prev_real_insn,
2140         const_next_active_insn, const_prev_active_insn, const_next_label,
2141         const_prev_label): Delete.
2142         * gimple-low.c (block_may_fallthru): Use expr_last.
2143         * jump.c (reversed_comparison_code_parts): Use prev_nonnote_insn.
2144         * rtl.h (const_previous_insn, const_next_insn,
2145         const_prev_nonnote_insn, const_next_nonnote_insn,
2146         const_prev_real_insn, const_next_real_insn,
2147         const_prev_active_insn, const_next_active_insn, const_prev_label,
2148         const_next_label): Delete.
2149         * rtlanal.c (keep_with_call_p): Use next_nonnote_insn.
2150         * system.h (CONST_CAST): Update comment.
2151         * tree-cfg.c (tree_can_merge_blocks_p): Use last_stmt.
2152         (const_first_stmt, const_last_stmt): Delete.
2153         (tree_block_ends_with_condjump_p): Use last_stmt.
2154         * tree-flow.h (const_first_stmt, const_last_stmt): Delete.
2155         * tree-iterator.c (const_expr_first, const_expr_last,
2156         const_expr_only): Delete.
2157         * tree.c (const_lookup_attribute): Likewise.
2158         (attribute_list_contained): Use lookup_attribute.
2159         * tree.h (const_lookup_attribute, const_expr_first,
2160         const_expr_last, const_expr_only): Delete.
2161
2162 2007-09-01  Richard Guenther  <rguenther@suse.de>
2163
2164         * tree-ssa-alias.c (create_name_tags): Use TYPE_VOLATILE
2165         instead of TREE_THIS_VOLATILE.
2166         * tree-ssa-operands.c (add_virtual_operand): Do not set
2167         has_volatile_ops.  Do not check s_ann for NULL.
2168         (get_indirect_ref_operands): Likewise.
2169         (get_expr_operands): Likewise.  For all reference trees
2170         set has_volatile_ops based on TREE_THIS_VOLATILE.  Also
2171         check base of reference for TREE_THIS_VOLATILE.
2172
2173 2007-09-01  Richard Guenther  <rguenther@suse.de>
2174
2175         * tree-cfg.c (verify_gimple_expr): Fix check for conversions
2176         between integral types.  Also allow conversions between
2177         pointer types.
2178
2179 2007-08-31  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2180
2181         * optabs.c (prepare_float_lib_cmp): Use
2182         libgcc_cmp_return_mode instead of word_mode.
2183         * config/dfp-bit.h: Likewise.
2184         * config/fp-bit.h: Likewise.
2185         * config/spu/spu.c (spu_libgcc_cmp_return_mode):
2186         New function.
2187         (spu_libgcc_shift_count_mode): New function.
2188         (TARGET_LIBGCC_CMP_RETURN_MODE): Define.
2189         (TARGET_LIBGCC_SHIFT_COUNT_MODE): Define.
2190
2191 2007-08-31  Joseph Myers  <joseph@codesourcery.com>
2192
2193         * tree-pretty-print.c: Include output.h.
2194         (dump_decl_name, dump_generic_node): Use %wd with pp_printf, not
2195         HOST_WIDE_INT_PRINT_DEC.
2196         * Makefile.in (tree-pretty-print.o): Add dependency on output.h.
2197
2198 2007-08-31  Zdenek Dvorak  <ook@ucw.cz>
2199
2200         PR rtl-optimization/33224
2201         * loop-iv.c (latch_dominating_def): Check that the definition belongs
2202         to the analysed region.
2203
2204 2007-08-31  Richard Guenther  <rguenther@suse.de>
2205
2206         * function.c (allocate_struct_function): Do not set
2207         current_function_returns_pointer.
2208         * function.h (struct var_refs_queue): Remove.
2209         (struct simple_obstack_stack): Likewise.
2210         (struct function): Remove fixup_var_refs_queue member.
2211         Remove returns_pointer flag.
2212         (current_function_returns_pointer): Remove define.
2213
2214 2007-08-31  Nick Clifton  <nickc@redhat.com>
2215
2216         * tree-ssa-coalesce.c (compare_pairs): Use the elements as
2217         secondary keys in order to obtain a stable sort.
2218
2219 2007-08-31  Nick Clifton  <nickc@redhat.com>
2220
2221         PR target/33132
2222         * config/m32r/constraints.md: Add W constraint for integer zero.
2223         * config/m32r/m32r.md (get_pc): Use W and i constraints.
2224         Fix length calculation by using alternatives.
2225
2226 2007-08-31  Richard Sandiford  <richard@codesourcery.com>
2227
2228         * optabs.c (shift_optab_p, commutative_optab_p): New functions,
2229         split out from expand_binop.
2230         (avoid_expensive_constant): New function.
2231         (expand_binop_directly): Remove commutative_op argument and
2232         (expand_binop_directly): Remove commutative_op argument and
2233         call cummutative_optab_p instead.  Do not change op0 or op1
2234         when swapping xop0 and xop1.  Apply avoid_expensive_constant
2235         to each argument after potential swapping.  Enforce the
2236         canonical order of commutative operands.
2237         (expand_binop): Use shift_optab_p and commutative_optab_p.
2238         Update the calls to expand_binop_directly.  Only force constants
2239         into registers when widening an operation.  Only swap operands
2240         once a direct expansion has been rejected.
2241         (expand_twoval_binop): Only force constants into registers when
2242         using a direct expansion.
2243
2244 2007-08-31  Maxim Kuvyrkov  <maxim@codesourcery.com>
2245
2246         * sched-deps.c (update_dep): Mark arguments with ATTRIBUTE_UNUSED.
2247         (sched_analyze_insn): Don't postprocess speculative dependencies when
2248         target has no scheduling.
2249         * tree-vect-transform.c (vect_estimate_min_profitable_iters): Fix
2250         'uninitialized' warning.
2251
2252 2007-08-31  Richard Guenther  <rguenther@suse.de>
2253
2254         * tree.c (build_complex_type): Always set TYPE_NAME for
2255         comples types.
2256
2257 2007-08-31  Olivier Hainque  <hainque@adacore.com>
2258
2259         * config/rs6000/xcoff.h (XCOFF_CSECT_DEFAULT_ALIGNMENT_STR): New
2260         internal macro. Default alignment factor for csect directives, chosen
2261         to match what BIGGEST_ALIGNMENT allows.
2262         (DATA_SECTION_ASM_OP): Use it.
2263         * config/rs6000/rs6000.c
2264         (rs6000_xcoff_output_readonly_section_asm_op):
2265         Use XCOFF_CSECT_DEFAULT_ALIGNMENT_STR.
2266         (rs6000_xcoff_output_readwrite_section_asm_op): Likewise.
2267         
2268 2007-08-31  Olivier Hainque  <hainque@adacore.com>
2269
2270         * dbxout.c (dbxout_block): Move declaration within the first
2271         #if defined (DBX_DEBUGGING_INFO) block.  Rearrange another such
2272         block to include the definition, together with the associated
2273         helpers.
2274
2275 2007-08-31  David Edelsohn  <edelsohn@gnu.org>
2276             Revital Eres  <eres@il.ibm.com>
2277
2278         * doc/invoke.texi (-mpaired): Document flag.
2279         * config.gcc: Include paired.h in powerpc extra_headers and
2280         750cl.h in powerpc-*-linux*paired*.
2281         * config/rs6000/rs6000.opt (-mpaired): New flag.
2282         * config/rs6000/rs6000.c (paired_init_builtins,
2283         paired_expand_builtin, paired_expand_lv_builtin,
2284         paired_expand_stv_builtin, paired_expand_predicate_builtin):
2285         New functions to support the paired single builtin functions.
2286         (rs6000_hard_regno_mode_ok): Handle PAIRED_VECTOR_MODE.
2287         (def_builtin, bdesc_3arg, bdesc_2arg, bdesc_1arg): Add paired
2288         single builtins.
2289         (bdesc_paired_preds): New structure for paired predicate
2290         instructions.
2291         (rs6000_expand_builtin): Expand paired single builtins.
2292         (rs6000_init_builtins): Init paired single builtins.
2293         (rs6000_common_init_builtins): Add v2sf_ftype_v2sf_v2sf_v2sf.
2294         Rename v2sf_ftype_v2sf_v2sf to v2sf_ftype_v2sf_v2sf_spe
2295         and v2sf_ftype_v2sf_spe to v2sf_ftype_v2sf.  Add new types
2296         v2sf_ftype_v2sf_v2sf and v2sf_ftype_v2sf.
2297         (rs6000_vector_mode_supported_p): Support paired vector mode.
2298         * config/rs6000/rs6000.h: (UNITS_PER_PAIRED_WORD,
2299         PAIRED_VECTOR_MODE, PAIRED_SIMD_REGNO_P, TARGET_PAIRED_FLOAT):
2300         New.
2301         (LOCAL_ALIGNMENT): Handle PAIRED_VECTOR_MODE.
2302         (DATA_ALIGNMENT): Likewise.
2303         (UNITS_PER_SIMD_WORD): Handle PAIRED_VECTOR_MODE.
2304         (rs6000_builtins): Add PAIRED builtins.
2305         * config/rs6000/rs6000.md: Include paired.md.
2306         * config/rs6000/paired.h: New.
2307         * config/rs6000/paired.md: New.
2308         * config/rs6000/750cl.h: New.
2309         * config/rs6000/spe.md: Recognize movv2sf instruction for 750cl.
2310
2311 2007-08-30  Ollie Wild  <aaw@google.com>
2312
2313         * c-opts.c (c_common_handle_option): Support -fno-directives-only.
2314         * gcc.c (default_compilers): Add -fno-directives-only to
2315         @assembler-with-cpp.
2316
2317 2007-08-30  Sandra Loosemore  <sandra@codesourcery.com>
2318
2319         PR middle-end/33211
2320
2321         * regclass.c (initial_fixed_regs): Revert previous change and make
2322         it const again.
2323         (initial_call_used_regs): Likewise.
2324         (initial_call_really_used_regs): Delete, reverting previous addition.
2325         (initial_reg_names): Likewise.
2326         (init_reg_sets): Revert previous change.
2327         (saved_fixed_regs): New.
2328         (saved_call_used_regs): New.
2329         (saved_call_really_used_regs): New.
2330         (saved_reg_names): New.
2331         (save_register_info): New.
2332         (restore_register_info): New.
2333         (init_reg_sets_1): Replace reset of register info with call to
2334         restore_register_info.
2335         * rtl.h (save_register_info): Declare.
2336         * toplev.c (backend_init): Call save_register_info.
2337
2338 2007-08-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
2339
2340         * tree-ssa-propagate.c (set_rhs): Remove the copied annotation
2341         from the original statement.
2342
2343 2007-08-30  Chao-ying Fu  <fu@mips.com>
2344
2345         * c-lex.c (interpret_fixed): Declare.
2346         (interpret_float): Process _Fract and _Accum.
2347         (interpret_fixed): New function.
2348         * final.c (output_addr_const): Process CONST_FIXED.
2349         * simplify-rtx.c (simplify_const_unary_operation): Handle US_NEG.
2350         (simplify_binary_operation_1): Handle US_ASHIFT, SS_MULT, US_MULT,
2351         SS_DIV, US_DIV.
2352         (simplify_const_binary_operation): Handle SS_MULT, US_MULT, SS_DIV,
2353         US_DIV, US_ASHIFT.
2354         (simplify_immed_subreg): Support CONST_FIXED.
2355         Process MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM.
2356         (simplify_subreg): Support CONST_FIXED.
2357
2358 2007-08-30  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2359
2360         * config/rs6000/ppu_intrinsics.h: New file.
2361         * config.gcc (powerpc*-*-* <extra_headers>): Install
2362         ppu_intrinsics.h.
2363
2364 2007-08-30  Kenneth Zadeck <zadeck@naturalbridge.com>
2365
2366         * cfg.c (dump_flow_info): Change to also print entry and exit
2367         block info.
2368         * print-rtl.c (print_rtl_single): Allow to print rtl with
2369         -fdump-unnumbered.
2370         
2371 2007-08-30  Kenneth Zadeck <zadeck@naturalbridge.com>
2372
2373         * df-core.h (df_dump_region): New function.
2374         * df.h (df_dump_region): New function.
2375         * loop-invariant.c (find_defs): Add call to df_dump_region.
2376         * loop-iv.c (iv_analysis_loop_init): Changed call from df_dump to
2377         df_dump_region.
2378         
2379 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
2380
2381         PR target/33168
2382         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Return
2383         true if any of the compare_section_name calls returned true,
2384         rather than if any returned false.
2385
2386 2007-08-30  Richard Guenther  <rguenther@suse.de>
2387
2388         PR tree-optimization/33199
2389         * tree-ssa-structalias.c (handle_lhs_call): New function.
2390         (find_func_aliases): In non-IPA mode make sure that for
2391         calls that return a pointer we add a constraint for the
2392         result to point to anything.
2393
2394 2007-08-30  Richard Guenther  <rguenther@suse.de>
2395
2396         * doc/invoke.texi (-mveclibabi): Document new target option.
2397         * config/i386/i386.opt (-mveclibabi): New target option.
2398         * config/i386/i386.c (ix86_veclib_handler): Handler for
2399         vectorization library support.
2400         (override_options): Handle the -mveclibabi option, initialize
2401         the vectorization library handler.
2402         (ix86_builtin_vectorized_function): As fallback call the
2403         vectorization library handler, if set.
2404         (ix86_veclibabi_acml): New static function for ACML ABI style
2405         vectorization support.
2406
2407 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
2408
2409         * config/rs6000/rs6000.c (rs6000_emit_sync): For QI or HI mode
2410         used_m, even if it is 32-bit aligned, adjust used_m MEM to have
2411         SImode and update m.  Don't run gen_lowpart_common on arbitrary
2412         memory address, force it to register first.
2413
2414         PR middle-end/32758
2415         * dce.c (dce_process_block): Don't delete setters of
2416         artificially used registers.
2417
2418 2007-08-30  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
2419
2420         * config/s390/s390.md ("*add<mode>3_alc_carry1_cc",
2421         "*add<mode>3_alc_carry1_cconly", "*add<mode>3_alc_carry2_cc",
2422         "*add<mode>3_alc_carry2_cconly"): New insn definitions.
2423
2424 2007-08-30  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
2425
2426         * config/s390/s390.c (s390_expand_addcc): Emit canonical alc
2427         pattern.
2428         * config/s390/s390.md ("*add<mode>3_alc_cc", "*add<mode>3_alc",
2429         "addti3", "*adddi3_31z", "*scond<mode>"): Make alc pattern canonical.
2430
2431 2007-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2432
2433         * system.h: Activate -Wcast-qual as warning-only.
2434
2435 2007-08-29  Paolo Bonzini  <bonzini@gnu.org>
2436
2437         PR target/33168
2438         * config/rs6000/rs6000.c (compare_section_name): New function.
2439         (rs6000_elf_in_small_data_p): Compare section prefixes instead
2440         of full name.
2441
2442 2007-08-29  Olivier Hainque  <hainque@adacore.com>
2443
2444         * xcoffout.c: #include debug.h.
2445         * Makefile.in (xcoffout.o): Add debug.h dependency.
2446
2447 2007-08-29  Uros Bizjak  <ubizjak@gmail.com>
2448
2449         * simplify-rtx.c (simplify_binary_operation_1) [VEC_SELECT]:
2450         Change CONST_VECTOR_ELT to XVECEXP in elem calculation.
2451
2452 2007-08-29  Richard Guenther  <rguenther@suse.de>
2453
2454         * tree-pretty-print.c (dump_generic_node): Print
2455         label DECL_UID as D.%u.
2456         * tree-dfa.c (dump_variable): Print DECL_UID as D.%u.
2457
2458 2007-08-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2459
2460         * gcc/builtin-types.def (BT_FN_PTR_PTR_SIZE): New type.
2461         * gcc/builtins.def (BUILT_IN_REALLOC): New builtin.
2462
2463 2007-08-29  Douglas Gregor  <doug.gregor@gmail.com>
2464
2465         PR c++/33194
2466         * tree.c (build_type_attribute_qual_variant): Set canonical types
2467         on the final, unqualified attribute variant before building the
2468         qualified version.
2469
2470 2007-08-29  Jie Zhang  <jie.zhang@analog.com>
2471
2472         * config/bfin/bfin.c (bfin_expand_builtin): Fix the argument
2473         order of __builtin_bfin_cmplx_mac and __builtin_bfin_cmplx_msu.
2474
2475 2007-08-29  Jie Zhang  <jie.zhang@analog.com>
2476
2477         Revert
2478         2007-08-29  Jie Zhang  <jie.zhang@analog.com>
2479         * config/bfin/bfin.md (composev2hi): Put operands into vector
2480         with correct order.
2481
2482 2007-08-29  Jie Zhang  <jie.zhang@analog.com>
2483
2484         * config/bfin/bfin.md (composev2hi): Put operands into vector
2485         with correct order.
2486
2487 2007-08-29  Jie Zhang  <jie.zhang@analog.com>
2488
2489         * config/bfin/bfin.c (bfin_expand_call): Inline PLT with l1_text
2490         attribute when appropriate.
2491         (bfin_handle_l1_text_attribute): New.
2492         (bfin_handle_l1_data_attribute): New.
2493         (bfin_attribute_table): Add attributes: l1_text, l1_data,
2494         l1_data_A and l1_data_B.
2495         * doc/extend.texi (node Function Attributes): Document l1_text
2496         function attribute.
2497         (Variable Attributes): Add Blackfin subsection. Document l1_data,
2498         l1_data_A and l1_data_B variable attributes.
2499
2500 2007-08-28  Jie Zhang  <jie.zhang@analog.com>
2501
2502         * config/bfin/bfin.opt (minline-plt): Add.
2503         * config/bfin/bfin.c (bfin_expand_call): Inline PLT when emit
2504         call to global functions.
2505         * doc/invoke.texi (Option Summary): Mention -minline-plt.
2506         (Blackfin Options): Document -minline-plt.
2507
2508 2007-08-28  Nathan Sidwell  <nathan@codesourcery.com>
2509
2510         * config/m68k/m68k.c (m68k_get_function_kind): Assert we're never
2511         given a non-function.
2512         (m68k_ok_for_sibcall_p): Only sibcall functions of the same kind.
2513
2514 2007-08-28  DJ Delorie  <dj@redhat.com>
2515
2516         * config/sh/sh.c (sh_gimplify_va_arg_expr): Fix sh2a support.
2517
2518 2007-08-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2519
2520         * system.h (CONST_CAST): Avoid union for gcc-4.0.x.
2521
2522 2007-08-28  Richard Guenther  <rguenther@suse.de>
2523
2524         * tree.h (struct tree_function_decl): Increase size of
2525         function_code bitfield.
2526
2527 2007-08-28  Nathan Sidwell  <nathan@codesourcery.com>
2528             Kazu Hirata  <kazu@codesourcery.com>
2529
2530         * gcc/config/m68k/linux.h
2531         (M68K_HONOR_TARGET_STRICT_ALIGNMENT): Redefine as 0.
2532         * config/m68k/m68k.c (TARGET_RETURN_IN_MEMORY): New.
2533         (m68k_return_in_memory): New.
2534         * gcc/config/m68k/m68k.h (M68K_HONOR_TARGET_STRICT_ALIGNMENT):
2535         New.
2536
2537 2007-08-28  Uros Bizjak  <ubizjak@gmail.com>
2538
2539         PR target/32661
2540         * simplify-rtx.c (simplify_binary_operation_1) [VEC_SELECT]:
2541         Simplify nested VEC_SELECT (with optional VEC_CONCAT operator as
2542         operand) when top VEC_SELECT extracts scalar element.
2543         * config/i386/sse.md (*vec_extract_v4si_mem): New pattern.
2544         (*vec_extract_v4sf_mem): Ditto.
2545
2546 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
2547
2548         PR middle-end/32370
2549         * passes.c (init_optimization_passes): Move pass_df_finish
2550         after pass_postreload sublist.
2551
2552         PR rtl-optimization/33148
2553         * simplify-rtx.c (simplify_unary_operation_1): Only optimize
2554         (neg (lt X 0)) if X has scalar int mode.
2555
2556         PR debug/32914
2557         * dwarf2out.c (rtl_for_decl_init): If vector decl has CONSTRUCTOR
2558         initializer, use build_vector_from_ctor if possible to create
2559         VECTOR_CST out of it.  If vector initializer is not VECTOR_CST
2560         even after this, return NULL.
2561
2562 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2563
2564         * c-pretty-print.c (pp_c_constant): Handle COMPLEX_CST.
2565
2566 2007-08-28  Richard Guenther  <rguenther@suse.de>
2567
2568         * tree.h (DECL_DISREGARD_INLINE_LIMITS): New.
2569         (struct tree_function_decl): Make function_code a bitfield.
2570         Add disregard_inline_limits flag.
2571         * cgraphunit.c (cgraph_process_new_functions): Check
2572         DECL_DISREGARD_INLINE_LIMITS instead of disregard_inline_limits_p.
2573         (cgraph_preserve_function_body_p): Likewise.
2574         * ipa-inline.c (compute_inline_parameters): Likewise.
2575         * c-decl.c (finish_function): Set DECL_DISREGARD_INLINE_LIMITS
2576         for GNU C extern inline functions.
2577         (merge_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
2578         * tree-inline.c (disregard_inline_limits_p): Remove.
2579         * tree-inline.h (disregard_inline_limits_p): Likewise.
2580         * c-common.c (handle_always_inline_attribute): Set
2581         DECL_DISREGARD_INLINE_LIMITS.
2582         * langhooks.c (add_builtin_function): Verify the function code
2583         fits in the bitfield.
2584
2585 2007-08-28  Mircea Namolaru  <namolaru@il.ibm.com>
2586             Vladimir Yanovsky  <yanov@il.ibm.com>
2587             Revital Eres  <eres@il.ibm.com>
2588             Andrey Belevantsev  <abel@ispras.ru>
2589
2590         * config/spu/spu.md: Recognize doloop pattern when -fmodulo-sched
2591         is set.
2592         * modulo-sched.c: Add documentation regarding do-loop.
2593         (doloop_register_get): Change number of arguments to support
2594         the new do-loop pattern and check whether COUNT_REG has no other
2595         occurences in the loop besides in the control part.
2596         (duplicate_insns_of_cycles): Do not duplicate the insn which
2597         changes count_reg as it is already adjusted.
2598         (generate_prolog_epilog): New argument to support the new
2599         do-loop pattern.  Change the subtract instruction to use
2600         expand_simple_binop.  Call duplicate_insns_of_cycles with new
2601         argument.
2602         (sms_schedule): Call doloop_register_get and
2603         generate_prolog_epilog with new argument.  Do not handle loops
2604         with single sets insns with subreg in their lhs.
2605         * loop-doloop.c (doloop_optimize): Support for another do-loop
2606         pattern.
2607         (doloop_condition_get): Gets an instruction instead of a pattern
2608         and change the return condition when the do-loop pattern is
2609         not parallel.
2610         * ddg.c (create_ddg_dep_from_intra_loop_link): Handle only reg
2611         deps when considering to not create edges.
2612
2613 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
2614
2615         * doc/extend.texi (gnu_inline funtion attribute): Document C++
2616         behavior.
2617
2618 2007-08-27  Jason Merrill  <jason@redhat.com>
2619
2620         PR c++/31337
2621         * gimplify.c (gimplify_modify_expr): Discard the assignment of 
2622         zero-sized types after calling gimplify_modify_expr_rhs.
2623
2624 2007-08-27  Sandra Loosemore  <sandra@codesourcery.com>
2625
2626         * regclass.c (init_reg_autoinc): Fix typo.
2627
2628 2007-08-27  Daniel Berlin  <dberlin@dberlin.org>
2629         
2630         Fix PR tree-optimization/33173
2631         * tree-ssa-alias.c (find_used_portions): Fix reversed test.
2632
2633 2007-08-27  H.J. Lu  <hongjiu.lu@intel.com>
2634
2635         PR target/31385
2636         * config/i386/i386.h (VALID_DFP_MODE_P): New.
2637         * config/i386/i386.c (ix86_hard_regno_mode_ok): Allow DFP in
2638         GPR.
2639
2640 2007-08-27  Sandra Loosemore  <sandra@codesourcery.com>
2641             David Ung  <davidu@mips.com>
2642             Nigel Stephens <nigel@mips.com>
2643
2644         Separate target-specific initialization from general
2645         back-end initialization.
2646
2647         * toplev.c (init_alignments): New, split out from...
2648         (process_options): ...here.
2649         (backend_init_target): New, split out from...
2650         (backend_init): ...here.
2651         (lang_dependent_init_target): New, split out from...
2652         (lang_dependent_init): ...here.
2653         (target_reinit): New.
2654         * toplev.h (target_reinit): Declare.
2655         * expr.c (init_expr_target): Renamed from init_expr_once, since it
2656         now can be called more than once.  Update comments.
2657         * expr.h (init_expr_target): Likewise.
2658         * alias.c (init_alias_target): Renamed from init_alias_once, since it
2659         now can be called more than once.  Explicitly zero
2660         static_reg_base_value.
2661         * emit-rtl.c (init_emit_regs): New, split out from...
2662         (init_emit_once): Here.
2663         * regclass.c (initial_fixed_regs, initial_call_used_regs): Make
2664         non-const, so that changes from command-line arguments can overwrite
2665         values provided by the static initializers.
2666         (initial_call_really_used_regs): New, used similarly to the above.
2667         (initial_reg_names): Likewise.
2668         (last_mode_for_init_move_cost): Promoted function-local static to
2669         file-scope static to make it accessible outside init_move_cost.
2670         (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet.
2671         Do not initialize inv_reg_alloc_order yet, either.  Do initialize
2672         reg_names since it is needed for parsing command-line options.
2673         (init_move_cost): Use last_mode_for_init_move_cost instead of
2674         function-local static.
2675         (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and
2676         call_really_used_regs now.  Reinitialize reg_names.  Also
2677         initialize inv_reg_alloc_order.  Zero reg_class_subunion and
2678         reg_class_superunion.  Clear losing_caller_save_reg_set.
2679         Preserve global registers if called more than once.  Reset
2680         move cost, may_move_in_cost, may_move_out_cost, and
2681         last_mode_for_init_move_cost.
2682         (init_reg_modes_target): Renamed from init_reg_modes_once, since it
2683         can now be invoked more than once.  Update comments.
2684         (init_regs): Update comments.
2685         (fix_register): Update initial_fixed_regs, initial_call_used_regs,
2686         and initial_call_really_used_regs, instead of the non-initial 
2687         variables.  This allows us to save the command-line register settings
2688         after target reinitialization.
2689         (init_reg_autoinc): Zero forbidden_inc_dec_classes.
2690         * rtl.h (init_emit_regs): Declare.
2691         (init_reg_modes_target, init_alias_target): Renamed as described
2692         above.
2693         * reload1.c (init_reload): Update comments.
2694         * optabs.c (init_optabs): Likewise.
2695         * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs.
2696         
2697 2007-08-26  Chao-ying Fu  <fu@mips.com>
2698
2699         * rtl.h (XCNMPFV): Preserve const-ness of parameters through use of
2700         __typeof().
2701
2702 2007-08-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2703
2704         * alias.c (memory_modified_1, memory_modified_in_insn_p):
2705         Constify.
2706         * basic-block.h (tree_predicted_by_p, rtl_predicted_by_p):
2707         Likewise.
2708         * bb-reorder.c (copy_bb_p): Likewise.
2709         * cfghooks.c (can_remove_branch_p, can_merge_blocks_p,
2710         predicted_by_p, can_duplicate_block_p, block_ends_with_call_p,
2711         block_ends_with_condjump_p): Likewise.
2712         * cfghooks.h (can_remove_branch_p, can_merge_blocks_p,
2713         predicted_by_p, can_duplicate_block_p, block_ends_with_call_p,
2714         block_ends_with_condjump_p): Likewise.
2715         * cfglayout.c (cfg_layout_can_duplicate_bb_p): Likewise.
2716         * cfgrtl.c (can_delete_note_p, can_delete_label_p,
2717         rtl_can_merge_blocks, cfg_layout_can_merge_blocks_p,
2718         rtl_block_ends_with_call_p, rtl_block_ends_with_condjump_p,
2719         need_fake_edge_p, rtl_can_remove_branch_p): Likewise.
2720         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Use
2721         debug_true_const_tree instad of debug_true_tree.
2722         * debug.c (do_nothing_debug_hooks): Likewise.
2723         * debug.h (ignore_block, debug_true_const_tree): Constify.
2724         * dwarf2out.c (stack_adjust_offset, clobbers_queued_reg_save,
2725         dwarf2out_ignore_block, is_pseudo_reg, is_tagged_type,
2726         decl_ultimate_origin, block_ultimate_origin, lookup_decl_loc,
2727         same_dw_val_p, add_ranges, is_subrange_type, type_is_enum,
2728         dbx_reg_number, is_based_loc, field_type,
2729         simple_type_align_in_bits, simple_decl_align_in_bits,
2730         simple_type_size_in_bits, field_byte_offset, insert_float,
2731         type_tag, member_declared_type, is_redundant_typedef,
2732         secname_for_decl, is_inlined_entry_point): Likewise.
2733         * emit-rtl.c (const_next_insn, const_previous_insn,
2734         const_next_nonnote_insn, const_prev_nonnote_insn,
2735         const_next_real_insn, const_prev_real_insn,
2736         const_next_active_insn, const_prev_active_insn, const_next_label,
2737         const_prev_label): Likewise.
2738         * except.h (lookup_stmt_eh_region_fn, lookup_stmt_eh_region):
2739         Likewise.
2740         * haifa-sched.c (may_trap_exp, haifa_classify_insn,
2741         find_set_reg_weight, no_real_insns_p, find_set_reg_weight,
2742         sched_insn_is_legitimate_for_speculation_p): Likewise.
2743         * jump.c (reversed_comparison_code_parts,
2744         reversed_comparison_code, reversed_comparison, condjump_label):
2745         Likewise.
2746         * predict.c (rtl_predicted_by_p, tree_predicted_by_p): Likewise.
2747         * reg-stack.c (stack_regs_mentioned_p, stack_regs_mentioned):
2748         Likewise.
2749         * rtl.h (const_previous_insn, const_next_insn,
2750         const_prev_nonnote_insn, const_next_nonnote_insn,
2751         const_prev_real_insn, const_next_real_insn,
2752         const_prev_active_insn, const_next_active_insn, const_prev_label,
2753         const_next_label, modified_between_p, modified_in_p,
2754         const_note_storeskeep_with_call_p, condjump_label,
2755         reversed_comparison, reversed_comparison_code,
2756         reversed_comparison_code_parts, memory_modified_in_insn_p,
2757         stack_regs_mentioned): Likewise.
2758         * rtlanal.c (modified_between_p, modified_in_p, const_note_stores,
2759         keep_with_call_p): Likewise.
2760         * sched-deps.c (deps_may_trap_p, sched_get_condition,
2761         conditions_mutex_p, sched_insns_conditions_mutex_psd_next_list,
2762         sd_lists_size, sd_lists_empty_p): Likewise.
2763         * sched-int.h (sched_insns_conditions_mutex_p,
2764         haifa_classify_insn, no_real_insns_p,
2765         sched_insn_is_legitimate_for_speculation_p, sd_next_list,
2766         sd_lists_size, sd_lists_empty_p): Likewise.
2767         * sdbout.c (sdb_debug_hooks): Likewise.
2768         * tree-cfg.c (tree_can_merge_blocks_p, is_ctrl_altering_stmt,
2769         stmt_ends_bb_p, tree_can_remove_branch_p, tree_can_duplicate_bb_p,
2770         -tree_block_ends_with_call_p, tree_block_ends_with_condjump_p):
2771         Likewise.
2772         * tree-eh.c (lookup_stmt_eh_region_fn, lookup_stmt_eh_region,
2773         tree_can_throw_internal): Likewise.
2774         * tree-flow-inline.h (phi_nodes): Likewise.
2775         * tree-flow.h (phi_nodesstmt_ends_bb_p, is_ctrl_altering_stmt,
2776         tree_can_throw_internal, lookup_stmt_eh_region): Likewise.
2777         * tree-gimple.c (const_get_call_expr_in): Likewise.
2778         * tree-gimple.h (const_get_call_expr_in): Likewise.
2779         * tree.c (const_lookup_attribute, attribute_list_equal,
2780         attribute_list_contained): Likewise.
2781         * tree.h (attribute_list_equal, attribute_list_contained,
2782         const_lookup_attribute): Likewise.
2783         * vmsdbgout.c (vmsdbgout_ignore_block): Likewise.
2784
2785 2007-08-26  Bernhard Fischer  <aldot@gcc.gnu.org>
2786
2787         * tree-ssa-sccvn.c, tree-ssa-sccvn.h, tree-vn.c,
2788         tree-ssa-pre.c: Remove unnecessary trailing whitespace.
2789
2790 2007-08-26  H.J. Lu  <hongjiu.lu@intel.com>
2791
2792         PR target/32991
2793         * config/alpha/constraints.md: Delete "svn:mime-type" property
2794         with svn propdel "svn:mime-type".
2795
2796 2007-08-26  H.J. Lu  <hongjiu.lu@intel.com>
2797
2798         PR middle-end/33181
2799         * ifcvt.c (noce_get_alt_condition): Make sure that the previous
2800         non NOTE insn doesn't cross basic block.
2801         (noce_try_abs): Likewise.
2802         (noce_process_if_block): Likewise.
2803
2804 2007-08-26  David Edelsohn  <edelsohn@gnu.org>
2805
2806         PR target/33151
2807         * config/rs6000/predicates.md (offsettable_mem_operand): Memory
2808         operand without auto-inc-dec.
2809         * config/rs6000/rs6000.md (floatsidf2_internal): Use
2810         offsettable_mem_operand.
2811         (floatunssidf2_internal): Same.
2812         (fix_truncdfsi2_internal): Same.
2813         (floatsidf_ppc64): Same.
2814         (floatunssidf_ppc64): Same.
2815         (fix_trunctfsi2_internal): Same.
2816
2817 2007-08-26  Bernhard Fischer  <aldot@gcc.gnu.org>
2818
2819         PR bootstrap/30620
2820         * Makefile.in (libbackend.o): Add gcov-iov.h dependency and
2821         pass defines needed for version.c.
2822
2823 2007-08-25  Joseph Myers  <joseph@codesourcery.com>
2824
2825         * configure.ac (--debug-prefix-map check): Change assembler
2826         version presumed to have feature to 2.18.
2827         * configure: Regenerate.
2828
2829 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2830
2831         * c-common.c (vector_types_convertible_p,
2832         decl_with_nonnull_addr_p, c_promoting_integer_type_p,
2833         self_promoting_args_p): Constify.
2834         * c-common.h (has_c_linkage, decl_with_nonnull_addr_p,
2835         c_promoting_integer_type_p, self_promoting_args_p,
2836         anon_aggr_type_p, vector_types_convertible_p): Likewise.
2837         * c-decl.c (anon_aggr_type_p): Likewise.
2838         * * c-dump.c (dump_stmt): Likewise.
2839         * c-objc-common.c (has_c_linkage): Likewise.
2840         * c-tree.h (same_translation_unit_p): Likewise.
2841         * c-typeck.c (null_pointer_constant_p,
2842         tagged_types_tu_compatible_p, function_types_compatible_p,
2843         type_lists_compatible_p, lvalue_or_else, lvalue_p,
2844         comptypes_internal, struct tagged_tu_seen_cache,
2845         same_translation_unit_p, alloc_tagged_tu_seen_cache,
2846         c_size_in_bytes): Likewise.
2847         * ggc-common.c (compare_ptr_data, hash_descriptor, eq_descriptor,
2848         hash_ptr, eq_ptr): Likewise.
2849         * langhooks-def.h (lhd_decl_ok_for_sibcall,
2850         LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Likewise.
2851         * langhooks.c (lhd_decl_ok_for_sibcall): Likewise.
2852         * langhooks.h (ok_for_sibcall, omp_privatize_by_reference):
2853         Likewise.
2854         * optabs.c (optab_for_tree_code): Likewise.
2855         * optabs.h (optab_for_tree_code): Likewise.
2856         * rtl.h (simplify_rtx): Likewise.
2857         * simplify-rtx.c (simplify_rtx): Likewise.
2858         * tree-dump.c (queue, queue_and_dump_index, queue_and_dump_type,
2859         dump_flag, dump_node): Likewise.
2860         * tree-dump.h (struct dump_info, dump_stmt, queue_and_dump_index,
2861         queue_and_dump_type, dump_flag): Likewise.
2862         * tree-flow.h (vect_can_force_dr_alignment_p): Likewise.
2863         * tree-pass.h (dump_node): Likewise.
2864         * tree-vectorizer.c (vect_can_force_dr_alignment_p,
2865         supportable_narrowing_operation): Likewise.
2866         * tree-vectorizer.h (vect_can_force_dr_alignment_p,
2867         supportable_narrowing_operation): Likewise.
2868         * tree-vrp.c (needs_overflow_infinity, supports_overflow_infinity,
2869         is_negative_overflow_infinity, is_positive_overflow_infinity,
2870         is_overflow_infinity, vrp_val_is_max, vrp_val_is_min,
2871         nonnull_arg_p, get_value_range, vrp_operand_equal_p,
2872         update_value_range, add_equivalence, ssa_name_nonnegative_p,
2873         ssa_name_nonzero_p, fp_predicate): Likewise.
2874         * tree.c (auto_var_in_fn_p, empty_body_p): Likewise.
2875         * tree.h (empty_body_p, auto_var_in_fn_p, ssa_name_nonzero_p,
2876         ssa_name_nonnegative_p): Likewise.
2877
2878 2007-08-25  Hans Kester  <hans.kester@ellips.nl>
2879
2880         * config.gcc : Add x86_64-elf target.
2881
2882 2007-08-25  Jakub Jelinek  <jakub@redhat.com>
2883
2884         * expr.c (store_expr): Fix order of store_by_pieces arguments.
2885
2886 2007-08-24  Sandra Loosemore  <sandra@codesourcery.com>
2887             Nigel Stephens <nigel@mips.com>
2888
2889         PR target/11787
2890
2891         * doc/tm.texi (SET_RATIO, SET_BY_PIECES_P): Document new macros.
2892         (STORE_BY_PIECES_P): No longer applies to __builtin_memset.
2893         * expr.c (SET_BY_PIECES_P): Define.
2894         (can_store_by_pieces, store_by_pieces): Add MEMSETP argument; use
2895         it to decide whether to use SET_BY_PIECES_P or STORE_BY_PIECES_P.
2896         (store_expr): Pass MEMSETP argument to can_store_by_pieces and
2897         store_by_pieces.
2898         * expr.h (SET_RATIO): Define.
2899         (can_store_by_pieces, store_by_pieces): Update prototypes.
2900         * builtins.c (expand_builtin_memcpy): Pass MEMSETP argument to
2901         can_store_by_pieces/store_by_pieces.
2902         (expand_builtin_memcpy_args): Likewise.
2903         (expand_builtin_strncpy): Likewise.
2904         (expand_builtin_memset_args): Likewise.  Also remove special case
2905         for optimize_size so that can_store_by_pieces/SET_BY_PIECES_P can
2906         decide what to do instead.
2907         * value-prof.c (tree_stringops_transform): Pass MEMSETP argument
2908         to can_store_by_pieces.
2909
2910         * config/sh/sh.h (SET_BY_PIECES_P): Clone from STORE_BY_PIECES_P.
2911         * config/s390/s390.h (SET_BY_PIECES_P): Likewise.
2912
2913         * config/mips/mips.opt (mmemcpy): Change from Var to Mask.
2914         * config/mips/mips.c (override_options): Make -Os default to -mmemcpy.
2915         * config/mips/mips.h (MIPS_CALL_RATIO): Define.
2916         (MOVE_RATIO, CLEAR_RATIO, SET_RATIO): Define.
2917         (STORE_BY_PIECES_P): Define.
2918
2919 2007-08-24  Tom Tromey  <tromey@redhat.com>
2920
2921         * varpool.c (varpool_last_needed_node): Fix comment typo.
2922         * c-decl.c (duplicate_decls): Fix comment typo.
2923         (clone_underlying_type): Update comment.
2924
2925 2007-08-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2926
2927         * config/alpha/alpha.c (alpha_mangle_type, decl_has_samegp,
2928         alpha_in_small_data_p, alpha_split_complex_arg,
2929         alpha_stdarg_optimize_hook, TARGET_ASM_CAN_OUTPUT_MI_THUNK):
2930         Constify.
2931         * config/arm/arm-protos.h (arm_mangle_type): Likewise.
2932         * config/arm/arm.c (arm_comp_type_attributes, arm_mangle_type):
2933         Likewise.
2934         * config/bfin/bfin.c (funkind, bfin_comp_type_attributes,
2935         TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise.
2936         * config/darwin-protos.h (darwin_binds_local_p): Likewise.
2937         * config/darwin.c (darwin_binds_local_p): Likewise.
2938         * config/frv/frv.c (frv_string_begins_with, frv_in_small_data_p):
2939         Likewise.
2940         * config/i386/i386-protos.h (i386_pe_binds_local_p,
2941         i386_pe_valid_dllimport_attribute_p): Likewise.
2942         * config/i386/i386.c (ix86_function_regparm,
2943         ix86_comp_type_attributes, ix86_ms_bitfield_layout_p,
2944         x86_can_output_mi_thunk, ix86_mangle_type,
2945         TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise.
2946         * config/i386/winnt.c (i386_pe_valid_dllimport_attribute_p,
2947         i386_pe_binds_local_p): Likewise.
2948         * config/ia64/ia64.c
2949         (ia64_first_cycle_multipass_dfa_lookahead_guard_spec,
2950         ia64_needs_block_p, ia64_in_small_data_p, ia64_mangle_type,
2951         ia64_invalid_conversion, ia64_invalid_unary_op,
2952         ia64_invalid_binary_op, TARGET_ASM_CAN_OUTPUT_MI_THUNK):
2953         Likewise.
2954         * config/m32c/m32c.c (m32c_comp_type_attributes): Likewise.
2955         * config/m32r/m32r.c (m32r_in_small_data_p): Likewise.
2956         * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise.
2957         * config/mips/mips.c (mips_use_blocks_for_constant_p,
2958         mips_in_small_data_p, mips_use_anchors_for_symbol_p,
2959         mips_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK,
2960         mips_near_type_p, mips_far_type_p, mips_global_symbol_p,
2961         mips_symbol_binds_local_p, mips_classify_symbol): Likewise.
2962         * config/pa/pa.c (pa_commutative_p): Likewise.
2963         * config/rs6000/rs6000-protos.h (rs6000_elf_in_small_data_p):
2964         Likewise.
2965         * config/rs6000/rs6000.c (rs6000_invalid_within_doloop,
2966         rs6000_ms_bitfield_layout_p, rs6000_mangle_type,
2967         rs6000_use_blocks_for_constant_p,
2968         rs6000_vector_alignment_reachable, rs6000_is_opaque_type,
2969         invalid_arg_for_unprototyped_fn, TARGET_ASM_CAN_OUTPUT_MI_THUNK,
2970         TARGET_SPLIT_COMPLEX_ARG, rs6000_elf_in_small_data_p): Likewise.
2971         * config/s390/s390.c (s390_mangle_type,
2972         TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_INVALID_WITHIN_DOLOOP):
2973         Likewise.
2974         * config/score/score.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK,
2975         th_in_small_data_p): Likewise.
2976         * config/sh/sh.c (sh_ms_bitfield_layout_p,
2977         sh_dwarf_calling_convention, TARGET_ASM_CAN_OUTPUT_MI_THUNK):
2978         Likewise.
2979         * config/sparc/sparc.c (sparc_can_output_mi_thunk,
2980         sparc_mangle_type): Likewise.
2981         * config/spu/spu.c (spu_vector_alignment_reachable): Likewise.
2982         * config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): Likewise.
2983         * emit-rtl.c (const_fixed_htab_hash, const_fixed_htab_eq):
2984         Likewise.
2985         * hooks.c (hook_bool_mode_const_rtx_false,
2986         hook_bool_mode_const_rtx_true,
2987         hook_bool_const_tree_hwi_hwi_const_tree_false,
2988         hook_bool_const_tree_hwi_hwi_const_tree_true,
2989         hook_int_const_tree_0, hook_int_const_tree_const_tree_1,
2990         hook_constcharptr_const_tree_null,
2991         hook_constcharptr_const_rtx_null,
2992         hook_constcharptr_const_tree_const_tree_null,
2993         hook_constcharptr_int_const_tree_null,
2994         hook_constcharptr_int_const_tree_const_tree_null): New.
2995         (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true,
2996         hook_bool_tree_hwi_hwi_tree_false,
2997         hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0,
2998         hook_int_tree_tree_1, hook_constcharptr_tree_null,
2999         hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null,
3000         hook_constcharptr_int_tree_null,
3001         hook_constcharptr_int_tree_tree_null): Delete.
3002         (default_can_output_mi_thunk_no_vcall): Constify.
3003         * hooks.h (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true,
3004         hook_bool_tree_hwi_hwi_tree_false,
3005         hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0,
3006         hook_int_tree_tree_1, hook_constcharptr_tree_null,
3007         hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null,
3008         hook_constcharptr_int_tree_null,
3009         hook_constcharptr_int_tree_tree_null): Delete.
3010         (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true,
3011         hook_bool_const_tree_hwi_hwi_const_tree_false,
3012         hook_bool_const_tree_hwi_hwi_const_tree_true,
3013         hook_int_const_tree_0, hook_int_const_tree_const_tree_1,
3014         hook_constcharptr_const_tree_null,
3015         hook_constcharptr_const_rtx_null,
3016         hook_constcharptr_const_tree_const_tree_null,
3017         hook_constcharptr_int_const_tree_null,
3018         hook_constcharptr_int_const_tree_const_tree_null): New.
3019         (default_can_output_mi_thunk_no_vcall): Constify.
3020         * integrate.c (function_attribute_inlinable_p): Likewise.
3021         * integrate.h (function_attribute_inlinable_p): Likewise.
3022         * jump.c (rtx_renumbered_equal_p): Likewise.
3023         * output.h (decl_readonly_section, categorize_decl_for_section,
3024         default_use_anchors_for_symbol_p, default_binds_local_p,
3025         default_binds_local_p_1): Likewise.
3026         * rtl.h (rtx_renumbered_equal_p, decl_default_tls_model):
3027         Likewise.
3028         * target-def.h (TARGET_ASM_CAN_OUTPUT_MI_THUNK,
3029         TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, TARGET_VECTOR_OPAQUE_P,
3030         TARGET_COMMUTATIVE_P, TARGET_USE_BLOCKS_FOR_CONSTANT_P,
3031         TARGET_COMP_TYPE_ATTRIBUTES,
3032         TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P,
3033         TARGET_MS_BITFIELD_LAYOUT_P, TARGET_MANGLE_TYPE,
3034         TARGET_IN_SMALL_DATA_P, TARGET_INVALID_CONVERSION,
3035         TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP,
3036         TARGET_DWARF_CALLING_CONVENTION): Likewise.
3037         * target.h (can_output_mi_thunk, needs_block_p,
3038         first_cycle_multipass_dfa_lookahead_guard_spec,
3039         vector_alignment_reachable, comp_type_attributes,
3040         function_attribute_inlinable_p, ms_bitfield_layout_p, mangle_type,
3041         commutative_p, use_blocks_for_constant_p,
3042         use_anchors_for_symbol_p, in_small_data_p, binds_local_p,
3043         vector_opaque_p, dwarf_calling_convention, stdarg_optimize_hook,
3044         invalid_within_doloop, valid_dllimport_attribute_p,
3045         split_complex_arg, invalid_arg_for_unprototyped_fn,
3046         invalid_conversion, invalid_unary_op, invalid_binary_op):
3047         Likewise.
3048         * targhooks.c (default_invalid_within_doloop,
3049         hook_invalid_arg_for_unprototyped_fn,
3050         default_builtin_vector_alignment_reachable): Likewise.
3051         (hook_bool_rtx_commutative_p): Delete.
3052         (hook_bool_const_rtx_commutative_p): New.
3053         * targhooks.h (default_invalid_within_doloop,
3054         default_builtin_vector_alignment_reachable,
3055         hook_invalid_arg_for_unprototyped_fn): Constify.
3056         (hook_bool_rtx_commutative_p): Delete.
3057         (hook_bool_const_rtx_commutative_p): New.
3058         * varasm.c (bss_initializer_p, decl_default_tls_model,
3059         categorize_decl_for_section, decl_readonly_section,
3060         default_use_anchors_for_symbol_p, default_binds_local_p,
3061         default_binds_local_p_1): Constify.
3062
3063 2007-08-24  Jie Zhang  <jie.zhang@analog.com>
3064
3065         * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Define
3066         __NO_BUILTIN if -fno-builtin.
3067
3068 2007-08-24  Jie Zhang  <jie.zhang@analog.com>
3069
3070         * config/bfin/bfin.c (print_operand): Report error instead of
3071         ICE for wrong operand.
3072
3073 2007-08-24  Michael Matz  <matz@suse.de>
3074
3075         * Makefile.in (GTFILES_H): Use $(patsubst) instead of $(subst).
3076
3077 2007-08-24  Richard Guenther  <rguenther@suse.de>
3078
3079         PR middle-end/33166
3080         * tree-ssa.c (useless_type_conversion_p): Split into a
3081         recursive and a non-recursive part.
3082         (useless_type_conversion_p_1): New function.
3083         * tree-ssa-ccp.c (fold_stmt_r): Make sure that the result
3084         from maybe_fold_offset_to_reference is trivially convertible
3085         to the desired type before doing the simplification.
3086
3087 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
3088
3089         * expr.c (store_expr): Optimize initialization of an array
3090         with STRING_CST.
3091         * expr.h (builtin_strncpy_read_str): New prototype.
3092         * builtins.c (builtin_strncpy_read_str): Remove prototype.
3093         No longer static.
3094
3095 2007-08-24  Uros Bizjak  <ubizjak@gmail.com>
3096
3097         PR middle-end/33157
3098         * ifcvt.c (noce_find_if_block): Do not clear if_info.cond_earliest
3099         field when initializing if_info structure.
3100
3101 2007-08-24  Richard Guenther  <rguenther@suse.de>
3102
3103         * Makefile.in (tree-inline.o): Add $(TARGET_H) and $(INTEGRATE_H)
3104         dependencies.
3105         * c-objc-common.c (c_cannot_inline_tree_fn): Remove.
3106         * langhooks.c (lhd_tree_inlining_cannot_inline_tree_fn): Likewise.
3107         * tree-inline.c (inlinable_function_p): Fold in common parts of
3108         the cannot_inline_tree_fn langhook.
3109         * langhooks-def.h (lhd_tree_inlining_cannot_inline_tree_fn): Remove.
3110         (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN): Likewise.
3111         (LANG_HOOKS_TREE_INLINING_INITIALIZER): Remove initializer for
3112         cannot_inline_tree_fn langhook.
3113         * langhooks.h (struct lang_hooks_for_tree_inlining): Remove
3114         cannot_inline_tree_fn member.
3115
3116 2007-08-24  Richard Guenther  <rguenther@suse.de>
3117
3118         * expr.c (get_inner_reference): Do computation of bitoffset
3119         from offset in a way we can detect overflow reliably.
3120
3121 2007-08-24  Jie Zhang  <jie.zhang@analog.com>
3122
3123         * crtstuff.c (USE_PT_GNU_EH_FRAME): Don't define for uClibc.
3124
3125 2007-08-24  Jie Zhang  <jie.zhang@analog.com>
3126
3127         * config/bfin/bfin.opt (mfast-fp): Add.
3128         * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Let
3129         libbffastfp override libgcc if -mfast-fp.
3130         * config/bfin/bfin.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
3131         * doc/invoke.texi (Option Summary): Mention -mfast-fp.
3132         (Blackfin Options): Document -mfast-fp.
3133
3134 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
3135
3136         PR tree-optimization/32573
3137         PR middle-end/32946
3138         * tree-data-ref.c (initialize_data_dependence_relation): Clear
3139         DDR_SUBSCRIPTS, DDR_DIR_VECTS and DDR_DIST_VECTS at the beginning.
3140         (finalize_ddr_dependent): Clear DDR_SUBSCRIPTS after freeing it.
3141         (build_classic_dist_vector): Return false rather than true if
3142         DDR_ARE_DEPENDENT is non-NULL at the beginning.  Return false
3143         if either subscript_dependence_tester_1 or build_classic_dist_vector_1
3144         returned false.  Don't call save_dist_v before calling
3145         build_classic_dist_vector_1.
3146         (free_dependence_relation): Don't guard freeing DDR_SUBSCRIPTS
3147         with NULL DDR_ARE_DEPENDENT.  Also free DDR_DIST_VECTS and/or
3148         DDR_DIR_VECTS vectors.
3149
3150 2007-08-23  Brian Sidebotham  <brian.sidebotham@gmail.com>
3151
3152         * configure.ac (leb128): Modify sed statement to work with any
3153         binutils version string.
3154         * configure: Regenerate
3155
3156 2007-08-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3157
3158         * config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg):
3159         Wrap in RTX_CODE macro guard.
3160         * config/arm/pe.c (arm_dllexport_p, arm_dllimport_p,
3161         arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport,
3162         arm_mark_dllimport, arm_pe_encode_section_info,
3163         arm_pe_unique_section): Use ISO-C function declarations.
3164         * config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION,
3165         c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE,
3166         c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored):
3167         Likewise.
3168         * config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning.
3169         * config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before
3170         defining.
3171         * config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format
3172         warnings.
3173         * config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise.
3174         * config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise.
3175         (register_move_cost): Use ISO-C function declarations.
3176         * config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings.
3177         * config/score/score-protos.h (score_declare_object): Add
3178         ATTRIBUTE_PRINTF_4.
3179         * config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format
3180         warnings.
3181         * final.c (profile_function): Avoid empty if-bodies.
3182         
3183         
3184         * calls.c (must_pass_in_stack_var_size,
3185         must_pass_in_stack_var_size_or_pad): Constify.
3186         * config/alpha/alpha-protos.h (function_value): Likewise.
3187         * config/alpha/alpha.c (alpha_return_in_memory,
3188         alpha_pass_by_reference, function_value,
3189         unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS,
3190         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
3191         Likewise.
3192         * config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference,
3193         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
3194         TARGET_PROMOTE_PROTOTYPES): Likewise.
3195         * config/arm/arm-protos.h (arm_return_in_memory,
3196         arm_pad_arg_upward, arm_function_value): Likewise.
3197         * config/arm/arm.c (arm_pass_by_reference,
3198         arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack,
3199         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
3200         arm_function_value, arm_return_in_memory, arm_pad_arg_upward):
3201         Likewise.
3202         * config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise.
3203         * config/avr/avr-protos.h (avr_function_value): Likewise.
3204         * config/avr/avr.c (avr_return_in_memory,
3205         gas_output_limited_string, gas_output_ascii, avr_function_value,
3206         avr_return_in_memory): Likewise.
3207         * config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise.
3208         * config/bfin/bfin.c (bfin_pass_by_reference,
3209         bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES,
3210         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN):
3211         Likewise.
3212         * config/cris/cris.c (cris_pass_by_reference,
3213         TARGET_PROMOTE_FUNCTION_ARGS): Likewise.
3214         * config/crx/crx.c (crx_return_in_memory): Likewise.
3215         * config/darwin.c (function_base, machopic_function_base_name):
3216         Likewise.
3217         * config/fr30/fr30.c (fr30_must_pass_in_stack,
3218         TARGET_PROMOTE_PROTOTYPES): Likewise.
3219         * config/frv/frv.c (frv_must_pass_in_stack): Likewise.
3220         * config/h8300/h8300.c (h8300_return_in_memory): Likewise.
3221         * config/i386/i386-protos.h (ix86_return_in_memory,
3222         ix86_sol10_return_in_memory): Likewise.
3223         * config/i386/i386.c (ix86_function_value,
3224         ix86_function_sseregparm, ix86_must_pass_in_stack,
3225         type_natural_mode, classify_argument, examine_argument,
3226         construct_container, ix86_pass_by_reference, function_value_32,
3227         function_value_64, ix86_function_value_1, return_in_memory_32,
3228         return_in_memory_64, return_in_memory_ms_64,
3229         ix86_return_in_memory, ix86_sol10_return_in_memory,
3230         TARGET_PROMOTE_PROTOTYPES): Likewise.
3231         * config/ia64/ia64-protos.h (ia64_function_value,
3232         ia64_hpux_function_arg_padding): Likewise.
3233         * config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory,
3234         ia64_function_value, bundle_state_hash, bundle_state_eq_p,
3235         ia64_hpux_function_arg_padding): Likewise.
3236         * config/iq2000/iq2000-protos.h (function_arg,
3237         iq2000_function_value): Likewise.
3238         * config/iq2000/iq2000.c (iq2000_return_in_memory,
3239         iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS,
3240         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
3241         function_arg, iq2000_function_value): Likewise.
3242         * config/m32c/m32c-protos.h (m32c_function_value,
3243         m32c_promote_function_return): Likewise.
3244         * config/m32c/m32c.c (m32c_pass_by_reference,
3245         m32c_promote_prototypes, m32c_promote_function_return,
3246         m32c_function_value): Likewise.
3247         * config/m32r/m32r.c (m32r_return_in_memory,
3248         m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES,
3249         m32r_in_small_data_p): Likewise.
3250         * config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding):
3251         Likewise.
3252         * config/m68hc11/m68hc11.c (m68hc11_return_in_memory,
3253         m68hc11_function_arg_padding): Likewise.
3254         * config/m68k/m68k-protos.h (m68k_function_value): Likewise.
3255         * config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES,
3256         m68k_function_value): Likewise.
3257         * config/mcore/mcore-protos.h (mcore_num_arg_regs,
3258         mcore_function_value): Likewise.
3259         * config/mcore/mcore.c (handle_structs_in_regs,
3260         mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS,
3261         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
3262         mcore_num_arg_regs, mcore_function_value): Likewise.
3263         * config/mips/mips-protos.h (mips_pad_arg_upward,
3264         mips_function_value): Likewise.
3265         * config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb,
3266         mips_return_in_memory, mips_pass_by_reference, mips_callee_copies,
3267         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
3268         TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward,
3269         mips_function_value): Likewise.
3270         * config/mmix/mmix-protos.h (mmix_function_outgoing_value):
3271         Likewise.
3272         * config/mmix/mmix.c (mmix_pass_by_reference,
3273         TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value,
3274         mmix_encode_section_info): Likewise.
3275         * config/mn10300/mn10300-protos.h (mn10300_function_value):
3276         Likewise.
3277         * config/mn10300/mn10300.c (mn10300_return_in_memory,
3278         mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES,
3279         mn10300_function_value): Likewise.
3280         * config/mt/mt-protos.h (mt_function_value): Likewise.
3281         * config/mt/mt.c (mt_pass_by_reference, mt_function_value,
3282         mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise.
3283         * config/pa/pa-protos.h (function_arg_padding, function_value,
3284         pa_return_in_memory): Likewise.
3285         * config/pa/pa.c (pa_pass_by_reference,
3286         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
3287         function_arg_padding, function_value, pa_return_in_memory):
3288         Likewise.
3289         * config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise.
3290         * config/rs6000/rs6000-protos.h (rs6000_function_value,
3291         function_arg_padding): Likewise.
3292         * config/rs6000/rs6000.c (rs6000_return_in_memory,
3293         rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg,
3294         rs6000_pass_by_reference, rs6000_must_pass_in_stack,
3295         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
3296         function_arg_padding, altivec_expand_dst_builtin,
3297         altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins,
3298         altivec_init_builtins, rs6000_common_init_builtins,
3299         rs6000_function_value): Likewise.
3300         * s390/s390-protos.h (s390_function_value): Likewise.
3301         * config/s390/s390.c (s390_function_arg_size,
3302         s390_pass_by_reference, s390_return_in_memory,
3303         s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS,
3304         TARGET_PROMOTE_FUNCTION_RETURN): Likewise.
3305         * config/score/score-protos.h (score_function_value): Likewise.
3306         * config/score/score.c (score_arg_partial_bytes,
3307         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
3308         TARGET_PROMOTE_PROTOTYPES, score_return_in_memory,
3309         score_pass_by_reference, score_add_offset, score_function_value):
3310         Likewise.
3311         * config/sh/sh-protos.h (sh_attr_renesas_p,
3312         sh_promote_prototypes): Likewise.
3313         * config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference,
3314         sh_callee_copies, sh_promote_prototypes, shcompact_byref,
3315         sh_attr_renesas_p): Likewise.
3316         * config/sparc/sparc-protos.h (function_value,
3317         function_arg_padding): Likewise.
3318         * config/sparc/sparc.c (sparc_promote_prototypes,
3319         sparc_return_in_memory, sparc_pass_by_reference,
3320         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
3321         function_arg_record_value_2, function_arg_record_value_1,
3322         function_arg_record_value, function_arg_record_value,
3323         function_arg_padding, function_value): Likewise.
3324         * config/spu/spu-protos.h (spu_function_value): Likewise.
3325         * config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory,
3326         spu_function_value): Likewise.
3327         * config/stormy16/stormy16-protos.h (xstormy16_function_value):
3328         Likewise.
3329         * config/stormy16/stormy16.c (xstormy16_return_in_memory,
3330         xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS,
3331         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
3332         Likewise.
3333         * config/v850/v850.c (v850_return_in_memory,
3334         v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise.
3335         * config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise.
3336         * config/xtensa/xtensa.c (xtensa_return_in_msb,
3337         xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS,
3338         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
3339         Likewise.
3340         * explow.c (promote_mode, hard_function_value): Likewise.
3341         * expr.h (hard_function_value, promote_mode): Likewise.
3342         * function.c (aggregate_value_p): Likewise.
3343         * hooks.c (hook_bool_const_tree_true): New.
3344         * hooks.h (hook_bool_const_tree_true): New.
3345         * sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify.
3346         * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS,
3347         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
3348         TARGET_RETURN_IN_MSB): Likewise.
3349         * target.h (promote_function_args, promote_function_return,
3350         promote_prototypes, return_in_memory, return_in_msb,
3351         pass_by_reference, must_pass_in_stack, callee_copies,
3352         function_value): Likewise.
3353         * targhooks.c (default_return_in_memory,
3354         hook_pass_by_reference_must_pass_in_stack,
3355         hook_callee_copies_named,
3356         hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false,
3357         hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true,
3358         default_function_value): Likewise. 
3359         * targhooks.h (default_return_in_memory,
3360         hook_pass_by_reference_must_pass_in_stack,
3361