Re: lto1: internal compiler error: original not compressed with zstd

2024-03-19 Thread David Malcolm
On Sun, 2024-03-17 at 18:36 -0500, StrawberryTea wrote: > Hello GCC libjit people, Hi StrawberryTea I'm the author/maintainer of libgccjit. I confess that I don't think I've ever tried using LTO with libgccjit, but rustc_codegen_gcc appears to, given: https://gcc.gnu.org/git/?p=gcc.git;a=commit;

Re: [PATCH] Allow `gcc_jit_type_get_size` to work with pointers

2024-03-29 Thread David Malcolm
On Thu, 2024-03-28 at 23:47 +0100, Guillaume Gomez wrote: > Hi, > > Here's a little fix to allow the `gcc_jit_type_get_size` function to > work on pointer types as well. > Thanks, looks good to me. Are you able to push this, or do you want me to? Dave

Building libgccjit with -fno-semantic-interposition? ( was Re: 1.76% performance loss in VRP due to inlining)

2024-04-30 Thread David Malcolm
On Tue, 2024-04-30 at 21:15 +0200, Richard Biener via Gcc wrote: > > > > Am 30.04.2024 um 21:11 schrieb Jason Merrill via Gcc > > : > > > > On Fri, Apr 26, 2024 at 5:44 AM Aldy Hernandez via Gcc > > wrote: > > > > > > In implementing prange (pointer ranges), I have found a 1.74% > > > slowdow

Re: Debug info on macOS

2024-05-10 Thread David Malcolm
On Fri, 2024-05-10 at 15:46 +0200, Gerd Möllmann wrote: > Hi, > > I'm developing Emacs using its native compilation on macOS, which is > based on libgccjit. > > In this context, I'm currently failing to get .eln files (= .so, > .dylib, > .dll depending on the platform) with debug info. This has p

