[PATCH v2] gimple: Add limit after which slower switchlower algs are used [PR117091] [PR117352]

2024-12-09 Thread Filip Kastl
ting this again just to be extra sure. Ok to push if bootstrap/regtest succeeds? Cheers, Filip Kastl -- 8< -- This patch adds a limit on the number of cases of a switch. When this limit is exceeded, switch lowering decides to use faster but less powerful algorithms. In particular this mean

Re: [PATCH] gimple: Add limit after which slower switchlower algs are used [PR117091] [PR117352]

2024-12-05 Thread Filip Kastl
01:38, Andi Kleen wrote: > On Fri, Nov 15, 2024 at 10:43:57AM +0100, Filip Kastl wrote: > > Hi, > > > > Andi's greedy bit test finding algorithm was reverted. I found a fix for > > the > > problem that caused the revert. I made this patch to reintroduce the g

Re: [PATCH] gimple: Add limit after which slower switchlower algs are used [PR117091] [PR117352]

2024-12-05 Thread Filip Kastl
On Fri 2024-11-15 12:08:24, Richard Biener wrote: > On Fri, 15 Nov 2024, Filip Kastl wrote: > > > Hi, > > > > Andi's greedy bit test finding algorithm was reverted. I found a fix for > > the > > problem that caused the revert. I made this patch t

[COMMITTED] doc: Add store-forwarding-max-distance to invoke.texi

2024-12-05 Thread Filip Kastl
gcc/ChangeLog: * doc/invoke.texi: Add store-forwarding-max-distance. Signed-off-by: Filip Kastl --- gcc/doc/invoke.texi | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index d2409a41d50..4b1acf9b79c 100644 --- a/gcc/doc/invoke.texi

[COMMITTED] params.opt: Fix typo

2024-12-05 Thread Filip Kastl
Add missing '=' after -param=cycle-accurate-model. gcc/ChangeLog: * params.opt: Add missing '=' after -param=cycle-accurate-model. Signed-off-by: Filip Kastl --- gcc/params.opt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/params.opt b/

[COMMITTED] contrib: Fix 2 bugs in check-params-in-docs.py

2024-12-04 Thread Filip Kastl
Hi All, Commiting this as obvious. Cheers, Filip Kastl -- 8< -- In my last patch for check-params-in-docs.py I accidentally 1. left one occurence of the 'help_params' variable not renamed 2. converted 'help_params' from a dict to a list These issues cause t

[PATCH] gimple: Add limit after which slower switchlower algs are used [PR117091] [PR117352]

2024-11-15 Thread Filip Kastl
from PR117352 anymore. Ok to push? Thanks, Filip Kastl -- 8< -- This patch adds a limit on the number of cases of a switch. When this limit is exceeded, switch lowering decides to use faster but less powerful algorithms. In particular this means that for finding bit tests switch lowerin

Re: [PATCH] i386: Add -mveclibabi=aocl [PR56504]

2024-11-13 Thread Filip Kastl
On Wed 2024-11-13 15:18:32, Jan Hubicka wrote: > > - sincos and all functions working with arrays ... Because these > > functions have pointer arguments and that would require a bigger > > rework of ix86_veclibabi_aocl(). Also, I'm not sure if GCC even ever > > generates calls to these funct

Re: [PATCH] i386: Add -mveclibabi=aocl [PR56504]

2024-11-13 Thread Filip Kastl
UBLIC (new_fndecl) = 1; > > + DECL_EXTERNAL (new_fndecl) = 1; > > + DECL_IS_NOVOPS (new_fndecl) = 1; > > + TREE_READONLY (new_fndecl) = 1; > > I see that NOVOPS is copied from the older implementation. I think > const (which is specified by TREE_READONLY = 1) should be

[PATCH] i386: Add -mveclibabi=aocl [PR56504]

