Commit Graph

142157 Commits

Author SHA1 Message Date
Arnaud Charlet 549cc9c2bc [multiple changes]
2015-11-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb (Find_Selected_Component): In a synchronized
	body, a reference to an operation of an object of the same
	synchronized type was always interpreted as a reference to the
	current instance. This is not always the case, as the prefix of
	the reference may designate an object of the same type declared
	in the enclosing context prior to the body.

2015-11-12  Arnaud Charlet  <charlet@adacore.com>

	* impunit.ads, impunit.adb (Get_Kind_Of_File): New. Cleaned up
	implementation from previous Get_Kind_Of_Unit.
	(Get_Kind_Of_Unit): Reimplemented using Get_Kind_Of_File.
	* debug.adb: Remove d.4 switch, no longer used.
	* opt.ads: Update doc on Debugger_Level.
	* gnat1drv.adb: Code clean ups.
	* sinput.ads: minor fix in comment

2015-11-12  Bob Duff  <duff@adacore.com>

	* sinfo.adb, sinfo.ads, sem_ch6.adb, atree.ads: Add
	Was_Expression_Function flag, which is set in sem_ch6.adb when
	converting an Expression_Function into a Subprogram_Body.

2015-11-12  Pascal Obry  <obry@adacore.com>

	* usage.adb: Update overflow checking documentation.

From-SVN: r230243
2015-11-12 12:52:59 +01:00
Arnaud Charlet b3083540f5 [multiple changes]
2015-11-12  Tristan Gingold  <gingold@adacore.com>

	* snames.ads-tmpl: Name_Gnat_Extended_Ravenscar: New identifier.
	* s-rident.ads (Profile_Name): Add GNAT_Extended_Ravenscar.
	(Profile_Info): Add new entry for GNAT_Extended_Ravenscar.
	* sem_prag.adb (Set_Ravenscar_Profile): Add Profile parameter
	to handle various ravenscar profiles. Adjust error messages.
	(Analyze_Pragma): Handle GNAT_Extended_Ravenscar profile.
	* targparm.adb (Get_Target_Parameters): Handle
	GNAT_Extended_Ravenscar profile.

2015-11-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_warn.adb (Warn_On_Unreferenced_Entity): If the entity is an
	Out_Parameter the front-end does not emit any warning on it, so
	do not suppress warnings on the entity because the backend might
	be able to determine an uninitialized path and warn accordingly.

2015-11-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Analyze_Selected_Component): Diagnose an attempt
	to reference an internal entity from a synchronized type from
	within the body of that type, when the prefix of the selected
	component is not the current instance.

2015-11-12  Ed Falis  <falis@adacore.com>

	* s-stchop-vxworks.adb: Clean up in stack checking code.

2015-11-12  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch6.adb (Is_Build_In_Place_Function_Call):
	Test Expression (N) in N_Type_Conversion cases as well,
	since conversions can occur in actual parameter contexts.
	(Make_Build_In_Place_Call_In_Anonymous_Context): Retrieve
	function call from Expression (Func_Call) when Nkind (Func_Call)
	is N_Type_Conversion, since conversions are allowed in "anonymous"
	contexts (specifically, as actual parameters).

From-SVN: r230242
2015-11-12 12:46:35 +01:00
Arnaud Charlet 7408c4a5e0 sem_ch4.adb (analyze_If_Expression): Reject IF-expression where THEN-expression is overloaded and none of its...
2015-11-12  Thomas Quinot  <quinot@adacore.com>

	* sem_ch4.adb (analyze_If_Expression): Reject IF-expression where
	THEN-expression is overloaded and none of its interpretation is
	compatible with the ELSE-expression.

From-SVN: r230241
2015-11-12 12:42:00 +01:00
Arnaud Charlet e3f94155df [multiple changes]
2015-11-12  Jerome Lambourg  <lambourg@adacore.com>

	* init.c: Do not try to mess with the MSR values in RTP mode:
	not needed and forbidden.

2015-11-12  Ed Schonberg  <schonberg@adacore.com>

	* exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
	full view of a type that has pragma Stream_Convert, because
	this indicates special processing for the stream operations of
	the type.

