[PATCH] More memset VN improvements

2018-05-23 Thread Richard Biener
We can handle arbitrary constants by using native_interpret_expr for byte-aligned re-interpretations. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. For the testcase we now reflect on the GIMPLE level what we did on the RTL level before. Richard. >From 25955accffa877695

RE: [RFT PATCH, AVX512]: Implement scalar float->unsigned int truncations with AVX512F

2018-05-23 Thread Peryt, Sebastian
> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Uros Bizjak > Sent: Monday, May 21, 2018 9:55 PM > To: gcc-patches@gcc.gnu.org > Cc: Jakub Jelinek ; Kirill Yukhin > > Subject: Re: [RFT PATCH, AVX512]: Implement scalar float->unsigned int > truncation

Re: [RFC] [aarch64] Add HiSilicon tsv110 CPU support.

2018-05-23 Thread Kyrill Tkachov
On 23/05/18 05:54, Zhangshaokun wrote: Hi Kyrill, On 2018/5/22 18:52, Kyrill Tkachov wrote: Hi Shaokun, On 22/05/18 09:40, Shaokun Zhang wrote: This patch adds HiSilicon's an mcpu: tsv110. --- gcc/ChangeLog| 9 +++ gcc/config/aarch64/aarch64-cores.def |

Re: Replace FMA_EXPR with one internal fn per optab

