[PATCH] Check \0-termination of string in c_getstr (simplified version)

2016-10-13 Thread Martin Liška
Hello. After receiving feedback from Richi and Wilco Dijkstra, I decided to fully not support not null-terminated strings. It brings more complications and the code has started to be overengineered. Thus c_getstr accepts only such strings and as a bonus it returns length of a string. Patch can

[PATCH] Fold __builtin_memchr (simplified version 4)

2016-10-13 Thread Martin Liška
Simplified version that supports only valid null-terminated string constants. Apart from that, I added checking for constant folding of expressions that have side effects. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From

[PATCH] Test folding of str{n}{case}cmp and memchr (simplified version 4)

2016-10-13 Thread Martin Liška
Simplified version of tests, where I added tests for side effects. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 83da10e2bd4f4e36028ca33d7d3a0472e8b46d7a Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 16 Aug 2016

Re: [PATCH] Add a helper function: create_tmp

2016-10-12 Thread Martin Liška
On 10/11/2016 12:31 PM, Richard Biener wrote: > Hrm. Too easy to confuse with create_tmp_reg ... so maybe > create_tmp_reg_or_ssa_name? Yep, renamed function patch installed as r241030. Thanks, Martin

Re: [PATCH] Fold __builtin_str{n}{case}cmp functions (version 3)

2016-10-12 Thread Martin Liška
On 10/12/2016 10:30 AM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:33 AM, Martin Liška <mli...@suse.cz> wrote: >> Changes from the previous version: >> >> 1) Handle BUILT_IN_STRNCMP with length == -1. >> 2) Direct gimple stmts creation and usage gsi_repl

Re: [RFC] Speed-up -fprofile-update=atomic

2016-10-12 Thread Martin Liška
On 10/04/2016 11:45 AM, Richard Biener wrote: > On Thu, Sep 15, 2016 at 12:00 PM, Martin Liška <mli...@suse.cz> wrote: >> On 09/07/2016 02:09 PM, Richard Biener wrote: >>> On Wed, Sep 7, 2016 at 1:37 PM, Martin Liška <mli...@suse.cz> wrote: >>>> On

Re: [PATCH] Fold __builtin_memchr (version 3)

2016-10-12 Thread Martin Liška
On 10/12/2016 10:35 AM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:38 AM, Martin Liška <mli...@suse.cz> wrote: >> One question that comes to my mind is whether there's a possibility >> to fully test gimple folding of all cases if some of them are already >&g

Re: [PATCH] Check \0-termination of string in c_getstr

2016-10-12 Thread Martin Liška
On 10/11/2016 12:28 PM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:27 AM, Martin Liška <mli...@suse.cz> wrote: >> As mentioned in the email that I reply to, c_getstr should check >> null termination of string constants. >> >> Tests of the whole series have

Re: [PATCH] Test folding of str{n}{case}cmp and memchr (version 3)

2016-10-12 Thread Martin Liška
On 10/12/2016 10:34 AM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:38 AM, Martin Liška <mli...@suse.cz> wrote: >> Third iteration of tests, where I added both GENERIC and GIMPLE folding >> tests. > > They should work already with -O1? Yes, they work. Sendi

[RFC] Possible folding opportunities for string built-ins

2016-10-12 Thread Martin Liška
Hi. As you probably mentioned, simple folding improvement has grown to multiple patches and multiple iterations. Apart from that, I also noticed that we do not do the best for couple of cases and I would like to have a feedback if it worth to improve or not? $ cat

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope (v2)

2016-10-12 Thread Martin Liška
r all local variables. Or am I wrong? > - try to improve the goto handling Works for me to be target for stage3. I'm sending a new version where all mentioned notes should be fixed. Thanks, Martin > > On Mon, Oct 03, 2016 at 11:27:38AM +0200, Martin Liška wrote: >> +

[PATCH] Do not merge BBs with a different EH landing pads (PR, tree-optimization/77943)

2016-10-13 Thread Martin Liška
Hi. Following patch adds code that is already present in IPA ICF. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 542c318af84ca561661b42baca3da7c340971dd8 Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 12 Oct 2016

Re: [PATCH] Do not merge BBs with a different EH landing pads (PR, tree-optimization/77943)

2016-10-13 Thread Martin Liška
On 10/13/2016 10:46 AM, Richard Biener wrote: > On Thu, Oct 13, 2016 at 9:40 AM, Martin Liška <mli...@suse.cz> wrote: >> Hi. >> >> Following patch adds code that is already present in IPA ICF. >> Patch can bootstrap on ppc64le-redhat-linux and survives regression t

Re: [PATCH, RFC] gcov: dump in a static dtor instead of in an atexit handler

2016-10-13 Thread Martin Liška
On 10/13/2016 03:46 PM, Rainer Orth wrote: > Hi Martin, > > sorry for the long delay: I've been extremely busy the last two weeks. Hello Never mind, still plenty of time before we'll release 7.1.0 :) > >> On 09/30/2016 02:31 PM, Rainer Orth wrote: >>> this would be i386-pc-solaris2.12. I'm

