Re: [PATCH][combine] PR middle-end/71074 Check that const_op is >= 0 before potentially shifting in simplify_comparison

2016-05-13 Thread Bernd Schmidt
On 05/13/2016 03:22 PM, Kyrill Tkachov wrote: /* We only want to handle integral modes. This catches VOIDmode, CCmode, and the floating-point modes. An exception is that we @@ -11649,7 +11649,8 @@ simplify_comparison (enum rtx_code code, /* Try to simplify the compare to

Re: Thoughts on memcmp expansion (PR43052)

2016-05-13 Thread Bernd Schmidt
On 05/13/2016 03:07 PM, Richard Biener wrote: On Fri, May 13, 2016 at 3:05 PM, Bernd Schmidt wrote: Huh? Can you elaborate? When you have a builtin taking a size in bytes then a byte is 8 bits, not BITS_PER_UNIT bits. That makes no sense to me. I think the definition of a byte depends on

Re: Thoughts on memcmp expansion (PR43052)

2016-05-13 Thread Bernd Schmidt
On 05/13/2016 12:20 PM, Richard Biener wrote: I'm not much of a fan of C++-ification (in this case it makes review harder) but well ... I felt it was a pretty natural way to structure the code to avoid duplicating the same logic across more functions, and we might as well use the language for

Re: [PATCH][combine] PR middle-end/71074 Check that const_op is >= 0 before potentially shifting in simplify_comparison

2016-05-13 Thread Bernd Schmidt
On 05/13/2016 02:21 PM, Kyrill Tkachov wrote: Hi all, In this PR we may end up shifting a negative value left in simplify_comparison. The statement is: const_op <<= INTVAL (XEXP (op0, 1)); This patch guards the block of that statement by const_op >= 0. I _think_ that's a correct thing to do for

Re: [PATCH 7/7] SMS remove dependence on doloop: To identify read/write register as loop induction variable

2016-05-13 Thread Bernd Schmidt
On 05/05/2016 08:03 AM, Shiva Chen wrote: - /* We do not handle setting only part of the register. */ - if (DF_REF_FLAGS (adef) & DF_REF_READ_WRITE) -return GRD_INVALID; - This isn't right, at least not without other changes. This prevents using references where the register is set as

Re: Thoughts on memcmp expansion (PR43052)

2016-05-12 Thread Bernd Schmidt
On 05/02/2016 03:14 PM, Richard Biener wrote: I think it fits best in tree-ssa-strlen.c:strlen_optimize_stmt for the moment. I've done this in this version. Note that this apparently means it won't be run at -O unlike the previous version. The code moved to tree-ssa-strlen.c is nearly ident

Re: libgomp: Make GCC 5 OpenACC offloading executables work

