Commit Graph

169615 Commits

Author SHA1 Message Date
Jan Hubicka f51b4aed27 tree-inline.c (remap_gimple_stmt): Do not subtitute handled components to clobber of return value.
* tree-inline.c (remap_gimple_stmt): Do not subtitute handled components
	to clobber of return value.
	* g++.dg/lto/pr90990_0.C: New testcase.

From-SVN: r272925
2019-07-02 08:26:16 +00:00
Kyrylo Tkachov 8bb9a5e66a [arm/AArch64] Assume unhandled NEON types are neon_arith_basic types when scheduling for Cortex-A57
Some scheduling descriptions, like the Cortex-A57 one, are reused for multiple -mcpu options.
Sometimes those other -mcpu cores support more architecture features than the Armv8-A Cortex-A57.
For example, the Cortex-A75 and Cortex-A76 support Armv8.2-A as well as the Dot Product instructions.
These Dot Product instructions have the neon_dot and neon_dot_q scheduling type, but that type is not
handled in cortex-a57.md, since the Cortex-A57 itself doesn't need to care about these instructions.

But if we just ignore the neon_dot(_q) type at scheduling we get really terrible codegen when compiling
for -mcpu=cortex-a76, for example, because the scheduler just pools all the UDOT instructions at the end
of the basic block, since it doesn't assume anything about their behaviour.

This patch ameliorates the situation somewhat by telling the Cortex-A57 scheduling model to treat any
insn that doesn't get assigned a cortex_a57_neon_type but is actually a is_neon_type instruction as
a simple neon_arith_basic instruction. This allows us to treat post-Armv8-A SIMD instructions more sanely
without having to model each of them explicitly in cortex-a57.md.

	* config/arm/cortex-a57.md (cortex_a57_neon_type): Use neon_arith_basic
	for is_neon_type instructions that have not already been categorized.

From-SVN: r272924
2019-07-02 08:24:54 +00:00
Jan Hubicka 606a9a8c72 lto-common.c (lto_register_canonical_types_for_odr_types): Copy CXX_ODR_P from the main variant.
* lto-common.c (lto_register_canonical_types_for_odr_types):
	Copy CXX_ODR_P from the main variant.

From-SVN: r272923
2019-07-02 08:23:02 +00:00
Richard Biener 14ec49a753 re PR tree-optimization/58483 (missing optimization opportunity for const std::vector compared to std::array)
2019-07-02  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/58483
	* tree-ssa-scopedtables.c (avail_expr_hash): Use OEP_ADDRESS_OF
	for MEM_REF base hashing.
	(equal_mem_array_ref_p): Likewise for base comparison.

	* gcc.dg/tree-ssa/ssa-dom-cse-8.c: New testcase.

From-SVN: r272922
2019-07-02 07:35:23 +00:00
Janne Blomqvist 6d64cee84b mklog/91048: Open ~/.mklog in string mode.
2019-07-02  Janne Blomqvist  <jb@gcc.gnu.org>

	PR other/91048
	* mklog (read_user_info): Open ~/.mklog in string mode.

From-SVN: r272921
2019-07-02 08:54:31 +03:00
Jim Wilson 758d7478bf Fix libstdc++ install-pdf support.
Generating pdf files requires everything that is required for the xml files
except the style sheets.

	libstdc++-v3/
	* configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
	and xmllint.
	* configure: Regenerate.

From-SVN: r272920
2019-07-01 19:30:52 -07:00
Ian Lance Taylor 9badab5db5 compiler: refactoring in Export class to encapsulate type refs map
Convert the Export::type_refs map from a static object to a field
    contained (indirectly, via an impl class) in Export itself, for better
    encapsulation and to be able to reclaim its memory when exporting is
    done. No change in compiler functionality.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/184170

From-SVN: r272919
2019-07-02 01:39:19 +00:00
GCC Administrator b731572b8a Daily bump.
From-SVN: r272916
2019-07-02 00:16:22 +00:00
Segher Boessenkool a01d6debeb rs6000.md (signbit<mode>2_dm): Make this a parameterized name.
@signbit<mode>2_dm


	* config/rs6000/rs6000.md (signbit<mode>2_dm): Make this a
	parameterized name.
	(signbit<mode>2): Use that name.  Simplify.

From-SVN: r272912
2019-07-01 23:58:47 +02:00
Joern Rennecke 5cc8cb04de re PR tree-optimization/66726 (missed optimization, factor conversion out of COND_EXPR)
PR middle-end/66726
        * tree-ssa-phiopt.c (factor_out_conditional_conversion):
        Tune heuristic from PR71016 to allow MIN / MAX.
        * testsuite/gcc.dg/tree-ssa/pr66726-4.c: New testcase.