Re: [PATCH 2/3] Fold __builtin_memchr (version 2)

2016-10-10 Thread Martin Liška
On 10/07/2016 01:21 PM, Wilco Dijkstra wrote: > Hi, > >> -static int >> +int >> target_char_cast (tree cst, char *p) > >> + if (target_char_cast (arg2, )) >> +return false; > > I believe target_char_cast is incorrect if the host/target chars are not > identical > (depending on how

[PATCH] Add a helper function: create_tmp

2016-10-11 Thread Martin Liška
Following patch is a small infrastructure enhancement in gimple-fold.c. Tests of the whole series have been running. Thanks, Martin >From cf5983472b8482734393680493293811e5400d6e Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 11 Oct 2016 11:20:33 +0200 Subject: [PATCH 2/5] Add

[PATCH] Fold __builtin_str{n}{case}cmp functions (version 3)

2016-10-11 Thread Martin Liška
Changes from the previous version: 1) Handle BUILT_IN_STRNCMP with length == -1. 2) Direct gimple stmts creation and usage gsi_replace_with_seq_vops. (hope using of replace_call_with_value is fine if replacing with a cst?) 3) lhs == NULL cases are handled (Or is it fine to replace with a nop in

[PATCH] Fold __builtin_memchr (version 3)

2016-10-11 Thread Martin Liška
On 10/07/2016 01:01 PM, Richard Biener wrote: > On Fri, Oct 7, 2016 at 10:41 AM, Martin Liška <mli...@suse.cz> wrote: >> Resending the patch, where I implemented folding in gimple-fold.c >> >> Patch can bootstrap on ppc64le-redhat-linux and survives regression

[PATCH] Check \0-termination of string in c_getstr

2016-10-11 Thread Martin Liška
As mentioned in the email that I reply to, c_getstr should check null termination of string constants. Tests of the whole series have been running. Thanks, Martin >From b446c659e839caa5ea5f36b06ec9110fe69f6e38 Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 10 Oct 2016 12:13:12

Re: [PATCH 1/3] Fold __builtin_str{n}{case}cmp functions (version 2)

2016-10-11 Thread Martin Liška
On 10/07/2016 12:50 PM, Richard Biener wrote: > On Fri, Oct 7, 2016 at 10:39 AM, Martin Liška <mli...@suse.cz> wrote: >> I'm resending the patch, where I implemented all builtins mentions in subject >> in gimp-fold.c. >> >> Patch can bootstrap on ppc64le-redhat-li

[PATCH] Test folding of str{n}{case}cmp and memchr (version 3)

2016-10-11 Thread Martin Liška
Third iteration of tests, where I added both GENERIC and GIMPLE folding tests. Martin >From ac9020c31a6f5291c896a90aae594dd564420d95 Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 16 Aug 2016 15:56:01 +0200 Subject: [PATCH 5/5] Test folding of str{n}{case}cmp and memchr

Re: [RFC] Speed-up -fprofile-update=atomic

2016-10-17 Thread Martin Liška
On 10/13/2016 11:43 AM, Richard Biener wrote: > On Wed, Oct 12, 2016 at 3:52 PM, Martin Liška <mli...@suse.cz> wrote: >> On 10/04/2016 11:45 AM, Richard Biener wrote: >>> On Thu, Sep 15, 2016 at 12:00 PM, Martin Liška <mli...@suse.cz> wrote: >>>> On

[PATCH] Support nested functions (PR sanitize/78541).

2016-11-29 Thread Martin Liška
Currently we an assert that prevents proper use-after-scope sanitization in nested functions. With the attached patch, we are able to do so. I'm adding 2 test-cases, first one is the ICE reported in PR and the second one tests proper report of use-after-scope passed by FRAME belonging to a nested

[PATCH] Make one extra BB to prevent PHI argument clash (PR, gcov-profile/78582)

2016-11-29 Thread Martin Liška
Following ICE has been reduced from bash, where a new CFG does not properly fill a newly added PHI argument. Problem is solved by adding one extra BB that precedes the original BB with the PHI. Doing so, we do not add a new PHI argument. Tests have been running. Ready to be installed after it

Re: [PATCH] Escape non-printable chars in dumped strings.

2016-12-08 Thread Martin Liška
There's a patch that adds a new test-case for that. Martin >From e8805309edca43153721ce3c79252a4f4a3b2073 Mon Sep 17 00:00:00 2001 From: marxin Date: Thu, 8 Dec 2016 15:59:28 +0100 Subject: [PATCH] New test gcc/testsuite/ChangeLog: 2016-12-08 Martin Liska *

Re: [RFC][PATCH] Speed-up use-after-scope (re-writing to SSA)

2016-12-08 Thread Martin Liška
On 12/02/2016 01:29 PM, Richard Biener wrote: > On Thu, Dec 1, 2016 at 5:30 PM, Martin Liška <mli...@suse.cz> wrote: >> On 11/23/2016 03:13 PM, Jakub Jelinek wrote: >>> On Wed, Nov 23, 2016 at 02:57:07PM +0100, Martin Liška wrote: >>>> I started r

[PATCH] Escape non-printable chars in dumped strings.

2016-12-08 Thread Martin Liška
Hello. Following patch changes behavior in pretty_print_string, where all non-printable characters are encoded as \x%x. Currently, when some non-printable characters are directly printed to a dump file stream. That makes it complicated to read a dump file for instance via a Python script.

[PATCH] Print 2 digits after decimal delimiter for BB frequencies

2016-12-08 Thread Martin Liška
With the patch applied, one can distinguish between PROB_VERY_UNLIKELY and real zero probability: f () { int _1; [100.00%]: _1 = __builtin_sprintf (, "%i", 12); if (_1 != 2) goto ; [0.04%] else goto ; [99.96%] [0.04%]: __builtin_abort (); [99.96%]: return; }

Re: [PATCH] Print 2 digits after decimal delimiter for BB frequencies

2016-12-08 Thread Martin Liška
On 12/08/2016 05:39 PM, Martin Sebor wrote: > On 12/08/2016 05:55 AM, Martin Liška wrote: >> With the patch applied, one can distinguish between PROB_VERY_UNLIKELY and >> real zero probability: > > I tried to see if formatting the expression > > e->probabil

Re: [PATCH] Escape non-printable chars in dumped strings.

2016-12-09 Thread Martin Liška
On 12/09/2016 11:00 AM, Richard Biener wrote: > On Thu, Dec 8, 2016 at 2:37 PM, Martin Liška <mli...@suse.cz> wrote: >> Hello. >> >> Following patch changes behavior in pretty_print_string, where all >> non-printable >> characters are encoded as \

[PATCH] Enhance analyze_brprob script

2016-12-09 Thread Martin Liška
Following patch enhances scripts and fixed various small issues. Ready to be installed? Martin >From 626b70eb3526d848e2f1741f8b2384c518d2067b Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 9 Dec 2016 11:00:16 +0100 Subject: [PATCH] Enhance analyze_brprob script

Re: [PATCH] Enhance analyze_brprob script

2016-12-09 Thread Martin Liška
On 12/09/2016 11:02 AM, Martin Liška wrote: > Following patch enhances scripts and fixed various small issues. > > Ready to be installed? > > Martin > I forgot to squash commits, this is the right patch. M. >From c64469dcdf114ab3a432a9006be3d291df62b8a1 Mon Sep 17 00:00

Re: [PATCH] Fill bitregion_{start,end} in store_constructor (PR, tree-optimization/78428).

2016-12-09 Thread Martin Liška
On 11/23/2016 11:49 AM, Richard Biener wrote: > On Wed, Nov 23, 2016 at 11:26 AM, Martin Liška <mli...@suse.cz> wrote: >> Following patch fixes situation where we do a store to a bitfield which >> is at boundary of a record. This leads to usage of wider store, leading >>

[RFC][PATCH] Sanopt for use-after-scope ASAN_MARK internal functions

2016-12-09 Thread Martin Liška
Hello. I've spent quite some time reading sanopt pass and I eventually decided to come up with quite simplified optimization algorithm for ASAN_MARK internal functions. As the most interesting (common) cases are that an ASAN_MARK unpoison is dominated by entry block (where we unpoison all

Re: [RFC][PATCH] Sanopt for use-after-scope ASAN_MARK internal functions

2016-12-09 Thread Martin Liška
On 12/09/2016 12:56 PM, Jakub Jelinek wrote: > On Fri, Dec 09, 2016 at 12:39:24PM +0100, Martin Liška wrote: >> + if (is_gimple_call (stmt) && gimple_call_internal_p (stmt)) >> +{ >> + enum internal_fn ifn = gimple_call_internal_fn (stm

[PATCH] Add pretty printer for ASAN_MARK and add a helper fn

2016-12-13 Thread Martin Liška
It would be easier to read ASAN_MARK (UNPOISON, , 4); instead of ASAN_MARK (2, , 4); Apart from that new helper function asan_mark_p is added. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From ff843db17ba284d2e99bab567d76d4b779f9f1d6

Re: [PATCH] Fill bitregion_{start,end} in store_constructor (PR, tree-optimization/78428).

2016-12-13 Thread Martin Liška
On 12/12/2016 12:10 PM, Eric Botcazou wrote: >> Ok. I'm sending a patch that put gcc_unreachable to places where either size >> or (and) offset is a non-constant. This survives regression tests >> (including ada) on x86_64-linux-gnu. Apart from that normal bootstrap + >> regression tests works

Re: [RFC][PATCH] Sanopt for use-after-scope ASAN_MARK internal functions

2016-12-13 Thread Martin Liška
I'm sending updated version that uses asan_mark_p predicate and the patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From d0ff310f636e8281198d5b549d00e6e5d94972e0 Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 12 Dec

[PATCH] Do not sanitize in lower_omp_target context (PR, sanitizer/78815).

2016-12-16 Thread Martin Liška
Currently, use-after-scope relies on fact that entry point of gimplify_decl_expr is gimplify_function_tree. Fixed by checking if asan_poisoned_variables is non-null. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From

Re: [RFC][PATCH] Sanopt for use-after-scope ASAN_MARK internal functions

2016-12-13 Thread Martin Liška
On 12/13/2016 10:17 AM, Jakub Jelinek wrote: > On Tue, Dec 13, 2016 at 09:56:00AM +0100, Martin Liška wrote: >> @@ -671,18 +678,203 @@ public: >> >> }; // class pass_sanopt >> > > Please add a short function comment here... > >> +static

Re: [PATCH] Add pretty printer for ASAN_MARK and add a helper fn

2016-12-13 Thread Martin Liška
On 12/13/2016 10:05 AM, Jakub Jelinek wrote: > Ok. But the builtins should be renamed too (incrementally), > BUILT_IN_ASAN_CLOBBER_N, "__asan_poison_stack_memory", > should really be BUILT_IN_ASAN_POISON_STACK_MEMORY etc. > > Jakub This is follow-up that I've just tested and

Re: [RFC][PATCH] Sanopt for use-after-scope ASAN_MARK internal functions

2016-12-13 Thread Martin Liška
On 12/13/2016 01:29 PM, Jakub Jelinek wrote: > On Tue, Dec 13, 2016 at 01:12:34PM +0100, Martin Liška wrote: >>>> + gimple_stmt_iterator gsi; >>>> + bool finish = false; >>>> + for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi_prev ()) >

Re: [PATCH] Fill bitregion_{start,end} in store_constructor (PR, tree-optimization/78428).

2016-12-06 Thread Martin Liška
Pinging Eric. On 11/23/2016 11:49 AM, Richard Biener wrote: > On Wed, Nov 23, 2016 at 11:26 AM, Martin Liška <mli...@suse.cz> wrote: >> Following patch fixes situation where we do a store to a bitfield which >> is at boundary of a record. This leads to usage of

[PATCH] Fix optimized out volatile MEM_REF (PR, tree-optimization/78810)

2016-12-15 Thread Martin Liška
The patch adds TREE_THIS_VOLATILE check that was removed in r239778. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From dc8ec6815fa51b352fe5f1a02d3510022053e0ad Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 14 Dec

Re: [PATCH] Fill bitregion_{start,end} in store_constructor (PR, tree-optimization/78428).

2016-12-15 Thread Martin Liška
On 12/13/2016 03:35 PM, Richard Biener wrote: > OK from my POV. > > Thanks, > Richard. Hi. I prepared backport (and tested) for GCC 5 and 6 branches, may I install the patch after 6.3 will be released? Thanks, Martin

Re: [PATCH] Reload global options when strict aliasing is dropped (PR ipa/79043).

2017-01-13 Thread Martin Liška
On 01/13/2017 01:16 PM, Richard Biener wrote: > On Tue, Jan 10, 2017 at 4:28 PM, Martin Liška <mli...@suse.cz> wrote: >> As mentioned in the PR, we currently do not properly reload global >> optimization options when we drop strict-aliasing flag on a function >> that

[PATCH] Fix wrong assumption in contains_type_p (PR ipa/71207).

2017-01-13 Thread Martin Liška
Hello. As mentioned in the PR, having a diamond virtual inheritance can cause a wrong assumption done in contains_type_p. I also decided to rename one argument of the function as otr_type and outer_type names are very confusing. Apart from what was written in bugzilla I also verified that after

[PATCH] Do not declare artificial variables in tree-profile.c to have a definition (PR lto/69188).

2017-01-13 Thread Martin Liška
Hello. Nice example provided in the PR causes ICE as we have an artificial symbol created in tree-profile.c once being removed by remove unreachable nodes (-O0) and once not (-O1). Well, difference is in process_references where following hunk prevent removal: ||

Re: [PATCH 2/2] IPA ICF: make algorithm stable to survive -fcompare-debug

2017-01-11 Thread Martin Liška
On 01/11/2017 11:28 AM, Jakub Jelinek wrote: > On Wed, Jan 11, 2017 at 11:21:08AM +0100, Christophe Lyon wrote: >> Since then, I've noticed that >> gcc.dg/tree-ssa/flatten-3.c scan-assembler cycle[123][: \t\n] >> now fails on aarch64 and arm targets. > > It fails on x86_64-linux and i686-linux

Re: [PATCH 2/2] IPA ICF: make algorithm stable to survive -fcompare-debug

2017-01-10 Thread Martin Liška
On 01/10/2017 02:56 PM, Richard Biener wrote: On Mon, Jan 9, 2017 at 4:05 PM, Martin Liška <mli...@suse.cz> wrote: Second part of the patch does sorting of final congruence classes, it's groups and items included in the groups according DECL_UID. Both patches can bootstrap together on p

[PATCH] Reload global options when strict aliasing is dropped (PR ipa/79043).

2017-01-10 Thread Martin Liška
As mentioned in the PR, we currently do not properly reload global optimization options when we drop strict-aliasing flag on a function that equals to cfun. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From

Re: [PATCH 2/2] IPA ICF: make algorithm stable to survive -fcompare-debug

2017-01-11 Thread Martin Liška
On 01/11/2017 11:28 AM, Jakub Jelinek wrote: > On Wed, Jan 11, 2017 at 11:21:08AM +0100, Christophe Lyon wrote: >> Since then, I've noticed that >> gcc.dg/tree-ssa/flatten-3.c scan-assembler cycle[123][: \t\n] >> now fails on aarch64 and arm targets. > > It fails on x86_64-linux and i686-linux

Re: [RFC][PATCH] Speed-up use-after-scope (re-writing to SSA)

2016-12-01 Thread Martin Liška
On 11/23/2016 03:13 PM, Jakub Jelinek wrote: > On Wed, Nov 23, 2016 at 02:57:07PM +0100, Martin Liška wrote: >> I started review process in libsanitizer: https://reviews.llvm.org/D26965 >> And I have a question that was asked in the review: can we distinguish >> between load

Re: [PATCH] Dump probability for edges a frequency for BBs

2016-12-01 Thread Martin Liška
On 12/01/2016 05:49 PM, Martin Sebor wrote: Okay, thanks for the clarification. One other question though. Why would the probability be near zero? In the absence of any hints the expression 2 != sprintf(d, "%i", 12) should have a very high probability of being true, near 100% in fact. I ask

Re: [PATCH] Dump probability for edges a frequency for BBs

2016-12-01 Thread Martin Liška
On 11/30/2016 11:46 PM, Martin Sebor wrote: On 11/24/2016 05:59 AM, Martin Liška wrote: On 11/24/2016 09:29 AM, Richard Biener wrote: Please guard with ! TDF_GIMPLE, otherwise the output will not be parseable with the GIMPLE FE. RIchard. Done and verified that and it provides equal dumps

[PATCH] Fix runtime error: left shift of negative value (PR, ipa/78555).

2016-12-01 Thread Martin Liška
As described in the PR, we do couple of shifts of a negative value. Fixed in the patch and couple of new unit tests are added. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 61a6b5e0c973bd77341a1053609c7ad331691a9e Mon Sep 17

Re: [PATCH] Do not suggest -fsanitize=all (PR driver/78863).

2017-01-02 Thread Martin Liška
On 12/21/2016 04:03 PM, Martin Liška wrote: > On 12/21/2016 11:28 AM, Jakub Jelinek wrote: >> On Wed, Dec 21, 2016 at 11:20:33AM +0100, Martin Liška wrote: >>> I like your approach! >>> make check -k -j10 RUNTESTFLAGS="dg.exp=spellcheck-options-*" works fine.

Re: [PATCH] Do not sanitize in lower_omp_target context (PR, sanitizer/78815).

2017-01-05 Thread Martin Liška
On 01/04/2017 10:31 AM, Jakub Jelinek wrote: > On Wed, Jan 04, 2017 at 10:19:28AM +0100, Martin Liška wrote: >> PING^1 >> >> On 12/16/2016 01:04 PM, Martin Liška wrote: >>> Currently, use-after-scope relies on fact that entry point of >>> gimplify_decl_ex

Re: [PATCH] vimrc: fix TAB settings

2017-01-05 Thread Martin Liška
On 01/04/2017 10:14 PM, Gerald Pfeifer wrote: > On Mon, 14 Nov 2016, Martin Liška wrote: >> Following patch adds TAB settings to contrib/vimrc file. >> Hope it looks reasonable? > > This does not appear applied, are you waiting for approval? If > so, for something like

Re: [PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)

2017-01-05 Thread Martin Liška
On 01/05/2017 10:11 AM, Jakub Jelinek wrote: > On Thu, Jan 05, 2017 at 10:00:33AM +0100, Martin Liška wrote: >> Having '-' used as indication that input should be taken from standard input >> is unfriendly to pch which calculates md5sum of all input file descriptors. >> W

[PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)

2017-01-05 Thread Martin Liška
Having '-' used as indication that input should be taken from standard input is unfriendly to pch which calculates md5sum of all input file descriptors. With that fdopen fails for STDIN_FILENO. To be honest my patch is just a workaround for the ICE. Is there a better solution for that? Patch can

Re: [PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)

2017-01-05 Thread Martin Liška
On 01/05/2017 11:09 AM, Jakub Jelinek wrote: > On Thu, Jan 05, 2017 at 11:01:37AM +0100, Martin Liška wrote: >> >From 0e14f21128c7aa67ed0eaa10877323a0b2011b63 Mon Sep 17 00:00:00 2001 >> From: marxin <mli...@suse.cz> >> Date: Wed, 4 Jan 2017 16:04:44 +

Re: [PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)

2017-01-05 Thread Martin Liška
On 01/05/2017 02:30 PM, Jakub Jelinek wrote: > On Thu, Jan 05, 2017 at 02:08:40PM +0100, Martin Liška wrote: >> diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c >> index 14e038c02b3..49df9e19157 100644 >> --- a/gcc/c-family/c-opts.c >> +++ b/gcc/c-family/c-

[PATCH] [HSA] Implement DIVMOD internal function call

2017-01-05 Thread Martin Liška
As DIVMOD has started to be used on x86_64, HSA targets needs to understand the internal function call. It's implemented by tuple of division and remainder or arguments. It's pre-approved by Martin Jambor for both hsa branch and trunk. Patch can bootstrap on x86_64-linux-gnu and survives

Re: [PATCH] Speed-up use-after-scope (re-writing to SSA) (version 2)

2017-01-09 Thread Martin Liška
On 12/22/2016 06:21 PM, Jakub Jelinek wrote: > On Thu, Dec 22, 2016 at 06:03:50PM +0100, Martin Liška wrote: >> Done by hash_map. > > Ok. > >>> 3) I think you just want to do copy_node, plus roughly what >>>copy_decl_for_dup_finish does (and set DECL_

[PATCH] Do not error when -E provided (PR pch/78970).

2017-01-09 Thread Martin Liška
Hello. As reported here https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78970#c7, we should not report error when one want to pre-compile a {c,c++}-header file. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Martin >From

[RFC] [PATCH] Ignore Debug options for ICF equality.

2017-01-09 Thread Martin Liška
Hello. Thanks Alexander for fixed the issue. In the meantime, I worked on a patch that would be more generic and would introduce cl_optimization_eq function. It's definitely stage1 material and it adds 'Debug' keyword to Optimization options (equal to PerFunction that is currently in trunk).

[PATCH 2/2] IPA ICF: make algorithm stable to survive -fcompare-debug

2017-01-09 Thread Martin Liška
Second part of the patch does sorting of final congruence classes, it's groups and items included in the groups according DECL_UID. Both patches can bootstrap together on ppc64le-redhat-linux and survive regression tests. Ready to be installed? Martin >From

[PATCH 1/2] Revert m_classes_vec introduction.

2017-01-09 Thread Martin Liška
First patch removes basically what was installed by Jakub in r242910, except formatting changes. Martin >From 32f4ccb48dfd84e4f64fb38f5122f5dc61482f3b Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 6 Jan 2017 11:36:13 +0100 Subject: [PATCH 1/2] Revert m_classes_vec

Re: [PATCH] Add RejectNegative for a c option.

2016-12-29 Thread Martin Liška
On 12/27/2016 07:18 PM, Sandra Loosemore wrote: > On 12/27/2016 09:26 AM, Martin Liška wrote: >> Without RejectNegative one can cause an ICE in the compiler. >> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. >> >> Ready to be installed? >&g

Re: RFC [1/3] divmod transform v2

2017-01-02 Thread Martin Liška
On 10/16/2016 07:59 AM, Prathamesh Kulkarni wrote: > + /* Disable the transform if either is a constant, since > division-by-constant > + may have specialized expansion. */ > + if (CONSTANT_CLASS_P (op1) || CONSTANT_CLASS_P (op2)) > +return false; Hello. I've just played a bit with

Re: [PATCH] Do not sanitize in lower_omp_target context (PR, sanitizer/78815).

2017-01-04 Thread Martin Liška
PING^1 On 12/16/2016 01:04 PM, Martin Liška wrote: > Currently, use-after-scope relies on fact that entry point of > gimplify_decl_expr > is gimplify_function_tree. Fixed by checking if asan_poisoned_variables is > non-null. > > Patch can bootstrap on ppc64le-redhat-

Re: [-fcompare-debug] var tracking options are not optimization options

2017-01-06 Thread Martin Liška
On 01/06/2017 10:46 AM, Jakub Jelinek wrote: > On Fri, Jan 06, 2017 at 12:49:54AM -0200, Alexandre Oliva wrote: >> On Jan 5, 2017, Jakub Jelinek wrote: >> >>> You've just changed the hash function and my mail was about the fact that >>> it is not enough. >> >> Sorry, it wasn't

Re: [-fcompare-debug] var tracking options are not optimization options

2017-01-06 Thread Martin Liška
On 01/06/2017 11:07 AM, Richard Biener wrote: > On January 6, 2017 3:49:54 AM GMT+01:00, Alexandre Oliva > wrote: >> On Jan 5, 2017, Jakub Jelinek wrote: >> >>> You've just changed the hash function and my mail was about the fact >> that >>> it is not

Re: [PATCH] Implement no_sanitize function attribute

2017-01-06 Thread Martin Liška
PING^1 On 12/22/2016 02:38 PM, Martin Liška wrote: > Hello. > > As I previously agreed with Jakub, I prepared patch which adds > no_sanitize function attribute (same what clang support). > > That encompasses following changes: > 1) all no_sanitize_* function attributes