From-SVN: r230240
2015-11-12 12:40:26 +01:00
Arnaud Charlet 311014705a [multiple changes]
2015-11-12  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch5.adb, sem_ch3.adb, exp_util.ads, inline.adb, freeze.adb,
	sem_util.adb, sem_util.ads, par-ch6.adb, sem_elab.adb: Minor
	reformatting and a typo fix.

2015-11-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Preanalyze_Actuals): Add guard on use of
	Incomplete_Actuals, which are only stored for a package
	instantiation, in order to place the instance in the body of
	the enclosing unit.

2015-11-12  Ed Schonberg  <schonberg@adacore.com>

	* exp_intr.adb: Add legality checks on calls to a
	Generic_Dispatching_Constructor: the given tag must be defined,
	it cannot be the tag of an abstract type, and its accessibility
	level must not be greater than that of the constructor.

2015-11-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Try_Container_Indexing, Constant_Indexing_OK):	If
	the context is an overloaded call, assume that Constant_Indexing
	is not OK if an interpretation has an assignable parameter
	corresponding to the indexing expression.

2015-11-12  Jerome Lambourg  <lambourg@adacore.com>

	* init.c (__gnat_error_handler): Force the SPE bit of the MSR
	when executing on e500v2 CPU.

2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Analyze_Constituent): Stop the
	analysis after detecting a misplaced constituent as this is a
	critical error.

From-SVN: r230239
2015-11-12 12:38:28 +01:00
Ilya Enkovich 3095f7c6eb expr.c (do_store_flag): Expand vector comparison as VEC_COND_EXPR if...
gcc/

	* expr.c (do_store_flag): Expand vector comparison as
	VEC_COND_EXPR if vector comparison is not supported
	by target.

gcc/testsuite/

	* gcc.dg/pr68286.c: New test.

From-SVN: r230238
2015-11-12 11:38:24 +00:00
Hristian Kirtchev e9ea8f9e56 sem_ch10.adb, atree.adb: Minor reformatting.
2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch10.adb, atree.adb: Minor reformatting.

2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_elab.adb (Check_A_Call): Add new variable
	Is_DIC_Proc. Report elaboration issue in SPARK concerning calls
	to source subprograms or nontrivial Default_Initial_Condition
	procedures. Add specialized error message to avoid outputting
	the internal name of the Default_Initial_Condition procedure.
	* sem_util.ads, sem_util.adb
	(Is_Non_Trivial_Default_Init_Cond_Procedure): New routine.

From-SVN: r230237
2015-11-12 12:35:30 +01:00
Hristian Kirtchev 8a0183fdf2 contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract): Remove the guard concerning entry bodies as it is spurious.
2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>

	* contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
	Remove the guard concerning entry bodies as it is spurious.
	(Analyze_Entry_Or_Subprogram_Contract): Skip the analysis of
	Contract_Cases when not annotating the tree.
	* einfo.adb: Node25 is now used as Contract_Wrapper.
	(Contract_Wrapper): New routine.
	(PPC_Wrapper): Removed.
	(Set_Contract_Wrapper): New routine.
	(Set_PPC_Wrapper): Removed.
	(Write_Field25_Name): Add output for Contract_Wrapper. Remove
	output for PPC_Wrapper.
	* einfo.ads: New attribute Contract_Wrapper along with usage
	in entities. Remove attribute PPC_Wrapper along with usage in nodes.
	(Contract_Wrapper): New routine along with pragma Inline.
	(PPC_Wrapper): Removed along with pragma Inline.
	(Set_Contract_Wrapper): New routine along with pragma Inline.
	(Set_PPC_Wrapper): Removed along with pragma Inline.
	* exp_ch9.adb (Build_Contract_Wrapper): New routine.
	(Build_PPC_Wrapper): Removed.
	(Build_Protected_Entry): Code cleanup.
	(Expand_Entry_Declaration): Create a contract wrapper
	which now verifies Contract_Cases along with pre/postconditions.
	(Expand_N_Task_Type_Declaration): There is no need to check
	whether an entry has pre/postconditions as this is now done
	in Build_Contract_Wrapper.
	* sem_ch13.adb (Analyze_Aspect_Specifications): Pragma
	Refined_Post is now properly inserted in entry bodies.
	(Insert_Pragma): Add circuitry to insert in an entry body. Redo
	the instance "header" circuitry. Remove the now obsolete special
	case of inserting pre- conditions.
	* sem_prag.adb (Analyze_Pragma): Pragma Contract_Cases now
	applies to entries.
	* sem_res.adb (Resolve_Entry_Call): Update the calls to
	PPC_Wrapper.

