Re: [PATCH] Loop unswitching: support gswitch statements.

2022-01-13 Thread Richard Biener via Gcc-patches
On Thu, Jan 13, 2022 at 5:01 PM Martin Liška wrote: > > On 1/6/22 17:30, Martin Liška wrote: > > I really welcome that, I've pushed devel/loop-unswitch-support-switches > > branch with first changes you pointed out. Feel free playing with the > > branch. > > Hello. > > I've just pushed a revision

Re: [PATCH] Loop unswitching: support gswitch statements.

2022-01-13 Thread Martin Liška
On 1/6/22 17:30, Martin Liška wrote: I really welcome that, I've pushed devel/loop-unswitch-support-switches branch with first changes you pointed out. Feel free playing with the branch. Hello. I've just pushed a revision to the branch that introduced top-level comment. Feel free to play with

Re: [PATCH] Loop unswitching: support gswitch statements.

2022-01-06 Thread Andrew MacLeod via Gcc-patches
On 1/6/22 11:35, Martin Liška wrote: On 1/6/22 17:20, Andrew MacLeod wrote: So if you get a FALSE back, you cannot use any results because GORI is claiming that it cant figure something out... or there is nothing to figure out.   Most of rangers routines are implemented so that if they return

Re: [PATCH] Loop unswitching: support gswitch statements.

2022-01-06 Thread Martin Liška
On 1/6/22 17:20, Andrew MacLeod wrote: So if you get a FALSE back, you cannot use any results because GORI is claiming that it cant figure something out... or there is nothing to figure out.   Most of rangers routines are implemented so that if they return FALSE, the result is meaningless. A

Re: [PATCH] Loop unswitching: support gswitch statements.

2022-01-06 Thread Andrew MacLeod via Gcc-patches
On 1/6/22 11:02, Martin Liška wrote: On 1/6/22 16:11, Andrew MacLeod wrote: On 1/5/22 07:34, Richard Biener wrote: On Thu, Dec 9, 2021 at 2:02 PM Martin Liška wrote: On 11/30/21 12:17, Richard Biener wrote: + unswitch_predicate *predicate +   = new unswitch_p

Re: [PATCH] Loop unswitching: support gswitch statements.

2022-01-06 Thread Martin Liška
On 1/5/22 13:34, Richard Biener wrote: On Thu, Dec 9, 2021 at 2:02 PM Martin Liška wrote: On 11/30/21 12:17, Richard Biener wrote: I'd like to see the gswitch support - that's what was posted before stage3 close, this patch on its own doesn't seem worth pushing for. That said, I have some co

Re: [PATCH] Loop unswitching: support gswitch statements.

2022-01-06 Thread Andrew MacLeod via Gcc-patches
On 1/6/22 11:02, Martin Liška wrote: On 1/6/22 16:11, Andrew MacLeod wrote: On 1/5/22 07:34, Richard Biener wrote: On Thu, Dec 9, 2021 at 2:02 PM Martin Liška wrote: On 11/30/21 12:17, Richard Biener wrote: + unswitch_predicate *predicate +   = new unswitch_p

Re: [PATCH] Loop unswitching: support gswitch statements.

2022-01-06 Thread Martin Liška
On 1/6/22 16:11, Andrew MacLeod wrote: On 1/5/22 07:34, Richard Biener wrote: On Thu, Dec 9, 2021 at 2:02 PM Martin Liška wrote: On 11/30/21 12:17, Richard Biener wrote: + unswitch_predicate *predicate +   = new unswitch_predicate (expr, idx, edge_index); +   

Re: [PATCH] Loop unswitching: support gswitch statements.

2022-01-06 Thread Andrew MacLeod via Gcc-patches
On 1/5/22 07:34, Richard Biener wrote: On Thu, Dec 9, 2021 at 2:02 PM Martin Liška wrote: On 11/30/21 12:17, Richard Biener wrote: + unswitch_predicate *predicate + = new unswitch_predicate (expr, idx, edge_index); + ranger->gori ().outgoing_e

Re: [PATCH] Loop unswitching: support gswitch statements.

