Re: [PATCH, ivopt] Try aligned offset when get_address_cost

2014-08-06 Thread Zhenqiang Chen
On 5 August 2014 21:59, Richard Biener richard.guent...@gmail.com wrote: On Mon, Aug 4, 2014 at 11:09 AM, Zhenqiang Chen zhenqiang.c...@arm.com wrote: -Original Message- From: Bin.Cheng [mailto:amker.ch...@gmail.com] Sent: Monday, August 04, 2014 4:41 PM To: Zhenqiang Chen Cc:

Re: [PATCH, libfortran] Backport xmallocarray to 4.8/4.9 (CVE-2014-5044)

2014-08-06 Thread Tobias Burnus
Jakub Jelinek wrote: On Sat, Aug 02, 2014 at 12:09:24AM +0300, Janne Blomqvist wrote: --- libgfortran/runtime/memory.c.jj 2014-06-18 08:50:33.0 +0200 +++ libgfortran/runtime/memory.c2014-08-01 14:41:08.385856116 +0200 @@ -56,7 +56,9 @@ xmallocarray (size_t nmemb, size_t

PING – Re: [Patch, Fortran] -fcoarray=lib - support CRITICAL, prepare for locking support

2014-08-06 Thread Tobias Burnus
* PING * – of the patch with the obvious change mentioned by Alessandro (i.e. using if(is_lock_type))? Tobias On 1 August 2014 21:57, Alessandro Fanfarillo wrote: Hello, I was implementing lock/unlock on the library side when I found a possible problem in the patch: if (is_lock_type ==

Re: Patch for constexpr variable templates

2014-08-06 Thread Paolo Carlini
Hi, On 08/06/2014 06:41 AM, Braden Obrzut wrote: I can confirm that this is caused by a change to pt.c that happened, I think, the day before my last patch. This can be fixed by first checking that the template is a function template at that line in pt.c. Since variable templates can't be

Re: Fix build of *86*-linux-android with --enable-shared

2014-08-06 Thread Alexander Ivchenko
Thanks for looking at this. Bootstrapped and reg-tested on x86_64-unknown-linux-gnu. 2014-08-06 0:18 GMT+04:00 Jeff Law l...@redhat.com: On 08/04/14 00:08, Alexander Ivchenko wrote: Hi, libcilkrts is compiled with -nostdlib, that means we have to explicitly specify the pthread library we

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread Richard Biener
On Tue, 5 Aug 2014, Jeff Law wrote: On 08/05/14 08:36, Marek Polacek wrote: On Mon, Aug 04, 2014 at 02:04:36PM +0200, Richard Biener wrote: Looks like .fre can optimize q - (q - 1) into 1: bb 2: q.0_3 = (long int) MEM[(void *)i + 4B]; _5 = (long int) i; - _6 =

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread Marek Polacek
On Tue, Aug 05, 2014 at 02:14:21PM -0600, Jeff Law wrote: My concern is the code we're removing discusses the need to simplify when these expressions are in static initializers. What's going to ensure that we're still simplifying instances which appear in static initializers? I don't see

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread Jakub Jelinek
On Wed, Aug 06, 2014 at 10:22:19AM +0200, Marek Polacek wrote: On Tue, Aug 05, 2014 at 02:14:21PM -0600, Jeff Law wrote: My concern is the code we're removing discusses the need to simplify when these expressions are in static initializers. What's going to ensure that we're still

Re: [PATCH][AArch64] Use REG_P and CONST_INT_P instead of GET_CODE + comparison

2014-08-06 Thread Richard Earnshaw
On 05/08/14 12:18, Kyrill Tkachov wrote: Hi all, This is a cleanup to replace usages of GET_CODE (x) == CONST_INT with CONST_INT_P (x) and GET_CODE (x) == REG with REG_P (x). No functional changes. Tested on aarch64-none-elf and bootstrapped on aarch64-linux. Ok for trunk? Thanks,

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread Marek Polacek
On Wed, Aug 06, 2014 at 10:26:29AM +0200, Jakub Jelinek wrote: Well, if you are going to implement it in fwprop AND fold-const, then the natural place to fix that would be in *.pd on the match-and-simplify branch. True. So I guess I'll have to put this one on hold for a while... Marek

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread Richard Biener
On Wed, 6 Aug 2014, Marek Polacek wrote: On Tue, Aug 05, 2014 at 02:14:21PM -0600, Jeff Law wrote: My concern is the code we're removing discusses the need to simplify when these expressions are in static initializers. What's going to ensure that we're still simplifying instances which

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread Richard Biener
On Wed, 6 Aug 2014, Marek Polacek wrote: On Wed, Aug 06, 2014 at 10:26:29AM +0200, Jakub Jelinek wrote: Well, if you are going to implement it in fwprop AND fold-const, then the natural place to fix that would be in *.pd on the match-and-simplify branch. True. So I guess I'll have to put

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread Marek Polacek
On Wed, Aug 06, 2014 at 10:28:13AM +0200, Richard Biener wrote: On Wed, 6 Aug 2014, Marek Polacek wrote: On Wed, Aug 06, 2014 at 10:26:29AM +0200, Jakub Jelinek wrote: Well, if you are going to implement it in fwprop AND fold-const, then the natural place to fix that would be in *.pd on

Re: [PATCH 17/50] df-problems.c:find_memory

2014-08-06 Thread Richard Earnshaw
On 05/08/14 22:29, Jeff Law wrote: On 08/03/14 08:02, Richard Sandiford wrote: This also fixes what I think is a bug: find_memory used to stop at the first MEM it found. If that MEM was nonvolatile and nonconstant, we'd return MEMREF_NORMAL even if there was another volatile MEM. gcc/

Re: Back porting the LTO fix to upstream gcc 4.9 branch

2014-08-06 Thread Richard Earnshaw
On 06/08/14 06:54, Hale Wang wrote: Refer to: https://gcc.gnu.org/ml/gcc-patches/2014-06/msg01429.html. Sorry for an extra whitespace. -Original Message- From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- ow...@gcc.gnu.org] On Behalf Of Hale Wang Sent: 2014年8月6日 13:50 To:

Re: [PATCH 1/2] convert the rest of the users of pointer_map to hash_map

2014-08-06 Thread Richard Biener
On Wed, Aug 6, 2014 at 3:28 AM, tsaund...@mozilla.com wrote: From: Trevor Saunders tsaund...@mozilla.com hi, just what it says on the tin. bootstrapped + regtested on x86_64-unknown-linux-gnu, also bootstrapped on i686-unknown-linux-gnu, ran config-list.mk, ok? gcc/ Ok. Time to remove

Re: [PATCH 2/2] remove pointer-set.[ch]

2014-08-06 Thread Richard Biener
On Wed, Aug 6, 2014 at 3:28 AM, tsaund...@mozilla.com wrote: From: Trevor Saunders tsaund...@mozilla.com hi, just what it says on the tin. bootstrapped + regtested on x86_64-unknown-linux-gnu, also bootstrapped on i686-unknown-linux-gnu, ran config-list.mk, ok? gcc/ Ok. Thanks,

Re: [PATCH] Testcase for PR61801

2014-08-06 Thread Jakub Jelinek
Hi! I've cleaned up the testcase some more, tested on 4.8/4.9/trunk that it fails without the sched-deps.c fix too (both -m32 and -m64) and works with the fix. Committed to all branches. 2014-08-06 Jakub Jelinek ja...@redhat.com PR rtl-optimization/61801 *

[PATCH][match-and-simplify] Fix remaining testsuite ICEs

2014-08-06 Thread Richard Biener
The following fixes the remaining ICEs I see when testing all languages (but ada and go). The tree-cfg.c hunk highlights one change in the behavior of fold_stmt, namely that it now follows SSA edges by default. Maybe that's undesired? On a related note, fold_stmt_inplace preserves the actual

Re: [PATCH libstdc++ v3] - Add xmethods for std::vector and std::unique_ptr

2014-08-06 Thread Jonathan Wakely
On 5 August 2014 21:29, Siva Chandra wrote: Hi Jonathan, Thanks a lot for taking a look. The patch in question, and the GDB support, do not yet work with Python3. If that is a necessary requirement, I can make the changes and send a new version of the patch. Some GNU/Linux distros already

Re: [PATCH 2/3]Improve induction variable elimination

2014-08-06 Thread Bin.Cheng
Forgot the patch~ On Wed, Aug 6, 2014 at 10:32 AM, Bin.Cheng amker.ch...@gmail.com wrote: On Fri, Jul 25, 2014 at 8:35 PM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Jul 17, 2014 at 11:08 AM, Bin Cheng bin.ch...@arm.com wrote: Hi, As quoted from the function

Re: [PATCH][match-and-simplify] Fix remaining testsuite ICEs

2014-08-06 Thread Richard Biener
On Wed, 6 Aug 2014, Richard Biener wrote: The following fixes the remaining ICEs I see when testing all languages (but ada and go). The tree-cfg.c hunk highlights one change in the behavior of fold_stmt, namely that it now follows SSA edges by default. Maybe that's undesired? On a

Re: [PATCH v2] gcc/testsuite: Disable pr44194-1.c for BE Power64/Linux

2014-08-06 Thread Maciej W. Rozycki
On Wed, 6 Aug 2014, David Edelsohn wrote: D'oh, there's even a predicate procedure in our test framework already to cover it. Thanks for straightening me out, an updated patch follows. This scores: UNSUPPORTED: gcc.dg/pr44194-1.c in my testing, like the previous version. OK to

Fix libgomp crash without TLS (PR42616)

2014-08-06 Thread Varvara Rainchik
Hi, The issue was firstly observed on NDK gcc since TLS is not supported in Android bionic. I also see the same failure on gcc configured for linux with –disable-tls, libgomp make check log: FAIL: libgomp.c/affinity-1.c execution test FAIL: libgomp.c/icv-2.c execution test FAIL:

[PATCH][match-and-simplify] Some FP runtime fails

2014-08-06 Thread Richard Biener
Fixed with the following, committed. Incidentially this is the only constant folding pattern that also applies to floats - otherwise the use of the integer_* predicates prevent that. Richard. 2014-08-06 Richard Biener rguent...@suse.de * match-constant-folding.pd (minus @0 @0):

Re: Patch for constexpr variable templates

2014-08-06 Thread Braden Obrzut
Here's a patch for the more conservative option. - Braden Obrzut 2014-08-06 Braden Obrzut ad...@maniacsvault.net * pt.c (check_explicit_specialization): Ensure tmpl is a function template before checking if it is inline for COMDAT. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index

[PATCH] Fix PR61320

2014-08-06 Thread Richard Biener
The following fixes PR61320 - we were not properly treating explicitely misaligned loads as misaligned. Tested by various people on their STRICT_ALIGN targets, applied to trunk and branch. Richard. 2014-08-06 Richard Biener rguent...@suse.de PR tree-optimization/61320 *

Re: Remove unnecessary and harmful fixincludes for Android

2014-08-06 Thread Alexander Ivchenko
The only thing that I don't like about that, is that the user would still have stdio.h fixed if gcc is built with sysroots older than r10. But I guess it is not that critical :) We still have to remove fix for compiler.h: diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index

Re: [PATCH v2] gcc/testsuite: Disable pr44194-1.c for BE Power64/Linux

2014-08-06 Thread Marek Polacek
On Wed, Aug 06, 2014 at 11:03:02AM +0100, Maciej W. Rozycki wrote: On Wed, 6 Aug 2014, David Edelsohn wrote: D'oh, there's even a predicate procedure in our test framework already to cover it. Thanks for straightening me out, an updated patch follows. This scores: UNSUPPORTED:

Re: Replacement of isl_int by isl_val

2014-08-06 Thread Mircea Namolaru
On 08/03/14 17:44, Mircea Namolaru wrote: 2014-08-03 Mircea Namolarumircea.namol...@inria.fr Replacement of isl-int by isl_val * graphite-clast-to-gimple.c: include isl/val.h, isl/val_gmp.h (compute_bounds_for_param): use isl_val instead of isl_int

Re: [PATCH 2/2] Enable elimination of zext/sext

2014-08-06 Thread Richard Biener
On Tue, Aug 5, 2014 at 4:21 PM, Jakub Jelinek ja...@redhat.com wrote: On Tue, Aug 05, 2014 at 04:17:41PM +0200, Richard Biener wrote: what's the semantic of setting SRP_SIGNED_AND_UNSIGNED on the subreg? That is, for the created (subreg:lhs_mode (reg:PROMOTE_MODE of ssa N))?

[c++-concepts]

2014-08-06 Thread Andrew Sutton
Rewrite the constraint-checking code so that it doesn't instantiate concept definitions. Instead of doing a simple constexpr evaluation on the associated constraints, this now iterates over the decomposed assumptions to determine satisfaction. 2014-08-06 Andrew Sutton andrew.n.sut...@gmail.com

Re: [PATCH, ivopt] Try aligned offset when get_address_cost

2014-08-06 Thread Richard Biener
On Wed, Aug 6, 2014 at 8:34 AM, Zhenqiang Chen zhenqiang.c...@linaro.org wrote: On 5 August 2014 21:59, Richard Biener richard.guent...@gmail.com wrote: On Mon, Aug 4, 2014 at 11:09 AM, Zhenqiang Chen zhenqiang.c...@arm.com wrote: -Original Message- From: Bin.Cheng

Re: [PATCH 2/2] Enable elimination of zext/sext

2014-08-06 Thread Kugan
On 06/08/14 22:09, Richard Biener wrote: On Tue, Aug 5, 2014 at 4:21 PM, Jakub Jelinek ja...@redhat.com wrote: On Tue, Aug 05, 2014 at 04:17:41PM +0200, Richard Biener wrote: what's the semantic of setting SRP_SIGNED_AND_UNSIGNED on the subreg? That is, for the created (subreg:lhs_mode

Re: [PATCH 2/2] Enable elimination of zext/sext

2014-08-06 Thread Richard Biener
On Wed, Aug 6, 2014 at 3:21 PM, Kugan kugan.vivekanandara...@linaro.org wrote: On 06/08/14 22:09, Richard Biener wrote: On Tue, Aug 5, 2014 at 4:21 PM, Jakub Jelinek ja...@redhat.com wrote: On Tue, Aug 05, 2014 at 04:17:41PM +0200, Richard Biener wrote: what's the semantic of setting

Re: [PATCH libstdc++ v3] - Add xmethods for std::vector and std::unique_ptr

2014-08-06 Thread Siva Chandra
On Wed, Aug 6, 2014 at 2:47 AM, Jonathan Wakely jwakely@gmail.com wrote: Some GNU/Linux distros already build GDB using Python3, so they will be unable to use these xmethods. However, I think it can be committed now and fixed later. For the libstdc++ side, it is a very small fix (using

[PATCH] Fix PR62034

2014-08-06 Thread Richard Biener
The following avoids recursing for popping SCCs. LTO bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2014-08-06 Richard Biener rguent...@suse.de PR lto/62034 * lto-streamer-in.c (lto_input_tree_1): Assert we do not read SCCs here.

[PATCH][match-and-simplify] Fix ICE with updating EH info

2014-08-06 Thread Richard Biener
Wasn't done properly. Committed. Richard. 2014-08-06 Richard Biener rguent...@suse.de * tree-ssa-forwprop.c (pass_forwprop::execute): Properly clean EH info on folded stmts. Index: gcc/tree-ssa-forwprop.c ===

Re: [PATCH, trans-mem, PR 61393] Copy tm_clone field of cgraph_node when cloning the node

2014-08-06 Thread Martin Jambor
Hi, On Wed, Jul 30, 2014 at 06:56:05PM +0200, Martin Jambor wrote: Hi, IPA-CP can wreck havoc to transactional memory support as described in the summary of the PR in bugzilla. It seems the cause is that IPA-CP clones of nodes created by trans-mem do not have their tm_clone flag set. For

Re: Remove unnecessary and harmful fixincludes for Android

2014-08-06 Thread Bruce Korb
Hi, On Wed, Aug 6, 2014 at 4:51 AM, Alexander Ivchenko aivch...@gmail.com wrote: We still have to remove fix for compiler.h: Correct. Thank you. Bruce, I think I formally have to ask for your approval again :) I don't think so. You've selected one of the changes we wrote about, so With

[PINGv3][PATCH] Fix for PR 61561

2014-08-06 Thread Marat Zakirov
On 07/30/2014 04:56 PM, Marat Zakirov wrote: On 07/23/2014 05:33 PM, Marat Zakirov wrote: Hi all! This is a friendly reminder message. On 07/17/2014 03:22 PM, Marat Zakirov wrote: On 07/16/2014 01:32 PM, Kyrill Tkachov wrote: On 16/07/14 10:22, Marat Zakirov wrote: Christophe, Please

[PATCH] Move POINTER_PLUS_EXPR folding to fold-const.c

2014-08-06 Thread Marek Polacek
As discussed in the other thread, I can't just remove folding from the C FE and implement it on GIMPLE level, because that regressed some of those not-really-kosher static initializers. Instead, fold-const.c has to be taught how to fold PTR0 - (PTR1 p+ A). (Now it sounds so obvious.) I added

Re: [PINGv3][PATCH] Fix for PR 61561

2014-08-06 Thread Ramana Radhakrishnan
This is OK thanks. Ramana

[PATCH][match-and-simplify] Fix codegen bug

2014-08-06 Thread Richard Biener
This avoids shadowing the outer ops[] array with inner ones during code generation. This makes the results of inner expressions disappear ... oops. Applied. Richard. 2014-08-06 Richard Biener rguent...@suse.de * genmatch.c (gen_transform): Add depth parameter everywhere.

[PATCH][match-and-simplify] Robusten gimple_build against non-SSA context

2014-08-06 Thread Richard Biener
We fold stmts from non-SSA so when we simplify a single stmt into multiple ones (like strcat (x, foo) - memcpy (x + strlen (foo), )) then gimple_build fails because it unconditionally builds SSA names. Fixed. Richard. 2014-08-06 Richard Biener rguent...@suse.de * gimple-fold.c

[PATCH][match-and-simplify] Implement two-parameter builtin-function simplify

2014-08-06 Thread Richard Biener
$subject, applied. Richard. 2014-08-06 Richard Biener rguent...@suse.de * gimple-fold.h (gimple_simplify): Add two-parameter builtin function overload. * gimple-match-head.c (gimple_simplify): Implement it. Index: gcc/gimple-fold.h

Re: [PATCH][match-and-simplify] Implement two-parameter builtin-function simplify

2014-08-06 Thread Richard Biener
On Wed, 6 Aug 2014, Richard Biener wrote: $subject, applied. Err, too fast. Fixed. Richard. 2014-08-06 Richard Biener rguent...@suse.de * gimple-match-head.c (gimple_simplify): Fix implementation. Index: gcc/gimple-match-head.c

Re: [PINGv3][PATCH] Fix for PR 61561

2014-08-06 Thread Richard Earnshaw
On 06/08/14 15:14, Ramana Radhakrishnan wrote: This is OK thanks. Ramana Hmm, minor nit. (define_insn *thumb1_movhi_insn [(set (match_operand:HI 0 nonimmediate_operand =l,l,m,*r,*h,l) - (match_operand:HI 1 general_operand l,m,l,*h,*r,I))] + (match_operand:HI 1

Re: [C++ Patch/RFC] PR 43906

2014-08-06 Thread Jason Merrill
On 08/05/2014 10:48 AM, Paolo Carlini wrote: + (VOID_TYPE_P (TREE_TYPE (type1)) + || comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (type0)), +TYPE_MAIN_VARIANT (TREE_TYPE (type1)), +

Re: [GSoC] the separate option for all dimensions

2014-08-06 Thread Roman Gareev
I've tested the modified version of Graphite using the gcc test suite and haven't found out new failed tests. However, pr35356-2.c is still not suitable for testing. The ISL AST generated from its source code doesn't contain MIN or MAX. if (k = -1) { for (int c1 = 0; c1 n; c1 += 1)

[GSoC] Elimination of CLooG library installation dependency

2014-08-06 Thread Roman Gareev
Hi Tobias, I've attached the patch, which should eliminate CLooG library installation dependency from GCC. The CLooG AST generator is still the main code generator, but the isl ast generator will be chosen in case of nonavailability of CLooG library. However, I've found out a problem. Almost all

Re: [GSoC] the separate option for all dimensions

2014-08-06 Thread Tobias Grosser
On 06/08/2014 17:21, Roman Gareev wrote: I've tested the modified version of Graphite using the gcc test suite and haven't found out new failed tests. However, pr35356-2.c is still not suitable for testing. The ISL AST generated from its source code doesn't contain MIN or MAX. if (k = -1)

patch to fix PR 61923

2014-08-06 Thread Vladimir Makarov
The following patch fixes PR61923. The details of the problem can be found on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61923 The patch was tested and bootstrapped on x86/x86-64. The patch has been committed as rev. 213674 to gcc-4.9 branch and as rev. 213675 to the trunk. 2014-08-06

Re: [GSoC] Elimination of CLooG library installation dependency

2014-08-06 Thread Tobias Grosser
On 06/08/2014 17:21, Roman Gareev wrote: Hi Tobias, I've attached the patch, which should eliminate CLooG library installation dependency from GCC. The CLooG AST generator is still the main code generator, but the isl ast generator will be chosen in case of nonavailability of CLooG library.

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread Jeff Law
On 08/06/14 02:27, Richard Biener wrote: which we may restrict better with checking whether the pointer uses a partial integer mode. Not sure how PSImode - SImode extends on RTL? Well, at least on the mn102, I defined both a zero and sign extension for PSI - SI. So whichever one the generic

Re: [PATCH v2] gcc/testsuite: Disable pr44194-1.c for BE Power64/Linux

2014-08-06 Thread Maciej W. Rozycki
On Wed, 6 Aug 2014, Marek Polacek wrote: Applied, thanks. I see ERROR: gcc.dg/pr44194-1.c: unknown dg option: \} for } now (x86_64-unknown-linux-gnu). I pushed a stale version of the patch, sorry. Fixed up now. 2014-08-06 Maciej W. Rozycki ma...@codesourcery.com *

[PATCH Fortran/Diagnostics] Move Fortran to common diagnostics machinery

2014-08-06 Thread Manuel López-Ibáñez
This is the first step for moving Fortran to use the common diagnostics machinery. This patch makes Fortran use the common machinery for those warnings that don't have a location or a controlling option. Before: manuel@gcc10:~/test1$ echo end | ./213518/build/gcc/f951 -fdiagnostics-color -Werror

Re: [C++ Patch/RFC] PR 43906

2014-08-06 Thread Paolo Carlini
Hi, On 08/06/2014 05:19 PM, Jason Merrill wrote: On 08/05/2014 10:48 AM, Paolo Carlini wrote: +(VOID_TYPE_P (TREE_TYPE (type1)) + || comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (type0)), + TYPE_MAIN_VARIANT (TREE_TYPE (type1)), +

[PATCH 002/236] JUMP_LABEL is not always a LABEL

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (JUMP_LABEL): Add a note that this isn't always a LABEL. --- gcc/rtl.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/rtl.h b/gcc/rtl.h index 51cfae5..b9b069a 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1194,7 +1194,11 @@ enum label_kind /* In

[PATCH 001/236] Convert lab_rtx_for_bb from pointer_map_t to pointer_maprtx

2014-08-06 Thread David Malcolm
This gives a slight improvement in typesafety in cfgexpand.c gcc/ * cfgexpand.c (lab_rtx_for_bb): Convert from pointer_map_t to pointer_maprtx. (label_rtx_for_bb): Update for conversion of lab_rtx_for_bb to a pointer_maprtx, eliminating casts from void* to rtx.

[PATCH 012/236] Convert DF_REF_INSN to a function for now

2014-08-06 Thread David Malcolm
DF_REF_INSN looks up the insn field of the referenced df_insn_info. This will eventually be an rtx_insn *, but for now is just an rtx. As further scaffolding: for now, convert DF_REF_INSN to a function, adding a checked downcast to rtx_insn *. This can eventually be converted back to macro when

[PATCH 003/236] config/mn10300: Fix missing PATTERN in PARALLEL handling

2014-08-06 Thread David Malcolm
gcc/ * config/mn10300/mn10300.c (mn10300_adjust_sched_cost): Fix the handling of PARALLEL to work on PATTERN (insn) and PATTERN (dep), rather than just on insn, dep themselves. The latter are insns, and thus can't be PARALLEL. --- gcc/config/mn10300/mn10300.c | 8

[PATCH 000/236] Introduce rtx subclasses

2014-08-06 Thread David Malcolm
This is the patch series I spoke about at Cauldron in the talk A proposal for typesafe RTL; slides here: http://dmalcolm.fedorapeople.org/presentations/cauldron-2014/rtl They can also be seen at: https://dmalcolm.fedorapeople.org/gcc/patch-backups/rtx-classes/v20/ The aim of the patch series is

[PATCH 008/236] Split BB_HEAD et al into BB_HEAD/SET_BB_HEAD variants

2014-08-06 Thread David Malcolm
This is an enabling patch, splitting existing macros in two, covering the rvalue and lvalue uses separately. Followup patches will replace these with functions, and gradually convert the types from rtx to rtx_insn *, but we need to do this separately for the lvalue vs rvalue use-cases, hence this

[PATCH 013/236] DEP_PRO/DEP_CON scaffolding

2014-08-06 Thread David Malcolm
For now, convert DEP_PRO and DEP_CON into functions. We will eventually change them back to macros once the relevant fields are of type rtx_insn *. gcc/ * sched-int.h (DEP_PRO): struct _dep's pro and con fields will eventually be rtx_insn *, but to help with transition, for now,

[PATCH 021/236] entry_of_function returns an insn

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (entry_of_function): Strengthen return type from rtx to rtx_insn *. * cfgrtl.c (entry_of_function): Likewise. --- gcc/cfgrtl.c | 2 +- gcc/rtl.h| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index

[PATCH 018/236] Strengthen return types of various {next|prev}_*insn from rtx to rtx_insn *

2014-08-06 Thread David Malcolm
These should all eventually require an rtx_insn * as an argument, but we'll save that for a later patch. gcc/ * rtl.h (previous_insn): Strengthen return type from rtx to rtx_insn *. (next_insn): Likewise. (prev_nonnote_insn): Likewise.

[PATCH 019/236] Strengthen return type of gen_label_rtx

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (gen_label_rtx): Strengthen return type from rtx to rtx_code_label *. * emit-rtl.c (gen_label_rtx): Likewise. --- gcc/emit-rtl.c | 7 --- gcc/rtl.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c

[PATCH 004/236] PHASE 1: Initial scaffolding commits

2014-08-06 Thread David Malcolm
This commit is a placeholder for me when rebasing, to help organize the patch kit. / * rtx-classes-status.txt: New file --- rtx-classes-status.txt | 9 + 1 file changed, 9 insertions(+) create mode 100644 rtx-classes-status.txt diff --git a/rtx-classes-status.txt

[PATCH 020/236] Return rtx_insn from get_insns/get_last_insn

2014-08-06 Thread David Malcolm
Ultimately, the underlying fields should become rtx_insn *, but for now we can do this with a checked cast. Note to self: config/m32c/m32c.c: m32c_leaf_function_p directly manipulates x_first_insn and x_last_insn, using sequence_stack. gcc/ * emit-rtl.h (get_insns): Strengthen return

[PATCH 027/236] asan_emit_stack_protection returns an insn

2014-08-06 Thread David Malcolm
gcc/ * asan.h (asan_emit_stack_protection): Strengthen return type from rtx to rtx_insn *. * asan.c (asan_emit_stack_protection): Likewise. Add local insns to hold the return value. --- gcc/asan.c | 7 --- gcc/asan.h | 4 ++-- 2 files changed, 6 insertions(+),

[PATCH 006/236] Introduce rtx_insn subclass of rtx_def

2014-08-06 Thread David Malcolm
gcc/ * coretypes.h (class rtx_insn): Add forward declaration. * rtl.h: Include is-a.h (struct rtx_def): Add dummy desc and tag GTY options as a workaround to ensure gengtype knows inheritance is occurring, whilst continuing to use the pre-existing

[PATCH 009/236] Replace BB_HEAD et al macros with functions

2014-08-06 Thread David Malcolm
This is further scaffolding; convert the BB_* and SET_BB_* macros into functions. Convert the BB_* rvalue-style functions into returning rtx_insn * rather than plain rtx. For now, this is done by adding a checked cast, but this will eventually become a field lookup. The lvalue form for now

[PATCH 007/236] New function: for_each_rtx_in_insn

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (for_each_rtx_in_insn): New function. * rtlanal.c (for_each_rtx_in_insn): Likewise. --- gcc/rtl.h | 1 + gcc/rtlanal.c | 16 2 files changed, 17 insertions(+) diff --git a/gcc/rtl.h b/gcc/rtl.h index 0858230..3e37ed0 100644 --- a/gcc/rtl.h +++

[PATCH 030/236] Convert various rtx to rtx_note *

2014-08-06 Thread David Malcolm
gcc/ * basic-block.h (create_basic_block_structure): Strengthen third param bb_note from rtx to rtx_note *. * rtl.h (emit_note_before): Strengthen return type from rtx to rtx_note *. (emit_note_after): Likewise. (emit_note): Likewise.

[PATCH 040/236] Use rtx_insn internally within generated functions

2014-08-06 Thread David Malcolm
With this patch, insn and curr_insn as used from C++ fragments in .md files are strengthened from rtx to rtx_insn *, allowing numerous target-specific functions to have their params be similiar strengthened. The top-level interfaces (recog, split, peephole2) continue to take a plain rtx for insn,

[PATCH 032/236] emit_* functions return rtx_insn

2014-08-06 Thread David Malcolm
More scaffolding: strengthen the return types from the various emit_ functions from rtx to rtx_insn * (or to the rtx_barrier * subclass in a few cases). These will ultimately have their params strengthened also, but we postpone that until much later in the patch series. So for now there are also

[PATCH 034/236] next_cc0_user and prev_cc0_setter scaffolding

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (next_cc0_user): Strengthen return type from rtx to rtx_insn *. (prev_cc0_setter): Likewise. * emit-rtl.c (next_cc0_user): Strengthen return type from rtx to rtx_insn *, adding checked casts for now as necessary. (prev_cc0_setter):

[PATCH 042/236] try_split returns an rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (try_split): Strengthen return type from rtx to rtx_insn *. * emit-rtl.c (try_split): Likewise, also for locals before and after. For now, don't strengthen param trial, which requires adding checked casts when returning it. --- gcc/emit-rtl.c | 12

[PATCH 048/236] alias.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * alias.c (init_alias_analysis): Strengthen local insn from rtx to rtx_insn *. --- gcc/alias.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/alias.c b/gcc/alias.c index 0246dd7..903840c 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -2840,7 +2840,8

[PATCH 047/236] PHASE 2: Per-file commits in main source directory

2014-08-06 Thread David Malcolm
This commit is a placeholder for me when rebasing, to help organize the patch kit. / * rtx-classes-status.txt: Update --- rtx-classes-status.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtx-classes-status.txt b/rtx-classes-status.txt index 52567e7..e350eaf

[PATCH 054/236] calls.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * calls.c (emit_call_1): Strengthen local call_insn from rtx to rtx_insn *. (internal_arg_pointer_exp_state): Likewise for field scan_start. (internal_arg_pointer_based_exp_scan): Likewise for locals insn, scan_start. (load_register_parameters):

[PATCH 058/236] cfgloop.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * cfgloop.c (loop_exits_from_bb_p): Strengthen local insn from rtx to rtx_insn *. --- gcc/cfgloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index 73f79ef..6d1fe8d 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@

[PATCH 056/236] cfgbuild.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * cfgbuild.c (make_edges): Strengthen local insn from rtx to rtx_insn *. (purge_dead_tablejump_edges): Likewise. (find_bb_boundaries): Likewise for locals insn, end, flow_transfer_insn. --- gcc/cfgbuild.c | 14 -- 1 file changed, 8

[PATCH 066/236] dce.c: Use rtx subclasses

2014-08-06 Thread David Malcolm
gcc/ * dce.c (worklist): Strengthen from vecrtx to vecrtx_insn *. (deletable_insn_p): Strengthen param insn from rtx to rtx_insn *. Add checked cast to rtx_call_insn when invoking find_call_stack_args, since this is guarded by CALL_P (insn).

[PATCH 063/236] compare-elim.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * compare-elim.c (struct comparison_use): Strengthen field insn from rtx to rtx_insn *. (struct comparison): Likewise, also for field prev_clobber. (conforming_compare): Likewise for param insn. (arithmetic_flags_clobber_p): Likewise.

[PATCH 068/236] df-*.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * df-core.c (df_bb_regno_first_def_find): Strengthen local insn from rtx to rtx_insn *. (df_bb_regno_last_def_find): Likewise. * df-problems.c (df_rd_bb_local_compute): Likewise. (df_lr_bb_local_compute): Likewise. (df_live_bb_local_compute):

[PATCH 049/236] asan.c: strengthen some rtx locals

2014-08-06 Thread David Malcolm
This is an example of strengthening rtx. For example, we now have strong enough types provided by the existing scaffolding to turn insn and insns in this: for (insn = insns; insn; insn = NEXT_INSN (insn)) from plain rtx into rtx_insn *. gcc/ * asan.c (asan_clear_shadow): Strengthen

[PATCH 077/236] fwprop.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * fwprop.c (single_def_use_dom_walker::before_dom_children): Strengthen local insn from rtx to rtx_insn *. (use_killed_between): Likewise for param target_insn. (all_uses_available_at): Likewise for param target_insn and local next.

[PATCH 080/236] haifa-sched.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * haifa-sched.c (bb_header): Strengthen from rtx * to rtx_insn **. (add_delay_dependencies): Strengthen local pro from rtx to rtx_insn *. (recompute_todo_spec): Likewise. (dep_cost_1): Likewise for locals insn, used. (schedule_insn): Likewise

[PATCH 084/236] internal-fn.c: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * internal-fn.c (ubsan_expand_si_overflow_addsub_check): Strengthen locals done_label, do_error from rtx to rtx_code_label *. (ubsan_expand_si_overflow_addsub_check): Strengthen local last from rtx to rtx_insn *. Strengthen local sub_check from rtx to

[PATCH 087/236] loop-doloop.c: Use rtx_insn in a few places

2014-08-06 Thread David Malcolm
gcc/ * loop-doloop.c (doloop_valid_p): Strengthen local insn from rtx to rtx_insn *. (add_test): Likewise for locals seq, jump. (doloop_modify): Likewise for locals sequence, jump_insn. --- gcc/loop-doloop.c | 9 + 1 file changed, 5 insertions(+), 4

[PATCH 099/236] predict.*: Use rtx_insn (also touches function.c and config/cris/cris.c)

2014-08-06 Thread David Malcolm
gcc/ * predict.h (predict_insn_def): Strengthen param insn from rtx to rtx_insn *. * function.c (stack_protect_epilogue): Add checked cast to rtx_insn for now when invoking predict_insn_def. * predict.c (predict_insn): Strengthen param insn from rtx to

[PATCH 092/236] lra: use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * lra-int.h (struct lra_insn_recog_data): Strengthen field insn from rtx to rtx_insn *. (lra_push_insn): Likewise for 1st param. (lra_push_insn_and_update_insn_regno_info): Likewise. (lra_pop_insn): Likewise for return type.

[PATCH 090/236] loop-unroll.c: Use rtx_insn (also touches basic-block.h)

2014-08-06 Thread David Malcolm
gcc/ * basic-block.h (basic_block split_edge_and_insert): Strengthen param insns from rtx to rtx_insn *. * loop-unroll.c (struct iv_to_split): Strengthen field insn from rtx to rtx_insn *. (struct iv_to_split): Likewise. (loop_exit_at_end_p):

[PATCH 109/236] resource.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * resource.c (next_insn_no_annul): Strengthen local next from rtx to rtx_insn *. (mark_referenced_resources): Likewise for local insn. --- gcc/resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/resource.c b/gcc/resource.c index

[PATCH 107/236] regstat.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * regstat.c (regstat_bb_compute_ri): Strengthen local insn from rtx to rtx_insn *. (regstat_bb_compute_calls_crossed): Likewise. --- gcc/regstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/regstat.c b/gcc/regstat.c index

[PATCH 102/236] ree.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * ree.c (struct ext_cand): Strengthen field insn from rtx to rtx_insn *. (combine_set_extension): Likewise for param curr_insn. (transform_ifelse): Likewise for param def_insn. (get_defs): Likewise for param def_insn. Strengthen param dest from

[PATCH 104/236] regcprop.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * regcprop.c (struct queued_debug_insn_change): Strengthen field insn from rtx to rtx_insn *. (replace_oldest_value_reg): Likewise for param insn. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Likewise.

[PATCH 116/236] shrink-wrap.*: Use rtx_insn (touches config/i386/i386.c)

2014-08-06 Thread David Malcolm
gcc/ * shrink-wrap.h (requires_stack_frame_p): Strengthen param 1 insn from rtx to rtx_insn *. (dup_block_and_redirect): Likewise for param 3 before. * shrink-wrap.c (requires_stack_frame_p): Strengthen param insn from rtx to rtx_insn *.

  1   2   3   4   >