2024-11-11 Thread Filip Kastl
Hi, Bootstrapped and regtested on x86_64 linux. I also tested that all the new calls can be linked with the AOCL LibM library. Ok to push? Thanks, Filip Kastl -- 8< -- We currently support generating vectorized math calls to the AMD core math library (ACML) (-mveclibabi=acml). T

Re: [PATCH 2/2] doc: install: document UBSAN_OPTIONS

2024-11-06 Thread Filip Kastl
On Wed 2024-11-06 10:19:12, Sam James wrote: > Sam James writes: > > > Explain that 'bootstrap-ubsan' won't abort on errors by default and how > > to override that by setting UBSAN_OPTIONS. > > > > gcc/ChangeLog: > > PR other/116948 > > > > * doc/install.texi (Building a native compiler):

Re: [PATCH 1/2] doc: install: document bootstrap-ubsan

2024-11-06 Thread Filip Kastl
Hi, I'm not a maintainer but I think we certainly want to have bootstrap-ubsan documented and the patch looks good to me. Cheers, Filip On Thu 2024-10-31 21:11:13, Sam James wrote: > gcc/ChangeLog: > PR other/116948 > > * doc/install.texi (Building a native compiler): Mention > boo

Re: [PATCH 2/2] Only do switch bit test clustering when multiple labels point to same bb

2024-10-17 Thread Filip Kastl
(vec &clusters); >/* Compute the number of case labels that correspond to each outgoing edge > of > switch statement. Record this information in the aux field of the edge. > + Returns max number of cases per edge. > */ I would specify "approx max number" instead of "max number" here. Otherwise looks good to me. Cheers, Filip Kastl

[COMMITED] MAINTAINERS: Fix name order

2024-10-15 Thread Filip Kastl
ChangeLog: * MAINTAINERS: Fix Write After Approval name order. Signed-off-by: Filip Kastl --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index cf1cf78e16c..269ac2ea6b4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -760,7

Re: [PATCH] Update email in MAINTAINERS file.

2024-09-24 Thread Filip Kastl
On Tue 2024-09-24 11:43:47, Aldy Hernandez wrote: > Pushed attached patch. > > Thanks. > Aldy > Nice. Thanks! Filip > On Tue, Sep 24, 2024 at 10:09 AM Filip Kastl wrote: > > > On Mon 2024-09-23 09:43:28, Aldy Hernandez wrote: > > > From: A

Re: [PATCH] Update email in MAINTAINERS file.

2024-09-24 Thread Filip Kastl
> +Aldy Hernandez > -- > 2.43.0 > Hi Aldy, Could you move your entry in the DCO list so that it respects surname alphabetical order, please? Your name should be between Robin Dapp and Michal Jires. Thanks, Filip Kastl

[PING] [PATCH v2] gimple ssa: Don't use __builtin_popcount in switch exp transform

2024-09-23 Thread Filip Kastl
Hi, I'd like to ping my patch. You can find it here https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662744.html Btw I forgot to include [PR116616] in the subject. Hope I didn't confuse people. I will take care to include the tag in the git commit message. Thanks, Filip Kastl

[COMMITED] [PATCH v2] contrib: Set check-params-in-docs.py to skip tables of values of a param

2024-09-18 Thread Filip Kastl
Thanks for the approval Richard! I've incorporated your suggestion to remove the "digits skip" code and I've pushed the patch. Cheers, Filip Kastl -- 8< -- Currently check-params-in-docs.py reports extra params being listed in invoke.texi. However, those aren't

[PING] [PATCH] contrib: Set check-params-in-docs.py to skip tables of values of a param

2024-09-18 Thread Filip Kastl
Hi, I'd like to ping my patch. You can find it here: https://gcc.gnu.org/pipermail/gcc-patches/2024-August/661362.html Btw not sure if I could Cc anyone on this. AFAIK no one is a maintainer of the ./contrib scripts. Thanks, Filip Kastl

[PATCH v2] gimple ssa: Don't use __builtin_popcount in switch exp transform

