OSDN Git Service

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