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: [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 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: 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: 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: 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: [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: [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: [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], 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: 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: 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: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: [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: [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: 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 #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: 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] 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: [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 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 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 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] 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: 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: 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: 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-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: [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 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: 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: [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

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: 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

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: [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: 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: 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: 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/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: 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: [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: [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: 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 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: [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, 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 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] 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 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 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-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: 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: [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: [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: 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: 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: 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: [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: [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: 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: 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: [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: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 1/3] remove STRUCT_VALUE macro

2015-09-10 Thread Bernd Schmidt
On 09/10/2015 01:57 PM, tbsaunde+...@tbsaunde.org wrote: > From: Trevor Saunders > > It is undocumented so the meaning is unclear, but it is only ever > defined to 0, which the one user in libobjc treats the same as being > undefined. Apparently it was converted to TARGET_STRUCT_VALUE_RTX in 200

Re: [PATCH 3/3] stop including tm.h in sendmsg.c

2015-09-10 Thread Bernd Schmidt
On 09/10/2015 01:57 PM, tbsaunde+...@tbsaunde.org wrote: > From: Trevor Saunders > > libobjc/ChangeLog: > > 2015-09-10 Trevor Saunders > > * sendmsg.c (tm.h): Remove include. Ok for this and the previous one too. If it turns out we still need this information we'll figure something ou

Re: Ping^2 Re: Pass -foffload targets from driver to libgomp at link time

2015-09-10 Thread Bernd Schmidt
On 09/10/2015 03:41 PM, Joseph Myers wrote: > Ping^2. This patch > is still > pending review. No fundamental objections, but I have some questions. Cuold you describe what the handling of flags/lang_mask accomplishes in this patch? Woul

Re: [PATCH 1/2] shrink-wrap: Header hygiene

2015-09-10 Thread Bernd Schmidt
On 09/10/2015 05:14 PM, Segher Boessenkool wrote: > > * shrink-wrap.c (requires_stack_frame_p): Make static. > (prepare_shrink_wrap): Likewise. > (dup_block_and_redirect): Likewise. > * shrink-wrap.h: Remove declarations of those functions. This is ok. Bernd

Re: [Patch] Teach RTL ifcvt to handle multiple simple set instructions

2015-09-10 Thread Bernd Schmidt
On 09/08/2015 04:53 PM, James Greenhalgh wrote: One big question I have with this patch is how I ought to write a meaningful cost model I've used. It seems like yet another misuse of RTX costs, and another bit of stuff for targets to carefully balance. Now, if the relative cost of branches and co

Re: [PATCH] PR67401: Fix wrong code generated by expand_atomic_compare_and_swap

2015-09-11 Thread Bernd Schmidt
On 09/11/2015 01:21 AM, John David Anglin wrote: As noted in the PR, expand_atomic_compare_and_swap can generate wrong code when libcalls are emitted for the sync_compare_and_swap and the result comparison test. This is fixed by emitting a move insn to copy the result rtx of the sync_compare_a

Re: [Patch] Teach RTL ifcvt to handle multiple simple set instructions

2015-09-11 Thread Bernd Schmidt
On 09/10/2015 11:11 PM, Jeff Law wrote: I think that's probably what James is most interested in getting some ideas around -- the cost model. I think the fundamental problem is BRANCH_COST isn't actually relative to anything other than the default value of "1". It doesn't directly correspond to

Re: [PATCH 2/2] shrink-wrap: Rewrite try_shrink_wrapping

2015-09-11 Thread Bernd Schmidt
On 09/10/2015 05:14 PM, Segher Boessenkool wrote: This patch rewrites the shrink-wrapping algorithm, allowing non-linear pieces of CFG to be duplicated for use without prologue instead of just linear pieces. An example would be good for this kind of patch, also in the comments. - add_to

Re: [PATCH] Teach genmatch.c to generate single-use restrictions from flags

2015-09-11 Thread Bernd Schmidt
On 07/08/2015 04:39 PM, Richard Biener wrote: This introduces a :s flag to match expressions which enforces the expression to have a single-use if(!) the simplified expression is larger than one statement. This seems to be missing documentation in match-and-simplify.texi. Bernd

Re: [PATCH 2/2] shrink-wrap: Rewrite try_shrink_wrapping

2015-09-11 Thread Bernd Schmidt
On 09/11/2015 02:36 PM, Segher Boessenkool wrote: I'm wondering how your new algorithm prevents the prologue from being placed inside a loop. Can you have a situation where this picks a predecessor that is reachable but not dominated by PRO? It doesn't prevent it! The prologue will not be _in

Re: Ping^2 Re: Pass -foffload targets from driver to libgomp at link time

2015-09-11 Thread Bernd Schmidt
On 09/11/2015 04:23 PM, Joseph Myers wrote: On Thu, 10 Sep 2015, Bernd Schmidt wrote: On 09/10/2015 03:41 PM, Joseph Myers wrote: Ping^2. This patch <https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01748.html> is still pending review. No fundamental objections, but I have some que

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-11 Thread Bernd Schmidt
On 09/12/2015 12:12 AM, Mark Wielaard wrote: 12 years ago it was decided that -Wunused-variable shouldn't warn about static const variables because some code used const static char rcsid[] strings which were never used but wanted in the code anyway. But as the bug points out this hides some real

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-14 Thread Bernd Schmidt
On 09/13/2015 08:24 PM, Mark Wielaard wrote: commit 97505bd0e4ac15d86c2a302cfebc5f1a4fc2c2e8 Author: Mark Wielaard Date: Fri Sep 11 23:54:15 2015 +0200 PR28901 -Wunused-variable ignores unused const initialised variables in C This is ok. Bernd

Re: [PATCH] v2 shrink-wrap: Rewrite

2015-09-14 Thread Bernd Schmidt
* shrink-wrap.c (requires_stack_frame_p): Fix formatting. (dup_block_and_redirect): Delete function. (can_dup_for_shrink_wrapping): New function. (fix_fake_fallthrough_edge): New function. (try_shrink_wrapping): Rewrite function. (convert_to_simple_r

Re: [gomp4] SESE region neutering

2015-09-14 Thread Bernd Schmidt
On 09/11/2015 11:49 PM, Nathan Sidwell wrote: This patch implements that optimization. As the comment at the head of the code says, we first find 'cycle-equivalent' BBs. These are ones that we determine are in the same (set of) loops, in the closed graph. Such equivalent BBs form the entry and

Re: [PATCH] PR67401: Fix wrong code generated by expand_atomic_compare_and_swap

2015-09-14 Thread Bernd Schmidt
On 09/11/2015 05:15 PM, John David Anglin wrote: On 2015-09-11 4:15 AM, Bernd Schmidt wrote: On 09/11/2015 01:21 AM, John David Anglin wrote: As noted in the PR, expand_atomic_compare_and_swap can generate wrong code when libcalls are emitted for the sync_compare_and_swap and the result

Re: [PATCH][PR67476] Add param parloops-schedule

2015-09-14 Thread Bernd Schmidt
On 09/11/2015 03:28 PM, Tom de Vries wrote: This patch adds handling of a DEFPARAMENUM macro, which is similar to the DEFPARAM macro, but allows the values to be named. So the definition of param parloop-schedule becomes: ... DEFPARAMENUM PARAM_PARLOOPS_SCHEDULE, "parloops-schedul

Update my email address.

2015-09-14 Thread Bernd Schmidt
Committed. Bernd Index: ChangeLog === --- ChangeLog (revision 227737) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2015-09-14 Bernd Schmidt + + * MAINTAINERS: Update my email address. + 2015-09-01 James Bowman

Re: [patch] Bump size of stack checking protection area

2015-09-14 Thread Bernd Schmidt
On 09/14/2015 10:23 AM, Eric Botcazou wrote: as documented, STACK_CHECK_PROTECT is supposed to be an "estimate of the amount of stack required to propagate an exception". It's (mainly) for Ada and it needs to distinguish the various EH schemes, which might have different needs. While the curre

Re: [PATCH 00/22] RFC: Overhaul of diagnostics

2015-09-14 Thread Bernd Schmidt
On 09/10/2015 10:28 PM, David Malcolm wrote: Attached is a work-in-progress patch kit implementing these ideas. I posting it now to get feedback: some parts of it may be ready to commit, but other parts are definitely *not* ready yet. It's hard to provide meaningful review under these condition

Re: [PATCH diagnostics/67460] Replace some_warnings_are_errors with diagnostic_kind_count (context, DK_WERROR)

2015-09-14 Thread Bernd Schmidt
On 09/14/2015 01:45 AM, Manuel López-Ibáñez wrote: The flag diagnostic_context::some_warnings_are_errors controls whether to give the message "all warnings being treated as errors". However, when warnings are buffered and then discarded, this flag is not reset. It turns out we do not need this fl

Re: Split up optabs.[hc]

2015-09-14 Thread Bernd Schmidt
On 09/14/2015 07:54 PM, Richard Sandiford wrote: This patch splits optabs up as follows: - optabs-query.[hc]: IL-independent functions for querying what a target can do natively. - optabs-tree.[hc]: tree and gimple query functions (an extension of optabs-query.[hc]). - opt

Re: [patch] Get rid of useless EH cleanups at -O0

2015-09-15 Thread Bernd Schmidt
On 09/14/2015 11:56 AM, Eric Botcazou wrote: this patchlet makes it possible to get rid of useless EH cleanups generated at -O0 in Ada for simple constructs involving VLAs: declare S : String (1 .. N); begin ... end; by duplicating finally blocks that contain only a stack re

Re: [patch] Bump size of stack checking protection area

2015-09-15 Thread Bernd Schmidt
On 09/15/2015 09:50 AM, Eric Botcazou wrote: It's not Ada-specific in the sense that, if you want to raise an exception on a stack overflow in any language with the middle-end SJLJ scheme, the current setting is definitely not sufficient and you'll get a crash during unwinding. For avoidance o

Re: [PATCH] Target hook for disabling the delay slot filler.

2015-09-15 Thread Bernd Schmidt
On 09/15/2015 04:19 PM, Simon Dardis wrote: This patch adds a target hook for disabling the eager delay slot filler which when disabled can give better code. No new regressions. Ok to commit? Hmm. Whether a branch was filled by the simple or eager filler is an implementation detail - is there

Re: [patch] Get rid of useless EH cleanups at -O0

2015-09-15 Thread Bernd Schmidt
On 09/14/2015 11:56 AM, Eric Botcazou wrote: 2015-09-14 Eric Botcazou * tree-eh.c (lower_try_finally_dup_block): Clear location information on stack restore statements. (decide_copy_try_finally): Do not consider a stack restore statement as coming from sources.

Re: [PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Bernd Schmidt
On 11/04/2016 01:26 PM, Jakub Jelinek wrote: The following patch avoids that. Of course the question is if we want to support something like: char var[64]; ... var[0] = '0xe8'; var[1] = ...; (void (*fn) (void) = (void (*) (void)) &var[0]; fn (); without any kind of barrier, or not. I was goin

Re: [PATCH] Fix wrong declarations of builtin functions

2016-11-04 Thread Bernd Schmidt
On 11/03/2016 10:52 PM, Bernd Edlinger wrote: I thought in preparation of the new C++ warning about wrong declarations of builtin functions it would be good to fix some of the more obvious bugs in the testsuite first. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Ok. Bernd

Re: [PATCH] Start adding target-specific selftests

2016-11-04 Thread Bernd Schmidt
On 10/21/2016 07:45 PM, David Malcolm wrote: gcc/ChangeLog: * config/i386/i386.c: Include "selftest.h" and "selftest-rtl.h". (selftest::ix86_test_dumping_hard_regs): New function. (selftest::ix86_run_selftests): New function. (TARGET_RUN_TARGET_SELFTESTS): When CH

Re: [PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Bernd Schmidt
On 11/04/2016 01:26 PM, Jakub Jelinek wrote: In any case, the second hunk fixes an important DSE bug that just got revealed by the former change. Can you elaborate on that (what situation does it occur in, is it covered by the testsuite)? Bernd

Re: [PATCH] rtx_writer: avoid printing trailing nils

2016-11-04 Thread Bernd Schmidt
On 11/04/2016 06:32 PM, David Malcolm wrote: ASSERT_RTL_DUMP_EQ ("(cjump_insn 1 (set (pc)\n" "(label_ref 0))\n" - " (nil))\n", + " )\n", jump_insn); This looks like the patch doesn't go the wh

Re: [PATCH] rtx_writer: avoid printing trailing nils

2016-11-04 Thread Bernd Schmidt
Here's something simpler. Only very lightly tested, but isn't something like this all that's needed? Could decide whether to apply it to expr_list etc. as well. Index: print-rtl.c === --- print-rtl.c (revision 241233) +++ print-rtl

Re: [PATCH] rtx_writer: avoid printing trailing default values

2016-11-04 Thread Bernd Schmidt
On 11/04/2016 08:14 PM, David Malcolm wrote: With this, compact dumps omit the trailing (nil) for both regular insns and for JUMP_INSNs, and omits the surplus newline seen in my earlier patch. It also appears removes the trailing (nil) from expr_list. Bootstrap®rtest in progress. OK for trunk

Re: [PATCH] rtx_writer: avoid printing trailing default values

2016-11-04 Thread Bernd Schmidt
On 11/04/2016 08:25 PM, David Malcolm wrote: return m_compact; Ok with this one plus a comment. Bernd

Re: New option -flimit-function-alignment

2016-11-07 Thread Bernd Schmidt
On 10/14/2016 08:28 PM, Bernd Schmidt wrote: On 10/12/2016 09:27 PM, Denys Vlasenko wrote: Yes, something like "if max_skip >= func_size, temporarily lower max_skip to func_size-1" (because otherwise we can create padding bigger-or-equal to the entire function in size, which is

Re: [PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-07 Thread Bernd Schmidt
On 11/04/2016 05:35 PM, Jakub Jelinek wrote: 2016-11-04 Jakub Jelinek PR target/77834 * dse.c (dse_step5): Call scan_reads even if just insn_info->frame_read. Improve and fix dump file messages. Sounds reasonable, and I checked and it seems not to change code gene

<    10   11   12   13   14   15   16   17   18   19   >