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 + location

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

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 * g++.dg/pr67989.C: Remove ARM-specific option. * gcc.target/arm

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

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 notic

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) th

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 N

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

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 gen

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 RTXes

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 i

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 The

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 (refers_to_

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 b

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)), +"__cxa_pure_virtual"

Re: [nvptx-tools, committed] Also install [...]/nvptx-none/bin/ar and [...]/nvptx-none/bin/ranlib.

2015-01-09 Thread Bernd Schmidt
On 12/23/2014 07:50 PM, Thomas Schwinge wrote: GCC needs this, if nvptx-none-ar and nvptx-none-ranlib aren't found in $PATH. I've pushed the three patches you sent to my github repository. Bernd

Re: Housekeeping work in backends.html

2015-01-09 Thread Bernd Schmidt
On 01/07/2015 12:39 AM, Eric Botcazou wrote: Some ports are missing (lm32, moxie, nios2, nvptx, rl78, rx) so the relevant maintainers are CCed (see 6.3.9 Anatomy of a Target Back End in the doc). The page is directly browsable at https://gcc.gnu.org/backends.html For the moxie, nvptx, rl178 an

Re: Ping / update: RFA: replace #ifdef with if/#if for HAVE_ATTR_*

2012-11-05 Thread Bernd Schmidt
On 10/31/2012 01:12 PM, Richard Sandiford wrote: > OK with those changes for the rtl bits. Can't approve the generator > stuff though. That's also OK. Bernd

sched-deps patch: Fix PR54580

2012-11-06 Thread Bernd Schmidt
If we have i1: [r1 + 24] = x i2: r1 = r1 + 24; i3: y = [r1] then, if not using cselib, we do not generate a dependency between i3 and i1, since we compare memory addresses [r1] and [r1 + 24]. This is somewhat lame, but safe since i2 depends on i1 and i3 depends on i2. However, it breaks with the

Re: [patch] PR55158 - segfault in sched-rgn.c

2012-12-07 Thread Bernd Schmidt
On 12/06/2012 01:31 PM, Steven Bosscher wrote: > Hello, > > The problem in this PR is that new basic blocks can be created if the > scheduler moves speculative insns and adds recovery code, but the > bb_state* arrays are allocated only at the start of scheduling a > region and are not set up to de

Re: vtables patch 1/3: allow empty array initializations

2013-04-26 Thread Bernd Schmidt
On 04/24/2013 09:14 PM, DJ Delorie wrote: >> 24 bits stored as three bytes, or four? How does this affect vtable >> layout? I would have expected the C++ frontend and libsupc++ to >> currently be inconsistent with each other given such a setup. > > In memory, four, I think. The address registers

Make m32c build, fix PSImode truncation

2013-04-26 Thread Bernd Schmidt
This patch here: http://gcc.gnu.org/ml/gcc-patches/2012-10/msg00661.html changed simplification code from case TRUNCATE: - /* We can't handle truncation to a partial integer mode here - because we don't know the real bitsize of the partial - integer mode. */ - if

Re: vtables patch 1/3: allow empty array initializations

2013-04-28 Thread Bernd Schmidt
On 04/28/2013 11:13 PM, DJ Delorie wrote: > >> I have patches to let one specify a precision for partial int types, >> easy enough to do, and the rest of the compiler plays nicely for the >> most part with it... > > If you can make size_t truly be a 24-bit value, I'd be very happy :-) This confu

Re: Make m32c build, fix PSImode truncation

2013-04-29 Thread Bernd Schmidt
On 04/27/2013 10:39 AM, Richard Sandiford wrote: > Argh, that's unfortunate. The point of that change was to make > simplify_gen_unary (TRUNCATE, ...) no worse than using a subreg. > Would the equivalent lowpart simplify_gen_subreg call succeed > (return nonnull)? If so, I think we want truncate

MEM_REF representation problem, and folding fix

2013-04-29 Thread Bernd Schmidt
Currently, MEM_REF contains two pointer arguments, one which is supposed to be a base object and another which is supposed to be a constant offset. This representation is somewhat problematic, as not all machines treat pointer values as essentially integers. On machines where size_t is smaller than

Re: [PATCH] Allow nested use of attributes in MD-files