Re: [PATCH 10/52] jit: Replace uses of {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE

2024-06-13 Thread David Malcolm
On Sun, 2024-06-02 at 22:01 -0500, Kewen Lin wrote: > Joseph pointed out "floating types should have their mode, > not a poorly defined precision value" in the discussion[1], > as he and Richi suggested, the existing macros > {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE will be replaced with a > hook mode_for_

Re: [PATCH 10/52] jit: Replace uses of {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE

2024-06-24 Thread David Malcolm
On Fri, 2024-06-14 at 10:16 +0800, Kewen.Lin wrote: > Hi David, > > on 2024/6/13 21:44, David Malcolm wrote: > > On Sun, 2024-06-02 at 22:01 -0500, Kewen Lin wrote: > > > Joseph pointed out "floating types should have their mode, > > > not a poorly define

Re: [PATCH] Add rvalue::get_name method (and its C equivalent)

2024-06-26 Thread David Malcolm
On Mon, 2024-04-22 at 19:56 +0200, Guillaume Gomez wrote: > `param` is also inheriting from `lvalue`. I don't think adding this > check is a good idea > because it will not evolve nicely if more changes are done in > libgccjit. Sorry for not responding earlier. I think I agree with Guillaume here

Re: [PATCH] libgccjit: Add ability to get the alignment of a type

2024-06-26 Thread David Malcolm
On Thu, 2024-04-04 at 18:59 -0400, Antoni Boucher wrote: > Hi. > This patch adds a new API to produce an rvalue representing the > alignment of a type. > Thanks for the review. Patch looks good to me (but may need the usual ABI version updates when merging). Thanks; sorry for the delay in review

Re: [PATCH] libgccjit: Make new_array_type take unsigned long

2024-06-26 Thread David Malcolm
19:45 -0500, Antoni Boucher wrote: > > Thanks for the review. > > > > Here's the updated patch. > > > > On Thu, 2023-12-07 at 20:04 -0500, David Malcolm wrote: > > > On Thu, 2023-12-07 at 17:29 -0500, Antoni Boucher wrote: > > > > Hi. &g

Re: [PATCH] libgccjit: Allow comparing array types

2024-06-26 Thread David Malcolm
orry about the ambiguity. Yes, you can push this one. Thanks Dave > Regards. > > On Wed, 2024-01-24 at 12:14 -0500, David Malcolm wrote: > > On Fri, 2024-01-19 at 16:55 -0500, Antoni Boucher wrote: > > > Hi. > > > This patch allows comparing different insta

Re: [PATCH] libgccjit: Add support for the type bfloat16

2024-06-26 Thread David Malcolm
On Wed, 2024-02-21 at 10:56 -0500, Antoni Boucher wrote: > Thanks for the review. > Here's the updated patch. Thanks for the update patch; sorry for the delay in reviewing. The updated patch looks good for trunk. Dave > > On Fri, 2023-12-01 at 12:45 -0500, David Malcolm

Re: Frontend access to target features (was Re: [PATCH] libgccjit: Add ability to get CPU features)

2024-06-26 Thread David Malcolm
On Sun, 2024-03-10 at 12:05 +0100, Iain Buclaw wrote: > Excerpts from David Malcolm's message of März 5, 2024 4:09 pm: > > On Thu, 2023-11-09 at 19:33 -0500, Antoni Boucher wrote: > > > Hi. > > > See answers below. > > > > > > On Thu, 2023-11-09 a

Re: [PATCH] libgccjit: Fix get_size of size_t

2024-06-26 Thread David Malcolm
On Wed, 2024-02-21 at 14:16 -0500, Antoni Boucher wrote: > On Thu, 2023-12-07 at 19:57 -0500, David Malcolm wrote: > > On Thu, 2023-12-07 at 17:26 -0500, Antoni Boucher wrote: > > > Hi. > > > This patch fixes getting the size of size_t (bug 112910). > > > >

Re: [PATCH] libgccjit: Add support for machine-dependent builtins

2024-06-26 Thread David Malcolm
On Thu, 2023-11-23 at 17:17 -0500, Antoni Boucher wrote: > Hi. > I did split the patch and sent one for the bfloat16 support and > another > one for the vector support. > > Here's the updated patch for the machine-dependent builtins. > Thanks for the patch; sorry about the long delay in reviewin

Re: Frontend access to target features (was Re: [PATCH] libgccjit: Add ability to get CPU features)

2024-10-29 Thread David Malcolm
will allow to check if other types are supported like > > _Float16 and > > _Float128. > > > > Here's the patch for libgccjit updated to include this file. > > > > Thanks. > > > > Le 2024-06-26 à 17 h 55, David Malcolm a écrit : > > > On Sun

jit backports to GCC 14

2024-10-30 Thread David Malcolm
I've backported the following patches from trunk to releases/gcc-14 testsuite, jit: fix test-error-pr63969-missing-driver.c https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665552.html Trunk: r15-4360-gf8dcb559e615db. GCC 14: r14-10854-g771873f0a95162 jit: reset state in varasm.cc [PR11

[pushed: r15-4580] jit: reset state in varasm.cc [PR117275]

2024-10-23 Thread David Malcolm
e-unknown-linux-gnu (cfarm120). Pushed to trunk as r15-4580-g779c0390e3b57d. gcc/ChangeLog: PR jit/117275 * toplev.cc (toplev::finalize): Call varasm_cc_finalize. * varasm.cc (varasm_cc_finalize): New. * varasm.h (varasm_cc_finalize): New decl. Signed-off-by: Davi

Re: [PATCH] libgccjit: Add type checks in gcc_jit_block_add_assignment_op

2024-11-19 Thread David Malcolm
On Thu, 2023-12-21 at 08:36 -0500, Antoni Boucher wrote: > Hi. > Here's the updated patch. > Thanks. Sorry for the delay in responding. The updated patch is good for trunk - thanks! Dave > > On Thu, 2023-12-07 at 20:15 -0500, David Malcolm wrote: > > On Thu, 2023-12

Re: [PATCH] libgccjit: Fix float playback for cross-compilation

2024-11-19 Thread David Malcolm
On Thu, 2024-01-25 at 16:04 -0500, Antoni Boucher wrote: > Thanks for the review! > On Wed, 2024-01-24 at 13:10 -0500, David Malcolm wrote: > > On Thu, 2024-01-11 at 18:42 -0500, Antoni Boucher wrote: > > > Hi. > > > This patch fixes the bug 113343. > > > I&#

Re: [PATCH] libgccjit: Add vector permutation and vector access operations

2024-11-19 Thread David Malcolm
updated patch is OK for trunk. Sorry for not being clarifying earlier Dave > > On Mon, 2023-11-20 at 18:05 -0500, David Malcolm wrote: > > On Fri, 2023-11-17 at 17:36 -0500, Antoni Boucher wrote: > > > Hi. > > > This patch adds a vector permutation and ve

Re: [PATCH] libgccjit: Add support for machine-dependent builtins

2024-11-20 Thread David Malcolm
On Tue, 2024-11-19 at 21:45 +0100, Mark Wielaard wrote: > Hi, > > Random request... > > On Tue, Nov 19, 2024 at 11:14:38AM -0500, David Malcolm wrote: > > > Here's the updated patch and answers below. > > > > > > (GitHub link if you find it easi

Re: [PATCH] libgccjit: Allow comparing aligned int types

2024-11-20 Thread David Malcolm
On Thu, 2024-02-22 at 12:40 -0500, Antoni Boucher wrote: > Thanks for the review. > Here's the updated patch. Thanks; the updated patch is good for trunk. Dave > > On Wed, 2024-01-24 at 12:18 -0500, David Malcolm wrote: > > On Thu, 2023-12-21 at 08:33 -0500, Antoni

Re: [PATCH] libgccjit: Allow sending a const pointer as argument

2024-11-20 Thread David Malcolm
On Thu, 2023-12-21 at 11:59 -0500, Antoni Boucher wrote: > Hi. > This patch adds the ability to send const pointer as argument to a > function. > Thanks for the review. Sorry for the long delay in responding to this. I'm a bit worried that this might break some type-safety within libgccjit, or th

Re: [PATCH] libgccjit: Support signed char flag

2024-11-19 Thread David Malcolm
think? The test looks good to me, I don't think it needs a target filtering directive since presumably any target on which it already passed without the patch will still pass with the patch. The patch is OK for trunk; thanks. Dave > > On Tue, 2024-01-09 at 11:01 -0500, David Malcol

Re: [PATCH] libgccjit: Add support for machine-dependent builtins

2024-11-19 Thread David Malcolm
Here's the updated patch and answers below. > > (GitHub link if you find it easier for review: > https://github.com/antoyo/libgccjit/pull/5) > > Thanks. Thanks; I looked over the patch via the above link and it looks good to me for trunk. Dave > > Le 2024-06-26 à 18 h 49,

Re: GCC 14 jit API in C++ for creating union types?

2024-12-13 Thread David Malcolm
On Fri, 2024-12-13 at 11:24 +0100, Basile Starynkevitch wrote: > On Fri, 2024-12-13 at 11:03 +0100, Basile Starynkevitch wrote: > > Hello all, > > > > On GNU Linux/Ubuntu/x86_64 I am using libgccjit++ (in > > https://github.com/RefPerSys/RefPerSys/ - a GPLv3+ inference engine > > project) but I ca

Re: Running Compiled Guile Objects

2024-12-14 Thread David Malcolm
On Sat, 2024-12-14 at 18:11 +0100, Basile Starynkevitch wrote: > On Sat, 2024-12-14 at 09:15 +0900, Nala Ginrut wrote: > > Hi Hakan! > > The current Guile is not AOT yet. Although the object file is ELF, > > it's > > just bytecode wrapped ELF header. So you can't run it as a regular > > executable

Re: Running Compiled Guile Objects

2024-12-14 Thread David Malcolm
On Sun, 2024-12-15 at 00:43 +0100, Maxime Devos wrote: > > > Those willing to contribute a proper ahead-of-time compiler to > > > GNU > > > guile could use the GNU CC libgccjit library which is part of the > > > GCC > > > compiler. > > > https://gcc.gnu.org/onlinedocs/jit/ > > > > ...and https://g

[pushed: r15-7126] jit: fix startup on aarch64

2025-01-22 Thread David Malcolm
r call to tree_type_to_jit_type fails. Don't abort on unknown types. (jit_langhook_pushdecl): Replace gcc_unreachable with return of NULL_TREE. Signed-off-by: David Malcolm --- gcc/jit/dummy-frontend.cc | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) di

Re: [pushed: r15-7126] jit: fix startup on aarch64

2025-01-23 Thread David Malcolm
your thoughts on this? I'll take another look at PR 117886 now and see if I can implement something. Dave > > Thanks. > > Le 2025-01-22 à 08 h 38, David Malcolm a écrit : > > libgccjit fails on startup on aarch64 (and probably other archs). > > >

[pushed: r15-7179] jit: fix for write_reproducer [PR117886]

2025-01-24 Thread David Malcolm
test-pr117886-write-reproducer.c: New test. Signed-off-by: David Malcolm --- gcc/jit/jit-recording.cc | 10 +- gcc/testsuite/jit.dg/all-non-failing-tests.h | 10 ++ .../jit.dg/test-pr117886-write-reproducer.c | 103 ++ 3 files changed, 121 insertions(+), 2 delet

[pushed: r15-7515] jit: add "final override" to diagnostic sink [PR116613]

2025-02-13 Thread David Malcolm
R other/116613 * dummy-frontend.cc (jit_diagnostic_listener::on_report_diagnostic): Add "final override". Signed-off-by: David Malcolm --- gcc/jit/dummy-frontend.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/jit/dummy-frontend.cc b/gcc/jit

Re: Allow to build libgccjit with a soname bound to the GCC major version

2025-03-05 Thread David Malcolm
On Sat, 2025-02-08 at 10:33 +0100, Matthias Klose wrote: > When configuring GCC with --program-suffix=-$(BASE_VERSION) to allow > installation multiple GCC versions in parallel, the executable of the > driver (gcc-$(BASE_VERSION)) gets recorded in the libgccjit.so.0 > library.  Assuming, that you