Re: [PATCH] Fix ICE during MEM_REF expansion (PR middle-end/90840)

2019-12-07 Thread Eric Botcazou
> On the following testcase we ICE on i686-linux (32-bit), because we store > (first 96-bit, then 72-bit) structure into the first part of a 2x 96-bit > complex long double, and for 96-bit floats there is no corresponding > integral mode that covers it and we ICE when op0 is not in MEM (it is a > R

[patch, fortran] Introduce -finline-pack

2019-12-07 Thread Thomas Koenig
Hello world, the attached patch introduces a new option, -finline-pack. Since the fix for PR88821, we now do inline packing of arguments (if required) via the scalarizer, instead of using _gfortran_internal_[un]pack when optimizing, but not when optimizing for size. This introduces (really) lar

Re: [RFC] Offloading Support in libgomp

2019-12-07 Thread Thomas Schwinge
Hi! This is from very early days of libgomp offloading support: On 2013-09-14T21:29:56+0200, Jakub Jelinek wrote: > --- libgomp/target.c.jj 2013-09-09 17:41:02.290429613 +0200 > +++ libgomp/target.c 2013-09-13 16:41:24.514770386 +0200 > +static void > +gomp_unmap_tgt (struct target_mem_d

Re: [PATCH 09/49] gimple const-correctness fixes

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:22 -0500, David Malcolm wrote: > This patch converts various "gimple *" to "const gimple *" and > similar > fixes for gimple subclasses, adding is_a_helper for gimple subclasses > to support the const form of as_a, and adding a few "const" overloads > of accessors. > > Thi

Re: [PATCH 06/49] timevar.h: add auto_client_timevar class

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:22 -0500, David Malcolm wrote: > This patch adds a class "auto_client_timevar", similar to > auto_timevar, > but for plugins to use on their own timing items that aren't in > timevar.def > > gcc/ChangeLog: > * timevar.h (class auto_client_timevar): New class. So if w

Re: [PATCH 03/49] diagnostic_show_locus: move initial newline to callers

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:22 -0500, David Malcolm wrote: > diagnostic_show_locus adds a newline before doing anything (including > the do-nothing-else case). > > This patch removes this initial newline, adding it to all callers > of diagnostic_show_locus instead. > > Doing so makes diagnostic_show

Re: [PATCH 07/49] Replace label_text ctor with "borrow" and "take"

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:22 -0500, David Malcolm wrote: > libcpp's label_text class wraps a text buffer, along with a flag to > determine if it "owns" the buffer. > > The existing ctor exposed this directly, but I found it difficult > to remember the sense of flag, so this patch hides the ctor, in

Re: [PATCH 08/49] Introduce pretty_printer::clone vfunc

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:22 -0500, David Malcolm wrote: > This patch provides a way to clone a pretty_printer. > > This is needed so that we can capture text in a label_text and make > layout decisions based on it, using the policy of global_dc's > printer, > whilst within a call to diagnostic_sho

Re: [PATCH 13/49] function-tests.c: expose selftest::make_fndecl for use elsewhere

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This is used by new selftests later on in the patch kit. > > gcc/ChangeLog: > * function-tests.c (selftest::make_fndecl): Make non-static. > * selftest.h (selftest::make_fndecl): New decl. OK jeff

Re: [PATCH 14/49] hash-map-tests.c: add a selftest involving int_hash

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > gcc/ChangeLog: > * hash-map-tests.c (selftest::test_map_of_int_to_strings): New > selftest. > (selftest::hash_map_tests_c_tests): Call it. OK jeff >

Re: [PATCH 16/49] Add support for in-tree plugins

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch adds support for "in-tree" plugins i.e. GCC plugins that > live > in the GCC source tree and are shipped as part of the GCC tarball. > > The patch adds Makefile/configure machinery for handling in-tree GCC > plugins, adapted from

Re: [PATCH 17/49] Support for adding selftests via a plugin

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch provides a plugin callback for invoking selftests, so that > a > plugin can add tests to those run by -fself-test=DIR. The callback > invocation uses invoke_plugin_callbacks, which is a no-op if plugin > support is disabled. > >

Re: [PATCH 12/49] Add diagnostic paths

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:22 -0500, David Malcolm wrote: > This patch adds support for associating a "diagnostic_path" with a > diagnostic: a sequence of events predicted by the compiler that leads > to > the problem occurring, with their locations in the user's source, > text descriptions, and stac

Re: [PATCH 19/49] analyzer: new files: analyzer-selftests.{cc|h}

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > gcc/ChangeLog: > * analyzer/analyzer-selftests.cc: New file. > * analyzer/analyzer-selftests.h: New file. This obviously can't stand on its own, but it's fine once prereqs are approved. jeff

Re: [PATCH 22/49] analyzer: params.def: new parameters

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > gcc/ChangeLog: > * params.def (PARAM_ANALYZER_BB_EXPLOSION_FACTOR): New param. > (PARAM_ANALYZER_MAX_ENODES_PER_PROGRAM_POINT): New param. > (PARAM_ANALYZER_MAX_RECURSION_DEPTH): New param. > (PARAM_ANALYZER_MIN_SNODE

Re: [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments

2019-12-07 Thread Thomas Schwinge
Hi Tobias! On 2019-11-20T14:06:18+0100, Tobias Burnus wrote: > This patch does two things regarding explicit and automatical variable > mapping to offloaded devices: Thanks! > Compared to the previous patch set,** I added several OpenMP test cases > – and fixed the fallout. I'm seeing:

Re: [PATCH 24/49] analyzer: new file: analyzer-pass.cc

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch adds the IPA pass boilerplate for the analyzer. > > gcc/ChangeLog: > * analyzer/analyzer-pass.cc: New file. Nothing I see controversial here. But obviously will need some adjustment if we're moving away from using the plug

Re: [PATCH 25/49] analyzer: new files: graphviz.{cc|h}

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch adds a simple wrapper class to make it easier to > write human-readable .dot files. > > gcc/ChangeLog: > * analyzer/graphviz.cc: New file. > * analyzer/graphviz.h: New file. This doesn't seem specific to the analyzer

Re: [PATCH 26/49] analyzer: new files: digraph.{cc|h} and shortest-paths.h

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch adds template classes for directed graphs, their nodes > and edges, and for finding the shortest path through such a graph. > > gcc/ChangeLog: > * analyzer/digraph.cc: New file. > * analyzer/digraph.h: New file. >

Re: [PATCH 28/49] analyzer: new files: analyzer.{cc|h}

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > gcc/ChangeLog: > * analyzer/analyzer.cc: New file. > * analyzer/analyzer.h: New file. > --- > gcc/analyzer/analyzer.cc | 125 > ++ > gcc/analyzer/analyzer.h | 126 > ++

Re: [PATCH 29/49] analyzer: new files: tristate.{cc|h}

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > gcc/ChangeLog: > * analyzer/tristate.cc: New file. > * analyzer/tristate.h: New file. Nothing really concerning here. Seems like a generic facility we'd like to be able to use elsewhere. Move outside the analyzer? jeff

Re: [PATCH 32/49] analyzer: new files: pending-diagnostic.{cc|h}

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch adds classes used by the analyzer for handling its > diagnostics > (queueing them, deduplicating them, precision-of-wording hooks). > > gcc/ChangeLog: > * analyzer/pending-diagnostic.cc: New file. > * analyzer/pending

Re: [PATCH 34/49] analyzer: new file: sm-malloc.cc

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch adds a state machine checker for malloc/free. > > gcc/ChangeLog: > * analyzer/sm-malloc.cc: New file. FWIW, I could easily see someone using this as a template for other checkers. It shows several key concepts that I suspe

Re: [PATCH 35/49] analyzer: new file: sm-file.cc

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch adds a state machine checker for stdio's FILE stream API. > > gcc/ChangeLog: > * analyzer/sm-file.cc: New file. I note this seems somewhat incomplete -- which is fine given my recommendation was to focus on the double-free

Re: [PATCH 36/49] analyzer: new file: sm-pattern-test.cc

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch adds a custom state machine checker intended purely for > DejaGnu > testing of the sm "machinery". > > gcc/ChangeLog: > * analyzer/sm-pattern-test.cc: New file. OK when prereqs are all approved. jeff

Re: [PATCH 37/49] analyzer: new file: sm-sensitive.cc

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch adds a state machine checker for tracking exposure of > sensitive data (e.g. writing passwords to log files). > > This checker isn't ready for production, and is presented as a > proof-of-concept of the sm-based approach. > > gc

Re: [PATCH 38/49] analyzer: new file: sm-taint.cc

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch adds a state machine checker for tracking "taint", > where data potentially under an attacker's control is used for > things like array indices without sanitization (CWE-129). > > This checker isn't ready for production, and is p

Re: [PATCH 39/49] analyzer: new files: analysis-plan.{cc|h}

2019-12-07 Thread Jeff Law
On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch adds an analysis_plan class, which encapsulate decisions > about > how the analysis should happen (e.g. the order in which functions > should > be traversed). > > gcc/ChangeLog: > * analyzer/analysis-plan.cc: New file. >

Re: [PATCH] avoid invoking assignment on uninitialized objects (PR 92761, 92762)

2019-12-07 Thread Jeff Law
On Tue, 2019-12-03 at 15:41 -0700, Martin Sebor wrote: > PR middle-end/92761 - hash_table::expand invokes assignment on invalid objects > PR middle-end/92762 - hash_table::empty_slow invokes assignment on invalid > objects > gcc/ChangeLog: > > PR middle-end/92761 > PR middle-end/92762

Re: Move -Wmaybe-uninitialized to -Wextra

2019-12-07 Thread Jeff Law
On Tue, 2019-11-26 at 19:33 +, Michael Witten wrote: > The problem with false positives is correlated with the degree of > optimization; a lot of people have reported problems at only the > `-Og' optimization level (even when the code in question is > embarrassingly correct). > > Theref

Re: Properly handle C2x attributes on types

2019-12-07 Thread Jeff Law
On Wed, 2019-11-27 at 12:23 +0100, Rainer Orth wrote: > Hi Joseph, > > > On Mon, 25 Nov 2019, Rainer Orth wrote: > > > > > it seems you missed updating a couple of testcases that are ia32- > > > only: > > > > I think it's unavoidable that such target-specific testcases need > > updating > > by

Re: [PATCH] Translate header for -fdbg-cnt-list.

2019-12-07 Thread Jeff Law
On Wed, 2019-11-27 at 14:08 +0100, Martin Liška wrote: > Hi. > > The patch is about translation of titles in -fdbg-cnt-list table. > > Patch can bootstrap on x86_64-linux-gnu and survives regression > tests. > > Ready to be installed? > Thanks, > Martin > > gcc/ChangeLog: > > 2019-11-27 Marti

Re: Fwd: [PATCH, GCC, Vect] Fix costing for vector shifts

2019-12-07 Thread Jeff Law
On Fri, 2019-12-06 at 14:05 +, Sudakshina Das wrote: > Hi > > While looking at the vectorization for following example, we > realized > that even though vectorizable_shift function was distinguishing > vector > shifted by vector from vector shifted by scalar, while modeling the > cost > it

Re: [PATCH 3/3] libgcc: Implement TARGET_LIBGCC_REMOVE_DSO_HANDLE

2019-12-07 Thread Jeff Law
On Wed, 2019-11-06 at 16:19 +, Jozef Lawrynowicz wrote: > From 7bc0971d2936ebe71e7b7d3d805cf1bbf9f9f5af Mon Sep 17 00:00:00 2001 > From: Jozef Lawrynowicz > Date: Mon, 4 Nov 2019 17:38:13 + > Subject: [PATCH 3/3] libgcc: Implement TARGET_LIBGCC_REMOVE_DSO_HANDLE > > gcc/ChangeLog: > > 20

Re: [PATCH 2/3] libgcc: Dont define __do_global_dtors_aux if it will be empty

2019-12-07 Thread Jeff Law
On Wed, 2019-11-06 at 16:17 +, Jozef Lawrynowicz wrote: > From 967262117f0c838fe8a9226484bf6e014c86f0ba Mon Sep 17 00:00:00 2001 > From: Jozef Lawrynowicz > Date: Tue, 29 Oct 2019 13:02:08 + > Subject: [PATCH 2/3] libgcc: Dont define __do_global_dtors_aux if it will be > empty > > libgcc

Re: [PATCH 2/2][MIPS][RFC] Emit .note.GNU-stack for hard-float linux targets.

2019-12-07 Thread Jeff Law
On Thu, 2019-11-07 at 17:05 +, Dragan Mladjenovic wrote: > On 01.11.2019. 11:32, Dragan Mladjenovic wrote: > > On 10.08.2019. 00:15, Joseph Myers wrote: > > > On Fri, 9 Aug 2019, Jeff Law wrote: > > > > > > > > 2019-08-05 Dragan Mladjenovic > > > > > > > > > > * config.in: Regenerated.

Re: [PATCH v2][MSP430] Add msp430-elfbare target

2019-12-07 Thread Jeff Law
On Fri, 2019-11-29 at 21:00 +, Jozef Lawrynowicz wrote: > The attached patch consolidates some configuration tweaks I > previously submitted > as modifications to the msp430-elf target into a new target called > "msp430-elfbare" i.e. "bare-metal". > > MSP430: Disable TM clone registry by defau

Re: [PATCH] [AARCH64] Improve vector generation cost model

2019-12-07 Thread Andrew Pinski
On Thu, May 2, 2019 at 9:10 AM Andrew Pinski wrote: > > On Thu, Mar 14, 2019 at 6:19 PM wrote: > > > > From: Andrew Pinski > > > > Hi, > > On OcteonTX2, ld1r and ld1 (with a single lane) are split > > into two different micro-ops unlike most other targets. > > This adds three extra costs to th

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-07 Thread Oleg Endo
On Tue, 2019-11-26 at 07:38 +0100, ste...@franke.ms wrote: > > On 11/21/19 10:30 AM, ste...@franke.ms wrote: > > > Hi there, > > > > > > here is mc68k's patch to switch the m68k architecture over to ccmode and > > > lra. See https://github.com/mc68kghost/gcc 68k-ccmode branch. > > > > Bernd Schmi

Re: [PATCH 22/49] analyzer: params.def: new parameters

2019-12-07 Thread Eric Gallager
On 12/7/19, Jeff Law wrote: > On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: >> gcc/ChangeLog: >> * params.def (PARAM_ANALYZER_BB_EXPLOSION_FACTOR): New param. >> (PARAM_ANALYZER_MAX_ENODES_PER_PROGRAM_POINT): New param. >> (PARAM_ANALYZER_MAX_RECURSION_DEPTH): New param. >