2013-05-21 Thread Bernd Schmidt
On 04/26/2013 05:17 PM, Michael Zolotukhin wrote: > gcc/ChangeLog > 2013-04-26 Michael Zolotukhin > > * read-rtl.c (copy_rtx_for_iterators): Continue applying iterators > while it has any effect. Ok. Bernd

Remove dead assignments to static local variables

2013-06-06 Thread Bernd Schmidt
d. So, the following patch is a cut-down version of CodeSourcery's approach, originally written by Nathan Froyd, modified to do exactly that. Bootstrapped and tested on x86_64-linux, all languages except Ada. OK? Bernd commit ce5d3fe1bf7934dd551b7bf091f113f396e15d64 Author: Bernd Schmidt Date:

Re: Remove dead assignments to static local variables

2013-06-06 Thread Bernd Schmidt
On 06/06/2013 04:52 PM, Richard Biener wrote: > + /* We cannot optimize away a static used in multiple functions (as > +might happen in C++). */ > + && !DECL_NONLOCAL(var) > > it may also happen trivially with inlining. Which means a local pass can > never > "remove" vars safe

Re: [PATCH] DATA_ALIGNMENT vs. DATA_ABI_ALIGNMENT (PR target/56564)

2013-06-10 Thread Bernd Schmidt
On 06/07/2013 10:43 PM, Richard Henderson wrote: > But these I think require a good hard look to see if they really intended an > ABI alignment: > > c6x comment explicitly mentions abi The ABI specifies a minimum alignment for arrays. Bernd

Re: [PATCH] DATA_ALIGNMENT vs. DATA_ABI_ALIGNMENT (PR target/56564)

2013-06-10 Thread Bernd Schmidt
On 06/10/2013 12:55 PM, Jakub Jelinek wrote: > On Mon, Jun 10, 2013 at 12:51:05PM +0200, Bernd Schmidt wrote: >> On 06/07/2013 10:43 PM, Richard Henderson wrote: >>> But these I think require a good hard look to see if they really intended an >>> ABI alignment: >

Re: [announce] New scalar-storage-order branch in GCC repository

2013-06-10 Thread Bernd Schmidt
On 05/27/2013 01:13 PM, Eric Botcazou wrote: > I have just created a new branch off the trunk named scalar-storage-order to > host the (experimental) support to specify a reverse storage order (byte/word > order, aka endianness) for scalar components of aggregate types. > > I will be maintaining

Fix some tests

2014-09-11 Thread Bernd Schmidt
ernd commit 93065446e241d0ac36fd0cfb22471022aca307c0 Author: Bernd Schmidt Date: Wed Sep 10 16:30:56 2014 +0200 Fix declarations in some tests. * gcc.dg/compat/struct-by-value-13_main.c (struct_by_value_13_x): Fix declaration. * gcc.dg/compat/struct-by-value-16a_ma

ptx preliminary address space fixes [1/4]

2014-09-11 Thread Bernd Schmidt
on x86_64-linux. Ok? Bernd commit 9a63fbecf0ccf9dd9cf18073958e4cfccf6ecaf2 Author: Bernd Schmidt Date: Wed Sep 10 16:32:27 2014 +0200 * tree.c (apply_as_to_type): New function. * tree.h (apply_as_to_type): Declare. diff --git a/gcc/tree.c b/gcc/tree.c index d1d67ef..a7438b2 100

ptx preliminary address space fixes [2/4]

2014-09-11 Thread Bernd Schmidt
This is a bug in SRA which replaces a memory reference without taking care to use the correct address space. Bootstrapped and tested together with the other patches on x86_64-linux. Ok? Bernd commit 6b9be6e3081c313c024aeabe2d70bc0f8146b429 Author: Bernd Schmidt Date: Wed Sep 10 16:32:56

ptx preliminary address space fixes [3/4]

2014-09-11 Thread Bernd Schmidt
The vectorizer can also replace a memory reference without ensuring it uses the correct address space. Bootstrapped and tested together with the other patches on x86_64-linux. Ok? Bernd commit e85dbde1aa3396b5e202aa736f96b232a6e11e86 Author: Bernd Schmidt Date: Wed Sep 10 16:33:40 2014

ptx preliminary address space fixes [4/4]