2018-05-23 Thread Richard Sandiford
"H.J. Lu" writes: > On Thu, May 17, 2018 at 1:56 AM, Richard Sandiford > wrote: >> Richard Biener writes: @@ -2698,23 +2703,26 @@ convert_mult_to_fma_1 (tree mul_result, } >>> if (negate_p) - mulop1 = force_gimple_operand_gsi (&gsi, -

GCC 8 backports

2018-05-23 Thread Martin Liška
Hi. I'm going to backport following 2 revisions. Patches can bootstrap on x86_64-linux-gnu and survive regression tests. Martin >From 3308817aa11be9d43cd564d249dae1c28bf41015 Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 11 May 2018 07:37:35 + Subject: Backport r260154 gcc/ChangeLog: 20

[PATCH] Disable strict-overflow warnings from data-ref code

2018-05-23 Thread Richard Biener
This silences an unhelpful warning about strict-overflow for the samba build. The warning is emitted from tree-data-ref.c:create_intersect_range_checks and ends up in the default input_location which is just the function scope. Bootstrapped and tested on x86_64-unknown-linux-gnu, will apply to t

Re: [PATCH] Fix PR85834

2018-05-23 Thread Eric Botcazou
> I'm not quite sure that ao_ref with offset % 8 == 0 but size != maxsize > has any guarantee that all accesses that this covers are aligned to 8 > bits but I failed to create a testcase with a variable bit-alignment. > But I'm quite sure Ada can do that, right? There may be existing code > that a

Re: [PATCH] Fix PR85834

2018-05-23 Thread Richard Biener
On Wed, 23 May 2018, Eric Botcazou wrote: > > I'm not quite sure that ao_ref with offset % 8 == 0 but size != maxsize > > has any guarantee that all accesses that this covers are aligned to 8 > > bits but I failed to create a testcase with a variable bit-alignment. > > But I'm quite sure Ada can d

Re: PING^2: [PATCH] Don't mark IFUNC resolver as only called directly

2018-05-23 Thread Jan Hubicka
> On Tue, May 22, 2018 at 9:21 AM, Jan Hubicka wrote: > >> > > class ipa_opt_pass_d; > >> > > typedef ipa_opt_pass_d *ipa_opt_pass; > >> > > @@ -2894,7 +2896,8 @@ > >> > > cgraph_node::only_called_directly_or_aliased_p (void) > >> > > && !DECL_STATIC_CONSTRUCTOR (d

Re: [RFC] [aarch64] Add HiSilicon tsv110 CPU support.

2018-05-23 Thread Zhangshaokun
Hi Kyrill, On 2018/5/23 16:08, Kyrill Tkachov wrote: > > On 23/05/18 05:54, Zhangshaokun wrote: >> Hi Kyrill, >> >> On 2018/5/22 18:52, Kyrill Tkachov wrote: >>> Hi Shaokun, >>> >>> On 22/05/18 09:40, Shaokun Zhang wrote: This patch adds HiSilicon's an mcpu: tsv110. --- gcc/

Re: [Libgomp, Fortran] Fix canadian cross build

2018-05-23 Thread Maxim Kuvyrkov
> On Jun 23, 2017, at 4:44 PM, Yvan Roux wrote: > > Hello, > > Fortran parts of libgomp (omp_lib.mod, openacc.mod, etc...) are > missing in a canadian cross build, at least when target gfortran > compiler comes from PATH and not from GFORTRAN_FOR_TARGET. > > Back in 2010, executability test of

Re: [PATCH] testsuite: Introduce be/le selectors

2018-05-23 Thread Richard Earnshaw (lists)
On 22/05/18 22:21, Jeff Law wrote: > On 05/21/2018 03:46 PM, Segher Boessenkool wrote: >> This patch creates "be" and "le" selectors, which can be used by all >> architectures, similar to ilp32 and lp64. >> >> Is this okay for trunk? >> >> >> Segher >> >> >> 2017-05-21 Segher Boessenkool >> >> g

Re: [PATCH] Fix PR85712 (SLSR cleanup of alternative interpretations)

2018-05-23 Thread Richard Biener
On Tue, May 22, 2018 at 11:37 PM Bill Schmidt wrote: > Hi, > PR85712 shows where an existing test case fails in the SLSR pass because > the code is flawed that cleans up alternative interpretations (CAND_ADD > versus CAND_MULT, for example) after a replacement. This patch fixes the > flaw by en

RE: [RFT PATCH, AVX512]: Implement scalar unsigned int->float conversions with AVX512F

2018-05-23 Thread Peryt, Sebastian
> From: Uros Bizjak [mailto:ubiz...@gmail.com] > Sent: Tuesday, May 22, 2018 8:43 PM > To: gcc-patches@gcc.gnu.org > Cc: Peryt, Sebastian ; Jakub Jelinek > > Subject: [RFT PATCH, AVX512]: Implement scalar unsigned int->float conversions > with AVX512F > > Hello! > > Attached patch implements sca

Re: [PATCH] PR target/85358: Add target hook to prevent default widening

2018-05-23 Thread Richard Biener
On Tue, 22 May 2018, Michael Meissner wrote: > I posted this patch at the end of GCC 8 as a RFC. Now that we are in GCC 9, I > would like to repose it. Sorry to spam some of you. It is unclear whom the > reviewers for things like target hooks and basic mode handling are. > > Here is the origin

Re: Fix SLP def type when computing masks (PR85853)

2018-05-23 Thread Richard Biener
On Wed, May 23, 2018 at 8:41 AM Richard Sandiford < richard.sandif...@linaro.org> wrote: > In this PR, SLP failed to include a comparison node in the SLP > tree and so marked the node as external. It then went on to call > vect_is_simple_use on the comparison with its STMT_VINFO_DEF_TYPE > still

[PATCH, AVX512]: Fix cvtusi264 insn mnemonic

2018-05-23 Thread Uros Bizjak
Hello! With current insn mnemonic and ATT assembler dialect, there is no way for the assembler to distinguish between DImode and SImode instruction when memory input operand is used. The dump for 32bit memory reads as: 0: 62 f1 7e 08 7b 05 00vcvtusi2ss 0x0(%rip),%xmm0,%xmm0 7: 00 00

Re: [PATCH PR85804]Fix wrong code by correcting bump step computation in vector(1) load of single-element group access

2018-05-23 Thread Richard Biener
On Tue, May 22, 2018 at 2:11 PM Richard Sandiford < richard.sandif...@linaro.org> wrote: > Richard Biener writes: > > On Mon, May 21, 2018 at 3:14 PM Bin Cheng wrote: > > > >> Hi, > >> As reported in PR85804, bump step is wrongly computed for vector(1) load > > of > >> single-element group acces

[Ada] Initialize_Scalars optimization causes spurious runtime check failure

2018-05-23 Thread Pierre-Marie de Rodat
This patch suppresses the optimization of scalar arrays when pragma Initialize_Scalars is in effect if the component type is subject to predicates. Since the scalar array is initialized with invalid values, these values may violate the predicate or a validity check within the predicate. --

[Ada] Suppression of elaboration-related warnings

2018-05-23 Thread Pierre-Marie de Rodat
This patch modifies the effects of pragma Warnings (Off, ...) to suppress elaboration warnings related to an entity. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-23 Hristian Kirtchev gcc/ada/ * einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration

[Ada] Compiler fails to reject illegal store of anonymous_access_to_subprogram

2018-05-23 Thread Pierre-Marie de Rodat
GNAT properly rejects an attempt to assign an access_to_subprogram formal to a local variable, according to accessibiiity rules. This patch forces the same behavior on the use of such a formal in an object declaration. Compiling store_anon.adb must yield: store_anon.adb:7:35: illegal attempt to

[Ada] Crash on predicate involving qualified expression in instance

2018-05-23 Thread Pierre-Marie de Rodat
This patch inhibits the generation of freeze nodes when pre-analyzing the domain of iteration of an Ada2012 loop that appears as a quantified expression in a predicate for an array type. This prevents a back-end abort on an invisible freeze node that would otherwise appear in an unexpanded code seq

[Ada] Suppression of elaboration-related warnings

2018-05-23 Thread Pierre-Marie de Rodat
This patch updates the documentation section on suppressing elaboration warnings. No change in behavior, no need for a test. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-23 Hristian Kirtchev gcc/ada/ * sem_elab.adb: Update the section on suppressing elaboration warnings.

[Ada] Suppression of elaboration-related warnings

2018-05-23 Thread Pierre-Marie de Rodat
This patch changes the behavior of elaboration-related warnings as follows: * If a scenario or a target has [elaboration] warnings suppressed, then any further elaboration-related warnings along the paths rooted at the scenario are also suppressed. * Elaboration-related warnings r

[Ada] Build-in-place aggregates and Address clauses

2018-05-23 Thread Pierre-Marie de Rodat
This patch fixes a bug in which if a limited volatile variable with an Address aspect is initialized with a build-in-place aggregate containing build-in-place function calls, the compiler can crash. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-23 Bob Duff gcc/ada/ * free

[Ada] Suspension and elaboration warnings/checks

2018-05-23 Thread Pierre-Marie de Rodat
This patch modifies the static elaboration model to stop the inspection of a task body when it contains a synchronous suspension call and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s is in effect. -- Source -- -- suspension.ads package Suspension i

[Ada] Fix of some permission rules of pointers in SPARK

2018-05-23 Thread Pierre-Marie de Rodat
This commit fixes bugs in the code that implements the rules for safe pointers in SPARK. This only affects SPARK tools, not compilation. * Global variables should be handled differently compared to parameters. The whole tree of an in global variable has the permission Read-Only. In contr

[Ada] Fix implementation of utility for finding enclosing declaration

2018-05-23 Thread Pierre-Marie de Rodat
This utility is used in GNATprove to find when a node is inside a named number declaration, and this case was not properly handled. Now fixed. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-23 Yannick Moy gcc/ada/ * sem_util.adb (Enclosin

[Ada] Missing legality check on iterator over formal container

2018-05-23 Thread Pierre-Marie de Rodat
This patch adds a check on an iterator over a GNAT-specific formal container, when the iterator specification includes a subtype indication that must be compatible with the element type of the container. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-23 Ed Schonberg gcc/ada/

[Ada] Add a Is_Foreign_Exception predicate to GNAT.Exception_Actions

2018-05-23 Thread Pierre-Marie de Rodat
Useful to check if an occurrence caught by a "when others" choice originates from a foreign language, e.g. C++. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-23 Olivier Hainque gcc/ada/ * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate. * libgnat/g-exca

[Ada] Clarify meaning of local pragma Warnings Off without On

2018-05-23 Thread Pierre-Marie de Rodat
A local use of pragma Warnings Off to suppress specific messages, when not followed by a matching pragma Warnings On, extends until the end of the file. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-23 Yannick Moy gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst:

[Ada] Implementation of AI12-0131: legality of class-wide precondition

2018-05-23 Thread Pierre-Marie de Rodat
This patch refines the legality check on a class-wide precondition on a type extension when ancestor does not have a class-wide precondition. Previously the compiler accepted such a precondition when the ancestor had a class-wide postcondition. Compiling pck.ads must yield: pck.ads:7:04: illega

[Ada] gnatbind: do not list No_Implementation_Restrictions

2018-05-23 Thread Pierre-Marie de Rodat
When the gnatbind -r switch is used, do not list No_Implementation_Restrictions, because after using the new restriction list, No_Implementation_Restrictions will cause an error. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-23 Bob Duff gcc/ada/ * gnatbind.adb (List_Appli

[Ada] Vectors: spurious error in -gnatwE mode

2018-05-23 Thread Pierre-Marie de Rodat
This patch fixes a bug in which if Ada.Containers.Vectors is instantiated with an Index_Type such that Index_Type'Base'Last is less than Count_Type'Last, and the -gnatwE switch is used, the compiler gives spurious error messages. The following test should compile quietly with -gnatwE: gnatmake sh

[Ada] Crash processing Valid_Scalars whose evaluation is always true

2018-05-23 Thread Pierre-Marie de Rodat
The compiler blows up generating code associated with occurrences of attribute Valid_Scalars whose evaluation is always true. After this patch the following test compiles fine. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-23 Javier Miranda gcc/ada/ * sem_attr.adb (Valid_

[Ada] Spurious Storage_Error on imported array

2018-05-23 Thread Pierre-Marie de Rodat
This patch moves the check which verifies that a large modular array is created from expansion to freezing in order to take interfacing pragmas in account. The check is no longer performed on imported objects because no object is created in that case. Tested on x86_64-pc-linux-gnu, committed on tr

[Ada] Spurious error on instantiation with type with unknown discriminants

2018-05-23 Thread Pierre-Marie de Rodat
This patch fixes a spurious error when instantiating an indefinite container with a private type with unknown discriminants, when its full view is an unconstrained array type. It also cleans up the inheritance of dynamic predicates inherited by anonymous subtypes of array types. Tested on x86_64-p

[Ada] Fix computation of handle/pid lists in win32_wait

2018-05-23 Thread Pierre-Marie de Rodat
An obvious mistake due to missing parentheses was not properly computing the size of the handle and pid list passed to WaitForMultipleObjects(). This resulted in a memory corruption. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-23 Pascal Obry gcc/ada/ * adaint.c (win32_w

Re: [RFC] [aarch64] Add HiSilicon tsv110 CPU support

2018-05-23 Thread Ramana Radhakrishnan
On 23/05/2018 03:50, Zhangshaokun wrote: Hi Ramana, On 2018/5/22 18:28, Ramana Radhakrishnan wrote: On Tue, May 22, 2018 at 9:40 AM, Shaokun Zhang wrote: tsv110 is designed by HiSilicon and supports v8_4A, it also optimizes L1 Icache which can access L1 Dcache. Therefore, DC CVAU is not nec

Re: [PATCH PR85804]Fix wrong code by correcting bump step computation in vector(1) load of single-element group access

2018-05-23 Thread Bin.Cheng
On Wed, May 23, 2018 at 11:19 AM, Richard Biener wrote: > On Tue, May 22, 2018 at 2:11 PM Richard Sandiford < > richard.sandif...@linaro.org> wrote: > >> Richard Biener writes: >> > On Mon, May 21, 2018 at 3:14 PM Bin Cheng wrote: >> > >> >> Hi, >> >> As reported in PR85804, bump step is wrongly

Re: [PATCH PR85804]Fix wrong code by correcting bump step computation in vector(1) load of single-element group access

2018-05-23 Thread Richard Sandiford
"Bin.Cheng" writes: > On Wed, May 23, 2018 at 11:19 AM, Richard Biener > wrote: >> On Tue, May 22, 2018 at 2:11 PM Richard Sandiford < >> richard.sandif...@linaro.org> wrote: >> >>> Richard Biener writes: >>> > On Mon, May 21, 2018 at 3:14 PM Bin Cheng wrote: >>> > >>> >> Hi, >>> >> As reported

Re: [PATCH][RFC] Add dynamic edge/bb flag allocation

2018-05-23 Thread Richard Biener
On Tue, 22 May 2018, Richard Biener wrote: > On May 22, 2018 6:53:57 PM GMT+02:00, Joseph Myers > wrote: > >On Tue, 22 May 2018, Richard Biener wrote: > > > >> + if (*sptr & (1 << (CHAR_BIT * sizeof (T) - 1))) > >> + gcc_unreachable (); > >> + m_flag = 1 << ((CHAR_BIT * sizeof (T)) -

Re: Add a class to represent a gimple match result

2018-05-23 Thread Richard Biener
On Tue, May 22, 2018 at 9:25 AM Richard Sandiford < richard.sandif...@linaro.org> wrote: > Gimple match results are represented by a code_helper for the operation, > a tree for the type, and an array of three trees for the operands. > This patch wraps them up in a class so that they don't need to

Re: [PATCH PR85804]Fix wrong code by correcting bump step computation in vector(1) load of single-element group access

2018-05-23 Thread Bin.Cheng
On Wed, May 23, 2018 at 12:01 PM, Richard Sandiford wrote: > "Bin.Cheng" writes: >> On Wed, May 23, 2018 at 11:19 AM, Richard Biener >> wrote: >>> On Tue, May 22, 2018 at 2:11 PM Richard Sandiford < >>> richard.sandif...@linaro.org> wrote: >>> Richard Biener writes: > On Mon, May 21,

Re: [PATCH PR85804]Fix wrong code by correcting bump step computation in vector(1) load of single-element group access

2018-05-23 Thread Richard Biener
On Wed, May 23, 2018 at 1:02 PM Richard Sandiford < richard.sandif...@linaro.org> wrote: > "Bin.Cheng" writes: > > On Wed, May 23, 2018 at 11:19 AM, Richard Biener > > wrote: > >> On Tue, May 22, 2018 at 2:11 PM Richard Sandiford < > >> richard.sandif...@linaro.org> wrote: > >> > >>> Richard Bie

Re: [PATCH PR85804]Fix wrong code by correcting bump step computation in vector(1) load of single-element group access

2018-05-23 Thread Richard Biener
On Wed, May 23, 2018 at 1:10 PM Bin.Cheng wrote: > On Wed, May 23, 2018 at 12:01 PM, Richard Sandiford > wrote: > > "Bin.Cheng" writes: > >> On Wed, May 23, 2018 at 11:19 AM, Richard Biener > >> wrote: > >>> On Tue, May 22, 2018 at 2:11 PM Richard Sandiford < > >>> richard.sandif...@linaro.org

Re: [PATCH] PR libgcc/60790: Avoid IFUNC resolver access to uninitialized data

2018-05-23 Thread Florian Weimer
On 05/23/2018 12:48 AM, Jeff Law wrote: OK. Thanks. I will let it sit in trunk for a while and then consider backporting it to release branches. Do you have write access to the GCC repository? If not I can commit for you. I have write access. I take this as a hint to contribute more r

Re: [PATCH][AArch64] Fix aarch64_ira_change_pseudo_allocno_class

2018-05-23 Thread Wilco Dijkstra
Richard Sandiford wrote: > -  if (allocno_class != ALL_REGS) > +  if (allocno_class != POINTER_AND_FP_REGS) >  return allocno_class; >  > -  if (best_class != ALL_REGS) > +  if (best_class != POINTER_AND_FP_REGS) >  return best_class; >  >    mode = PSEUDO_REGNO_MODE (regno); > I think

Re: [PATCH PR85720/partial]Support runtime loop versioning if loop can be distributed into builtin functions

2018-05-23 Thread Richard Biener
On Tue, May 22, 2018 at 6:38 PM Bin Cheng wrote: > Hi, > This patch partially improves loop distribution for PR85720. It now supports runtime > loop versioning if the loop can be distributed into builtin functions. Note for this > moment only coarse-grain runtime alias is checked, while differen

Re: [PATCH][AARCH64][PR target/84882] Add mno-strict-align

2018-05-23 Thread Sudakshina Das
Hi Richard On 18/05/18 15:48, Richard Earnshaw (lists) wrote: On 27/03/18 13:58, Sudakshina Das wrote: Hi This patch adds the no variant to -mstrict-align and the corresponding function attribute. To enable the function attribute, I have modified aarch64_can_inline_p () to allow checks even wh

Re: [PATCH][AArch64] Fix aarch64_ira_change_pseudo_allocno_class

2018-05-23 Thread Richard Sandiford
Wilco Dijkstra writes: > Richard Sandiford wrote: >> -  if (allocno_class != ALL_REGS) >> +  if (allocno_class != POINTER_AND_FP_REGS) >>  return allocno_class; >>  >> -  if (best_class != ALL_REGS) >> +  if (best_class != POINTER_AND_FP_REGS) >>  return best_class; >>  >>    mode = PSEU

Re: [PATCH PR85804]Fix wrong code by correcting bump step computation in vector(1) load of single-element group access

2018-05-23 Thread Bin.Cheng
On Wed, May 23, 2018 at 12:12 PM, Richard Biener wrote: > On Wed, May 23, 2018 at 1:10 PM Bin.Cheng wrote: > >> On Wed, May 23, 2018 at 12:01 PM, Richard Sandiford >> wrote: >> > "Bin.Cheng" writes: >> >> On Wed, May 23, 2018 at 11:19 AM, Richard Biener >> >> wrote: >> >>> On Tue, May 22, 2018

Re: [PATCH][RFC] Add dynamic edge/bb flag allocation

2018-05-23 Thread Michael Matz
Hi, On Wed, 23 May 2018, Richard Biener wrote: > > I messed up the conversion to a template. The bitnum should be > > subtracted from HOST_BITS_PER_WIDE_INT and yes, 1 in unsigned hwi > > should be shifted. Maybe you should convert the thing to a template when the need arises instead of befor

Re: [PATCH][RFC] Add dynamic edge/bb flag allocation

2018-05-23 Thread Eric Botcazou
> Maybe you should convert the thing to a template when the need arises > instead of before? You have now added 54 lines of code for wrapping an > int! Yeah, it took me 5 minutes to understand what all this fluff is about! -- Eric Botcazou

Re: [PATCH] Fix PR85712 (SLSR cleanup of alternative interpretations)

2018-05-23 Thread Bill Schmidt
On May 23, 2018, at 4:32 AM, Richard Biener wrote: > > On Tue, May 22, 2018 at 11:37 PM Bill Schmidt > wrote: > >> Hi, > >> PR85712 shows where an existing test case fails in the SLSR pass because >> the code is flawed that cleans up alternative interpretations (CAND_ADD >> versus CAND_MULT, f

Re: [PATCH][RFC] Add dynamic edge/bb flag allocation

2018-05-23 Thread Michael Matz
Hi, On Wed, 23 May 2018, Eric Botcazou wrote: > > Maybe you should convert the thing to a template when the need arises > > instead of before? You have now added 54 lines of code for wrapping an > > int! > > Yeah, it took me 5 minutes to understand what all this fluff is about! So, what I thin

C++ PATCH for c++/85847, ICE with template_id_expr in new()

2018-05-23 Thread Marek Polacek
The diagnostic code in build_new{,_1} was using maybe_constant_value to fold the array length, but that breaks while parsing a template, because we might then leak template codes to the constexpr machinery. Bootstrapped/regtested on x86_64-linux, ok for trunk/8? 2018-05-23 Marek Polacek

Re: [PATCH][RFC] Add dynamic edge/bb flag allocation

2018-05-23 Thread Richard Biener
On Wed, 23 May 2018, Michael Matz wrote: > Hi, > > On Wed, 23 May 2018, Eric Botcazou wrote: > > > > Maybe you should convert the thing to a template when the need arises > > > instead of before? You have now added 54 lines of code for wrapping an > > > int! > > > > Yeah, it took me 5 minutes

[PATCH] Remove memset VN restriction

2018-05-23 Thread Richard Biener
After Eric reminded me how things go with the middle-end and bit-offsets the following adjusts VN accordingly. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-05-23 Richard Biener * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction of f

Re: [PATCH][RFC] Add dynamic edge/bb flag allocation

2018-05-23 Thread Michael Matz
Hi, On Wed, 23 May 2018, Richard Biener wrote: > > alloc_flags (&cfun->cfg->bb_flag_pool); > > alloc_flags (&cfun->cfg->edge_flag_pool); > > You'll end up with sth like > >alloc_flags flag (BB_FLAG_POOL_FOR_FN (cfun)); > > then, mixing C++ RAII and macros! (eh) First: I don't see

[PATCH][1/n] Dissect vectorizer GROUP_* info

2018-05-23 Thread Richard Biener
This patch splits GROUP_* into DR_GROUP_* and REDUC_GROUP_* as a step towards sharing dataref and dependence analysis between vectorization analysis of different vector sizes (and then comparing costs and choosing the best one). The next patch will move the DR_GROUP_* fields to the DR_AUX vectori

Re: C++ PATCH to implement P0614R1, Range-based for statements with initializer (take 2)

2018-05-23 Thread Marek Polacek
On Tue, May 22, 2018 at 09:46:10PM -0400, Jason Merrill wrote: > On Tue, May 22, 2018 at 7:25 PM, Marek Polacek wrote: > > On Mon, May 21, 2018 at 09:51:44PM -0400, Jason Merrill wrote: > >> On Mon, May 21, 2018 at 7:34 PM, Marek Polacek wrote: > >> > The previous version of this patch got confus

[gomp5] Implement omp_[sg]et_affinity_format, omp_{capture,display}_affinity, OMP_DISPLAY_AFFINITY and OMP_AFFINITY_FORMAT

2018-05-23 Thread Jakub Jelinek
Hi! The following patch implements functions and env vars to query and display affinity related information. Tested on x86_64-linux, committed to gomp-5.0 branch. 2018-05-23 Jakub Jelinek * configure.ac (HAVE_UNAME, HAVE_GETHOSTNAME, HAVE_GETPID): Add new tests. * con

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-23 Thread Jeff Law
On 05/10/2018 04:05 PM, Marc Glisse wrote: > On Thu, 10 May 2018, Martin Sebor wrote: > >> Can you please comment/respond to Jeff's question below and >> confirm whether my understanding of the restriction (below) >> is correct? > > I don't remember it at all, I really should have expanded that c

Re: PING^2: [PATCH] Don't mark IFUNC resolver as only called directly

2018-05-23 Thread H.J. Lu
On Wed, May 23, 2018 at 2:01 AM, Jan Hubicka wrote: >> On Tue, May 22, 2018 at 9:21 AM, Jan Hubicka wrote: >> >> > > class ipa_opt_pass_d; >> >> > > typedef ipa_opt_pass_d *ipa_opt_pass; >> >> > > @@ -2894,7 +2896,8 @@ >> >> > > cgraph_node::only_called_directly_or_aliased_p (v

Re: PING^2: [PATCH] Don't mark IFUNC resolver as only called directly

2018-05-23 Thread Jan Hubicka
> On Wed, May 23, 2018 at 2:01 AM, Jan Hubicka wrote: > >> On Tue, May 22, 2018 at 9:21 AM, Jan Hubicka wrote: > >> >> > > class ipa_opt_pass_d; > >> >> > > typedef ipa_opt_pass_d *ipa_opt_pass; > >> >> > > @@ -2894,7 +2896,8 @@ > >> >> > > cgraph_node::only_called_directly_or_

Re: [RFT PATCH, AVX512]: Implement scalar float->unsigned int truncations with AVX512F

2018-05-23 Thread Uros Bizjak
On Wed, May 23, 2018 at 9:55 AM, Peryt, Sebastian wrote: >> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- >> ow...@gcc.gnu.org] On Behalf Of Uros Bizjak >> Sent: Monday, May 21, 2018 9:55 PM >> To: gcc-patches@gcc.gnu.org >> Cc: Jakub Jelinek ; Kirill Yukhin >> >> Subject: Re: [RFT PAT

Re: [RFT PATCH, AVX512]: Implement scalar unsigned int->float conversions with AVX512F

2018-05-23 Thread Uros Bizjak
On Wed, May 23, 2018 at 11:39 AM, Peryt, Sebastian wrote: >> From: Uros Bizjak [mailto:ubiz...@gmail.com] >> Sent: Tuesday, May 22, 2018 8:43 PM >> To: gcc-patches@gcc.gnu.org >> Cc: Peryt, Sebastian ; Jakub Jelinek >> >> Subject: [RFT PATCH, AVX512]: Implement scalar unsigned int->float >> conv

Re: [PATCH] [AArch64, Falkor] Falkor address costs tuning

2018-05-23 Thread James Greenhalgh
On Tue, May 22, 2018 at 12:04:38PM -0500, Luis Machado wrote: > Switch from using generic address costs to using Falkor-specific ones, which > give Falkor better results overall. > > OK for trunk? > > Given this is a Falkor-specific adjustment, would this be an acceptable > backport for GCC 8 as

Re: [PATCH][arm][2/2] Remove support for -march=armv3 and older

2018-05-23 Thread Kyrill Tkachov
On 21/05/18 12:29, Kyrill Tkachov wrote: On 18/05/18 11:33, Richard Earnshaw (lists) wrote: On 17/05/18 11:26, Kyrill Tkachov wrote: Hi all, We deprecated architecture versions earlier than Armv4T in GCC 6 [1]. This patch removes support for architectures lower than Armv4. That is the -march

Re: Incremental LTO linking part 8: testsuite compensation

2018-05-23 Thread Jeff Law
On 05/08/2018 09:37 AM, Jan Hubicka wrote: > > Hi, > most testcases are written with assumption that -r will trigger code > generation. > To make them still meaningful they need nolto-rel. Bootstrapped/regtested > x86_64-linux > with the rest of incremental link changes. > > Honza > > 2018-05

Re: Incremental LTO linking part 6: dwarf2out support

2018-05-23 Thread Jeff Law
On 05/08/2018 09:31 AM, Jan Hubicka wrote: > Hi, > this patch tells dwarf2out that it can have early debug not only in WPA mode > but also when incrementally linking. This prevents ICE on almost every > testcase > compiled with -g. > > Bootstrapped/regtested x86_64-linux with rest of incremental

Re: [PATCH][1/n] Dissect vectorizer GROUP_* info

2018-05-23 Thread Richard Sandiford
Richard Biener writes: > This patch splits GROUP_* into DR_GROUP_* and REDUC_GROUP_* as a step > towards sharing dataref and dependence analysis between vectorization > analysis of different vector sizes (and then comparing costs and choosing > the best one). > > The next patch will move the DR_GR

[PATCH , rs6000] Add builtin tests for vec_madds, vec_extract_fp32_from_shortl and vec_extract_fp32_from_shorth, vec_xst_be

2018-05-23 Thread Carl Love
GCC maintainers: The following patch adds additional tests for the vec_madds, vec_extract_fp32_from_shortl and vec_extract_fp32_from_shorth, vec_xst_be builtin functions. The patch was retested on: powerpc64le-unknown-linux-gnu (Power 8 LE)    powerpc64le-unknown-linux-gnu (Power 9 LE)  

Re: PING^2: [PATCH] Don't mark IFUNC resolver as only called directly

2018-05-23 Thread H.J. Lu
On Wed, May 23, 2018 at 8:11 AM, Jan Hubicka wrote: >> On Wed, May 23, 2018 at 2:01 AM, Jan Hubicka wrote: >> >> On Tue, May 22, 2018 at 9:21 AM, Jan Hubicka wrote: >> >> >> > > class ipa_opt_pass_d; >> >> >> > > typedef ipa_opt_pass_d *ipa_opt_pass; >> >> >> > > @@ -2894,7 +2896,8

Re: Incremental LTO linking part 6: dwarf2out support

2018-05-23 Thread Jan Hubicka
> On 05/08/2018 09:31 AM, Jan Hubicka wrote: > > Hi, > > this patch tells dwarf2out that it can have early debug not only in WPA mode > > but also when incrementally linking. This prevents ICE on almost every > > testcase > > compiled with -g. > > > > Bootstrapped/regtested x86_64-linux with rest

Re: Incremental LTO linking part 6: dwarf2out support

2018-05-23 Thread Jeff Law
On 05/23/2018 09:54 AM, Jan Hubicka wrote: >> On 05/08/2018 09:31 AM, Jan Hubicka wrote: >>> Hi, >>> this patch tells dwarf2out that it can have early debug not only in WPA mode >>> but also when incrementally linking. This prevents ICE on almost every >>> testcase >>> compiled with -g. >>> >>> Bo

[PATCH] Fix handling of an empty filename at end of a path

2018-05-23 Thread Jonathan Wakely
The C++17 std::filesystem::path grammar allows an empty filename as the last component (to signify a trailing slash). The existing code does not handle this consistently, sometimes an empty filename has type _Multi and sometimes it has type _Filename. This can result in a non-empty iterator range

Re: C++ PATCH to implement P0614R1, Range-based for statements with initializer (take 2)

2018-05-23 Thread Jason Merrill
OK. On Wed, May 23, 2018 at 10:45 AM, Marek Polacek wrote: > On Tue, May 22, 2018 at 09:46:10PM -0400, Jason Merrill wrote: >> On Tue, May 22, 2018 at 7:25 PM, Marek Polacek wrote: >> > On Mon, May 21, 2018 at 09:51:44PM -0400, Jason Merrill wrote: >> >> On Mon, May 21, 2018 at 7:34 PM, Marek Po

[wwwdocs] Buildstat update for 8.x

2018-05-23 Thread Tom G. Christensen
Latest results for 8.x -tgc Testresults for 8.1.0: i386-pc-solaris2.10 i386-pc-solaris2.11 sparc-sun-solaris2.10 sparc-sun-solaris2.11 x86_64-apple-darwin11.4.2 x86_64-pc-linux-gnu (3) x86_64-w64-mingw32 --- /home/tgc/projects/gcc/wwwdocs/htdocs/gcc-8/buildstat.html 2018-04-25 10

Re: C++ PATCH for c++/85847, ICE with template_id_expr in new()

2018-05-23 Thread Jason Merrill
On Wed, May 23, 2018 at 9:46 AM, Marek Polacek wrote: > The diagnostic code in build_new{,_1} was using maybe_constant_value to fold > the array length, but that breaks while parsing a template, because we might > then leak template codes to the constexpr machinery. > > Bootstrapped/regtested on x

Re: C++ PATCH to implement P0614R1, Range-based for statements with initializer (take 2)

2018-05-23 Thread Jakub Jelinek
On Wed, May 23, 2018 at 10:45:43AM -0400, Marek Polacek wrote: > 2018-05-23 Marek Polacek > > Implement P0614R1, Range-based for statements with initializer. > * parser.c (cp_parser_range_based_for_with_init_p): New. > (cp_parser_init_statement): Use it. Parse the optional in

Re: [PATCH][1/n] Dissect vectorizer GROUP_* info

2018-05-23 Thread Richard Biener
On May 23, 2018 5:29:46 PM GMT+02:00, Richard Sandiford wrote: >Richard Biener writes: >> This patch splits GROUP_* into DR_GROUP_* and REDUC_GROUP_* as a step >> towards sharing dataref and dependence analysis between vectorization >> analysis of different vector sizes (and then comparing costs

[PATCH][PR sanitizer/84250] Avoid global symbols collision when using both ASan and UBSan

2018-05-23 Thread Maxim Ostapenko
Hi, as described in PR, when using both ASan and UBSan (-fsanitize=address,undefined ), we have symbols collision for global functions, like __sanitizer_set_report_path. This leads to fuzzy results when printing reports into files e.g. for this test case: #include int main(int argc, char **a

C++ PATCHes to xvalue handling

2018-05-23 Thread Jason Merrill
The first patch implements the adjustments from core issues 616 and 1213 to the value category of subobjects of class prvalues: they were considered prvalues themselves, but that was kind of nonsensical. Now they are considered xvalues. Along with this, I've removed the diagnostic distinction bet

Re: libcpp PATCH to avoid deprecated copy assignment

2018-05-23 Thread Jason Merrill
On Wed, May 23, 2018 at 1:33 AM, Gerald Pfeifer wrote: > On Mon, 21 May 2018, Jason Merrill wrote: >>> broke bootstrap on systems using libc++ instead of libstdc++ > >>> In file included from /usr/include/c++/v1/new:91: >>> /usr/include/c++/v1/exception:180:5: error: no member named 'fancy_abo

Re: [PATCH] testsuite: Introduce be/le selectors

2018-05-23 Thread Segher Boessenkool
On Tue, May 22, 2018 at 03:21:30PM -0600, Jeff Law wrote: > On 05/21/2018 03:46 PM, Segher Boessenkool wrote: > > This patch creates "be" and "le" selectors, which can be used by all > > architectures, similar to ilp32 and lp64. > > I think this is fine. "be" "le" are used all over the place in gc

Re: [PATCH] PR target/85358: Add target hook to prevent default widening

2018-05-23 Thread Michael Meissner
On Wed, May 23, 2018 at 11:41:49AM +0200, Richard Biener wrote: > Just a question for clarification - _is_ KFmode strictly a wider mode > than IFmode? That is, can it represent all values that IFmode can? No. IFmode consists of a pair of doubles. I'm sure there are corner cases IFmode can repre

Re: [PATCH , rs6000] Add missing builtin test cases, fix arguments to match specifications.

2018-05-23 Thread Segher Boessenkool
Hi Carl, I committed the be/le selectors. On Mon, May 21, 2018 at 08:15:30AM -0700, Carl Love wrote: > --- a/gcc/testsuite/gcc.target/powerpc/builtins-1-be.c > +++ b/gcc/testsuite/gcc.target/powerpc/builtins-1-be.c > @@ -1,4 +1,4 @@ > -/* { dg-do compile { target { powerpc64-*-* } } } */ > +/* {

Re: [PATCH] PR target/85358: Add target hook to prevent default widening

2018-05-23 Thread Richard Biener
On May 23, 2018 7:53:01 PM GMT+02:00, Michael Meissner wrote: >On Wed, May 23, 2018 at 11:41:49AM +0200, Richard Biener wrote: >> Just a question for clarification - _is_ KFmode strictly a wider mode >> than IFmode? That is, can it represent all values that IFmode can? > >No. IFmode consists of

Re: C++ PATCH to implement P0614R1, Range-based for statements with initializer (take 2)

2018-05-23 Thread Marek Polacek
On Wed, May 23, 2018 at 06:45:41PM +0200, Jakub Jelinek wrote: > On Wed, May 23, 2018 at 10:45:43AM -0400, Marek Polacek wrote: > > 2018-05-23 Marek Polacek > > > > Implement P0614R1, Range-based for statements with initializer. > > * parser.c (cp_parser_range_based_for_with_init_p): Ne

Re: C++ PATCH for c++/85847, ICE with template_id_expr in new()

2018-05-23 Thread Marek Polacek
On Wed, May 23, 2018 at 12:45:11PM -0400, Jason Merrill wrote: > On Wed, May 23, 2018 at 9:46 AM, Marek Polacek wrote: > > The diagnostic code in build_new{,_1} was using maybe_constant_value to fold > > the array length, but that breaks while parsing a template, because we might > > then leak tem

Re: [PATCH , rs6000] Add missing builtin test cases, fix arguments to match specifications.

2018-05-23 Thread Carl Love
On Wed, 2018-05-23 at 13:26 -0500, Segher Boessenkool wrote: > Hi Carl, > > I committed the be/le selectors. > > On Mon, May 21, 2018 at 08:15:30AM -0700, Carl Love wrote: > > --- a/gcc/testsuite/gcc.target/powerpc/builtins-1-be.c > > +++ b/gcc/testsuite/gcc.target/powerpc/builtins-1-be.c > > @@

Re: C++ PATCH to implement P0614R1, Range-based for statements with initializer (take 2)

2018-05-23 Thread Jakub Jelinek
On Wed, May 23, 2018 at 02:49:09PM -0400, Marek Polacek wrote: > > Could you please add some testcases that would test the handling of > > structured bindings in these new forms of range for, like: > > for (int i = 0; auto [ x, y ] : z) > > but perhaps for completeness also in the init-stmt and per

Update svn.html documentation

2018-05-23 Thread Michael Meissner
It was pointed out to me that the section on svn branches was out of date WRT to the ibm/* branches. I have checked in this change: Index: htdocs/svn.html === RCS file: /cvs/gcc/wwwdocs/htdocs/svn.html,v retrieving revision 1.220 dif

Re: C++ PATCH for c++/85847, ICE with template_id_expr in new()

2018-05-23 Thread Jason Merrill
On Wed, May 23, 2018 at 2:50 PM, Marek Polacek wrote: > On Wed, May 23, 2018 at 12:45:11PM -0400, Jason Merrill wrote: >> On Wed, May 23, 2018 at 9:46 AM, Marek Polacek wrote: >> > The diagnostic code in build_new{,_1} was using maybe_constant_value to >> > fold >> > the array length, but that b

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-23 Thread Martin Sebor
On 05/23/2018 08:57 AM, Jeff Law wrote: On 05/10/2018 04:05 PM, Marc Glisse wrote: On Thu, 10 May 2018, Martin Sebor wrote: Can you please comment/respond to Jeff's question below and confirm whether my understanding of the restriction (below) is correct? I don't remember it at all, I really

Re: [PATCH 1/2] Introduce prefetch-minimum stride option

2018-05-23 Thread H.J. Lu
On Tue, May 22, 2018 at 11:55 AM, Luis Machado wrote: > > > On 05/16/2018 08:18 AM, Luis Machado wrote: >> >> >> >> On 05/16/2018 06:08 AM, Kyrill Tkachov wrote: >>> >>> >>> On 15/05/18 12:12, Luis Machado wrote: Hi, On 05/15/2018 06:37 AM, Kyrill Tkachov wrote: > > Hi

Re: C++ PATCH for c++/85847, ICE with template_id_expr in new()

2018-05-23 Thread Marek Polacek
On Wed, May 23, 2018 at 03:24:20PM -0400, Jason Merrill wrote: > On Wed, May 23, 2018 at 2:50 PM, Marek Polacek wrote: > > On Wed, May 23, 2018 at 12:45:11PM -0400, Jason Merrill wrote: > >> On Wed, May 23, 2018 at 9:46 AM, Marek Polacek wrote: > >> > The diagnostic code in build_new{,_1} was usi

Re: [PATCH] PR target/85358: Add target hook to prevent default widening

2018-05-23 Thread Joseph Myers
On Wed, 23 May 2018, Michael Meissner wrote: > One of the problems I've faced over the years is the assumption that there is > only one type for a given size, and that isn't true for IF/KF/TFmode. I think that's a different problem. The problem here is that "wider" is only a partial ordering bet

  1   2   >