Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-28 Thread Martin Sebor
On 11/27/2017 02:22 AM, Dominik Inführ wrote: Thanks for all the reviews! I’ve revised the patch, the operator_delete_flag is now stored in tree_decl_with_vis (there already seem to be some FUNCTION_DECL-flags in there). I’ve also added the option -fallocation-dce to disable this

Re: [Patch][aarch64] Use IFUNCs to enable LSE instructions in libatomic on aarch64

2017-11-28 Thread Steve Ellcey
On Tue, 2017-11-21 at 17:35 +, James Greenhalgh wrote: > > Thanks for the detailed explanation. I understood this, and my opinion is > that the AArch64 parts of this patch are OK (and I don't know who needs to > Ack the small generic changes you require). > > Let's give Richard/Marcus 48

[PATCH, gcc-7] Add riscv -mstrict-align option.

2017-11-28 Thread Jim Wilson
This patch is necessary for proper support of targets that don't directly implement unaligned accesses. Tested with a linux+busybox build and boot, and a gcc testsuite run. There were no regressions. Also tested by hand on some small testcases to verify that it was doing something useful.

[PATCH, docs] Cleanup riscv option docs.

2017-11-28 Thread Jim Wilson
This patch fixes a number of issues with the RISC-V option docs. Deletes a non-existent option. Adds missing default value info. Deletes some redundant lines that appear to be from a patch merging error. Adds missing docs for the -mexplicit-relocs option. Tested with a make doc, and viewing

[committed] Handle very long lines when printing fix-it hints

2017-11-28 Thread David Malcolm
When fixing PR c/82050 I noticed a bug in how we print fix-it hints for very long lines: we weren't taking into account the x-offset for the line when printing the fix-it hint. This could lead to output where instead of printing: foo.c:14:3944: error: etc = foo.field ^

Re: [044/nnn] poly_int: push_block/emit_push_insn

2017-11-28 Thread Jeff Law
On 10/23/2017 11:19 AM, Richard Sandiford wrote: > This patch changes the "extra" parameters to push_block and > emit_push_insn from int to poly_int64. > > > 2017-10-23 Richard Sandiford > Alan Hayward > David Sherwood

Re: [038/nnn] poly_int: fold_comparison

2017-11-28 Thread Jeff Law
On 10/23/2017 11:16 AM, Richard Sandiford wrote: > This patch makes fold_comparison track polynomial offsets when > folding address comparisons. > > > 2017-10-23 Richard Sandiford > Alan Hayward > David Sherwood

Re: [PATCH] Implement std::to_address for C++2a

2017-11-28 Thread Jonathan Wakely
On 28/11/17 12:30 -0500, Glen Fernandes wrote: On Tue, Nov 28, 2017 at 9:24 AM, Jonathan Wakely wrote: Thanks, Glen, I've committed this to trunk, with one small change to fix the copyright dates in the new test, to be just 2017. Thanks! Because my new hobby is finding uses for

Re: [024/nnn] poly_int: ira subreg liveness tracking

2017-11-28 Thread Jeff Law
On 10/23/2017 11:09 AM, Richard Sandiford wrote: > Normmaly the IRA-reload interface tries to track the liveness of > individual bytes of an allocno if the allocno is sometimes written > to as a SUBREG. This isn't possible for variable-sized allocnos, > but it doesn't matter because targets with

[PATCH, gcc-7] Add riscv musl support.

2017-11-28 Thread Jim Wilson
This adds MUSL support to the riscv port in gcc-7, as we had a request for it. Tested with a glibc toolchain build to verify it doesn't break anything, and a musl gcc build to verify that the dynamic linker names are right for each -mabi option value. Committed. gcc/ Backport

[PATCH] Expensive selftests: torture testing for fix-it boundary conditions (PR c/82050)

2017-11-28 Thread David Malcolm
This patch adds selftest coverage for the fix for PR c/82050 (r255214). The selftest iterates over various "interesting" column and line-width values to try to shake out bugs in the fix-it printing routines, a kind of "torture" selftest. Unfortunately this selftest is noticably slower than the

[committed] Reject fix-it hints for various awkward boundary cases (PR c/82050)

2017-11-28 Thread David Malcolm
PR c/82050 reports a failed assertion deep within diagnostic_show_locus's code for printing fix-it hints. The root cause is a fix-it hint suggesting a textual replacement, where the affected column numbers straddle the LINE_MAP_MAX_COLUMN_NUMBER boundary, so that the start of the range has a

Re: [PATCH] Fix ms-sysv.exp testsuite FAILs (PR c/83117)

2017-11-28 Thread Daniel Santos
On 11/28/2017 05:22 AM, Jakub Jelinek wrote: > On Mon, Nov 27, 2017 at 05:02:32PM -0600, Daniel Santos wrote: >>> --- gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/gen.cc.jj 2017-05-22 >>> 10:49:45.0 +0200 >>> +++ gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/gen.cc 2017-11-27 >>>

Re: [PR 82808] Use result types for arithmetic jump functions

2017-11-28 Thread Martin Jambor
Hi, On Tue, Nov 28 2017, Richard Biener wrote: > On Tue, Nov 28, 2017 at 12:35 AM, Martin Jambor wrote: ... >> index 7efd644fb27..2a25c657f8b 100644 >> --- a/gcc/tree.c >> +++ b/gcc/tree.c >> @@ -13893,6 +13893,52 @@ arg_size_in_bytes (const_tree type) >>return

Re: [PATCH] Fix hot/cold partitioning with -gstabs{,+} (PR debug/81307)

2017-11-28 Thread Mike Stump
On Nov 27, 2017, at 5:07 PM, Jim Wilson wrote: > There is also darwin9 support that apparently no one really cares about > anymore. I'm fine with removing stabs support from the compiler.

[PATCH] complex type canonicalization

2017-11-28 Thread Nathan Sidwell
This patch fixes PR 83187, a C++ ICE with alias sets. As Jakub observed in the bug, we ended up with a type whose main variant's canonical type's main variant was not itself. That should be an invariant. In build_complex_type, we create a probe type: tree probe = make_node (COMPLEX_TYPE);

Re: [PATCH][AArch64] Fix ICE due to store_pair_lanes

2017-11-28 Thread James Greenhalgh
On Mon, Nov 27, 2017 at 03:20:29PM +, Wilco Dijkstra wrote: > The recently added store_pair_lanes causes ICEs in output_operand. > This is due to aarch64_classify_address treating it like a 128-bit STR > rather than a STP. The valid immediate offsets don't fully overlap, > causing it to return

Re: [076/nnn] poly_int: vectorizable_conversion

2017-11-28 Thread Richard Sandiford
Jeff Law writes: > On 10/23/2017 11:30 AM, Richard Sandiford wrote: >> This patch makes vectorizable_conversion cope with variable-length >> vectors. We already require the number of elements in one vector >> to be a multiple of the number of elements in the other vector, >> so

Re: C++ PATCH to primary_template_instantiation_p

2017-11-28 Thread Jason Merrill
Fixed, thanks. On Tue, Nov 28, 2017 at 10:49 AM, Maxim Kuvyrkov wrote: > >> On Nov 28, 2017, at 12:29 AM, Jason Merrill wrote: >> >> All the uses of primary_template_instantiation_p actually want to >> query whether the entity in question is a

PUSH_ROUNDING

2017-11-28 Thread Jeff Law
On 11/28/2017 11:00 AM, Richard Sandiford wrote: > Jeff Law writes: >> >> I so wish PUSH_ROUNDING wasn't needed and that folks could at least keep >> their processors consistent (I'm looking at the coldfire designers :(. >> For a tale of woe, see BZ68467. > > Ouch. Is this

Re: [PATCH][i386,AVX] Enable VBMI2 support [5/7]

2017-11-28 Thread Kirill Yukhin
Hello Julia, On 24 Oct 10:05, Koval, Julia wrote: > Attached the patch > > > -Original Message- > > From: Koval, Julia > > Sent: Tuesday, October 24, 2017 12:01 PM > > To: GCC Patches > > Cc: Kirill Yukhin > > Subject: [PATCH][i386,AVX]

Re: [PATCH][i386,AVX] Enable VBMI2 support [4/7]

2017-11-28 Thread Kirill Yukhin
Hello Julia, On 24 Oct 09:08, Koval, Julia wrote: > Hi, > This patch enables VPSHLD instruction. The doc for isaset and instruction: > https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf > > Ok for trunk? You patch is OK

Re: [092/nnn] poly_int: PUSH_ROUNDING

2017-11-28 Thread Richard Sandiford
Jeff Law writes: > On 10/23/2017 11:37 AM, Richard Sandiford wrote: >> PUSH_ROUNDING is difficult to convert to a hook since there is still >> a lot of conditional code based on it. It isn't clear that a direct >> conversion with checks for null hooks is the right thing to do.

Re: [046/nnn] poly_int: instantiate_virtual_regs

2017-11-28 Thread Jeff Law
On 10/23/2017 11:19 AM, Richard Sandiford wrote: > This patch makes the instantiate virtual regs pass track offsets > as poly_ints. > > > 2017-10-23 Richard Sandiford > Alan Hayward > David Sherwood

Re: [039/nnn] poly_int: pass_store_merging::execute

2017-11-28 Thread Jeff Law
On 10/23/2017 11:17 AM, Richard Sandiford wrote: > This patch makes pass_store_merging::execute track polynomial sizes > and offsets. > > > 2017-10-23 Richard Sandiford > Alan Hayward > David Sherwood

Re: [034/nnn] poly_int: get_inner_reference_aff

2017-11-28 Thread Jeff Law
On 10/23/2017 11:13 AM, Richard Sandiford wrote: > This patch makes get_inner_reference_aff return the size as a > poly_widest_int rather than a widest_int. > > > 2017-10-23 Richard Sandiford > Alan Hayward > David

Re: [026/nnn] poly_int: operand_subword

2017-11-28 Thread Jeff Law
On 10/23/2017 11:10 AM, Richard Sandiford wrote: > This patch makes operand_subword and operand_subword_force take > polynomial offsets. This is a fairly old-school interface and > these days should only be used when splitting multiword operations > into word operations. It still doesn't hurt to

Re: [028/nnn] poly_int: ipa_parm_adjustment

2017-11-28 Thread Jeff Law
On 10/23/2017 11:11 AM, Richard Sandiford wrote: > This patch changes the type of ipa_parm_adjustment::offset from > HOST_WIDE_INT to poly_int64 and updates uses accordingly. > > > 2017-10-23 Richard Sandiford > Alan Hayward >

Re: [032/nnn] poly_int: symbolic_number

2017-11-28 Thread Jeff Law
On 10/23/2017 11:12 AM, Richard Sandiford wrote: > This patch changes symbol_number::bytepos from a HOST_WIDE_INT > to a poly_int64. perform_symbolic_merge can cope with symbolic > offsets as long as the difference between the two offsets is > constant. (This could happen for a constant-sized

Re: [033/nnn] poly_int: pointer_may_wrap_p

2017-11-28 Thread Jeff Law
On 10/23/2017 11:13 AM, Richard Sandiford wrote: > This patch changes the bitpos argument to pointer_may_wrap_p from > HOST_WIDE_INT to poly_int64. A later patch makes the callers track > polynomial offsets. > > > 2017-10-23 Richard Sandiford > Alan

Re: [C PATCH] Handle C SWITCH_EXPR in block_may_fallthru (PR sanitizer/81275)

2017-11-28 Thread Jeff Law
On 11/28/2017 01:49 AM, Jakub Jelinek wrote: > Hi! > > This is the C version of the switch block_may_fallthru handling. > Unlike C++ SWITCH_STMT, break; is represented in SWITCH_EXPR by a goto > to a label emitted after the SWITCH_EXPR, so either block_may_fallthru > finds such label (but then

Re: [PATCH] Implement std::to_address for C++2a

2017-11-28 Thread Glen Fernandes
On Tue, Nov 28, 2017 at 9:24 AM, Jonathan Wakely wrote: > Thanks, Glen, I've committed this to trunk, with one small change to > fix the copyright dates in the new test, to be just 2017. Thanks! > Because my new hobby is finding uses for if-constexpr, I think we > could have used the detection

Re: [036/nnn] poly_int: get_object_alignment_2

2017-11-28 Thread Jeff Law
On 10/23/2017 11:14 AM, Richard Sandiford wrote: > This patch makes get_object_alignment_2 track polynomial offsets > and sizes. The real work is done by get_inner_reference, but we > then need to handle the alignment correctly. > > > 2017-10-23 Richard Sandiford

Re: [049/nnn] poly_int: emit_inc

2017-11-28 Thread Jeff Law
On 10/23/2017 11:20 AM, Richard Sandiford wrote: > This patch changes the LRA emit_inc routine so that it takes > a poly_int64 rather than an int. > > > 2017-10-23 Richard Sandiford > Alan Hayward > David Sherwood

Re: [050/nnn] poly_int: reload<->ira interface

2017-11-28 Thread Jeff Law
On 10/23/2017 11:21 AM, Richard Sandiford wrote: > This patch uses poly_int64 for: > > - ira_reuse_stack_slot > - ira_mark_new_stack_slot > - ira_spilled_reg_stack_slot::width > > all of which are part of the IRA/reload interface. > > > 2017-10-23 Richard Sandiford

Re: [053/nnn] poly_int: decode_addr_const

2017-11-28 Thread Jeff Law
On 10/23/2017 11:22 AM, Richard Sandiford wrote: > This patch makes the varasm-local addr_const track polynomial offsets. > I'm not sure how useful this is, but it was easier to convert than not. > > > 2017-10-23 Richard Sandiford > Alan Hayward

Re: [054/nnn] poly_int: adjust_ptr_info_misalignment

2017-11-28 Thread Jeff Law
On 10/23/2017 11:22 AM, Richard Sandiford wrote: > This patch makes adjust_ptr_info_misalignment take the adjustment > as a poly_uint64 rather than an unsigned int. > > > 2017-10-23 Richard Sandiford > Alan Hayward >

Re: [055/nnn] poly_int: find_bswap_or_nop_load

2017-11-28 Thread Jeff Law
On 10/23/2017 11:23 AM, Richard Sandiford wrote: > This patch handles polynomial offsets in find_bswap_or_nop_load, > which could be useful for constant-sized data at a variable offset. > It is needed for a later patch to compile. > > > 2017-10-23 Richard Sandiford

Re: [057/nnn] poly_int: build_ref_for_offset

2017-11-28 Thread Jeff Law
On 10/23/2017 11:23 AM, Richard Sandiford wrote: > This patch changes the offset parameter to build_ref_for_offset > from HOST_WIDE_INT to poly_int64. > > > 2017-10-23 Richard Sandiford > Alan Hayward > David Sherwood

Re: [058/nnn] poly_int: get_binfo_at_offset

2017-11-28 Thread Jeff Law
On 10/23/2017 11:24 AM, Richard Sandiford wrote: > This patch changes the offset parameter to get_binfo_at_offset > from HOST_WIDE_INT to poly_int64. This function probably doesn't > need to handle polynomial offsets in practice, but it's easy > to do and avoids forcing the caller to check first.

Re: [061/nnn] poly_int: compute_data_ref_alignment

2017-11-28 Thread Jeff Law
On 10/23/2017 11:25 AM, Richard Sandiford wrote: > This patch makes vect_compute_data_ref_alignment treat DR_INIT as a > poly_int and handles cases in which the calculated misalignment might > not be constant. > > > 2017-10-23 Richard Sandiford > Alan

Re: [067/nnn] poly_int: get_mask_mode

2017-11-28 Thread Jeff Law
On 10/23/2017 11:27 AM, Richard Sandiford wrote: > This patch makes TARGET_GET_MASK_MODE take polynomial nunits and > vector_size arguments. The gcc_assert in default_get_mask_mode > is now handled by the exact_div call in vector_element_size. > > > 2017-10-23 Richard Sandiford

Re: [069/nnn] poly_int: vector_alignment_reachable_p

2017-11-28 Thread Jeff Law
On 10/23/2017 11:28 AM, Richard Sandiford wrote: > This patch makes vector_alignment_reachable_p cope with variable-length > vectors. > > > 2017-10-23 Richard Sandiford > Alan Hayward > David Sherwood

Re: [072/nnn] poly_int: vectorizable_live_operation

2017-11-28 Thread Jeff Law
On 10/23/2017 11:29 AM, Richard Sandiford wrote: > This patch makes vectorizable_live_operation cope with variable-length > vectors. For now we just handle cases in which we can tell at compile > time which vector contains the final result. > > > 2017-10-23 Richard Sandiford

Re: [074/nnn] poly_int: vectorizable_call

2017-11-28 Thread Jeff Law
On 10/23/2017 11:30 AM, Richard Sandiford wrote: > This patch makes vectorizable_call handle variable-length vectors. > The only substantial change is to use build_index_vector for > IFN_GOMP_SIMD_LANE; this makes no functional difference for > fixed-length vectors. > > > 2017-10-23 Richard

Re: [075/nnn] poly_int: vectorizable_simd_clone_call

2017-11-28 Thread Jeff Law
On 10/23/2017 11:30 AM, Richard Sandiford wrote: > This patch makes vectorizable_simd_clone_call cope with variable-length > vectors. For now we don't support SIMD clones for variable-length > vectors; this will be post GCC 8 material. > > > 2017-10-23 Richard Sandiford

Re: [076/nnn] poly_int: vectorizable_conversion

2017-11-28 Thread Jeff Law
On 10/23/2017 11:30 AM, Richard Sandiford wrote: > This patch makes vectorizable_conversion cope with variable-length > vectors. We already require the number of elements in one vector > to be a multiple of the number of elements in the other vector, > so the patch uses that to choose between

Re: [077/nnn] poly_int: vect_get_constant_vectors

2017-11-28 Thread Jeff Law
On 10/23/2017 11:31 AM, Richard Sandiford wrote: > For now, vect_get_constant_vectors can only cope with constant-length > vectors, although a patch after the main SVE submission relaxes this. > This patch adds an appropriate guard for variable-length vectors. > The TYPE_VECTOR_SUBPARTS use in

Re: [078/nnn] poly_int: two-operation SLP

2017-11-28 Thread Jeff Law
On 10/23/2017 11:31 AM, Richard Sandiford wrote: > This patch makes two-operation SLP handle but reject variable-length > vectors. Adding support for this is a post-GCC8 thing. > > > 2017-10-23 Richard Sandiford > Alan Hayward >

Re: [082/nnn] poly_int: omp-simd-clone.c

2017-11-28 Thread Jeff Law
On 10/23/2017 11:33 AM, Richard Sandiford wrote: > This patch adds a wrapper around TYPE_VECTOR_SUBPARTS for omp-simd-clone.c. > Supporting SIMD clones for variable-length vectors is post GCC8 work. > > > 2017-10-23 Richard Sandiford > Alan Hayward

Re: [083/nnn] poly_int: fold_indirect_ref_1

2017-11-28 Thread Jeff Law
On 10/23/2017 11:33 AM, Richard Sandiford wrote: > This patch makes fold_indirect_ref_1 handle polynomial offsets in > a POINTER_PLUS_EXPR. The specific reason for doing this now is > to handle: > > (tree_to_uhwi (part_width) / BITS_PER_UNIT > *

Re: [084/nnn] poly_int: folding BIT_FIELD_REFs on vectors

2017-11-28 Thread Jeff Law
On 10/23/2017 11:33 AM, Richard Sandiford wrote: > This patch makes the: > > (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2) > > folder cope with polynomial numbers of elements. > > > 2017-10-23 Richard Sandiford > Alan Hayward >

Re: [085/nnn] poly_int: expand_vector_ubsan_overflow

2017-11-28 Thread Jeff Law
On 10/23/2017 11:34 AM, Richard Sandiford wrote: > This patch makes expand_vector_ubsan_overflow cope with a polynomial > number of elements. > > > 2017-10-23 Richard Sandiford > Alan Hayward > David Sherwood

Re: [RFA][PATCH] Stack clash protection 07/08 -- V4 (aarch64 bits)

2017-11-28 Thread Rich Felker
On Mon, Nov 27, 2017 at 03:48:41PM +, Szabolcs Nagy wrote: > On 28/10/17 05:08, Jeff Law wrote: > > On 10/13/2017 02:26 PM, Wilco Dijkstra wrote: > >> For larger frames the first oddity is that there are now 2 separate params > >> controlling how probes are generated: > >> > >>

Re: [087/nnn] poly_int: subreg_get_info

2017-11-28 Thread Jeff Law
On 10/23/2017 11:35 AM, Richard Sandiford wrote: > This patch makes subreg_get_info handle polynomial sizes. > > > 2017-10-23 Richard Sandiford > Alan Hayward > David Sherwood > > gcc/ >

Re: [092/nnn] poly_int: PUSH_ROUNDING

2017-11-28 Thread Jeff Law
On 10/23/2017 11:37 AM, Richard Sandiford wrote: > PUSH_ROUNDING is difficult to convert to a hook since there is still > a lot of conditional code based on it. It isn't clear that a direct > conversion with checks for null hooks is the right thing to do. > > Rather than untangle that, this

Re: [PATCH GCC][V2]A simple implementation of loop interchange

2017-11-28 Thread Bin.Cheng
On Tue, Nov 28, 2017 at 4:00 PM, David Malcolm wrote: > On Tue, 2017-11-28 at 15:26 +, Bin Cheng wrote: >> Hi, >> This is updated patch with review comments resolved. Some >> explanation embedded below. >> >> On Mon, Nov 20, 2017 at 2:46 PM, Richard Biener

Re: [PATCH GCC][V2]A simple implementation of loop interchange

2017-11-28 Thread David Malcolm
On Tue, 2017-11-28 at 15:26 +, Bin Cheng wrote: > Hi, > This is updated patch with review comments resolved. Some > explanation embedded below. > > On Mon, Nov 20, 2017 at 2:46 PM, Richard Biener il.com> wrote: > > On Thu, Nov 16, 2017 at 4:18 PM, Bin.Cheng

Re: [committed] Add testcase for PR rtl-optimization/81020

2017-11-28 Thread Christophe Lyon
Hi, On 28 November 2017 at 11:24, Jakub Jelinek wrote: > Hi! > > This testcase was fixed by Segher's r254875: > https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00340.html > on the trunk, so I've committed it to trunk as obvious. > On release branches it still needs fixing. > >

Re: C++ PATCH to primary_template_instantiation_p

2017-11-28 Thread Maxim Kuvyrkov
> On Nov 28, 2017, at 12:29 AM, Jason Merrill wrote: > > All the uses of primary_template_instantiation_p actually want to > query whether the entity in question is a specialization of the > template, not whether it's an instantiation or explicit > specialization. > > Tested

[arm-embedded] [PATCH, GCC/LTO, ping] Fix PR69866: LTO with def for weak alias in regular object file

2017-11-28 Thread Thomas Preudhomme
Hi, We have decided to apply the forwarded patch to the embedded-7-branch to fix an ICE when doing partial LTO with weak symbols. ChangeLog entry is as follows: 2017-11-28 Thomas Preud'homme Backport from mainline 2017-06-15 Jan Hubicka

Re: [PATCH] Fix hot/cold partitioning with -gstabs{,+} (PR debug/81307)

2017-11-28 Thread Jeff Law
On 11/27/2017 06:07 PM, Jim Wilson wrote: > On 11/27/2017 01:54 PM, Jim Wilson wrote: >> On 11/27/2017 12:21 AM, Richard Biener wrote: >>> Let's formally deprecate any non-DWARF debugging format support >>> in GCC 8 changes.html? >> >>   We have two OS targets that only support stabs, though in

[PATCH] Fix PR80846, change vectorizer reduction epilogue (on x86)

2017-11-28 Thread Richard Biener
The following adds a new target hook, targetm.vectorize.split_reduction, which allows the target to specify a preferred mode to perform the final reducion on using either vector shifts or scalar extractions. Up to that mode the vector reduction result is reduced by combining lowparts and

Re: [PATCH 1/7]: SVE: Add CLOBBER_HIGH expression

2017-11-28 Thread Jeff Law
On 11/28/2017 04:55 AM, Richard Biener wrote: >>> Or consider a stream of code containing two tls_desc calls (ok, the >>> compiler might >>> optimise one of the tls calls away, but this approach should be reusable >>> for other exprs). >>> Between the two set(x,x)’s x is considered live so the

Re: [PATCH] Fix PR80776

2017-11-28 Thread Jeff Law
On 11/28/2017 02:14 AM, Richard Biener wrote: > On Mon, 27 Nov 2017, Jeff Law wrote: > >> On 11/27/2017 06:39 AM, Richard Biener wrote: >>> >>> The following avoids -Wformat-overflow false positives by teaching >>> EVRP the trick about __builtin_unreachable () "other" edges and >>> attaching

[PATCH GCC]Rename and make remove_dead_inserted_code a simple dce interface

2017-11-28 Thread Bin Cheng
Hi, This patch renames remove_dead_inserted_code to simple_dce_from_worklist, moves it to tree-ssa-dce.c and makes it a simple public DCE interface. Bootstrap and test along with loop interchange. It's required for interchange pass. Is it OK? BTW, I will push this along with interchange to

Re: [PATCH] Implement std::to_address for C++2a

2017-11-28 Thread Jonathan Wakely
On 25/11/17 10:31 -0500, Glen Fernandes wrote: (Just a minor update to the last patch to use is_function_v instead of is_function::value) Implement std::to_address for C++2a Thanks, Glen, I've committed this to trunk, with one small change to fix the copyright dates in the new test, to be

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-28 Thread Jakub Jelinek
On Tue, Nov 28, 2017 at 12:52:12PM +0100, Richard Biener wrote: > On Mon, Nov 27, 2017 at 5:58 PM, Jeff Law wrote: > > On 11/27/2017 02:22 AM, Dominik Inführ wrote: > >> Thanks for all the reviews! I’ve revised the patch, the > >> operator_delete_flag is now stored in

Re: [PATCH v2 1/4] [SPARC] Errata workaround for GRLIB-TN-0012

2017-11-28 Thread Daniel Cederman
...add (and (.) (not (eq_attr "branch_type" "icc")) to the first define_delay. Ah, OK, that makes more sense. I will submit an updated version. Thanks for getting back so quickly. Daniel C

[PATCH v3 1/4] [SPARC] Errata workaround for GRLIB-TN-0012

2017-11-28 Thread Daniel Cederman
This patch provides a workaround for the errata described in GRLIB-TN-0012. If the workaround is enabled it will: * Prevent any floating-point operation from being placed in the delay slot of an annulled integer branch. * Place a NOP at the branch target of an integer branch if it is a

Re: [PATCH, Makefile.in] refine selftest recipes to restore mingw bootstrap

2017-11-28 Thread Olivier Hainque
> On Nov 28, 2017, at 11:56 , Tamar Christina wrote: >> For gcc in particular, ISTM it depends on the target for which you >> configured. > > This is true, but In this case, the tool should have never seen "/dev/null". > Since the invocation > Of the command that uses

Re: [PATCH][2/2] gimple-fold.c part for PR83141

2017-11-28 Thread Richard Biener
On Mon, 27 Nov 2017, Richard Biener wrote: > > The following is the truly minimal fix for the middle-end issue > with SRA and memcpy folding interaction. I've tried more variants > that "make sense" but as they all end up folding slightly more > memcpy calls than before we run into optimization

Re: [PATCH 1/7]: SVE: Add CLOBBER_HIGH expression

2017-11-28 Thread Richard Biener
On Mon, Nov 27, 2017 at 6:29 PM, Jeff Law wrote: > On 11/23/2017 04:11 AM, Alan Hayward wrote: >> >>> On 22 Nov 2017, at 17:33, Jeff Law wrote: >>> >>> On 11/22/2017 04:31 AM, Alan Hayward wrote: > On 21 Nov 2017, at 03:13, Jeff Law

Re: [C++ PATCH] Avoid -Wreturn-type warnings if a switch has default label, no breaks inside of it, but is followed by a break (PR sanitizer/81275, take 2)

2017-11-28 Thread Nathan Sidwell
On 11/28/2017 03:53 AM, Jakub Jelinek wrote: On Mon, Nov 27, 2017 at 02:01:05PM +0100, Jakub Jelinek wrote: You are right that I can remove the || SWITCH_STMT_BODY (stmt) == NULL_TREE, part, because then there wouldn't be any case labels in it either. ... Here is an updated patch, on top of

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-28 Thread Richard Biener
On Mon, Nov 27, 2017 at 5:58 PM, Jeff Law wrote: > On 11/27/2017 02:22 AM, Dominik Inführ wrote: >> Thanks for all the reviews! I’ve revised the patch, the operator_delete_flag >> is now stored in tree_decl_with_vis (there already seem to be some >> FUNCTION_DECL-flags in

Re: [RFA][PATCH] Use SCEV conditionally within vr-values and evrp range analysis - V2

2017-11-28 Thread Richard Biener
On Mon, Nov 27, 2017 at 5:43 PM, Jeff Law wrote: > On 11/23/2017 05:49 AM, Richard Biener wrote: >> On Thu, Nov 23, 2017 at 1:16 AM, Jeff Law wrote: >>> >>> Clients of the evrp range analysis may not have initialized the SCEV >>> infrastructure, and in fact my

Re: [PR 82808] Use result types for arithmetic jump functions

2017-11-28 Thread Richard Biener
On Tue, Nov 28, 2017 at 12:35 AM, Martin Jambor wrote: > Hi, > > sorry for getting so late to this. However... > > On Tue, Nov 14 2017, Richard Biener wrote: >> On Tue, Nov 14, 2017 at 10:31 AM, Prathamesh Kulkarni >> wrote: >>> On 3 November

Re: [PATCH] [pr#83069] Keep profile_count for bb under real_bb_freq_max

2017-11-28 Thread Siddhesh Poyarekar
On Friday 24 November 2017 05:36 PM, Siddhesh Poyarekar wrote: > freq_max < 1, i.e. highest frequency among bbs in the function being > higher than real_bb_freq_max means that the bb ends up with a profile > count larger than real_bb_freq_max and then can go all the way up to > and beyond

Re: [PATCH] Fix ms-sysv.exp testsuite FAILs (PR c/83117)

2017-11-28 Thread Jakub Jelinek
On Mon, Nov 27, 2017 at 05:02:32PM -0600, Daniel Santos wrote: > > --- gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/gen.cc.jj 2017-05-22 > > 10:49:45.0 +0200 > > +++ gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/gen.cc 2017-11-27 > > 11:57:14.889570915 +0100 > > @@ -392,7 +392,7 @@

RE: [PATCH, Makefile.in] refine selftest recipes to restore mingw bootstrap

2017-11-28 Thread Tamar Christina
Hi Olivier, > -Original Message- > From: Olivier Hainque [mailto:hain...@adacore.com] > Sent: Tuesday, November 28, 2017 10:40 > To: Tamar Christina > Cc: Olivier Hainque ; David Malcolm > ; Jeff Law ;

Re: [PATCH, Makefile.in] refine selftest recipes to restore mingw bootstrap

2017-11-28 Thread Olivier Hainque
Hello Tamar, > On Nov 28, 2017, at 11:05 , Tamar Christina wrote: > > Yeah I choose this fix because /dev/null is converted to "nul" by the > Cygwin/msys2 runtime. So when invoked On the shell it gets converted > before GCC sees it. > > Nothing against using nul

[committed] Add testcase for PR rtl-optimization/81020

2017-11-28 Thread Jakub Jelinek
Hi! This testcase was fixed by Segher's r254875: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00340.html on the trunk, so I've committed it to trunk as obvious. On release branches it still needs fixing. 2017-11-28 Jakub Jelinek PR rtl-optimization/81020 *

Re: [PATCH 2/2] [SPARC] Recognize the load when accessing the GOT

2017-11-28 Thread Eric Botcazou
> 2017-11-27 Daniel Cederman > > * config/sparc/sparc.c (sparc_do_work_around_errata): Treat the > movsi_pic_gotdata_op instruction as a load for the UT699 errata > workaround. OK for mainline, 7 and 6 branches, thanks. -- Eric Botcazou

Re: [PATCH 1/2] [SPARC] Prevent -mfix-ut699 from generating b2bst errata sequences

2017-11-28 Thread Eric Botcazou
> 2017-11-27 Martin Aberg > > * config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length > to prevent b2bst errata sequence. > (sqrtdf2_fix): Likewise. OK for mainline and 7 branch, thanks. -- Eric Botcazou

Re: [PATCH v2 4/4] [SPARC] Errata workaround for GRLIB-TN-0013

2017-11-28 Thread Eric Botcazou
> > +(and (eq_attr "fix_lost_divsqrt" "true") > > + (eq_attr "type" "fpdivs,fpsqrts,fpdivd,fpsqrtd")) > > + (const_string "false") > > These lines should also be added to the in_integer_branch_annul_delay > attribute. Let's not though and make the modification I suggested

RE: [PATCH, Makefile.in] refine selftest recipes to restore mingw bootstrap

2017-11-28 Thread Tamar Christina
Sending reply to list. > -Original Message- > From: Tamar Christina > Sent: Tuesday, November 28, 2017 10:02 > To: 'David Malcolm' ; Olivier Hainque > ; Jeff Law > Cc: GCC Patches > Subject: RE: [PATCH,

Re: [PATCH v2 4/4] [SPARC] Errata workaround for GRLIB-TN-0013

2017-11-28 Thread Eric Botcazou
> 2017-11-17 Daniel Cederman > > * config/sparc/sparc.c (fpop_reg_depend_p): New function. > (div_sqrt_insn_p): New function. > (sparc_do_work_around_errata): Insert NOP instructions to > prevent sequences that could trigger the TN-0013 errata for

Re: [PATCH v2 3/4] [SPARC] Errata workaround for GRLIB-TN-0010

2017-11-28 Thread Eric Botcazou
> 2017-11-17 Daniel Cederman > > * config/sparc/sparc.c (atomic_insn_p): New function. > (sparc_do_work_around_errata): Insert NOP instructions to > prevent sequences that could trigger the TN-0010 errata for > UT700. > * config/sparc/sync.md

Re: [PATCH v2 2/4] [SPARC] Errata workaround for GRLIB-TN-0011

2017-11-28 Thread Eric Botcazou
> 2017-11-17 Daniel Cederman > > * config/sparc/sync.md (swapsi): 16-byte align if sparc_fix_gr712rc. > (atomic_compare_and_swap_leon3_1): Likewise. > (ldstub): Likewise. OK for mainline and 7 branch, thanks. -- Eric Botcazou

Re: [PATCH v2 1/4] [SPARC] Errata workaround for GRLIB-TN-0012

2017-11-28 Thread Eric Botcazou
> 2017-11-17 Daniel Cederman > > * config/sparc/sparc.c (fpop_insn_p): New function. > (sparc_do_work_around_errata): Insert NOP instructions to > prevent sequences that could trigger the TN-0012 errata for > GR712RC. >

Re: [fortran] Add support for #pragma GCC unroll v3

2017-11-28 Thread Eric Botcazou
> The patch looks ok to me. Thanks. > For documentation, the gfortran manual has 2 sections: > > 6.1 Extensions implemented in GNU Fortran > 7.2 GNU Fortran Compiler Directives > > 6.1 describes extension covering legacy code and vendor extensions. > 7.2 describes other !$GCC directives.

Re: [PATCH] Fix hot/cold partitioning with -gstabs{,+} (PR debug/81307)

2017-11-28 Thread Richard Biener
On Mon, 27 Nov 2017, Jim Wilson wrote: > On 11/27/2017 12:21 AM, Richard Biener wrote: > > Let's formally deprecate any non-DWARF debugging format support > > in GCC 8 changes.html? > > I think we need to be careful about that. I've been looking at the stabs > support after I finished removing

Re: [PATCH] Fix PR80776

2017-11-28 Thread Richard Biener
On Mon, 27 Nov 2017, Jeff Law wrote: > On 11/27/2017 06:39 AM, Richard Biener wrote: > > > > The following avoids -Wformat-overflow false positives by teaching > > EVRP the trick about __builtin_unreachable () "other" edges and > > attaching range info to SSA names. EVRP does a better job in

[PATCH, committed] Add myself to MAINTAINRS

2017-11-28 Thread Koval, Julia
2017-11-28  Julia Koval      * MAINTAINERS (write after approval): Add myself.

[C++ PATCH] Avoid -Wreturn-type warnings if a switch has default label, no breaks inside of it, but is followed by a break (PR sanitizer/81275, take 2)

2017-11-28 Thread Jakub Jelinek
On Mon, Nov 27, 2017 at 02:01:05PM +0100, Jakub Jelinek wrote: > You are right that I can remove the || SWITCH_STMT_BODY (stmt) == NULL_TREE, > part, because then there wouldn't be any case labels in it either. ... Here is an updated patch, on top of the C patch I've just posted:

[C PATCH] Handle C SWITCH_EXPR in block_may_fallthru (PR sanitizer/81275)

2017-11-28 Thread Jakub Jelinek
Hi! This is the C version of the switch block_may_fallthru handling. Unlike C++ SWITCH_STMT, break; is represented in SWITCH_EXPR by a goto to a label emitted after the SWITCH_EXPR, so either block_may_fallthru finds such label (but then doesn't find the SWITCH_EXPR), or it finds SWITCH_EXPR, in

Re: [PATCH, Makefile.in] refine selftest recipes to restore mingw bootstrap

2017-11-28 Thread Olivier Hainque
> On Nov 28, 2017, at 07:20 , Jeff Law wrote: >> Given that, I prefer Olivier's patch - it seems simpler to me. > OK. I can live with it. Thanks for for your reviews Jeff and David. Will commit. Windows hosts are full of surprises. It shouldn't be hard to revisit the

Re: [088/nnn] poly_int: expand_expr_real_2

2017-11-28 Thread Jeff Law
On 10/23/2017 11:35 AM, Richard Sandiford wrote: > This patch makes expand_expr_real_2 cope with polynomial mode sizes > when handling conversions involving a union type. > > > 2017-10-23 Richard Sandiford > Alan Hayward >

Re: [089/nnn] poly_int: expand_expr_real_1

2017-11-28 Thread Jeff Law
On 10/23/2017 11:35 AM, Richard Sandiford wrote: > This patch makes the VIEW_CONVERT_EXPR handling in expand_expr_real_1 > cope with polynomial type and mode sizes. > > > 2017-10-23 Richard Sandiford > Alan Hayward >

Re: [090/nnn] poly_int: set_inc_state

2017-11-28 Thread Jeff Law
On 10/23/2017 11:36 AM, Richard Sandiford wrote: > This trivial patch makes auto-inc-dec.c:set_inc_state take a poly_int64. > > > 2017-10-23 Richard Sandiford > Alan Hayward > David Sherwood >

  1   2   >