Commit Graph

2604 Commits

Author SHA1 Message Date
Nick Clifton 4c85af60e8 COPYING_v3: New file.
* COPYING_v3: New file.  Contains version 3 of the GNU General Public License.
* COPYING.LIB_v3: New file.  Contains version 3 of the GNU Lesser General Public License.
* gpl_v3.texi: New file.  Contains a texinfo formated copy of the GNU General Public License, version 3.

From-SVN: r126701
2007-07-17 08:37:53 +00:00
Rainer Orth 40f5cc95ab re PR bootstrap/3456 (bootstrapping gcc-3.0 with threadmodel=posix fails on IRIX64 6.5)
gcc:
	PR bootstrap/3456
	* config.gcc (mips-sgi-irix[56]*): Enable pthread support.
	* doc/install.texi (mips-sgi-irix6): pthread support works now.

	libstdc++-v3:
	PR bootstrap/3456
	* testsuite/22_locale/locale/cons/12658_thread-1.cc: Enable on
	mips-sgi-irix6*.
	* testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise.
	* testsuite/thread/18185.cc: Likewise.
	* testsuite/thread/pthread1.cc: Likewise.
	* testsuite/thread/pthread2.cc: Likewise.
	* testsuite/thread/pthread3.cc: Likewise.
	* testsuite/thread/pthread4.cc: Likewise.
	* testsuite/thread/pthread5.cc: Likewise.
	* testsuite/thread/pthread6.cc: Likewise.
	* testsuite/thread/pthread7-rope.cc: Likewise.
	* testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc: Likewise.
	* testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.

From-SVN: r126685
2007-07-16 17:21:10 +00:00
H.J. Lu 248f01d465 re PR other/32188 (DFP instrinic document is out of date)
2007-07-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR other/32188
	* doc/libgcc.texi: Update DFP intrinsics for DPD and BID.

From-SVN: r126619
2007-07-13 06:22:10 -07:00
Geoffrey Keating 1617e5eedc Index: gcc/ChangeLog
2007-07-12  Geoffrey Keating  <geoffk@apple.com>

	* ginclude/tgmath.h: New.
	* config.gcc: Use GCC's tgmath.h on non-glibc systems.
	* doc/sourcebuild.texi (Headers): Document use_gcc_tgmath.
	* configure.ac (STMP_FIXPROTO): Honor use_gcc_tgmath.
	* configure: Regenerate.

Index: gcc/testsuite/ChangeLog
2007-07-11  Geoffrey Keating  <geoffk@apple.com>

	* gcc.dg/c99-tgmath-1.c: New.
	* gcc.dg/c99-tgmath-2.c: New.
	* gcc.dg/c99-tgmath-3.c: New.
	* gcc.dg/c99-tgmath-4.c: New.

From-SVN: r126613
2007-07-13 06:12:51 +00:00
Kenneth Zadeck ef4375b218 toplev.c (no_new_pseudos): Deleted.
2007-07-11  Kenneth Zadeck <zadeck@naturalbridge.com>

	* toplev.c (no_new_pseudos): Deleted.
	* rtl.h (no_new_pseudos): Deleted.
	* tree-pass.h (pass_no_new_pseudos): Deleted. 
	* passes.c (pass_no_new_pseudos): Deleted.
	* final.c (rest_of_clean_state): Removed no_new_pseudos.
	(rest_of_no_new_pseudos, pass_no_new_pseudos): Deleted.
	* struct-equiv.c (rtx_equiv_p): Replaced no_new_pseudos with 
	reload_completed.
	* cfgcleanup.c (try_crossjump_to_edge): Ditto. 
	* rtlhooks.c (gen_lowpart_general): Ditto.
	* optabs.c (prepare_operand): Ditto.
	* mode-switching.c (rest_of_handle_mode_switching): Deleted set of
	no_new_pseudos.
	* modulo-sched.c (rest_of_handle_sms): Ditto.
	* see.c (rest_of_handle_see): Ditto.
	* ifcvt.c (if_convert): Ditto.
	(gate_handle_if_after_combine): Replaced no_new_pseudos with 
	reload_completed.
	* init-regs.c (gate_initialize_regs): Deleted set of
	no_new_pseudos.
	* lower-subreg.c (decompose_multiword_subregs): Ditto. 
	* bb-reorder.c (rest_of_handle_partition_blocks): Ditto.
	* doc/md.texi: Changed no_new_pseudos to can_create_pseudo_p.

From-SVN: r126561
2007-07-11 22:57:51 +00:00
Douglas Gregor 7313518b90 params.def (PARAM_VERIFY_CANONICAL_TYPES): Remove.
2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>

       * params.def (PARAM_VERIFY_CANONICAL_TYPES): Remove.
       (PARAM_USE_CANONICAL_TYPES): New; decides whether to use canonical
       types or not.
       * params.h (VERIFY_CANONICAL_TYPES): Remove.
       (USE_CANONICAL_TYPES): New.
       * doc/invoke.texi (verify-canonical-types): Remove.
       (use-canonical-types): Add.

2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>

       * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
       canonical types; otherwise, fall back to structural type
       comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
       internal compiler error if the canonical types are wrong.

From-SVN: r126550
2007-07-11 13:50:13 +00:00
Eric Botcazou c2979eaf57 re PR tree-optimization/32589 (exp_dbug.adb:981: error: invalid array index)
PR tree-optimization/32589
	* doc/tree-ssa.texi (Rough GIMPLE Grammar): Add missing rule.
	* tree-gimple.c (is_gimple_min_invariant): Clarify head comment.
	* tree-ssa-propagate.c (valid_gimple_expression_p): New
	predicate, extracted from...
	(set_rhs): ...here.  Call it for the expression on entry.
	* tree-ssa-propagate.h (valid_gimple_expression_p): Declare.
	* tree-ssa-sccvn.c: Include tree-ssa-propagate.h.
	(simplify_binary_expression): Use valid_gimple_expression_p
	to validate the simplification.
	* Makefile.in (tree-ssa-sccvn.o): Depends on tree-ssa-propagate.h.

From-SVN: r126545
2007-07-11 09:43:25 +00:00
David Daney 677feb77ce builtins.def (BUILT_IN_CLEAR_CACHE): New builtin.
2007-07-10  David Daney  <ddaney@avtrex.com>

	* builtins.def (BUILT_IN_CLEAR_CACHE): New builtin.
	* builtins.c (expand_builtin___clear_cache): New function.
	(expand_builtin): Call expand_builtin___clear_cache for
	BUILT_IN_CLEAR_CACHE case.
	* doc/extend.texi (__builtin___clear_cache): Document new builtin.
	* doc/md.texi (clear_cache): Document new instruction pattern.
	* testsuite/gcc.dg/builtins-64.c: New test.

From-SVN: r126535
2007-07-11 04:13:10 +00:00
Geoffrey Keating 837edd5f11 re PR bootstrap/32617 (explow.c references DECL_ALIGN of a FUNCTION_DECL)
2007-07-09  Geoffrey Keating  <geoffk@apple.com>

	PR 32617
	* c-common.c (c_alignof_expr): Look at DECL_ALIGN of
	FUNCTION_DECLs.
	(handle_aligned_attribute): Allow use on FUNCTION_DECLs.
	* varasm.c (assemble_start_function): Honor DECL_ALIGN
	for FUNCTION_DECLs.  Don't use align_functions_log if
	DECL_USER_ALIGN.
	* print-tree.c (print_node): Print DECL_ALIGN and DECL_USER_ALIGN
	even for FUNCTION_DECLs.
	* c-decl.c (merge_decls): Propagate DECL_ALIGN even for
	FUNCTION_DECLs.
	* tree.h (DECL_ALIGN): Update for new location of 'align'.
	(DECL_FUNCTION_CODE): Update for new location and name of
	'function_code'.
	(DECL_OFFSET_ALIGN): Update for new location of 'off_align'.
	(struct tree_decl_common): Move 'align' and 'off_align' out
	of union, ensure they're still on a 32-bit boundary.  Remove
	other fields in union 'u1'.
	(struct tree_function_decl): Add field 'function_code' replacing
	'u1.f' in tree_decl_common.
	* tree.c (build_decl_stat): Set initial value of DECL_ALIGN.
	* doc/extend.texi (Function Attributes): Add 'aligned' attribute.
	(Variable Attributes): Cross-reference 'aligned' attribute
	to Function Attributes.
	* flags.h (force_align_functions_log): Delete.
	* toplev.c (force_align_functions_log): Delete.

Index: gcc/testsuite/ChangeLog
2007-07-09  Geoffrey Keating  <geoffk@apple.com>

	PR 32617
	* gcc.c-torture/execute/align-3.c: New.

Index: gcc/java/ChangeLog
2007-07-09  Geoffrey Keating  <geoffk@apple.com>

	PR 32617
	* lang.c (java_init): Remove setting of force_align_functions_log.
	* class.c (add_method_1): Set DECL_ALIGN of non-static method
	to cope with ptrmemfunc_vbit_in_pfn.