From-SVN: r272911
2019-07-01 22:48:55 +01:00
Uros Bizjak 63c94f4cb0 * config/i386/constraints.md: Remove stalled comment w.r.t. Yh constraint.
From-SVN: r272908
2019-07-01 21:04:05 +02:00
Segher Boessenkool 6783210c18 rs6000.md (ieee_128bit_vsx_abs<mode>2): Make this a parameterized name.
@ieee_128bit_vsx_abs<mode>2


	* config/rs6000/rs6000.md (ieee_128bit_vsx_abs<mode>2): Make this a
	parameterized name.
	(abs<mode>2): Use that name.  Simplify.

From-SVN: r272907
2019-07-01 20:47:56 +02:00
Segher Boessenkool 306f66aaaa rs6000.md (ieee_128bit_vsx_neg<mode>2): Make this a parameterized name.
@ieee_128bit_vsx_neg<mode>2


	* config/rs6000/rs6000.md (ieee_128bit_vsx_neg<mode>2): Make this a
	parameterized name.
	(neg<mode>2): Use that name.  Simplify.

From-SVN: r272906
2019-07-01 20:47:05 +02:00
Segher Boessenkool dca369ba28 rs6000.md (abs<mode>2_hw): Make this a parameterized name.
@abs<mode>2_hw


	* config/rs6000/rs6000.md (abs<mode>2_hw): Make this a parameterized
	name.
	(abs<mode>2): Use that name.  Simplify.

From-SVN: r272905
2019-07-01 20:45:36 +02:00
Segher Boessenkool 47434aeb56 rs6000.md (neg<mode>2_hw): Make this a parameterized name.
@neg<mode>2_hw


	* config/rs6000/rs6000.md (neg<mode>2_hw): Make this a parameterized
	name.
	(neg<mode>2): Use that name.  Simplify.

From-SVN: r272904
2019-07-01 20:44:18 +02:00
Segher Boessenkool c5634c4d53 rs6000.md (extenddf<mode>2): Make this a parameterized name.
@extenddf<mode>2


	* config/rs6000/rs6000.md (extenddf<mode>2): Make this a parameterized
	name.
	(floatsi<mode>2): Use that name.  Simplify.

From-SVN: r272903
2019-07-01 20:43:10 +02:00
Uros Bizjak 37d8d439f2 i386.md ("isa" attribute): Add sse_noavx.
* config/i386/i386.md ("isa" attribute): Add sse_noavx.
	("enabled" attribute): Handle sse_noavx isa attribute.
	* config/i386/mmx.md (*vec_dupv2sf): Add "isa" attribute.
	Use TARGET_SSE && SSE_REGNO_P in split condition.
	(*vec_dupv2sf): Ditto.

From-SVN: r272902
2019-07-01 20:41:09 +02:00
Segher Boessenkool a3185de66b rs6000.md (extenddf<mode>2_fprs): Make this a parameterized name.
@extenddf<mode>2_{fprs,vsx}


	* config/rs6000/rs6000.md (extenddf<mode>2_fprs): Make this a
	parameterized name.
	(extenddf<mode>2_vsx): Make this a parameterized name.
	(extenddf<mode>2): Use those names.  Simplify.

From-SVN: r272901
2019-07-01 20:40:40 +02:00
Segher Boessenkool 15f0523424 rs6000.md (eh_set_lr_<mode>): Make this a parameterized name.
@eh_set_lr_<mode>


	* config/rs6000/rs6000.md (eh_set_lr_<mode>): Make this a parameterized
	name.
	(eh_return): Use that name.  Simplify.

From-SVN: r272900
2019-07-01 20:39:52 +02:00
Segher Boessenkool f98342adf9 rs6000.md (ctr<mode>): Make this a parameterized name.
@ctr<mode>


	* config/rs6000/rs6000.md (ctr<mode>): Make this a parameterized name.
	(doloop_end): Use that name.  Simplify.

From-SVN: r272899
2019-07-01 20:39:13 +02:00
Segher Boessenkool d1fcc7f3af rs6000.md (indirect_jump<mode>_nospec): Make this a parameterized name.
@indirect_jump<mode>_nospec


	* config/rs6000/rs6000.md (indirect_jump<mode>_nospec): Make this a
	parameterized name.
	(indirect_jump): Use that name.  Simplify.

From-SVN: r272898
2019-07-01 20:38:21 +02:00
Segher Boessenkool d0e3843ef9 rs6000.md (abs<mode>2_internal): Make this a parameterized name.
@abs<mode>2_internal


	* config/rs6000/rs6000.md (abs<mode>2_internal): Make this a
	parameterized name.
	(abs<mode>2): Use that name.  Simplify.