2022-01-05 Thread Richard Biener via Gcc-patches
On Thu, Dec 9, 2021 at 2:02 PM Martin Liška wrote: > > On 11/30/21 12:17, Richard Biener wrote: > > I'd like to see the gswitch support - that's what was posted before stage3 > > close, this patch on its own doesn't seem worth pushing for. That said, > > I have some comments below (and the alread

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-09 Thread Andrew MacLeod via Gcc-patches
On 12/9/21 07:59, Martin Liška wrote: On 12/3/21 15:09, Andrew MacLeod wrote: On 12/2/21 11:02, Martin Liška wrote: On 12/2/21 15:27, Andrew MacLeod wrote: ranger->gori().outgoing_edge_range_p (irange &r, edge e, tree name, *get_global_range_query ()); Thank you! It works for me! Martin bt

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-09 Thread Martin Liška
On 11/30/21 12:17, Richard Biener wrote: I'd like to see the gswitch support - that's what was posted before stage3 close, this patch on its own doesn't seem worth pushing for. That said, I have some comments below (and the already raised ones about how things might need to change with gswitch s

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-09 Thread Martin Liška
On 12/3/21 15:09, Andrew MacLeod wrote: On 12/2/21 11:02, Martin Liška wrote: On 12/2/21 15:27, Andrew MacLeod wrote: ranger->gori().outgoing_edge_range_p (irange &r, edge e, tree name, *get_global_range_query ()); Thank you! It works for me! Martin btw, this applies to names not  on the

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-08 Thread Andrew MacLeod via Gcc-patches
On 12/2/21 08:46, Richard Biener wrote: On Thu, Dec 2, 2021 at 2:10 PM Martin Liška wrote: On 12/2/21 13:01, Richard Biener wrote: On Thu, Dec 2, 2021 at 12:45 PM Martin Liška wrote: On 12/1/21 19:21, Andrew MacLeod wrote: On 12/1/21 09:48, Martin Liška wrote: On 12/1/21 15:34, Richard Bie

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-03 Thread Andrew MacLeod via Gcc-patches
On 12/2/21 11:02, Martin Liška wrote: On 12/2/21 15:27, Andrew MacLeod wrote: ranger->gori().outgoing_edge_range_p (irange &r, edge e, tree name, *get_global_range_query ()); Thank you! It works for me! Martin btw, this applies to names not  on the stmt as well.   The function returns TRUE

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-02 Thread Martin Liška
On 12/2/21 15:27, Andrew MacLeod wrote: ranger->gori().outgoing_edge_range_p (irange &r, edge e, tree name, *get_global_range_query ()); Thank you! It works for me! Martin

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-02 Thread Andrew MacLeod via Gcc-patches
On 12/2/21 06:45, Martin Liška wrote: On 12/1/21 19:21, Andrew MacLeod wrote: On 12/1/21 09:48, Martin Liška wrote: On 12/1/21 15:34, Richard Biener wrote: On Wed, Dec 1, 2021 at 3:25 PM Martin Liška wrote: On 12/1/21 15:19, Richard Biener wrote: which is compute the range of 'lhs' on edge_

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-02 Thread Richard Biener via Gcc-patches
On Thu, Dec 2, 2021 at 2:10 PM Martin Liška wrote: > > On 12/2/21 13:01, Richard Biener wrote: > > On Thu, Dec 2, 2021 at 12:45 PM Martin Liška wrote: > >> > >> On 12/1/21 19:21, Andrew MacLeod wrote: > >>> On 12/1/21 09:48, Martin Liška wrote: > On 12/1/21 15:34, Richard Biener wrote: > >>>

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-02 Thread Martin Liška
On 12/2/21 13:01, Richard Biener wrote: On Thu, Dec 2, 2021 at 12:45 PM Martin Liška wrote: On 12/1/21 19:21, Andrew MacLeod wrote: On 12/1/21 09:48, Martin Liška wrote: On 12/1/21 15:34, Richard Biener wrote: On Wed, Dec 1, 2021 at 3:25 PM Martin Liška wrote: On 12/1/21 15:19, Richard B

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-02 Thread Richard Biener via Gcc-patches
On Thu, Dec 2, 2021 at 12:45 PM Martin Liška wrote: > > On 12/1/21 19:21, Andrew MacLeod wrote: > > On 12/1/21 09:48, Martin Liška wrote: > >> On 12/1/21 15:34, Richard Biener wrote: > >>> On Wed, Dec 1, 2021 at 3:25 PM Martin Liška wrote: > > On 12/1/21 15:19, Richard Biener wrote: > >

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-02 Thread Martin Liška
On 12/1/21 19:21, Andrew MacLeod wrote: On 12/1/21 09:48, Martin Liška wrote: On 12/1/21 15:34, Richard Biener wrote: On Wed, Dec 1, 2021 at 3:25 PM Martin Liška wrote: On 12/1/21 15:19, Richard Biener wrote: which is compute the range of 'lhs' on edge_true into predicate->true_range, assig

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-01 Thread Andrew MacLeod via Gcc-patches
On 12/1/21 09:48, Martin Liška wrote: On 12/1/21 15:34, Richard Biener wrote: On Wed, Dec 1, 2021 at 3:25 PM Martin Liška wrote: On 12/1/21 15:19, Richard Biener wrote: which is compute the range of 'lhs' on edge_true into predicate->true_range, assign that same range to ->false_range and t

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-01 Thread Martin Liška
On 12/1/21 15:34, Richard Biener wrote: On Wed, Dec 1, 2021 at 3:25 PM Martin Liška wrote: On 12/1/21 15:19, Richard Biener wrote: which is compute the range of 'lhs' on edge_true into predicate->true_range, assign that same range to ->false_range and then invert it to get the range on the fa

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-01 Thread Richard Biener via Gcc-patches
On Wed, Dec 1, 2021 at 3:25 PM Martin Liška wrote: > > On 12/1/21 15:19, Richard Biener wrote: > > which is compute the range of 'lhs' on edge_true into predicate->true_range, > > assign that same range to ->false_range and then invert it to get the > > range on the false_edge. What I am saying i

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-01 Thread Martin Liška
On 12/1/21 15:19, Richard Biener wrote: which is compute the range of 'lhs' on edge_true into predicate->true_range, assign that same range to ->false_range and then invert it to get the range on the false_edge. What I am saying is that for better precision you should do ranger->range_on_

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-01 Thread Richard Biener via Gcc-patches
On Wed, Dec 1, 2021 at 3:10 PM Martin Liška wrote: > > On 11/30/21 12:17, Richard Biener wrote: > > On Mon, Nov 29, 2021 at 1:45 PM Martin Liška wrote: > >> > >> On 11/26/21 09:12, Richard Biener wrote: > >>> On Wed, Nov 24, 2021 at 3:32 PM Martin Liška wrote: > > On 11/24/21 15:14, Ma

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-12-01 Thread Martin Liška
On 11/30/21 12:17, Richard Biener wrote: On Mon, Nov 29, 2021 at 1:45 PM Martin Liška wrote: On 11/26/21 09:12, Richard Biener wrote: On Wed, Nov 24, 2021 at 3:32 PM Martin Liška wrote: On 11/24/21 15:14, Martin Liška wrote: It likely miscompiles gcc.dg/loop-unswitch-5.c, working on that.

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-30 Thread Richard Biener via Gcc-patches
On Mon, Nov 29, 2021 at 1:45 PM Martin Liška wrote: > > On 11/26/21 09:12, Richard Biener wrote: > > On Wed, Nov 24, 2021 at 3:32 PM Martin Liška wrote: > >> > >> On 11/24/21 15:14, Martin Liška wrote: > >>> It likely miscompiles gcc.dg/loop-unswitch-5.c, working on that.. > >> > >> Fixed that in

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-29 Thread Martin Liška
On 11/26/21 09:12, Richard Biener wrote: On Wed, Nov 24, 2021 at 3:32 PM Martin Liška wrote: On 11/24/21 15:14, Martin Liška wrote: It likely miscompiles gcc.dg/loop-unswitch-5.c, working on that.. Fixed that in the updated version. Function level comments need updating it seems. I've d

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-26 Thread Richard Biener via Gcc-patches
On Wed, Nov 24, 2021 at 3:32 PM Martin Liška wrote: > > On 11/24/21 15:14, Martin Liška wrote: > > It likely miscompiles gcc.dg/loop-unswitch-5.c, working on that.. > > Fixed that in the updated version. Function level comments need updating it seems. +static unsigned +evaluate_insns (class loop

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-25 Thread Richard Biener via Gcc-patches
On Thu, Nov 25, 2021 at 11:38 AM Aldy Hernandez wrote: > > On Wed, Nov 24, 2021 at 9:00 AM Richard Biener > wrote: > > > > On Tue, Nov 23, 2021 at 5:36 PM Martin Liška wrote: > > > > > > On 11/23/21 16:20, Martin Liška wrote: > > > > Sure, so for e.g. case 1 ... 5 we would need to create a new

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-25 Thread Aldy Hernandez via Gcc-patches
On Wed, Nov 24, 2021 at 9:00 AM Richard Biener wrote: > > On Tue, Nov 23, 2021 at 5:36 PM Martin Liška wrote: > > > > On 11/23/21 16:20, Martin Liška wrote: > > > Sure, so for e.g. case 1 ... 5 we would need to create a new > > > unswitch_predicate > > > with 1 <= index && index <= 5 tree predic

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-24 Thread Martin Liška
On 11/24/21 15:14, Martin Liška wrote: It likely miscompiles gcc.dg/loop-unswitch-5.c, working on that.. Fixed that in the updated version. Martindiff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index f8a15f3d1d1..278fb1112b3 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -187,6 +187,7 @@ DEB

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-24 Thread Martin Liška
On 11/24/21 13:48, Richard Biener wrote: Yup. You did have a branch, right? Maybe I'll poke at it a bit as well. Well, I rebase quite a bit as it's under heavy development now. Do you want me creating a devel/* branch? Anyway, I've got a proof-of-concept patch that does: - unswitch_predicat

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-24 Thread Richard Biener via Gcc-patches
On Wed, Nov 24, 2021 at 11:48 AM Martin Liška wrote: > > On 11/24/21 09:00, Richard Biener wrote: > > On Tue, Nov 23, 2021 at 5:36 PM Martin Liška wrote: > >> > >> On 11/23/21 16:20, Martin Liška wrote: > >>> Sure, so for e.g. case 1 ... 5 we would need to create a new > >>> unswitch_predicate >

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-24 Thread Martin Liška
On 11/24/21 09:00, Richard Biener wrote: On Tue, Nov 23, 2021 at 5:36 PM Martin Liška wrote: On 11/23/21 16:20, Martin Liška wrote: Sure, so for e.g. case 1 ... 5 we would need to create a new unswitch_predicate with 1 <= index && index <= 5 tree predicate (and the corresponding irange range

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-24 Thread Richard Biener via Gcc-patches
On Tue, Nov 23, 2021 at 5:36 PM Martin Liška wrote: > > On 11/23/21 16:20, Martin Liška wrote: > > Sure, so for e.g. case 1 ... 5 we would need to create a new > > unswitch_predicate > > with 1 <= index && index <= 5 tree predicate (and the corresponding irange > > range). > > Later once we unsw

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-23 Thread Richard Biener via Gcc-patches
On Tue, Nov 23, 2021 at 4:20 PM Martin Liška wrote: > > On 11/23/21 14:58, Richard Biener wrote: > > On Mon, Nov 22, 2021 at 4:07 PM Martin Liška wrote: > >> > >> On 11/19/21 11:00, Richard Biener wrote: > >>> On Tue, Nov 16, 2021 at 3:40 PM Martin Liška wrote: > > On 11/11/21 08:15, R

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-23 Thread Martin Liška
On 11/23/21 16:20, Martin Liška wrote: Sure, so for e.g. case 1 ... 5 we would need to create a new unswitch_predicate with 1 <= index && index <= 5 tree predicate (and the corresponding irange  range). Later once we unswitch on it, we should use a special unreachable_flag that will be used for m

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-23 Thread Martin Liška
On 11/23/21 14:58, Richard Biener wrote: On Mon, Nov 22, 2021 at 4:07 PM Martin Liška wrote: On 11/19/21 11:00, Richard Biener wrote: On Tue, Nov 16, 2021 at 3:40 PM Martin Liška wrote: On 11/11/21 08:15, Richard Biener wrote: So I'd try to do no functional change first, improving the cos

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-23 Thread Richard Biener via Gcc-patches
On Mon, Nov 22, 2021 at 4:07 PM Martin Liška wrote: > > On 11/19/21 11:00, Richard Biener wrote: > > On Tue, Nov 16, 2021 at 3:40 PM Martin Liška wrote: > >> > >> On 11/11/21 08:15, Richard Biener wrote: > >>> So I'd try to do no functional change first, improving the costing and > >>> setting up

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-22 Thread Martin Liška
On 11/19/21 11:00, Richard Biener wrote: On Tue, Nov 16, 2021 at 3:40 PM Martin Liška wrote: On 11/11/21 08:15, Richard Biener wrote: So I'd try to do no functional change first, improving the costing and setting up the transform to simply pick up the stmts to "fold" as discovered during anal

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-19 Thread Richard Biener via Gcc-patches
On Tue, Nov 16, 2021 at 3:40 PM Martin Liška wrote: > > On 11/11/21 08:15, Richard Biener wrote: > > So I'd try to do no functional change first, improving the costing and > > setting up the transform to simply pick up the stmts to "fold" as discovered > > during analysis (as I hinted you possibly

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-19 Thread Richard Biener via Gcc-patches
On Tue, Nov 16, 2021 at 2:53 PM Martin Liška wrote: > > On 11/11/21 08:15, Richard Biener wrote: > > If you look at simplify_using_entry_checks then this is really really > > simple, > > so I'd try to abstract this, recording sth like a unswitch_predicate where > > we store the condition we unswi

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-16 Thread Martin Liška
On 11/11/21 08:15, Richard Biener wrote: So I'd try to do no functional change first, improving the costing and setting up the transform to simply pick up the stmts to "fold" as discovered during analysis (as I hinted you possibly can use gimple_uid to mark the stmts that simplify, IIRC gimple_ui

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-16 Thread Martin Liška
On 11/11/21 08:15, Richard Biener wrote: If you look at simplify_using_entry_checks then this is really really simple, so I'd try to abstract this, recording sth like a unswitch_predicate where we store the condition we unswitch on plus maybe cache the constant range of a VAR cmp CST variable con

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-10 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 2:29 PM Martin Liška wrote: > > On 11/10/21 09:59, Richard Biener wrote: > > On Tue, Nov 9, 2021 at 5:44 PM Martin Liška wrote: > >> > >> On 11/9/21 14:37, Richard Biener wrote: > >>> On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: > > On 11/8/21 10:05 AM,

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-10 Thread Martin Liška
On 11/10/21 09:59, Richard Biener wrote: On Tue, Nov 9, 2021 at 5:44 PM Martin Liška wrote: On 11/9/21 14:37, Richard Biener wrote: On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: On 11/8/21 10:05 AM, Martin Liška wrote: On 9/28/21 22:39, Andrew MacLeod wrote: In Theory, modifying t

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-10 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 5:44 PM Martin Liška wrote: > > On 11/9/21 14:37, Richard Biener wrote: > > On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: > >> > >> On 11/8/21 10:05 AM, Martin Liška wrote: > >>> On 9/28/21 22:39, Andrew MacLeod wrote: > In Theory, modifying the IL should be fin

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-10 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 5:41 PM Andrew MacLeod wrote: > > On 11/9/21 8:37 AM, Richard Biener wrote: > > On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: > >> On 11/8/21 10:05 AM, Martin Liška wrote: > >>> On 9/28/21 22:39, Andrew MacLeod wrote: > In Theory, modifying the IL should be fine

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-09 Thread Aldy Hernandez via Gcc-patches
On Tue, Nov 9, 2021 at 5:41 PM Andrew MacLeod wrote: > > On 11/9/21 8:37 AM, Richard Biener wrote: > > On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: > >> On 11/8/21 10:05 AM, Martin Liška wrote: > >>> On 9/28/21 22:39, Andrew MacLeod wrote: > In Theory, modifying the IL should be fine

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-09 Thread Martin Liška
nger is used (I rely on the growing patch provided by Andrew) - better ranger API is used for gcond expression: ranger.range_of_stmt (r, stmt) && r.singleton_p (&result)) - auto_edge_flag is used now Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Thoughts? Mart

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-09 Thread Andrew MacLeod via Gcc-patches
On 11/9/21 8:37 AM, Richard Biener wrote: On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: On 11/8/21 10:05 AM, Martin Liška wrote: On 9/28/21 22:39, Andrew MacLeod wrote: In Theory, modifying the IL should be fine, it happens already in places, but its not extensively tested under those

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-09 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: > > On 11/8/21 10:05 AM, Martin Liška wrote: > > On 9/28/21 22:39, Andrew MacLeod wrote: > >> In Theory, modifying the IL should be fine, it happens already in > >> places, but its not extensively tested under those conditions yet. > > > > Hello

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-08 Thread Andrew MacLeod via Gcc-patches
On 11/8/21 10:05 AM, Martin Liška wrote: On 9/28/21 22:39, Andrew MacLeod wrote: In Theory, modifying the IL should be fine, it happens already in places, but its not extensively tested under those conditions yet. Hello Andrew. I've just tried using a global gimple_ranger and it crashes when

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-08 Thread Andrew MacLeod via Gcc-patches
On 11/8/21 10:05 AM, Martin Liška wrote: On 9/28/21 22:39, Andrew MacLeod wrote: In Theory, modifying the IL should be fine, it happens already in places, but its not extensively tested under those conditions yet. Hello Andrew. I've just tried using a global gimple_ranger and it crashes when

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-08 Thread Martin Liška
On 9/28/21 22:39, Andrew MacLeod wrote: In Theory, modifying the IL should be fine, it happens already in places, but  its not extensively tested under those conditions yet. Hello Andrew. I've just tried using a global gimple_ranger and it crashes when loop unswitching duplicates some BBs. P

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-10-05 Thread Andrew MacLeod via Gcc-patches
On 9/28/21 7:50 AM, Richard Biener wrote: On Wed, Sep 15, 2021 at 10:46 AM Martin Liška wrote: Hello. The patch extends the loop unswitching pass so that gswitch statements are supported. The pass now uses ranger which marks switch edges that are known to be unreachable in a versioned loop. P

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-09-30 Thread Richard Biener via Gcc-patches
On Wed, Sep 29, 2021 at 5:28 PM Jeff Law wrote: > > > > On 9/29/2021 9:20 AM, Andrew MacLeod via Gcc-patches wrote: > > On 9/29/21 4:43 AM, Richard Biener wrote: > >> On Tue, Sep 28, 2021 at 10:39 PM Andrew MacLeod > >> wrote: > >>> On 9/28/21 7:50 AM, Richard Biener wrote: > On Wed, Sep 15,

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-09-29 Thread Andrew MacLeod via Gcc-patches
On 9/29/21 11:28 AM, Jeff Law wrote: On 9/29/2021 9:20 AM, Andrew MacLeod via Gcc-patches wrote: On 9/29/21 4:43 AM, Richard Biener wrote: On Tue, Sep 28, 2021 at 10:39 PM Andrew MacLeod wrote: On 9/28/21 7:50 AM, Richard Biener wrote: On Wed, Sep 15, 2021 at 10:46 AM Martin Liška wrote:

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-09-29 Thread Jeff Law via Gcc-patches
On 9/29/2021 9:20 AM, Andrew MacLeod via Gcc-patches wrote: On 9/29/21 4:43 AM, Richard Biener wrote: On Tue, Sep 28, 2021 at 10:39 PM Andrew MacLeod wrote: On 9/28/21 7:50 AM, Richard Biener wrote: On Wed, Sep 15, 2021 at 10:46 AM Martin Liška wrote:     /* Unswitch single LOOP.  NUM is

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-09-29 Thread Andrew MacLeod via Gcc-patches
On 9/29/21 4:43 AM, Richard Biener wrote: On Tue, Sep 28, 2021 at 10:39 PM Andrew MacLeod wrote: On 9/28/21 7:50 AM, Richard Biener wrote: On Wed, Sep 15, 2021 at 10:46 AM Martin Liška wrote: /* Unswitch single LOOP. NUM is number of unswitchings done; we do not allow @@ -269,6 +311,7

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-09-29 Thread Richard Biener via Gcc-patches
On Tue, Sep 28, 2021 at 10:39 PM Andrew MacLeod wrote: > > On 9/28/21 7:50 AM, Richard Biener wrote: > > On Wed, Sep 15, 2021 at 10:46 AM Martin Liška wrote: > >>/* Unswitch single LOOP. NUM is number of unswitchings done; we do not > >> allow > >> @@ -269,6 +311,7 @@ tree_unswitch_single_l

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-09-28 Thread Andrew MacLeod via Gcc-patches
On 9/28/21 7:50 AM, Richard Biener wrote: On Wed, Sep 15, 2021 at 10:46 AM Martin Liška wrote: /* Unswitch single LOOP. NUM is number of unswitchings done; we do not allow @@ -269,6 +311,7 @@ tree_unswitch_single_loop (class loop *loop, int num) class loop *nloop; unsigned i, foun

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-09-28 Thread Richard Biener via Gcc-patches
On Wed, Sep 15, 2021 at 10:46 AM Martin Liška wrote: > > Hello. > > The patch extends the loop unswitching pass so that gswitch > statements are supported. The pass now uses ranger which marks > switch edges that are known to be unreachable in a versioned loop. > > Patch can bootstrap on x86_64-li

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-09-19 Thread Jeff Law via Gcc-patches
On 9/15/2021 2:46 AM, Martin Liška wrote: Hello. The patch extends the loop unswitching pass so that gswitch statements are supported. The pass now uses ranger which marks switch edges that are known to be unreachable in a versioned loop. Patch can bootstrap on x86_64-linux-gnu and survives

[PATCH] Loop unswitching: support gswitch statements.

2021-09-15 Thread Martin Liška
Hello. The patch extends the loop unswitching pass so that gswitch statements are supported. The pass now uses ranger which marks switch edges that are known to be unreachable in a versioned loop. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Than