[PATCH] Fix lto-bootstrap (PR bootstrap/79003).

2017-01-06 Thread Martin Liška
Hello. This enables doable LTO bootstrap w/o -disable-werror. First change is mentioned in the PR, second is adding -fno-lto to libdecnumber. Honza told me that proper fix would take more effort as it's an old library. Last needed hunk handles -Wmaybe-uninitialized, as described in

Re: [PATCH] Do not error when -E provided (PR pch/78970).

2017-01-10 Thread Martin Liška
On 01/09/2017 04:12 PM, Jakub Jelinek wrote: Was ? Ok with that change. Jakub Thanks for review, installed as r244227. I've finished testing for both active branches, may I install the patch? Martin

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2017-01-10 Thread Martin Liška
PING^1 On 12/20/2016 03:55 PM, Martin Liška wrote: On 12/20/2016 11:06 AM, Martin Jambor wrote: ...this test should be for ADDR_EXPR here. Or you could switch the IPA_REF_* constants the other way round which I bet is going to have the same effect in practice, but personally, I'd test

[PATCH] Do not suggest -fsanitize=all (PR driver/78863).

2016-12-21 Thread Martin Liška
As mentioned in the PR, we should not suggest option that is not allowed. Fixed by explicit removal of suggestions that are not acceptable. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 1a2d5614e9a0515659f50b457ef031c1f80f4a7c Mon

