[PATCH] JIT: Update docs v2

2022-02-19 Thread Petter Tomner via Gcc-patches
Please disregard the prior patch I sent some minute ago. I spotted an copy-paste error, corrected bellow: >From 7f1d849319318a4cfd304279840899f928f9b86d Mon Sep 17 00:00:00 2001 From: Petter Tomner Date: Sat, 19 Feb 2022 16:01:54 +0100 Subject: [PATCH] jit: Update docs Update docs concerning

JIT: Update docs

2022-02-19 Thread Petter Tomner via Gcc-patches
Hi! I messed up some formatting in the doc rts-files in the constructor commit. Here is a patch fixing that, adding the ABI key in compability, and also changing a comment about linking not being possible, that is not true since drive options were added. I built the docs to verify it looks

SV: SV: [commited] jit: Support for global rvalue initialization and constructors

2021-12-30 Thread Petter Tomner via Gcc-patches
Oh ye no it is probably terrible missuse trying to write into the constructor. =) Maybe I should look into barring that entrypoint for constructors. Kinda overlooked that rvalue arrays could be used as lvalues. /Petter Från: Antoni Boucher Skickat: den 30 december 2021 02:40 Till: Petter

SV: [commited] jit: Support for global rvalue initialization and constructors

2021-12-29 Thread Petter Tomner via Gcc-patches
Could you be more specific? I tried the equivalent of: /*int [50] foobar = {1,2,3,4}; int [50] foo() { int arr[50]; arr = (int [50]){-1,-2,-3,-4,-5,-6}; arr = foobar; arr = (int [50]){1,2,3,4,5,6};

SV: [commited] jit: Support for global rvalue initialization and constructors

2021-12-15 Thread Petter Tomner via Gcc-patches
Oh ye I accidentally dropped that in the merge thank you. I believe there is an implicit "global:" in the top of each version scope, so it shouldn't matter other than looking a bit deviant. Regards, Petter Från: Antoni Boucher Skickat: den 15 december 2021 15:19 Till: Petter Tomner; David

SV: SV: [PATCH v2] jit: Add support for global rvalue initialization and ctors

2021-12-13 Thread Petter Tomner via Gcc-patches
Hi! Thanks for the review. Having proper grammar in user facing text is important so I in no way feel it is overzealous. I'll push the patch once I fixed the points mentioned in the review. Regards, Petter Från: David Malcolm Skickat: den 13 december 2021 20:22 Till: Antoni Boucher; Petter

SV: [PATCH v2] jit: Add support for global rvalue initialization and ctors

2021-12-11 Thread Petter Tomner via Gcc-patches
omner; gcc-patches@gcc.gnu.org; j...@gcc.gnu.org; Antoni Boucher Ämne: Re: [PATCH v2] jit: Add support for global rvalue initialization and ctors   On Mon, 2021-12-06 at 10:47 +0000, Petter Tomner via Gcc-patches wrote: > Hi! > > Attached is a patch with changes in line with the review of the

[commited] jit: Change printf specifiers for size_t to %zu

2021-11-27 Thread Petter Tomner via Gcc-patches
Hi! I've pushed a fix for %ld as printf specifiers for size_t which made 32bit builds sad, as per Gerald Pfeifers mail to the list: https://gcc.gnu.org/pipermail/jit/2021q4/001395.html %ld changed to %zu in four places in libgccjit.c. Please note that I considered this patch a "free for all"

SV: [PATCH] libgccjit: add some reflection functions in the jit C api

2021-10-23 Thread Petter Tomner via Gcc-patches
Hi! +gcc_jit_type * +gcc_jit_type_unqualified (gcc_jit_type *type) +{ + RETURN_NULL_IF_FAIL (type, NULL, NULL, "NULL type"); + + return (gcc_jit_type *)type->unqualified (); +} I think there is a problem with the current implementation of unqualified() that might be kinda surprising to users,

[PATCH 2/2] jit: Complex types and loong constants

2021-10-21 Thread Petter Tomner via Gcc-patches
This patch adds the possibility to make the following constants: * long long * long double * complex long double The long long one is needed for 32bit systems. The new entrypoints are: gcc_jit_context_new_rvalue_from_long_long gcc_jit_context_new_rvalue_from_long_double

[PATCH 1/2] jit: Complex types and loong constants

2021-10-21 Thread Petter Tomner via Gcc-patches
This patch fixes support for complex types. It adds the entrypoints: gcc_jit_context_new_rvalue_from_complex_double gcc_jit_context_set_bool_enable_complex_types Aswell as the binary operator GCC_JIT_BINARY_OP_COMPLEX, to make complex numbers from two real number rvalues. Note that the complex

[PATCH 0/2] jit: Complex types and loong constants

2021-10-21 Thread Petter Tomner via Gcc-patches
Hi, These two patches fixes support for complex types and adds the possibility to make long long, long double and complex long double constants. Please see follow up mails. Regards,

[PATCH 2/2] jit: Add support for complex types

2021-09-14 Thread Petter Tomner via Gcc-patches
>From a833639e6dfe9ff44b1084b5a5cbbf477d023cf5 Mon Sep 17 00:00:00 2001 From: Petter Tomner Date: Tue, 14 Sep 2021 23:52:06 +0200 Subject: [PATCH 2/2] jit: Testcases and documentation for complex types Will squash with path 1 Signed-off-by: 2021-09-15 Petter Tomner gcc/jit/docs/topics/

[PATCH 1/2] jit: Add support for complex types

2021-09-14 Thread Petter Tomner via Gcc-patches
>From ff47bbec5a833b4470cae7cb636a5fbf31c6432e Mon Sep 17 00:00:00 2001 From: Petter Tomner Date: Tue, 14 Sep 2021 23:51:41 +0200 Subject: [PATCH 1/2] jit: Support for complex types The patch adds support of complex floating point types to libgccjit. A new binary operator 'COMPLEX' is added to

[PATCH 0/2] jit: Add support for complex types

2021-09-14 Thread Petter Tomner via Gcc-patches
Hi! The following two patches adds support for complex types in libgccjit. The complex types already are in the types enum, however they are not usable. In the patch, to use complex types, the user need to call a option function enabling support. In this way, there will be a linking error

[PATCH] MAINTAINERS: Adding myself to to DCO and write after approval

2021-09-10 Thread Petter Tomner via Gcc-patches
>From f75e52427846bc453544833b1d167f8568e7cfd8 Mon Sep 17 00:00:00 2001 From: Petter Tomner Date: Fri, 10 Sep 2021 21:37:00 +0200 Subject: [PATCH] MAINTAINERS: Adding myself to to DCO and write after approval 2020-09-10 Petter Tomner ChangeLog: * MAINTAINERS: Me added to DCO and

Sv: Sv: [PATCH 1/2 v2] jit : Generate debug info for variables

2021-09-09 Thread Petter Tomner via Gcc-patches
Generate debug info for variables On Tue, 2021-09-07 at 16:18 +0000, Petter Tomner via Gcc-patches wrote: > I realized I still managed to mess up some WS. I have attached a patch > that is the same, except fixes the WS issue underneath. > > Regards, Petter > > + 

Sv: [PATCH 1/2 v2] jit : Generate debug info for variables

2021-09-07 Thread Petter Tomner via Gcc-patches
I realized I still managed to mess up some WS. I have attached a patch that is the same, except fixes the WS issue underneath. Regards, Petter + FOR_EACH_VEC_ELT (m_globals, i, global) +rest_of_decl_compilation (global, true, true);

[PATCH 2/2 v2] jit : Generate debug info for variables, testcase

2021-09-04 Thread Petter Tomner via Gcc-patches
>From 87d081f6b4233446f8a45f76dfd674f1e0b6aafe Mon Sep 17 00:00:00 2001 From: Petter Tomner Date: Sun, 5 Sep 2021 00:18:10 +0200 Subject: [PATCH 2/2] libgccjit: Test cases for debug info Assure that debug info is available for a local and global variable and a function with GDB. Signed-off-by:

[PATCH 1/2 v2] jit : Generate debug info for variables

2021-09-04 Thread Petter Tomner via Gcc-patches
>From 521349806136bef9096d094f4785f5868854a19d Mon Sep 17 00:00:00 2001 From: Petter Tomner Date: Sat, 4 Sep 2021 23:55:34 +0200 Subject: [PATCH 1/2] libgccjit: Generate debug info for variables Finalize declares via available helpers after location is set. Set TYPE_NAME of primitives and

[PATCH 0/2 v2] jit : Generate debug info for variables

2021-09-04 Thread Petter Tomner via Gcc-patches
Hi, This is a revision of my patch for debug info. The patches are posted as mails to this thread. Make check-jit runs fine on Debian x64. Below is the original mail and under it a rehash of the review comments. Regards, Petter

Sv: Sv: [PATCH] jit : Generate debug info for variables

2021-09-02 Thread Petter Tomner via Gcc-patches
2 september 2021 17:21 Till: Petter Tomner ; gcc-patches@gcc.gnu.org; j...@gcc.gnu.org Ämne: Re: Sv: [PATCH] jit : Generate debug info for variables On Tue, 2021-08-31 at 00:23 +, Petter Tomner via Gcc-patches wrote: > Well I seemed to have attached the wrong testcase. Here is the proper &g

Sv: [PATCH] jit : Generate debug info for variables

2021-08-30 Thread Petter Tomner via Gcc-patches
Well I seemed to have attached the wrong testcase. Here is the proper one attached. Regards, -Ursprungligt meddelande- Från: Petter Tomner Skickat: den 31 augusti 2021 02:14 Till: gcc-patches@gcc.gnu.org; j...@gcc.gnu.org Ämne: [PATCH] jit : Generate debug info for variables Hi, This

[PATCH] jit : Generate debug info for variables

2021-08-30 Thread Petter Tomner via Gcc-patches
Hi, This is a patch to generate debug info for local variables as well as globals. With this, "ptype foo", "info variables", "info locals" etc works when debugging in GDB. Finalizing of global variable declares are moved to after locations are handled and done as Fortran, C, Go etc do it.

[PATCH 3/3] jit: Add support for weak linkage

2021-08-08 Thread Petter Tomner via Gcc-patches
This patch updates the documentation concerning the addition of weak linkage for 'gcc_jit_context_new_function()' and 'gcc_jit_context_new_global()'. The documentation needs regeneration. gcc/jit/docs/topics/ * compilation.rst * expressions.rst * functions.rst ---

[PATCH 2/3] jit: Add support for weak linkage

2021-08-08 Thread Petter Tomner via Gcc-patches
This patch has a test case for weak linkage as well as modification of helper functions. Essentially it produces two object files, one with weak and one with normal symbols, and a main which prints the values of those two symbols and a cehck to ensure that the normal symbols' values are

[PATCH 1/3] jit: Add support for weak linkage

2021-08-08 Thread Petter Tomner via Gcc-patches
This patch adds support for weak linkage variables and functions in libgccjit. 'gcc_jit_context_new_function()' and 'gcc_jit_context_new_global()' gets one new enum value each which specifies weak linkage. The macro 'LIBGCCJIT_HAVE_WEAK_SYMBOLS' indicates weak linkage support. Analogous to

[PATCH 0/3] jit: Add support for weak linkage

2021-08-08 Thread Petter Tomner via Gcc-patches
Hi, To implement generics/C++ template-ish with libgccjit it would be very useful to have the possibility to declare functions and variables with weak linkage, to be able to have independent AOT compilation of object files without needing to keep track of what is "instantiated" where to