2014-09-11 Thread Bernd Schmidt
ommit 35d765aeba4ea7d0ba829b2b502c8c7af0c24728 Author: Bernd Schmidt Date: Wed Sep 10 16:34:04 2014 +0200 * tree-ssa-strlen.c (strlen_optimize_stmt): Look through ADDR_SPACE_CONVERT_EXPR. diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index bb42cc7..f72ecf5 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tre

Fix some more decl types in the Fortran frontend

2014-09-11 Thread Bernd Schmidt
ion of the argument list for the decl. I'm also unsure why this has shown up only very recently. Bernd commit 87c261fd190c9dea09a793b1295e7cff9bb6044e Author: Bernd Schmidt Date: Wed Sep 10 18:02:53 2014 +0200 Fix type mismatches in intrinsic functions. * f95-lang.c (build_

ptx preliminary rtl patches [2/4]

2014-09-11 Thread Bernd Schmidt
There's some code in get_uncond_jump_length to emit and then delete a label and a jump. On ptx we skip register allocation and reload, and this fails a "reload_completed || bb != NULL" assert in df_insn_delete. Fixed by instead emitting the two insns into a sequence which we then just discard.

ptx preliminary rtl patches [1/4]

2014-09-11 Thread Bernd Schmidt
The nvptx backend is somewhat unusual in that call insns set a pseudo. The combiner is surprised by this and allows combining them into other insns, which remain as INSN rather than CALL_INSN. Aborts ensue. Bootstrapped and tested on x86_64-linux, together with the other patches. Ok? Bernd

ptx preliminary rtl patches [3/4]

2014-09-11 Thread Bernd Schmidt
nvptx will be the first port to use BImode and have STORE_FLAG_VALUE==-1. That has exposed a bug in combine where we can end up calling num_sign_bit_copies for a BImode value. However, the return value is always 1 in that case, so it doesn't tell us anything and is going to be misinterpreted by

ptx preliminary rtl patches [4/4]

2014-09-11 Thread Bernd Schmidt
It turns out that we're calling eliminate_regs for global variables which can't possibly have eliminable regs in their decl. At that point, reg_eliminate can be NULL. This patch avoids unnecessary work, and allows us to add an assert to eliminate_regs later. Bootstrapped and tested on x86_64-l

Re: ptx preliminary rtl patches [3/4]

2014-09-11 Thread Bernd Schmidt
On 09/11/2014 05:55 PM, Steven Bosscher wrote: On Thu, Sep 11, 2014 at 3:26 PM, Bernd Schmidt wrote: nvptx will be the first port to use BImode and have STORE_FLAG_VALUE==-1. That has exposed a bug in combine where we can end up calling num_sign_bit_copies for a BImode value. However, the

Re: ptx preliminary rtl patches [3/4]

2014-09-11 Thread Bernd Schmidt
On 09/11/2014 06:15 PM, Steven Bosscher wrote: On Thu, Sep 11, 2014 at 6:06 PM, Bernd Schmidt wrote: On 09/11/2014 05:55 PM, Steven Bosscher wrote: On Thu, Sep 11, 2014 at 3:26 PM, Bernd Schmidt wrote: nvptx will be the first port to use BImode and have STORE_FLAG_VALUE==-1. That has

Re: Fix some more decl types in the Fortran frontend

2014-09-11 Thread Bernd Schmidt
hing? I'm afraid I failed to construct a compileable Fortran testcase for scalbn. Bernd commit 5f170b2710aaa5e098d74c71fcd206ef209f0b60 Author: Bernd Schmidt Date: Wed Sep 10 18:02:53 2014 +0200 Fix type mismatches in intrinsic functions. * f95-lang.c (gfc_init_builtin_f

Re: ptx preliminary rtl patches [3/4]

2014-09-11 Thread Bernd Schmidt
On 09/11/2014 06:34 PM, Steven Bosscher wrote: On Thu, Sep 11, 2014 at 6:19 PM, Bernd Schmidt wrote: What do you expect that function to do different? It returns the correct value. No different. Just that if you want to check whether DECL is a global variable then we have a predicate for it

Re: ptx preliminary address space fixes [3/4]