From-SVN: r230236
2015-11-12 12:15:12 +01:00
Hristian Kirtchev d6dffa6695 exp_attr.adb, [...]: Minor reformatting.
2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_attr.adb, freeze.adb, sem_util.adb, sem_ch13.adb: Minor
	reformatting.

From-SVN: r230235
2015-11-12 12:12:23 +01:00
Ed Schonberg 73f05f9fe8 exp_attr.adb (Compile_Stream_Body_In_Scope): When compiling a stream operation for an array type...
2015-11-12  Ed Schonberg  <schonberg@adacore.com>

	* exp_attr.adb (Compile_Stream_Body_In_Scope): When compiling
	a stream operation for an array type, install the scope of the
	component type if it is private and not in scope, to prevent
	spurious errors if the full view of the component type has
	defaulted discriminants.

From-SVN: r230234
2015-11-12 12:09:59 +01:00
Eric Botcazou b3b5c6a236 sem_ch13.adb (Analyze_Attribute_Definition_Clause): For a variable, if this is not an overlay, set on Treat_As_Volatile on it.
2015-11-12  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_ch13.adb (Analyze_Attribute_Definition_Clause): For a
	variable, if this is not an overlay, set on Treat_As_Volatile on it.
	* gcc-interface/decl.c (E_Variable): Do not force the type to volatile
	for address clauses. Tweak and adjust various RM references.

2015-11-12  Eric Botcazou  <ebotcazou@adacore.com>

	* checks.ads: Minor comment fix.

From-SVN: r230233
2015-11-12 12:06:34 +01:00
Arnaud Charlet 637535d736 gnat_rm.texi, [...]: Update documentation.
* gnat_rm.texi, gnat_ugn.texi,
        doc/gnat_ugn/platform_specific_information.rst,
        doc/gnat_ugn/gnat_and_program_execution.rst,
        doc/gnat_ugn/the_gnat_compilation_model.rst,
        doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
        doc/gnat_rm/implementation_defined_pragmas.rst: Update documentation.

From-SVN: r230232
2015-11-12 12:03:35 +01:00
Arnaud Charlet 53044824a6 gnat_rm.texi, [...]: Update documentation.
* gnat_rm.texi, gnat_ugn.texi,
        doc/gnat_ugn/platform_specific_information.rst,
        doc/gnat_ugn/gnat_and_program_execution.rst,
        doc/gnat_ugn/the_gnat_compilation_model.rst,
        doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
        doc/gnat_rm/implementation_defined_pragmas.rst: Update documentation.

From-SVN: r230231
2015-11-12 12:03:00 +01:00
Arnaud Charlet 1db50ba605 Code clean ups.
From-SVN: r230230
2015-11-12 12:02:17 +01:00
Eric Botcazou c31b57af90 einfo.ads (Overlays_Constant): Document usage for E_Constant.
2015-11-12  Eric Botcazou  <ebotcazou@adacore.com>

	* einfo.ads (Overlays_Constant): Document usage for E_Constant.
	* freeze.adb (Warn_Overlay): Small reformatting.
	(Check_Address_Clause): Deal specifically with deferred
	constants.  For a variable or a non-imported constant
	overlaying a constant object and with initialization value,
	either remove the initialization or issue a warning.  Fix a
	couple of typos.
	* sem_util.adb (Note_Possible_Modification): Overhaul the condition for
	the warning on modified constants and use Find_Overlaid_Entity instead
	of doing it manually.
	* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Compute and
	set Overlays_Constant once on entry.  Do not treat the overlaid
	entity as volatile.  Do not issue the warning on modified
	constants here.
	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Remove
	over-restrictive condition for the special treatment of deferred
	constants.
	<E_Variable>: Remove obsolete associated code.

