Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader

2016-10-06 Thread Bernd Schmidt
On 10/05/2016 06:15 PM, David Malcolm wrote: +;; MEM[(struct isl_obj *)] = _obj_map_vtable; +(insn 1045 0 1046 2 (set (reg:SI 480) +(high:SI (symbol_ref:SI ("isl_obj_map_vtable") +[flags 0xc0] +))) + y.c:12702 -1 + (nil)) +(insn 1046 1045

Re: [PATCH 3/3] Extend -falign-FOO=N to N[,M[,N2[,M2]]]

2016-10-06 Thread Bernd Schmidt
On 09/30/2016 07:54 PM, Denys Vlasenko wrote: +struct target_flag_state { + /* Each falign-foo can generate up to two levels of alignment: + -falign-foo=N,M[,N2,M2] */ + struct align_flags x_align_loops[2]; + struct align_flags x_align_jumps[2]; + struct align_flags x_align_labels[2]; +

Re: [PATCH] Fix -fsanitize=undefined with PCH, part #2 (PR sanitizer/66343)

2016-10-05 Thread Bernd Schmidt
On 10/05/2016 06:51 PM, Marek Polacek wrote: On Wed, Oct 05, 2016 at 05:29:49PM +0200, Jakub Jelinek wrote: Hi! When writing test for this PR, I've noticed ICE if the header is compiled without -fsanitize=undefined, but source is compiled with it. We had various issues like this in the past,

Re: [PATCH 08/16] (partially-approved): Introduce selftest::locate_file

2016-10-05 Thread Bernd Schmidt
On 10/05/2016 06:15 PM, David Malcolm wrote: selftest: s-selftest s-selftest: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs - $(GCC_FOR_TARGET) -xc -S -c /dev/null -fself-test + $(GCC_FOR_TARGET) -xc -S -c /dev/null -fself-test=$(srcdir) $(STAMP) $@ I suspect the Makefile

Re: [PATCH 10/16] Introduce class function_reader (v3)

2016-10-05 Thread Bernd Schmidt
On 10/05/2016 06:15 PM, David Malcolm wrote: * errors.c: Use consistent pattern for bconfig.h vs config.h includes. (progname): Wrap with #ifdef GENERATOR_FILE. (error): Likewise. Add "error: " to message. (fatal): Likewise. (internal_error):

Re: [PATCH 01/16] read-md.c: Add various cleanups to ~rtx_reader

2016-10-05 Thread Bernd Schmidt
On 10/05/2016 06:14 PM, David Malcolm wrote: The selftests for the RTL frontend require supporting multiple reader instances being alive one after another in-process, so this lack of cleanup would become a leak. + /* Initialize global data. */ + obstack_init (_obstack); + ptr_locs =

Re: [PATCH 07/16] read-md: add some helper functions

2016-10-05 Thread Bernd Schmidt
On 10/05/2016 06:15 PM, David Malcolm wrote: +void require_char (char expected) > +void require_word_ws (const char *expected) Function name goes on a new line. Otherwise ok. Bernd

Re: [PATCH 06/16] Introduce emit_status::ensure_regno_capacity

2016-10-05 Thread Bernd Schmidt
On 10/05/2016 06:15 PM, David Malcolm wrote: - regno_reg_rtx = ggc_vec_alloc (crtl->emit.regno_pointer_align_length); + regno_reg_rtx = +ggc_cleared_vec_alloc (crtl->emit.regno_pointer_align_length); Oops, also: formatting, operators go first on a newline. Bernd

Re: [PATCH 06/16] Introduce emit_status::ensure_regno_capacity

2016-10-05 Thread Bernd Schmidt
On 10/05/2016 06:15 PM, David Malcolm wrote: - /* Make sure regno_pointer_align, and regno_reg_rtx are large - enough to have an element for this pseudo reg number. */ + int cur_size = crtl->emit.regno_pointer_align_length; + if (reg_rtx_no == cur_size) +

Re: [PATCH 05/16] Introduce rtl_data::init_stack_alignment

2016-10-05 Thread Bernd Schmidt
On 10/05/2016 06:14 PM, David Malcolm wrote: Move this part of "expand"'s initialization of crtl into its own method so that it can used by the RTL frontend when postprocessing RTL dumps. gcc/ChangeLog: * cfgexpand.c (pass_expand::execute): Move stack initializations to

Re: [BUILDROBOT] Selftest failed for i686-wrs-vxworks

2016-10-05 Thread Bernd Schmidt
On 10/05/2016 04:14 PM, David Malcolm wrote: Thanks. I'm not able to formally approve these changes, but FWIW these patches look good to me (assuming usual testing). LGTM too, so OK. Bernd

Re: [PATCH][fold-const] Fix native_encode_real for HFmode constants

2016-10-05 Thread Bernd Schmidt
On 10/05/2016 04:06 PM, Kyrill Tkachov wrote: The fix in this patch makes the logic in native_encode_real match the logic in native_interpret_real, I just copied the logic across. Looks reasonable to me. Ok. Bernd

Re: [PATCH] add uClibc target hook (PR bootstrap/77819)

2016-10-05 Thread Bernd Schmidt
On 10/04/2016 10:25 PM, Martin Sebor wrote: Sounds good. Attached is an updated patch reflecting these changes. Restested by building the powerpc64-linux and tic6x-uclinux cross toolchains. (Sharing the Glibc and uClibc implementation of the target hook and defining it in targhooks.c also

Re: [PATCH] add uClibc target hook (PR bootstrap/77819)

2016-10-04 Thread Bernd Schmidt
On 10/04/2016 04:34 PM, Martin Sebor wrote: I copied the conditional from config/linux.h but I admit I don't fully understand when the macro is defined. AFAICT it's done in config.gcc, for a limited set of targets. Should I still remove it from targhooks.c? That is compiled for all

Re: style convention: /*foo_p=*/ to annotate bool arguments

2016-10-04 Thread Bernd Schmidt
On 10/04/2016 12:41 PM, Jonathan Wakely wrote: On 4 October 2016 at 10:21, David Brown wrote: On 04/10/16 01:48, Martin Sebor wrote: In a recent review Jason and I discussed the style convention commonly followed in the C++ front end to annotate arguments in calls to functions taking bool

Re: [PATCH] read-md.c: track column numbers

2016-10-04 Thread Bernd Schmidt
On 09/30/2016 05:41 AM, David Malcolm wrote: This patch adds rudimentary column-number tracking to read-md.c, to give more precise locations for messages for problems in .md files (and in the RTL frontend I'm working on): ../../src/gcc/config/i386/i386.md:1204:22: error: unknown rtx code

Re: [PATCH] add uClibc target hook (PR bootstrap/77819)

2016-10-04 Thread Bernd Schmidt
On 10/03/2016 12:02 AM, Martin Sebor wrote: I couldn't find a good uclibc-only file where to put the new definition of the hook so I conditionally added it to targethooks.c. diff --git a/gcc/targhooks.c b/gcc/targhooks.c index d75650f..77b4a18 100644 --- a/gcc/targhooks.c +++

Re: [PATCH 2/2] Extend -falign-FOO=N to N[,M[,N2[,M2]]]

2016-09-30 Thread Bernd Schmidt
On 09/29/2016 07:32 PM, Denys Vlasenko wrote: On 09/29/2016 04:45 PM, Bernd Schmidt wrote: On 09/28/2016 02:57 PM, Denys Vlasenko wrote: - /* Comes from final.c -- no real reason to change it. */ -#define MAX_CODE_ALIGN 16 - case OPT_malign_loops_: warning_at (loc, 0, "-m

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Bernd Schmidt
On 09/30/2016 12:51 PM, Jakub Jelinek wrote: On Fri, Sep 30, 2016 at 12:42:20PM +0200, Bernd Schmidt wrote: On 09/30/2016 11:45 AM, Jakub Jelinek wrote: See Tom Tromey's explanation why accepting too much is bad (at least unless we want multiple levels). And I still don't buy it. The case

Re: [PATCH] Fix -Wimplicit-fallthrough -C, handle some more comment styles and comments in between FALLTHRU comment and label

2016-09-30 Thread Bernd Schmidt
On 09/30/2016 11:45 AM, Jakub Jelinek wrote: See Tom Tromey's explanation why accepting too much is bad (at least unless we want multiple levels). And I still don't buy it. The case where someone writes "Don't fall through" is artificial to begin with, and also forgetting to put the break;

Re: [PATCH] Machine-readable RTL dumps: print_rtx_function

2016-09-29 Thread Bernd Schmidt
On 09/29/2016 07:47 PM, David Malcolm wrote: This patch adds a new function, print_rtx_function, intended for use for generating function dumps suitable for parsing by the RTL frontend, but also intended to be human-readable, and human-authorable. (note 1 0 4 (nil) NOTE_INSN_DELETED)

Re: [PATCH 2/2] Extend -falign-FOO=N to N[,M[,N2[,M2]]]

2016-09-29 Thread Bernd Schmidt
On 09/28/2016 02:57 PM, Denys Vlasenko wrote: This change makes it possible to align functions to 64-byte boundaries *if* this does not introduce huge amount of padding. I'm still somewhat undecided, but it seems like a decent enough way to expose these possibilities to the user, so unless

Re: Patch ping

2016-09-28 Thread Bernd Schmidt
On 09/28/2016 11:40 PM, Jakub Jelinek wrote: On Wed, Sep 28, 2016 at 11:17:55PM +0200, Bernd Schmidt wrote: On 09/28/2016 09:47 PM, Jakub Jelinek wrote: And here are the 0 < var to var > 0 changes. Thoughts on those? I kind of meant it the other way round, so yeah, please install.

Re: Patch ping

2016-09-28 Thread Bernd Schmidt
On 09/28/2016 09:47 PM, Jakub Jelinek wrote: And here are the 0 < var to var > 0 changes. Thoughts on those? I kind of meant it the other way round, so yeah, please install. Bernd

Re: Patch ping

2016-09-28 Thread Bernd Schmidt
On 09/28/2016 09:24 PM, Jakub Jelinek wrote: I'd like to ping the http://gcc.gnu.org/ml/gcc-patches/2016-09/msg01436.html patch, containing various fixes for gimple-ssa-sprintf.c. If the 0 < var to var > 0 changes are deemed too controversial, I can separate them from the other changes. I'd

Re: Implement -Wimplicit-fallthrough (version 9)

2016-09-28 Thread Bernd Schmidt
On 09/28/2016 02:15 PM, Michael Matz wrote: P.S.: Initially I even wanted to argue that the mere existence of _any_ comment before a case label would disable the warning. I don't have the numbers but I bet even that version would have found the very same bugs that the picky version has.

Re: [PATCH] print-rtx.c: add 'h', v' and 'p' prefixes to regnos

2016-09-28 Thread Bernd Schmidt
On 09/28/2016 06:36 PM, Jeff Law wrote: A "p" prefix for pseudos might still be a good idea, but there's still the issue of a real "p0" register name causing confusion. So how do you think we should deal with distinguishing between the different registers that may appear in a dump file? I

Re: [PATCH] print-rtx.c: add 'h', v' and 'p' prefixes to regnos

2016-09-28 Thread Bernd Schmidt
On 09/28/2016 06:23 PM, Jeff Law wrote: (reg/i:SI h0 ax) (reg/i:SF h21 xmm0) (Replying to myself, in the hope of better demonstrating the idea) The following patch implements this idea for RTL dumps, so that all REGNO values in dumps get a one character prefix: 'h' for hard registers,

Re: Implement -Wimplicit-fallthrough (version 9)

2016-09-27 Thread Bernd Schmidt
On 09/27/2016 05:04 PM, Jakub Jelinek wrote: On Tue, Sep 27, 2016 at 9:56 AM, Michael Matz wrote: All those bugs would also have been found as well when it had simply accepted /fall.*thr/i anywhere in the preceding comment on one line. But all the recent spelling changes of

Re: Implement -Wimplicit-fallthrough (version 9)

2016-09-27 Thread Bernd Schmidt
On 09/27/2016 03:49 PM, Jakub Jelinek wrote: On Tue, Sep 27, 2016 at 03:48:07PM +0200, Bernd Schmidt wrote: On 09/27/2016 02:01 PM, Marek Polacek wrote: On Tue, Sep 27, 2016 at 01:55:22PM +0200, Bernd Schmidt wrote: On 09/27/2016 01:51 PM, Marek Polacek wrote: But the C/C++ keywords are all

Re: Implement -Wimplicit-fallthrough (version 9)

2016-09-27 Thread Bernd Schmidt
On 09/27/2016 02:01 PM, Marek Polacek wrote: On Tue, Sep 27, 2016 at 01:55:22PM +0200, Bernd Schmidt wrote: On 09/27/2016 01:51 PM, Marek Polacek wrote: But the C/C++ keywords are all English, too; lint tools only accept English, and so it wouldn't seem unreasonable to only accept English

Re: internal fn pretty printing

2016-09-27 Thread Bernd Schmidt
On 09/27/2016 12:58 PM, Nathan Sidwell wrote: In working on some new code I got sufficiently frustrated to implement pretty printing on internal function discriminators, as I think one of you suggested a while back. With this patch we get: .data_dep.2 = UNIQUE (OACC_FORK, .data_dep.2, -1);

Re: Implement -Wimplicit-fallthrough (version 9)

2016-09-27 Thread Bernd Schmidt
On 09/27/2016 01:51 PM, Marek Polacek wrote: But the C/C++ keywords are all English, too; lint tools only accept English, and so it wouldn't seem unreasonable to only accept English keywords in the comments. And in any case, I don't see how a compiler can be expected to be able to parse

Re: [PATCH RESEND 2/2] Extend -falign-FOO=N to N[,M[,N2[,M2]]]

2016-09-27 Thread Bernd Schmidt
On 09/26/2016 09:08 PM, Denys Vlasenko wrote: +@gccoptlist{-faggressive-loop-optimizations @gol +-falign-functions[=@var{n}[,@var{m},[@var{n}[,@var{m} @gol +-falign-jumps[=@var{n}[,@var{m}]] @gol +-falign-labels[=@var{n}[,@var{m}]] -falign-loops[=@var{n}[,@var{m}]] @gol @itemx

Re: Implement -Wimplicit-fallthrough (version 9)

2016-09-27 Thread Bernd Schmidt
On 09/27/2016 01:09 PM, Richard Biener wrote: On Tue, Sep 27, 2016 at 1:06 PM, Eric Botcazou wrote: The accepted style is already very permissive, we don't allow just one spelling as various lint tools. Well, it cannot even handle the variations of a single codebase,

Re: [Patch, reload, tentative, PR 71627] Tweak conditions in find_valid_class_1

2016-09-26 Thread Bernd Schmidt
On 09/16/2016 09:02 PM, Senthil Kumar Selvaraj wrote: Does this make sense? I ran a reg test for the avr target with a slightly older version of this patch, it did not show any regressions. If this is the right fix, I'll make sure to run reg tests on x86_64 after backporting to a gcc

Re: [PATCH][regrename][sel-sched] Fix bogus use of HARD_FRAME_POINTER_REGNUM (was: Fix arm bootstrap)

2016-09-26 Thread Bernd Schmidt
On 09/26/2016 04:34 PM, Kyrill Tkachov wrote: Hi all, This patch implements the minimal fixes for the issues that https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01547.html was supposed to address as suggested by Alexander. Bootstrapped and tested on aarch64-none-linux-gnu and

OpenACC data clause syntax question/patch

2016-09-23 Thread Bernd Schmidt
While trying to get the following benchmarks to run: https://codesign.llnl.gov/lulesh.php I came across some cases where the code and the compiler differed in its interpretation of the OpenACC spec. Specifically, this occurs for acc data clauses with arrays, like: #pragma acc data

Re: [PATCH] Use CONSTRUCTOR_NELTS macro some more

2016-09-23 Thread Bernd Schmidt
On 09/22/2016 10:07 PM, Jakub Jelinek wrote: I've noticed lots of vec_safe_length (CONSTRUCTOR_ELTS (...)) uses in the sources, which IMHO are less readable than the much more often used CONSTRUCTOR_NELTS (...) macro that does the same thing. Bootstrapped/regtested on x86_64-linux and

Re: Make regcprop to eliminate noop moves better

2016-09-22 Thread Bernd Schmidt
On 09/22/2016 01:48 PM, Jan Hubicka wrote: * postreload.c (reload_cse_simplify): Also accept USE in noop move patterns. diff --git a/gcc/postreload.c b/gcc/postreload.c index 61c1ce8..4f3a526 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -153,7 +153,8 @@

Re: [PATCH] Fix JUMP_LABEL documentation

2016-09-21 Thread Bernd Schmidt
On 09/20/2016 08:51 PM, Segher Boessenkool wrote: * doc/rtl.texi (JUMP_LABEL): Document RETURN and SIMPLE_RETURN values. Ok, thanks. Bernd

Re: [RFC][IRA]Initialize ira_use_lra_p early by moving the initialization into ira_init_once ().

2016-09-21 Thread Bernd Schmidt
On 09/21/2016 01:46 PM, Renlin Li wrote: * ira.c (ira): Move ira_use_lra_p initialization code to ... (ira_init_once): Here. LGTM. Bernd

Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-20 Thread Bernd Schmidt
On 09/21/2016 01:09 AM, Trevor Saunders wrote: I thought I remember discussing this macro with you, but see what was checked in I'll believe I'm thinking of something similar but different. I think this here was an earlier patch and the one we were discussing recently was the other macro

Re: Register numbers in RTL dumps (was Re: [PATCH 0/9] RFC: selftests based on RTL dumps)

2016-09-20 Thread Bernd Schmidt
On 09/20/2016 05:20 PM, Jeff Law wrote: On 09/20/2016 08:34 AM, Bernd Schmidt wrote: (reg/f:DI v1 virtual-stack-vars) this. Doesn't the same apply to the number of virtual stack regs? Those are in the same array as pseudos. So ISTM we prefix in the dump, but do adjustment of the number

Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-20 Thread Bernd Schmidt
On 09/20/2016 05:18 PM, Jeff Law wrote: I assume HARD_FRAME_POINTER_REGNUM is never zero. It could be zero. It's just a hard register number. No target has the property that its hard frame pointer register is 0 though :-) git blame to the rescue. The current state comes from one of

Re: Register numbers in RTL dumps (was Re: [PATCH 0/9] RFC: selftests based on RTL dumps)

2016-09-20 Thread Bernd Schmidt
On 09/20/2016 04:32 PM, David Malcolm wrote: To summarize so far: you want every pseudo to have its regno dumped with a 'p' prefix, and renumber them on dump (and then on load). OK. Renumbering is not helpful because it interferes with the view you have in the debugger. So, IMO just a

Re: [PATCH 0/8] make next_*_insn take rtx_insn * arguments

2016-09-20 Thread Bernd Schmidt
On 09/20/2016 01:16 AM, Segher Boessenkool wrote: On Mon, Sep 19, 2016 at 06:07:46PM -0400, Trevor Saunders wrote: - JUMP_LABEL can be a return which is not an insn. That also seems like something that should be improved at some point. The JUMP_LABEL field within a JUMP_INSN? That sounds

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-19 Thread Bernd Schmidt
On 09/19/2016 04:43 PM, Kyrill Tkachov wrote: Ok? Sure. Bernd

Re: Do not drom MEM_EXPR when accessing structure fields

2016-09-19 Thread Bernd Schmidt
On 09/18/2016 02:51 PM, Jan Hubicka wrote: to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE); - - /* If the field has a mode, we want to access it in the -field's mode, not the computed mode. -If a MEM has VOIDmode (external with incomplete type), -

Re: [PATCH 0/9] RFC: selftests based on RTL dumps

2016-09-19 Thread Bernd Schmidt
On 09/16/2016 11:12 PM, David Malcolm wrote: There are some interrelated questions here: (a) where do the dumps live? (string fragments embedded in the source file vs external files) (b) -fself-test vs DejaGnu tests that use a real frontend. In the latter case, is the frontend "rtl1", or an

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Bernd Schmidt
On 09/16/2016 10:40 AM, Kyrill Tkachov wrote: 2016-09-16 Kyrylo Tkachov * simplify-rtx.c (simplify_relational_operation_1): Add transformation (GTU (PLUS a C) (C - 1)) --> (LTU a -C). 2016-09-16 Kyrylo Tkachov *

Re: [PATCH 0/8] make next_*_insn take rtx_insn * arguments

2016-09-16 Thread Bernd Schmidt
On 09/16/2016 12:10 PM, Trevor Saunders wrote: ok, going through all the casts added here I see the following reasons for them. - in md files operands is a array of rtx, we should probably have a different way to pass insns to the C code here. That seems worth investigating incrementally.

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Bernd Schmidt
On 09/15/2016 03:38 PM, Wilco Dijkstra wrote: __rawmemchr is not the fastest on any target I tried, including x86, Interesting. Care to share your test program? I just looked at the libc sources and strlen/rawmemchr are practically identical code so I'd expect any difference to be lost in

Re: [PATCH 0/8] make next_*_insn take rtx_insn * arguments

2016-09-15 Thread Bernd Schmidt
On 09/14/2016 09:21 PM, tbsaunde+...@tbsaunde.org wrote: Basically $subject. First change variable's type to rtx_insn * where possible. Then change the functions and fixup callers where it is still necessary to cast. #2, #4 and #8 look good and can be applied if they work independently of

Re: Patch ping

2016-09-15 Thread Bernd Schmidt
On 09/14/2016 11:47 PM, Jakub Jelinek wrote: http://gcc.gnu.org/ml/gcc-patches/2016-09/msg00088.html - PR77425 - fix UB in sd_iterator_cond Ok. Bernd

Re: [PATCH 5/9] regrename: Don't run if function was separately shrink-wrapped

2016-09-14 Thread Bernd Schmidt
On 09/14/2016 03:55 PM, Segher Boessenkool wrote: On Wed, Sep 14, 2016 at 03:08:21PM +0200, Bernd Schmidt wrote: The data that was posted showed a code size decrease on a number of targets. I'm really not sure where this irrational hate for regrename comes from. It increases the number

Re: [PATCH 5/9] regrename: Don't run if function was separately shrink-wrapped

2016-09-14 Thread Bernd Schmidt
On 09/14/2016 03:04 PM, Segher Boessenkool wrote: Then rs6000 (and many other ports probably) will just turn it off again. It is actively harmful. The data that was posted showed a code size decrease on a number of targets. I'm really not sure where this irrational hate for regrename comes

Re: [PATCH] fix-it hints for warn_uninit

2016-09-14 Thread Bernd Schmidt
On 09/14/2016 02:45 AM, David Malcolm wrote: In combination with -fdiagnostics-generate-patch this can generate output like this: --- ../../src/gcc/testsuite/c-c++-common/fix-missing-initializer-1.c +++ ../../src/gcc/testsuite/c-c++-common/fix-missing-initializer-1.c @@ -2,7 +2,7 @@

Re: [PATCH 0/9] RFC: selftests based on RTL dumps

2016-09-14 Thread Bernd Schmidt
On 09/13/2016 01:15 PM, Bernd Schmidt wrote: On 09/12/2016 08:57 PM, David Malcolm wrote: I'm not sure I follow - this sounds like a dedicated target for selftesting. Would it be a separate configuration i.e. something like: ../src/configure --target=rtl-selftest or somesuch? The way I

Re: RFC: PATCH to consider MAX_OFILE_ALIGNMENT for targetm.absolute_biggest_alignment

2016-09-13 Thread Bernd Schmidt
On 09/13/2016 04:24 PM, Jason Merrill wrote: But we could define TARGET_ABSOLUTE_BIGGEST_ALIGNMENT on nvptx instead of on x86; is this OK? That's what I had in mind. It would be good if Thomas or Nathan could give this patch a spin, I'm not currently really set up for it. But it looks like

Re: [PATCH 0/9] RFC: selftests based on RTL dumps

2016-09-13 Thread Bernd Schmidt
On 09/12/2016 08:57 PM, David Malcolm wrote: I'm not sure I follow - this sounds like a dedicated target for selftesting. Would it be a separate configuration i.e. something like: ../src/configure --target=rtl-selftest or somesuch? The way I imagine it working, the top-level Makefile

Re: RFC: PATCH to consider MAX_OFILE_ALIGNMENT for targetm.absolute_biggest_alignment

2016-09-13 Thread Bernd Schmidt
On 09/12/2016 08:58 PM, Jason Merrill wrote: TARGET_ABSOLUTE_BIGGEST_ALIGNMENT is documented to be the largest alignment possible for any type or variable, and defaults to BIGGEST_ALIGNMENT. But MAX_OFILE_ALIGNMENT is typically much larger than BIGGEST_ALIGNMENT, and is documented as the limit

Re: [PATCH 1/3] Put a TARGET_LRA_P into every target

2016-09-13 Thread Bernd Schmidt
On 09/13/2016 12:22 AM, Segher Boessenkool wrote: This patch adds a TARGET_LRA_P (defined to hook_bool_void_false) to every target that didn't yet override the hook. No functional change. This patch series makes very little sense to me. Adding 35 new instances of a hook definition so you can

Re: [PATCH 0/9] RFC: selftests based on RTL dumps

2016-09-12 Thread Bernd Schmidt
In general, it's functionality that I would very much like to have (although maybe it's less useful these days now that the rtl side is fairly static). I think there's not much sense looking too deeply at the individual patches yet; we need to first figure out what we would really like this to

Re: [PATCH, i386] Spellcheck hints for the i386 backend option handling (PR middle-end/77475, take 2, generic part)

2016-09-12 Thread Bernd Schmidt
On 09/06/2016 10:36 PM, Jakub Jelinek wrote: +/* Helper function for listing valid choices and hint for misspelled + value. CANDIDATES is a vector containing all valid strings, + STR is set to a heap allocated string that contains all those + strings concatenated, separated by spaces,

Re: [DOC] Boolean -> boolean changes

2016-09-12 Thread Bernd Schmidt
On 09/10/2016 12:56 PM, Marek Polacek wrote: 2016-09-10 Marek Polacek * doc/extend.texi: Use lowercase "boolean". * doc/invoke.texi: Likewise. * doc/md.texi: Likewise. * target.def: Likewise. * doc/tm.texi: Regenerated. Ok.

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-12 Thread Bernd Schmidt
On 09/09/2016 10:56 PM, Segher Boessenkool wrote: On Fri, Sep 09, 2016 at 12:57:32PM -0600, Jeff Law wrote: I think the lack of test coverage is something we'll want to address. Building and running the compiler, the various target libraries, and the testsuite is more than enough coverage for

Re: [PATCH 1/9] separate shrink-wrap: New command-line flag, status flag, hooks, and doc

2016-09-09 Thread Bernd Schmidt
On 09/08/2016 07:20 PM, Jeff Law wrote: On 08/29/2016 03:31 AM, Bernd Schmidt wrote: How do these actually know where to save/restore registers? The frame pointer may have been eliminated, and SP isn't necessarily constant during the function. Seems like you'd have to calculate CFA reg/offset

Re: Make max_align_t respect _Float128 [version 2]

2016-09-08 Thread Bernd Schmidt
On 09/08/2016 01:21 AM, Paul Eggert wrote: Sure, attached. On Fedora 24 x86-64 (GCC 6.1.1 20160621, valgrind 3.11.0), when I compile with "gcc -O2 flexouch.c" and run with "valgrind ./a.out", valgrind complains "Invalid read of size 2". This is because GCC compiles "p->d[0] == 2 && p->d[1] ==

Re: [Patch libgcc] Enable HCmode multiply and divide (mulhc3/divhc3)

2016-09-07 Thread Bernd Schmidt
On 09/07/2016 06:05 PM, James Greenhalgh wrote: Hi, This patch arranges for half-precision complex multiply and divide routines to be built if __LIBGCC_HAS_HF_MODE__. This will be true if the target supports the _Float16 type. OK? Ok, but please see Joseph's patch from today: I think you

Re: Correct libgcc complex multiply excess precision handling

2016-09-07 Thread Bernd Schmidt
On 09/07/2016 11:48 PM, Joseph Myers wrote: libgcc complex multiply is meant to eliminate excess precision from certain internal values by forcing them to memory in exactly those cases where the type has excess precision. But in https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01894.html I

Re: [PATCH][v3] GIMPLE store merging pass

2016-09-07 Thread Bernd Schmidt
On 09/07/2016 10:19 AM, Richard Biener wrote: On Tue, 6 Sep 2016, Jakub Jelinek wrote: If you want a 64-bit store, you'd need to merge the two, and that would be even more expensive. It is a matter of say: movl $0x12345678, (%rsp) movl $0x09abcdef, 4(%rsp) vs.

Re: [DOC] Boolean -> boolean changes

2016-09-06 Thread Bernd Schmidt
On 09/06/2016 11:19 AM, Marek Polacek wrote: As discussed , this patch makes the Boolean -> boolean change in our doc/ directory. Ok for trunk? Yes, thanks. Bernd

Re: Make max_align_t respect _Float128 [version 2]

2016-09-06 Thread Bernd Schmidt
On 09/06/2016 11:11 AM, Florian Weimer wrote: I think this change is only safe because nothing relies on it. max_align_t is a committee invention with no actual users. I tried to verify that and ran grep over all the packages in /usr/portage/distfiles. That did get a number of matches,

Re: C/C++ PATCH for c/77423 (bogus warning with -Wlogical-not-parentheses)

2016-09-05 Thread Bernd Schmidt
On 09/05/2016 12:52 PM, Marek Polacek wrote: On Mon, Sep 05, 2016 at 12:35:13PM +0200, Bernd Schmidt wrote: On 09/02/2016 05:13 PM, Marek Polacek wrote: diff --git gcc/doc/invoke.texi gcc/doc/invoke.texi index 87da1f1..38d55d4 100644 --- gcc/doc/invoke.texi +++ gcc/doc/invoke.texi @@ -5437,8

Re: C/C++ PATCH for c/77423 (bogus warning with -Wlogical-not-parentheses)

2016-09-05 Thread Bernd Schmidt
On 09/02/2016 05:13 PM, Marek Polacek wrote: diff --git gcc/doc/invoke.texi gcc/doc/invoke.texi index 87da1f1..38d55d4 100644 --- gcc/doc/invoke.texi +++ gcc/doc/invoke.texi @@ -5437,8 +5437,8 @@ if (a < 0 && a < 0) @{ @dots{} @} @opindex Wlogical-not-parentheses @opindex

Re: [PATCH, rtl-optimization]: Fix PR77452, ICE: in plus_constant, at explow.c

2016-09-05 Thread Bernd Schmidt
On 09/04/2016 02:12 PM, Uros Bizjak wrote: As shown in the PR [1], combine is able to simplify lowpart CONST_VECTOR constant pool reference to its inner-mode reference. However, plus_constant was not able to extract the constant from narrowed access. Attached patch teaches plus_constant how to

Re: [PATCH] Improvements to typed_splay_tree (v2)

2016-09-01 Thread Bernd Schmidt
On 09/01/2016 03:01 AM, David Malcolm wrote: On Wed, 2016-08-31 at 16:12 +0200, Bernd Schmidt wrote: Looks ok otherwise. Thanks. Here's a revised version; I moved the "struct closure" into the class itself. Successfully bootstrapped on x86_64-pc-linux-gnu. OK for trunk? Sure. Bernd

Re: [PATCH 2/4] Improvements to typed_splay_tree

2016-08-31 Thread Bernd Schmidt
On 08/24/2016 03:28 AM, David Malcolm wrote: +/* Helper type for typed_splay_tree::foreach. */ + +template +struct closure Is this in the global namespace? If so, something more specific than "closure" might be more appropriate. Or move the struct into the typed_splay_tree class

Re: [PATCH] selftest.c: avoid explicit "selftest::" qualifiers

2016-08-31 Thread Bernd Schmidt
On 08/31/2016 02:31 AM, David Malcolm wrote: The following follow-up patch removes them, moving the "namespace selftest {" to the top of the file so it covers everything. LGTM. Bernd

Re: [PATCH] C: fixits for modernizing structure member designators

2016-08-30 Thread Bernd Schmidt
On 08/30/2016 04:38 PM, David Malcolm wrote: In conjunction with the not-yet-in-trunk -fdiagnostics-generate-patch, this can generate patches like this: --- modernize-named-inits.c +++ modernize-named-inits.c @@ -16,7 +16,7 @@ /* Old-style named initializers. */ struct foo old_style_f = {

Re: [PATCH 1/4] selftest: split out named_temp_file from temp_source_file

2016-08-29 Thread Bernd Schmidt
On 08/25/2016 03:13 AM, David Malcolm wrote: Split out a new base class for temp_source_file, named_temp_file, moving the deletion to the base class dtor, so that we can write out temporary files in other ways in selftests. gcc/ChangeLog: * selftest.c

Re: [PATCH 1/9] separate shrink-wrap: New command-line flag, status flag, hooks, and doc

2016-08-29 Thread Bernd Schmidt
On 08/01/2016 03:42 AM, Segher Boessenkool wrote: +@deftypefn {Target Hook} void TARGET_SHRINK_WRAP_EMIT_PROLOGUE_COMPONENTS (sbitmap) +Emit prologue insns for the components indicated by the parameter. +@end deftypefn + +@deftypefn {Target Hook} void TARGET_SHRINK_WRAP_EMIT_EPILOGUE_COMPONENTS

Re: [PATCH] report supported function classes correctly on *-musl

2016-08-29 Thread Bernd Schmidt
On 07/20/2016 03:39 PM, Szabolcs Nagy wrote: All function classes listed in gcc/coretypes.h are supported by musl. Most of the optimizations based on these function classes are not relevant for standard conform c code, but this is required to get rid of some test system noise. gcc/ 2016-07-20

Re: [PATCH] disable ifunc on *-musl by default

2016-08-29 Thread Bernd Schmidt
On 07/20/2016 03:37 PM, Szabolcs Nagy wrote: Musl libc does not support gnu ifunc, so disable it by default. (not disabled on s390-* since that has no musl support yet.) gcc/ 2016-07-20 Szabolcs Nagy * config.gcc (*-*-*musl*): Disable gnu-indirect-function.

Re: [PATCH] selftest.h: mark failure functions with ATTRIBUTE_NORETURN.

2016-08-29 Thread Bernd Schmidt
On 08/26/2016 08:20 PM, David Malcolm wrote: Is this revised version OK for trunk? LGTM. Bernd

Re: [PATCH] selftest.h: mark failure functions with "noreturn"

2016-08-26 Thread Bernd Schmidt
On 08/26/2016 06:05 PM, David Malcolm wrote: selftest::fail and selftest::fail_formatted call abort. Marking them as "noreturn" can help eliminate false warnings about unreachable code in selftests. Successfully bootstrapped on x86_64-pc-linux-gnu. OK for trunk? Don't we want to wrap this

Re: [PATCH 3/3] make stack_slot_list a vec

2016-08-26 Thread Bernd Schmidt
On 08/26/2016 06:03 PM, Trevor Saunders wrote: yeah, it was just from being overly careful to not change behavior, but that's silly we can always revert if it turns out to break something. Not silly at all - it's a good mindset to have. But in cases where the order doesn't matter I think it's

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-08-26 Thread Bernd Schmidt
On 08/26/2016 04:50 PM, Segher Boessenkool wrote: The head comment starts with +/* Separate shrink-wrapping + + Instead of putting all of the prologue and epilogue in one spot, we + can put parts of it in places where those components are executed less + frequently. and that is the long

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-08-26 Thread Bernd Schmidt
On 08/26/2016 03:48 PM, David Malcolm wrote: I'm nervous about the build_random_cfg function: randomness in selftests seems like a double-edged sword. On the one hand, we can use it to fuzz-test an optimization to rapidly gain a lot of coverage. On the other hand, does every host generate the

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-08-26 Thread Bernd Schmidt
On 08/01/2016 03:42 AM, Segher Boessenkool wrote: This is the second version. Concern was renamed to component, and all other comments were addressed (I hope). Not really, I'm afraid. There still seems to be no detailed explanation of the algorithm. Instead, there is a vague outline (which

Re: [PATCH 1/3] haifa-sched.c: make ready_list an auto_vec

2016-08-25 Thread Bernd Schmidt
On 08/25/2016 08:50 AM, tbsaunde+...@tbsaunde.org wrote: From: Trevor Saunders gcc/ChangeLog: 2016-08-25 Trevor Saunders * haifa-sched.c (fix_recovery_deps): Make ready_list a vector. The subject of the mail scared me, but

Re: [PATCH 3/3] make stack_slot_list a vec

2016-08-25 Thread Bernd Schmidt
On 08/25/2016 08:50 AM, tbsaunde+...@tbsaunde.org wrote: @@ -2626,8 +2626,10 @@ unshare_all_rtl_1 (rtx_insn *insn) This special care is necessary when the stack slot MEM does not actually appear in the insn chain. If it does appear, its address is unshared from all else at

Re: [PATCH 2/3] make forced labels a vec

2016-08-25 Thread Bernd Schmidt
On 08/25/2016 08:50 AM, tbsaunde+...@tbsaunde.org wrote: + FOR_EACH_VEC_SAFE_ELT_REVERSE (forced_labels, i, insn) + make_label_edge (edge_cache, bb, insn, EDGE_ABNORMAL); All of these look like they'd be perfectly fine as a normal FOR_EACH_VEC_SAFE_ELT, and it would

Re: [PATCH 0/4] Applying fix-its on behalf of the user to their code

2016-08-24 Thread Bernd Schmidt
On 08/24/2016 03:28 AM, David Malcolm wrote: (B) -fdiagnostics-apply-fixits, which writes back the changes to the input files. That sounds really scary, there's no way I'd personally ever enable something like this. Do we have any data about what percentage of fixits actually correctly

Re: [PATCH] remove HARD_FRAME_POINTER_IS_ARG_POINTER macro

2016-08-22 Thread Bernd Schmidt
On 08/20/2016 07:07 PM, tbsaunde+...@tbsaunde.org wrote: From: Trevor Saunders Hi, its kind of silly, and this allows us to remove a few more #ifdefs. #if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM -#if HARD_FRAME_POINTER_IS_ARG_POINTER +#if

Re: protected alloca class for malloc fallback

2016-08-09 Thread Bernd Schmidt
On 08/09/2016 03:17 PM, Aldy Hernandez wrote: On 08/05/2016 01:55 PM, Richard Biener wrote: Hi Richard. Please don't use std::string. For string building you can use obstacks. Alright let's talk details then so I can write things up in a way you approve of. Take for instance simple uses

Re: [Patch, tentative, reload] Make push_reload work with more types of subregs?

2016-08-09 Thread Bernd Schmidt
On 08/08/2016 05:26 PM, Senthil Kumar Selvaraj wrote: I picked out the commit where you'd added SYMBOL_REF handling (rev #190252), and patched that with the below code. Bootstrapped and regtested on x86_64-pc-linux - the results were identical with and without the patch. Is this good enough for

Re: [GCC Steering Committee attention] [PING] [PING] [PING] libgomp: In OpenACC testing, cycle though $offload_targets, and by default only build for the offload target that we're actually going to te

2016-08-05 Thread Bernd Schmidt
On 08/04/2016 04:49 PM, Thomas Schwinge wrote: Global Reviewers are welcome to review OpenACC/OpenMP/offloading patches. But that doesn't help if that's then not happening in reality. (With the exception of Bernd, who then did review such patches for a while, but also seems to have stopped with

Re: [GCC Steering Committee attention] [PING] [PING] [PING] libgomp: In OpenACC testing, cycle though $offload_targets, and by default only build for the offload target that we're actually going to te

2016-08-05 Thread Bernd Schmidt
On 08/04/2016 04:49 PM, Thomas Schwinge wrote: Global Reviewers are welcome to review OpenACC/OpenMP/offloading patches. But that doesn't help if that's then not happening in reality. (With the exception of Bernd, who then did review such patches for a while, but also seems to have stopped with

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