2014-09-12 Thread Bernd Schmidt
On 09/11/2014 01:39 PM, Richard Biener wrote: Seeing this it would be nice to abstract away the exact place we store the address-space in a memory reference. So - can you add a helper reference_addr_space () please? Thus do addr_space_t as = reference_addr_space (scalar_dest); Ok, no pro

Re: ptx preliminary address space fixes [1/4]

2014-09-12 Thread Bernd Schmidt
On 09/11/2014 01:29 PM, Richard Biener wrote: + if (TREE_CODE (type) == ARRAY_TYPE) +TREE_TYPE (type) = apply_as_to_type (TREE_TYPE (type), as); why is this necessary for ARRAY_TYPE but not for sth like a RECORD_TYPE or a POINTER_TYPE? Still testing whether I actually strictly need it for

Re: ptx preliminary address space fixes [2/4]

2014-09-12 Thread Bernd Schmidt
On 09/11/2014 01:30 PM, Richard Biener wrote: On Thu, Sep 11, 2014 at 12:12 PM, Bernd Schmidt wrote: This is a bug in SRA which replaces a memory reference without taking care to use the correct address space. Bootstrapped and tested together with the other patches on x86_64-linux. Ok? Ok

Re: ptx preliminary address space fixes [3/4]

2014-09-12 Thread Bernd Schmidt
On 09/12/2014 01:45 PM, Richard Biener wrote: Let me know what you prefer. Hmm, neither I suppose. COMPLEX_TYPEs are also built with main-variant component type and I suspect the same for ARRAY_TYPEs. I see the address-space on types as artifact that comes from Frontend support (aka parsing).

Re: ptx preliminary address space fixes [1/4]

2014-09-12 Thread Bernd Schmidt
On 09/12/2014 01:48 PM, Richard Biener wrote: Still testing whether I actually strictly need it for ARRAY_TYPE nowadays (these patches are really old...). However, the TYPE_FIELDS of a RECORD_TYPE seem to be mostly ignored once the frontends are done, but it's very easy for other parts of the com

Re: ptx preliminary address space fixes [3/4]

2014-09-12 Thread Bernd Schmidt
On 09/12/2014 01:45 PM, Richard Biener wrote: Fixing up the vector type in advance is ok with me but I'd like us to move away from address-space-on-types. After thinking about it for a while, this idea makes no sense. Address spaces must be represented in the type system somehow - consider a

Re: ptx preliminary address space fixes [1/4]

2014-09-16 Thread Bernd Schmidt
On 09/12/2014 01:48 PM, Richard Biener wrote: On Fri, Sep 12, 2014 at 1:15 PM, Bernd Schmidt wrote: On 09/11/2014 01:29 PM, Richard Biener wrote: + if (TREE_CODE (type) == ARRAY_TYPE) +TREE_TYPE (type) = apply_as_to_type (TREE_TYPE (type), as); why is this necessary for ARRAY_TYPE but

Re: ptx preliminary address space fixes [1/4]

2014-09-16 Thread Bernd Schmidt
On 09/16/2014 10:56 PM, Joseph S. Myers wrote: On Tue, 16 Sep 2014, Richard Biener wrote: Hmm. How is it with other compositive types like vectors and complex? It's bad that the middle-end needs to follow a specific frontends need. Why's the representation tied so closely together? Complex t

Re: ptx preliminary address space fixes [1/4]