From-SVN: r230229
2015-11-12 11:59:25 +01:00
Eric Botcazou 16f1996259 trans.c (gnat_to_gnu): Do not materialize renamed subprograms if only annotating types.
2015-11-12  Eric Botcazou  <ebotcazou@adacore.com>                  
                                                                    
        * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Renaming_Decl>: Do
        not materialize renamed subprograms if only annotating types.

From-SVN: r230228
2015-11-12 11:57:17 +01:00
Arnaud Charlet 1d4b96e007 decl.c (gnat_to_gnu_entity): Create IMPORTED_DECL nodes to describe the subprogram renamings which are...
2015-11-12  Pierre-Marie de Rodat  <derodat@adacore.com>

        * gcc-interface/decl.c (gnat_to_gnu_entity): Create
        IMPORTED_DECL nodes to describe the subprogram renamings which
        are relevant at debug time.
        * gcc-interface/gigi.h (get_debug_scope): Add declaration.
        * gcc-interface/trans.c (Identifier_to_gnu): Consider
        N_Defining_Operator_Symbol as valid entities.
        (gnat_to_gnu): Handle N_Defining_Operator_Symbol the same way as
        other entities.  Introduce a specific handling for
        N_Subprogram_Renaming_Declaration: call gnat_to_gnu_entity on
        the entity defined for relevant ones.
        (process_decls): Process subprogram renaming declarations during
        the second pass only.
        * gcc-interface/utils.c (get_debug_scope): Make it external.
        Consider N_Defining_Operator_Symbol as valid entities.
        (gnat_write_global_declarations): Output debugging information
        for top-level imported declarations.
        * gcc-interface/Makefile.in: Fix typo.

From-SVN: r230227
2015-11-12 11:55:37 +01:00
Arnaud Charlet 81501d2b45 [multiple changes]
2015-11-12  Emmanuel Briot  <briot@adacore.com>

	* s-os_lib.ads: Documentation update.

2015-11-12  Arnaud Charlet  <charlet@adacore.com>

	* s-taprop-vxworks.adb, s-osinte-vxworks.ads: Use a single import of
	taskDelay to avoid confusion.

2015-11-12  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb (Expand_Simple_Function_Return): If the return
	type is class-wide and the expression is a view conversion,
	remove the conversion to prevent overriding of the tag, which
	must be that of the object being returned.

2015-11-12  Tristan Gingold  <gingold@adacore.com>

	* bindgen.adb (Gen_Adainit): Code cleanup.

2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>

	* s-stalib.ads: Code cleanup.

2015-11-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Analyze_Incomplete_Type_Decl): small optimization.
	(Analyze_Subtype_Declaration): For floating point types,
	inherit dimensions.
	(OK_For_Limited_Init_In_05): Handle properly a conditional
	expression whose condition is static, and is rewritten as the
	branch that will be executed.

2015-11-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Resolve_Attribute, case 'Access): If the context
	type is an access constant type, do not mark the attribute
	reference as a possible modification of the prefix.

From-SVN: r230226
2015-11-12 11:49:07 +01:00
Steve Baird 0fe797c584 2015-11-12 Steve Baird <baird@adacore.com>
* sem_ch6.adb (Analyze_Procedure_Call) If CodePeer_Mode is True,
	do not analyze the expression of a machine code insertion.
	* sem_ch13.adb (Analyze_Code_Statement) If CodePeer_Mode is True,
	mark the N_Code_Statement node as analyzed and do nothing else.

From-SVN: r230225
2015-11-12 11:44:37 +01:00
Arnaud Charlet b420ba79de [multiple changes]
2015-11-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Check_Limited_Return): Make global to package
	for use elsewhere.
	(Analyze_Expression_Function): Remove duplicated code, pre-analyze
	expression to capture names and call Check_Limited_Return so
	that semantic checks are identical to those for regular functions
	returning limited types.

2015-11-12  Gary Dismukes  <dismukes@adacore.com>

	* bindgen.adb: Fix typo.
	* sem_ch6.adb: Minor reformatting.

2015-11-12  Emmanuel Briot  <briot@adacore.com>

	* s-os_lib.adb (Argument_String_To_List): fix handling of
	windows separators