From-SVN: r272897
2019-07-01 20:37:25 +02:00
Segher Boessenkool da29b9330a rs6000.md (fix_trunc<mode>si2_fprs): Make this a parameterized name.
@fix_trunc<mode>si2_fprs


	* config/rs6000/rs6000.md (fix_trunc<mode>si2_fprs): Make this a
	parameterized name.
	(fix_trunc<mode>si2): Use that name.  Simplify.

From-SVN: r272896
2019-07-01 20:36:34 +02:00
Segher Boessenkool 0254f29ad9 rs6000.md (neg<mode>2): Make this a parameterized name.
@neg<mode>2


	* config/rs6000/rs6000.md (neg<mode>2): Make this a parameterized name.
	(allocate_stack): Use that name.  Simplify.

From-SVN: r272894
2019-07-01 20:35:23 +02:00
Martin Sebor 7b8795a138 PR middle-end/90923 - hash_map destroys elements without constructing them
gcc/ChangeLog:

	PR middle-end/90923
	* hash-map.h (hash_map::put): On insertion invoke element ctor.
	(hash_map::get_or_insert): Same.  Reformat comment.
	* hash-set.h (hash_set::add): On insertion invoke element ctor.
	* hash-map-tests.c (test_map_of_type_with_ctor_and_dtor): New.
 	* hash-set-tests.c (test_map_of_type_with_ctor_and_dtor): New.
	* hash-table.h (hash_table::operator=): Prevent copy assignment.
	 (hash_table::hash_table (const hash_table&)): Use copy ctor
	 instead of assignment to copy elements.

From-SVN: r272893
2019-07-01 12:33:36 -06:00
Wilco Dijkstra 25cd9afbc1 re PR target/90963 (FAIL: gcc.c-torture/execute/built-in-setjmp.c execution test)
PR target/90963
	* config/pa/pa.md (builtin_longjmp): Restore hard_frame_pointer_rtx
	using saved frame pointer.


Co-Authored-By: John David Anglin <danglin@gcc.gnu.org>

From-SVN: r272891
2019-07-01 16:55:42 +00:00
Eric Botcazou 8ad8180392 re PR middle-end/64242 (Longjmp expansion incorrect)
PR middle-end/64242
	* config/sparc/sparc.md (nonlocal_goto): Restore frame pointer last.
	Add frame clobber and schedule blockage.

From-SVN: r272889
2019-07-01 16:26:38 +00:00
Sandra Loosemore 2d526072ef invoke.texi (Link Options): Further editorial changes to -flinker-output docs.
2019-07-01  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* doc/invoke.texi (Link Options): Further editorial changes to
	-flinker-output docs.

From-SVN: r272887
2019-07-01 11:42:49 -04:00
Segher Boessenkool b94eec3bea rs6000: Improve indexed addressing
The function rs6000_force_indexed_or_indirect_mem makes a memory
operand suitable for indexed (or indirect) addressing.  If the memory
address isn't yet valid, it loads the whole thing into a register to
make it valid.  That isn't optimal.  This changes it to load an
address that is the sum of two things into two registers instead.
This results in lower latency code, and if inside loops, a constant
term can be moved outside the loop.


	* config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
	Load both operands of a PLUS into registers separately.

From-SVN: r272886
2019-07-01 17:15:41 +02:00
Andreas Krebbel d5c15d688a Fix changelog entry.
From-SVN: r272885
2019-07-01 14:59:43 +00:00
Andreas Krebbel cbce506fc4 S/390: Fix vector shift count operand
We currently use subst definitions to handle the different variants of shift
count operands. Unfortunately, in the vector shift pattern the shift count
operand is used directly. Without it being adjusted for the 'subst' variants the
displacement value is omitted resulting in a wrong shift count being applied.

This patch needs to be applied to older branches as well.

gcc/ChangeLog:

2019-07-01  Andreas Krebbel  <krebbel@linux.ibm.com>

	* config/s390/vector.md:

gcc/testsuite/ChangeLog:

2019-07-01  Andreas Krebbel  <krebbel@linux.ibm.com>

	* gcc.target/s390/vector/vec-shift-2.c: New test.

From-SVN: r272884
2019-07-01 14:56:41 +00:00
Ed Schonberg d21c7dd6a2 [Ada] Spurious error on inst. of partially defaulted formal package
This patch removes a spurious error on an instantiation whose generic
unit has a formal package where some formal parameters are
box-initialiaed.  Previously the code assumed that box-initialization
for a formal package applied to all its formal parameters.

