This is a summary of discussions relative to the merge request created by 
Antoni Boucher (antoyo) titled
libgccjit: Add gcc_jit_type_is_floating_point
since its creation.

Description: ```
gcc/jit/ChangeLog:

        * docs/topics/compatibility.rst (LIBGCCJIT_ABI_35): New ABI tag.
        * docs/topics/types.rst: Document gcc_jit_type_is_floating_point.
        * libgccjit.cc (gcc_jit_type_is_floating_point): New function.
        * libgccjit.h (gcc_jit_type_is_floating_point): New function.
        * libgccjit.map: New function.

gcc/testsuite/ChangeLog:

        * jit.dg/test-reflection.c: Add test for
        gcc_jit_type_is_floating_point.
```

CC: David Malcolm <[email protected]>, [email protected]

The full and up to date discussion can be found at 
https://forge.sourceware.org/gcc/gcc-TEST/pulls/74

The merge request has been closed without being merged directly on the forge 
repository.


On 2025-09-16 21:28:24+00:00, David Malcolm (dmalcolm) wrote:

Looks reasonable, but in the test coverage I see uses of 
`gcc_jit_context_get_target_info` and 
`gcc_jit_target_info_supports_target_dependent_type`; is this dependent on 
another patch?  (and is that one stuck on review?)

Alternatively, this could lose the parts of the test coverage that use 
`gcc_jit_target_info` and go ahead into trunk.

On 2025-09-16 21:29:44+00:00, David Malcolm (dmalcolm) <[email protected]> 
commented on the code:


> +++ gcc/jit/docs/topics/types.rst
> @@ -433,0 +440,4 @@
> +
> +   .. code-block:: c
> +
> +      #ifdef LIBGCCJIT_HAVE_gcc_jit_context_set_output_ident
Oops, this is the wrong `#ifdef`

On 2025-09-16 21:30:57+00:00, David Malcolm (dmalcolm) <[email protected]> 
commented on the code:


> +++ gcc/testsuite/jit.dg/test-reflection.c
> @@ -27,0 +34,4 @@
> +
> +  gcc_jit_target_info *target_info = gcc_jit_context_get_target_info(ctxt);
> +  if (target_info != NULL && 
> gcc_jit_target_info_supports_target_dependent_type(target_info, 
> GCC_JIT_TYPE_FLOAT16))
> +  {
I see uses of gcc_jit_context_get_target_info and 
gcc_jit_target_info_supports_target_dependent_type; is this dependent on 
another patch? (and is that one stuck on review?)

Alternatively, this could lose the parts of the test coverage that use 
gcc_jit_target_info and go ahead into trunk.
> +++ gcc/testsuite/jit.dg/test-reflection.c
> @@ -27,0 +34,4 @@
> +
> +  gcc_jit_target_info *target_info = gcc_jit_context_get_target_info(ctxt);
> +  if (target_info != NULL && 
> gcc_jit_target_info_supports_target_dependent_type(target_info, 
> GCC_JIT_TYPE_FLOAT16))
> +  {
Oh yeah, this test depends on [this 
patch](https://github.com/antoyo/libgccjit/pull/6#pullrequestreview-3029588718).
I'm blocked because I'm not sure what to do with the fact that 
`host_detect_local_cpu` is not available for cross-compilers. Do you have an 
idea of how to fix that?
Thanks.
> +++ gcc/testsuite/jit.dg/test-reflection.c
> @@ -27,0 +34,4 @@
> +
> +  gcc_jit_target_info *target_info = gcc_jit_context_get_target_info(ctxt);
> +  if (target_info != NULL && 
> gcc_jit_target_info_supports_target_dependent_type(target_info, 
> GCC_JIT_TYPE_FLOAT16))
> +  {
Oh, it also uses the sized types (like `GCC_JIT_TYPE_FLOAT16`) which are not 
upstream either.
I'll send the patch for this.
Sorry about that.
> +++ gcc/testsuite/jit.dg/test-reflection.c
> @@ -27,0 +34,4 @@
> +
> +  gcc_jit_target_info *target_info = gcc_jit_context_get_target_info(ctxt);
> +  if (target_info != NULL && 
> gcc_jit_target_info_supports_target_dependent_type(target_info, 
> GCC_JIT_TYPE_FLOAT16))
> +  {
I got unblocked and I updated [the 
patch](https://github.com/antoyo/libgccjit/pull/6) for cpu features detection 
that is blocking this PR.
@dmalcolm: Could you please review that patch?

I also updated this PR to fix the `ifdef`

Thanks.
> +++ gcc/testsuite/jit.dg/test-reflection.c
> @@ -27,0 +34,4 @@
> +
> +  gcc_jit_target_info *target_info = gcc_jit_context_get_target_info(ctxt);
> +  if (target_info != NULL && 
> gcc_jit_target_info_supports_target_dependent_type(target_info, 
> GCC_JIT_TYPE_FLOAT16))
> +  {
@antoyo wrote in 
https://forge.sourceware.org/gcc/gcc-TEST/pulls/74#issuecomment-2293:

> Oh, it also uses the sized types (like `GCC_JIT_TYPE_FLOAT16`) which are not 
> upstream either.

Those were added in [#82.](https://forge.sourceware.org/gcc/gcc-TEST/pulls/82).
> +++ gcc/testsuite/jit.dg/test-reflection.c
> @@ -27,0 +34,4 @@
> +
> +  gcc_jit_target_info *target_info = gcc_jit_context_get_target_info(ctxt);
> +  if (target_info != NULL && 
> gcc_jit_target_info_supports_target_dependent_type(target_info, 
> GCC_JIT_TYPE_FLOAT16))
> +  {
[The required patch](https://github.com/antoyo/libgccjit/pull/6) was merged.

Now, the only thing missing is merging the [dependent pull 
request](https://forge.sourceware.org/gcc/gcc-TEST/pulls/82) (**edit:** Done).

On 2025-09-16 21:31:12+00:00, David Malcolm (dmalcolm) <[email protected]> 
requested changes to the code:
Not quite ready as-is; see the comments above.


On 2026-05-22 14:26:12+00:00, David Malcolm (dmalcolm) <[email protected]> 
approved the changes:
Thanks; LGTM



On 2026-06-17 15:19:53+00:00, Antoni Boucher (antoyo) wrote:

Thanks for the review!
Merged.

Reply via email to