From-SVN: r230224
2015-11-12 11:43:33 +01:00
Christian Bruel 465f1e5d63 mmx-1.c: Adjust for unified asm.
2015-11-12  Christian Bruel  <christian.bruel@st.com>

	* gcc.target/arm/mmx-1.c: Adjust for unified asm.

From-SVN: r230223
2015-11-12 11:20:29 +01:00
Renlin Li 87494f5569 [PATCH][ARM]Fix addsi3_compare_op2 pattern.
gcc/

2015-11-12  Renlin Li  <renlin.li@arm.com>

	* config/arm/arm.md (addsi3_compare_op2): Make the order of
	assembly pattern consistent with constraint order.

From-SVN: r230222
2015-11-12 10:14:35 +00:00
Jonathan Wakely 53dc6fb862 * include/experimental/bits/string_view.tcc: Fix doxygen @file.
From-SVN: r230221
2015-11-12 10:08:49 +00:00
Tom de Vries 73064edc3a gen-pass-instances.awk: Simplify match regexp in handle_line
2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk (handle_line): Simplify match regexp.

From-SVN: r230220
2015-11-12 10:02:58 +00:00
Tom de Vries c741b3dd5e gen-pass-instances.awk: Simplify init of postfix_starts_at in handle_line
2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk (handle_line): Simplify init of
	postfix_starts_at.

From-SVN: r230219
2015-11-12 10:02:49 +00:00
Tom de Vries b2a3c016f3 gen-pass-instances.awk: Rename var where to call_starts_at in handle_line
2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk (handle_line): Rename var where to
	call_starts_at.

From-SVN: r230218
2015-11-12 10:02:40 +00:00
Claudiu Zissulescu b1a827517a arc.c (gen_compare_reg): Swap operands also when we do not expand to rtl.
2015-11-11  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (gen_compare_reg): Swap operands also when we
	do not expand to rtl.

From-SVN: r230217
2015-11-12 10:28:19 +01:00
Richard Biener 3826795b8c re PR tree-optimization/58497 (SLP vectorizes identical operations)
2015-11-12  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/58497
	* tree-vect-generic.c: Include gimplify.h.
	(tree_vec_extract): Lookup constant/constructor DEFs.
	(do_cond): Unshare cond.

From-SVN: r230216
2015-11-12 09:00:37 +00:00
Uros Bizjak c471289ac8 i386.c (ix86_legitimate_combined_insn): Reject combined insn if the alignment of vector mode memory operand is less...
* config/i386/i386.c (ix86_legitimate_combined_insn): Reject
	combined insn if the alignment of vector mode memory operand
	is less than ssememalign.

testsuite/ChangeLog:

	* gcc.target/i386/sse-1.c (swizzle): Assume that a is
	aligned to 64 bits.

From-SVN: r230215
2015-11-12 09:11:11 +01:00
Tom de Vries 61fb1f74fe gen-pass-instances.awk: Make print command clearer in handle_line
2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk (handle_line): Print parentheses and pass_name
	explicitly.

From-SVN: r230213
2015-11-12 07:31:47 +00:00
Tom de Vries 504943f42f gen-pass-instances.awk: Add pass_num, prefix and postfix vars in handle_line
2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk (handle_line): Add pass_num, prefix and postfix
	vars.

From-SVN: r230212
2015-11-12 07:31:38 +00:00
Tom de Vries 9fa1a40255 gen-pass-instances.awk: Add comments in handle_line
2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk (handle_line): Add comments.

From-SVN: r230211
2015-11-12 07:31:30 +00:00
Tom de Vries 7d3e64f727 gen-pass-instances.awk: Rename len_of_end to len_of_close in handle_line
2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk (handle_line): Rename len_of_end to
	len_of_close.

From-SVN: r230210
2015-11-12 07:31:22 +00:00
Tom de Vries 0f73e6679b gen-pass-instances.awk: Add len_of_call var in handle_line
2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk (handle_line): Add len_of_call variable.

From-SVN: r230209
2015-11-12 07:31:13 +00:00
Tom de Vries d2616f3df6 gen-pass-instances.awk: Use early-out in handle_line
2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk (handle_line): Restructure using early-out.

