Re: [PATCH] Fix compile/memory hog in the combiner (PR rtl-optimization/69592)

2016-02-01 Thread Bernd Schmidt
On 02/01/2016 09:34 PM, Jakub Jelinek wrote: On the following testcase we completely uselessly consume about 5.5GB of RAM and lots of compile time. The problem is the code to avoid exponential behavior of nonzero_bits/num_sign_bit_copies on binary arithmetics rtxes, which causes us to recurse

Re: Is it OK for rtx_addr_can_trap_p_1 to attempt to compute the frame layout? (was Re: [PATCH] Skip re-computing the mips frame info after reload completed)

2016-02-01 Thread Bernd Schmidt
On 01/29/2016 08:42 PM, Bernd Edlinger wrote: On 29.01.2016 16:47 Bernd Schmidt wrote: Yes. What is the problem with that? If we have (plus sfp const_int) at any point before reload, we can check whether that offset is inside frame_size. If it isn't or if the offset isn't known, it could trap

Re: Is it OK for rtx_addr_can_trap_p_1 to attempt to compute the frame layout? (was Re: [PATCH] Skip re-computing the mips frame info after reload completed)

2016-02-01 Thread Bernd Schmidt
On 02/01/2016 01:49 PM, Richard Biener wrote: What prevents motion of those across a stack adjustment (thus a place they are _not_ valid?) If the address is SP-based, dependencies on the address register. If you're thinking prologue stack adjustments, ports where this could be an issue emit

Fix some i386 testcases for -frename-registers

2016-01-29 Thread Bernd Schmidt
This patch corrects some tests that can fail with -frename-registers. The problems typically are of the form "xmm[0-7]+", disallowing registers 8 and 9, and "xmm[0-9]". disallowing numbers higher than 9. Most the patch was automatically generated, but there were some other cases as well.

Fix c/69522, memory management issue in c-parser

2016-01-29 Thread Bernd Schmidt
Let's say we have struct a { int x[1]; int y[1]; } x = { 0, { 0 } }; ^ When we reach the marked brace, we call into push_init_level, where we notice that we have implicit initializers (for x[]) lying around that we should deal with now that we've seen another open brace. The

Re: Is it OK for rtx_addr_can_trap_p_1 to attempt to compute the frame layout? (was Re: [PATCH] Skip re-computing the mips frame info after reload completed)

2016-01-29 Thread Bernd Schmidt
On 01/29/2016 04:41 PM, Jakub Jelinek wrote: On Fri, Jan 29, 2016 at 02:09:25AM +0100, Bernd Schmidt wrote: I think a better approach might be to just mark accesses at known locations in the frame, or arg pushes, as MEM_NOTRAP_P, and consider accesses with non-constant or calculated offsets

Enabling -frename-registers?

2016-01-29 Thread Bernd Schmidt
So PR57193 has an example of sub-optimal code generation, with some unnecessary register moves left after LRA. These seem to be difficult to prevent, but last year Robert Suchanek made some modifications to regrename that allow it to clean up such cases. Enabling -frename-registers removes one

Re: Is it OK for rtx_addr_can_trap_p_1 to attempt to compute the frame layout? (was Re: [PATCH] Skip re-computing the mips frame info after reload completed)

2016-01-28 Thread Bernd Schmidt
On 01/28/2016 12:36 AM, Eric Botcazou wrote: [cc-ing Eric as RTL maintainer] Sorry for the delay, the message apparently bounced] IMO the problem is that rtx_addr_can_trap_p_1 duplicates a large bit of LRA/reload logic: [...] Under the current interface macros like

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-27 Thread Bernd Schmidt
On 01/27/2016 04:18 PM, Ian Lance Taylor wrote: On Wed, Jan 27, 2016 at 7:16 AM, Bernd Schmidt <bschm...@redhat.com> wrote: Still, I feel uncomfortable about making a promise we don't really expect to fully keep yet, so I would prefer this option to be undocumented for now. I won't

Re: RFA: Fix ICE compiling gcc.dg/lto/pr55113_0.c for x86/x86_64