Re: [PATCH] Do not suggest -fsanitize=all (PR driver/78863).

2016-12-21 Thread Martin Liška
On 12/21/2016 11:00 AM, Jakub Jelinek wrote: > On Wed, Dec 21, 2016 at 10:34:13AM +0100, Martin Liška wrote: >> As mentioned in the PR, we should not suggest option that is not allowed. >> Fixed by explicit removal of suggestions that are not acceptable. >> >> Patch can

[PATCH] Speed-up use-after-scope (re-writing to SSA) (version 2)

2016-12-20 Thread Martin Liška
On 11/16/2016 05:28 PM, Jakub Jelinek wrote: > Otherwise LGTM, but please post the asan patch to llvm-commits > or through their web review interface. > > Jakub Ok, llvm folks are unwilling to accept the new API function, thus I've decided to come up with approach suggested by Jakub.

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2016-12-20 Thread Martin Liška
On 12/20/2016 11:06 AM, Martin Jambor wrote: > ...this test should be for ADDR_EXPR here. Or you could switch the > IPA_REF_* constants the other way round which I bet is going to have > the same effect in practice, but personally, I'd test for ADDR_EXPR. Thanks for the note, fixed (and tested

[PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2016-12-19 Thread Martin Liška
Hello. Building mariadb with -flto exposes a bug which I also used to see in Firefox. It's caused by IPA CP starting from r236418, where the pass started to propagate const VAR_DECLs. Problem is that the pass does not update call graph by adding IPA_REF_READ of the propagated variable. Patch

[PATCH] Add RejectNegative for a c option.

2016-12-27 Thread Martin Liška
Without RejectNegative one can cause an ICE in the compiler. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From e005f69008daf6ad7705a2f9c3d0242e426c168f Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 27 Dec 2016

Re: [PATCH] Speed-up use-after-scope (re-writing to SSA) (version 2)

2016-12-22 Thread Martin Liška
On 12/21/2016 09:52 AM, Jakub Jelinek wrote: > On Tue, Dec 20, 2016 at 12:26:41PM +0100, Martin Liška wrote: >> Ok, llvm folks are unwilling to accept the new API function, thus I've >> decided to come up >> with approach suggested by Jakub. Briefly, when expanding ASA

[PATCH] Fix tree-optimization/78886.

2016-12-22 Thread Martin Liška
Patch is pre-approved by Jakub. I guess the same patch can be install to both release branches after it finishes regression tests, right? Thanks, Martin >From b0efc394e047ebc25386f8cb99f595b8d4c7f83a Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 21 Dec 2016 16:21:45 +0100

[PATCH] Implement no_sanitize function attribute

2016-12-22 Thread Martin Liška
Hello. As I previously agreed with Jakub, I prepared patch which adds no_sanitize function attribute (same what clang support). That encompasses following changes: 1) all no_sanitize_* function attributes are parsed and stored to no_sanitize_flags in DECL_ATTRIBUTES 2) instead of flag_sanitize

