Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-29 Thread Guillaume Gomez via Gcc-patches
Thanks a lot! Le mar. 29 août 2023 à 17:35, David Malcolm a écrit : > > On Tue, 2023-08-29 at 17:15 +0200, Guillaume Gomez wrote: > > We finished the investigation and found out the issue: when passing > > arguments by value to functions, rustc still provides "NoAlias" as > > attribute to the arg

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-29 Thread David Malcolm via Gcc-patches
On Tue, 2023-08-29 at 17:15 +0200, Guillaume Gomez wrote: > We finished the investigation and found out the issue: when passing > arguments by value to functions, rustc still provides "NoAlias" as > attribute to the argument whereas it should never be passed in this > case. Luckily for us, in case

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-29 Thread Guillaume Gomez via Gcc-patches
We finished the investigation and found out the issue: when passing arguments by value to functions, rustc still provides "NoAlias" as attribute to the argument whereas it should never be passed in this case. Luckily for us, in case the argument is a function pointer coming from a struct field, it

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-25 Thread Guillaume Gomez via Gcc-patches
After more investigations, it seems like the fault was on our side as we were calling `gcc_jit_type_get_restrict` on types that weren't pointers. I added a check for that in `gcc_jit_type_get_restrict` directly as well. We will continue our investigation to be sure we didn't miss anything. Le mar

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-22 Thread Antoni Boucher via Gcc-patches
Since the tests in the PR for rustc_codegen_gcc (https://github.com/rust-lang/rustc_codegen_gcc/pull/312) currently fails, let's wait a bit before merging the patch, in case it would need some fixes. On Thu, 2023-08-17 at 20:09 +0200, Guillaume Gomez via Jit wrote: > Quick question: do you plan to

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-17 Thread Guillaume Gomez via Gcc-patches
Quick question: do you plan to make the merge or should I ask Antoni? Le jeu. 17 août 2023 à 17:59, Guillaume Gomez a écrit : > Thanks for the review! > > Le jeu. 17 août 2023 à 17:50, David Malcolm a écrit > : > > > > On Thu, 2023-08-17 at 17:41 +0200, Guillaume Gomez wrote: > > > And now I ju

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-17 Thread Guillaume Gomez via Gcc-patches
Thanks for the review! Le jeu. 17 août 2023 à 17:50, David Malcolm a écrit : > > On Thu, 2023-08-17 at 17:41 +0200, Guillaume Gomez wrote: > > And now I just discovered that a lot of commits from Antoni's fork > > haven't been sent upstream which is why the ABI count is so high in > > his reposit

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-17 Thread David Malcolm via Gcc-patches
On Thu, 2023-08-17 at 17:41 +0200, Guillaume Gomez wrote: > And now I just discovered that a lot of commits from Antoni's fork > haven't been sent upstream which is why the ABI count is so high in > his repository. Fixed that as well. Thanks for the updated patch; I was about to comment on that.

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-17 Thread Guillaume Gomez via Gcc-patches
And now I just discovered that a lot of commits from Antoni's fork haven't been sent upstream which is why the ABI count is so high in his repository. Fixed that as well. Le jeu. 17 août 2023 à 17:26, Guillaume Gomez a écrit : > > Antoni spot a typo I made: > > I added `LIBGCCJIT_HAVE_gcc_jit_typ

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-17 Thread Guillaume Gomez via Gcc-patches
Antoni spot a typo I made: I added `LIBGCCJIT_HAVE_gcc_jit_type_get_size` instead of `LIBGCCJIT_HAVE_gcc_jit_type_get_restrict`. Fixed in this patch, sorry for the noise. Le jeu. 17 août 2023 à 11:30, Guillaume Gomez a écrit : > > Hi Dave, > > > What kind of testing has the patch had? (e.g. did

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-17 Thread Guillaume Gomez via Gcc-patches
Hi Dave, > What kind of testing has the patch had? (e.g. did you run "make check- > jit" ? Has this been in use on real Rust code?) I tested it as Rust backend directly on this code: ``` pub fn foo(a: &mut i32, b: &mut i32, c: &i32) { *a += *c; *b += *c; } ``` I ran it with `rustc` (an

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-16 Thread David Malcolm via Gcc-patches
On Wed, 2023-08-16 at 22:06 +0200, Guillaume Gomez via Jit wrote: > My apologies, forgot to run the commit checkers. Here's the commit > with the errors fixed. > > Le mer. 16 août 2023 à 18:32, Guillaume Gomez > a écrit : > > > > Hi, Hi Guillaume, thanks for the patch. > > > > This patch adds

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-16 Thread Guillaume Gomez via Gcc-patches
My apologies, forgot to run the commit checkers. Here's the commit with the errors fixed. Le mer. 16 août 2023 à 18:32, Guillaume Gomez a écrit : > > Hi, > > This patch adds the possibility to specify the __restrict__ attribute > for function parameters. It is used by the Rust GCC backend. > > Th

[PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-16 Thread Guillaume Gomez via Gcc-patches
Hi, This patch adds the possibility to specify the __restrict__ attribute for function parameters. It is used by the Rust GCC backend. Thanks in advance for the review. From 8cafadb8409094c7fc66a1073397942a60cb27b3 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 11 Aug 2023 22:48:11 +0