2016-05-12 Thread Bernd Schmidt
On 05/11/2016 06:02 PM, Thomas Schwinge wrote: I conceptually agree to that. (If we're serious about that, then we can remove more code, such as the legacy libgomp entry point itself -- a "missing symbol: [...]" is still vaguely better than a SIGSEGV.) Yet, what I fixed here, is just what Jakub

Re: Allow embedded timestamps by C/C++ macros to be set externally (3)

2016-05-12 Thread Bernd Schmidt
On 05/12/2016 02:36 AM, Dhole wrote: + error_at (input_location, "environment variable SOURCE_DATE_EPOCH must " + "expand to a non-negative integer less than or equal to %wd", + MAX_SOURCE_DATE_EPOCH); +/* The value (as a unix timestamp) corresponds to date +

Re: [C/C++ PATCH] Missing warning for contradictory attributes (PR c++/71024)

2016-05-11 Thread Bernd Schmidt
On 05/11/2016 06:38 PM, Marek Polacek wrote: I checked and we don't have a test testing all the contradicting attributes as in the new test. But with that added, we can do the following... Tested on x86_64-linux, ok for trunk? 2016-05-11 Marek Polacek * gcc.dg/attr-opt-1.c: Move to

Re: [C/C++ PATCH] Missing warning for contradictory attributes (PR c++/71024)

2016-05-11 Thread Bernd Schmidt
On 05/11/2016 03:59 PM, Marek Polacek wrote: The C++ FE was missing diagnostics e.g. when an "always_inline" on DECL was followed by DECL with the "noinline" attribute. The C FE already has code dealing with this, so I factored it out to a common function. Bootstrapped/regtested on x86_64-linux

Re: libgomp: Make GCC 5 OpenACC offloading executables work

2016-05-11 Thread Bernd Schmidt
On 05/11/2016 03:46 PM, Thomas Schwinge wrote: What we now got, doesn't work, for several reasons. GCC 5 OpenACC offloading executables will just run into SIGSEGV. I'm tempted to say, let's just wait until someone actually reports that in bugzilla. Offloading in gcc-5 was broken enough that I

Re: [PATCH 4/4] Initial version of RTL frontend

2016-05-11 Thread Bernd Schmidt
On 05/11/2016 01:06 PM, Ramana Radhakrishnan wrote: Is there any reason why this framework cannot be used to replace a large number of scan-assembler tests in various target testsuites which are essentially testing for either a peephole, a transformation or the register allocator eliminating part

Re: [PATCH vs] Take known zero bits into account when checking extraction.

2016-05-11 Thread Bernd Schmidt
On 05/11/2016 09:42 AM, Dominik Vogt wrote: On Tue, May 10, 2016 at 05:05:06PM +0200, Bernd Schmidt wrote: Earlier in the discussion you mentioned the intention to remove these costs. Nothing else in the function does cost calculations - maybe you can try placing a gcc_unreachable into the case

Re: [PATCH 4/4] Initial version of RTL frontend

2016-05-10 Thread Bernd Schmidt
On 05/10/2016 08:05 PM, Richard Biener wrote: On May 10, 2016 7:02:33 PM GMT+02:00, Jeff Law wrote: Well, not if we take Bernd's idea and create a new backend for testing purposes. If we want to know/test what reload's doing, we cons up the appropriate RTL for that testing backend, set the rig

Re: [PATCH] Simplify read-md.c and read-rtl.c using require_char_ws

2016-05-10 Thread Bernd Schmidt
On 05/10/2016 08:10 PM, David Malcolm wrote: +/* Consume any whitespace, then consume the next non-whitespace + character, issuing a fatal error if it is not EXPECTED. */ + +void require_char_ws (char expected) Formatting. Otherwise ok. Bernd

Re: [PATCH, PR middle-end/70807] Free dominance info in CSE pass

2016-05-10 Thread Bernd Schmidt
On 05/10/2016 07:36 PM, Richard Biener wrote: The policy for passes is to only free dominator info if they wreck it. They have to expect it being present but can also choose to free it early of course. Seems like a policy that's inviting surprises such as this one, but if this is the case, t

Re: [PATCH, PR middle-end/70807] Free dominance info in CSE pass

2016-05-10 Thread Bernd Schmidt
On 05/10/2016 07:06 PM, Richard Biener wrote: Dominators are never freed. Not sure what you're trying to say here. There's lots of calls to free_dominance_info in the tree and obviously we need to do something to prevent the bug Ilya is trying to fix. Bernd

Re: [PATCH, PR middle-end/70807] Free dominance info in CSE pass

2016-05-10 Thread Bernd Schmidt
On 05/10/2016 06:19 PM, Ilya Enkovich wrote: Curretly CSE may modify CFG and leave invalid dominance info. This patch improves track of CFG changes by CSE passes and frees dominance info if required. This allows to remove corresponding workaround from STV pass. Does it look OK? Better tracki

Re: [PATCH vs] Take known zero bits into account when checking extraction.

2016-05-10 Thread Bernd Schmidt
On 05/10/2016 03:06 PM, Dominik Vogt wrote: + int cost_of_and; + int cost_of_zero_ext; + + cost_of_and = rtx_cost (x, mode, in_code, 1, speed_p); + cost_of_zero_ext = rtx_cost (temp, mode, in_code, 1, speed_p); + if (

Re: Allow embedded timestamps by C/C++ macros to be set externally (3)

2016-05-10 Thread Bernd Schmidt
On 05/06/2016 01:26 AM, Eduard Sanou wrote: errno = 0; epoch = strtoll (source_date_epoch, &endptr, 10); - if ((errno == ERANGE && (epoch == LLONG_MAX || epoch == LLONG_MIN)) - || (errno != 0 && epoch == 0)) -fatal_error (UNKNOWN_LOCATION, "environment variable $SOURCE_DATE_EPO

Re: [PATCH] cfgcleanup: Handle a branch with just a return in both arms (PR71028)

2016-05-10 Thread Bernd Schmidt
On 05/10/2016 09:55 AM, Segher Boessenkool wrote: PR rtl-optimization/71028 * cfgcleanup.c (try_optimize_cfg): Do not flip a conditional jump with just a return in the fallthrough block if the branch block contains just a returns as well. Looks good. Bernd

Re: [PATCH] Make basic asm implicitly clobber memory

2016-05-09 Thread Bernd Schmidt
On 05/09/2016 03:37 PM, Bernd Edlinger wrote: On 05/09/16 09:56, Richard Biener wrote: At least it sounds to me that its semantics can be fully expressed with generic asms? (Maybe apart from the only-if-ASM_STRING-is-empty part) That was also my first idea too. In simple cases an asm ("wha

Re: Error out on -fvtable-verify without --enable-vtable-verify

2016-05-09 Thread Bernd Schmidt
On 05/09/2016 01:28 PM, Rainer Orth wrote: Ok now? Yes, thanks. Bernd

Re: Allow embedded timestamps by C/C++ macros to be set externally (3)

2016-05-09 Thread Bernd Schmidt
On 05/09/2016 12:42 PM, Jakub Jelinek wrote: On Mon, May 09, 2016 at 12:38:14PM +0200, Bernd Schmidt wrote: On 05/09/2016 12:23 PM, Bernd Schmidt wrote: On 05/06/2016 01:38 AM, Dhole wrote: I've wrote a test case which fails (when it shouldn't) and I don't see why. I think i

Re: Allow embedded timestamps by C/C++ macros to be set externally (3)

2016-05-09 Thread Bernd Schmidt
On 05/09/2016 12:23 PM, Bernd Schmidt wrote: On 05/06/2016 01:38 AM, Dhole wrote: I've wrote a test case which fails (when it shouldn't) and I don't see why. I think it's setting the env var when executing the test, not when executing the compiler. Here's something

Re: Allow embedded timestamps by C/C++ macros to be set externally (3)

2016-05-09 Thread Bernd Schmidt
On 05/06/2016 01:38 AM, Dhole wrote: On 16-04-29 09:17:44, Jakub Jelinek wrote: Bernd: I'll see if I can prepare a testcase; first I need to get familiar with the testing framework and learn how to set environment variables in tests. Any tips on that will be really welcome! grep for dg-set-ta

Re: Fix regrename compare-debug issue

2016-05-09 Thread Bernd Schmidt
On 05/05/2016 09:02 AM, Eric Botcazou wrote: When scanning addresses inside a debug insn, we shouldn't use normal base/index classes. This shows as a compare-debug issue on Alpha, where INDEX_REG_CLASS is NO_REGS, and this prevented a chain from being renamed with debugging turned on. Uros has

Re: [RFA] Remove useless test in bitmap_find_bit.

2016-05-09 Thread Bernd Schmidt
On 05/06/2016 11:18 PM, Jeff Law wrote: OK for the trunk? Counts as obvious, doesn't it? Bernd

Re: Error out on -fvtable-verify without --enable-vtable-verify

2016-05-09 Thread Bernd Schmidt
On 05/08/2016 12:44 PM, Rainer Orth wrote: With the recent change not to install libvtv without --enable-vtable-verify, I noticed that gcc/g++ would still accept -fvtable-verify without errors, only to emit obscure link-time errors about missing vtv_*.o (which hadn't been installed in that situat

Re: Fix handling of negative bitpos in expand_debug_expr

2016-05-09 Thread Bernd Schmidt
On 05/05/2016 04:20 PM, Richard Sandiford wrote: expand_debug_expr handled negative bit positions using: else if (bitpos < 0) { HOST_WIDE_INT units = (-bitpos + BITS_PER_UNIT - 1) / BITS_PER_UNIT; op0 = adjust_addre

Fix regrename compare-debug issue

2016-05-04 Thread Bernd Schmidt
When scanning addresses inside a debug insn, we shouldn't use normal base/index classes. This shows as a compare-debug issue on Alpha, where INDEX_REG_CLASS is NO_REGS, and this prevented a chain from being renamed with debugging turned on. Uros has reported that this patch resolves the issues

Re: [PATCH 12/18] haifa-sched.c: make insn_queue[] a vec

2016-05-04 Thread Bernd Schmidt
On 05/03/2016 02:41 PM, Trevor Saunders wrote: I guess the usual tool for that is contrib/compare-all-tests? is there a simpler one? Not sure. I have a collection of .i files (from building things like gcc and the kernel with -save-temps) and a script that compiles them all, then I just use

Re: C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-05-04 Thread Bernd Schmidt
On 04/25/2016 10:18 PM, Joseph Myers wrote: On Fri, 22 Apr 2016, Bernd Schmidt wrote: +/* Returns the smallest location != UNKNOWN_LOCATION in LOCATIONS, + considering only those c_declspec_words found in LIST, which + must be terminated by cdw_number_of_elements. */ + +static location_t

Re: Enabling -frename-registers?

2016-05-04 Thread Bernd Schmidt
On 05/04/2016 03:25 PM, Ramana Radhakrishnan wrote: On ARM / AArch32 I haven't seen any performance data yet - the one place we are concerned about the impact is on Thumb2 code size as regrename may end up inadvertently putting more things in high registers. In theory at least arm_preferred_ren

Re: [PATCH 0/3] Simplify the simple_return handling

2016-05-04 Thread Bernd Schmidt
On 05/04/2016 02:10 AM, Segher Boessenkool wrote: Is this sufficient explanation, is it okay with the fprintf's fixed? Yeah, I suppose. From looking at some of the examples I have here I think there's still room for doubt whether all the alignment choices make perfect sense, but it's probabl

Re: Enabling -frename-registers?

2016-05-04 Thread Bernd Schmidt
On 05/04/2016 12:03 PM, Eric Botcazou wrote: The IBM LTC team has tested the benefit of -frename-registers at -O2 and sees no net benefit for PowerPC -- some benchmarks improve slightly but others degrade slightly (a few percent). You mentioned no overall benefit for x86. Although you mentioned

Re: Enabling -frename-registers?

2016-05-04 Thread Bernd Schmidt
On 05/04/2016 11:05 AM, Alan Modra wrote: I agree it's good to find these things.. Another nasty bug to add to the list is complete breakage of gccgo on powerpc64le. I see register renaming around the prologue call to __morestack, which trashes function arguments. How does this come about, is

Re: Enabling -frename-registers?

2016-05-03 Thread Bernd Schmidt
On 05/03/2016 11:26 PM, David Edelsohn wrote: Optimizations enabled by default at -O2 should show an overall net benefit -- that is the general justification that we have used in the past. I request that this change be reverted until more compelling evidence of benefit is presented. Shrug. Don

Re: An abridged "Writing C" for the gcc web pages

2016-05-03 Thread Bernd Schmidt
On 05/03/2016 09:59 PM, Richard Sandiford wrote: And sometimes there are multiple acceptable ways of writing the same code. Which wins is an aesthetic choice, which tools tend to be bad at handling. E.g. if a parameter list is too long for a line, there's often a choice of how to balance the par

Re: [PATCH] pr70890, r235660 miscompiles stage2

2016-05-03 Thread Bernd Schmidt
On 05/03/2016 03:24 PM, Alan Modra wrote: Err, is loop depth accurate in 254r.sched1? In the ira dump, I see them all at loop depth 1. So I expect that DF doesn't see the death because we're in a loop. looks like we should have a death note? I could see how such a move would create a new deat

Re: [PATCH 0/3] Simplify the simple_return handling

2016-05-03 Thread Bernd Schmidt
On 05/03/2016 03:31 PM, Segher Boessenkool wrote: If not, are you set up to test arm in any way? Ideally you'd want to run that as well. Good plan. There is arm64 in the cfarm; I'll see if I can build 32-bit as well. Simulator testing should work, but if ppc exercises this code there's prob

Re: [PATCH 0/3] Simplify the simple_return handling

2016-05-03 Thread Bernd Schmidt
On 05/03/2016 08:59 AM, Segher Boessenkool wrote: This series teaches cfgcleanup how to optimize jumps and branches to and around return statements, after which the shrink-wrap code doesn't have to deal with it anymore. The simplified code also catches a few more cases. Tested on powerpc64-li

Re: [PATCH 12/18] haifa-sched.c: make insn_queue[] a vec

2016-05-03 Thread Bernd Schmidt
On 04/25/2016 04:17 PM, Trevor Saunders wrote: On Mon, Apr 25, 2016 at 03:55:15PM +0200, Bernd Schmidt wrote: On 04/20/2016 08:22 AM, tbsaunde+...@tbsaunde.org wrote: -/* Remove INSN from queue. */ +/* Remove INSN at idx from queue. */ +static void +queue_remove (unsigned int q, unsigned int

Re: [PATCH] pr70890, r235660 miscompiles stage2

2016-05-03 Thread Bernd Schmidt
On 05/03/2016 02:20 PM, Alan Modra wrote: diff --git a/gcc/ira.c b/gcc/ira.c index a38e67e..cf5be35 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -3742,6 +3742,16 @@ combine_and_move_insns (void) if (use_insn == BB_HEAD (use_bb)) BB_HEAD (use_bb) = new_insn; + /* Sinc

Re: [PATCH] pr70890, r235660 miscompiles stage2

2016-05-03 Thread Bernd Schmidt
On 05/03/2016 12:45 PM, Alan Modra wrote: PR rtl-optimization/70890 * ira.c (combine_and_move_insns): When moving def_insn, remove equivs on use_insn. I'm not sure yet, but it looks to me like this tweaks the wrong place. diff --git a/gcc/ira.c b/gcc/ira.c index a38e67

Re: PR 70687: Use wide_int in combine.c:change_zero_ext

2016-05-03 Thread Bernd Schmidt
On 05/03/2016 11:11 AM, Richard Sandiford wrote: PR 70687 reports a case where combine.c mishandles integer modes wider than unsigned HOST_WIDE_INT. I don't have a testcase since the PR is just pointing out the hole. Also, I think a ZERO_EXTEND of a vector mode could in principle satisfy the su

Re: [PATCH #3], Fix _Complex when there are multiple FP types the same size

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 11:10 PM, Michael Meissner wrote: So I would like to commit the following changes (assuming they bootstrap and have no regressions) instead. Are these patches ok for the trunk, and eventually the gcc 6.2 branch if they don't break other back ends? Ok for the non-rs6000 changes.

Re: Fix for PR70498 in Libiberty Demangler

2016-05-02 Thread Bernd Schmidt
On 05/01/2016 06:24 PM, Marcel Böhme wrote: Please attach it (text/plain) instead. Done. That still seemed to be inlined, but I managed to apply this version. Committed. Bernd

Re: [PATCH] Improve add/sub TImode double word splitters (PR rtl-optimization/70467)

2016-05-02 Thread Bernd Schmidt
2016-05-02 Jakub Jelinek PR rtl-optimization/70467 * cse.c (cse_insn): Handle no-op MEM moves after folding. * gcc.target/i386/pr70467-1.c: New test. I seem to have a memory of acking this before. Certainly looks OK. Bernd

Re: [PATCH] Fix spec-options.c test case

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 03:43 PM, Bernd Edlinger wrote: Yes, you are right. Only the original use-case seems to be sh-superh-elf specific. But there are also spec strings that are always available. I think adding -DFOO to "cpp_unique_options" will work on any target, and make the test case even more use

Re: Enabling -frename-registers?

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 01:57 PM, Uros Bizjak wrote: With the referred testcase, the compare-debug failure trips on (debug_insn 101) Ok, INDEX_REG_CLASS is NO_REGS on alpha, and apparently the contents of the MEM isn't a valid address. Try this? Bernd Index: gcc/regrename.c

Re: Thoughts on memcmp expansion (PR43052)

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 02:52 PM, Richard Biener wrote: +struct pieces_addr +{ ... + void *m_cfndata; +public: + pieces_addr (rtx, bool, by_pieces_constfn, void *); unless you strick private: somewhere the public: is redundant Yeah, ideally I want to turn these into a classes rather than structs. May

Re: Enabling -frename-registers?

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 01:12 PM, Uros Bizjak wrote: On 04/17/2016 08:59 PM, Jeff Law wrote: invoke.texi has an independent list (probably incomplete! ;( of all the things that -O2 enables. Make sure to add -frename-registers to that list and this is Ok for the trunk (gcc-7). This is what I committed

Re: [PATCH #2], Fix _Complex when there are multiple FP types the same size

2016-05-02 Thread Bernd Schmidt
On 04/30/2016 06:00 PM, Segher Boessenkool wrote: On Fri, Apr 29, 2016 at 04:51:27PM -0400, Michael Meissner wrote: 2016-04-29 Michael Meissner * config/rs6000/rs6000.c (rs6000_hard_regno_nregs_internal): Add support for __float128 complex datatypes. (rs6000_hard_regn

Re: [C PATCH] Fix ICE-on-invalid with enum forward declaration (PR c/70851)

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 12:27 PM, Marek Polacek wrote: Here, the problem was that we weren't diagnosing invalid code when an array dimension was of incomplete enum type. That led to an ICE in gimplifier. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2016-05-02 Marek Polacek PR c/70

Re: [PATCH 2/4] PR c++/62314: add fixit hint for "expected ';' after class definition"

2016-05-02 Thread Bernd Schmidt
On 04/28/2016 04:28 PM, David Malcolm wrote: whereas clang reportedly emits: test.c:2:12: error: expected ';' after struct struct a {} ^ ; (note the offset of the location, and the fix-it hint) The following patch gives us the latter, more readable output. Huh. On

Re: [PATCH] Fix spec-options.c test case

2016-05-02 Thread Bernd Schmidt
On 05/01/2016 09:52 AM, Bernd Edlinger wrote: Hi, I took a closer look at this test case, and I found, except that it triggers a dejagnu bug, it is also wrong. I have tested with a cross-compiler for target=sh-elf and found that the test case actually FAILs because the foo.specs uses "cppruntim

Re: Fix PR rtl-optimization/70886

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 09:12 AM, Eric Botcazou wrote: The pointer comparison is not stable for VALUEs when cselib is used (this is the business of canonical cselib values). I tried rtx_equal_for_cselib_p here but this doesn't work because there are dangling VALUEs during scheduling (VALUEs whose associat

Re: Enabling -frename-registers?

2016-04-29 Thread Bernd Schmidt
On 04/29/2016 03:42 PM, David Edelsohn wrote: On Fri, Apr 29, 2016 at 9:32 AM, Bernd Schmidt wrote: On 04/29/2016 03:02 PM, David Edelsohn wrote: How has this show general benefit for all architectures to deserve enabling it by default at -O2? It should improve postreload scheduling in

Re: Enabling -frename-registers?

2016-04-29 Thread Bernd Schmidt
On 04/29/2016 03:02 PM, David Edelsohn wrote: How has this show general benefit for all architectures to deserve enabling it by default at -O2? It should improve postreload scheduling in general, and it can also help clear up bad code generation left behind by register allocation. As an asi

Re: [PATCH] Fix warn_for_memset ICE (PR c/70852)

2016-04-29 Thread Bernd Schmidt
On 04/29/2016 02:01 PM, Marek Polacek wrote: Here, we segv because we're checking TYPE_MAXVAL of domain that is actually null for "extern int a[];". The fix is trivial. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2016-04-29 Marek Polacek PR c/70852 * c-common.c (w

Re: [PATCH][SMS] SMS use loop induction variable analysis instead of depending on doloop optimization

2016-04-29 Thread Bernd Schmidt
On 04/28/2016 08:06 AM, Shiva Chen wrote: Could anyone help me to review the patch? Any suggestion would be very helpful. You might want to split it up if there are several logically independent pieces. I can't quite make sense of it all, and I'm not too familiar with SMS anyway, so the foll

Re: [Patch] Fix PR 60040

2016-04-29 Thread Bernd Schmidt
On 04/28/2016 10:07 AM, Senthil Kumar Selvaraj wrote: Here's the patch with the extra bits removed. To get it some additional test coverage, I've tested it on gcc-4_7-branch (with another backport so that it applies) with an x86_64 bootstrap and test. That worked, so I installed it on trunk.

Re: Thoughts on memcmp expansion (PR43052)

2016-04-28 Thread Bernd Schmidt
On 01/18/2016 10:22 AM, Richard Biener wrote: See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52171 - the inline expansion for small sizes and equality compares should be done on GIMPLE. Today the strlen pass might be an appropriate place to do this given its superior knowledge about strin

Re: [PATCH] sbitmap: Remove popcount

2016-04-28 Thread Bernd Schmidt
On 04/28/2016 07:30 PM, Segher Boessenkool wrote: In r193072 sbitmap_popcount was removed, so we cannot ask for the popcount of an sbitmap anymore. Nothing calls sbitmap_alloc_with_popcount either. This patch removes everything else popcount-related from sbitmap. Tested on powerpc64-linux; is t

Re: Allow embedded timestamps by C/C++ macros to be set externally (3)

2016-04-28 Thread Bernd Schmidt
On 04/28/2016 12:35 PM, Jakub Jelinek wrote: On Thu, Apr 28, 2016 at 12:31:40PM +0200, Bernd Schmidt wrote: I really don't see anything in that function that looks like a huge time sink, so I'm not that worried about it. I think it's likely to be buried way down in the noise.

Re: Avoid NULL cfun ICE in gcc/config/nvptx/nvptx.c:nvptx_libcall_value

2016-04-28 Thread Bernd Schmidt
On 04/28/2016 01:15 PM, Alexander Monakov wrote: So if my understanding is correct, additional !cfun check can be acceptable as a fix along the existing hack. Perhaps with a note about the nature of the hack. Yes, I think Thomas' patch is ok. Bernd

Re: Allow embedded timestamps by C/C++ macros to be set externally (3)

2016-04-28 Thread Bernd Schmidt
On 04/28/2016 12:08 PM, Jakub Jelinek wrote: BTW, I think fatal_error doesn't make sense, it isn't something that is not recoverable, normal error or just a warning would be IMHO more than sufficient. The fallback would be just using current time, i.e. ignoring the env var. I thought about thi

Re: Allow embedded timestamps by C/C++ macros to be set externally (3)

2016-04-28 Thread Bernd Schmidt
On 04/28/2016 11:20 AM, Matthias Klose wrote: On 27.04.2016 17:56, Dhole wrote: I'm attaching the updated patch with the two minor issues fixed. committed. Something else that occurred to me - could you please also work on a testcase? Bernd

Re: Fix PR44281 (bad RA with global regs)

2016-04-27 Thread Bernd Schmidt
On 04/27/2016 10:59 PM, Jeff Law wrote: PR rtl-optimization/44281 * hard-reg-set.h (struct target_hard_regs): New field x_fixed_nonglobal_reg_set. (fixed_nonglobal_reg_set): New macro. * reginfo.c (init_reg_sets_1): Initialize it. * ira.c (setup_alloc_regs): Use fixed_nong

Re: [PATCH] Convert DF_SCAN etc from #define to an enum

2016-04-27 Thread Bernd Schmidt
On 04/27/2016 07:06 PM, David Malcolm wrote: Whilst debugging an issue in df, I noticed that there are some #define constants that could be an enum (thus making them known to gdb). Convert them to a new enum, and update the "id" field of struct df_problem. Successfully bootstrapped & regrtested

Re: [PATCH] maybe_set_first_label_num can take an rtx_code_label *

2016-04-27 Thread Bernd Schmidt
On 04/27/2016 07:12 PM, David Malcolm wrote: The function maybe_set_first_label_num acts on a CODE_LABEL; we can capture that in the type system. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu; it's only used from stmt.c (not in any of the config subdirs), so I didn't attempt a ma

Re: [PATCH] df: make df_problem instances "const"

2016-04-27 Thread Bernd Schmidt
On 04/27/2016 07:08 PM, David Malcolm wrote: The various struct df_problem instances are constant data; mark them as such. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu OK for trunk? gcc/ChangeLog: * df-core.c (df_add_problem): Make the problem param be const. (

Re: [PATCH] Fix comment in rtl.def

2016-04-27 Thread Bernd Schmidt
On 04/27/2016 07:03 PM, David Malcolm wrote: Commit r210360 removed the first "i" field from the various instruction nodes in rtx.def, moving it to an explicit "int insn_uid;" field of the union "u2" within rtx_def. Update the comment in rtl.def to reflect this change. Also, fix a stray apost

Re: Fix for PR70498 in Libiberty Demangler

2016-04-27 Thread Bernd Schmidt
On 04/15/2016 07:39 PM, Marcel Böhme wrote: Sure. The updated patch, including Changelog and more test cases. Regression tested. This patch seems seriously damaged by sending it through the email body. Please attach it (text/plain) instead. Bernd

Re: [PATCH 1/4] Add gcc-auto-profile script

2016-04-27 Thread Bernd Schmidt
On 03/28/2016 06:44 AM, Andi Kleen wrote: This patch adds a new gcc-auto-profile script that figures out the correct event and runs perf. The script is installed with on Linux systems. That sounds useful, and I think we'll want to accept this. So Linux just hardcodes installing the script, bu

Re: [PATCH 4/4] Add make autoprofiledbootstrap

2016-04-27 Thread Bernd Schmidt
On 03/28/2016 06:44 AM, Andi Kleen wrote: From: Andi Kleen Add support for profiledbootstrap with autofdo. Will be useful to get better testing coverage of autofdo. Is this the only purpose? I'll admit this is the patch I like least out of the series. The autofdo'ed compiler is ~7% faster

Re: Fix some i386 testcases for -frename-registers

2016-04-27 Thread Bernd Schmidt
On 04/27/2016 05:16 PM, H.J. Lu wrote: This works for -m32, -mx32 and -m64. OK for trunk? Yes, thanks. Bernd

Re: [PATCH 3/4] Run profile feedback tests with autofdo

2016-04-27 Thread Bernd Schmidt
On 03/28/2016 06:44 AM, Andi Kleen wrote: From: Andi Kleen Extend the existing bprob and tree-prof tests to also run with autofdo. The test runtimes are really a bit too short for autofdo, but it's a reasonable sanity check. This only works natively for now. dejagnu doesn't seem to support a

Re: IRA costs tweaks, PR 56069

2016-04-27 Thread Bernd Schmidt
On 04/27/2016 06:02 AM, Jeff Law wrote: AFAICT the sra-1.c expects to see the incremented value and I'm at a loss to understand what's really going on here. Can you give more details? Yeah, maybe my first impression wasn't very accurate. When I try to run gdb manually, it just crashes: (gdb)

Re: Enabling -frename-registers?

2016-04-27 Thread Bernd Schmidt
On 04/27/2016 09:11 AM, Eric Botcazou wrote: @@ -8562,7 +8563,8 @@ debug information format adopted by the make debugging impossible, since variables no longer stay in a ``home register''. -Enabled by default with @option{-funroll-loops} and @option{-fpeel-loops}. +Enabled by default with

Re: C, C++: New warning for memset without multiply by elt size

2016-04-27 Thread Bernd Schmidt
On 04/26/2016 11:23 PM, Martin Sebor wrote: The documentation for the new option implies that it should warn for calls to memset where the third argument contains the number of elements not multiplied by the element size. But in my (quick) testing it only warns when the argument is a constant eq

Re: Fix some i386 testcases for -frename-registers

2016-04-27 Thread Bernd Schmidt
On 04/27/2016 02:10 AM, H.J. Lu wrote: On Tue, Apr 26, 2016 at 3:11 PM, Bernd Schmidt wrote: On 04/26/2016 09:39 PM, H.J. Lu wrote: make check-gcc RUNTESTFLAGS="--target_board='unix{-mx32}' i386.exp=avx512vl-vmovdqa64-1.c" Unfortunately, that doesn't work: /usr/

Re: [PATCH] Clean up tests where a later dg-do completely overrides another.

2016-04-27 Thread Bernd Schmidt
On 04/27/2016 09:50 AM, Dominik Vogt wrote: The attached patch cleans up some (mostly unnecessary) dg-do directives in the gcc.dg and gcc.target test cases. Ok except... * gcc.dg/spec-options.c: Switch order of the two "dg-do run" so that the test ist actually "run" on sh*-*-*

Re: Allow embedded timestamps by C/C++ macros to be set externally (3)

2016-04-26 Thread Bernd Schmidt
On 04/26/2016 11:28 PM, Dhole wrote: I've fixed all the spaces issues. I've also changed the "unsigned long long" to "time_t" as you suggested. Also, to improve reliability I'm now using strtoll rather than strtoull, so that negative values can be detected in SOURCE_DATE_EPOCH, which are treate

Re: Fix some i386 testcases for -frename-registers

2016-04-26 Thread Bernd Schmidt
On 04/26/2016 09:39 PM, H.J. Lu wrote: make check-gcc RUNTESTFLAGS="--target_board='unix{-mx32}' i386.exp=avx512vl-vmovdqa64-1.c" Unfortunately, that doesn't work: /usr/include/gnu/stubs.h:13:28: fatal error: gnu/stubs-x32.h: No such file or directory compilation terminated. Trying to follo

Re: Fix some i386 testcases for -frename-registers

2016-04-26 Thread Bernd Schmidt
On 04/26/2016 08:35 PM, H.J. Lu wrote: This /* { dg-final { scan-assembler-times "vmovdqa64\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\nxy\]*\\(.{5}(?:\n|\[ \\t\]+#)" 1 { target nonpic } } } */ fails on x32 since x32 with 32-bit pointers has (%r10d) instead of (%r10). .{5} doesn't match. What is this

Re: [middle-end][PATCH] Update alignment_for_piecewise_move

2016-04-26 Thread Bernd Schmidt
On 04/26/2016 08:21 PM, Richard Sandiford wrote: "H.J. Lu" writes: I am working a patch to enable SSE, AVX and AVX512 for memcpy/memset optimization. x86 backend defines MAX_BITSIZE_MODE_ANY_INT to 128 to keep the OI and XI modes from confusing the compiler into thinking that these modes could

Re: [PATCH] Fix a recent warning in reorg.c

2016-04-26 Thread Bernd Schmidt
On 04/26/2016 05:41 PM, Jakub Jelinek wrote: On Tue, Apr 26, 2016 at 03:13:32PM +0200, Bernd Schmidt wrote: On 04/26/2016 03:08 PM, Jakub Jelinek wrote: ^ ../../gcc/reorg.c:1413:25: warning: matches this ‘i’ under old rules for (unsigned int i = len - 1; i < len

Re: [PATCH] Fix a recent warning in reorg.c

2016-04-26 Thread Bernd Schmidt
On 04/26/2016 03:08 PM, Jakub Jelinek wrote: ^ ../../gcc/reorg.c:1413:25: warning: matches this ‘i’ under old rules for (unsigned int i = len - 1; i < len; i--) ^ Oh, and also - I flagged this while reviewing other parts of Trevor's changes, this pat

Re: [PATCH] Fix a recent warning in reorg.c

2016-04-26 Thread Bernd Schmidt
On 04/26/2016 03:08 PM, Jakub Jelinek wrote: It is not fatal, but still ugly. The problem is that the function has int i; ... for (i = 0; ...) ... for (unsigned int i = ... ) ... for (i = 0; ...) This patch just declares the var in the only affected loop, so that the warning is not e

Re: C, C++: New warning for memset without multiply by elt size

2016-04-26 Thread Bernd Schmidt
On 04/25/2016 07:55 PM, Jason Merrill wrote: On 04/25/2016 05:07 AM, Bernd Schmidt wrote: +if (TREE_CODE (arg2) == CONST_DECL) + arg2 = DECL_INITIAL (arg2); +int literal_mask = ((!!integer_zerop (arg1) << 1) +| (!!integer_zerop (arg2) <<

Re: C/C++ PATCH to add -Wdangling-else option

2016-04-26 Thread Bernd Schmidt
On 04/26/2016 02:39 PM, Jakub Jelinek wrote: I support that change, and -Wparentheses will still enable this, it just gives more fine-grained control and be in line with what clang does. Bernd, how much are you against this change? Don't really care that much, I just don't quite see the point.

Re: Enabling -frename-registers?

2016-04-26 Thread Bernd Schmidt
=== --- gcc/ChangeLog (revision 235441) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,10 @@ +2016-04-26 Bernd Schmidt + + PR rtl-optimization/57193 + * opts.c (default_options_table): Add OPT_frename_registers at -O2

Re: Fix some i386 testcases for -frename-registers

2016-04-26 Thread Bernd Schmidt
On 01/29/2016 01:19 PM, Uros Bizjak wrote: * gcc.target/i386/avx512bw-vptestmb-1.c: Correct [xyz]mm register number scans. * gcc.target/i386/avx512bw-vptestmw-1.c: Likewise. * gcc.target/i386/avx512bw-vptestnmb-1.c: Likewise. * gcc.target/i386/avx512bw-vptestnmw-1.c: Likewise. * gcc.target/i386/a

Re: RFD: annotate iterator patterns with expanded forms

2016-04-25 Thread Bernd Schmidt
On 01/01/2016 07:02 PM, Hans-Peter Nilsson wrote: On Tue, 1 Dec 2015, Bernd Schmidt wrote: The automatic Makefile approach might look something like this. The effect is similar to what happens when you edit tm.texi.in, except the build would not be interrupted every time, only when you modify

Re: [PATCH, GCC 5] PR 70613, -fabi-version docs don't match implementation

2016-04-25 Thread Bernd Schmidt
On 04/25/2016 08:44 PM, Jim Wilson wrote: On 04/18/2016 01:12 PM, Jim Wilson wrote: On 04/11/2016 01:41 PM, Jim Wilson wrote: Here is a patch to correct the -fabi-version docs on the GCC 5 branch. https://gcc.gnu.org/ml/gcc-patches/2016-04/msg00480.html ping^2 Cc'ing Jason as the most li

Re: [Patch] Fix PR 60040

2016-04-25 Thread Bernd Schmidt
On 04/15/2016 02:52 PM, Senthil Kumar Selvaraj wrote: For both testcases in the PR, reload fails to take into account that FP-SP elimination can no longer be performed, and tries to find reload regs for an rtx generated when FP-SP elimination was valid. 1. reload initializes elim table with FP-

Re: [PATCH 07/18] loop-iv.c: make cond_list a vec

2016-04-25 Thread Bernd Schmidt
On 04/25/2016 04:21 PM, Bernd Schmidt wrote: On 04/25/2016 03:30 PM, Trevor Saunders wrote: On Mon, Apr 25, 2016 at 02:28:51PM +0200, Bernd Schmidt wrote: On 04/20/2016 08:22 AM, tbsaunde+...@tbsaunde.org wrote: From: Trevor Saunders + unsigned int len = cond_list.length

Re: [PATCH 06/18] move reg_equivs out of gc memory

2016-04-25 Thread Bernd Schmidt
On 04/20/2016 08:22 AM, tbsaunde+...@tbsaunde.org wrote: From: Trevor Saunders It used the gc vector type, but isn't marked as a gc route, and appears to be manually managed, so it should be safe to use the normal heap vector. gcc/ChangeLog: 2016-04-19 Trevor Saunders * ira-emit.c

<    1   2   3   4   5   6   7   8   9   10   >