Re: [PATCH] Do not suggest -fsanitize=all (PR driver/78863).

2016-12-21 Thread Martin Liška
On 12/21/2016 11:28 AM, Jakub Jelinek wrote: > On Wed, Dec 21, 2016 at 11:20:33AM +0100, Martin Liška wrote: >> I like your approach! >> make check -k -j10 RUNTESTFLAGS="dg.exp=spellcheck-options-*" works fine. >> >> Am I install the patch after it surv

Backport to GCC6 (part 2)

2017-03-22 Thread Martin Liška
Hello. There are 4 patches I'm going to install. Patches can bootstrap on x86_64-linux-gnu and survives regression tests. Martin >From d0337d6690f925a323f6b271e9a138ae463c9e7e Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 3 Feb 2017 15:22:47 +

Backport to GCC5 (part 2)

2017-03-22 Thread Martin Liška
And there's a single patch that I'll install after bootstrap and regression tests. Martin >From cc7922d08b8b5234758e31e2d91557fd7f6cac9b Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 22 Feb 2017 09:45:42 + Subject: [PATCH] Backport r245647

Re: [PATCH 0/3] Introduce internal_error_cont and exclude it from pot files

2017-03-24 Thread Martin Liška
I would like to ping that. I'm not sure what's agreement after I read discussion in: https://gcc.gnu.org/ml/gcc/2017-03/msg00070.html Martin Sebor may know, CC'ing him. Thanks, Martin