2016-01-27 Thread Bernd Schmidt
On 01/08/2016 02:00 PM, Bernd Schmidt wrote: On 01/08/2016 10:41 AM, Richard Biener wrote: On Tue, Dec 22, 2015 at 10:55 AM, Nick Clifton <ni...@redhat.com> wrote: Richard Biener wrote: I think the option should be simply removed... Tempting - but we are in stage 3... My patch at

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-27 Thread Bernd Schmidt
+This option is disabled by default for most languages, enabled by +default for languages that use garbage collection. This is not true as of this patch. Index: tree-ssa-loop-ivopts.c === --- tree-ssa-loop-ivopts.c (revision

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-27 Thread Bernd Schmidt
On 01/27/2016 02:59 PM, Ian Lance Taylor wrote: +This option is disabled by default for most languages, enabled by +default for languages that use garbage collection. This is not true as of this patch. Yes. As I said elsewhere, my intent is to do that as a separate patch. Then the

Re: Wonly-top-basic-asm

2016-01-26 Thread Bernd Schmidt
On 01/26/2016 01:29 AM, Segher Boessenkool wrote: In my opinion we should not warn for any asm that means the same both as basic and as extended asm. The problem then becomes, what *is* the meaning of a basic asm, what does it clobber. I think this may be too hard to figure out in general

Re: [PATCH] pr69477 - attribute aligned documentation misleading

2016-01-26 Thread Bernd Schmidt
On 01/25/2016 11:13 PM, Martin Sebor wrote: The attached patch adjusts the documentation of attribute aligned and attribute pack so as to prevent misreading the text of the former attribute as if it had read: Specifying attribute aligned for struct and union types is equivalent to

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-26 Thread Bernd Schmidt
On 01/25/2016 05:03 PM, Ian Lance Taylor wrote: On Mon, Jan 25, 2016 at 3:39 AM, Bernd Schmidt <bschm...@redhat.com> wrote: On 01/23/2016 12:52 AM, Ian Lance Taylor wrote: 2016-01-22 Ian Lance Taylor <i...@google.com> * common.opt (fkeep-gc-roots-live): New option. * tree-ssa-l

Re: [PATCH] PR other/69006: fix extra newlines after diagnostics (v2)

2016-01-26 Thread Bernd Schmidt
On 01/25/2016 09:13 PM, David Malcolm wrote: Here's an updated version of the patch. Thanks! Instead of testing one particular kind of output via a plugin, this version of the patch adds code to gcc-dg-prune to issue a FAIL for any testcase containing blank lines, with a new

Re: [PATCH] Fix handling of ZERO_EXTRACT lhs with REG_EQUAL note in the combiner (PR target/69442)

2016-01-26 Thread Bernd Schmidt
On 01/26/2016 09:39 AM, Jakub Jelinek wrote: PR target/69442 * combine.c (combine_instructions): For REG_EQUAL note with SET_DEST being ZERO_EXTRACT, also temporarily set SET_DEST to the underlying register. * doc/rtl.texi (REG_EQUAL): Document the

Re: "cc" clobber

2016-01-26 Thread Bernd Schmidt
On 01/27/2016 12:12 AM, David Wohlferd wrote: I started by just commenting out the code in ix86_md_asm_adjust that unconditionally clobbered the flags. I figured this would allow the 'normal' "cc" handling to occur. But apparently there is no 'normal' "cc" handling. I have a dim memory that

Re: [PATCH] Handle -fsanitize=* in lto-wrapper (PR lto/69254)

2016-01-26 Thread Bernd Schmidt
On 01/26/2016 02:24 PM, Jakub Jelinek wrote: just designed to enable DEF_SANITIZER_BUILTIN (IIUC). Also, why use shift and not just sanitize=undefined? Because -fsanitize=undefined is a large collection of individual sanitizers, and at least some of them affect also post-IPA code (e.g.

Re: [PATCH] Handle -fsanitize=* in lto-wrapper (PR lto/69254)

2016-01-26 Thread Bernd Schmidt
On 01/25/2016 09:30 PM, Jakub Jelinek wrote: Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? I've been staring at it for a while, and on the whole I think I can make sense of this. However - it does not have test coverage. Can this be added? Also, is this a regression?

Re: Question about how to fix PR69052

2016-01-26 Thread Bernd Schmidt
On 01/26/2016 10:48 AM, Bin.Cheng wrote: Yes, I moved whole loop pass (also the pass_web) after combine and it worked. A combine pass before loop-invariant can fix this problem. Below passes are currently between loop transform and combine: NEXT_PASS (pass_web); NEXT_PASS

Re: Question about how to fix PR69052

2016-01-25 Thread Bernd Schmidt
On 01/25/2016 08:51 PM, Jeff Law wrote: No, the combiner works within a basic block only. There was a group, I believe in Moscow, that worked on a cross-block combiner. It was discussed at the Cauldron in California a few years back. I don't know if they did any further work on those ideas.

Re: [PATCH] pr 65702 - error out for invalid register asms earlier

2016-01-25 Thread Bernd Schmidt
On 01/25/2016 04:36 PM, tbsaunde+...@tbsaunde.org wrote: $subject. To avoid regressions I kept the checks when generating rtl, but I believe its impossible for those to trigger now and we can remove the checks. bootstrapped + regtested on x86_64-linux-gnu, ok? Is this still an issue? I

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-25 Thread Bernd Schmidt
On 01/23/2016 12:52 AM, Ian Lance Taylor wrote: 2016-01-22 Ian Lance Taylor * common.opt (fkeep-gc-roots-live): New option. * tree-ssa-loop-ivopts.c (add_candidate_1): If -fkeep-gc-roots-live, skip pointers. (add_iv_candidate_for_biv): Handle add_candidate_1 returning NULL.

Re: Wonly-top-basic-asm

2016-01-25 Thread Bernd Schmidt
On 01/24/2016 11:23 PM, David Wohlferd wrote: +Wonly-top-basic-asm +C ObjC ObjC++ C++ Var(warn_only_top_basic_asm) Warning +Warn on unsafe uses of basic asm. Maybe just -Wbasic-asm? +/* Warn on basic asm used inside of functions, + EXCEPT when in naked functions. Also allow

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-22 Thread Bernd Schmidt
On 01/22/2016 08:03 PM, Ian Lance Taylor wrote: Updated patch. I've verified that I'm changing the only relevant place in tree-ssa-loop-ivopts.c that creates a POINTER_PLUS_EXPR, so I do think that this is the only changed to fix the problem for ivopts. I don't think so. One of the problems

Re: Suspicious code in fold-const.c

2016-01-22 Thread Bernd Schmidt
On 01/22/2016 02:37 PM, Andrew MacLeod wrote: /* If the initializer is non-void, then it's a normal expression that will be assigned to the slot. */ (*) if (!VOID_TYPE_P (t)) (*) return RECURSE (t); I suspect this should also be if

Re: [gomp4] Un-parallelized OpenACC kernels constructs with nvptx offloading: "avoid offloading"

2016-01-22 Thread Bernd Schmidt
On 01/22/2016 02:25 PM, Jakub Jelinek wrote: What about #pragma oacc parallel? That would never do that? It shouldn't, no (IMO). Bernd

Re: [gomp4] Un-parallelized OpenACC kernels constructs with nvptx offloading: "avoid offloading"

2016-01-22 Thread Bernd Schmidt
On 01/22/2016 09:36 AM, Jakub Jelinek wrote: I think it is a bad idea to go against what the user wrote. Warning that some code might not be efficient? Perhaps (if properly guarded with some warning option one can turn off, either on a per-source file or using pragmas even more fine grained).

Re: [PATCH][ARM][4/4] Adjust gcc.target/arm/wmul-[123].c tests

2016-01-22 Thread Bernd Schmidt
On 01/22/2016 10:52 AM, Kyrill Tkachov wrote: AFAICT the new sequence is better than the old one even for -mtune=cortex-a9 since it contains two fewer instructions. Just curious (I think this patch series is good but will leave it to the arm folks) - are these instructions equally expensive?

Re: gomp_target_fini

2016-01-21 Thread Bernd Schmidt
Thomas, I've mentioned this issue before - there is sometimes just too much irrelevant stuff to wade through in your patch submissions, and it discourages review. The discussion of the actual problem begins more than halfway through your multi-page mail. Please try to be more concise. On

Re: [PATCH] OpenACC use_device clause ICE fix

2016-01-21 Thread Bernd Schmidt
On 01/21/2016 03:22 PM, Chung-Lin Tang wrote: On 2016/1/20 09:17 PM, Bernd Schmidt wrote: On 01/05/2016 02:15 PM, Chung-Lin Tang wrote: * omp-low.c (scan_sharing_clauses): Call add_local_decl() for use_device/use_device_ptr variables. It looks vaguely plausible, but if everything

Backport PR63681 cfglayout/doloop fix to 4.9

2016-01-21 Thread Bernd Schmidt
I've bootstrapped and tested the following on 4.9-branch. It's a backport of a patch that avoids unnecessary assertion failures, both by tuning down an assert, and restricting an optimization for the case where the assert would validly trigger. Ok to commit on the branch? Bernd PR

Re: [patch] Document restriction of scalar_storage_order

2016-01-21 Thread Bernd Schmidt
On 01/21/2016 05:34 PM, Eric Botcazou wrote: Tested on x86_64-suse-linux, OK for the mainline? 2016-01-21 Eric Botcazou * doc/extend.texi (scalar_storage_order type attribute): Document restriction on type punning and aliasing. Isn't this kind of

Re: [PATCH] gcc/configure test for AIX DWARF

2016-01-21 Thread Bernd Schmidt
On 01/18/2016 08:30 PM, David Edelsohn wrote: Bootstrapped on powerpc-ibm-aix7.1.2.0 with and without the corrected assembler. Okay? The changes seem to be in *-*-aix blocks, so as far as I'm concerned you are the maintainer and can check this in. One question though: ;; esac

Re: [PATCH v2] PR48344: Fix unrecognizable insn error when gcc

2016-01-20 Thread Bernd Schmidt
On 01/20/2016 10:49 PM, Kelvin Nilsen wrote: * toplev.c (do_compile): remove invocation of process_options () from within do_compile () (toplev::main): insert invocation of process_options () before invocation of handle_common_deferred_options (). The ChangeLog

Re: [PATCH] OpenACC use_device clause ICE fix

2016-01-20 Thread Bernd Schmidt
On 01/05/2016 02:15 PM, Chung-Lin Tang wrote: * omp-low.c (scan_sharing_clauses): Call add_local_decl() for use_device/use_device_ptr variables. It looks vaguely plausible, but if everything is part of the host function, why make a copy of the decl at all? I.e. what happens if

Fixes for PR66178

2016-01-20 Thread Bernd Schmidt
PR66178 has some testcases where we construct expressions involving additions and subtractions of label addresses, and we crash when trying to expand these. There are two different issues here, shown by various testcases in the PR: * expand_expr_real_2 can drop EXPAND_INITIALIZER and then go

Re: genattrab.c generate switch

2016-01-19 Thread Bernd Schmidt
On 01/18/2016 11:44 PM, Jesper Broge Jørgensen wrote: I found a formatting tool called uncrustify that comes with a gnu style config https://github.com/bengardner/uncrustify/blob/master/etc/gnu-indent.cfg that needed a few tweaks to format code that looked what is already in gcc/genattrtab.c

Re: [PATCH] Fix debug info handling in prepare_shrink_wrap (PR debug/65779)

2016-01-19 Thread Bernd Schmidt
On 01/19/2016 12:33 AM, Jakub Jelinek wrote: + if (MAY_HAVE_DEBUG_INSNS) +{ + for (dinsn = BB_END (bb); dinsn != insn; dinsn = PREV_INSN (dinsn)) + if (DEBUG_INSN_P (dinsn)) + { + df_ref use; + FOR_EACH_INSN_USE (use, dinsn) + if

Re: [PATCH] Fix debug info handling in prepare_shrink_wrap (PR debug/65779)

2016-01-19 Thread Bernd Schmidt
On 01/19/2016 02:08 PM, Jakub Jelinek wrote: On Tue, Jan 19, 2016 at 01:27:32PM +0100, Bernd Schmidt wrote: Is there a way to merge these two blocks (e.g. by moving this to the start of the loop and testing for insn or BB_HEAD)? Sure, like this? That's ok. I'm assuming you know best how

Re: Do not redirect calls to cxa_pure_virtual into bultin_unreachable in some cases

2016-01-19 Thread Bernd Schmidt
On 01/19/2016 05:50 PM, Jan Hubicka wrote: +static bool +is_cxa_pure_virtual_p (tree target) +{ + return target && TREE_CODE (TREE_TYPE (target)) != METHOD_TYPE +&& DECL_NAME (target) +&& !strcmp (IDENTIFIER_POINTER (DECL_NAME (target)), +

Re: [PATCH 1/9] gensupport: Fix define_subst operand renumbering.

2016-01-18 Thread Bernd Schmidt
On 01/14/2016 05:33 PM, Andreas Krebbel wrote: When processing substitutions the operands are renumbered. To find a free operand number the array used_operands_numbers is used to record the operand numbers already in use. Currently this array is used to assign new numbers *before* all the

Re: genattrab.c generate switch

2016-01-18 Thread Bernd Schmidt
On 01/13/2016 01:53 AM, Jesper Broge Jørgensen wrote: genattrab.c can generate if statements that have very deep bracket nesting causing clang to produce errors (when target=arm-none-eabi) as explained at https://gcc.gnu.org/ml/gcc/2014-05/msg00032.html At the above link it was suggested that

Re: [PATCH] PR testsuite/69181: ensure expected multiline outputs is cleared per-test (v2)

2016-01-18 Thread Bernd Schmidt
So we do need error cleanup for both blocks (A) and (B). gcc/testsuite/ChangeLog: PR testsuite/69181 * gcc.dg/pr69181-1.c: New test file. * gcc.dg/pr69181-2.c: New test file. * lib/gcc-dg.exp (dg-test): Consolidate post-test cleanup of globals by moving

Re: Reorder/combine insns on superscalar arch

2016-01-15 Thread Bernd Schmidt
On 01/15/2016 07:05 AM, Jeff Law wrote: Well, you have to write the pattern and a splitter. But these days there's define_insn_and_split to help with that. Reusing Bernd's work may ultimately be easier though. Maybe, but maybe also not in the way you think. I've always wanted the ability

IRA fix for 47992

2016-01-15 Thread Bernd Schmidt
This is a report of a crash in IRA. If you debug it with a sufficiently old compiler, you'll find that we manage to delete some basic blocks from within IRA. Later on, reload calls alter_reg for all unallocated pseudos, including one that only occurs in the deleted blocks. reload does not

Re: PR 69246: Invalid REG_ARGS_SIZE for sibcalls

2016-01-15 Thread Bernd Schmidt
On 01/15/2016 03:31 PM, Richard Sandiford wrote: The problem in this PR was that we were treating a sibcall as popping arguments, leading to a negative REG_ARGS_SIZE. It doesn't really make sense to treat sibcalls as popping since (a) they're deallocating the caller's stack, not ours, and (b)

Re: Remove sel-sched?

2016-01-15 Thread Bernd Schmidt
On 01/15/2016 11:13 AM, Richard Biener wrote: Btw, I'd like people to start thinking if the scheduling algorithms working on loops (and sometimes requiring unrolling of loops) can be implemented in a way to apply that unrolling on the GIMPLE level (not the scheduling itself of course). Thus have

Thoughts on memcmp expansion (PR43052)

2016-01-15 Thread Bernd Schmidt
PR43052 is a PR complaining about how the rep cmpsb expansion that gcc uses for memcmp is slower than the library function. As is so often the case, if you investigate a bit, you can find a lot of issues with the current situation in the compiler. This PR was accidentally fixed by a patch by

Re: Optimise hash_table::empty

2016-01-15 Thread Bernd Schmidt
On 01/15/2016 07:00 PM, Richard Sandiford wrote: Calling redirect_edge_var_map_empty after each pass was slowing things down because hash_table::empty () cleared all slots even if the hash table was already empty. Tested on x86_64-linux-gnu, where it gives a 1% compile time improvement for

Re: Remove sel-sched?

2016-01-14 Thread Bernd Schmidt
On 01/14/2016 06:26 PM, Jeff Law wrote: I think the bigger question Bernd is asking here is whether or not it makes sense to have multiple schedulers. In an ideal world we'd bake them off select the best and deprecate/remove the others. I didn't follow sel-sched development closely, so forgive

Re: [PATCH] Avoid simplifying RTL expressions in too large integral modes (PR target/68269)

2016-01-14 Thread Bernd Schmidt
On 01/14/2016 03:31 PM, Jakub Jelinek wrote: PR target/68269 * combine.c (expand_field_assignment): Punt if compute_mode is unsupported scalar mode. Ok. Bernd

Remove sel-sched?

2016-01-13 Thread Bernd Schmidt
There are a few open PRs involving sel-sched, and I'd like to start a discussion about removing it. Having two separate schedulers isn't a very good idea in the first place IMO, and since ia64 is dead, sel-sched gets practically no testing despite being the more complex one. Thoughts? Bernd

Re: [Patch ifcvt] Add a new parameter to limit if-conversion

2016-01-13 Thread Bernd Schmidt
PR rtl-optimization/68920 * ifcvt.c (cond_move_process_if_block): Limit number of conditional moves. Ok. This should probably be consolidated a bit post 6.0. Bernd

Re: [PATCH] PR other/69006: fix extra newlines after diagnostics

2016-01-13 Thread Bernd Schmidt
On 01/13/2016 01:57 AM, David Malcolm wrote: There are five places in trunk that can call diagnostic_show_locus. I'd kind of like to see before/after example output for all of these, to make sure that we are indeed removing only unnecessary newlines. The final caller of

Re: [PATCH, testsuite] Fix g++.dg/pr67989.C test failure when running with -march or -mcpu

2016-01-13 Thread Bernd Schmidt
On 01/12/2016 08:55 AM, Thomas Preud'homme wrote: On Monday, January 11, 2016 04:57:18 PM Bernd Schmidt wrote: On 01/08/2016 10:33 AM, Thomas Preud'homme wrote: 2016-01-08 Thomas Preud'homme <thomas.preudho...@arm.com> * g++.dg/pr67989.C: Remove ARM-specific

Re: [patch] libsanitizer

2016-01-13 Thread Bernd Schmidt
On 01/11/2016 07:37 PM, Andreas Tobler wrote: +# Do a configure time check for -ldl +AC_CHECK_LIB(dl, dlsym, + [link_sanitizer_common="-lrt $link_sanitizer_common"]) + I'll give it a test run. If that works (with -ldl instead of -lrt) it's ok. Bernd

Re: [PATCH] Handle inter-block notes before BARRIER in rtl merge_blocks (PR target/69175, take 2)

2016-01-12 Thread Bernd Schmidt
On 01/12/2016 11:17 AM, Jakub Jelinek wrote: PR target/69175 * ifcvt.c (cond_exec_process_if_block): When removing the last insn from then_bb, remove also any possible barriers that follow it. * g++.dg/opt/pr69175.C: New test. Ok. Bernd

Re: [Patch ifcvt] Add a new parameter to limit if-conversion

2016-01-12 Thread Bernd Schmidt
On 01/12/2016 04:41 PM, Yuri Rumyantsev wrote: Here is a simple fix to exclude dg/ifcvt-5.c test from ia64 testing. Is it OK for trunk? Please ensure patches are attached as plain text so that reviewers don't have to save them to be able to read them. It looks like ia64 is making chanes in

Re: Some real-life feedback on -Wmisleading-indentation

2016-01-12 Thread Bernd Schmidt
On 01/12/2016 06:44 AM, Jeff Law wrote: I would argue that each of these does represent misleading indentation and that the warning is warranted for each. Perhaps they aren't as bad as prior cases, but I'd still consider them mis-leading.

Re: prevent "undef var" errors on gcc --help or --version

2016-01-12 Thread Bernd Schmidt
On 01/12/2016 05:11 PM, Olivier Hainque wrote: + /* Decide if undefined variable references are allowed in specs. */ + { +/* --version and --help alone or together are safe. Note that -v would + make them unsafe, as they'd then be run for subprocesses as well, the +

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/68841: Make sure one basic block doesn't clobber CC reg usage of the other

2016-01-11 Thread Bernd Schmidt
Ok, this works too. Here is a version that adds orig_x to the if_info struct and passes it down to bbs_ok_for_cmove_arith. This passes bootstrap and test on arm, aarch64, x86_64. I think this is ok. Bernd

Re: [gomp4] teach the lto driver to error for missing decls

2016-01-11 Thread Bernd Schmidt
On 01/08/2016 11:37 PM, Cesar Philippidis wrote: In openacc there are situations where a user may fail to mark a variable or function as offloadable (either using declare or routine). This patch makes the lto wrapper reduce the missing decl assertion to an error. Hmm, it might be good to have

Re: [PATCH] OpenACC documentation for libgomp

2016-01-11 Thread Bernd Schmidt
On 01/05/2016 04:47 PM, James Norris wrote: I've updated the original patch after some very helpful comments from Sandra (thank you, thank you). OK to commit to trunk? I'm probably not fully qualified to review the contents either, but few people are and it looks reasonable enough that I

Re: [PR tree-optimization/64946] Push integer type conversion to ABS_EXPR argument when possible.

2016-01-11 Thread Bernd Schmidt
On 01/11/2016 05:33 PM, Matthew Wahab wrote: The case I'm trying to fix has (short)abs((int)short_var). I'd thought that if abs(short_var) was undefined because the result couldn't be represented then the type conversion from int to short would also be undefined. In fact, it's implementation

Re: [PATCH] PR c++/68795: fix uninitialized close_paren_loc in cp_parser_postfix_expression (v2)

2016-01-11 Thread Bernd Schmidt
On 12/18/2015 08:05 PM, David Malcolm wrote: On Thu, 2015-12-17 at 19:21 +0100, Bernd Schmidt wrote: On 12/17/2015 07:32 PM, David Malcolm wrote: + if (close_paren_loc) close_paren_loc != UNKNOWN_LOCATION - it's very confusing otherwise. Bernd Here's an updated version

Re: prevent "undef var" errors on gcc --help or --version

2016-01-11 Thread Bernd Schmidt
On 01/08/2016 02:23 PM, Olivier Hainque wrote: + /* Undefined variable references in specs are harmless if + we're running for --help or --version alone, or together. */ + spec_undefvar_allowed = +(((print_version || print_help_list) + && decoded_options_count == 2) + || +

Re: [PATCH, testsuite] Fix g++.dg/pr67989.C test failure when running with -march or -mcpu

2016-01-11 Thread Bernd Schmidt
On 01/08/2016 10:33 AM, Thomas Preud'homme wrote: 2016-01-08 Thomas Preud'homme * g++.dg/pr67989.C: Remove ARM-specific option. * gcc.target/arm/pr67989.C: New file. I checked some other arm tests and they have things like /* { dg-skip-if

Re: [PATHCH] Disable inline asm for in-tree mpfr (PR69134)

2016-01-11 Thread Bernd Schmidt
On 01/05/2016 07:43 PM, Richard Biener wrote: IIRC the logic at some point at least used host CPU detection to select asm. That's undesirable if you want to run binaries on different hosts. Not sure if this is still the case with newer gmp/mpfr, but as long as we allow the ancient ones we

Re: [patch] libsanitizer

2016-01-11 Thread Bernd Schmidt
On 11/10/2015 11:00 PM, Andreas Tobler wrote: the attached patch removes the hard-coded requirement for the link operation with -ldl. On FreeBSD we do not need that, it breaks compilation. # Common libraries that we need to link against for all sanitizer libs.

Re: C PATCH to rectify warning for character types (PR c/23087)

2016-01-08 Thread Bernd Schmidt
On 01/07/2016 10:19 PM, Joseph Myers wrote: I don't think it's desirable to raise the warning for this case under different conditions from the warning for other signedness cases. The targets do differ in signedness - it's just that the difference is between "plain" and "signed" or "plain" and

Re: [PATCH] Handle inter-block notes before BARRIER in rtl merge_blocks (PR target/69175)

2016-01-08 Thread Bernd Schmidt
On 01/08/2016 09:17 PM, Jakub Jelinek wrote: As mentioned in the PR, sched1 and reload add NOTE_INSN_DELETED notes that are moved by shrink-wrapping in between some basic blocks and later on we end up with a barrier after the notes. From comments above cleanup_barriers pass I think it isnot

Re: [PATCH] Handle inter-block notes before BARRIER in rtl merge_blocks (PR target/69175)

2016-01-08 Thread Bernd Schmidt
On 01/08/2016 10:23 PM, Jakub Jelinek wrote: Now, the merge_if_block caller removes the simple_return from the then_bb in preparation of the merge and expects the two bbs to be merged together, I'd be tempted to remove the barrier as well at this point. It does look like the cfgrtl code tries

Re: [PATCH] Handle inter-block notes before BARRIER in rtl merge_blocks (PR target/69175)

2016-01-08 Thread Bernd Schmidt
On 01/08/2016 11:05 PM, Bernd Schmidt wrote: On 01/08/2016 10:23 PM, Jakub Jelinek wrote: Now, the merge_if_block caller removes the simple_return from the then_bb in preparation of the merge and expects the two bbs to be merged together, I'd be tempted to remove the barrier as well

Re: [PATCH] PR testsuite/69181: ensure expected multiline outputs is cleared per-test

2016-01-08 Thread Bernd Schmidt
On 01/09/2016 01:51 AM, David Malcolm wrote: The root cause here is that the logic to reset the list of expected multiline outputs was being run from: handle-multiline-outputs, called by prune.exp's prune_gcc_output and none of that happens if the test is skipped by a target exclusion in

Re: RFA: Fix ICE compiling gcc.dg/lto/pr55113_0.c for x86/x86_64

2016-01-08 Thread Bernd Schmidt
On 01/08/2016 10:41 AM, Richard Biener wrote: On Tue, Dec 22, 2015 at 10:55 AM, Nick Clifton wrote: Hi Richard, The patch below is a fix for this problem, although I am not sure if it is the correct fix. The patch selects the corresponding SFmode variant of the

Re: [C++ PATCH] Fix ICE with bitfields (PR c++/69164)

2016-01-08 Thread Bernd Schmidt
On 01/07/2016 10:43 PM, Jakub Jelinek wrote: PR c++/69164 * class.c (layout_class_type): Also copy DEC_SIZE_UNIT, DECL_BIT_FIELD and DEC_BIT_FIELD_TYPE. Any reason this isn't using copy_node? Bernd

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/68841: Make sure one basic block doesn't clobber CC reg usage of the other

2016-01-08 Thread Bernd Schmidt
On 01/08/2016 02:11 PM, Kyrill Tkachov wrote: How's this? Hmm. Almost there, but... - if (then_bb && else_bb && !a_simple && !b_simple - && (!bbs_ok_for_cmove_arith (then_bb, else_bb) - || !bbs_ok_for_cmove_arith (else_bb, then_bb))) + rtx orig_x = x; + if (then_bb &&

Re: [PATCH] Remove PTX link option

2016-01-08 Thread Bernd Schmidt
On 01/08/2016 04:44 PM, Jakub Jelinek wrote: And CU_JIT_TARGET / CU_TARGET_COMPUTE_30 requests JITting only on sm_30 and nothing else, or just on sm_30 or later, something else? This really should be reviewed by somebody familiar with CUDA more than myself. I'll defer to Nathan whether to ack

Re: [ping] pending patches

2016-01-07 Thread Bernd Schmidt
On 01/06/2016 08:15 PM, David Malcolm wrote: [PATCH 1/4] PR c++/62314: add fixit hint for missing "template <> " in explicit specialization: https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01933.html [PATCH 2/4] PR c++/62314: add fixit hint for "expected ';' after class definition:

Re: [PATCH] testsuite/lib/multline.exp: show test name and line numbers

2016-01-07 Thread Bernd Schmidt
On 12/29/2015 10:17 AM, Uros Bizjak wrote: It looks that this new functionality doesn't handle conditional compilation, when /* { dg-do compile { target { ! ia32 } } } */ is added to the testcase, such as in recently changed gcc.target/i386/pr68473-1.c. The directive is passed to the next

Re: Fix PR66208

2016-01-07 Thread Bernd Schmidt
On 12/16/2015 11:14 PM, Jeff Law wrote: On 12/16/2015 10:13 AM, Bernd Schmidt wrote: This is a relatively straightforward PR where we should mention a macro expansion in a warning message. The patch below implements the suggestion by Marek to pass a location down from build_function_call_vec

Re: [PATCH] Fix #pragma implementation diagnostics (PR c++/69145, take 2)

2016-01-07 Thread Bernd Schmidt
On 01/07/2016 10:05 AM, Jakub Jelinek wrote: + if (IS_ADHOC_LOC (location)) +{ + location &= MAX_SOURCE_LOCATION; + location + = pfile->line_table->location_adhoc_data_map.data[location].locus; +} This looks like it is get_location_from_adhoc_loc. Bernd

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/68841: Make sure one basic block doesn't clobber CC reg usage of the other

2016-01-07 Thread Bernd Schmidt
On 01/07/2016 02:45 PM, Kyrill Tkachov wrote: On 07/01/16 11:52, Bernd Schmidt wrote: I looked and this is indeed the case. Still slightly scary. Should the MEM be rtx_equal_p to TO_RENAME? It would be good to test or at least assert this. I tried asserting that and it caused trouble

Re: [PATCH] Fix #pragma implementation diagnostics (PR c++/69145, take 2)

2016-01-07 Thread Bernd Schmidt
On 01/07/2016 10:36 PM, Jakub Jelinek wrote: I've also bootstrapped/regtested on x86_64-linux and i686-linux following version: 2016-01-07 Jakub Jelinek PR c++/69145 * files.c (cpp_included_before): If IS_ADHOC_LOC (location), lookup real location

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/68841: Make sure one basic block doesn't clobber CC reg usage of the other

2016-01-05 Thread Bernd Schmidt
On 01/05/2016 03:22 PM, Kyrill Tkachov wrote: This works around the issue but we don't want to do perform the check for pairs of simple basic blocks because then we'll end up rejecting code that does things like: x = cond ? x + 1 : x - 1 i.e. source of the set in both blocks reads and writes

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/68841: Make sure one basic block doesn't clobber CC reg usage of the other

2016-01-05 Thread Bernd Schmidt
On 12/21/2015 10:23 AM, Kyrill Tkachov wrote: Here is a version integrating the new checks into bbs_ok_for_cmove_arith. We might as well do it there since it already iterates over all the instructions in the basic blocks. The patch looks somewhat complicated and asymmetrical to me. I tried to

Re: [PATCH] Fix -Wmisleading indentation false-positive for do-while statement

2016-01-05 Thread Bernd Schmidt
On 01/05/2016 10:58 PM, David Malcolm wrote: In general I don't think we can get any useful indentation warning out of a do-while statement, so this patch makes it so that we just skip them. Is this OK to commit after testing? It looks like this is PR c++/69029. FWIW, I agree with your

Re: [PATHCH] Disable inline asm for in-tree mpfr (PR69134)

2016-01-05 Thread Bernd Schmidt
On 01/05/2016 09:44 AM, Bernd Edlinger wrote: an in-tree mpfr build enables inline asm code, which makes the mips-bootstrap fail, because at least mpfr 2.4.2 uses the "=h" constraint but in config/mips/constraints.md we find: "Formerly the @code{hi} register. This constraint is no longer

Re: [PATCH] Fix PR c/69122 (-Wmisleading-indentation false positive with empty macros)

2016-01-05 Thread Bernd Schmidt
On 01/05/2016 09:43 AM, David Malcolm wrote: gcc/c-family/ChangeLog: PR c/69122 * c-indentation.c (get_visual_column): Remove default argument. (should_warn_for_misleading_indentation): For the multiline case, update call to get_visual_column for next_stmt_exploc

Re: [PATCH] shrink-wrap: Once more PRs 67778, 68634, and now 68909

2016-01-04 Thread Bernd Schmidt
On 12/20/2015 05:27 PM, Segher Boessenkool wrote: On Fri, Dec 18, 2015 at 02:19:37AM +0100, Bernd Schmidt wrote: On 12/17/2015 10:07 PM, Segher Boessenkool wrote: It turns out v4 wasn't quite complete anyway; so here "v5". If a candidate PRE cannot get the prologue because

Re: [Patch ifcvt] Add a new parameter to limit if-conversion

2016-01-04 Thread Bernd Schmidt
On 12/31/2015 10:21 AM, Yuri Rumyantsev wrote: Here is slightly modified patch which limits a number of conditional moves instead of changing conditional branch cost. This is in fact a work-around for very poor cost model which needs to be enhanced to evaluate cost of conditional move that could

Re: cilkplus fails without pthreads for me

2016-01-04 Thread Bernd Schmidt
On 01/01/2016 07:13 PM, Mike Stump wrote: cilkplus fails without pthreads for me: xg++: error: unrecognized command line option '-pthread' compiler exited with status 1 output is: xg++: error: unrecognized command line option '-pthread' > @@ -1450,6 +1450,10 @@ proc

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/68841: Make sure one basic block doesn't clobber CC reg usage of the other

2015-12-18 Thread Bernd Schmidt
On 12/18/2015 02:07 PM, Kyrill Tkachov wrote: In this PR we have a THEN and an ELSE block where one uses the condition reg from the preceeding comparison but the other block has an arithmetic operation that clobbers the CC reg. ifcvt emits the latter first and dead code elimination later sees

Re: [PATCH][combine][v2] Canonicalise (r + r) to (r << 1) to aid recognition

2015-12-18 Thread Bernd Schmidt
On 12/18/2015 03:29 PM, Kyrill Tkachov wrote: Bootstrapped and tested on arm, aarch64, x86_64. As before, there were no codegen differences for SPEC2006 on x86_64. aarch64 SPEC2006 sees the effects described above. I think this is OK. There may be some question as to whether this is a bug

Fix PR67639

2015-12-18 Thread Bernd Schmidt
In an earlier fix, the following change was made in varasm.c for invalid register variables: --- trunk/gcc/varasm.c 2014/08/26 14:59:59 214525 +++ trunk/gcc/varasm.c 2014/08/26 17:06:31 214526 @@ -1371,6 +1371,11 @@ make_decl_rtl (tree decl) /* As a register variable, it has

Re: basic asm and memory clobbers - Proposed solution

2015-12-17 Thread Bernd Schmidt
On 12/17/2015 02:41 AM, David Wohlferd wrote: So how about: - Update the basic asm docs to describe basic asm's current (and historical) semantics (ie clobber nothing). - Emphasize how that might be different from users' expectations or the behavior of other compilers. - Warn that this could

Re: libgcc: unwind-ia64.c without malloc/free

2015-12-17 Thread Bernd Schmidt
On 12/17/2015 12:17 AM, Bernd Edlinger wrote: this is just an idea, how to avoid use of malloc in unwind-ia64.c. [...] What do you think? Not worth worrying about IMO. I think ia64 is dead and best left to rest in maintenance mode. Bernd

Re: [PATCH] Remove unused modified_noreturn_calls

2015-12-17 Thread Bernd Schmidt
On 12/17/2015 10:59 AM, Richard Biener wrote: +extern void gt_ggc_mx (gimple *&); +extern void gt_pch_nx (gimple *&); + This doesn't occur in the ChangeLog - unrelated change? Bernd

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