2019-07-01  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_ch12.adb (Is_Defaulted): New predicate in
	Check_Formal_Package_Intance, to skip the conformance of checks
	on parameters of a formal package that are defaulted,

gcc/testsuite/

	* gnat.dg/generic_inst3.adb,
	gnat.dg/generic_inst3_kafka_lib-topic.ads,
	gnat.dg/generic_inst3_kafka_lib.ads,
	gnat.dg/generic_inst3_markets.ads,
	gnat.dg/generic_inst3_traits-encodables.ads,
	gnat.dg/generic_inst3_traits.ads: New testcase.

From-SVN: r272883
2019-07-01 13:37:47 +00:00
Hristian Kirtchev 6578a6bfec [Ada] Minor reformatting
2019-07-01  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
	sem_prag.adb, sem_spark.adb: Minor reformatting.

From-SVN: r272882
2019-07-01 13:37:42 +00:00
Ed Schonberg 7029d96f5a [Ada] More permissive use of GNAT attribute Enum_Rep
This patch allows the prefix of the attribute Enum_Rep to be an
attribute referece (such as Enum_Type'First). A recent patch had
restricted the prefix to be an object of a discrete type, which is
incompatible with orevious usage.

2019-07-01  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
	of attribute to be an attribute reference of a discrete type.

gcc/testsuite/

	* gnat.dg/enum_rep.adb, gnat.dg/enum_rep.ads: New testcase.

From-SVN: r272881
2019-07-01 13:37:37 +00:00
Eric Botcazou 8b9aa1a98f [Ada] Make No_Inline pragma effective for generic subprograms
2019-07-01  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
	handling of Has_Pragma_Inline_Always and deal with
	Has_Pragma_No_Inline.

From-SVN: r272880
2019-07-01 13:37:31 +00:00
Ed Schonberg f603c9855e [Ada] Spurious error private subtype derivation
This patch fixes a spurious error on a derived type declaration whose
subtype indication is a subtype of a private type whose full view is a
constrained discriminated type.

2019-07-01  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
	declared as a subtype of a private type with an inherited
	discriminant constraint, its generated full base appears as a
	record subtype, so we need to retrieve its oen base type so that
	the inherited constraint can be applied to it.

gcc/testsuite/

	* gnat.dg/derived_type6.adb, gnat.dg/derived_type6.ads: New
	testcase.

From-SVN: r272879
2019-07-01 13:37:26 +00:00
Yannick Moy 497ee82ba3 [Ada] SPARK support for pointers through ownership
SPARK RM 3.10 is the final version of the pointer ownership rules. Start
changing the implementation accordingly. Anonymous access types are not
fully supported yet.

There is no impact on compilation.

2019-07-01  Yannick Moy  <moy@adacore.com>

gcc/ada/

	* sem_spark.adb: Completely rework the algorithm for ownership
	checking, as the rules in SPARK RM have changed a lot.
	* sem_spark.ads: Update comments.

From-SVN: r272878
2019-07-01 13:37:21 +00:00
Dmitriy Anisimkov a2902a6f23 [Ada] GNAT.Sockets: refactor Has_Sockaddr_Len
Use a field offset computation trick to avoid maintaining a list of
platforms.

2019-07-01  Dmitriy Anisimkov  <anisimko@adacore.com>

gcc/ada/

	* gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
	the sockaddr_in structure to determine the existence of length field
	before the sin_family.

From-SVN: r272877
2019-07-01 13:37:16 +00:00
Ed Schonberg d8f8b16648 [Ada] Crash on improper pragma Weak_External
This patch adds a guard on the use of pragma Weak_External. This pragma
affects link-time addresses of entities, and does not apply to types.
Previous to this patch the compiler would abort on a misuse of the
pragma.

2019-07-01  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
	applies to entities with run-time addresses, not to types.

gcc/testsuite/

	* gnat.dg/weak3.adb, gnat.dg/weak3.ads: New testcase.

From-SVN: r272876
2019-07-01 13:37:11 +00:00
Piotr Trojanek 9d8aaa4e00 [Ada] Remove a SPARK rule about implicit Global
A rule about implicit Global contract for functions whose names overload
an abstract state was never implemented (and no user complained about
this). It is now removed, so references to other rules need to be
renumbered.

2019-07-01  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
	references to the SPARK RM after the removal of Rule 7.1.4(5).

From-SVN: r272875
2019-07-01 13:37:06 +00:00
Piotr Trojanek 397348b919 [Ada] Cleanup references to LynuxWorks in docs and comments
Apparently the company behind LynxOS is now called Lynx Software
Technologies (formerly LynuxWorks).

Use the current name in user docs and the previous name in developer
comment (to hopefully reflect the company name at the time when the
patchset mentioned in the comment was released).

2019-07-01  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* sysdep.c: Cleanup references to LynuxWorks in docs and
	comments.

From-SVN: r272874
2019-07-01 13:37:01 +00:00
Ed Schonberg 90fd73bbea [Ada] Wrong code with -gnatVa on lock-free protected objects
This patch fixes the handling of validity checks on protected objects
that use the Lock-Free implementation when validity checks are enabled,
previous to this patch the compiler would report improperly that a
condition in a protected operation was always True (when comoipled with
-gnatwa) and would generate incorrect code fhat operation.

2019-07-01  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* checks.adb (Insert_Valid_Check): Do not apply validity check
	to variable declared within a protected object that uses the
	Lock_Free implementation, to prevent unwarranted constant
	folding, because entities within such an object msut be treated
	as volatile.

gcc/testsuite/

	* gnat.dg/prot7.adb, gnat.dg/prot7.ads: New testcase.

From-SVN: r272873
2019-07-01 13:36:56 +00:00
Richard Biener 69b5279e97 gimple-parser.c (c_parser_gimple_postfix_expression): Handle _Literal (char *) &"foo" for address literals pointing to STRING_CSTs.
2019-07-01  Richard Biener  <rguenther@suse.de>

	c/
	* gimple-parser.c (c_parser_gimple_postfix_expression): Handle
	_Literal (char *) &"foo" for address literals pointing to
	STRING_CSTs.

	* gcc.dg/gimplefe-42.c: New testcase.

From-SVN: r272872
2019-07-01 13:36:05 +00:00
Eric Botcazou 0c9c281da4 [Ada] Make No_Inline pragma effective for protected subprograms
2019-07-01  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.

From-SVN: r272871
2019-07-01 13:36:04 +00:00
Ed Schonberg 97c0b990ca [Ada] Unnesting: improve handling of private and incomplete types
2019-07-01  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
	handling of private and incomplete types whose full view is an
	access type, to detect additional uplevel references in dynamic
	bounds. This is relevant to N_Free_Statement among others that
	manipulate types whose full viww may be an access type.

From-SVN: r272870
2019-07-01 13:35:58 +00:00
Pat Rogers 76fd94165a [Ada] Correct size in representation clauses documentation
2019-07-01  Pat Rogers  <rogers@adacore.com>

gcc/ada/

	* doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
	size indicated for R as a component of an array.
	* gnat_rm.texi: Regenerate.

From-SVN: r272869
2019-07-01 13:35:53 +00:00
Justin Squirek 339ff2f61d [Ada] Incorrect definition of Win32 compatible types
This patch corrects the definition of certain Win32 types.

2019-07-01  Justin Squirek  <squirek@adacore.com>

gcc/ada/

	* libgnat/s-win32.ads: Add definition for ULONG, modify
	OVERLAPPED type, and add appropriate pragmas.

From-SVN: r272868
2019-07-01 13:35:48 +00:00
Bob Duff 647abeaf0e [Ada] gprbuild fails to find ghost ALI files
This patch fixes a bug where if a ghost unit is compiled with
ignored-ghost mode in a library project, then gprbuild will fail to find
the ALI file, because the compiler generates an empty object file, but
no ALI file.

2019-07-01  Bob Duff  <duff@adacore.com>

gcc/ada/

	* gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
	ignored-ghost.

From-SVN: r272867
2019-07-01 13:35:43 +00:00
Yannick Moy 1d0b1439ae [Ada] Improve error message on mult/div between fixed-point and integer
Multiplication and division of a fixed-point type by an integer type is
only defined by default for type Integer. Clarify the error message to
explain that a conversion is needed in other cases.

Also change an error message to start with lowercase as it should be.

2019-07-01  Yannick Moy  <moy@adacore.com>

gcc/ada/

	* sem_ch4.adb (Operator_Check): Refine error message.

From-SVN: r272866
2019-07-01 13:35:38 +00:00
Piotr Trojanek 25feb37fc6 [Ada] Revert "Global => null" on calendar routines that use timezones
Some routines from the Ada.Calendar package, i.e. Year, Month, Day,
Split and Time_Off, rely on OS-specific timezone databases that are kept
in files (e.g. /etc/localtime on Linux). In SPARK we want to model this
as a potential side-effect, so those routines can't have "Global =>
null".

2019-07-01  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* libgnat/a-calend.ads: Revert "Global => null" contracts on
	non-pure routines.

From-SVN: r272865
2019-07-01 13:35:32 +00:00