platform/upstream/linaro-gcc.git
8 years ago PR middle-end/67966
ebotcazou [Fri, 16 Oct 2015 15:56:49 +0000 (15:56 +0000)]
PR middle-end/67966
* gnat.dg/pack21.adb: New test.
* gnat.dg/pack22.adb: Likewise.
* gnat.dg/pack22_pkg.ad[sb]: New helper.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228917 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDocument options for Filesystem TS library
redi [Fri, 16 Oct 2015 13:55:12 +0000 (13:55 +0000)]
Document options for Filesystem TS library

* doc/xml/manual/configure.xml: Document
--enable-libstdcxx-filesystem-ts option.
* doc/xml/manual/status_cxx2014.xml: Document libstdc++fs.a.
* doc/xml/manual/using.xml: Likewise.
* doc/html/*: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228914 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Christian Bruel <christian.bruel@st.com>
chrbr [Fri, 16 Oct 2015 13:52:51 +0000 (13:52 +0000)]
2015-10-16  Christian Bruel  <christian.bruel@st.com>

  PR target/67745
  * config/arm/arm.h (FUNCTION_BOUNDARY): Use FUNCTION_BOUNDARY_P.
  (FUNCTION_BOUNDARY_P): New macro:
  * config/arm/arm.c (TARGET_RELAYOUT_FUNCTION, arm_relayout_function):
  New hook.
  * doc/tm.texi.in (TARGET_RELAYOUT_FUNCTION): Document.
  * doc/tm.texi (TARGET_RELAYOUT_FUNCTION): New hook.
  * gcc/target.def (TARGET_RELAYOUT_FUNCTION): Likewise.
  * gcc/function.c (allocate_struct_function): Call relayout_function hook.
  * gcc/passes.c (rest_of_decl_compilation): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228912 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 16 Oct 2015 13:52:44 +0000 (13:52 +0000)]
2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

* aspects.adb Add an entry for Constant_After_Elaboration in
table Canonical_Aspect.
* aspects.ads Add entries for Constant_After_Elaboration in
tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
and Implementation_Defined_Aspect.
* par-prag.adb Pragma Constant_After_Elaboration does not require
special processing by the parser.
* sem_ch13.adb Add an entry for Constant_After_Elaboration
in table Sig_Flags.
(Analyze_Aspect_Specifications):
Add processing for aspect Constant_After_Elaboration.
(Check_Aspect_At_Freeze_Point): Aspect Constant_After_Elaboration
does not require special processing at freeze time.
* sem_prag.adb (Analyze_Pragma): Add processing for pragma
Constant_After_Elaboration. Use routine Find_Related_Context to
retrieve the context of pragma Part_Of.
(Duplication_Error): Update comment on usage.
(Find_Related_Context): New routine.
* sem_prag.ads Add an entry for Constant_After_Elaboration
in table Aspect_Specifying_Pragma.
(Analyze_Contract_Cases_In_Decl_Part): Update the comment on usage.
* sem_util.adb (Add_Contract_Item): Add processing for pragma
Constant_After_Elaboration.
* sem_util.ads (Add_Contract_Item): Update the comment on usage.
* snames.ads-tmpl Add new predefined name and aspect id for
Constant_After_Elaboration.

2015-10-16  Vincent Celier  <celier@adacore.com>

* prj-pp.adb (Pretty_Print.Print): Correctly display extending
packages, instead of making them renamed packages.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228911 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 16 Oct 2015 13:43:47 +0000 (13:43 +0000)]
2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_ch12.adb (Analyze_Package_Instantiation):
Treat a missing SPARK_Mode annotation as having mode "Off".
(Analyze_Subprogram_Instantiation): Treat a missing SPARK_Mode
annotation as having mode "Off".
(Instantiate_Package_Body): Code
reformatting. Treat a missing SPARK_Mode annotation as having mode
"Off".
(Instantiate_Subprogram_Body): Code reformatting. Treat
a missing SPARK_Mode annotation as having mode "Off".

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* exp_ch5.adb: Code clean up.
* sem_ch13.adb: Minor fix in comment.

2015-10-16  Bob Duff  <duff@adacore.com>

* a-exexda.adb: Change format of Exception_Information to be
more like what we print for unhandled exceptions.
* a-exstat.adb: Parse new format.
* a-except-2005.adb, a-except.adb: Document new format.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228907 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Javier Miranda <miranda@adacore.com>
charlet [Fri, 16 Oct 2015 13:41:29 +0000 (13:41 +0000)]
2015-10-16  Javier Miranda  <miranda@adacore.com>

* sem_ch5.adb (Analyze_Iterator_Specification): Associate a
transient scope with the renaming object declararation.
* exp_util.adb (Insert_Actions): if the enclosing interator
loop is marked as requiring the secondary stack then attach the
actions to the transient scope.

2015-10-16  Bob Duff  <duff@adacore.com>

* exp_ch7.adb: Minor spelling fixes.

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
If anonymous type is component type of array type declaration,
analyze its declaration in the current scope, not the enclosing
one.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228906 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoComplete previous change.
charlet [Fri, 16 Oct 2015 13:40:04 +0000 (13:40 +0000)]
Complete previous change.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228905 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Christian Bruel <christian.bruel@st.com>
chrbr [Fri, 16 Oct 2015 13:37:14 +0000 (13:37 +0000)]
2015-10-16  Christian Bruel  <christian.bruel@st.com>

PR target/67745
* config/arm/arm.h (FUNCTION_BOUNDARY): Move optimize_size condition to:
* config/arm/arm.c (arm_option_override_internal): Call
arm_override_options_after_change_1.
(arm_override_options_after_change): New function.
(arm_override_options_after_change_1): Likewise.
(TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define hook.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228904 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoCode clean up.
charlet [Fri, 16 Oct 2015 13:28:39 +0000 (13:28 +0000)]
Code clean up.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228903 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoComplete previous change.
charlet [Fri, 16 Oct 2015 13:26:51 +0000 (13:26 +0000)]
Complete previous change.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228902 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Gary Dismukes <dismukes@adacore.com>
charlet [Fri, 16 Oct 2015 13:25:00 +0000 (13:25 +0000)]
2015-10-16  Gary Dismukes  <dismukes@adacore.com>

* prj.adb, sem_util.adb, exp_ch6.adb: Minor reformatting.

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* exp_ch5.adb (Expand_Formal_Container_Element_Loop): Modify
expansion to allow element iteration over formal containers
whose elements are indefinite types.

2015-10-16  Doug Rupp  <rupp@adacore.com>

* s-taprop-linux.adb (Monotonic_Clock): Call clock_gettime
instead of gettimeofday.
* s-osinte-linux.ads (clock_gettime): New imported subprogram.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228901 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoComplete previous change.
charlet [Fri, 16 Oct 2015 13:21:25 +0000 (13:21 +0000)]
Complete previous change.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228900 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 16 Oct 2015 13:14:24 +0000 (13:14 +0000)]
2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
Indefinite or limited library level objects are now returned on
the heap.
* exp_ch7.adb (Build_Finalization_Master): Add formal
parameter For_Lib_Level. Add context specific insertion for a
finalization master created for an access result type related
to a build-in-place function call used to initialize a library
level object.
* exp_ch7.ads (Build_Finalization_Master): Add formal parameter
For_Lib_Level. Update the comment on usage.
* sem_util.adb (Mark_Coextensions): Code cleanup.

2015-10-16  Emmanuel Briot  <briot@adacore.com>

* prj.adb (For_Every_Project_Imported_Context): Fix handling
of aggregated projects with duplicate names.
* a-ngelfu.ads: Minor whitespace fix.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228899 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix typo.
charlet [Fri, 16 Oct 2015 13:14:12 +0000 (13:14 +0000)]
Fix typo.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228898 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Ed Schonberg <schonberg@adacore.com>
charlet [Fri, 16 Oct 2015 13:11:18 +0000 (13:11 +0000)]
2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* sem_ch13.adb (Build_Predicate_Functions): The expression for
the predicate is side-effect free if it does not contain any
variable references.

2015-10-16  Bob Duff  <duff@adacore.com>

* a-convec.adb ("="): Previous version depended
on "=" composing, but that doesn't quite work -- we want the "="
operator passed in to the generic. So we need a loop after all.

2015-10-16  Yannick Moy  <moy@adacore.com>

* sem_util.adb (Is_Object_Reference): Attribute 'Loop_Entry produces
an object.
* sem_ch6.adb: Minor fix in comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228897 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Bob Duff <duff@adacore.com>
charlet [Fri, 16 Oct 2015 13:08:04 +0000 (13:08 +0000)]
2015-10-16  Bob Duff  <duff@adacore.com>

* a-contai.ads: Add two check names: Container_Checks and
Tampering_Check.  Move the tampering check machinery from
Ada.Containers.Vectors to Ada.Containers. Later we can share it
with other containers.
Disable the tampering machinery in the presence of
Suppress(Tampering_Check).
Simplify the implementation of tampering checks. E.g. use RAII
to make incrementing/decrementing of the counts more concise.
* a-contai.adb: New package body, implementing the above.
* a-convec.ads, a-convec.adb: Use tampering check machinery
in Ada.Containers.
Disable all checking code when checks are suppressed.
Simplify many of the operations. Implement "&" in terms of Append,
rather than "by hand".
Remove: function "=" (L, R : Elements_Array) return Boolean is
abstract; so we can call the predefined "=" on Elements_Array.
For "=" on Vectors: Previously, we returned True immediately if
Left'Address = Right'Address.  That seems like a non-optimization
("if X = X" is unusual), so removed that.  Simplify by using
slice comparison ("=" on Element_Array will automatically call
"=" on the components, even if user defined).

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* sem_ch13.adb (Chek_Record_Representation_Clause): When
iterating over components, skip anonymous subtypes created for
constrained array components.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228896 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
charlet [Fri, 16 Oct 2015 13:03:16 +0000 (13:03 +0000)]
2015-10-16  Eric Botcazou  <ebotcazou@adacore.com>

* a-tags.ads (Parent_Size): Remove obsolete pragma Export.
* s-finmas.ads (Header_Offset): Delete.
* s-finmas.adb (Header_Offset): Likewise.
(Finalize): Call Header_Size instead of Header_Offset.
* s-stposu.adb (Allocate_Any_Controlled): Likewise.
(Deallocate_Any_Controlled): Likewise.

2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* a-exetim.ads, a-exetim-mingw.ads, a-exetim-default.ads: Whitespace
cleanup.
* s-osprim-mingw.adb, einfo.ads, sem_util.adb, sem_util.ads,
sem_ch4.adb, sem_ch13.adb, s-trasym.adb, s-trasym.ads,
s-taprop-posix.adb: Minor reformatting.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228895 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Bob Duff <duff@adacore.com>
charlet [Fri, 16 Oct 2015 12:53:03 +0000 (12:53 +0000)]
2015-10-16  Bob Duff  <duff@adacore.com>

* adadecode.h, adadecode.c (ada_demangle): Remove
ada_demangle, no longer used.
* a-except-2005.adb: Bring System.Traceback.Symbolic into the
closure.

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
locate the access discriminant that supports implicit dereference on a
record type.
(Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
of Implicit_Dereference on an access_to_constant when actual
parameter is a rewritten variable or function call.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228886 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Bob Duff <duff@adacore.com>
charlet [Fri, 16 Oct 2015 12:47:43 +0000 (12:47 +0000)]
2015-10-16  Bob Duff  <duff@adacore.com>

        * a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get                elaboration circularities when polling is turned on.

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
When creating a full declaration for a formal parameter, the
entity is labelled as an Itype, so set Associated_Node_For_Itype
accordingly.
* einfo.ads: Clarify use of Associated_Node_For_Itype.

2015-10-16  Bob Duff  <duff@adacore.com>

* bindgen: Move pragmas Warnings earlier, otherwise
we can get warnings on with_clauses.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228885 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 16 Oct 2015 12:43:21 +0000 (12:43 +0000)]
2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
s-taprop-posix.adb (Monotonic_Clock): Removed, not used.
Remove remaining references to OS_Primitives.Monotonic_Clock.
Keep it only on windows which is a special case.

2015-10-16  Javier Miranda  <miranda@adacore.com>

* a-textio.adb (Get_Line): Fix documentation.
* einfo.ads (Interface_Name): Fix documentation.
* exp_aggr.adb (Backend_Processing_Possible): Fix documentation.
* exp_ch4.adb (Expand_N_In): Fix documentation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228884 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
charlet [Fri, 16 Oct 2015 12:41:13 +0000 (12:41 +0000)]
2015-10-16  Eric Botcazou  <ebotcazou@adacore.com>

* inline.adb (Subp_Info): Remove Listed component.
(Add_Inlined_Subprogram): Take an entity instead of an index.
Do not set Listed component to True.
(New_Entry): Do not initialize Listed component to False.
(Analyze_Inlined_Bodies): Do not test Listed component
(Must_Inline): Add calls not in the main unit only
if they are in a subprogram that can be inlined outside its unit.
(Add_Inlined_Body): Move test around and add comment.

2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* sinfo.ads, einfo.ads: monir clean ups.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228883 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * gcc-interface/Make-lang.in: Update dependencies
charlet [Fri, 16 Oct 2015 12:35:59 +0000 (12:35 +0000)]
    * gcc-interface/Make-lang.in: Update dependencies

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228882 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 16 Oct 2015 12:32:52 +0000 (12:32 +0000)]
2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* usage.adb, debug.adb, a-except.adb, a-except.ads, a-except-2005.adb,
a-except-2005.ads, s-imgrea.adb: Minor code clean ups related to
jgnat/dotnet removal.

2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* s-osprim-vxworks.adb, s-osprim-darwin.adb, s-tadeca.adb,
s-osprim-unix.adb, s-osprim-solaris.adb, s-osprim-posix.adb,
s-osprim.ads (Monotonic_Clock): Removed, unused.

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* sem_ch4.adb (Try_Object_Operation, Try_One_Interpretation):
Do not reset the Obj_Type of the prefix if an interpretation
involves an untagged type, to prevent a crash when analyzing an
illegal program in All_Errors mode.

2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_ch4.adb (Expand_N_Expression_With_Actions):
Force the evaluation of the expression when its type is Boolean.
(Force_Boolean_Evaluation): New routine.

2015-10-16  Bob Duff  <duff@adacore.com>

* sem_util.adb (Has_Discrim_Dep_Array): Remove
this function, and the call. No longer needed now that the back
end can handle such things. Should result in further speedups
in some cases.

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* sem_ch13.adb (Build_Predicate_Functions): If expression for
predicate is side-effect free, indicate that the predicate
function is pure, to allow for optimization of redundant
predicate checks.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228881 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 16 Oct 2015 12:25:58 +0000 (12:25 +0000)]
2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* checks.adb: Fix typo.
* s-osinte-linux.ads: Add header.
* projects.texi: Removed, no longer used.
* s-multip.adb: Minor: fix header.
* sem_ch3.adb, exp_ch7.adb, g-dirope.ads, sinfo.ads, types.ads,
a-textio.adb, s-exctra.adb, ali.adb, back_end.ads, exp_intr.adb,
a-tigeli.adb, exp_ch3.adb, s-os_lib.ads: Remove further references to
.NET.
* gnatlink.adb, opt.ads, exp_aggr.adb, s-solita.adb: Minor comment
updates.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228880 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Gary Dismukes <dismukes@adacore.com>
charlet [Fri, 16 Oct 2015 12:22:22 +0000 (12:22 +0000)]
2015-10-16  Gary Dismukes  <dismukes@adacore.com>

* exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
the temporary object used for a by-copy entry parameter, to
ensure that the object doesn't get its No_Initialization flag
reset later in Default_Initialize_Object. Also, generate the
assignment of the actual to the temporary in the additional case
of a scalar out parameter whose type has a Default_Value aspect.
* exp_ch3.adb: Fix minor typo in comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228879 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 16 Oct 2015 12:21:03 +0000 (12:21 +0000)]
2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
Minor reformatting.
* sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
SPARK_Mode from the context.

2015-10-16  Bob Duff  <duff@adacore.com>

* sem_util.adb (Requires_Transient_Scope):
If Typ is a generic formal incomplete type, look at the actual
type. Otherwise, we don't notice that the actual type is tagged,
has a variant part, etc, causing a mismatch of calling conventions
between caller and callee.

2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

* einfo.ads: Move the declaration of enumeration
literal E_Abstract_State above E_Entry.  Update the upper bound
of subtype Overloadable_Kind.

2015-10-16  Gary Dismukes  <dismukes@adacore.com>

* exp_attr.adb: Minor editorial changes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228878 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoShrink std::random_shuffle test to pass on simulators
redi [Fri, 16 Oct 2015 11:12:15 +0000 (11:12 +0000)]
Shrink std::random_shuffle test to pass on simulators

2015-10-16  Aurelio Remonda  <aurelio.remonda@tallertechnologies.com>

* testsuite/25_algorithms/random_shuffle/moveable.cc: Change variable
N from const int N = 200000 to const unsigned int N = 10000.
Delete useless fill_ascending function call.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228876 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago Revert:
hubicka [Fri, 16 Oct 2015 11:06:14 +0000 (11:06 +0000)]
Revert:
* ipa-icf-gimple.c (func_checker::compare_operand): Compare only
empty constructors.
* gcc.c-torture/compile/icfmatch.c: Add testcase

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228875 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 16 Oct 2015 11:01:53 +0000 (11:01 +0000)]
2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
Code clean up: remove special handling for .NET and JVM.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228874 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 16 Oct 2015 11:00:05 +0000 (11:00 +0000)]
2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* sem_ch12.adb: Minor punctuation fix in comment
* s-rident.ads: Minor consistency fix in comment
* exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
* restrict.ads: Style fix in comments.
* sem_prag.adb: Minor grammar fix in comment

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228873 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Gary Dismukes <dismukes@adacore.com>
charlet [Fri, 16 Oct 2015 10:56:54 +0000 (10:56 +0000)]
2015-10-16  Gary Dismukes  <dismukes@adacore.com>

* sem_ch12.adb: Minor reformatting/rewording.

2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* einfo.ads: Minor fix of duplicate words
* rident.ads: Minor style fix in comment

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228872 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 16 Oct 2015 10:54:13 +0000 (10:54 +0000)]
2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
set and restore the Ghost mode.
(Expand_N_Object_Declaration): Do not capture, set and restore the
Ghost mode.
(Freeze_Type): Redo the capture and restore of the Ghost mode.
(Restore_Globals): Removed.
* exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
and restore of the Ghost mode.
(Restore_Globals): Removed.
* exp_ch6.adb (Expand_N_Procedure_Call_Statement):
Redo the capture and restore of the Ghost mode.
(Expand_N_Subprogram_Body): Redo the capture, set and restore
of the Ghost mode.
(Expand_N_Subprogram_Declaration): Do not
capture, set and restore the Ghost mode.
(Restore_Globals): Removed.
* exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
and restore of the Ghost mode.
(Expand_N_Package_Declaration): Do not capture, set and restore the
Ghost mode.
* exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
Redo the capture and restore of the Ghost mode.
(Expand_N_Object_Renaming_Declaration): Redo
the capture and restore of the Ghost mode.
(Expand_N_Package_Renaming_Declaration):
Redo the capture and restore of the Ghost mode.
(Expand_N_Subprogram_Renaming_Declaration): Redo the capture
and restore of the Ghost mode.
* exp_ch11.adb Remove with and use clauses for Ghost.
(Expand_N_Exception_Declaration): Do not capture, set and restore
the Ghost mode.
* exp_disp.adb (Make_DT): Redo the capture and restore of the
Ghost mode.
(Restore_Globals): Removed.
* exp_prag.adb (Expand_Pragma_Check): Do not capture, set
and restore the Ghost mode.
(Expand_Pragma_Contract_Cases):
Redo the capture and restore of the Ghost mode.  Preserve the
original context of contract cases by setting / resetting the
In_Assertion_Expr counter.
(Expand_Pragma_Initial_Condition):
Redo the capture and restore of the Ghost mode.
(Expand_Pragma_Loop_Variant): Redo the capture and restore of
the Ghost mode.
(Restore_Globals): Removed.
* exp_util.adb (Make_Predicate_Call): Redo the capture and
restore of the Ghost mode.
(Restore_Globals): Removed.
* freeze.adb (Freeze_Entity): Redo the capture and restore of
the Ghost mode.
(Restore_Globals): Removed.
* ghost.adb (Check_Ghost_Context): Remove the RM reference from
the error message.
(Is_OK_Statement): Account for statements
that appear in assertion expressions.
(Is_Subject_To_Ghost):
Moved from spec.
* ghost.ads (Is_Subject_To_Ghost): Moved to body.
* rtsfind.ads (Load_RTU): Redo the capture and restore of the
Ghost mode.
* sem.adb Add with and use clauses for Ghost.
(Analyze): Redo
the capture and restore of the Ghost mode. Set the Ghost mode
when analyzing a declaration.
(Do_Analyze): Redo the capture
and restore of the Ghost mode.
* sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
and restore the Ghost mode.
(Analyze_Incomplete_Type_Decl):
Do not capture, set and restore the Ghost mode.
(Analyze_Number_Declaration): Do not capture, set and restore the
Ghost mode.
(Analyze_Object_Declaration): Do not capture, set and
restore the Ghost mode.
(Analyze_Private_Extension_Declaration):
Do not capture, set and restore the Ghost mode.
(Analyze_Subtype_Declaration): Do not capture, set and restore
the Ghost mode.
(Restore_Globals): Removed.
* sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
of the Ghost mode.
(Restore_Globals): Removed.
* sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
Do not capture, set and restore the Ghost mode.
(Analyze_Procedure_Call): Redo the capture and restore of the
Ghost mode.
(Analyze_Subprogram_Body_Helper): Redo the capture
and restore of the Ghost mode. (Analyze_Subprogram_Declaration):
Do not capture, set and restore the Ghost mode.
(Restore_Globals): Removed.
* sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
restore of the Ghost mode.
(Analyze_Package_Declaration):
Do not capture, set and restore the Ghost mode.
(Analyze_Private_Type_Declaration): Do not capture, set and
restore the Ghost mode.
(Restore_Globals): Removed.
* sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
set and restore the Ghost mode.
(Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
mode.
(Analyze_Object_Renaming): Do not capture, set and restore the
Ghost mode.
(Analyze_Package_Renaming): Do not capture, set and restore the Ghost
mode.
(Analyze_Subprogram_Renaming): Do not capture, set and restore the
Ghost mode.
(Restore_Globals): Removed.
* sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
set and restore the Ghost mode.
* sem_ch12.adb (Analyze_Generic_Package_Declaration):
Do not capture, set and restore the Ghost mode.
(Analyze_Generic_Subprogram_Declaration): Do not capture, set
and restore the Ghost mode.
* sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
the capture and restore of the Ghost mode.
* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
Redo the capture and restore of the Ghost mode.
(Analyze_External_Property_In_Decl_Part):
Redo the capture and restore of the Ghost mode.
(Analyze_Initial_Condition_In_Decl_Part): Redo the
capture and restore of the Ghost mode. (Analyze_Pragma):
Do not capture, set and restore the Ghost mode for Assert.
Redo the capture and restore of the Ghost mode for Check. Do
not capture and restore the Ghost mode for Invariant.
(Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
restore of the Ghost mode.
* sem_res.adb (Resolve): Capture, set and restore the Ghost mode
when resolving a declaration.
* sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
Redo the capture and restore of the Ghost mode.
(Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
and restore of the Ghost mode.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228871 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * tree.c (recompute_tree_invariant_for_addr_expr): Assert that the
ebotcazou [Fri, 16 Oct 2015 10:52:46 +0000 (10:52 +0000)]
* tree.c (recompute_tree_invariant_for_addr_expr): Assert that the
argument is an ADDR_EXPR.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228870 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Bob Duff <duff@adacore.com>
charlet [Fri, 16 Oct 2015 10:51:32 +0000 (10:51 +0000)]
2015-10-16  Bob Duff  <duff@adacore.com>

* debug.adb: Document -gnatdQ switch.

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
a formal abstract subprogram cannot have a null default: RM 12.6
(4 1.2).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228869 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Bob Duff <duff@adacore.com>
charlet [Fri, 16 Oct 2015 10:50:42 +0000 (10:50 +0000)]
2015-10-16  Bob Duff  <duff@adacore.com>

* sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228868 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * MAINTAINERS: Update list of Ada maintainers and email addresses.
charlet [Fri, 16 Oct 2015 10:48:32 +0000 (10:48 +0000)]
* MAINTAINERS: Update list of Ada maintainers and email addresses.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228867 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Javier Miranda <miranda@adacore.com>
charlet [Fri, 16 Oct 2015 10:44:09 +0000 (10:44 +0000)]
2015-10-16  Javier Miranda  <miranda@adacore.com>

* inline.adb (Add_Inlined_Body): Ensure that
Analyze_Inlined_Bodies will be invoked after completing the
analysis of the current unit.

2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
message for bad last bit position.
* sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* exp_ch5.adb (Expand_N_Case_Statement): If expression is
compile-time known but does not obey a static predicate on
its type, replace the case statement with a raise statement,
as with other statically detected constraint violations.

2015-10-16  Bob Duff  <duff@adacore.com>

* s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
Reinstate code.
* opt.ads: Minor typo.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228866 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Ed Schonberg <schonberg@adacore.com>
charlet [Fri, 16 Oct 2015 10:28:37 +0000 (10:28 +0000)]
2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* sem_util.adb (Gather_Components): When gathering components
of a nested variant, the record type used in legality checks is
the enclosing record type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228865 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Richard Biener <rguenther@suse.de>
rguenth [Fri, 16 Oct 2015 07:52:32 +0000 (07:52 +0000)]
2015-10-16  Richard Biener  <rguenther@suse.de>

* gimple-fold.c (gimple_fold_builtin_memory_op): Use gimple_build
and get rid of force_gimple_operand_gsi.
(gimple_fold_builtin_memory_chk): Likewise.
(gimple_fold_builtin_stxcpy_chk): Likewise.
(rewrite_to_defined_overflow): Likewise.
(gimple_convert_to_ptrofftype): New function.
* gimple-fold.h (gimple_convert_to_ptrofftype): New overload,
declare.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228863 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Richard Biener <rguenther@suse.de>
rguenth [Fri, 16 Oct 2015 07:45:09 +0000 (07:45 +0000)]
2015-10-16  Richard Biener  <rguenther@suse.de>

* tree-nested.h (build_addr): Adjust prototype.
* tree-nested.c (build_addr): Remove context argument and use
mark_addressable.
(get_static_chain): Adjust calls to build_addr.
(convert_nl_goto_reference): Likewise.
(convert_tramp_reference_op): Likewise.
(finalize_nesting_tree_1): Likewise.
* value-prof.c (gimple_ic): Likewise.
* gimple-low.c (lower_builtin_setjmp): Likewise.
* tree-parloops.c (take_address_of): Likewise.
(create_call_for_reduction_1): Likewise.
* tree-profile.c (gimple_gen_interval_profiler): Likewise.
(gimple_gen_ic_func_profiler): Likewise.

fortran/
* trans-intrinsic.c (gfc_conv_intrinsic_lib_function): Adjust
calls to build_addr.
(gfc_conv_intrinsic_mod): Likewise.
(gfc_conv_intrinsic_ctime): Likewise.
(gfc_conv_intrinsic_fdate): Likewise.
(gfc_conv_intrinsic_ttynam): Likewise.
(gfc_conv_intrinsic_minmax_char): Likewise.
(gfc_conv_intrinsic_index_scan_verify): Likewise.
(gfc_conv_intrinsic_trim): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228862 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago/cp
paolo [Fri, 16 Oct 2015 07:06:11 +0000 (07:06 +0000)]
/cp
2015-10-16  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/67926
* constexpr.c (potential_constant_expression_1): Handle
UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR, BINARY_LEFT_FOLD_EXPR,
BINARY_RIGHT_FOLD_EXPR.

/testsuite
2015-10-16  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/67926
* g++.dg/cpp1z/fold-ice1.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228861 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * ipa-icf-gimple.c (func_checker::compare_operand): Compare only
hubicka [Fri, 16 Oct 2015 03:10:27 +0000 (03:10 +0000)]
* ipa-icf-gimple.c (func_checker::compare_operand): Compare only
empty constructors.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228860 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Fri, 16 Oct 2015 00:16:12 +0000 (00:16 +0000)]
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228858 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-09-30 Michael Collison <michael.collison@linaro.org>
collison [Thu, 15 Oct 2015 22:21:22 +0000 (22:21 +0000)]
2015-09-30  Michael Collison  <michael.collison@linaro.org>
    Andrew Pinski <andrew.pinski@caviumnetworks.com>

* match.pd ((x < y) && (x < z) -> x < min (y,z),
(x > y) and (x > z) -> x > max (y,z))
* testsuite/gcc.dg/tree-ssa/minmax-loopend.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228854 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agomicroblaze musl support
nsz [Thu, 15 Oct 2015 19:12:15 +0000 (19:12 +0000)]
microblaze musl support

* config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define.
(DYNAMIC_LINKER): Renamed to ...
(GLIBC_DYNAMIC_LINKER): This.
(SUBTARGET_EXTRA_SPECS): Use GNU_USER_DYNAMIC_LINKER.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228850 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFixup ChangeLog entry
bergner [Thu, 15 Oct 2015 16:35:40 +0000 (16:35 +0000)]
Fixup ChangeLog entry

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228845 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agomark libstdc++ tests unsupported if they fail with "relocation truncated"
nsz [Thu, 15 Oct 2015 15:15:37 +0000 (15:15 +0000)]
mark libstdc++ tests unsupported if they fail with "relocation truncated"

* testsuite/lib/libstdc++.exp (libstdc++-dg-test): Check for
unsupported compiler output.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228844 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * tree-ssa-reassoc.c (attempt_builtin_copysign): Call
mpolacek [Thu, 15 Oct 2015 13:22:47 +0000 (13:22 +0000)]
* tree-ssa-reassoc.c (attempt_builtin_copysign): Call
gimple_call_builtin instead of is_gimple_call.

* gcc.dg/tree-ssa/reassoc-42.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228843 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-15 Richard Biener <rguenther@suse.de>
rguenth [Thu, 15 Oct 2015 12:14:23 +0000 (12:14 +0000)]
2015-10-15  Richard Biener  <rguenther@suse.de>

* tree-vect-stmts.c (vect_init_vector): Remove unused vars.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228842 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-15 Richard Biener <rguenther@suse.de>
rguenth [Thu, 15 Oct 2015 11:39:09 +0000 (11:39 +0000)]
2015-10-15  Richard Biener  <rguenther@suse.de>

* tree-vectorizer.h (vect_get_new_ssa_name): Declare.
* tree-vect-data-refs.c (vect_get_new_ssa_name): New helper.
* tree-vect-loop.c (get_initial_def_for_induction): Drop
use of force_gimple_operand in favor of gimple_build.
Use vect_get_new_ssa_name.
* tree-vect-stmts.c (vect_init_vector): Use vect_get_new_ssa_name.
(vectorizable_mask_load_store): Likewise.
(vectorizable_call): Likewise.
(vectorizable_store): Likewise.
(vectorizable_load): Likewise.
(vect_get_vec_def_for_stmt_copy): Remove redundant stmt.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228841 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoPR67945: Fix oscillation between pow representations
rsandifo [Thu, 15 Oct 2015 09:50:07 +0000 (09:50 +0000)]
PR67945: Fix oscillation between pow representations

This patch fixes some fallout from my patch to move the sqrt and cbrt
folding rules to match.pd.  The rules included canonicalisations like:

       sqrt(sqrt(x))->pow(x,1/4)

which in the original code was only ever done at the generic level.
My patch meant that we'd do it whenever we tried to fold a gimple
statement, and eventually it would win over the sincos optimisation
that replaces pow(x,1/4) with sqrt(sqrt(x)).

Following a suggestion from Richard B, the patch adds a new
PROP_gimple_* flag to say whether fp routines have been optimised
for the target.  If so, match.pd should only transform calls to math
functions if the result is actually an optimisation, not just an
IL simplification or canonicalisation.  The question then of course
is: which rules are which?  I've added block comments that describe
the criteria I was using.

A slight wart is that we need to use the cfun global to access
the PROP_gimple_* flag; there's no local function pointer available.

Bootstrapped & regression-tested on x86_64-linux-gnu.  Also tested
on powerc64-linux-gnu.

gcc/
PR tree-optimization/67945
* tree-pass.h (PROP_gimple_opt_math): New property flag.
* generic-match-head.c (canonicalize_math_p): New function.
* gimple-match-head.c: Include tree-pass.h.
(canonicalize_math_p): New function.
* match.pd: Group math built-in rules into simplifications
and canonicalizations.  Guard the latter with canonicalize_math_p.
* tree-ssa-math-opts.c (pass_data_cse_sincos): Provide the
PROP_gimple_opt_math property.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228840 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR tree-optimization/67953
mpolacek [Thu, 15 Oct 2015 09:39:35 +0000 (09:39 +0000)]
PR tree-optimization/67953
* match.pd (X - (X / Y) * Y): Don't change signedness of @0.

* gcc.dg/fold-minus-6.c (fn4): Change the type of A to
unsigned.
* gcc.dg/torture/pr67953.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228839 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agolibmpx/
ienkovich [Thu, 15 Oct 2015 09:26:39 +0000 (09:26 +0000)]
libmpx/

PR other/66887
* mpxrt/mpxrt.c (read_mpx_status_sig): Remove useless code.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228838 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[AArch64] --with-arch in config.gcc support "."
jiwang [Thu, 15 Oct 2015 09:19:42 +0000 (09:19 +0000)]
[AArch64] --with-arch in config.gcc support "."

* config.gcc: Recognize "." in architecture base name for AArch64.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228837 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Thu, 15 Oct 2015 00:16:12 +0000 (00:16 +0000)]
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228834 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * config/mips/mips.h (MIPS_STACK_ALIGN): Implement using
uros [Wed, 14 Oct 2015 21:52:37 +0000 (21:52 +0000)]
* config/mips/mips.h (MIPS_STACK_ALIGN): Implement using
ROUND_UP macro.
* config/mips/mips.c (mips_setup_incoming_varargs): Use
ROUND_DOWN to calculate off.
(mips_gimplify_va_arg_expr): Use ROUND_UP to calculate rsize.
(mips_emit_probe_stack_range): Use ROUND_DOWN to calculate
rounded_size.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228829 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * gimplify.c (gimplify_addr_expr) <MEM_REF>: New case.
ebotcazou [Wed, 14 Oct 2015 21:32:04 +0000 (21:32 +0000)]
* gimplify.c (gimplify_addr_expr) <MEM_REF>: New case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228828 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * config/rs6000/htm.md (UNSPEC_HTM_FENCE): New.
bergner [Wed, 14 Oct 2015 21:28:06 +0000 (21:28 +0000)]
* config/rs6000/htm.md (UNSPEC_HTM_FENCE): New.
(tabort, tabort<wd>c, tabort<wd>ci, tbegin, tcheck, tend,
trechkpt, treclaim, tsr, ttest): Rename define_insns from this...
(*tabort, *tabort<wd>c, *tabort<wd>ci, *tbegin, *tcheck, *tend,
*trechkpt, *treclaim, *tsr, *ttest): ...to this.  Add memory barrier.
(tabort, tabort<wd>c, tabort<wd>ci, tbegin, tcheck, tend,
trechkpt, treclaim, tsr, ttest): New define_expands.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define
__TM_FENCE__ for htm.
* doc/extend.texi: Update documentation for htm builtins.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228827 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR target/67967
uros [Wed, 14 Oct 2015 21:18:19 +0000 (21:18 +0000)]
PR target/67967
* config/i386/i386.c (ix86_emit_save_reg_using_mov): Do not add
REG_CFA_EXPRESSION to aligned SSE stores.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228826 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agolibgomp/
iverbin [Wed, 14 Oct 2015 18:37:10 +0000 (18:37 +0000)]
libgomp/
* target.c (gomp_map_vars): Initialize tgt->tgt_start and tgt->tgt_end
to 0 when mapnum is 0.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228825 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH] Fix accounting for num_threaded_edges
law [Wed, 14 Oct 2015 17:53:46 +0000 (17:53 +0000)]
[PATCH] Fix accounting for num_threaded_edges

* tree-ssa-threadupdate.c (thread_through_all_blocks): Bump
num_threaded_edges for successful FSM threads too.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228822 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH] Split ssa-dom-thread-2.c into separate files/tests
law [Wed, 14 Oct 2015 17:12:40 +0000 (17:12 +0000)]
[PATCH] Split ssa-dom-thread-2.c into separate files/tests

* gcc.dg/tree-ssa/ssa-dom-thread-2.c: Deleted.  The six functions
contained within have their own file/test now.
* gcc.dg/tree-ssa/ssa-dom-thread-2a.c: New test extracted from
ssa-dom-thread-2.c.  Tighten expected output slightly and comment
expectations a bit more.
* gcc.dg/tree-ssa/ssa-dom-thread-2b.c: Likewise.
* gcc.dg/tree-ssa/ssa-dom-thread-2c.c: Likewise.
* gcc.dg/tree-ssa/ssa-dom-thread-2d.c: Likewise.
* gcc.dg/tree-ssa/ssa-dom-thread-2e.c: Likewise.
* gcc.dg/tree-ssa/ssa-dom-thread-2f.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228821 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH] [PR testsuite/67959]Minor cleanup for ssa-thread-13.c
law [Wed, 14 Oct 2015 17:04:04 +0000 (17:04 +0000)]
[PATCH] [PR testsuite/67959]Minor cleanup for ssa-thread-13.c

        PR testsuite/67959
        * gcc.dg/tree-ssa/ssa-thread-13.c: Avoid bitfield assumptions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228819 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * gcc.dg/tree-ssa/reassoc-39.c: Use -g. Adjust dg-final.
mpolacek [Wed, 14 Oct 2015 14:08:51 +0000 (14:08 +0000)]
* gcc.dg/tree-ssa/reassoc-39.c: Use -g.  Adjust dg-final.
(f6): New.
(f7): New.
(f8): New.
(f9): New.
(f10): New.
(f11): New.
(f12): New.
(f13): New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228812 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-14 Richard Biener <rguenther@suse.de>
rguenth [Wed, 14 Oct 2015 13:57:09 +0000 (13:57 +0000)]
2015-10-14  Richard Biener  <rguenther@suse.de>

* tree-vectorizer.h (vect_is_simple_use): Remove unused parameters.
(vect_is_simple_use_1): Likewise.  Make overload of vect_is_simple_use.
(vect_get_vec_def_for_operand): Remove unused parameter.
* tree-vect-loop.c (get_initial_def_for_induction): Adjust.
(vect_create_epilog_for_reduction): Likewise.
(vectorizable_reduction): Likewise.
(vectorizable_live_operation): Likewise.
* tree-vect-patterns.c (type_conversion_p): Likewise.
(vect_recog_vector_vector_shift_pattern): Likewise.
(check_bool_pattern): Likewise.
* tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
(vect_analyze_slp_cost_1): Likewise.
* tree-vect-stmts.c (process_use): Likewise.
(vect_get_vec_def_for_operand): Do not handle reductions.
(vect_get_vec_defs): Adjust.
(vectorizable_mask_load_store): Likewise.
(vectorizable_call): Likewise.
(vectorizable_simd_clone_call): Likewise.
(vect_get_loop_based_defs): Likewise.
(vectorizable_conversion): Likewise.
(vectorizable_assignment): Likewise.
(vectorizable_shift): Likewise.
(vectorizable_operation): Likewise.
(vectorizable_store): Likewise.
(vectorizable_load): Likewise.
(vect_is_simple_cond): Likewise.
(vectorizable_condition): Likewise.
(vect_is_simple_use): Remove unused parameters.
(vect_is_simple_use_1): Adjust and rename.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228811 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-14 Richard Biener <rguenther@suse.de>
rguenth [Wed, 14 Oct 2015 12:59:15 +0000 (12:59 +0000)]
2015-10-14  Richard Biener  <rguenther@suse.de>

PR tree-optimization/67915
* match.pd: Handle comparisons of addresses of STRING_CSTs.
* gimplify.c (gimplify_cond_expr): Fold the GIMPLE conds we build.
* tree-cfgcleanup.c (cleanup_control_expr_graph): Remove GENERIC
stmt folding in favor of GIMPLE one.

* gcc.dg/torture/pr67915.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228810 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR tree-optimization/67815
mpolacek [Wed, 14 Oct 2015 12:54:03 +0000 (12:54 +0000)]
PR tree-optimization/67815
* tree-ssa-reassoc.c (attempt_builtin_copysign): New function.
(reassociate_bb): Call it.

* gcc.dg/tree-ssa/reassoc-39.c: New test.
* gcc.dg/tree-ssa/reassoc-40.c: New test.
* gcc.dg/tree-ssa/reassoc-41.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228809 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-14 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
chefmax [Wed, 14 Oct 2015 12:06:29 +0000 (12:06 +0000)]
2015-10-14  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>

* parse.c (decode_statement): Initialize M to MATCH_NO.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228807 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-14 Richard Biener <rguenther@suse.de>
rguenth [Wed, 14 Oct 2015 08:32:25 +0000 (08:32 +0000)]
2015-10-14  Richard Biener  <rguenther@suse.de>

* tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
Reset info at start.
(vect_analyze_group_access_1): Add debug print.
* tree-vect-loop.c (vect_get_single_scalar_iteration_cost): Rename ...
(vect_compute_single_scalar_iteration_cost): ... to this.
(vect_analyze_loop_2): Adjust.
* tree-vect-slp.c (struct _slp_oprnd_info): Move from ...
* tree-vectorizer.h: ... here.
(add_stmt_info_to_vec): Remove.
* tree-vect-stmts.c (record_stmt_cost): Inline add_stmt_info_to_vec.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228806 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[gomp] Fix build for 32-bit targets with int != int32_t
sh [Wed, 14 Oct 2015 08:30:52 +0000 (08:30 +0000)]
[gomp] Fix build for 32-bit targets with int != int32_t

libgomp/
2015-10-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>

* fortran.c (omp_get_place_proc_ids_, omp_get_partition_place_nums_):
Cast to int from int32_t.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228805 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix "#pragma GCC pop_options"
krebbel [Wed, 14 Oct 2015 06:53:54 +0000 (06:53 +0000)]
Fix "#pragma GCC pop_options"

gcc/ChangeLog

* targhooks.c (default_target_option_pragma_parse): Do not warn if
called on behalf of "#pragma GCC pop_options".

gcc/testsuite/ChangeLog

* gcc.dg/pragma-pop_options-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228794 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Wed, 14 Oct 2015 00:16:12 +0000 (00:16 +0000)]
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228793 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoCheck no unreachable blocks in inverted_post_order_compute
vries [Tue, 13 Oct 2015 22:10:45 +0000 (22:10 +0000)]
Check no unreachable blocks in inverted_post_order_compute

2015-10-14  Tom de Vries  <tom@codesourcery.com>

* cfganal.c (verify_no_unreachable_blocks): New function.
(inverted_post_order_compute) [ENABLE_CHECKING]: Call
verify_no_unreachable_blocks.
cfganal.h (verify_no_unreachable_blocks): Declare.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228789 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH 1/9] ENABLE_CHECKING refactoring
law [Tue, 13 Oct 2015 21:31:48 +0000 (21:31 +0000)]
[PATCH 1/9] ENABLE_CHECKING refactoring
gcc/ChangeLog:

2015-10-05  Mikhail Maltsev  <maltsevm@gmail.com>

* common.opt: Add flag_checking.
* system.h (CHECKING_P): Define.

libcpp/ChangeLog:

2015-10-05  Mikhail Maltsev  <maltsevm@gmail.com>

* system.h (CHECKING_P, gcc_checking_assert): Define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228787 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * config/cpu/i486/opt/bits/opt_random.h: Include pmmintrin.h instead
froydnj [Tue, 13 Oct 2015 20:55:44 +0000 (20:55 +0000)]
* config/cpu/i486/opt/bits/opt_random.h: Include pmmintrin.h instead
of x86intrin.h, and only do so when __SSE3__
* include/ext/random: Include emmintrin.h instead of x86intrin.h

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228786 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agogcc/
jakub [Tue, 13 Oct 2015 19:06:23 +0000 (19:06 +0000)]
gcc/
2015-10-13  Jakub Jelinek  <jakub@redhat.com>
    Aldy Hernandez  <aldyh@redhat.com>
    Ilya Verbin  <ilya.verbin@intel.com>

* builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR,
BT_FN_BOOL_UINT_ULLPTR_ULLPTR_ULLPTR,
BT_FN_BOOL_UINT_LONGPTR_LONG_LONGPTR_LONGPTR,
BT_FN_BOOL_UINT_ULLPTR_ULL_ULLPTR_ULLPTR,
BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_UINT_PTR,
BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR,
BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT,
BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_LONG_LONG_LONG,
BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_ULL_ULL_ULL,
BT_FN_VOID_LONG_VAR, BT_FN_VOID_ULL_VAR): New.
(BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR,
BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): Remove.
* cgraph.h (enum cgraph_simd_clone_arg_type): Add
SIMD_CLONE_ARG_TYPE_LINEAR_REF_CONSTANT_STEP,
SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_CONSTANT_STEP and
SIMD_CLONE_ARG_TYPE_LINEAR_VAL_CONSTANT_STEP.
(struct cgraph_simd_clone_arg): Adjust comment.
* coretypes.h (struct gomp_ordered): New forward decl.
* gimple.c (gimple_build_omp_critical): Add CLAUSES argument,
set critical clauses to it.
(gimple_build_omp_ordered): Return gomp_ordered * instead of
gimple *.  Add CLAUSES argument, set ordered clauses to it.
(gimple_copy): Unshare clauses on GIMPLE_OMP_CRITICAL and
GIMPLE_OMP_ORDERED.
* gimple.def (GIMPLE_OMP_ORDERED): Change from GSS_OMP to
GSS_OMP_SINGLE_LAYOUT, move it after GIMPLE_OMP_TEAMS.
* gimple.h (enum gf_mask): Add GF_OMP_TASK_TASKLOOP.  Add another bit
to GF_OMP_FOR_KIND_MASK mask. Add GF_OMP_FOR_KIND_TASKLOOP, renumber
GF_OMP_FOR_KIND_CILKFOR and GF_OMP_FOR_KIND_OACC_LOOP.  Adjust
GF_OMP_FOR_SIMD, GF_OMP_FOR_COMBINED and GF_OMP_FOR_COMBINED_INTO.
Add another bit to GF_OMP_TARGET_KIND_MASK mask.  Add
GF_OMP_TARGET_KIND_ENTER_DATA and GF_OMP_TARGET_KIND_EXIT_DATA,
renumber
GF_OMP_TARGET_KIND_OACC_{PARALLEL,KERNELS,DATA,UPDATE,ENTER_EXIT_DATA}.
(gomp_critical): Add clauses field.
(gomp_ordered): New struct.
(is_a_helper <gomp_ordered *>::test): New inline.
(gimple_build_omp_critical): Add CLAUSES argument.
(gimple_build_omp_ordered): Likewise.  Return gomp_ordered *
instead of gimple *.
(gimple_omp_critical_clauses, gimple_omp_critical_clauses_ptr,
gimple_omp_critical_set_clauses, gimple_omp_ordered_clauses,
gimple_omp_ordered_clauses_ptr, gimple_omp_ordered_set_clauses,
gimple_omp_task_taskloop_p, gimple_omp_task_set_taskloop_p): New
inline functions.
* gimple-pretty-print.c (dump_gimple_omp_for): Handle taskloop.
(dump_gimple_omp_target): Handle enter data and exit data.
(dump_gimple_omp_block): Don't handle GIMPLE_OMP_ORDERED here.
(dump_gimple_omp_critical): Print clauses.
(dump_gimple_omp_ordered): New function.
(dump_gimple_omp_task): Handle taskloop.
(pp_gimple_stmt_1): Use dump_gimple_omp_ordered for
GIMPLE_OMP_ORDERED.
* gimple-walk.c (walk_gimple_op): Walk clauses on
GIMPLE_OMP_CRITICAL and GIMPLE_OMP_ORDERED.
* gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_0LEN_ARRAY.
(enum omp_region_type): Add ORT_COMBINED_TARGET and ORT_NONE.
(struct gimplify_omp_ctx): Add loop_iter_var,
target_map_scalars_firstprivate, target_map_pointers_as_0len_arrays
and target_firstprivatize_array_bases fields.
(delete_omp_context): Release loop_iter_var.
(gimplify_bind_expr): Handle ORT_NONE.
(maybe_fold_stmt): Adjust check for ORT_TARGET for the addition of
ORT_COMBINED_TARGET.
(is_gimple_stmt): Return true for OMP_TASKLOOP, OMP_TEAMS and
OMP_TARGET{,_DATA,_UPDATE,_ENTER_DATA,_EXIT_DATA}.
(omp_firstprivatize_variable): Handle ORT_NONE.  Adjust check for
ORT_TARGET for the addition of ORT_COMBINED_TARGET.  Handle
ctx->target_map_scalars_firstprivate.
(omp_add_variable): Handle ORT_NONE.  Allow map clause together with
data sharing clauses.  For data sharing clause with VLA decl
on omp target/target data don't add firstprivate for the pointer.
Call omp_notice_variable on TYPE_SIZE_UNIT only if it is a DECL_P.
(omp_notice_threadprivate_variable): Adjust check for ORT_TARGET for
the addition of ORT_COMBINED_TARGET.
(omp_notice_variable): Handle ORT_NONE.  Adjust check for ORT_TARGET
for the addition of ORT_COMBINED_TARGET.  Handle implicit mapping of
pointers as zero length array sections and
ctx->target_map_scalars_firstprivate mapping of scalars as firstprivate
data sharing.
(omp_check_private): Handle omp_member_access_dummy_var vars.
(find_decl_expr): New function.
(gimplify_scan_omp_clauses): Add CODE argument.  For OMP_CLAUSE_IF
complain if OMP_CLAUSE_IF_MODIFIER is present and does not match code.
Handle OMP_CLAUSE_GANG separately.  Handle
OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,NOGROUP,THREADS,SIMD,SIMDLEN}
clauses.  Diagnose linear clause on combined
distribute {, parallel for} simd construct, unless it is the loop
iterator.  Handle struct element GOMP_MAP_FIRSTPRIVATE_POINTER.
Handle map clauses with COMPONENT_REF.  Initialize
ctx->target_map_scalars_firstprivate,
ctx->target_firstprivatize_array_bases and
ctx->target_map_pointers_as_0len_arrays.  Add firstprivate for
linear clause even to target region if combined.  Remove
map clauses with GOMP_MAP_FIRSTPRIVATE_POINTER kind from
OMP_TARGET_{,ENTER_,EXIT_}DATA.  For GOMP_MAP_FIRSTPRIVATE_POINTER
map kind with non-INTEGER_CST OMP_CLAUSE_SIZE firstprivatize the bias.
Handle OMP_CLAUSE_DEPEND_{SINK,SOURCE}.  Handle
OMP_CLAUSE_{{USE,IS}_DEVICE_PTR,DEFAULTMAP,HINT}.
For linear clause on worksharing loop combined with parallel add
shared clause on the parallel.  Handle OMP_CLAUSE_REDUCTION
with MEM_REF OMP_CLAUSE_DECL.  Set DECL_NAME on
omp_member_access_dummy_var vars.  Add lastprivate clause to outer
taskloop if needed.
(gimplify_adjust_omp_clauses_1): Handle GOVD_MAP_0LEN_ARRAY.
If gimplify_omp_ctxp->target_firstprivatize_array_bases, use
GOMP_MAP_FIRSTPRIVATE_POINTER map kind instead of
GOMP_MAP_POINTER.
(gimplify_adjust_omp_clauses): Add CODE argument.  Handle removal
of GOMP_MAP_FIRSTPRIVATE_POINTER struct elements for struct not seen
in target body.  Handle removal of struct mapping if struct is not
seen in target body.  Remove GOMP_MAP_STRUCT map clause on
OMP_TARGET_EXIT_DATA.  Adjust check for ORT_TARGET for the
addition of ORT_COMBINED_TARGET.  Use GOMP_MAP_FIRSTPRIVATE_POINTER
instead of GOMP_MAP_POINTER if ctx->target_firstprivatize_array_bases
for VLAs.  Set OMP_CLAUSE_MAP_PRIVATE if both data sharing and map
clause appear together.  Handle
OMP_CLAUSE_{{USE,IS}_DEVICE_PTR,DEFAULTMAP,HINT}.  Don't remove map
clause if it has map-type-modifier always.  Handle
OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,NOGROUP,THREADS,SIMD,SIMDLEN}
clauses.
(gimplify_oacc_cache, gimplify_omp_parallel, gimplify_omp_task):
Adjust gimplify_scan_omp_clauses and gimplify_adjust_omp_clauses
callers.
(gimplify_omp_for): Likewise.  Handle OMP_TASKLOOP.  Initialize
loop_iter_var.  Use OMP_FOR_ORIG_DECLS.  Fix handling of lastprivate
iterators in doacross loops.
(gimplify_omp_workshare): Adjust gimplify_scan_omp_clauses and
gimplify_adjust_omp_clauses callers.  Use ORT_COMBINED_TARGET
for OMP_TARGET_COMBINED.  Adjust check for ORT_TARGET
for the addition of ORT_COMBINED_TARGET.
(gimplify_omp_target_update): Adjust gimplify_scan_omp_clauses and
gimplify_adjust_omp_clauses callers.  Handle OMP_TARGET_ENTER_DATA
and OMP_TARGET_EXIT_DATA.
(gimplify_omp_ordered): New function.
(gimplify_expr): Handle OMP_TASKLOOP, OMP_TARGET_ENTER_DATA and
OMP_TARGET_EXIT_DATA.  Use gimplify_omp_ordered for OMP_ORDERED.
Gimplify clauses on OMP_CRITICAL.
* internal-fn.c (expand_GOMP_SIMD_ORDERED_START,
expand_GOMP_SIMD_ORDERED_END): New functions.
* internal-fn.def (GOMP_SIMD_ORDERED_START,
GOMP_SIMD_ORDERED_END): New internal functions.
* omp-builtins.def (BUILT_IN_GOMP_LOOP_DOACROSS_STATIC_START,
BUILT_IN_GOMP_LOOP_DOACROSS_DYNAMIC_START,
BUILT_IN_GOMP_LOOP_DOACROSS_GUIDED_START,
BUILT_IN_GOMP_LOOP_DOACROSS_RUNTIME_START,
BUILT_IN_GOMP_LOOP_ULL_DOACROSS_STATIC_START,
BUILT_IN_GOMP_LOOP_ULL_DOACROSS_DYNAMIC_START,
BUILT_IN_GOMP_LOOP_ULL_DOACROSS_GUIDED_START,
BUILT_IN_GOMP_LOOP_ULL_DOACROSS_RUNTIME_START,
BUILT_IN_GOMP_DOACROSS_POST, BUILT_IN_GOMP_DOACROSS_WAIT,
BUILT_IN_GOMP_DOACROSS_ULL_POST, BUILT_IN_GOMP_DOACROSS_ULL_WAIT,
BUILT_IN_GOMP_TARGET_ENTER_EXIT_DATA, BUILT_IN_GOMP_TASKLOOP,
BUILT_IN_GOMP_TASKLOOP_ULL): New built-ins.
(BUILT_IN_GOMP_TASK): Add INT argument to the end.
(BUILT_IN_GOMP_TARGET): Rename from GOMP_target to GOMP_target_41,
adjust type.
(BUILT_IN_GOMP_TARGET_DATA): Rename from GOMP_target_data to
GOMP_target_data_41, adjust type.
(BUILT_IN_GOMP_TARGET_UPDATE): Rename from GOMP_target_update to
GOMP_target_update_41, adjust type.
* omp-low.c (struct omp_region): Adjust comments, add ord_stmt
field.
(struct omp_for_data): Add ordered and simd_schedule fields.
(omp_member_access_dummy_var, unshare_and_remap_1,
unshare_and_remap, is_taskloop_ctx): New functions.
(is_taskreg_ctx): Use is_parallel_ctx and is_task_ctx.
(extract_omp_for_data): Handle taskloops and doacross loops
and simd schedule modifier.
(omp_adjust_chunk_size): New function.
(get_ws_args_for): Use it.
(lookup_sfield): Change first argument to splay_tree_key,
add overload with first argument tree.
(maybe_lookup_field): Likewise.
(use_pointer_for_field): Handle omp_member_access_dummy_var.
(omp_copy_decl_2): If var is TREE_ADDRESSABLE listed in
task_shared_vars, clear TREE_ADDRESSABLE on the copy.
(build_outer_var_ref): Add LASTPRIVATE argument, handle
taskloops and omp_member_access_dummy_var vars.
(build_sender_ref): Change first argument to splay_tree_key,
add overload with first argument tree.
(install_var_field): For mask & 8 use &DECL_UID as key instead
of the tree itself.
(fixup_child_record_type): Const qualify *.omp_data_i.
(scan_sharing_clauses): Handle OMP_CLAUSE_SHARED_FIRSTPRIVATE,
C/C++ array reductions, OMP_CLAUSE_{IS,USE}_DEVICE_PTR clauses,
OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,SIMDLEN,THREADS,SIMD} and
OMP_CLAUSE_{NOGROUP,DEFAULTMAP} clauses, OMP_CLAUSE__LOOPTEMP_ clause
on taskloop, GOMP_MAP_FIRSTPRIVATE_POINTER, OMP_CLAUSE_MAP_PRIVATE.
(create_omp_child_function): Set TREE_READONLY on .omp_data_i.
(find_combined_for): Allow searching for different GIMPLE_OMP_FOR
kinds.
(add_taskreg_looptemp_clauses): New function.
(scan_omp_parallel): Use it.
(scan_omp_task): Likewise.
(finish_taskreg_scan): Handle OMP_CLAUSE_SHARED_FIRSTPRIVATE.
For taskloop, move fields for the first two _LOOPTEMP_ clauses first.
(check_omp_nesting_restrictions): Handle GF_OMP_TARGET_KIND_ENTER_DATA
and GF_OMP_TARGET_KIND_EXIT_DATA.  Formatting fixes.  Allow the
sandwiched taskloop constructs.  Type check
OMP_CLAUSE_DEPEND_{KIND,SOURCE}.  Allow ordered simd inside of simd
region.  Diagnose depend(source) or depend(sink:...) on
target constructs or task/taskloop.
(handle_simd_reference): Use get_name.
(lower_rec_input_clauses): Likewise.  Ignore all
OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE clauses on taskloop construct.
Allow _LOOPTEMP_ clause on GOMP_TASK.  Unshare new_var
before passing it to omp_clause_{default,copy}_ctor.  Handle
OMP_CLAUSE_REDUCTION with MEM_REF OMP_CLAUSE_DECL.  Set
lastprivate_firstprivate flag for linear that needs copyin and
copyout.  Use BUILT_IN_ALLOCA_WITH_ALIGN instead of BUILT_IN_ALLOCA.
(lower_lastprivate_clauses): For OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE
on taskloop lookup decl in outer context.  Pass true to
build_outer_var_ref lastprivate argument.  Handle
OMP_CLAUSE_LASTPRIVATE_TASKLOOP_IV lastprivate if the decl is global
outside of outer taskloop for.
(lower_reduction_clauses): Handle OMP_CLAUSE_REDUCTION with MEM_REF
OMP_CLAUSE_DECL.
(lower_send_clauses): Ignore first two _LOOPTEMP_ clauses in taskloop
GOMP_TASK.  Handle OMP_CLAUSE_SHARED_FIRSTPRIVATE.  Handle
omp_member_access_dummy_var vars.  Handle OMP_CLAUSE_REDUCTION
with MEM_REF OMP_CLAUSE_DECL.  Use new lookup_sfield overload.
(lower_send_shared_vars): Ignore fields with NULL or FIELD_DECL
abstract origin.  Handle omp_member_access_dummy_var vars.
(expand_parallel_call): Use expand_omp_build_assign.
(expand_task_call): Handle taskloop construct expansion.  Add
REGION argument.  Use GOMP_TASK_* defines instead of hardcoded
integers.  Add priority argument to GOMP_task* calls.  Or in
GOMP_TASK_FLAG_PRIORITY into flags if priority is present for
GOMP_task call.
(expand_omp_build_assign): Add prototype.  Add AFTER
argument, if true emit statements after *GSI_P and continue linking.
(expand_omp_taskreg): Adjust expand_task_call caller.
(expand_omp_for_init_counts): Rename zero_iter_bb argument to
zero_iter1_bb and first_zero_iter to first_zero_iter1, add
zero_iter2_bb and first_zero_iter2 arguments, handle computation
of counts even for ordered loops.
(expand_omp_for_init_vars): Handle GOMP_TASK inner_stmt.
(expand_omp_ordered_source, expand_omp_ordered_sink,
expand_omp_ordered_source_sink, expand_omp_for_ordered_loops): New
functions.
(expand_omp_for_generic): Use omp_adjust_chunk_size.  Handle linear
clauses on worksharing loop.  Handle DOACROSS loop expansion.
(expand_omp_for_static_nochunk): Handle linear clauses on
worksharing loop.  Adjust expand_omp_for_init_counts
callers.
(expand_omp_for_static_chunk): Likewise.  Use omp_adjust_chunk_size.
(expand_omp_simd): Handle addressable fd->loop.v.  Adjust
expand_omp_for_init_counts callers.
(expand_omp_taskloop_for_outer, expand_omp_taskloop_for_inner): New
functions.
(expand_omp_for): Call expand_omp_taskloop_for_* for taskloop.
Handle doacross loops.
(expand_omp_target): Handle GF_OMP_TARGET_KIND_ENTER_DATA and
GF_OMP_TARGET_KIND_EXIT_DATA.  Pass flags and depend arguments to
GOMP_target_{41,update_41,enter_exit_data} libcalls.
(expand_omp): Don't expand ordered depend constructs here, record
ord_stmt instead for later expand_omp_for_generic.
(build_omp_regions_1): Handle GF_OMP_TARGET_KIND_ENTER_DATA and
GF_OMP_TARGET_KIND_EXIT_DATA.  Treat GIMPLE_OMP_ORDERED with depend
clause as stand-alone directive.
(lower_omp_ordered_clauses): New function.
(lower_omp_ordered): Handle OMP_CLAUSE_SIMD, for OMP_CLAUSE_DEPEND
don't lower anything.
(lower_omp_for_lastprivate): Use last _looptemp_ clause
on taskloop for comparison.
(lower_omp_for): Handle taskloop constructs.  Adjust OMP_CLAUSE_DECL
and OMP_CLAUSE_LINEAR_STEP so that expand_omp_for_* can use it during
expansion for linear adjustments.
(create_task_copyfn): Handle OMP_CLAUSE_SHARED_FIRSTPRIVATE.
(lower_depend_clauses): Assert not seeing sink/source depend kinds.
Set TREE_ADDRESSABLE on array.  Change first argument from gimple *
to tree * pointing to the stmt's clauses.
(lower_omp_taskreg): Adjust lower_depend_clauses caller.
(lower_omp_target): Handle GF_OMP_TARGET_KIND_ENTER_DATA
and GF_OMP_TARGET_KIND_EXIT_DATA, depend clauses,
GOMP_MAP_{RELEASE,ALWAYS_{TO,FROM,TOFROM},FIRSTPRIVATE_POINTER,STRUCT}
map kinds, OMP_CLAUSE_{FIRSTPRIVATE,PRIVATE,{IS,USE}_DEVICE_PTR
clauses.  Always use short kind and 8-bit align shift.
(lower_omp_regimplify_p): Use IS_TYPE_OR_DECL_P macro.
(struct lower_omp_regimplify_operands_data): New type.
(lower_omp_regimplify_operands_p, lower_omp_regimplify_operands):
New functions.
(lower_omp_1): Use lower_omp_regimplify_operands instead of
gimple_regimplify_operands.
(make_gimple_omp_edges): Handle GF_OMP_TARGET_KIND_ENTER_DATA and
GF_OMP_TARGET_KIND_EXIT_DATA.  Treat GIMPLE_OMP_ORDERED with depend
clause as stand-alone directive.
(simd_clone_clauses_extract): Honor OMP_CLAUSE_LINEAR_KIND.
(simd_clone_mangle): Mangle the various linear kinds
per the new ABI.
(simd_clone_adjust_argument_types): Handle
SIMD_CLONE_ARG_TYPE_LINEAR_*_CONSTANT_STEP.
(simd_clone_init_simd_arrays): Don't do anything for uval.
(simd_clone_adjust): Handle
SIMD_CLONE_ARG_TYPE_LINEAR_REF_CONSTANT_STEP like
SIMD_CLONE_ARG_TYPE_LINEAR_CONSTANT_STEP.
Handle SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_CONSTANT_STEP.
* omp-low.h (omp_member_access_dummy_var): New prototype.
* passes.def (pass_simduid_cleanup): Schedule another copy of the
pass after all optimizations.
* tree.c (omp_clause_code_name): Add entries for
OMP_CLAUSE_{TO_DECLARE,LINK,{USE,IS}_DEVICE_PTR,DEFAULTMAP,HINT}
and OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,NOGROUP,THREADS,SIMD}.
(omp_clause_num_ops): Likewise.  Bump number of OMP_CLAUSE_REDUCTION
arguments to 5 and for OMP_CLAUSE_ORDERED to 1.
(walk_tree_1): Adjust for OMP_CLAUSE_ORDERED having 1 argument and
OMP_CLAUSE_REDUCTION 5 arguments.  Handle
OMP_CLAUSE_{TO_DECLARE,LINK,{USE,IS}_DEVICE_PTR,DEFAULTMAP,HINT}
and OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,NOGROUP,THREADS,SIMD}
clauses.
* tree-core.h (enum omp_clause_linear_kind): New.
(struct tree_omp_clause): Change type of map_kind
from unsigned char to unsigned int.  Add subcode.if_modifier
and subcode.linear_kind fields.
(enum omp_clause_code): Add
OMP_CLAUSE_{TO_DECLARE,LINK,{USE,IS}_DEVICE_PTR,DEFAULTMAP,HINT}
and OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,NOGROUP,THREADS,SIMD}.
(OMP_CLAUSE_REDUCTION): Document
OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER.
(enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_{SOURCE,SINK}.
* tree.def (OMP_FOR): Add OMP_FOR_ORIG_DECLS operand.
(OMP_CRITICAL): Move before OMP_SINGLE.  Add OMP_CRITICAL_CLAUSES
operand.
(OMP_ORDERED): Move before OMP_SINGLE.  Add OMP_ORDERED_CLAUSES
operand.
(OMP_TASKLOOP, OMP_TARGET_ENTER_DATA, OMP_TARGET_EXIT_DATA): New tree
codes.
* tree.h (OMP_BODY): Replace OMP_CRITICAL with OMP_TASKGROUP.
(OMP_CLAUSE_SET_MAP_KIND): Cast to unsigned int rather than unsigned
char.
(OMP_CRITICAL_NAME): Adjust to be 3rd operand instead of 2nd.
(OMP_CLAUSE_NUM_TASKS_EXPR): Formatting fix.
(OMP_STANDALONE_CLAUSES): Adjust to cover OMP_TARGET_{ENTER,EXIT}_DATA.
(OMP_CLAUSE_DEPEND_SINK_NEGATIVE, OMP_TARGET_COMBINED,
OMP_CLAUSE_MAP_PRIVATE, OMP_FOR_ORIG_DECLS, OMP_CLAUSE_IF_MODIFIER,
OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION, OMP_CRITICAL_CLAUSES,
OMP_CLAUSE_PRIVATE_TASKLOOP_IV, OMP_CLAUSE_LASTPRIVATE_TASKLOOP_IV,
OMP_CLAUSE_HINT_EXPR, OMP_CLAUSE_SCHEDULE_SIMD,
OMP_CLAUSE_LINEAR_KIND, OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
OMP_CLAUSE_SHARED_FIRSTPRIVATE, OMP_ORDERED_CLAUSES,
OMP_TARGET_ENTER_DATA_CLAUSES, OMP_TARGET_EXIT_DATA_CLAUSES,
OMP_CLAUSE_NUM_TASKS_EXPR, OMP_CLAUSE_GRAINSIZE_EXPR,
OMP_CLAUSE_PRIORITY_EXPR, OMP_CLAUSE_ORDERED_EXPR): Define.
* tree-inline.c (remap_gimple_stmt): Handle clauses on
GIMPLE_OMP_ORDERED and GIMPLE_OMP_CRITICAL.  For
IFN_GOMP_SIMD_ORDERED_{START,END} set has_simduid_loops.
* tree-nested.c (convert_nonlocal_omp_clauses): Handle
OMP_CLAUSE_{TO_DECLARE,LINK,{USE,IS}_DEVICE_PTR,SIMDLEN,PRIORITY,SIMD}
and OMP_CLAUSE_{GRAINSIZE,NUM_TASKS,HINT,NOGROUP,THREADS,DEFAULTMAP}
clauses.  Handle OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER.
(convert_local_omp_clauses): Likewise.
* tree-pretty-print.c (dump_omp_clause): Handle
OMP_CLAUSE_{TO_DECLARE,LINK,{USE,IS}_DEVICE_PTR,SIMDLEN,PRIORITY,SIMD}
and OMP_CLAUSE_{GRAINSIZE,NUM_TASKS,HINT,NOGROUP,THREADS,DEFAULTMAP}
clauses.  Handle OMP_CLAUSE_IF_MODIFIER, OMP_CLAUSE_ORDERED_EXPR,
OMP_CLAUSE_SCHEDULE_SIMD, OMP_CLAUSE_LINEAR_KIND,
OMP_CLAUSE_DEPEND_{SOURCE,SINK}.  Use "delete" for
GOMP_MAP_FORCE_DEALLOC.  Handle
GOMP_MAP_{ALWAYS_{TO,FROM,TOFROM},RELEASE,FIRSTPRIVATE_POINTER,STRUCT}.
(dump_generic_node): Handle OMP_TASKLOOP, OMP_TARGET_{ENTER,EXIT}_DATA
and clauses on OMP_ORDERED and OMP_CRITICAL.
* tree-vectorizer.c (adjust_simduid_builtins): Adjust comment.
Remove IFN_GOMP_SIMD_ORDERED_{START,END}.
(vectorize_loops): Adjust comments.
(pass_simduid_cleanup::execute): Likewise.
* tree-vect-stmts.c (vectorizable_simd_clone_call): Handle
SIMD_CLONE_ARG_TYPE_LINEAR_{REF,VAL,UVAL}_CONSTANT_STEP.
* wide-int.h (wi::gcd): New.
gcc/c-family/
2015-10-13  Jakub Jelinek  <jakub@redhat.com>
    Aldy Hernandez  <aldyh@redhat.com>

* c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
(c_define_builtins): Likewise.
* c-common.h (enum c_omp_clause_split): Add
C_OMP_CLAUSE_SPLIT_TASKLOOP.
(c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
(c_finish_omp_for): Add ORIG_DECLV argument.
* c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
201511 instead of 201307.
* c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
OMP_CRITICAL_CLAUSES to it.
(c_finish_omp_ordered): Add CLAUSES argument, set
OMP_ORDERED_CLAUSES to it.
(c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
to it if OMP_FOR.  Clear DECL_INITIAL on the IVs.
(c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
constructs and new OpenMP 4.5 clauses.  Clear
OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD.  Add
verification code.
* c-pragma.c (omp_pragmas_simd): Add taskloop.
* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
(enum pragma_omp_clause): Add
PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
gcc/c/
2015-10-13  Jakub Jelinek  <jakub@redhat.com>
    Aldy Hernandez  <aldyh@redhat.com>

* c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
(c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
(c_parser_omp_variable_list): Handle structure elements for
map, to and from clauses.  Handle array sections in reduction
clause.  Formatting fixes.
(c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
if clause modifiers.
(c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
c_parser_omp_clause_priority, c_parser_omp_clause_hint,
c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
c_parser_omp_clause_is_device_ptr): New functions.
(c_parser_omp_clause_ordered): Parse optional parameter.
(c_parser_omp_clause_reduction): Handle array reductions.
(c_parser_omp_clause_schedule): Parse optional simd modifier.
(c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
functions.
(c_parser_omp_clause_linear): Parse linear clause modifiers.
(c_parser_omp_clause_depend_sink): New function.
(c_parser_omp_clause_depend): Parse source/sink depend kinds.
(c_parser_omp_clause_map): Parse release/delete map kinds and
optional always modifier.
(c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
and c_finish_omp_clauses callers.
(c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
(c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
(OMP_CRITICAL_CLAUSE_MASK): Define.
(c_parser_omp_critical): Parse critical clauses.
(c_parser_omp_for_loop): Handle doacross loops, adjust
c_finish_omp_for and c_finish_omp_clauses callers.
(OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
(c_parser_omp_simd): Allow ordered clause if it has no parameter.
(OMP_FOR_CLAUSE_MASK): Add linear clause.
(c_parser_omp_for): Disallow ordered clause when combined with
distribute.  Disallow linear clause when combined with distribute
and not combined with simd.
(OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
(c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
parse clauses and if depend clause is found, don't parse a body.
(c_parser_omp_parallel): Disallow copyin clause on target parallel.
Allow target parallel without for after it.
(OMP_TASK_CLAUSE_MASK): Add priority clause.
(OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
(c_parser_omp_target_data): Diagnose no map clauses or clauses with
invalid kinds.
(OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
(OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
(c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
functions.
(OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
defaultmap and is_device_ptr clauses.
(c_parser_omp_target): Parse target parallel and target simd.  Set
OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
and target exit data.  Diagnose invalid map kinds.
(OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
(c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
construct.
(c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
&omp_priv.
(OMP_TASKLOOP_CLAUSE_MASK): Define.
(c_parser_omp_taskloop): New function.
(c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
handle PRAGMA_OMP_TASKLOOP.
(c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
* c-tree.h (c_finish_omp_clauses): Add two new arguments.
* c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
Add IS_OMP argument, handle structure element bases, diagnose
bitfields, pass IS_OMP recursively, diagnose known zero length
array sections in depend clauses, handle array sections in reduction
clause, diagnose negative length even for pointers.
(handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
types, pass IS_OMP down to handle_omp_array_sections_1, handle
array sections in reduction clause, set
OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
(c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
gcc/cp/
2015-10-13  Jakub Jelinek  <jakub@redhat.com>
    Aldy Hernandez  <aldyh@redhat.com>

* class.c (finish_struct_1): Call finish_omp_declare_simd_methods.
* cp-gimplify.c (cp_gimplify_expr): Handle OMP_TASKLOOP.
(cp_genericize_r): Likewise.
(cxx_omp_finish_clause): Don't diagnose references.
(cxx_omp_disregard_value_expr): New function.
* cp-objcp-common.h (LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR): Redefine.
* cp-tree.h (OMP_FOR_GIMPLIFYING_P): Document for OMP_TASKLOOP.
(DECL_OMP_PRIVATIZED_MEMBER): Define.
(finish_omp_declare_simd_methods, push_omp_privatization_clauses,
pop_omp_privatization_clauses, save_omp_privatization_clauses,
restore_omp_privatization_clauses, omp_privatize_field,
cxx_omp_disregard_value_expr): New prototypes.
(finish_omp_clauses): Add two new arguments.
(finish_omp_for): Add ORIG_DECLV argument.
* parser.c (cp_parser_lambda_body): Call
save_omp_privatization_clauses and restore_omp_privatization_clauses.
(cp_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
(cp_parser_omp_var_list_no_open): Handle structure elements for
map, to and from clauses.  Handle array sections in reduction
clause.  Parse this keyword.  Formatting fixes.
(cp_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
if clause modifiers.
(cp_parser_omp_clause_num_tasks, cp_parser_omp_clause_grainsize,
cp_parser_omp_clause_priority, cp_parser_omp_clause_hint,
cp_parser_omp_clause_defaultmap): New functions.
(cp_parser_omp_clause_ordered): Parse optional parameter.
(cp_parser_omp_clause_reduction): Handle array reductions.
(cp_parser_omp_clause_schedule): Parse optional simd modifier.
(cp_parser_omp_clause_nogroup, cp_parser_omp_clause_orderedkind):
New functions.
(cp_parser_omp_clause_linear): Parse linear clause modifiers.
(cp_parser_omp_clause_depend_sink): New function.
(cp_parser_omp_clause_depend): Parse source/sink depend kinds.
(cp_parser_omp_clause_map): Parse release/delete map kinds and
optional always modifier.
(cp_parser_oacc_all_clauses): Adjust cp_parser_omp_clause_if
and finish_omp_clauses callers.
(cp_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
(OMP_CRITICAL_CLAUSE_MASK): Define.
(cp_parser_omp_critical): Parse critical clauses.
(cp_parser_omp_for_incr): Use cp_tree_equal if
processing_template_decl.
(cp_parser_omp_for_loop_init): Return tree instead of bool.  Handle
non-static data member iterators.
(cp_parser_omp_for_loop): Handle doacross loops, adjust
finish_omp_for and finish_omp_clauses callers.
(cp_omp_split_clauses): Adjust finish_omp_clauses caller.
(OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
(cp_parser_omp_simd): Allow ordered clause if it has no parameter.
(OMP_FOR_CLAUSE_MASK): Add linear clause.
(cp_parser_omp_for): Disallow ordered clause when combined with
distribute.  Disallow linear clause when combined with distribute
and not combined with simd.
(OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
(cp_parser_omp_ordered): Add CONTEXT argument, return bool instead
of tree, parse clauses and if depend clause is found, don't parse
a body.
(cp_parser_omp_parallel): Disallow copyin clause on target parallel.
Allow target parallel without for after it.
(OMP_TASK_CLAUSE_MASK): Add priority clause.
(OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
(cp_parser_omp_target_data): Diagnose no map clauses or clauses with
invalid kinds.
(OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
(OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
(cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data): New
functions.
(OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
defaultmap and is_device_ptr clauses.
(cp_parser_omp_target): Parse target parallel and target simd.  Set
OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
and target exit data.  Diagnose invalid map kinds.
(cp_parser_oacc_cache): Adjust finish_omp_clauses caller.
(OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
(cp_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
construct.
(OMP_TASKLOOP_CLAUSE_MASK): Define.
(cp_parser_omp_taskloop): New function.
(cp_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
handle PRAGMA_OMP_TASKLOOP.
(cp_parser_pragma): Handle PRAGMA_OMP_ORDERED here directly,
handle PRAGMA_OMP_TASKLOOP, call push_omp_privatization_clauses
and pop_omp_privatization_clauses around parsing calls.
(cp_parser_cilk_for): Adjust finish_omp_clauses caller.
* pt.c (apply_late_template_attributes): Adjust tsubst_omp_clauses
and finish_omp_clauses callers.
(tsubst_omp_clause_decl): Return NULL if decl is NULL.
For TREE_LIST, copy over OMP_CLAUSE_DEPEND_SINK_NEGATIVE bit.
Use tsubst_expr instead of tsubst_copy, undo convert_from_reference
effects.
(tsubst_omp_clauses): Add ALLOW_FIELDS argument.  Handle new
OpenMP 4.5 clauses.  Use tsubst_omp_clause_decl for more clauses.
If ALLOW_FIELDS, handle non-static data members in the clauses.
Clear OMP_CLAUSE_LINEAR_STEP if it has been cleared before.
(omp_parallel_combined_clauses): New variable.
(tsubst_omp_for_iterator): Add ORIG_DECLV argument, recur on
OMP_FOR_ORIG_DECLS, handle non-static data member iterators.
Improve handling of clauses on combined constructs.
(tsubst_expr): Call push_omp_privatization_clauses and
pop_omp_privatization_clauses around instantiation of certain
OpenMP constructs, improve handling of clauses on combined
constructs, handle OMP_TASKLOOP, adjust tsubst_omp_for_iterator,
tsubst_omp_clauses and finish_omp_for callers, handle clauses on
critical and ordered, handle OMP_TARGET_{ENTER,EXIT}_DATA.
(instantiate_decl): Call save_omp_privatization_clauses and
restore_omp_privatization_clauses around instantiation.
(dependent_omp_for_p): Fix up comment typo.  Handle SCOPE_REF.
* semantics.c (omp_private_member_map, omp_private_member_vec,
omp_private_member_ignore_next): New variables.
(finish_non_static_data_member): Return dummy decl for privatized
non-static data members.
(omp_clause_decl_field, omp_clause_printable_decl,
omp_note_field_privatization, omp_privatize_field): New functions.
(handle_omp_array_sections_1): Fix comment typo.
Add IS_OMP argument, handle structure element bases, diagnose
bitfields, pass IS_OMP recursively, diagnose known zero length
array sections in depend clauses, handle array sections in reduction
clause, diagnose negative length even for pointers.
(handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
types, pass IS_OMP down to handle_omp_array_sections_1, handle
array sections in reduction clause, set
OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
(finish_omp_reduction_clause): Handle array sections and arrays.
Use omp_clause_printable_decl.
(finish_omp_declare_simd_methods, cp_finish_omp_clause_depend_sink):
New functions.
(finish_omp_clauses): Add ALLOW_FIELDS and DECLARE_SIMD arguments.
Handle new OpenMP 4.5 clauses and new restrictions for the old
ones, handle non-static data members, reject this keyword when not
allowed.
(push_omp_privatization_clauses, pop_omp_privatization_clauses,
save_omp_privatization_clauses, restore_omp_privatization_clauses):
New functions.
(handle_omp_for_class_iterator): Handle OMP_TASKLOOP class iterators.
Add collapse and ordered arguments.  Fix handling of lastprivate
iterators in doacross loops.
(finish_omp_for): Add ORIG_DECLV argument, handle doacross loops,
adjust c_finish_omp_for, handle_omp_for_class_iterator and
finish_omp_clauses callers.  Fill in OMP_CLAUSE_LINEAR_STEP on simd
loops with non-static data member iterators.
gcc/fortran/
2015-10-13  Jakub Jelinek  <jakub@redhat.com>
    Ilya Verbin  <ilya.verbin@intel.com>

* f95-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
DEF_FUNCTION_TYPE_11, DEF_FUNCTION_TYPE_VAR_1): Define.
* trans-openmp.c (gfc_trans_omp_clauses): Set
OMP_CLAUSE_IF_MODIFIER to ERROR_MARK, OMP_CLAUSE_ORDERED_EXPR
to NULL.
(gfc_trans_omp_critical): Adjust for addition of clauses.
(gfc_trans_omp_ordered): Likewise.
* types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR,
BT_FN_BOOL_UINT_ULLPTR_ULLPTR_ULLPTR,
BT_FN_BOOL_UINT_LONGPTR_LONG_LONGPTR_LONGPTR,
BT_FN_BOOL_UINT_ULLPTR_ULL_ULLPTR_ULLPTR,
BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_UINT_PTR,
BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR,
BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT,
BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_LONG_LONG_LONG,
BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_ULL_ULL_ULL,
BT_FN_VOID_LONG_VAR, BT_FN_VOID_ULL_VAR): New.
(BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR,
BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): Remove.
gcc/lto/
2015-10-13  Jakub Jelinek  <jakub@redhat.com>

* lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
DEF_FUNCTION_TYPE_11): Define.
gcc/jit/
2015-10-13  Jakub Jelinek  <jakub@redhat.com>

* jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
DEF_FUNCTION_TYPE_11): Define.
* jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
DEF_FUNCTION_TYPE_11): Define.
gcc/ada/
2015-10-13  Jakub Jelinek  <jakub@redhat.com>

* gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
DEF_FUNCTION_TYPE_11): Define.
gcc/testsuite/
2015-10-13  Jakub Jelinek  <jakub@redhat.com>
    Aldy Hernandez  <aldyh@redhat.com>

* c-c++-common/gomp/cancel-1.c (f2): Add map clause to target data.
* c-c++-common/gomp/clauses-1.c: New test.
* c-c++-common/gomp/clauses-2.c: New test.
* c-c++-common/gomp/clauses-3.c: New test.
* c-c++-common/gomp/clauses-4.c: New test.
* c-c++-common/gomp/declare-target-1.c: New test.
* c-c++-common/gomp/declare-target-2.c: New test.
* c-c++-common/gomp/depend-3.c: New test.
* c-c++-common/gomp/depend-4.c: New test.
* c-c++-common/gomp/doacross-1.c: New test.
* c-c++-common/gomp/if-1.c: New test.
* c-c++-common/gomp/if-2.c: New test.
* c-c++-common/gomp/linear-1.c: New test.
* c-c++-common/gomp/map-2.c: New test.
* c-c++-common/gomp/map-3.c: New test.
* c-c++-common/gomp/nesting-1.c (f_omp_parallel,
f_omp_target_data): Add map clause to target data.
* c-c++-common/gomp/nesting-warn-1.c (f_omp_target): Likewise.
* c-c++-common/gomp/ordered-1.c: New test.
* c-c++-common/gomp/ordered-2.c: New test.
* c-c++-common/gomp/ordered-3.c: New test.
* c-c++-common/gomp/pr61486-1.c (foo): Remove linear clause
on non-iterator.
* c-c++-common/gomp/pr61486-2.c (test, test2): Remove ordered
clause and ordered construct where no longer allowed.
* c-c++-common/gomp/priority-1.c: New test.
* c-c++-common/gomp/reduction-1.c: New test.
* c-c++-common/gomp/schedule-simd-1.c: New test.
* c-c++-common/gomp/sink-1.c: New test.
* c-c++-common/gomp/sink-2.c: New test.
* c-c++-common/gomp/sink-3.c: New test.
* c-c++-common/gomp/sink-4.c: New test.
* c-c++-common/gomp/udr-1.c: New test.
* c-c++-common/taskloop-1.c: New test.
* c-c++-common/cpp/openmp-define-3.c: Adjust for the new
value of _OPENMP macro.
* c-c++-common/cilk-plus/PS/body.c (foo): Adjust expected diagnostics.
* c-c++-common/goacc-gomp/nesting-fail-1.c (f_acc_parallel,
f_acc_kernels, f_acc_data, f_acc_loop): Add map clause to target data.
* gcc.dg/gomp/clause-1.c:
* gcc.dg/gomp/reduction-1.c: New test.
* gcc.dg/gomp/sink-fold-1.c: New test.
* gcc.dg/gomp/sink-fold-2.c: New test.
* gcc.dg/gomp/sink-fold-3.c: New test.
* gcc.dg/vect/vect-simd-clone-15.c: New test.
* g++.dg/gomp/clause-1.C (T::test): Remove dg-error on privatization
of non-static data members.
* g++.dg/gomp/clause-3.C (foo): Remove one dg-error directive.
Add some linear clause tests.
* g++.dg/gomp/declare-simd-3.C: New test.
* g++.dg/gomp/linear-1.C: New test.
* g++.dg/gomp/member-1.C: New test.
* g++.dg/gomp/member-2.C: New test.
* g++.dg/gomp/pr66571-2.C: New test.
* g++.dg/gomp/pr67504.C (foo): Add test for ordered clause with
dependent argument.
* g++.dg/gomp/pr67522.C (foo): Add test for invalid array section
in reduction clause.
* g++.dg/gomp/reference-1.C: New test.
* g++.dg/gomp/sink-1.C: New test.
* g++.dg/gomp/sink-2.C: New test.
* g++.dg/gomp/sink-3.C: New test.
* g++.dg/gomp/task-1.C: Remove both dg-error directives.
* g++.dg/gomp/this-1.C: New test.
* g++.dg/gomp/this-2.C: New test.
* g++.dg/vect/simd-clone-2.cc: New test.
* g++.dg/vect/simd-clone-2.h: New test.
* g++.dg/vect/simd-clone-3.cc: New test.
* g++.dg/vect/simd-clone-4.cc: New test.
* g++.dg/vect/simd-clone-4.h: New test.
* g++.dg/vect/simd-clone-5.cc: New test.
include/
2015-10-13  Jakub Jelinek  <jakub@redhat.com>
    Ilya Verbin  <ilya.verbin@intel.com>

* gomp-constants.h (GOMP_MAP_FLAG_ALWAYS): Define.
(enum gomp_map_kind): Add GOMP_MAP_FIRSTPRIVATE,
GOMP_MAP_FIRSTPRIVATE_INT, GOMP_MAP_USE_DEVICE_PTR,
GOMP_MAP_ZERO_LEN_ARRAY_SECTION, GOMP_MAP_ALWAYS_TO,
GOMP_MAP_ALWAYS_FROM, GOMP_MAP_ALWAYS_TOFROM, GOMP_MAP_STRUCT,
GOMP_MAP_DELETE_ZERO_LEN_ARRAY_SECTION, GOMP_MAP_DELETE,
GOMP_MAP_RELEASE, GOMP_MAP_FIRSTPRIVATE_POINTER.
(GOMP_MAP_ALWAYS_TO_P, GOMP_MAP_ALWAYS_FROM_P): Define.
(GOMP_TASK_FLAG_UNTIED, GOMP_TASK_FLAG_FINAL, GOMP_TASK_FLAG_MERGEABLE,
GOMP_TASK_FLAG_DEPEND, GOMP_TASK_FLAG_PRIORITY, GOMP_TASK_FLAG_UP,
GOMP_TASK_FLAG_GRAINSIZE, GOMP_TASK_FLAG_IF, GOMP_TASK_FLAG_NOGROUP,
GOMP_TARGET_FLAG_NOWAIT, GOMP_TARGET_FLAG_EXIT_DATA,
GOMP_TARGET_FLAG_UPDATE): Define.
libgomp/
2015-10-13  Jakub Jelinek  <jakub@redhat.com>
    Aldy Hernandez  <aldyh@redhat.com>
    Ilya Verbin  <ilya.verbin@intel.com>

* config/linux/affinity.c (omp_get_place_num_procs,
omp_get_place_proc_ids, gomp_get_place_proc_ids_8): New functions.
* config/linux/doacross.h: New file.
* config/posix/affinity.c (omp_get_place_num_procs,
omp_get_place_proc_ids, gomp_get_place_proc_ids_8): New functions.
* config/posix/doacross.h: New file.
* env.c: Include gomp-constants.h.
(struct gomp_task_icv): Rename run_sched_modifier to
run_sched_chunk_size.
(gomp_max_task_priority_var): New variable.
(parse_schedule): Rename run_sched_modifier to run_sched_chunk_size.
(handle_omp_display_env): Change _OPENMP value from 201307 to
201511.  Print OMP_MAX_TASK_PRIORITY.
(initialize_env): Parse OMP_MAX_TASK_PRIORITY.
(omp_set_schedule, omp_get_schedule): Rename modifier argument to
chunk_size and run_sched_modifier to run_sched_chunk_size.
(omp_get_max_task_priority, omp_get_initial_device,
omp_get_num_places, omp_get_place_num, omp_get_partition_num_places,
omp_get_partition_place_nums): New functions.
* fortran.c (omp_set_schedule_, omp_set_schedule_8_,
omp_get_schedule_, omp_get_schedule_8_): Rename modifier argument
to chunk_size.
(omp_get_num_places_, omp_get_place_num_procs_,
omp_get_place_num_procs_8_, omp_get_place_proc_ids_,
omp_get_place_proc_ids_8_, omp_get_place_num_,
omp_get_partition_num_places_, omp_get_partition_place_nums_,
omp_get_partition_place_nums_8_, omp_get_initial_device_,
omp_get_max_task_priority_): New functions.
* libgomp_g.h (GOMP_loop_doacross_static_start,
GOMP_loop_doacross_dynamic_start, GOMP_loop_doacross_guided_start,
GOMP_loop_doacross_runtime_start, GOMP_loop_ull_doacross_static_start,
GOMP_loop_ull_doacross_dynamic_start,
GOMP_loop_ull_doacross_guided_start,
GOMP_loop_ull_doacross_runtime_start, GOMP_doacross_post,
GOMP_doacross_wait, GOMP_doacross_ull_post, GOMP_doacross_wait,
GOMP_taskloop, GOMP_taskloop_ull, GOMP_target_41,
GOMP_target_data_41, GOMP_target_update_41,
GOMP_target_enter_exit_data): New prototypes.
(GOMP_task): Add prototype argument.
* libgomp.h (_LIBGOMP_CHECKING_): Define to 0 if not yet defined.
(struct gomp_doacross_work_share): New type.
(struct gomp_work_share): Add doacross field.
(struct gomp_task_icv): Rename run_sched_modifier to
run_sched_chunk_size.
(enum gomp_task_kind): Rename GOMP_TASK_IFFALSE to
GOMP_TASK_UNDEFERRED.  Add comments.
(struct gomp_task_depend_entry): Add comments.
(struct gomp_task): Likewise.
(struct gomp_taskgroup): Likewise.
(struct gomp_target_task): New type.
(struct gomp_team): Add comment.
(gomp_get_place_proc_ids_8, gomp_doacross_init,
gomp_doacross_ull_init, gomp_task_maybe_wait_for_dependencies,
gomp_create_target_task, gomp_target_task_fn): New prototypes.
(struct target_var_desc): New type.
(struct target_mem_desc): Adjust comment.  Use struct
target_var_desc instead of splay_tree_key for list.
(REFCOUNT_INFINITY): Define.
(struct splay_tree_key_s): Remove copy_from field.
(struct gomp_device_descr): Add dev2dev_func field.
(enum gomp_map_vars_kind): New enum.
(gomp_map_vars): Add one argument.
* libgomp.map (OMP_4.5): Export omp_get_max_task_priority,
omp_get_max_task_priority_, omp_get_num_places, omp_get_num_places_,
omp_get_place_num_procs, omp_get_place_num_procs_,
omp_get_place_num_procs_8_, omp_get_place_proc_ids,
omp_get_place_proc_ids_, omp_get_place_proc_ids_8_, omp_get_place_num,
omp_get_place_num_, omp_get_partition_num_places,
omp_get_partition_num_places_, omp_get_partition_place_nums,
omp_get_partition_place_nums_, omp_get_partition_place_nums_8_,
omp_get_initial_device, omp_get_initial_device_, omp_target_alloc,
omp_target_free, omp_target_is_present, omp_target_memcpy,
omp_target_memcpy_rect, omp_target_associate_ptr and
omp_target_disassociate_ptr.
(GOMP_4.0.2): Renamed to ...
(GOMP_4.5): ... this.  Export GOMP_target_41, GOMP_target_data_41,
GOMP_target_update_41, GOMP_target_enter_exit_data, GOMP_taskloop,
GOMP_taskloop_ull, GOMP_loop_doacross_dynamic_start,
GOMP_loop_doacross_guided_start, GOMP_loop_doacross_runtime_start,
GOMP_loop_doacross_static_start, GOMP_doacross_post,
GOMP_doacross_wait, GOMP_loop_ull_doacross_dynamic_start,
GOMP_loop_ull_doacross_guided_start,
GOMP_loop_ull_doacross_runtime_start,
GOMP_loop_ull_doacross_static_start, GOMP_doacross_ull_post and
GOMP_doacross_ull_wait.
* libgomp.texi: Document omp_get_max_task_priority.
Rename modifier argument to chunk_size for omp_set_schedule and
omp_get_schedule.  Document OMP_MAX_TASK_PRIORITY env var.
* loop.c (GOMP_loop_runtime_start): Adjust for run_sched_modifier
to run_sched_chunk_size renaming.
(GOMP_loop_ordered_runtime_start): Likewise.
(gomp_loop_doacross_static_start, gomp_loop_doacross_dynamic_start,
gomp_loop_doacross_guided_start, GOMP_loop_doacross_runtime_start,
GOMP_parallel_loop_runtime_start): New functions.
(GOMP_parallel_loop_runtime): Adjust for run_sched_modifier
to run_sched_chunk_size renaming.
(GOMP_loop_doacross_static_start, GOMP_loop_doacross_dynamic_start,
GOMP_loop_doacross_guided_start): New functions or aliases.
* loop_ull.c (GOMP_loop_ull_runtime_start): Adjust for
run_sched_modifier to run_sched_chunk_size renaming.
(GOMP_loop_ull_ordered_runtime_start): Likewise.
(gomp_loop_ull_doacross_static_start,
gomp_loop_ull_doacross_dynamic_start,
gomp_loop_ull_doacross_guided_start,
GOMP_loop_ull_doacross_runtime_start): New functions.
(GOMP_loop_ull_doacross_static_start,
GOMP_loop_ull_doacross_dynamic_start,
GOMP_loop_ull_doacross_guided_start): New functions or aliases.
* oacc-mem.c (acc_map_data, present_create_copy,
gomp_acc_insert_pointer): Pass GOMP_MAP_VARS_OPENACC instead of false
to gomp_map_vars.
(gomp_acc_remove_pointer): Use copy_from from target_var_desc.
* oacc-parallel.c (GOACC_data_start): Pass GOMP_MAP_VARS_OPENACC
instead of false to gomp_map_vars.
(GOACC_parallel_keyed): Likewise.  Use copy_from from target_var_desc.
* omp.h.in (omp_lock_hint_t): New type.
(omp_init_lock_with_hint, omp_init_nest_lock_with_hint,
omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids,
omp_get_place_num, omp_get_partition_num_places,
omp_get_partition_place_nums, omp_get_initial_device,
omp_get_max_task_priority, omp_target_alloc, omp_target_free,
omp_target_is_present, omp_target_memcpy, omp_target_memcpy_rect,
omp_target_associate_ptr, omp_target_disassociate_ptr): New
prototypes.
* omp_lib.f90.in (omp_lock_hint_kind): New parameter.
(omp_lock_hint_none, omp_lock_hint_uncontended,
omp_lock_hint_contended, omp_lock_hint_nonspeculative,
omp_lock_hint_speculative): New parameters.
(omp_init_lock_with_hint, omp_init_nest_lock_with_hint,
omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids,
omp_get_place_num, omp_get_partition_num_places,
omp_get_partition_place_nums, omp_get_initial_device,
omp_get_max_task_priority): New interfaces.
(omp_set_schedule, omp_get_schedule): Rename modifier argument
to chunk_size.
* omp_lib.h.in (omp_lock_hint_kind): New parameter.
(omp_lock_hint_none, omp_lock_hint_uncontended,
omp_lock_hint_contended, omp_lock_hint_nonspeculative,
omp_lock_hint_speculative): New parameters.
(omp_init_lock_with_hint, omp_init_nest_lock_with_hint,
omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids,
omp_get_place_num, omp_get_partition_num_places,
omp_get_partition_place_nums, omp_get_initial_device,
omp_get_max_task_priority): New functions and subroutines.
* ordered.c: Include stdarg.h and string.h.
(MAX_COLLAPSED_BITS): Define.
(gomp_doacross_init, GOMP_doacross_post, GOMP_doacross_wait,
gomp_doacross_ull_init, GOMP_doacross_ull_post,
GOMP_doacross_ull_wait): New functions.
* target.c: Include errno.h.
(resolve_device): If device is not initialized, call
gomp_init_device on it.
(gomp_map_lookup): New function.
(gomp_map_vars_existing): Add tgt_var argument, fill it in.
Don't bump refcount if REFCOUNT_INFINITY.  Handle
GOMP_MAP_ALWAYS_TO_P.
(get_kind): Rename is_openacc argument to short_mapkind.
(gomp_map_pointer): Use gomp_map_lookup.
(gomp_map_fields_existing): New function.
(gomp_map_vars): Rename is_openacc argument to short_mapkind
and is_target to pragma_kind.  Handle GOMP_MAP_VARS_ENTER_DATA,
handle GOMP_MAP_FIRSTPRIVATE_INT, GOMP_MAP_STRUCT,
GOMP_MAP_USE_DEVICE_PTR, GOMP_MAP_ZERO_LEN_ARRAY_SECTION.
Adjust for tgt->list changed type and copy_from living in there.
(gomp_copy_from_async): Adjust for tgt->list changed type and
copy_from living in there.
(gomp_unmap_vars): Likewise.
(gomp_update): Likewise.  Rename is_openacc argument to
short_mapkind.  Don't fail if object is not mapped.
(gomp_load_image_to_device): Initialize refcount to
REFCOUNT_INFINITY.
(gomp_target_fallback): New function.
(gomp_get_target_fn_addr): Likewise.
(GOMP_target): Adjust gomp_map_vars caller, use
gomp_get_target_fn_addr and gomp_target_fallback.
(GOMP_target_41): New function.
(gomp_target_data_fallback): New function.
(GOMP_target_data): Use it, adjust gomp_map_vars caller.
(GOMP_target_data_41): New function.
(GOMP_target_update): Adjust gomp_update caller.
(GOMP_target_update_41): New function.
(gomp_exit_data, GOMP_target_enter_exit_data,
gomp_target_task_fn, omp_target_alloc, omp_target_free,
omp_target_is_present, omp_target_memcpy,
omp_target_memcpy_rect_worker, omp_target_memcpy_rect,
omp_target_associate_ptr, omp_target_disassociate_ptr,
gomp_load_plugin_for_device): New functions.
* task.c: Include gomp-constants.h.  Include taskloop.c
twice to get GOMP_taskloop and GOMP_taskloop_ull definitions.
(gomp_task_handle_depend): New function.
(GOMP_task): Use it.  Add priority argument.  Use
gomp-constant.h constants instead of hardcoded numbers.
Rename GOMP_TASK_IFFALSE to GOMP_TASK_UNDEFERRED.
(gomp_create_target_task): New function.
(verify_children_queue, verify_taskgroup_queue,
verify_task_queue): New functions.
(gomp_task_run_pre): Call verify_*_queue functions.
If an upcoming tied task is about to leave the sibling or
taskgroup queues in an invalid state, adjust appropriately.
Remove taskgroup argument.  Add comments.
(gomp_task_run_post_handle_dependers): Add comments.
(gomp_task_run_post_remove_parent): Likewise.
(gomp_barrier_handle_tasks): Adjust gomp_task_run_pre caller.
(GOMP_taskwait): Likewise.  Add comments.
(gomp_task_maybe_wait_for_dependencies): Fix scheduling
problem such that the first non parent_depends_on task does not
end up at the end of the children queue.
(GOMP_taskgroup_start): Rename GOMP_TASK_IFFALSE to
GOMP_TASK_UNDEFERRED.
(GOMP_taskgroup_end): Adjust gomp_task_run_pre caller.
* taskloop.c: New file.
* testsuite/lib/libgomp.exp
(check_effective_target_offload_device_nonshared_as): New proc.
* testsuite/libgomp.c/affinity-2.c: New test.
* testsuite/libgomp.c/doacross-1.c: New test.
* testsuite/libgomp.c/doacross-2.c: New test.
* testsuite/libgomp.c/examples-4/declare_target-1.c (fib_wrapper):
Add map clause to target.
* testsuite/libgomp.c/examples-4/declare_target-4.c (accum): Likewise.
* testsuite/libgomp.c/examples-4/declare_target-5.c (accum): Likewise.
* testsuite/libgomp.c/examples-4/device-1.c (main): Likewise.
* testsuite/libgomp.c/examples-4/device-3.c (main): Likewise.
* testsuite/libgomp.c/examples-4/target_data-3.c (gramSchmidt):
Likewise.
* testsuite/libgomp.c/examples-4/teams-2.c (dotprod): Likewise.
* testsuite/libgomp.c/examples-4/teams-3.c (dotprod): Likewise.
* testsuite/libgomp.c/examples-4/teams-4.c (dotprod): Likewise.
* testsuite/libgomp.c/for-2.h (OMPTGT, OMPTO, OMPFROM): Define if
not defined.  Use those where needed.
* testsuite/libgomp.c/for-4.c: New test.
* testsuite/libgomp.c/for-5.c: New test.
* testsuite/libgomp.c/for-6.c: New test.
* testsuite/libgomp.c/linear-1.c: New test.
* testsuite/libgomp.c/ordered-4.c: New test.
* testsuite/libgomp.c/pr66199-2.c (f2): Adjust for linear clause
only allowed on the loop iterator.
* testsuite/libgomp.c/pr66199-3.c: New test.
* testsuite/libgomp.c/pr66199-4.c: New test.
* testsuite/libgomp.c/reduction-7.c: New test.
* testsuite/libgomp.c/reduction-8.c: New test.
* testsuite/libgomp.c/reduction-9.c: New test.
* testsuite/libgomp.c/reduction-10.c: New test.
* testsuite/libgomp.c/target-1.c (fn2, fn3, fn4): Add
map(tofrom:s).
* testsuite/libgomp.c/target-2.c (fn2, fn3, fn4): Likewise.
* testsuite/libgomp.c/target-7.c (foo): Add map(h) where needed.
* testsuite/libgomp.c/target-11.c: New test.
* testsuite/libgomp.c/target-12.c: New test.
* testsuite/libgomp.c/target-13.c: New test.
* testsuite/libgomp.c/target-14.c: New test.
* testsuite/libgomp.c/target-15.c: New test.
* testsuite/libgomp.c/target-16.c: New test.
* testsuite/libgomp.c/target-17.c: New test.
* testsuite/libgomp.c/target-18.c: New test.
* testsuite/libgomp.c/target-19.c: New test.
* testsuite/libgomp.c/target-20.c: New test.
* testsuite/libgomp.c/target-21.c: New test.
* testsuite/libgomp.c/target-22.c: New test.
* testsuite/libgomp.c/target-23.c: New test.
* testsuite/libgomp.c/target-24.c: New test.
* testsuite/libgomp.c/target-25.c: New test.
* testsuite/libgomp.c/target-26.c: New test.
* testsuite/libgomp.c/target-27.c: New test.
* testsuite/libgomp.c/taskloop-1.c: New test.
* testsuite/libgomp.c/taskloop-2.c: New test.
* testsuite/libgomp.c/taskloop-3.c: New test.
* testsuite/libgomp.c/taskloop-4.c: New test.
* testsuite/libgomp.c++/ctor-13.C: New test.
* testsuite/libgomp.c++/doacross-1.C: New test.
* testsuite/libgomp.c++/examples-4/declare_target-2.C:
Replace offload_device with offload_device_nonshared_as.
* testsuite/libgomp.c++/for-12.C: New test.
* testsuite/libgomp.c++/for-13.C: New test.
* testsuite/libgomp.c++/for-14.C: New test.
* testsuite/libgomp.c++/linear-1.C: New test.
* testsuite/libgomp.c++/member-1.C: New test.
* testsuite/libgomp.c++/member-2.C: New test.
* testsuite/libgomp.c++/member-3.C: New test.
* testsuite/libgomp.c++/member-4.C: New test.
* testsuite/libgomp.c++/member-5.C: New test.
* testsuite/libgomp.c++/ordered-1.C: New test.
* testsuite/libgomp.c++/reduction-5.C: New test.
* testsuite/libgomp.c++/reduction-6.C: New test.
* testsuite/libgomp.c++/reduction-7.C: New test.
* testsuite/libgomp.c++/reduction-8.C: New test.
* testsuite/libgomp.c++/reduction-9.C: New test.
* testsuite/libgomp.c++/reduction-10.C: New test.
* testsuite/libgomp.c++/reference-1.C: New test.
* testsuite/libgomp.c++/simd14.C: New test.
* testsuite/libgomp.c++/target-2.C (fn2): Add map(tofrom: s) clause.
* testsuite/libgomp.c++/target-5.C: New test.
* testsuite/libgomp.c++/target-6.C: New test.
* testsuite/libgomp.c++/target-7.C: New test.
* testsuite/libgomp.c++/target-8.C: New test.
* testsuite/libgomp.c++/target-9.C: New test.
* testsuite/libgomp.c++/target-10.C: New test.
* testsuite/libgomp.c++/target-11.C: New test.
* testsuite/libgomp.c++/target-12.C: New test.
* testsuite/libgomp.c++/taskloop-1.C: New test.
* testsuite/libgomp.c++/taskloop-2.C: New test.
* testsuite/libgomp.c++/taskloop-3.C: New test.
* testsuite/libgomp.c++/taskloop-4.C: New test.
* testsuite/libgomp.c++/taskloop-5.C: New test.
* testsuite/libgomp.c++/taskloop-6.C: New test.
* testsuite/libgomp.c++/taskloop-7.C: New test.
* testsuite/libgomp.c++/taskloop-8.C: New test.
* testsuite/libgomp.c++/taskloop-9.C: New test.
* testsuite/libgomp.fortran/affinity1.f90: New test.
* testsuite/libgomp.fortran/affinity2.f90: New test.
liboffloadmic/
2015-10-13  Ilya Verbin  <ilya.verbin@intel.com>

* plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_dev2dev): New
function.
* plugin/offload_target_main.cpp (__offload_target_tgt2tgt): New
static function, register it in liboffloadmic.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228777 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * config/i386/i386.c (classify_argument): Use CEIL where applicable.
uros [Tue, 13 Oct 2015 18:56:48 +0000 (18:56 +0000)]
* config/i386/i386.c (classify_argument): Use CEIL where applicable.
(ix86_function_arg_advance): Ditto.
(ix86_function_arg): Ditto.
(ix86_gimplify_va_arg): Ditto.
(ix86_class_max_nregs): Ditto.
(inline_memory_move_cost): Ditto.
(ix86_set_reg_reg_cost): Ditto.
* config/i386/i386.h (HARD_REGNO_NREGS): Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228776 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agosupport BLKmode inputs for store_bit_field
aoliva [Tue, 13 Oct 2015 16:34:29 +0000 (16:34 +0000)]
support BLKmode inputs for store_bit_field

Revision 228586 changed useless_type_conversion_p and added mode
changes for MEM:BLKmode inputs in store_expr_with_bounds, but it
missed store_bit_field.  This caused ada/rts/s-regpat.ads to fail
compilation on x86_64-linux-gnu.

for  gcc/ChangeLog

PR middle-end/67912
* expmed.c (store_bit_field_1): Adjust mode of BLKmode inputs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228774 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix prototype for print_insn in rtl.h
law [Tue, 13 Oct 2015 15:32:32 +0000 (15:32 +0000)]
Fix prototype for print_insn in rtl.h

* gcc/rtl.h (print_insn): Fix prototype.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228770 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * config/sparc/sparc.h (SPARC_STACK_ALIGN): Implement using
uros [Tue, 13 Oct 2015 15:31:29 +0000 (15:31 +0000)]
* config/sparc/sparc.h (SPARC_STACK_ALIGN): Implement using
ROUND_UP macro and UNITS_PER_WORD * 2.
* config/sparc/sparc.c (sparc_compute_frame_size):
Use ROUND_UP and ROUND_DOWN macros where applicable.
(function_arg_record_value, function_arg_record_value_1)
(function_arg_record_value_1): Ditto.
(emit_save_or_restore_regs): Use ROUND_DOWN to preserve offset
alignment to double-word.
(sparc_gimplify_va_arg): Use ROUND_UP to calculate rsize.
(sparc_emit_probe_stack_range): Use ROUND_DOWN to calculate
rounded_size.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228769 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * config/sparc/sparc.h (SPARC_STACK_ALIGN): Implement using
uros [Tue, 13 Oct 2015 15:31:06 +0000 (15:31 +0000)]
* config/sparc/sparc.h (SPARC_STACK_ALIGN): Implement using
ROUND_UP macro and UNITS_PER_WORD * 2.
* config/sparc/sparc.c (sparc_compute_frame_size):
Use ROUND_UP and ROUND_DOWN macros where applicable.
(function_arg_record_value, function_arg_record_value_1)
(function_arg_record_value_1): Ditto.
(emit_save_or_restore_regs): Use ROUND_DOWN to preserve offset
alignment to double-word.
(sparc_gimplify_va_arg): Use ROUND_UP to calculate rsize.
(sparc_emit_probe_stack_range): Use ROUND_DOWN to calculate
rounded_size.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228768 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix parloops gimple_uid usage
vries [Tue, 13 Oct 2015 14:54:01 +0000 (14:54 +0000)]
Fix parloops gimple_uid usage

2015-10-13  Tom de Vries  <tom@codesourcery.com>

* tree-parloops.c (reduction_phi): Handle cases that gimple_uid is 0 or
-1.  Add assert that returned entry matches phi argument.
(parallelize_loops): Move calls to init_stmt_vec_info_vec and
free_stmt_vec_info_vec ...
(gather_scalar_reductions): ... here.  Initialize gimple_uids of phis
with -1.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228767 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFollowup to [AArch64_be] Fix vtbl[34] and vtbx4
clyon [Tue, 13 Oct 2015 13:15:12 +0000 (13:15 +0000)]
Followup to [AArch64_be] Fix vtbl[34] and vtbx4

2015-10-13  Christophe Lyon  <christophe.lyon@linaro.org>

       * gcc/testsuite/gcc.target/aarch64/table-intrinsics.c: Fix regexp
       after r228716 (Fix vtbl[34] and vtbx4).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228762 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agogcc/
ienkovich [Tue, 13 Oct 2015 13:08:31 +0000 (13:08 +0000)]
gcc/

2014-10-13  Yuri Rumyantsev  <ysrumyan@gmail.com>

PR tree-optimization/67909, 67947
* tree-ssa-loop-unswitch.c (find_loop_guard): Add check that GUARD_EDGE
really skip the inner loop.

gcc/testsuite/

2014-10-13  Yuri Rumyantsev  <ysrumyan@gmail.com>

PR tree-optimization/67909, 67947
* gcc.dg/torture/pr67947.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228760 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH] Allow FSM to thread single block cases too
law [Tue, 13 Oct 2015 12:20:06 +0000 (12:20 +0000)]
[PATCH] Allow FSM to thread single block cases too

* tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths):
Allow single block jump threading paths.

* gcc.dg/tree-ssa/ssa-thread-13.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228757 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoAdd param parloops-schedule
vries [Tue, 13 Oct 2015 10:08:59 +0000 (10:08 +0000)]
Add param parloops-schedule

2015-10-13  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/67476
* doc/invoke.texi (@item parloops-schedule): New item.
* params.def (PARAM_PARLOOPS_SCHEDULE): New DEFPARAMENUM5.
* tree-parloops.c: Include params-enum.h.
(create_parallel_loop): Handle PARAM_PARLOOPS_SCHEDULE.

* testsuite/libgomp.c/autopar-3.c: New test.
* testsuite/libgomp.c/autopar-4.c: New test.
* testsuite/libgomp.c/autopar-5.c: New test.
* testsuite/libgomp.c/autopar-6.c: New test.
* testsuite/libgomp.c/autopar-7.c: New test.
* testsuite/libgomp.c/autopar-8.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228756 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoSupport DEFPARAMENUM in params.def
vries [Tue, 13 Oct 2015 10:08:50 +0000 (10:08 +0000)]
Support DEFPARAMENUM in params.def

2015-10-13  Tom de Vries  <tom@codesourcery.com>

* Makefile.in (PARAMS_H, PLUGIN_HEADERS): Add params-enum.h.
* params-enum.h: New file.
* opts.c (handle_param): Handle case that param arg is a string.
* params-list.h: Handle DEFPARAMENUM5 in params.def.
* params.c (find_param): New function, factored out of ...
(set_param_value): ... here.
(param_string_value_p): New function.
* params.h (struct param_info): Add value_names field.
(find_param, param_string_value_p): Declare.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228755 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoHandle original loop tree in expand_omp_for_generic
vries [Tue, 13 Oct 2015 10:08:40 +0000 (10:08 +0000)]
Handle original loop tree in expand_omp_for_generic

2015-10-13  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/67476
* omp-low.c (expand_omp_for_generic): Handle original loop tree.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228754 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-13 Richard Biener <rguenther@suse.de>
rguenth [Tue, 13 Oct 2015 08:39:41 +0000 (08:39 +0000)]
2015-10-13  Richard Biener  <rguenther@suse.de>

* tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Allocate
the data dependence vector.
(vect_peeling_hash_insert): Get the peeling hash table as argument.
(vect_peeling_hash_get_lowest_cost): Likewise.
(vect_enhance_data_refs_alignment): Adjust.
(struct _vect_peel_info, struct _vect_peel_extended_info,
struct peel_info_hasher): Move from ...
* tree-vectorizer.h: ... here.
(LOOP_VINFO_COST_MODEL_MIN_ITERS): Remove.
(LOOP_VINFO_PEELING_HTAB): Likewise.
(struct _loop_vec_info): Remove min_profitable_iters and
peeling_htab members.
* tree-vect-loop.c (new_loop_vec_info): Do not allocate vectors
here.
(destroy_loop_vec_info): Adjust.
(vect_analyze_loop_2): Do not set LOOP_VINFO_COST_MODEL_MIN_ITERS.
(vect_estimate_min_profitable_iters): Use LOOP_VINFO_COMP_ALIAS_DDRS
to estimate alias versioning cost.
* tree-vect-slp.c (vect_analyze_slp_cost): Dump header.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228751 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoTo: gcc-patches@gcc.gnu.org
rsandifo [Tue, 13 Oct 2015 07:34:41 +0000 (07:34 +0000)]
To: gcc-patches@gcc.gnu.org
Subject: Add an extra pow rule to match.pd
From: Richard Sandiford <richard.sandiford@arm.com>
Gcc: private.sent
--text follows this line--
Simplify pow(|x|,y) and pow(-x,y) to pow(x,y) if y is an even integer.
At the moment this duplicates a case in fold_builtin_pow, but an
upcoming patch will move all the fold_builtin_pow rules to match.pd.
I'm doing this one early to fix a regression in builtin-10.c for
soft-float ARM.

gcc/
* real.h (real_isinteger): Declare.
* real.c (real_isinteger): New function.
* match.pd: Simplify pow(|x|,y) and pow(-x,y) to pow(x,y)
if y is an even integer.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228750 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Tue, 13 Oct 2015 00:16:15 +0000 (00:16 +0000)]
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228743 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH] Allow FSM threader to thread more complex conditions
law [Mon, 12 Oct 2015 21:39:35 +0000 (21:39 +0000)]
[PATCH] Allow FSM threader to thread more complex conditions

* tree-ssa-threadbackward.c (get_gimple_control_stmt): New function.
(fsm_find_control_stmt_paths): Change name of first argument to
more accurately relfect what it really is.  Handle simplification
of GIMPLE_COND after finding a thread path for NAME.
* tree-ssa-threadedge.c (simplify_control_stmt_condition): Allow
nontrivial conditions to be handled by FSM threader.
(thread_through_normal_block): Extract the name to looup via
FSM threader from COND_EXPR.

* gcc.dg/tree-ssa/ssa-thread-12.c: New test.
* gcc.dg/tree-ssa/ssa-dom-thread-7.c: Update expected output.
* gcc.dg/tree-ssa/ssa-thread-11.c: Renamed from
ssa-dom-thread-11.c.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228739 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * testsuite/libgomp.oacc-c-c++-common/vector-loop.c: Fix loop
jnorris [Mon, 12 Oct 2015 20:22:30 +0000 (20:22 +0000)]
* testsuite/libgomp.oacc-c-c++-common/vector-loop.c: Fix loop
initializer.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228737 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago revert:
hubicka [Mon, 12 Oct 2015 18:54:01 +0000 (18:54 +0000)]
revert:
2015-10-11  Jan Hubicka  <hubicka@ucw.cz>
* cgraphbuild.c (compute_call_stmt_bb_frequency): Use
counts when these are more informative.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228736 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH] Improve FSM threader to handle compiler temporaries too
law [Mon, 12 Oct 2015 16:26:09 +0000 (16:26 +0000)]
[PATCH] Improve FSM threader to handle compiler temporaries too

* tree-ssa-threadbackward.c (fsm_find_thread_path): Remove
restriction that traced SSA_NAME is a user variable.

* gcc.dg/tree-ssa/ssa-dom-thread-11.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228727 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoAdd missing phis in expand_omp_for_generic
vries [Mon, 12 Oct 2015 14:14:22 +0000 (14:14 +0000)]
Add missing phis in expand_omp_for_generic

2015-10-12  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/67476
* omp-low.c (expand_omp_for_generic): Add missing phis.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228718 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoHandle simple latch in expand_omp_for_generic
vries [Mon, 12 Oct 2015 14:14:11 +0000 (14:14 +0000)]
Handle simple latch in expand_omp_for_generic

2015-10-12  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/67476
* omp-low.c (expand_omp_for_generic): Handle simple latch.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228717 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[AArch64_be] Fix vtbl[34] and vtbx4
clyon [Mon, 12 Oct 2015 14:06:54 +0000 (14:06 +0000)]
[AArch64_be] Fix vtbl[34] and vtbx4

2015-10-12  Christophe Lyon  <christophe.lyon@linaro.org>

* config/aarch64/aarch64-simd-builtins.def: Update builtins
tables: add tbl3 and tbx4.
* config/aarch64/aarch64-simd.md (aarch64_tbl3v8qi): New.
(aarch64_tbx4v8qi): New.
* config/aarch64/arm_neon.h (vtbl3_s8, vtbl3_u8, vtbl3_p8)
(vtbl4_s8, vtbl4_u8, vtbl4_p8, vtbx4_s8, vtbx4_u8, vtbx4_p8):
Rewrite using builtin functions.
* config/aarch64/iterators.md (UNSPEC_TBX): New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228716 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * config/rs6000/rs6000.h (RS6000_ALIGN): Implement using
uros [Mon, 12 Oct 2015 13:59:10 +0000 (13:59 +0000)]
* config/rs6000/rs6000.h (RS6000_ALIGN): Implement using
ROUND_UP macro.
* config/rs6000/rs6000.c (rs6000_darwin64_record_arg_advance_flush):
Use ROUND_UP and ROUND_DOWN macros where applicable.
(rs6000_darwin64_record_arg_flush): Ditto.
(rs6000_function_arg): Use ROUND_UP to calculate align_words.
(rs6000_emit_probe_stack_range): Use ROUND_DOWN to calculate
rounded_size.

* config/aarch/aarch64.h (AARCH64_ROUND_UP): Remove.
(AARCH64_ROUND_DOWN): Ditto.
* config/aarch64/aarch64.c: Use ROUND_UP instead of AARCH64_ROUND_UP.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228715 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-12 Richard Biener <rguenther@suse.de>
rguenth [Mon, 12 Oct 2015 12:26:02 +0000 (12:26 +0000)]
2015-10-12  Richard Biener  <rguenther@suse.de>

PR ipa/67783
* ipa-inline-analysis.c (estimate_function_body_sizes): Re-add
code that analyzes IVs on each stmt but in a cheaper way avoiding
quadratic behavior.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228710 138bc75d-0d04-0410-961f-82ee72b054a4