Index: gcc/cp/ChangeLog
2007-07-09  Geoffrey Keating  <geoffk@apple.com>

	PR 32617
	* decl.c (cxx_init_decl_processing): Don't set
	force_align_functions_log.
	(grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
	* typeck.c (cxx_alignof_expr): When alignof is used on a plain
	FUNCTION_DECL, return its alignment.

From-SVN: r126529
2007-07-10 23:08:52 +00:00
Uros Bizjak 13c594155d re PR target/27855 (reassociation causes the RA to be confused)
PR target/27855
        * doc/extend.texi: Add ftree-reassoc flag.
        * common.opt (ftree-reassoc): New flag.
        * tree-ssa-reassoc.c (gate_tree_ssa_reassoc): New static function.
        (struct tree_opt_pass pass_reassoc): Use gate_tree_ssa_reassoc.

From-SVN: r126491
2007-07-09 21:22:03 +02:00
Andreas Schwab 9f06d33079 * doc/invoke.texi (DEC Alpha/VMS Options): Fix typo.
From-SVN: r126462
2007-07-08 16:06:33 +00:00
Sandra Loosemore 170ea7b948 revert: c-opts.c (c_common_handle_option): Make DOLLARS_IN_IDENTIFIERS apply to assembly language, too.
2007-07-08  Sandra Loosemore  <sandra@codesourcery.com>

	Revert this patch:
	2007-07-06  Sandra Loosemore  <sandra@codesourcery.com>

	* c-opts.c (c_common_handle_option): Make DOLLARS_IN_IDENTIFIERS
	apply to assembly language, too.
	* doc/tm.texi (DOLLARS_IN_IDENTIFIERS): Update.

From-SVN: r126458
2007-07-08 09:46:20 -04:00
Eric Weddington 0e8eb4d81e constraints.md (define_memory_constraint "Q"): Fix the constraint description.
* config/avr/constraints.md (define_memory_constraint "Q"): Fix
	the constraint description.
	* doc/md.texi: Update documentation of AVR constraints.

From-SVN: r126448
2007-07-07 23:55:12 +04:00
Kazu Hirata 6ed3da0066 auto-inc-dec.c, [...]: Fix comment typos.
* auto-inc-dec.c, config/arm/arm.c,
	config/m32r/constraints.md, config/mips/mips.md,
	config/rs6000/rs6000.c, cselib.c, dce.c, df-core.c,
	df-problems.c, df-scan.c, df.h, dse.c, gimplify.c,
	tree-if-conv.c, tree-ssa-sccvn.c, tree-ssa.c: Fix comment
	typos.  Follow spelling conventions.
	* doc/invoke.texi, doc/rtl.texi: Fix typos.

From-SVN: r126439
2007-07-07 13:00:43 +00:00
Sandra Loosemore 984defeb6c c-opts.c (c_common_handle_option): Make DOLLARS_IN_IDENTIFIERS apply to assembly language, too.
2007-07-06  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* c-opts.c (c_common_handle_option): Make DOLLARS_IN_IDENTIFIERS
	apply to assembly language, too.
	* doc/tm.texi (DOLLARS_IN_IDENTIFIERS): Update.

From-SVN: r126427
2007-07-06 18:08:40 -04:00
Andreas Krebbel c7ff6e7a7a libgcc2.h (word_type): Type definition removed.
2007-07-06  Andreas Krebbel  <krebbel1@de.ibm.com>

	* libgcc2.h (word_type): Type definition removed.
	(cmp_return_type, shift_count_type): Type definitions added.
	(__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter
	replaced with shift_count_type.
	(__cmpdi2, __ucmpdi2): word_type of return type replaced with
	cmp_return_type.
	* libgcc2.c (__udivmoddi4, __moddi3): Type of local variable c
	changed from word_type to Wtype.
	(__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter
	replaced with shift_count_type.
	(__cmpdi2, __ucmpdi2): word_type of return type replaced with
	cmp_return_type.
	* c-common.c (handle_mode_attribute): Handling for libgcc_cmp_return and
	libgcc_shift_count attribute added.
	* target-def.h (TARGET_LIBGCC_CMP_RETURN_MODE,
	TARGET_LIBGCC_SHIFT_COUNT_MODE): New target hooks defined.
	(TARGET_INITIALIZER): New target hooks added.
	* targhooks.c (default_libgcc_cmp_return_mode,
	default_libgcc_shift_count_mode): Default implementations for the new
	target hooks added.
	* targhooks.h (default_libgcc_cmp_return_mode,
	default_libgcc_shift_count_mode): Function prototypes added.
	* target.h (struct gcc_target): Fields for the new target hooks added.
	* optabs.c (expand_binop): Use shift_count_mode when expanding shift
	as library call.
	(prepare_cmp_insn): Use cmp_return_mode when expanding comparison as
	library call.

	* doc/tm.texi (TARGET_LIBGCC_CMP_RETURN_MODE,
	TARGET_LIBGCC_SHIFT_COUNT_MODE): Documentation added.

	* config/s390/s390.c (s390_libgcc_cmp_return_mode,
	s390_libgcc_shift_count_mode): Functions added.
	(TARGET_LIBGCC_CMP_RETURN_MODE,	TARGET_LIBGCC_SHIFT_COUNT_MODE): Target
	hooks defined.

From-SVN: r126410
2007-07-06 10:47:31 +00:00
Sandra Loosemore 52bcd4294b mips.c (mips_cpu_info): Add 4ksc and 4ksd processors.
2007-07-05  Sandra Loosemore  <sandra@codesourcery.com>
	    David Ung  <davidu@mips.com>

	gcc/
	* config/mips/mips.c (mips_cpu_info): Add 4ksc and 4ksd processors.
	* doc/invoke.texi: (MIPS Options): Document them.

Co-Authored-By: David Ung <davidu@mips.com>

From-SVN: r126371
2007-07-05 13:10:54 -04:00
Sandra Loosemore 0aa222d17b Add support for SmartMIPS ASE.
2007-07-05  Sandra Loosemore  <sandra@codesourcery.com>
	    David Ung  <davidu@mips.com>

	Add support for SmartMIPS ASE.

	gcc/
	* optabs.c (expand_binop_directly): New, broken out from...
	(expand_binop): Here.  Make it try rotating in the other
	direction even when the second operand isn't constant.
	* config/mips/mips.md (*lwxs): New.
	* config/mips/mips.opt (msmartmips): New.
	* config/mips/mips.c (mips_lwxs_address_p): New.
	(mips_rtx_costs): Make it recognize scaled indexed addressing.
	* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
	__mips_smartmips when compiling for TARGET_SMARTMIPS.
	(ISA_HAS_ROR): Define for TARGET_SMARTMIPS.
	(ISA_HAS_LWXS): New.
	(ASM_SPEC): Add -msmartmips/-mno-smartmips.
	* doc/invoke.texi (MIPS Options): Document -msmartmips/-mno-smartmips.
	* testsuite/gcc.target/mips/smartmips-lwxs.c: New test case.
	* testsuite/gcc.target/mips/smartmips-ror-1.c: New test case.
	* testsuite/gcc.target/mips/smartmips-ror-2.c: New test case.
	* testsuite/gcc.target/mips/smartmips-ror-3.c: New test case.
	* testsuite/gcc.target/mips/smartmips-ror-4.c: New test case.

Co-Authored-By: David Ung <davidu@mips.com>

From-SVN: r126370
2007-07-05 13:08:37 -04:00
Nick Clifton 67e6ba46a4 target.h (struct gcc_target): Add target_help field.
* target.h (struct gcc_target): Add target_help field.
* target-def.h (TARGET_HELP): New.
  (TARGET_INITIALIZER): Use TARGET_HELP.
* opts.c (command_handle_option): Invoke target_help function, if defined, when the 
  user has specified --target-help on the command line.
* doc/invoke.texi: Mention that --target-help might print additional information.
* doc/tm.texi: Document TARGET_HELP hook.

* arm.c (TARGET_HELP): Override default definition.
  (arm_target_help): New - display a wrapped list of cores and architectures supported.

From-SVN: r126323
2007-07-04 15:05:26 +00:00
Ben Elliston 4408237565 tm.texi (Run-time Target): Capitalise "CPU".
* doc/tm.texi (Run-time Target): Capitalise "CPU".
	(Exception Handling): Likewise.

From-SVN: r126284
2007-07-04 08:28:28 +10:00
Eric Christopher 717c4e47fb cppopts.texi: Add conflicting option note to -dM.
2007-07-03  Eric Christopher  <echristo@apple.com>

	    * doc/cppopts.texi: Add conflicting option note to -dM.
	    * doc/invoke.texi: Add note about possible conflicts with
	    -E for -dCHARS and note that -dM will not produce
	    any results if there is no machine dependent reorg.

From-SVN: r126278
2007-07-03 21:39:17 +00:00
David Ung 74d4d0244c invoke.texi: Document -march=74kf3_2.
gcc/
2007-07-03  David Ung  <davidu@mips.com>
	    Richard Sandiford  <richard@codesourcery.com>

	* doc/invoke.texi: Document -march=74kf3_2.
	* config/mips/mips.h (PROCESSOR_74KF3_2): New processor_type.
	(TUNE_74K): Check for it.
	* config/mips/mips.c (mips_cpu_info): Add 74kf3_2.
	(mips_rtx_cost_data): Add an entry for PROCESSOR_74KF3_2.
	* config/mips/mips.md (cpu): Add 74kf3_2.
	* config/mips/74k.md (r74k_int_logical, r74k_int_arith, r74k_int_nop)
	(r74k_int_cmove, r74k_int_mult, r74k_int_mul3, r74k_int_mfhilo)
	(r74k_int_mthilo, r74k_int_div, r74k_int_call, r74k_int_jump)
	(r74k_int_load, r74k_int_store, r74k_unknown, r74k_multi): Add
	74kf3_2 to the CPU list.
	(r74kf3_2_fadd, r74kf3_2_fmove, r74kf3_2_fload, r74kf3_2_fstore)
	(r74kf3_2_fmul_sf, r74kf3_2_fmul_df, r74kf3_2_fdiv_sf)
	(r74kf3_2_fdiv_df, r74kf3_2_frsqrt_sf, r74kf3_2_frsqrt_df)
	(r74kf3_2_fcmp, r74kf3_2_fcvt, r74kf3_2_fxfer_to_c1)
	(r74kf3_2_fxfer_from_c1): New insn reservations.

Co-Authored-By: Richard Sandiford <richard@codesourcery.com>

From-SVN: r126267
2007-07-03 18:00:06 +00:00
Richard Sandiford bdd77024de invoke.texi: Replace -march=24kf with -march=24kf2_1 and -march=24kx with -march=24kf1_1.
gcc/
2007-07-03  Richard Sandiford  <richard@codesourcery.com>
	    David Ung  <davidu@mips.com>

	* doc/invoke.texi: Replace -march=24kf with -march=24kf2_1 and
	-march=24kx with -march=24kf1_1.  Likewise 24ke[fx], 34k[fx]
	and 74k[fx].  Document aliases for the new options.
	* config/mips/mips.h (PROCESSOR_24KF): Rename to...
	(PROCESSOR_24KF2_1): ...this.
	(PROCESSOR_24KX): Rename to...
	(PROCESSOR_24KF1_1): ...this.
	(PROCESSOR_74KF): Rename to...
	(PROCESSOR_74KF2_1): ...this.
	(PROCESSOR_74KX): Rename to...
	(PROCESSOR_74KF1_1): ...this.
	(TUNE_74K): Update PROCESSOR_* names.
	* config/mips/mips.c (mips_cpu_info): Add 24kf2_1 as a synonym
	for 24kf.  Add 24kf1_1 and 24kfx as synonyms for 24kx.  Likewise
	the 24ke*, 34k* and 74k* processors.  Update PROCESSOR_* names.
	(mips_rtx_cost_data): Update processor names in comments.
	(mips_issue_rate): Update PROCESSOR_* names.
	* config/mips/mips.md (cpu): Rename 24kf to 24kf2_1, 24kx to
	24kf1_1, 74kf to 74kf2_1 and 74kx to 74kf1_1.
	* config/mips/24k.md: Rename FPU-related r24k_* insn reservations
	to r24kf2_1_*.  Rename r24kx_* insn reservations to r24kf1_1_*.
	Update cpu attribute names.
	(r24k_fpu_iss): Rename this reservation to...
	(r24kf2_1_fpu_iss): ...this and update all uses.
	(r24kx_fpu_iss): Rename this reservation to...
	(r24kf1_1_fpu_iss): ...this and update all uses.
	* config/mips/74k.md: Rename FPU-related r74kf_* insn reservations
	to r74kf2_1_*.  Rename r74kx_* insn reservations to r74kf1_1_*.
	Update cpu attribute names.

Co-Authored-By: David Ung <davidu@mips.com>

From-SVN: r126266
2007-07-03 17:34:59 +00:00
Uros Bizjak c77cd3d140 cpplib.h (CPP_N_WIDTH_MD, [...]): Add new constants.
libcpp/ChangeLog:

	* include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
	Add new constants.
	* expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
	suffixes.  Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
	for 'q' or 'Q' suffixes.

gcc/ChangeLog:

	* targhooks.h (default_mode_for_suffix): New function declaration.
	* targhooks.c (default_mode_for_suffix): New default target hook.
	* target.h (struct c): New structure in the targetm struct.
	(mode_for_suffix): New target hook as part of struct c.
	target-def.h (TARGET_C_MODE_FOR_SUFFIX): Define as
	default_mode_for_suffix.
	(TARGET_C): New define.
	* c-lex.c: Include "target.h".
	(interpret_float): Use targetm.c.mode_for_suffix to determine
	the mode for a given non-standard suffix.
	Makefile.in (c-lex.o): Depend on $(TARGET_H).

	* config/i386/i386.c (ix86_c_mode_for_suffix): New static function.
	(TARGET_C_MODE_FOR_SUFFIX): Define to ix86_c_mode_for_suffix.

	* doc/extend.texi (Floating Types): New node.  Document __float80 and
	__float128 types.  Document 'w', 'W', 'q' and 'Q' suffixes.

testsuite/ChangeLog:

	* gcc.dg/const-float80.c : New test.
	* gcc.dg/const-float128.c : New test.
	* gcc.dg/const-float80-ped.c : New test.
	* gcc.dg/const-float128-ped.c : New test.

From-SVN: r126244
2007-07-03 07:53:58 +02:00
Geoffrey Keating ddbfd28de9 Index: gcc/ChangeLog
2007-06-21  Geoffrey Keating  <geoffk@apple.com>

	* doc/invoke.texi (C++ Dialect Options): Document
	fvisibility-ms-compat.
	* c.opt (fvisibility-ms-compat): New.

Index: gcc/cp/ChangeLog
2007-06-21  Geoffrey Keating  <geoffk@apple.com>

	* decl2.c (determine_visibility): Implement
	flag_visibility_ms_compat effect on type info.
	* decl.c (cxx_init_decl_processing): Implement
	global effect of flag_visibility_ms_compat.

Index: gcc/testsuite/ChangeLog
2007-06-26  Geoffrey Keating  <geoffk@apple.com>

	* g++.dg/ext/visibility/ms-compat-1.C: New.

From-SVN: r126088
2007-06-28 19:31:45 +00:00
Chao-ying Fu 1699ec0b95 rtl.texi (Machine Modes): Document QQ...
* doc/rtl.texi (Machine Modes): Document QQ, HQ, SQ, DQ, TQ,
	UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTAmodes.
	Document MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM.
	Document GET_MODE_IBIT, and GET_MODE_FBIT.

	* machmode.h (VECTOR_MODE_P): Test MODE_VECTOR_FRACT,
	MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
	(SCALAR_FRACT_MODE_P, SCALAR_UFRACT_MODE_P, ALL_SCALAR_FRACT_MODE_P,
	SCALAR_ACCUM_MODE_P, SCALAR_UACCUM_MODE_P, ALL_SCALAR_ACCUM_MODE_P,
	SIGNED_SCALAR_FIXED_POINT_MODE_P, UNSIGNED_SCALAR_FIXED_POINT_MODE_P,
	ALL_SCALAR_FIXED_POINT_MODE_P, FRACT_MODE_P, UFRACT_MODE_P,
	ALL_FRACT_MODE_P, ACCUM_MODE_P, UACCUM_MODE_P, ALL_ACCUM_MODE_P,
	SIGNED_FIXED_POINT_MODE_P, UNSIGNED_FIXED_POINT_MODE_P,
	ALL_FIXED_POINT_MODE_P): New define.
	(CLASS_HAS_WIDER_MODES_P): Test MODE_FRACT, MODE_UFRACT, MODE_ACCUM,
	MODE_UACCUM.
	(GET_MODE_IBIT, GET_MODE_FBIT): New define.

	* mode-classes.def (MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM,
	MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM,
	MODE_VECTOR_UACCUM): New mode classes.

	* machmode.def: Document FRACT_MODE, UFRACT_MODE, ACCUM_MODE,
	UACCUM_MODE, ADJUST_IBIT, and ADJUST_FBIT.
	Add QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA,
	USA, UDA, and UTA.

	* genmodes.c (struct mode_data): Add ibit and fbit fields.
	(blank_mode): Initialize ibit and fbit.
	(adj_ibit, adj_fbit): New to adjust ibit and fbit.
	(vector_class): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM.
	(new_adjust): Change required_class to required_class_from and
	required_class_to for testing within a range.
	(complete_mode): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM,
	MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM,
	MODE_VECTOR_UACCUM.
	(FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE): New define.
	(make_fixed_point_mode): New.
	(_ADD_ADJUST): Change C to C1 and C2.
	(ADJUST_BYTESIZE, ADJUST_ALIGNMENT, ADJUST_FLOAT_FORMAT): Change to
	use a range for machine classes.
	(ADJUST_IBIT, ADJUST_FBIT): New.
	(emit_insn_modes_h): Output defines of CONST_MODE_IBIT and
	CONST_MODE_FBIT.
	(emit_mode_adjustments): Handle MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT,
	MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
	Emit adjustment for ibit and fbit.
	(emit_mode_ibit, emit_mode_fbit): New.
	(emit_insn_modes_c): Add emit_mode_ibit and emit_mode_fbit.

From-SVN: r126007
2007-06-25 22:51:27 +00:00
Mark Mitchell 3a687f8bbb extend.texi: Document that dllimport and dllexport imply default visibility.
2007-06-23  Mark Mitchell  <mark@codesourcery.com>

	* doc/extend.texi: Document that dllimport and dllexport imply
	default visibility.
	* tree.c (handle_dll_attribute): Set DECL_VISIBILITY on the
	imported or exported declaration, including type declarations.
	* c-common.c (handle_visibility_attribute): Check for conflicts
	with dllimport/dllexport.
	(c_determine_visibility): Handle dllimport/dllexport as an
	explicit visibility atttribute.

2007-06-23  Mark Mitchell  <mark@codesourcery.com>

	* decl2.c (determine_visibility): Don't look for dllexport here.
	(determine_visibility_from_class): Tidy.

2007-06-23  Mark Mitchell  <mark@codesourcery.com>

	* gcc.dg/visibility-12.c: New test.
	* gcc.dg/visibility-13.c: Likewise.
	* g++.dg/ext/visibility-9.C: Likewise.
	* g++.dg/ext/visibility-10.C: Likewise.

From-SVN: r125975
2007-06-23 19:17:04 +00:00
Uros Bizjak ac10986fad re PR tree-optimization/32383 (ICE with reciprocals and -ffast-math)
PR tree-optimization/32383
	* targhooks.c (default_builtin_reciprocal): Add new bool argument.
	* targhooks.h (default_builtin_reciprocal): Update prototype.
	* target.h (struct gcc_target): Update builtin_reciprocal.
	* doc/tm.texi (TARGET_BUILTIN_RECIPROCAL): Update description.
	* tree-ssa-math-opts (execute_cse_reciprocals): Skip statements
	where arg1 is not SSA_NAME.  Pass true to targetm.builtin_reciprocal
	when fndecl is in BUILT_IN_MD class.
	(execute_convert_to_rsqrt): Ditto.

	* config/i386/i386.c (ix86_builtin_reciprocal): Update for new bool
	argument.  Convert IX86_BUILTIN_SQRTPS code only when md_fn is true.
	Convert BUILT_IN_SQRTF code only  when md_fn is false.

testsuite/ChangeLog:

	PR tree-optimization/32383
	* testsuite/g++.dg/opt/pr32383.C: New test.

From-SVN: r125790
2007-06-18 10:30:47 +02:00
Uros Bizjak 6b889d891d re PR middle-end/31723 (Use reciprocal and reciprocal square root with -ffast-math)
PR middle-end/31723
    * hooks.c (hook_tree_tree_bool_null): New hook.
    * hooks.h (hook_tree_tree_bool_null): Add prototype.
    * tree-pass.h (pass_convert_to_rsqrt): Declare.
    * passes.c (init_optimization_passes): Add pass_convert_to_rsqrt.
    * tree-ssa-math-opts.c (execute_cse_reciprocals): Scan for a/func(b)
    and convert it to reciprocal a*rfunc(b).
    (execute_convert_to_rsqrt): New function.
    (gate_convert_to_rsqrt): New function.
    (pass_convert_to_rsqrt): New pass definition.
    * target.h (struct gcc_target): Add builtin_reciprocal.
    * target-def.h (TARGET_BUILTIN_RECIPROCAL): New define.
    (TARGET_INITIALIZER): Initialize builtin_reciprocal with
    TARGET_BUILTIN_RECIPROCAL.
    * doc/tm.texi (TARGET_BUILTIN_RECIPROCAL): Document.

    * config/i386/i386.h (TARGET_RECIP): New define.
    * config/i386/i386.md (divsf3): Expand by calling ix86_emit_swdivsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (*rcpsf2_sse): New insn pattern.
    (*rsqrtsf2_sse): Ditto.
    (rsqrtsf2): New expander.  Expand by calling ix86_emit_swsqrtsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (sqrt<mode>2): Expand SFmode operands by calling ix86_emit_swsqrtsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    * config/i386/sse.md (divv4sf): Expand by calling ix86_emit_swdivsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (*sse_rsqrtv4sf2): Do not export.
    (sqrtv4sf2): Ditto.
    (sse_rsqrtv4sf2): New expander.  Expand by calling ix86_emit_swsqrtsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (sqrtv4sf2): Ditto.
    * config/i386/i386.opt (mrecip): New option.
    * config/i386/i386-protos.h (ix86_emit_swdivsf): Declare.
    (ix86_emit_swsqrtsf): Ditto.
    * config/i386/i386.c (IX86_BUILTIN_RSQRTF): New constant.
    (ix86_init_mmx_sse_builtins): __builtin_ia32_rsqrtf: New
    builtin definition.
    (ix86_expand_builtin): Expand IX86_BUILTIN_RSQRTF using
    ix86_expand_unop1_builtin.
    (ix86_emit_swdivsf): New function.
    (ix86_emit_swsqrtsf): Ditto.
    (ix86_builtin_reciprocal): New function.
    (TARGET_BUILTIN_RECIPROCAL): Use it.
    (ix86_vectorize_builtin_conversion): Rename from
    ix86_builtin_conversion.
    (TARGET_VECTORIZE_BUILTIN_CONVERSION): Use renamed function.
    * doc/invoke.texi (Machine Dependent Options): Add -mrecip to
    "i386 and x86_64 Options" section.
    (Intel 386 and AMD x86_64 Options): Document -mrecip.

testsuite/ChangeLog:

    PR middle-end/31723
    * gcc.target/i386/recip-divf.c: New test.
    * gcc.target/i386/recip-sqrtf.c: Ditto.
    * gcc.target/i386/recip-vec-divf.c: Ditto.
    * gcc.target/i386/recip-vec-sqrtf.c: Ditto.
    * gcc.target/i386/sse-recip.c: Ditto.

From-SVN: r125756
2007-06-16 11:52:48 +02:00
Andrew Pinski 5be014d5b7 [multiple changes]
2007-06-15  Andrew Pinski <andrew_pinski@playstation.sony.com>
            Zdenek Dvorak <dvorakz@suse.cz>
            Richard Guenther  <rguenther@suse.de>
            Kaz Kojima  <kkojima@gcc.gnu.org>

	* tree-vrp.c (compare_values_warnv): Convert val2 to
	the type of val1.
	(extract_range_from_assert): Create
	POINTER_PLUS_EXPR for pointer types.
	(extract_range_from_binary_expr): Handle
	only POINTER_PLUS_EXPR, MIN_EXPR, and MAX_EXPR
	for pointer types.
	* doc/c-tree.texi (POINTER_PLUS_EXPR): Document.
	* tree-ssa-loop-niter.c (split_to_var_and_offset): Handle
	POINTER_PLUS_EXPR as PLUS_EXPR.
	(number_of_iterations_lt_to_ne):
	For pointer types, use sizetype when
	creating MINUS_EXPR/PLUS_EXPRs.
	(assert_loop_rolls_lt): For pointer types, use sizetype when
	creating MINUS_EXPR/PLUS_EXPRs.
	(number_of_iterations_le): Likewise.
	(expand_simple_operations): POINTER_PLUS_EXPR are simple also.
	(derive_constant_upper_bound): Handle POINTER_PLUS_EXPR just
	like PLUS_EXPR and MINUS_EXPR.
	* tree-pretty-print.c (dump_generic_node): Handle
	POINTER_PLUS_EXPR.
	(op_prio): Likewise.
	(op_symbol_1): Likewise.
	* optabs.c (optab_for_tree_code): Likewise.
	* tree-ssa-loop-manip.c (create_iv): Handle pointer base
	specially.
	* tree-tailcall.c (process_assignment): Mention
	POINTER_PLUS_EXPR in a TODO comment.
	* tree.c (build2_stat): Assert when trying to use PLUS_EXPR or 
	MINUS_EXPR with a pointer. Also assert for POINTER_PLUS_EXPR
	not used with a pointer and an integer type.
	* tree-scalar-evolution.c (add_to_evolution_1): Convert the
	increment using chrec_convert_rhs instead of chrec_convert.
	(follow_ssa_edge_in_rhs): Handle POINTER_PLUS_EXPR like
	PLUS_EXPR except for the right hand side's type will be
	sizetype.
	(interpret_rhs_modify_stmt): Handle POINTER_PLUS_EXPR.
	(fold_used_pointer_cast): Kill.
	(pointer_offset_p): Kill.
	(fold_used_pointer): Kill.
	(pointer_used_p): Kill.
	(analyze_scalar_evolution_1 <case GIMPLE_MODIFY_STMT>): Don't
	call fold_used_pointer.
	(instantiate_parameters_1): Convert the increment
	using chrec_convert_rhs instead of chrec_convert.
	Handle POINTER_PLUS_EXPR as PLUS_EXPR.
	* builtins.c (get_pointer_alignment): Handle POINTER_PLUS_EXPR
	instead of PLUS_EXPR.
	(expand_builtin_strcat): Create a POINTER_PLUS_EXPR instead of
	PLUS_EXPR for pointers.
	(std_gimplify_va_arg_expr): Likewise.
	(fold_builtin_memory_op): Likewise.
	(fold_builtin_strstr): Likewise.
	(fold_builtin_strchr): Likewise.
	(fold_builtin_strrchr): Likewise.
	(fold_builtin_strpbrk): Likewise.
	(expand_builtin_memory_chk): Likewise.
	(fold_builtin_memory_chk): Likewise.
	(std_expand_builtin_va_start): Use
	sizetype for the call to make_tree and then convert
	to the pointer type.
	(fold_builtin_memchr): Use POINTER_PLUS_EXPR
	instead of PLUS_EXPR for adding to a pointer.
	(std_gimplify_va_arg_expr): Use fold_build2 for
	the creating of POINTER_PLUS_EXPR.  For the BIT_AND_EXPR, cast
	the operands to sizetype first and then cast the BIT_AND_EXPR
	back to the pointer type.
	* fold-const.c (build_range_check): Handle pointer types
	specially.
	(extract_array_ref): Look for POINTER_PLUS_EXPR instead
	of PLUS_EXPR's. Make sure the offset is converted to
	sizetype.
	(try_move_mult_to_index): Strip the NOPs from the offset.
	Remove code argument and replace all uses with PLUS_EXPR.
	(fold_to_nonsharp_ineq_using_bound): Handle pointer types
	specially. Don't use a pointer type for MINUS_EXPR.
	(fold_unary): Handle for (T1)(X op Y),
	only p+ as that is the only as that can be handled for
	binary operators now.
	(fold_binary <case POINTER_PLUS_EXPR>): Add folding of
	POINTER_PLUS_EXPR.
	<case PLUS_EXPR>: Add folding of PTR+INT into
	PTR p+ INT.
	Don't call try_move_mult_to_index.
	<case MINUS_EXPR>: Fold (PTR0 p+ A) - (PTR1 p+ B)
	into (PTR0 - PTR1) + (A - B). Fold (PTR0 p+ A) - PTR1 into
	(PTR0 - PTR1) + A iff (PTR0 - PTR1) simplifies.
	Don't call try_move_mult_to_index.
	(tree_expr_nonnegative_warnv_p): Handle POINTER_PLUS_EXPR.
	(tree_expr_nonzero_p): Likewise.
	(fold_indirect_ref_1): Look at POINTER_PLUS_EXPR instead
	of PLUS_EXPR for the complex expression folding.
	* tree-chrec.c (chrec_fold_plus_poly_poly): If the
	first chrec is a pointer type, then the second should
	be sizetype and not the first's type.
	For POINTER_PLUS_EXPR, use a different right hand side type.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR.
	(chrec_fold_plus_1): For POINTER_PLUS_EXPR, use a
	different right hand side type.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR.
	(chrec_fold_plus): For pointer types, use POINTER_PLUS_EXPR
	instead of PLUS_EXPR.
	When either operand is zero, convert the other operand.
	(chrec_apply): Use chrec_convert_rhs
	on the argument x instead of chrec_convert.
	(reset_evolution_in_loop): For pointer types, the new_evol
	should be sizetype.
	(convert_affine_scev): For POINTER_PLUS_EXPR, use a
	different right hand side type.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR.
	(chrec_convert_rhs): New function.
	(chrec_convert_aggressive): For POINTER_PLUS_EXPR, use a
	different right hand side type.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR.
	* tree-chrec.h (chrec_convert_rhs): New prototype.
	(build_polynomial_chrec): For pointer types, the right hand
	* tree-ssa-ccp.c (maybe_fold_stmt_indirect): Look for
	POINTER_PLUS_EXPR instead of PLUS_EXPR's.
	Remove subtraction case as it is always addition now.
	Make sure the offset is converted to sizetype.
	(fold_stmt_r): Don't handle PLUS_EXPR/MINUS_EXPR specially.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR was handled before.
	* tree-ssa-loop-ivopts.c (determine_base_object): Abort for 
	PLUS_EXPR in pointer type.
	Handle POINTER_PLUS_EXPR.
	(tree_to_aff_combination): Likewise.
	(force_expr_to_var_cost): Likewise.
	(force_expr_to_var_cost): Likewise. Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointers.
	* c-format.c (check_format_arg): Handle POINTER_PLUS_EXPR
	instead of PLUS_EXPR of pointer types.
	* tree-stdarg.c (va_list_counter_bump): Handle POINTER_PLUS_EXPR
	as PLUS_EXPR.
	(check_va_list_escapes): Likewise.
	(check_all_va_list_escapes): Likewise.
	* dwarf2out.c (loc_descriptor_from_tree_1):
	Handle POINT_PLUS_EXPR as a PLUS_EXPR.
	* expr.c (expand_expr_real_1): Handle POINTER_PLUS_EXPR.
	(string_constant): Likewise.
	* tree-ssa-address.c (tree_mem_ref_addr): When adding
	the offset to the base, use POINTER_PLUS_EXPR.
	(add_to_parts): Convert the index to sizetype.
	(create_mem_ref): Create A POINTER_PLUS_EXPR for the one case.
	* matrix-reorg.c (collect_data_for_malloc_call): Stmt
	will now only be either INDIRECT_REF and POINTER_PLUS_EXPR.
	Offset only holds something for PLUS_EXPR.
	(ssa_accessed_in_tree): Handle POINTER_PLUS_EXPR just as
	a PLUS_EXPR.
	(analyze_transpose): POINTER_PLUS_EXPR will only show up now
	and not PLUS_EXPR.
	(analyze_accesses_for_modify_stmt): Likewise.
	Remove comment about the type being integral type as it is
	wrong now.
	(can_calculate_expr_before_stmt): Handle POINTER_PLUS_EXPR as
	PLUS_EXPR.
	(transform_access_sites): POINTER_PLUS_EXPR will only show up now
	and not PLUS_EXPR.
	Correct the type which the artimentic is done in (is now
	sizetype).
	Reindent one loop.
	* tree-data-ref.c (split_constant_offset): Handle
	POINTER_PLUS_EXPR
	* tree-affine.c (tree_to_aff_combination): Likewise.
	* c-typeck.c (build_unary_op): For pointers create the increment
	as a sizetype. Create a POINTER_PLUS_EXPR instead of PLUS_EXPR
	for pointers.
	* gimplify.c (gimplify_self_mod_expr): Create a
	POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
	(gimplify_omp_atomic_fetch_op): Handle POINTER_PLUS_EXPR.
	* tree.def (POINTER_PLUS_EXPR): New tree code.
	* tree-predcom.c (ref_at_iteration): If we have a pointer
	type do the multiplication in sizetype.
	* tree-mudflap.c (mf_xform_derefs_1): Create a
	POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
	* tree-ssa-forwprop.c 
	(forward_propagate_addr_into_variable_array_index):
	Don't expect there to be a cast for the index as that
	does not exist anymore.
	(forward_propagate_addr_expr_1): Check for POINTER_PLUS_EXPR
	instead of PLUS_EXPR.
	Don't check for the first operand of the POINTER_PLUS_EXPR
	was the index as it cannot be.
	Call forward_propagate_addr_into_variable_array_index with
	the SSA_NAME instead of the statement.
	* varasm.c (const_hash_1): Handle POINTER_PLUS_EXPR.
	(compare_constant): Likewise.
	(copy_constant): Likewise.
	(compute_reloc_for_constant): Likewise.
	(output_addressed_constants): Likewise.
	(initializer_constant_valid_p): Likewise.
	* tree-ssa.c (tree_ssa_useless_type_conversion_1):
	Convert the MIN/MAX of the inner type to the outer
	type before comparing them.
	* tree-ssa-loop-prefetch.c (idx_analyze_ref):  Handle
	POINTER_PLUS_EXPR instead of PLUS_EXPR.
	(issue_prefetch_ref): Create a POINTER_PLUS_EXPR instead
	of PLUS_EXPR for pointers.
	* tree-inline.c (estimate_num_insns_1): Handle
	POINTER_PLUS_EXPR.
	* tree-vect-transform.c (vect_create_addr_base_for_vector_ref): 
	Create a POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
	(bump_vector_ptr): Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for the pointer increment statement.
	(vect_update_ivs_after_vectorizer): For pointer types, create
	POINTER_PLUS_EXPR instead of PLUS_EXPR and also create
	MULT_EXPR in sizetype.
	(vect_gen_niters_for_prolog_loop): Add a cast when creating
	byte_misalign.
	* tree-object-size.c (plus_expr_object_size): Handle
	POINTER_PLUS_EXPR instead of PLUS_EXPR.  Removing all the extra
	code which is trying to figure out which side is a pointer and 
	is the index.
	(check_for_plus_in_loops_1): Likewise.
	(check_for_plus_in_loops): Likewise.
	* c-common.c (pointer_int_sum): Create a
	POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
	* tree-ssa-structalias.c (handle_ptr_arith): Handle
	only POINTER_PLUS_EXPR.  Removing all the extra
	code which is trying to figure out which side is a pointer and 
	is the index.
	* tree-cfg.c (verify_expr): Add extra checking for pointers and
	PLUS_EXPR and MINUS_EXPR.
	Also add checking to make sure the operands of POINTER_PLUS_EXPR
	are correct.
	* config/frv/frv.c (frv_expand_builtin_va_start): Use sizetype
	with make_tree, instead of a pointer type.
	* config/s390/s390.c (s390_va_start): Use POINTER_PLUS_EXPR
	for pointers instead of PLUS_EXPR.
	(s390_gimplify_va_arg): Likewise.
	* config/spu/spu.c (spu_va_start): Create POINTER_PLUS_EXPR
	instead of PLUS_EXPR when doing addition on pointer
	types.  Use sizetype for the second operand.
	(spu_gimplify_va_arg_expr): Likewise.
	* config/sparc/sparc.c (sparc_gimplify_va_arg): Use 
	POINTER_PLUS_EXPR instead of PLUS_EXPR when the operand was
	a pointer.  Don't create a BIT_AND_EXPR for pointer types.
	* config/i386/i386.c (ix86_va_start): Use POINTER_PLUS_EXPR
	for the pointer addition and also use size_int/sizetype
	for the offset.
	(ix86_gimplify_va_arg): Likewise.
	Perform BIT_AND_EXPR on sizetype arguments.
	* config/sh/sh.c (sh_va_start): Call make_tree with sizetype
	and convert its result to a pointer type.  Use POINTER_PLUS_EXPR
	for the pointer additions and also use size_int for the offsets.
	(sh_gimplify_va_arg_expr): Use POINTER_PLUS_EXPR for the pointer
	additions and also use size_int for the offsets.  Perform
	BIT_AND_EXPR on sizetype arguments.
	* config/ia64/ia64.c (ia64_gimplify_va_arg): Use
	POINTER_PLUS_EXPR for pointers and create the
	BIT_AND_EXPR in sizetype.
	* config/rs6000/rs6000.c (rs6000_va_start): Use POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointer addition.
	(rs6000_va_start): Likewise.
	Also use sizetype for the offset.
	* config/pa/pa.c (reloc_needed): Handle POINTER_PLUS_EXPR
	as PLUS_EXPR/MINUS_EXPR.
	(hppa_gimplify_va_arg_expr): Don't create MINUS_EXPR or
	PLUS_EXPR for pointers, instead use POINTER_PLUS_EXPR.
	Don't use BIT_AND_EXPR on a pointer type, convert the
	expression to sizetype first.
	* config/mips/mips.c (mips_va_start): Use POINTER_PLUS_EXPR
	for pointers.
	(mips_gimplify_va_arg_expr): Likewise.
	Don't create BIT_AND_EXPR in a pointer type.



2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
        POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
        * trans-expr.c (gfc_trans_string_copy): Create
        POINTER_PLUS_EXPR instead of a PLUS_EXPR
        for pointer types.

2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

	* typeck.c (build_binary_op): For templates build the
	expression in pieces to avoid the assert in build2_stat.
	(get_member_function_from_ptrfunc):
	Change over to using POINTER_PLUS_EXPR and convert
	the second operand to sizetype.
	* typeck2.c (build_m_component_ref):  Likewise.
	* init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointers.
	(build_new_1): Likewise.
	(build_vec_delete_1): Likewise.
	(build_vec_delete): Likewise.
	* class.c (build_base_path): Likewise.
	(build_base_path): Likewise.
	(convert_to_base_statically): Likewise.
	(fixed_type_or_null): Handle POINTER_PLUS_EXPR.
	(get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
	instead of PLUS_EXPR.
	(dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointers.
	* call.c (build_special_member_call): Likewise.
	* rtti.c (build_headof): Likewise.
	Use sizetype instead of ptrdiff_type_node.
	(tinfo_base_init): Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointers.
	* except.c (expand_start_catch_block):  Do a
	NEGATIVE and then a POINTER_PLUS_EXPR instead
	of a MINUS_EXPR.
	* cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
	PLUS_EXPR on pointer types over to use
	POINTER_PLUS_EXPR and remove the conversion
	to the pointer types.
	* method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
	adding to a pointer type. Use size_int instead of
	ssize_int. Convert the index to sizetype before
	adding it to the pointer.



2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * trans.c (Attribute_to_gnu): When subtracting an
        offset from a pointer, use POINTER_PLUS_EXPR with
        NEGATE_EXPR instead of MINUS_EXPR.
        (gnat_to_gnu): Likewise.
        * utils.c (convert): When converting between
        thin pointers, use POINTER_PLUS_EXPR and sizetype
        for the offset.
        * utils2.c (known_alignment): POINTER_PLUS_EXPR
        have the same semantics as PLUS_EXPR for alignment.
        (build_binary_op): Add support for the semantics of
        POINTER_PLUS_EXPR's operands.
        When adding an offset to a pointer, use POINTER_PLUS_EXPR.



2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * class.c (make_class_data): Build the index in sizetype.
        Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
        adding to a pointer type.
        (build_symbol_entry): Likewise.
        * expr.c (build_java_arrayaccess): Likewise.
        (build_field_ref): Likewise.
        (build_known_method_ref): Likewise.
        (build_invokevirtual): Likewise.
        * except.c (build_exception_object_ref): Do a
        NEGATIVE and then a POINTER_PLUS_EXPR instead
        of a MINUS_EXPR.


2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

	PR tree-opt/32225
	* gcc.c-torture/compile/20070605-1.c: New test.

	* gcc.c-torture/compile/20070603-1.c: New testcase.
	* gcc.c-torture/compile/20070603-2.c: New testcase.

	* gcc.c-torture/compile/20070531-1.c: New test.

	PR tree-opt/32167
	* gcc.c-torture/compile/20070531-2.c: New test.

	PR tree-opt/32144
	* gcc.c-torture/compile/20070529-1.c: New test.

	PR tree-opt/32145
	* gcc.c-torture/compile/20070529-2.c: New test.

	PR tree-opt/32015
	* gcc.c-torture/compile/20070520-1.c: New test.

	* g++.dg/ext/java-1.C: New test.

	* gcc.dg/vect/vect-106.c: We are now able to vectorize two
	loops instead of one. Remove the "can't determine dependence"
	check.
	* gcc.dg/tree-ssa/20030815-1.c: Remove testcase which is no longer
	needed as the cast is gone in the first place.
	* gcc.dg/max-1.c: Change local variable a to be a global one.
	* gcc.dg/tree-ssa/ssa-pre-8.c: Update testcase since we don't
	have a cast which is PREd.

From-SVN: r125755
2007-06-15 22:42:36 -07:00
Matthew Wilcox e9f9692b8e extend.texi: Document behavior of __attribute__((aligned)) on typedefs.
* doc/extend.texi: Document behavior of __attribute__((aligned))
	on typedefs.

From-SVN: r125747
2007-06-15 17:33:01 +00:00
Seongbae Park 0a090f42f6 opts.c (common_handle_option): Handle new option -fdbg-cnt-list.
2007-06-12  Seongbae Park  <seongbae.park@gmail.com>

	* opts.c (common_handle_option): Handle new option -fdbg-cnt-list.
	* dbgcnt.c (dbg_cnt_set_limit_by_name): Return value
	to indicate an error.
	(dbg_cnt_process_single_pair, dbg_cnt_list_all_counters): New functions
	(dbg_cnt_process_opt): Print an error on a bad argument.
	* dbgcnt.h (dbg_cnt_list_all_counters): New function declaration.
	* common.opt (-fdbg-cnt-list): New.
	* doc/invoke.texi (-fdbg-cnt-list,-fdbg-cnt=): New.

From-SVN: r125657
2007-06-12 20:47:16 +00:00
Ian Lance Taylor 058dcc25b7 re PR libstdc++/29286 (placement new does not change the dynamic type as it should)
./:	PR libstdc++/29286
	* tree.def: Add CHANGE_DYNAMIC_TYPE_EXPR.
	* tree.h (CHANGE_DYNAMIC_TYPE_NEW_TYPE): Define.
	(CHANGE_DYNAMIC_TYPE_LOCATION): Define.
	(DECL_NO_TBAA_P): Define.
	(struct tree_decl_common): Add no_tbaa_flag field.
	* tree-ssa-structalias.c (struct variable_info): Add
	no_tbaa_pruning field.
	(new_var_info): Initialize no_tbaa_pruning field.
	(unify_nodes): Copy no_tbaa_pruning field.
	(find_func_aliases): Handle CHANGE_DYNAMIC_TYPE_EXPR.
	(dump_solution_for_var): Print no_tbaa_pruning flag.
	(set_uids_in_ptset): Add no_tbaa_pruning parameter.  Change all
	callers.
	(compute_tbaa_pruning): New static function.
	(compute_points_to_sets): Remove CHANGE_DYNAMIC_TYPE_EXPR nodes.
	Call compute_tbaa_pruning.
	* tree-ssa-alias.c (may_alias_p): Test no_tbaa_flag for pointers.
	* gimplify.c (gimplify_expr): Handle CHANGE_DYNAMIC_TYPE_EXPR.
	* gimple-low.c (lower_stmt): Likewise.
	* tree-gimple.c (is_gimple_stmt): Likewise.
	* tree-ssa-operands.c (get_expr_operands): Likewise.
	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
	* tree-inline.c (estimate_num_insns_1): Likewise.
	(copy_result_decl_to_var): Likewise.
	* expr.c (expand_expr_real_1): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-inline.c (copy_decl_to_var): Copy DECL_NO_TBAA_P flag.
	* omp-low.c (omp_copy_decl_2): Likewise.
	* print-tree.c (print_node): Print DECL_NO_TBAA_P flag.
	* doc/c-tree.texi (Expression trees): Document
	CHANGE_DYNAMIC_TYPE_EXPR.
cp/:
	PR libstdc++/29286
	* init.c (avoid_placement_new_aliasing): New static function.
	(build_new_1): Call it.
testsuite/:
	PR libstdc++/29286
	* g++.dg/init/new16.C: New test.
	* g++.dg/init/new17.C: New test.
	* g++.dg/init/new18.C: New test.
	* g++.dg/init/new19.C: New test.

Co-Authored-By: Daniel Berlin <dberlin@dberlin.org>

From-SVN: r125653
2007-06-12 17:47:37 +00:00
Tristan Gingold 1a9075e289 gcov.c: Comments updated.
* gcov.c: Comments updated.
	(source_info): Add file_time field.
	(source_index): New variable.
	(mutiple_files): New variable.
	(generate_results): New function extracted from process_file.
	(process_file): Save and restore chain of functions, generate
	results and free structures only if not merging results.
	(release_structures): File names are now freed in create_file_names
	(create_file_names): Free previous file names.
	(find_source): File date is now read here and modifications in
	source files is checked here.
	(read_graph_file): Only reverse order of functions for the current
	object file.
	(make_gcov_file_name): Do not generate long names if input_name is
	NULL.
	(output_lines): If merging results do not display graph, data and 
	runs informations.
	Checking source file modification is done in find_source.

	* doc/gcov.texi: Append an s to sourcefile.

From-SVN: r125649
2007-06-12 15:39:15 +00:00
Daniel Berlin 6fb5fa3cbc Merge dataflow branch into mainline
From-SVN: r125624
2007-06-11 18:02:15 +00:00
Harsha Jagasia 792ed98bb7 extend.texi: Add fvect-cost-model flag.
gcc/ChangeLog:
2007-06-08  Harsha Jagasia <harsha.jagasia@amd.com>
            Tony Linthicum <tony.linthicum@amd.com>

	* doc/extend.texi: Add fvect-cost-model flag.
	* common.opt (fvect-cost-model): New flag.
	* tree-vectorizer.c (new_stmt_vec_info): Initialize inside and outside
	cost fields in stmt_vec_info struct for STMT.
	* tree-vectorizer.h (stmt_vec_info): Define inside and outside cost
	fields in stmt_vec_info struct and access functions for the same.
	(TARG_COND_BRANCH_COST): Define cost of conditional branch.
	(TARG_VEC_STMT_COST): Define cost of any vector operation, excluding
	load, store and vector to scalar operation.
	(TARG_VEC_TO_SCALAR_COST): Define cost of vector to scalar operation.
	(TARG_VEC_LOAD_COST): Define cost of aligned vector load.
	(TARG_VEC_UNALIGNED_LOAD_COST): Define cost of misasligned vector load.
	(TARG_VEC_STORE_COST): Define cost of vector store.
	(vect_estimate_min_profitable_iters): Define new function.
	* tree-vect-analyze.c (vect_analyze_operations): Add a compile-time
	check to evaluate if loop iterations are less than minimum profitable
	iterations determined by cost model or minimum vect loop bound defined
	by user, whichever is more conservative.
	* tree-vect-transform.c (vect_do_peeling_for_loop_bound): Add a
	run-time check to evaluate if loop iterations are less than minimum
	profitable iterations determined by cost model or minimum vect loop
	bound defined by user, whichever is more conservative.
	(vect_estimate_min_profitable_iterations): New function to estimate
	mimimimum iterartions required for vector version of loop to be
	profitable over scalar version.
        (vect_model_reduction_cost): New function.
	(vect_model_induction_cost): New function.
	(vect_model_simple_cost): New function.
	(vect_cost_strided_group_size): New function.
	(vect_model_store_cost): New function.
	(vect_model_load_cost): New function.
	(vectorizable_reduction): Call vect_model_reduction_cost during
	analysis phase.
	(vectorizable_induction): Call vect_model_induction_cost during
	analysis phase.
	(vectorizable_load): Call vect_model_load_cost during analysis phase.
	(vectorizable_store): Call vect_model_store_cost during analysis phase.
	(vectorizable_call, vectorizable_assignment, vectorizable_operation,
	vectorizable_promotion, vectorizable_demotion): Call 
	vect_model_simple_cost during analysis phase.

gcc/testsuite/ChangeLog:
2007-06-08  Harsha Jagasia <harsha.jagasia@amd.com>

	* gcc.dg/vect/costmodel: New directory.
	* gcc.dg/vect/costmodel/i386: New directory.
	* gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp: New testsuite.
	* gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c:
	New test.
	* gcc.dg/vect/costmodel/i386/costmodel-vect-31.c: New test.
	* gcc.dg/vect/costmodel/i386/costmodel-vect-33.c: New test.
	* gcc.dg/vect/costmodel/i386/costmodel-vect-68.c: New test.
	* gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c: New test.
	* gcc.dg/vect/costmodel/x86_64: New directory.
	* gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp:
	New testsuite.	
	* gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c:
	New test.
	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c: New test.
	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-33.c: New test.
	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-68.c: New test.
	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c: New test.
	* gcc.dg/vect/costmodel/x86_64/costmodel-pr30843.c: New test.

Co-Authored-By: Tony Linthicum <tony.linthicum@amd.com>

From-SVN: r125575
2007-06-08 16:30:49 +00:00
Uros Bizjak 5513e23973 extend.texi (X86 Built-in Functions): Document __builtin_fabsq, __builtin_copysignq and __builtin_infq built-in functions.
* doc/extend.texi (X86 Built-in Functions): Document __builtin_fabsq,
	__builtin_copysignq and __builtin_infq built-in functions.

From-SVN: r125569
2007-06-08 13:22:44 +02:00
Uros Bizjak 291d9a2db0 extend.texi (X86 Built-in Functions): Add missing `@item's in SSE4.2 section.
* doc/extend.texi (X86 Built-in Functions): Add missing `@item's in
	SSE4.2 section.  Correct built-in function names in SSE4A section.

From-SVN: r125568
2007-06-08 13:08:12 +02:00
Geoffrey Keating e46b55d038 Index: ChangeLog
2007-06-06  Geoffrey Keating  <geoffk@apple.com>
	    Hui-May Chang <hm.chang@apple.com>

	* doc/invoke.texi (Darwin Options): Update documentation for
	-mmacosx-version-min.
	* config.gcc (*-*-darwin*): Set extra_gcc_objs.
	* config/darwin-driver.c: New file.
	* config/darwin.h (GCC_DRIVER_HOST_INITIALIZATION): New.
	* config/t-darwin (darwin-driver.o): New rule.

	* config/darwin-c.c (version_as_macro): Ignore low digit.

Index: testsuite/ChangeLog
2007-06-06  Geoffrey Keating  <geoffk@apple.com>

	* gcc.dg/darwin-minversion-3.c: New.

Co-Authored-By: Hui-May Chang <hm.chang@apple.com>

From-SVN: r125537
2007-06-07 18:56:51 +00:00
Joerg Wunsch f7fd775f02 re PR preprocessor/23479 (Implement binary constants with a "0b" prefix)
2007-06-05  Joerg Wunsch  <j.gnu@uriah.heep.sax.de>

	PR preprocessor/23479
gcc/
	* doc/extend.texi: Document the 0b-prefixed binary integer
	constant extension.

libcpp/
	* expr.c (cpp_classify_number): Implement 0b-prefixed binary
	integer constants.
	(append_digit): Likewise.
	* include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
	binary integer constants.

testsuite/
	* testsuite/gcc.dg/binary-constants-1.c: Add test suites for
	the 0b-prefixed binary integer constants.
	* testsuite/gcc.dg/binary-constants-2.c: Ditto.
	* testsuite/gcc.dg/binary-constants-3.c: Ditto.
	* testsuite/gcc.dg/binary-constants-4.c: Ditto.

From-SVN: r125346
2007-06-05 22:25:27 +00:00
Kazu Hirata 2bccb817ce m68k.c (m68k_attribute_table): Add "interrupt".
* config/m68k/m68k.c (m68k_attribute_table): Add "interrupt".
	(m68k_get_function_kind): Return m68k_fk_interrupt_handler on
	"interrupt".
	* doc/extend.texi (interrupt): Mention m68k.

From-SVN: r125290
2007-06-03 00:43:21 +00:00
H.J. Lu 3b8dd0716f config.gcc (i[34567]86-*-*): Add nmmintrin.h to extra_headers.
2007-05-31  H.J. Lu  <hongjiu.lu@intel.com>

	* config.gcc (i[34567]86-*-*): Add nmmintrin.h to
	extra_headers.
	(x86_64-*-*): Likewise.

	* config/i386/i386.c (OPTION_MASK_ISA_MMX_UNSET): New.
	(OPTION_MASK_ISA_3DNOW_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE2_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE3_UNSET): Likewise.
	(OPTION_MASK_ISA_SSSE3_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE4_1_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE4_2_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE4): Likewise.
	(OPTION_MASK_ISA_SSE4_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE4A_UNSET): Likewise.
	(ix86_handle_option): Use OPTION_MASK_ISA_*_UNSET.  Handle
	SSE4.2.
	(override_options): Support SSE4.2.
	(ix86_build_const_vector): Support SImode and DImode.
	(ix86_build_signbit_mask): Likewise.
	(ix86_expand_int_vcond): Support V2DImode.
	(IX86_BUILTIN_CRC32QI): New for SSE4.2.
	(IX86_BUILTIN_CRC32HI): Likewise.
	(IX86_BUILTIN_CRC32SI): Likewise.
	(IX86_BUILTIN_CRC32DI): Likewise.
	(IX86_BUILTIN_PCMPGTQ): Likewise.
	(bdesc_crc32): Likewise.
	(bdesc_sse_3arg): Likewise.
	(ix86_expand_crc32): Likewise.
	(ix86_init_mmx_sse_builtins): Support SSE4.2.
	(ix86_expand_builtin): Likewise.

	* config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): Define
	__SSE4_2__ for -msse4.2.

	* config/i386/i386.md (UNSPEC_CRC32): New for SSE4.2.
	(CRC32MODE): Likewise.
	(crc32modesuffix): Likewise.
	(crc32modeconstraint): Likewise.
	(sse4_2_crc32<mode>): Likewise.
	(sse4_2_crc32di): Likewise.

	* config/i386/i386.opt (msse4.2): New for SSE4.2.
	(msse4): Likewise.

	* config/i386/nmmintrin.h: New. The dummy SSE4.2 intrinsic header
	file.

	* config/i386/smmintrin.h: Add SSE4.2 intrinsics.

	* config/i386/sse.md (sse4_2_gtv2di3): New pattern for
	SSE4.2.
	(vcond<mode>): Use SSEMODEI instead of SSEMODE124.
	(vcondu<mode>): Likewise.

	* doc/extend.texi: Document SSE4.2 built-in functions.

	* doc/invoke.texi: Document -msse4.2/-msse4.

From-SVN: r125236
2007-05-31 12:52:24 -07:00
John David Anglin 8119b4e4bb md.texi: Document constraints on HP PA-RISC.
* doc/md.texi: Document constraints on HP PA-RISC.

From-SVN: r125158
2007-05-29 01:12:58 +00:00
Gerald Pfeifer 565f8ce5ff install.texi (Prerequisites): We no longer require Autoconf 2.13 for the top-level.
* doc/install.texi (Prerequisites): We no longer require Autoconf
	2.13 for the top-level.

From-SVN: r125131
2007-05-28 15:42:25 +00:00
Kazu Hirata 110abdbc68 i386.c, [...]: Fix comment typos.
* config/i386/i386.c, config/pa/pa.c, config/spu/spu.c,
	df-problems.c, df-scan.c, domwalk.c, ebitmap.c, ebitmap.h,
	fold-const.c, gcc.c, ipa-type-escape.c, omega.c, omega.h,
	tree-ssa-coalesce.c, tree-ssa-live.c, tree-ssa-structalias.c,
	tree-vrp.c: Fix comment typos.  Follow spelling conventions.
	* doc/tm.texi: Follow spelling conventions.

From-SVN: r125090
2007-05-26 13:00:47 +00:00
Sandra Loosemore cd3a59b38e mips.c (mips_attribute_table): Add "near" and "far" function attributes, "far" being an alias for "long_call".
2007-05-25  Sandra Loosemore  <sandra@codesourcery.com>
	    Nigel Stephens  <nigel@mips.com>

	gcc/
	* config/mips/mips.c (mips_attribute_table): Add "near" and "far"
	function attributes, "far" being an alias for "long_call".
	(TARGET_COMP_TYPE_ATTRIBUTES): Define as mips_comp_type_attributes.
	(mips_near_type_p, mips_far_type_p): New.
	(mips_comp_type_attributes): New function to check that attributes
	attached to a function type are compatible.
	(mips_output_mi_thunk): Test SYMBOL_REF_LONG_CALL_P() rather than
	TARGET_LONG_CALLS when deciding	whether we can do a direct sibcall
	to the target function of the thunk.
	(mips_encode_section_info): Check for "near" and "far" function
	attributes, and always set the SYMBOL_FLAG_LONG_CALL bit explicitly.

	* config/mips/predicates.md (const_call_insn_operand): Test only
	SYMBOL_REF_LONG_CALL_P() and not TARGET_LONG_CALLS.

	* doc/extend.texi (Function Attributes): Document MIPS "near" and
	"far" attributes.

	* testsuite/gcc.target/mips/near-far-1.c:  New test case.
	* testsuite/gcc.target/mips/near-far-2.c:  New test case.
	* testsuite/gcc.target/mips/near-far-3.c:  New test case.
	* testsuite/gcc.target/mips/near-far-4.c:  New test case.

Co-Authored-By: Nigel Stephens <nigel@mips.com>

From-SVN: r125086
2007-05-25 22:02:37 -04:00
Kazu Hirata c80b4100e0 cfglayout.c, [...]: Fix comment typos.
* cfglayout.c, cgraphunit.c, config/avr/avr.c, fold-const.c,
	haifa-sched.c, optabs.h, tree-affine.c, tree-data-ref.c,
	tree-predcom.c, tree-ssa-alias-warnings.c,
	tree-ssa-forwprop.c, tree-vect-analyze.c, tree-vrp.c: Fix
	comment typos.  Follow spelling conventions.
	* doc/cpp.texi, doc/invoke.texi: Fix typos.

From-SVN: r125080
2007-05-25 22:58:16 +00:00
Dirk Mueller 51bc54a661 extend.texi (alloc_size): New attribute.
2007-05-25  Dirk Mueller  <dmueller@suse.de>
            Marcus Meissner <meissner@suse.de>

        * doc/extend.texi (alloc_size): New attribute.
        * c-common.c (handle_alloc_size_attribute): New.
        * tree-object-size.c (alloc_object_size): Use alloc_size
        attribute, if available.

        * testsuite/gcc.dg/attr-alloc_size.c: New.


Co-Authored-By: Marcus Meissner <meissner@suse.de>

From-SVN: r125073
2007-05-25 21:18:15 +00:00
Ollie Wild a702045a24 macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
* macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
	* pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
	(cpp_write_pch_state): Save __COUNTER__ state.
	(cpp_valid_state): Check valid __COUNTER__ state.
	(cpp_read_state): Read new __COUNTER__ state.
	* include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
	* init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
	* internal.h (struct cpp_reader): Add counter member.

	* gcc.dg/cpp/counter-1.c: New test.
	* gcc.dg/pch/counter-1.c: New test.
	* gcc.dg/pch/counter-1.hs: New file.
	* gcc.dg/pch/counter-2.c: New test.
	* gcc.dg/pch/counter-2.hs: New file.
	* gcc.dg/pch/counter-3.c: New test.
	* gcc.dg/pch/counter-3.hs: New file.

	* doc/cpp.texi (Common Predefined Macros): Add __COUNTER__
	description.

From-SVN: r125041
2007-05-24 20:55:36 +00:00
Zdenek Dvorak bbc8a8dc0d passes.texi: Document predictive commoning.
* doc/passes.texi: Document predictive commoning.
	* doc/invoke.texi (-fpredictive-commoning): Document.
	* opts.c (decode_options): Enable flag_predictive_commoning on -O3.
	* tree-ssa-loop-im.c (get_lsm_tmp_name): Export.  Allow
	adding indices to the generated name.
	(schedule_sm): Pass 0 to get_lsm_tmp_name.
	* tree-ssa-loop-niter.c (stmt_dominates_stmt_p): Export.
	* tree-pretty-print.c (op_symbol_1): Renamed to ...
	(op_symbol_code): ... and exported.
	(dump_omp_clause, op_symbol): Use op_symbol_code
	instead of op_symbol_1.
	* tree-pass.h (pass_predcom): Declare.
	* timevar.def (TV_PREDCOM): New timevar.
	* tree-ssa-loop.c (run_tree_predictive_commoning,
	gate_tree_predictive_commoning, pass_predcom): New.
	* tree-data-ref.c (find_data_references_in_loop): Find the
	references in dominance order.
	(canonicalize_base_object_address): Ensure that the result has
	pointer type.
	(dr_analyze_innermost): Export.
	(create_data_ref): Code to fail for references with invariant
	address moved ...
	(find_data_references_in_stmt): ... here.
	* tree-data-ref.h (dr_analyze_innermost): Declare.
	* tree-affine.c: Include tree-gimple.h and hashtab.h.
	(aff_combination_find_elt, name_expansion_hash,
	name_expansion_eq, tree_to_aff_combination_expand,
	double_int_constant_multiple_p, aff_combination_constant_multiple_p):
	New functions.
	* tree-affine.h (aff_combination_constant_multiple_p,
	tree_to_aff_combination_expand): Declare.
	* tree-predcom.c: New file.
	* common.opt (fpredictive-commoning): New option.
	* tree-flow.h (op_symbol_code, tree_predictive_commoning,
	stmt_dominates_stmt_p, get_lsm_tmp_name): Declare.
	* Makefile.in (tree-predcom.o): Add.
	(tree-affine.o): Add TREE_GIMPLE_H dependency.
	* passes.c (init_optimization_passes):  Add dceloop after
	copy propagation in loop optimizer.  Add predictive commoning
	to loop optimizer passes.

	* gcc.dg/tree-ssa/predcom-1.c: New test.
	* gcc.dg/tree-ssa/predcom-2.c: New test.
	* gcc.dg/tree-ssa/predcom-3.c: New test.
	* gcc.dg/tree-ssa/predcom-4.c: New test.
	* gcc.dg/tree-ssa/predcom-5.c: New test.
	* gcc.dg/vect/dump-tree-dceloop-pr26359.c: Test dceloop2 dumps.

From-SVN: r125030
2007-05-24 16:09:26 +00:00