Re: [RFC: Patch 0/6] Rewrite the noce-ifcvt cost models

2016-06-03 Thread Bernd Schmidt
On 06/02/2016 06:53 PM, James Greenhalgh wrote: As I iterated through versions of this patch set, I realised that all we really wanted for ifcvt was a way to estimate the cost of a branch in units that were comparable to the cost of instructions. The trouble with BRANCH_COST wasn't that it was

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

2016-06-03 Thread Bernd Schmidt
On 06/03/2016 10:35 AM, Kyrill Tkachov wrote: Here is the patch with the changes discussed. Bootstrapped and tested on arm-none-linux-gnueabihf, aarch64-none-linux-gnu and x86_64-linux. Is this ok? I think so, but since this is one of those situations where I'm essentially approving my own

Re: [PATCH 01/16] Core of selftest framework (v6)

2016-06-02 Thread Bernd Schmidt
On 06/02/2016 11:06 PM, David Malcolm wrote: gcc/ChangeLog: * Makefile.in (OBJS): Add function-tests.o, hash-map-tests.o, hash-set-tests.o, rtl-tests.o, selftest-run-tests.o. (OBJS-libcommon): Add selftest.o. (OBJS-libcommon-target): Add selftest.o.

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

2016-06-02 Thread Bernd Schmidt
On 06/02/2016 05:04 PM, Jakub Jelinek wrote: Isn't following just better? Tested on x86_64-linux, ok for trunk? 2016-06-02 Jakub Jelinek * gcc.dg/cpp/source_date_epoch-1.c (main): Test __DATE__ and __TIME__ strings with __builtin_strcmp instead of printf

Re: Fix up dg-set-compiler-env-var

2016-06-02 Thread Bernd Schmidt
On 06/02/2016 02:19 PM, Jakub Jelinek wrote: The problem is that in cleanup-after-saved-dg-test, there are missing global directives, so when it tests/uses the set_compiler_env_var and saved_compiler_env_var vars to see if it should call restore-compiler-env-var, it uses local (non-existing)

Re: Ping Re: Add option for whether ceil etc. can raise "inexact", adjust x86 conditions

2016-06-02 Thread Bernd Schmidt
On 06/02/2016 02:00 PM, Jan Hubicka wrote: Ping. This patch is pending review (for the non-x86-specific parts). The inliner bits looks fine to me. In case that leaves anything unapproved, the remaining parts are OK too, modulo one

Re: [PATCH 00/21] Add -fself-test framework for fast, early unit-testing (unittests v5)

2016-06-02 Thread Bernd Schmidt
On 06/01/2016 11:19 PM, David Malcolm wrote: This is effectively v5 of the unittests proposal; for the earlier versions see: In general: nice to see this moving forward. There are some issues with the patch kit, some patches seem to fix issues with earlier ones (#3 or #13). One patch adds a

Re: [PATCH 2/2][GCC] Add one more pattern to RTL if-conversion

2016-06-02 Thread Bernd Schmidt
On 05/24/2016 07:21 PM, Mikhail Maltsev wrote: + target = expand_simple_binop (mode, (diff < 0) ? MINUS : PLUS, Parentheses around (diff < 0) aren't needed. Otherwise I think this is also OK. Bernd

Re: [PATCH 1/2][GCC] Refactor noce_try_store_flag_constants

2016-06-02 Thread Bernd Schmidt
On 05/23/2016 03:58 PM, Mikhail Maltsev wrote: This patch refactors 'noce_try_store_flag_constants' a bit to make it easier to reason about. The function contains two series of conditions, and each branch of the second series corresponds to one or two branches of the first series. The patch

Re: [PATCH][RTL ifcvt] PR rtl-optimization/66940: Avoid signed overflow in noce_get_alt_condition

2016-06-02 Thread Bernd Schmidt
On 05/23/2016 01:17 PM, Kyrill Tkachov wrote: In this PR we end up hitting a signed overflow in noce_get_alt_condition when we try to increment or decrement a HOST_WIDE_INT that might be HOST_WIDE_INT_MAX or HOST_WIDE_INT_MIN. I've confirmed the overflow by adding an assert before the

Re: [PATCH][RFC][rtlanal] Fix rtl-optimization/71295

2016-06-02 Thread Bernd Schmidt
On 05/31/2016 04:26 PM, Kyrill Tkachov wrote: we're talking about (subreg:V2DI (reg/v:EI 111 [ b ]) 0). EImode is a 24 byte arm-specific integer mode used to represent 3 D-registers. [...] I'm not familiar with the processes in that part of the code but my suspicion is that we should be

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

2016-06-02 Thread Bernd Schmidt
On 05/04/2016 05:17 PM, Bernd Schmidt wrote: How's this? Fully retested on x86_64-linux. Ping. Bernd

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

2016-06-01 Thread Bernd Schmidt
On 05/13/2016 07:09 PM, Dhole wrote: + pfile->source_date_epoch = pfile->cb.get_source_date_epoch(pfile); Space before paren. Ok with that change. * c-common.h (c_omp_region_type): Remove trailing coma. Also, comma. Bernd

Re: Thoughts on memcmp expansion (PR43052)

2016-05-31 Thread Bernd Schmidt
On 05/13/2016 10:40 PM, Joseph Myers wrote: On Fri, 13 May 2016, Bernd Schmidt wrote: Thanks. So, this would seem to suggest that BITS_PER_UNIT in memcmp/memcpy expansion is more accurate than a plain 8, although pedantically we might want to use CHAR_TYPE_SIZE? Should I adjust my patch to use

Re: Thoughts on memcmp expansion (PR43052)

2016-05-31 Thread Bernd Schmidt
On 05/30/2016 11:37 AM, Florian Weimer wrote: * Expand __memcmp_eq for small constant sizes with loads and comparison, fall back to a memcmp call. Should we export such a function from glibc? I expect it's fairly common. Computing the tail difference costs a few cycles. At the moment

Re: Remove word_mode hack for split bitfields

2016-05-31 Thread Bernd Schmidt
On 05/26/2016 04:36 PM, Richard Sandiford wrote: This patch is effectively reverting a change from 1994. The reason I think it's a hack is that store_bit_field_1 is creating a subreg reference to one word of a field even though it has already proven that the field spills into the following

Re: Thoughts on memcmp expansion (PR43052)

2016-05-13 Thread Bernd Schmidt
On 05/13/2016 03:53 PM, Joseph Myers wrote: * In C: a byte is the minimal addressable unit; an N-byte object is made up of N "unsigned char" objects, with successive addresses in terms of incrementing an "unsigned char *" pointer. A byte is at least 8 bits. * In GCC, at the level of GNU C APIs

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 <bschm...@redhat.com> 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 defi

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

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

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

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

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 *

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

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

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

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

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,

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

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, , 10); - if ((errno == ERANGE && (epoch == LLONG_MAX || epoch == LLONG_MIN)) - || (errno != 0 && epoch == 0)) -fatal_error (UNKNOWN_LOCATION, "environment variable $SOURCE_DATE_EPOCH: "

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

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 it's setting

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 that seems to work

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

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

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

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 =

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

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

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

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

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,

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.

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

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

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

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

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; + /*

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

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

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

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.

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

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

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

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.

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

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

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 <bschm...@redhat.com> 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 i

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

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

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

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

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

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

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. True

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

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

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 &

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

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

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,

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

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

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:

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

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 <bschm...@redhat.com> 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 doe

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