2014-09-16 Thread Bernd Schmidt
On 09/16/2014 11:18 PM, Joseph S. Myers wrote: (That TYPE_MAIN_VARIANT maps an array of qualified type to an array of corresponding unqualified type necessitates lots of special cases in the front end to avoid applying TYPE_MAIN_VARIANT to array types, since in C terms array types are always unq

Re: [gomp4] Offload option handling

2014-09-17 Thread Bernd Schmidt
On 09/17/2014 01:16 PM, Andrey Turetskiy wrote: How does this look? Do you agree with the approach? I have no objections to supporting a -ftarget-options switch. I had posted a patch a while ago that looked somewhat similar, but also contained an automatic translation step from things like -

Re: ptx preliminary address space fixes [4/4]

2014-09-17 Thread Bernd Schmidt
On 09/11/2014 01:41 PM, Richard Biener wrote: On Thu, Sep 11, 2014 at 12:12 PM, Bernd Schmidt wrote: This one isn't a wrong-code issue, just a missed optimization. The strlen optimizations need to be made to look through ADDR_SPACE_CONVERT_EXPR to work on ptx. Bootstrapped and t

Re: parallel check output changes?

2014-09-18 Thread Bernd Schmidt
On 09/18/2014 05:03 PM, Andrew MacLeod wrote: On 09/18/2014 09:05 AM, Andrew MacLeod wrote: On 09/18/2014 09:01 AM, Jakub Jelinek wrote: On Thu, Sep 18, 2014 at 08:56:50AM -0400, Andrew MacLeod wrote: Has the changes that have gone into the check parallelization made the .sum file non-determin

Re: ptx preliminary rtl patches [3/4]

2014-09-18 Thread Bernd Schmidt
On 09/12/2014 10:04 AM, Richard Biener wrote: On Thu, Sep 11, 2014 at 6:36 PM, Bernd Schmidt wrote: I strongly disagree. It's the same as for any other integer - there's one sign bit, and since there aren't any other bits, the number of sign bit copies is always exactly 1. I a

Small fix for walking constructors

2014-09-18 Thread Bernd Schmidt
in the current translation unit (ptx assembly requires declarations for these too). Bootstrapped and tested on x86_64-linux, ok? Bernd commit 968a508fdd5c413147b9c26d37633bf7ab7a7e65 Author: Bernd Schmidt Date: Thu Sep 11 14:35:01 2014 +0200 Fix handling of CONSTRUCTORs in gimple-walk

Re: Small fix for walking constructors

2014-09-22 Thread Bernd Schmidt
On 09/22/2014 11:00 AM, Richard Biener wrote: It seems to me that walk_stmt_load_store_addr_ops is called on bogus input. The function is supposed to be called on GIMPLE stmts and in GIMPLE stmts CONSTRUCTORs may _not_ have conversions in their elements. Please revert if you have applied alread

Re: [Patch bfin] Fixup use of constraints in define_split

2014-09-22 Thread Bernd Schmidt
On 09/19/2014 11:32 PM, James Greenhalgh wrote: As with the earlier patch for sh ( https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01627.html ), this fixes the fallout caused by https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01615.html. These are build failures, and the fixes are "obvious", but I d

Re: ptx preliminary address space fixes [1/4]

2014-09-26 Thread Bernd Schmidt
On 09/16/2014 02:59 PM, Richard Biener wrote: On Tue, Sep 16, 2014 at 1:24 PM, Bernd Schmidt wrote: Ok, so testing seems to show that nothing breaks with the ARRAY_TYPE special case removed. However, I remembered another reason to do this, and it's for consistency with how address space

Re: ptx preliminary address space fixes [1/4]

2014-09-26 Thread Bernd Schmidt
On 09/26/2014 02:05 PM, Richard Biener wrote: If currently address-space support matches up with the C frontend and the C standard then the middle-end has to cope with that. In this case, cope with array element types not having address-space qualifiers. That's the opposite of what happens. The

Re: ptx preliminary address space fixes [1/4]

2014-09-26 Thread Bernd Schmidt
On 09/26/2014 02:26 PM, Richard Biener wrote: On Fri, Sep 26, 2014 at 2:14 PM, Bernd Schmidt wrote: On 09/26/2014 02:05 PM, Richard Biener wrote: If currently address-space support matches up with the C frontend and the C standard then the middle-end has to cope with that. In this case, cope

Re: ptx preliminary address space fixes [1/4]

2014-09-26 Thread Bernd Schmidt
On 09/26/2014 02:42 PM, Richard Biener wrote: On Fri, Sep 26, 2014 at 2:28 PM, Bernd Schmidt wrote: On 09/26/2014 02:26 PM, Richard Biener wrote: On Fri, Sep 26, 2014 at 2:14 PM, Bernd Schmidt wrote: On 09/26/2014 02:05 PM, Richard Biener wrote: If currently address-space support

Re: [patch 3/5] don't restrict bit range for -fstrict-volatile-bitfields

2013-06-17 Thread Bernd Schmidt
On 06/17/2013 02:27 PM, Julian Brown wrote: > On Mon, 17 Jun 2013 13:38:05 +0200 > Richard Biener wrote: > >> On Mon, Jun 17, 2013 at 1:31 PM, Julian Brown >> wrote: >>> IIUC, the incompatibility between the specified >>> -fstrict-volatile-bitfields behaviour and the C++ memory model is a >>> re

CALL_INSN_FUNCTION_USAGE fix, PR52773

2013-06-19 Thread Bernd Schmidt
This is bug that triggers on m68k. The loop unroller creates a MULT expression and tries to force it into a register, which causes a libcall to be generated. Since args are pushed we create a (use (mem (plus virtual_outgoing_args scratch))) in CALL_INSN_FUNCTION_USAGE. Since we're past vregs, the

Re: patch to fix PR57604

2013-06-21 Thread Bernd Schmidt
On 06/21/2013 01:00 PM, Andreas Krebbel wrote: > On 20/06/13 02:00, Vladimir Makarov wrote: >> I hope the following patch fixes >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57604 >> >> Although I have no specific hardware to check this. >> >> The patch also adds a comment about one recent chan

Re: msp430 port

2013-08-01 Thread Bernd Schmidt
On 07/20/2013 01:32 AM, DJ Delorie wrote: >> Every pattern that is using (subreg:SI (thing:PSI)) needs to be >> explained on this list and given an explicit clearance. It really looks >> like you're just papering over problems elsewhere. > > Most of them are just optimizations, but the problem

Re: [PATCH][RFC] Remove TODO_ggc_collect, collect unconditionally

2013-04-11 Thread Bernd Schmidt
On 03/19/2013 04:37 PM, Richard Biener wrote: > On Tue, 19 Mar 2013, Richard Biener wrote: >> Which shows that I need to merge the IRA and reload/lra passes. >> Honza tells me that they are considered "separate" has historical >> reasons only. Given that reload pushes TV_IRA and that the boundary

Re: [PATCH][RFC] Remove TODO_ggc_collect, collect unconditionally

2013-04-11 Thread Bernd Schmidt
On 04/11/2013 12:05 PM, Richard Biener wrote: > Any particular suggestions? The easiest "split" is to emit > a ' reload/lra =' marker (or similar). It's about getting a dump of the insns, in two separate files so that one can do diffs (between sched1/ira or ira/reload)

Re: [PATCH][RFC] Remove TODO_ggc_collect, collect unconditionally

2013-04-11 Thread Bernd Schmidt
On 04/11/2013 12:26 PM, Richard Biener wrote: > > The point was not to remove TODO_ggc_collect, the point was to > both enforce the GC boundary at all passes (that's what the pass > manager assumes anyway) and to collect when necessary at such > well-defined boundaries. Another approach would hav

PR 50686: dwarf2cfi fix for IRIX

2013-04-24 Thread Bernd Schmidt
Before the target was removed, IRIX defined DWARF_FRAME_RETURN_COLUMN to be reg 64, which is something other than INCOMING_RETURN_ADDR_RTX (reg 31). This means that when we see a save of reg 31, we discover that this is really a save of reg 64 and produce dwarf information accordingly. However, t

Fix C++ testcases for size_t vs intptr_t

2013-04-24 Thread Bernd Schmidt
This fixes C++ testcases that used size_t when casting a pointer to integer so that they use intptr_t instead. There's also an testcase using pointer subtraction where ptrdiff_t is the correct choice, and a fix to the ptrmem.C testcase to use sizeof on a function pointer rather than a data pointer.

Fix an invalid C++ testcase

2013-04-24 Thread Bernd Schmidt
The pr8781.C testcase appears to have undefined behaviour as far as I can tell. A function called noop is called with argument pred; this creates a noop_t object which stores a reference to that argument, and then the function returns the object. At that point I think the reference becomes stale. T

vtables patch 1/3: allow empty array initializations

2013-04-24 Thread Bernd Schmidt
small preliminary patch which essentially just restores the previous code. Bootstrapped and tested on x86_64-linux, ok? Bernd commit 618d06f7d414842a934fb360fa98972478e13483 Author: Bernd Schmidt Date: Tue Apr 23 15:19:07 2013 +0200 Allow empty arrays to be initialized This undoes a

vtables patch 2/3: fold vtable refs that use COMPONENT_REFs

2013-04-24 Thread Bernd Schmidt
Author: Bernd Schmidt Date: Tue Apr 23 15:17:34 2013 +0200 Allow virtual table refs to be COMPONENT_REFs This is a preparation patch for changing the C++ vtable layout. It makes gimple-fold aware of how to fold a vtable reference that is a COMPONENT_REF. * gimple

vtables patch 3/3

2013-04-24 Thread Bernd Schmidt
at at least it doesn't crash on some vtable testcases, but realistically I have no way of properly testing that target. Ok? Bernd commit d6957d8e1ad8179c01d373f741099b021a05730f Author: Bernd Schmidt Date: Mon Apr 15 11:24:04 2013 +0200 Change handling of vtables to use fields and COMP

Re: vtables patch 1/3: allow empty array initializations

2013-04-24 Thread Bernd Schmidt
On 04/24/2013 05:10 PM, DJ Delorie wrote: > >> this isn't true, it would be helpful to know. Given the size_t/uintptr_t >> testsuite patch I just submitted I'm thinking they don't exist, but I'm >> kind of wondering about m32c, so Cc'ing DJ. > > For m32c-elf with -mcpu=m32c, size_t is 16 bits but

Re: [gomp4] Add tables generation

2014-05-08 Thread Bernd Schmidt
On 05/06/2014 05:32 PM, Ilya Verbin wrote: On 05 Apr 17:22, Bernd Schmidt wrote: Things seemed to work over here, but now I'm not certain whether the __start_/__stop_ functionality is GNU ld specific? Maybe we should just go back to the previous version of this patch which didn't

Re: [gomp4] Add tables generation

2014-05-12 Thread Bernd Schmidt
On 05/08/2014 12:11 PM, Bernd Schmidt wrote: On 05/06/2014 05:32 PM, Ilya Verbin wrote: On 05 Apr 17:22, Bernd Schmidt wrote: Things seemed to work over here, but now I'm not certain whether the __start_/__stop_ functionality is GNU ld specific? Maybe we should just go back to the pre

Fix an error in a change from 2009

2014-05-19 Thread Bernd Schmidt
There was a patch to change GET_CODE(..) == CONST_INT to CONST_INT_P, and in one instance this was done incorrectly, leaving only a plain GET_CODE without any comparison. I've committed the following as obvious after testing on x86_64-linux. Bernd * simplify-rtx.c (simplify_unary_operation

Re: [Patch, bfin/c6x] Fix ICE for backends that rely on reorder_loops.

2014-05-21 Thread Bernd Schmidt
On 01/09/2014 05:20 AM, Jeff Law wrote: On 01/07/14 09:07, Bernd Schmidt wrote: If someone explicitly chooses that option we can turn off the reordering in hw-doloop. That should happen sufficiently rarely that it isn't a problem. That's what the patch below does - bootstraped on x8

Make the Blackfin port build again

2014-05-21 Thread Bernd Schmidt
@@ 2014-05-21 Bernd Schmidt + * config/bfin/bfin.c (split_load_immediate): Use gen_int_mode in a few + more places. + * cfgrtl.c (cfg_layout_initialize): Weaken assert to only trigger if flag_reorder_blocks_and_partition. * hw-doloop.c (reorg_loops): Avoid reordering if that flag is set

Re: Reload codegen improvement

2014-05-21 Thread Bernd Schmidt
On 01/07/2014 05:22 PM, Bernd Schmidt wrote: This fixes a problem identified by Chung-Lin. Once reload is done, all equivalencing insns for pseudos that didn't get a hard reg but could be eliminated using their REG_EQUIV are deleted. However, we still can produce reloads and reload insn

Re: CALL_INSN_FUNCTION_USAGE fix, PR52773

2014-05-21 Thread Bernd Schmidt
On 06/19/2013 07:39 PM, Bernd Schmidt wrote: This is bug that triggers on m68k. The loop unroller creates a MULT expression and tries to force it into a register, which causes a libcall to be generated. Since args are pushed we create a (use (mem (plus virtual_outgoing_args scratch))) in

Add a lto-section-names.h header

2014-05-22 Thread Bernd Schmidt
? Bernd commit f2f3cb92d29cd1940771bf4297055aed3ee86251 Author: Bernd Schmidt Date: Wed May 21 15:04:47 2014 +0200 Create a new header lto-section-names.h gcc/ * config/darwin.c: Include "lto-section-names.h". (LTO_SEGMENT_NAME): Do

Create a library for tools like collect2 and lto-wrapper (1/2)

2014-05-22 Thread Bernd Schmidt
x, ok for trunk? Bernd commit 1faf8f4aa2f81be4a0b0db8c89933e9c5bd2abcb Author: Bernd Schmidt Date: Wed May 21 15:15:45 2014 +0200 Make a collect-utils library for use by tools like collect2 and lto-wrapper. * Makefile.in (ALL_HOST_BACKEND_OBJS): Add collect-utils.o.

Create a library for tools like collect2 and lto-wrapper (2/2)

2014-05-22 Thread Bernd Schmidt
39e9b2e3b47c893fcc1d96dfa7bdd975da80633e Author: Bernd Schmidt Date: Wed May 21 16:44:03 2014 +0200 Part 2 of the collect-utils library, now also used for collect2. * Makefile.in (COLLECT2_OBJS): Add collect-utils.o. (LTO_WRAPPER_OBJS): New variable. (lto-wrapper$(exeext)): Use

Re: RFA: speeding up dg-extract-results.sh

2014-05-24 Thread Bernd Schmidt
On 02/13/2014 10:18 AM, Richard Sandiford wrote: contrib/ * dg-extract-results.py: New file. * dg-extract-results.sh: Use it if the environment seems suitable. I'm now seeing the following: Traceback (most recent call last): File "../../git/gcc/../contrib/dg-extract-results.p

Re: Fwd: [RFC][gomp4] Offloading patches (2/3): Add tables generation

2014-05-27 Thread Bernd Schmidt
On 05/27/2014 12:17 PM, Ilya Verbin wrote: 2014-03-01 1:40 GMT+04:00 Bernd Schmidt : For your use case, I'd imagine the offload compiler would be built relatively normally as a full build with "--enable-as-accelerator-for=x86_64-linux", which would install it into locations wher

Re: Fwd: [RFC][gomp4] Offloading patches (2/3): Add tables generation

2014-05-27 Thread Bernd Schmidt
On 05/27/2014 01:11 PM, Ilya Verbin wrote: 2014-05-27 14:59 GMT+04:00 Bernd Schmidt : There isn't a way to do this. For ptx, target libraries can't be built anyway. For your use case, I'd recommend building the offload gcc first, installing it, and then building the host gc

Re: Create a library for tools like collect2 and lto-wrapper (2/2)

2014-05-27 Thread Bernd Schmidt
On 05/22/2014 05:56 PM, Joseph S. Myers wrote: On Thu, 22 May 2014, Bernd Schmidt wrote: The implementations of some functions like fork_execute are changed to those from collect2 and the calls in lto-wrapper adapted accordingly. There are some minor changes in these functions: for example I

Mark more constants readonly

2014-05-27 Thread Bernd Schmidt
I noticed that string constants built by the Fortran frontend don't set TREE_READONLY for STRING_CST (and subsequently noticed that nothing seems to set it for COMPLEX_CST). That was confusing the ptx backend I'm working on. The -fwritable-strings option for C was removed a while ago, so I teste

Fix a function decl in gfortran

2014-05-27 Thread Bernd Schmidt
Compiling Fortran code with the ptx backend I'm working on results in assembler warnings about mismatch between function calls and function decls. This seems to be a bug in the Fortran frontend, where a decl for _gfortran_caf_init is created with four arguments, while the library function is de

Don't copy constants in build_constant_desc

2014-05-27 Thread Bernd Schmidt
When putting a constant into the constant pool, we make a copy of the tree in build_constant_desc. This caused me some problems with the ptx backend, which has a pass to modify the address spaces of all variables and constants to match the requirements of the backend. It would be nice for it to

Re: Fwd: [RFC][gomp4] Offloading patches (2/3): Add tables generation

2014-05-27 Thread Bernd Schmidt
On 05/27/2014 05:33 PM, Ilya Verbin wrote: 2014-05-27 15:15 GMT+04:00 Bernd Schmidt : On 05/27/2014 01:11 PM, Ilya Verbin wrote: Do I understand correctly that you recommend to build our offload gcc manually, rather than during configure/make? Well, configure/make it separately - build and

<    12   13   14   15   16   17   18   19   20   21   >