2024-09-10 Thread Filip Kastl
-linux. Ok to push? Thanks, Filip Kastl --- 8< --- Switch exponential transformation in the switch conversion pass currently generates tmp1 = __builtin_popcount (var); tmp2 = tmp1 == 1; when inserting code to determine if var is power of two. If the target doesn't support expanding the

[PATCH] gimple ssa: Don't use __builtin_popcount in switch exp transform [PR116616]

2024-09-06 Thread Filip Kastl
Hi, bootstrapped and regtested on x86_64-linux. Ok to push? Thanks, Filip Kastl 8< Switch exponential transformation in the switch conversion pass currently generates tmp1 = __builtin_popcount (var); tmp2 = tmp1 == 1; when inserting code to determine if var is power of two.

Re: [RFC] gimple ssa: VRP to mark switch default as unreachable instead of removing it [PR112687]

2024-09-01 Thread Filip Kastl
On Sun 2024-09-01 09:25:07, Jeff Law wrote: > > > On 9/1/24 9:19 AM, Filip Kastl wrote: > > (I'm Cc-ing Diego since he originally contributed the VRP pass and Jeff > > because > > I've seen him in git blame on many lines of vr-values.cc around the place I

[RFC] gimple ssa: VRP to mark switch default as unreachable instead of removing it [PR112687]

2024-09-01 Thread Filip Kastl
I'll appreciate comments on if I should place the blob of code creating the __builtin_unreachable somewhere else in the file. I'll also appreciate any other comments on the patch. Cheers, Filip Kastl P.S. While writing this I realized that in this case... int unopt(int v) { sw

[PATCH v2] gimple ssa: switchconv: Use __builtin_popcount and support more types in exp transform [PR116355]

2024-08-27 Thread Filip Kastl
as one of their parameters. - Using gimple_convert instead of manually building CONVERT_EXPR/NOP_EXPR assignments. - Using gimple_build for building __builtin_popcount. - Adjusted ChangeLog entries. Bootstrapped and regtested on x86_64 linux. Ok to push? Cheers, Filip Kastl -- 8< -- The

[PATCH] contrib: Set check-params-in-docs.py to skip tables of values of a param

2024-08-24 Thread Filip Kastl
fault', 'asimd-only', 'sve-only', 'prefer-asimd', 'prefer-sve'} Is the patch ok to be pushed? Cheers, Filip Kastl -- 8< -- Currently check-params-in-docs.py reports extra params being listed in invoke.texi. However, those aren't actual par

[PATCH] gimple ssa: switchconv: Use __builtin_popcount and support more types in exp transform [PR116355]

2024-08-24 Thread Filip Kastl
Hi, bootstrapped and regtested on x86_64-linux. Ok to push? Cheers, Filip Kastl -- 8< -- The gen_pow2p function generates (a & -a) == a as a fallback for POPCOUNT (a) == 1. Not only is the bitmagic not equivalent to POPCOUNT (a) == 1 but it also introduces UB (consider signed a =

Re: [wwwdocs v2] gcc-15: Mention c++ header dependency changes () in porting_to.html

2024-08-21 Thread Filip Kastl
On Wed 2024-08-21 09:50:39, Jonathan Wakely wrote: > On Wed, 21 Aug 2024 at 09:48, Filip Kastl wrote: > > > > Hi, > > > > this is the second version of my patch. See version 1 here: > > > > https://gcc.gnu.org/pipermail/gcc-patches/2024-August/659584.h

[wwwdocs v2] gcc-15: Mention c++ header dependency changes () in porting_to.html

2024-08-21 Thread Filip Kastl
Jonathan suggested. - Changed "in libstdc++" to "within libstdc++". Validated with the W3 Validator. Is this ok to be pushed? Cheers, Filip Kastl --- htdocs/gcc-15/changes.html| 3 +- htdocs/gcc-15/porting_to.html | 54 +++ 2 files ch

Re: [wwwdocs] gcc-15: Mention c++ header dependency changes () in porting_to.html

2024-08-07 Thread Filip Kastl
ithout including <cstdint> where needed will no longer compile. Any opinion on these two options? Cheers, Filip Kastl

[wwwdocs] gcc-15: Mention c++ header dependency changes () in porting_to.html

2024-08-06 Thread Filip Kastl
rom GCC 14 porting_to.html). Ha! As I'm writing this I noticed that actually Jonathan predicted this and suggested a corresponding porting_to.html entry. Well, here it is :). Validated with the W3 Validator. Is this ok to be pushed? Cheers, Filip Kastl -- 8< -- --- htdocs/gcc-15/ch

Re: [PATCH] gimple ssa: Put SCCOPY logic into a class

2024-08-06 Thread Filip Kastl
On Tue 2024-08-06 15:14:32, Richard Biener wrote: > On Tue, 6 Aug 2024, Filip Kastl wrote: > > > Hello everybody, > > > > In pr113054[1] Andrew said that he doesn't like the 'dead_stmts' static > > variable I used when implementing the sccopy pass.

[PATCH] gimple ssa: Put SCCOPY logic into a class

2024-08-06 Thread Filip Kastl
xactly that. I waited until stage 1 to submit it. Bootstrapped and regtested on x86_64. Is the patch ok to be pushed to trunk? Cheers, Filip Kastl [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113054 -- 8< -- Currently the main logic of the sccopy pass is implemented as static functions.

[COMMITED] gimple ssa: Fix a typo in gimple-ssa-sccopy.cc

2024-08-05 Thread Filip Kastl
Hello, just commited this as obvious. Filip Kastl -- 8< -- Fixes a misplaced comment in gimple-ssa-sccopy.cc. The comment belongs to a bitmap definition but was instead placed before the beginning of a namespace block. gcc/ChangeLog: * gimple-ssa-sccopy.cc: Move a misplaced comm

Re: [PATCH v2] testsuite: Adjust switch-exp-transform-3.c for 32bit

2024-07-31 Thread Filip Kastl
On Wed 2024-07-31 13:34:28, Jakub Jelinek wrote: > On Wed, Jul 31, 2024 at 01:32:06PM +0200, Filip Kastl wrote: > > Thanks for the feedback! Here is a second version of the patch. I've > > tested > > this version with > > > > make check RUNTESTFLAG

[PATCH v2] testsuite: Adjust switch-exp-transform-3.c for 32bit

2024-07-31 Thread Filip Kastl
On Wed 2024-07-31 12:18:34, Jakub Jelinek wrote: > On Wed, Jul 31, 2024 at 12:02:08PM +0200, Filip Kastl wrote: > > 32bit x86 CPUs won't natively support the FFS operation on a 64 bit > > type. Therefore, the switch-exp-transform-3.c test will always fail > > with a 32

[PATCH] testsuite: Adjust switch-exp-transform-3.c for 32bit

2024-07-31 Thread Filip Kastl
that the exponential index transform is able to handle long long int. Signed-off-by: Filip Kastl --- .../gcc.target/i386/switch-exp-transform-3.c | 51 +-- 1 file changed, 2 insertions(+), 49 deletions(-) diff --git a/gcc/testsuite/gcc.target/i386/switch-exp-transf

Re: [PATCH v2] gimple ssa: Teach switch conversion to optimize powers of 2 switches

2024-07-30 Thread Filip Kastl
On Tue 2024-07-30 14:34:54, Richard Biener wrote: > On Tue, 30 Jul 2024, Filip Kastl wrote: > > > > > > Ah, I see you fix those up. Then 2.) is left - the final block. Iff > > > > > the final block needs adjustment you know there was a path from > > &g

Re: [PATCH v2] gimple ssa: Teach switch conversion to optimize powers of 2 switches

2024-07-30 Thread Filip Kastl
> Meanwhile I'll look into source code of the rest of the switch conversion > pass. > Switch conversion pass inserts conditions similar to what I'm doing so someone > before me may have already solved how to properly fix dominators in this > situation. Oh nevermind. Switch conversion (gen_inboun

Re: [PATCH v2] gimple ssa: Teach switch conversion to optimize powers of 2 switches

2024-07-30 Thread Filip Kastl
l has a pred dominated by default" isn't equivalent with "there is a path between default and final" even when we assume that the original idom of final_bb was switch_bb. Therefore I think we're back to searching for a nice way to test "there is a path between default and final". Maybe you can spot a flaw in my logic or maybe you see a solution I don't. Meanwhile I'll look into source code of the rest of the switch conversion pass. Switch conversion pass inserts conditions similar to what I'm doing so someone before me may have already solved how to properly fix dominators in this situation. Cheers, Filip Kastl

Re: [PATCH v2] gimple ssa: Teach switch conversion to optimize powers of 2 switches

2024-07-29 Thread Filip Kastl
|| switch BB + | / | \ | \ | case BBs |default BB \ | / |/ final BB <- pred BB -+ | Here no predecessors of final_bb are dominated by default_bb but at the same time there does exist a path from default_bb to final_bb. Or is this CFG impos

Re: [PATCH][contrib]: support json output from check_GNU_style_lib.py

2024-07-24 Thread Filip Kastl
gt; +if len(errors) == 0: > +exit(0) > +else: > +json_string = json.dumps(result) > +print(json_string) > +exit(1) > else: > assert False Sure, this looks nice. I'm not sure if I have the right to approve the patch though. Cheers, Filip Kastl

Re: [PATCH][contrib]: support json output from check_GNU_style_lib.py

2024-07-22 Thread Filip Kastl
with this errlines.append({"file": locs[0], "row": locs[1], "column": locs[2], "err": e.console_error}) Cheers, Filip Kastl

Re: [PATCH v2] gimple ssa: Teach switch conversion to optimize powers of 2 switches

2024-07-18 Thread Filip Kastl
On Thu 2024-07-18 12:07:42, Richard Biener wrote: > On Wed, 17 Jul 2024, Filip Kastl wrote: > > > > + } > > > > + > > > > + vec v; > > > > + v.create (1); > > > > + v.quick_push (m_final_bb); > > > >

[PATCH v2] gimple ssa: Teach switch conversion to optimize powers of 2 switches

2024-07-17 Thread Filip Kastl
: switch BB ---+ / | \ \ case BBsdefault BB \ | / / final BB / |/ Here idom(final BB) == switch BB. After the index exponential transform the CFG looks like this cond BB -+ | | switch BB ---+ | / | \ \ | case BBsdefault BB \ | / / final

Re: [PATCH] gimple ssa: Teach switch conversion to optimize powers of 2 switches

2024-07-16 Thread Filip Kastl
On Wed 2024-07-10 11:34:44, Richard Biener wrote: > On Mon, 8 Jul 2024, Filip Kastl wrote: > > > Hi, > > > > I'm replying to Richard and keeping Andrew in cc since your suggestions > > overlap. > > > > > > On Tue 2024-06-11 14:48:06, Richard

Re: [PATCH] gimple ssa: Teach switch conversion to optimize powers of 2 switches

2024-07-11 Thread Filip Kastl
into splitting out the can_ and gen_ functions as you suggested. I'm still a bit unsure what your vision of these is so before I submit all the changes I made to the patch as version 2 I would like to share how I implemented the functions (see bellow). Is this how you imagined the functio

Re: [PATCH] gimple ssa: Teach switch conversion to optimize powers of 2 switches

2024-07-08 Thread Filip Kastl
Hi, I'm replying to Richard and keeping Andrew in cc since your suggestions overlap. On Tue 2024-06-11 14:48:06, Richard Biener wrote: > On Thu, 30 May 2024, Filip Kastl wrote: > > +/* { dg-do compile } */ > > +/* { dg-options "-O2 -fdump-tree-switchconv -march=znver

[COMMITED] MAINTAINERS: Fix order in DCO

2024-07-05 Thread Filip Kastl
Hi, I've noticed wrong order in the Contributing under the DCO section of the MAINTAINERS file. I'm commiting the fix as obvious. Filip Kastl -- 8< -- ChangeLog: * MAINTAINERS: Fix order in Contributing under the DCO. Signed-off-by: Filip Kastl --- MAINTAINERS |

[PATCH] gimple ssa: Teach switch conversion to optimize powers of 2 switches

2024-05-30 Thread Filip Kastl
test on a version where I removed the check that the target has the POPCOUNT and FFS instructions so that the transformation would be triggered more often. That testing also went well. Are there any things I should tweak? Or is the patch ready to be applied? Cheers, Filip Kastl -- 8<

[COMMITED] MAINTAINERS: Fix an entry using spaces instead of tabs

2024-05-14 Thread Filip Kastl
: * MAINTAINERS: Use tabs between name and email. contrib/ChangeLog: * check-MAINTAINERS.py: Add warning about not using tabs. Signed-off-by: Filip Kastl --- MAINTAINERS | 2 +- contrib/check-MAINTAINERS.py | 8 2 files changed, 9 insertions(+), 1 deletion(-) diff

[PATCH] contrib/check-params-in-docs.py: Ignore target-specific params

2024-04-12 Thread Filip Kastl
at the script would mistakenly complain about parms missing from --help=params. Previously, the script was just set to ignore aarch64 and gcn params which solved this issue only for x86. This patch sets the script to ignore all target-specific params. contrib/ChangeLog: * check-params-in-doc

[COMMITED] MAINTAINERS: Fix order in Write After Aproval

2024-03-12 Thread Filip Kastl
Hi, I pushed this patch on Fri 8th and sent this mail to notify that I did so. I had some trouble with sending the mail though and it didn't arrive to the mailing list. I'm sending it now instead. Filip Kastl -- 8< -- ChangeLog: * MAINTAINERS: Fix order of names i

[COMMITED] contrib: Update test_mklog to correspond to mklog

2024-03-07 Thread Filip Kastl
Hi, the recent change to contrib/mklog.py broke contrib/test_mklog.py. It modified mklog.py to produce "Move to..." instead of "Moved to..." note in changelog for files that were moved. I've commited the fix as obvious. Filip Kastl -- 8< -- contrib/ChangeLog:

Re: [PATCH v4] A new copy propagation and PHI elimination pass

2023-12-14 Thread Filip Kastl
Successfully bootstrapped and regtested on x86_64-linux. Will push to master. Filip

[PATCH v4] A new copy propagation and PHI elimination pass

2023-12-13 Thread Filip Kastl
. I didn't yet bootstrap this version. I just regtested it. Will bootstrap and regtest on the most current commit. Once that is successfully done, is the pass OK to be pushed to main? Filip -- >8 -- This patch adds the strongly-connected copy propagation (SCCOPY) pass. It is a lightweight GIMPLE

[PATCH v3] A new copy propagation and PHI elimination pass

2023-12-08 Thread Filip Kastl
_1 and _7 by 16 It also handles more complicated situations, e.g.: _8 = PHI <_9, _10>; _9 = PHI <_8, _10>; _10 = PHI <_8, _9, _1>; // Replaces occurences of _8, _9 and _10 by _1 gcc/ChangeLog: * Makefile.in: Added sccopy pass. * passes.def: Added sccopy pass bef

Re: [PATCH v2] A new copy propagation and PHI elimination pass

2023-11-22 Thread Filip Kastl
Hi Richard, > Can you name the new file gimple-ssa-sccopy.cc please? Yes, no problem. Btw, I thought that it is standard that gimple ssa passes have the tree-ssa- prefix. Do I understand it correctly that this is not true and many tree-ssa-*.cc passes should actually be named gimple-ssa-*.cc but

[PING] [PATCH v2] A new copy propagation and PHI elimination pass

2023-11-15 Thread Filip Kastl
- Forwarded message from Filip Kastl - From: Filip Kastl To: gcc-patches@gcc.gnu.org Cc: rguent...@suse.de, hubi...@ucw.cz Subject: [PATCH v2] A new copy propagation and PHI elimination pass Date: Thu, 2 Nov 2023 14:00:02 +0100 Message-ID: > Hi, > > this is a patch that I

[PATCH v2] A new copy propagation and PHI elimination pass

2023-11-02 Thread Filip Kastl
ed the pr79691.c testcase so that it works as intended with other changes from the patch. The pr79691.c testcase checks that we get constants from snprintf calls and that they simplify into a single constant. The testcase doesn't account for the fact that this constant may be further copy propa

Re: [PATCH] A new copy propagation and PHI elimination pass

2023-11-02 Thread Filip Kastl
Hi, thanks for the guidance. I'm going to post a new version of the patch with the testcase modified so that it searches for 'return 9;' instead of '= 9;'. Filip Kastl On Fri 2023-10-27 13:55:37, Jeff Law wrote: > > > On 10/20/23 07:52, Filip Kastl wro

Re: [PATCH] A new copy propagation and PHI elimination pass

2023-10-20 Thread Filip Kastl
On Fri 2023-10-20 15:50:25, Filip Kastl wrote: > Bootstraped and tested* on x86_64-pc-linux-gnu. > > * One testcase (pr79691.c) did regress. However that is because the test is > dependent on a certain variable not being copy propagated. I will go into more > detail about this in

[PATCH] A new copy propagation and PHI elimination pass

2023-10-20 Thread Filip Kastl
g: * gcc.dg/sccopy-1.c: New test. Signed-off-by: Filip Kastl --- gcc/Makefile.in | 1 + gcc/passes.def | 3 + gcc/testsuite/gcc.dg/sccopy-1.c | 78 +++ gcc/tree-pass.h | 1 + gcc/tree-ssa-sccopy.cc | 867 +++

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-09-01 Thread Filip Kastl
> That's interesting. Your placement at > > NEXT_PASS (pass_cd_dce, false /* update_address_taken_p */); > NEXT_PASS (pass_phiopt, true /* early_p */); > + NEXT_PASS (pass_sccp); > > and > >NEXT_PASS (pass_tsan); >NEXT_PASS (pass_dse, true /* use DR a

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-08-31 Thread Filip Kastl
> The most obvious places would be right after SSA construction and before RTL > expansion. > Can you provide measurements for those positions? The algorithm should only remove PHIs that break SSA form minimality. Since GCC's SSA construction already produces minimal SSA form, the algorithm isn't

[RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-08-24 Thread Filip Kastl
es these functions. Signed-off-by: Filip Kastl gcc/ChangeLog: * Makefile.in: Added sccp pass. * passes.def: Added sccp pass to early and late optimizations. * tree-pass.h (make_pass_sccp): Added sccp pass. * tree-ssa-propagate.cc (cleanup_after_replace): New

[PATCH] value-prof.cc: Correct edge prob calculation.

2023-06-15 Thread Filip Kastl via Gcc-patches
-by: Filip Kastl --- gcc/value-prof.cc | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/value-prof.cc b/gcc/value-prof.cc index f40e58ac4f2..580d6dd648d 100644 --- a/gcc/value-prof.cc +++ b/gcc/value-prof.cc @@ -1186,7 +1186,11 @@ gimple_mod_subtract_transform

[COMMITED] MAINTAINERS: Add myself to write after approval

2023-06-14 Thread Filip Kastl via Gcc-patches
Victor Kaplansky +Filip Kastl Geoffrey Keating Brendan Kehoe Andi Kleen -- 2.40.1