From-SVN: r230208
2015-11-12 07:31:01 +00:00
Tom de Vries 2182471e3c gen-pass-instances.awk: Unify semicolon use in handle_line
2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk (handle_line): Unify semicolon use.

From-SVN: r230207
2015-11-12 07:30:52 +00:00
Tom de Vries 3d0ceb985f gen-pass-instances.awk: Remove unused var in handle_line
2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk (handle_line): Remove unused var line_length.

From-SVN: r230206
2015-11-12 07:30:44 +00:00
Tom de Vries a3a5ff4286 gen-pass-instances.awk: Add emacs indent setting
2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk: Add emacs indent setting.

From-SVN: r230205
2015-11-12 07:30:32 +00:00
Naveen H.S 5711ac884b fold-const.c (fold_binary_loc): Move Convert A/B/C to A/(B*C) to match.pd.
2015-11-12  Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

	* fold-const.c (fold_binary_loc) : Move Convert A/B/C to A/(B*C)
	to match.pd.
	Move Convert A/(B/C) to (A/B)*C to match.pd.
	Move Convert C1/(X*C2) into (C1/C2)/X to match.pd.
	Move Optimize (X & (-A)) / A where A is a power of 2, to
	X >> log2(A) to match.pd.

	* match.pd (rdiv (rdiv:s @0 @1) @2): New simplifier.
	(rdiv @0 (rdiv:s @1 @2)): New simplifier.
	(div (convert? (bit_and @0 INTEGER_CST@1)) INTEGER_CST@2):
	New simplifier.
	(rdiv REAL_CST@0 (mult @1 REAL_CST@2)): New simplifier.

From-SVN: r230204
2015-11-12 05:34:54 +00:00
Charles Baylis ab68f86562 [ARM] remove unused variable
gcc/Changelog

2015-11-12  Charles Baylis  <charles.baylis@linaro.org>

        * config/arm/neon.md: (neon_vld2_lane<mode>): Remove unused max
        variable.
        (neon_vst2_lane<mode>): Likewise.
        (neon_vld3_lane<mode>): Likewise.
        (neon_vst3_lane<mode>): Likewise.
        (neon_vld4_lane<mode>): Likewise.
        (neon_vst4_lane<mode>): Likewise.

From-SVN: r230203
2015-11-12 02:24:24 +00:00
Jason Merrill 9e4c469a24 decl.c (duplicate_decls): When combining typedefs, remove the new type from the variants list.
* decl.c (duplicate_decls): When combining typedefs, remove the
	new type from the variants list.

From-SVN: r230202
2015-11-11 20:16:59 -05:00
Jason Merrill c7360ed2f9 pt.c (instantiate_class_template_1): Set function_depth around instantiation of lambda op().
* pt.c (instantiate_class_template_1): Set function_depth around
	instantiation of lambda op().

From-SVN: r230201
2015-11-11 19:53:19 -05:00
Aditya Kumar 65b016eb13 Preserve the original program while using graphite.
Earlier, graphite used to translate portions of the original program after
scop-detection in order to represent the SCoP into polyhedral model.  This was
required because each basic block was represented as independent basic block in
the polyhedral model. So all the cross-basic-block dependencies were translated
out-of-ssa.

With this patch those dependencies are also exposed to the ISL, so there is no
need to modify the original structure of the program.

After this patch we should be able to enable graphite at some default
optimization level.

Highlights:
Remove cross bb scalar to array translation
For reductions, add support for more than just INT_CST
Early bailout on codegen.
Verify loop-closed ssa structure during copy of renames
The uses of exprs should come from bb which dominates the bb
Collect the init value of close phi in loop-guard
Do not follow vuses for close-phi, postpone loop-close phi until the
    corresponding loop-phi is processed
Bail out if no bb found to place cond/loop -phis
Move insertion of liveouts at the end of codegen
Insert loop-phis in the loop-header.

This patch passes regtest and bootstrap with BOOT_CFLAGS='-O2 -fgraphite-identity -floop-nest-optimize'