[PATCH] Fix calls.c for a _complex type (PR ipa/80104).

2017-03-24 Thread Martin Liška
Hello. Briefly described in the PR, running ICF (without any optimization level) can create a thunk call that does not use an SSA_NAME which is a default def of an argument of the caller: c (complex float b) { complex float arg.1; float retval.0; [100.00%]: arg.1_2 = b; retval.0_4

Re: [PATCH] Fix calls.c for a _complex type (PR ipa/80104).

2017-03-24 Thread Martin Liška
On 03/24/2017 12:49 PM, Richard Biener wrote: > On Fri, Mar 24, 2017 at 10:25 AM, Martin Liška <mli...@suse.cz> wrote: >> Hello. >> >> Briefly described in the PR, running ICF (without any optimization level) >> can create a thunk call >> that does not

Re: [PATCH] Handle PHI nodes w/o a argument (PR ipa/80205).

2017-03-28 Thread Martin Liška
On 03/27/2017 04:27 PM, Richard Biener wrote: > On Mon, Mar 27, 2017 at 4:14 PM, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Mon, Mar 27, 2017 at 2:47 PM, Martin Liška <mli...@suse.cz> wrote: >>> Hello. >>> >>> As described in t

[PATCH] Support multiple files w/ -i option in gcov (PR gcov-profile/80224).

2017-03-28 Thread Martin Liška
Hello. The fix of the PR, where intermediate format is currently dumped in a bit different manner. I believe it can share majority of file creation (and destruction) with normal format. Apart from that I refined usage string from: Usage: gcov [OPTION]... SOURCE|OBJ... to: Usage: gcov

Re: [PATCH] gcov: Mark BBs that do not correspond to a line in source code (PR gcov-profile/79891).

2017-03-27 Thread Martin Liška
On 03/21/2017 07:39 PM, Nathan Sidwell wrote: > Martin, Richard, > I've read up on the thread, but I'm not sure where you guys are with an > actual patch. From what I Richard nailed it in BZ with the comment that the > BB should not be associated with any source line. That's a new thing, so I

Re: [PATCH] Fix calls.c for a _complex type (PR ipa/80104).

2017-03-27 Thread Martin Liška
Hello. There's alternative approach suggested by Martin Jambor. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests and s390x cross compiler does not ICE. Martin >From f9e40be62e525d29347339316073fae425b0d516 Mon Sep 17 00:00:00 2001 From: marxin Date: Fri,

[PATCH] Handle PHI nodes w/o a argument (PR ipa/80205).

2017-03-27 Thread Martin Liška
Hello. As described in the PR, we can create a PHI node in einline that has no argument. That can cause ICE in devirtualization and should be thus handled. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From

[PATCH] Cherry-pick upstream r299036 from libsanitizer (PR sanitizer/80166).

2017-03-31 Thread Martin Liška
Hello. Cherry-picking the commit to fix PR reported originally to the GCC. Ready to install after it finishes regression tests? Thanks, Martin >From 36cc9827dd47f213bb17dd7e37b3b19b740a0928 Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 31 Mar 2017 10:28:25 +0200 Subject:

Re: [PATCH 1/5] Fix *_CST ICEs connected to MPX.

2017-03-15 Thread Martin Liška
On 03/15/2017 12:58 AM, Ilya Enkovich wrote: 2017-03-13 16:33 GMT+03:00 Martin Liška <mli...@suse.cz>: On 03/13/2017 02:07 PM, Richard Biener wrote: No, that can't happen. I said that for example for struct S { ... } s; foo (s); pass_by_reference may be true but on gimple you see a st

<    5   6   7   8   9   10   11   12   13   14   >