2015-11-11  Aditya Kumar  <aditya.k7@samsung.com>
      Sebastian Pop  <s.pop@samsung.com>

	* graphite-isl-ast-to-gimple.c (class translate_isl_ast_to_gimple):
	  New member codegen_error
	(translate_isl_ast_for_loop): Remove call to single_succ_edge and early return.
	(translate_isl_ast_node_user): Early return in case of error.
	(translate_isl_ast_to_gimple::translate_isl_ast): Same.
	(translate_isl_ast_to_gimple::translate_pending_phi_nodes): New.
	(add_parameters_to_ivs_params): Remove macro.
	(graphite_regenerate_ast_isl): Add if_region pointer to region.
	* graphite-poly.c (new_poly_dr): Remove macro.
	(print_pdr): Same.
	(new_gimple_poly_bb): Same.
	(free_gimple_poly_bb): Same.
	(print_scop_params): Same.
	* graphite-poly.h (struct poly_dr): Same.
	(struct poly_bb): Add new_bb.
	(gbb_from_bb): Remove dead code.
	(pbb_from_bb): Same.
	* graphite-scop-detection.c (parameter_index_in_region_1): Same.
	(parameter_index_in_region): Same.
	(find_scop_parameters): Same.
	(build_cross_bb_scalars_def): New.
	(build_cross_bb_scalars_use): New.
	(graphite_find_cross_bb_scalar_vars): New
	(try_generate_gimple_bb): Reads and Writes.
	(build_alias_set): Move.
	(gather_bbs::before_dom_children): Gather bbs visited.
	(build_scops): call build_alias_set.
	* graphite-sese-to-poly.c (phi_arg_in_outermost_loop): Delete.
	(remove_simple_copy_phi): Delete.
	(remove_invariant_phi): Delete.
	(simple_copy_phi_p): Delete.
	(reduction_phi_p): Delete.
	(isl_id_for_dr): Remove unused param.
	(parameter_index_in_region_1): Remove macro usage.
	(set_scop_parameter_dim): Same.
	(add_param_constraints): Same.
	(add_conditions_to_constraints): Same
	(build_scop_iteration_domain): Same.
	(pdr_add_alias_set): Comment.
	(add_scalar_version_numbers): New.
	(build_poly_dr): ISL id.
	(build_scop_drs): Move.
	(build_poly_sr_1): Same.
	(insert_stmts): Remove.
	(build_poly_sr): New.
	(new_pbb_from_pbb): Delete.
	(insert_out_of_ssa_copy_on_edge): Delete.
	(create_zero_dim_array): Delete.
	(scalar_close_phi_node_p): Delete.
	(propagate_expr_outside_region): Delete.
	(rewrite_close_phi_out_of_ssa): Delete.
	(rewrite_phi_out_of_ssa): Delete.
	(rewrite_degenerate_phi): Delete.
	(rewrite_reductions_out_of_ssa): Delete.
	(rewrite_cross_bb_scalar_dependence): Delete.
	(handle_scalar_deps_crossing_scop_limits):
	(rewrite_cross_bb_scalar_deps): Delete.
	(build_poly_scop): Remove calls to out-of-ssa functions.
	* graphite.c (graphite_transform_loops): Early return in case of codegen error.
	* sese.c (debug_rename_map_1): Delete.
	(debug_rename_map): Delete.
	(sese_record_loop): Remove macro.
	(build_sese_loop_nests): Same.
	(new_sese_info): Same.
	(free_sese_info): Same.
	(sese_insert_phis_for_liveouts):
	(is_loop_closed_ssa_use): New.
	(number_of_phi_nodes): New.
	(bb_contains_loop_close_phi_nodes): New.
	(bb_contains_loop_phi_nodes): New.
	(phi_uses_name): New.
	(is_valid_rename):
	(get_rename): Add old_bb and loop_phi for more precise matching of
	exprs.
	(set_rename): Pass region.
	(later_of_the_two): New.
	(gsi_insert_earliest): New.
	(collect_all_ssa_names): New.
	(substitute_ssa_name): New.
	(rename_all_uses): New.
	(get_rename_from_scev): New.
	(rename_uses): Pass old_bb for more precise matching of exprs.
	(get_def_bb_for_const): New.
	(get_new_name): New.
	(get_loc): New.
	(get_edges): New.
	(copy_loop_phi_args): New.
	(copy_loop_phi_nodes): New.
	(get_loop_init_value): New.
	(find_init_value): New.
	(find_init_value_close_phi): New.
	(copy_loop_close_phi_args): New.
	(copy_loop_close_phi_nodes): New.
	(add_phi_arg_for_new_expr): New.
	(copy_cond_phi_args): New.
	(copy_cond_phi_nodes): New.
	(copy_phi_nodes): New.
	(should_copy_to_new_region): New.
	(set_rename_for_each_def): New.
	(graphite_copy_stmts_from_block): Early return in case of error.
	(copy_bb_and_scalar_dependences): Same.
	* sese.h (vec_find): New.
	(SESE_PARAMS): Delete.
	(SESE_LOOPS): Delete.
	(SESE_LOOP_NEST): Delete.
	(sese_contains_loop): Remove macro usage.
	(sese_nb_params): Same.
	(struct gimple_poly_bb): Added read_scalar_refs, write_scalar_refs.

Co-Authored-By: Sebastian Pop <s.pop@samsung.com>

From-SVN: r230200
2015-11-12 00:37:47 +00:00
GCC Administrator f891c4f0b3 Daily bump.
From-SVN: r230199
2015-11-12 00:16:11 +00:00
David Edelsohn 42aa1c4280 * gcc.dg/pr65521.c: Fail on AIX.
From-SVN: r230195
2015-11-11 16:32:09 -05:00
Abderrazek Zaafrani eefa4bafa5 improve construction of the original schedule
The patch builds the original schedule based on the now optimized scattering
dimension instead of building one based on the loop index only.

The implementation is simpler and catches more cases where the original schedule
and the transformed schedule are the same, such as the one below:

for (i = 0; i < 1000; i++)
{
  Temp = F[i];
  for (j = 0; j < 1000; j++)
 {
    D[j] = E[j]  * Temp;
    A[i][j] = A[i][j]  + B[i][j] * C[i][j] - D[j] ;
  }
  D[i] = E[i] * F[i];
}

  * graphite-sese-to-poly.c (build_scop_original_schedule): Call
  isl_union_map_add_map on every pbb->schedule.

From-SVN: r230191
2015-11-11 20:43:51 +00:00
Sebastian Pop d82f8c85fc add testsuite automatic dg-options and dg-do action for isl-ast-gen-* and fuse-* files
* gcc.dg/graphite/fuse-1.c: Adjust pattern.  Remove dg-do.
        * gcc.dg/graphite/fuse-2.c: Same.
        * gcc.dg/graphite/graphite.exp (opt_files): Add fuse-*.c and
        isl-ast-gen-*.c files.
        * gcc.dg/graphite/isl-ast-gen-blocks-1.c: Remove dg-do and dg-options.
        * gcc.dg/graphite/isl-ast-gen-blocks-2.c: Same.
        * gcc.dg/graphite/isl-ast-gen-blocks-3.c: Same.
        * gcc.dg/graphite/isl-ast-gen-blocks-4.c: Same.
        * gcc.dg/graphite/isl-ast-gen-if-1.c: Same.
        * gcc.dg/graphite/isl-ast-gen-if-2.c: Same.
        * gcc.dg/graphite/isl-ast-gen-single-loop-1.c: Same.
        * gcc.dg/graphite/isl-ast-gen-single-loop-2.c: Same.
        * gcc.dg/graphite/isl-ast-gen-single-loop-3.c: Same.
        * gcc.dg/graphite/isl-ast-gen-user-1.c: Same.
        * gcc.dg/graphite/isl-codegen-loop-dumping.c: Remove.

From-SVN: r230190
2015-11-11 20:43:45 +00:00
Tom de Vries a6f4d493ba Make create_parallel_loop return void
2015-11-11  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (create_parallel_loop): Return void.

From-SVN: r230189
2015-11-11 20:22:22 +00:00
Tom de Vries d42ba2d233 Insert new exit block only when needed in transform_to_exit_first_loop_alt
2015-11-11  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (transform_to_exit_first_loop_alt): Insert new exit
	block only when needed.

From-SVN: r230188
2015-11-11 20:22:12 +00:00
Jonathan Wakely c5bd8d521a * libsupc++/new_handler.cc: Fix for explicit constructor change.
From-SVN: r230184
2015-11-11 17:29:39 +00:00